/* dress studio: cream, blush, ink & lime */
:root {
  --ink: #393a30;
  --muted: #77766b;
  --paper: #fbfaf5;
  --line: #e4e3d9;
  --pink: #f6c4d5;
  --lime: #e3eea5;
  --olive: #515b38;
}
[hidden] {
  display: none !important;
}
body > header,
body > main {
  transition: opacity 0.25s ease;
}
html:not(.dress-ready) body > header,
html:not(.dress-ready) body > main {
  opacity: 0;
  pointer-events: none;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-size: 14px;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  background-image: radial-gradient(#b7b49b30 0.7px, transparent 0.7px);
  background-size: 12px 12px;
}
button,
input,
select {
  font: inherit;
}
button {
  transition:
    background 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
  color: var(--ink);
  border-color: var(--line);
}
button:not(:disabled):hover {
  box-shadow: 0 3px 0 #393a3014;
  transform: translateY(-1px);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a55c7c;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
p {
  color: var(--muted);
}
header {
  height: 110px;
  max-width: 1336px;
  margin: auto;
  padding: 20px 32px;
  background: transparent;
  border: 0;
  gap: 16px;
  justify-content: space-between;
}
.studio-brand {
  display: flex;
  align-items: center;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: Georgia, serif;
  font-size: 49px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -3px;
  line-height: 0.95;
}
.wordmark span {
  font-family: Arial, sans-serif;
  font-size: 38px;
  color: #aa5e78;
  letter-spacing: 0;
  transform: rotate(-12deg);
}
header h1 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  margin: 8px 0 0;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-actions button {
  font-size: 12px;
  font-weight: 700;
  padding: 12px 19px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #c9cabc;
  min-height: 44px;
}
.header-actions #save {
  background: var(--ink);
  color: #f7facd;
  border-color: var(--ink);
  box-shadow: 3px 3px 0 #ced4b8;
}
.header-actions #save:hover {
  background: var(--olive);
}
main {
  max-width: 1336px;
  height: calc(100dvh - 110px);
  min-height: 0;
  margin: auto;
  padding: 0 32px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  overflow: hidden;
}
.preview-panel {
  position: relative;
  top: auto;
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #dcdccc;
  border-radius: 22px;
  background: #fffefb;
  box-shadow: 0 8px 30px #49442b08;
  overflow: hidden;
}
.preview-toolbar {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: #fffefb;
  gap: 8px;
}
.preview-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 800;
}
.live-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #798c4b;
  box-shadow: 0 0 0 3px #e8eddc;
}
.preview-tag {
  font-size: 9px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
.preview-toolbar .view {
  max-width: 188px;
  gap: 3px;
  background: #f1f0e8;
  padding: 3px;
  border-radius: 20px;
}
.preview-toolbar button {
  font-size: 10px;
  padding: 6px 9px;
  border-radius: 20px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}
.view button[aria-pressed="true"] {
  background: #fffefb;
  color: var(--ink);
  box-shadow: 0 1px 4px #3d3e2b15;
}
.stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  display: block;
  background-color: #fff;
  background-image: conic-gradient(#eee 25%, #fff 0 50%, #eee 0 75%, #fff 0);
  background-size: 16px 16px;
  overflow: hidden;
}
#preview {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
}
#preview[data-zoomed="true"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: none;
}
#preview:focus,
#preview:focus-visible {
  outline: none;
}
#zoomHint {
  font-size: 10px !important;
  line-height: 1.6;
  padding: 10px 16px 4px !important;
  flex-shrink: 0;
  background: #fffefb;
  color: #77776b;
}
.preview-panel > #status:empty {
  display: none;
}
.preview-panel > #status {
  flex-shrink: 0;
  min-height: 0;
  margin: 0;
  padding: 0 12px 10px;
  font-size: 9px;
  text-align: center;
  color: #7d7f6b;
  letter-spacing: 0.02em;
}
.wardrobe {
  grid-row: 1;
  grid-column: 2;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d5d7c5 transparent;
  padding: 10px 5px 16px 0;
}
.wardrobe .section-intro {
  display: block;
  margin: 0 0 25px;
  padding: 0 4px;
}
.eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #777c5b;
}
.wardrobe .section-intro h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 10px 0;
}
.section-intro h2 span {
  color: #af6381;
  font-size: 37px;
  line-height: 1;
  font-weight: 400;
}
.wardrobe .section-intro p {
  font-size: 11px;
  color: #737466;
  margin-top: 6px;
  line-height: 1.7;
}
.part-tabs {
  position: relative;
  top: auto;
  z-index: 3;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 19px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 40px);
  overflow: visible;
  gap: 5px;
  padding: 10px;
  margin-bottom: 15px;
  box-shadow: 0 8px 30px #49442b08;
}
.part-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px 1px;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.25;
  background: transparent;
  color: #767969;
}
.part-tabs svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.part-tabs button:hover {
  background: #f3f3e8;
}
.part-tabs button[aria-selected="true"] {
  background: var(--lime);
  color: #454e2f;
  border-color: #cedb91;
  box-shadow: 0 2px 0 #c5ce96;
}
.part-tabs button[aria-selected="true"] svg {
  stroke-width: 1.8;
}
.wardrobe .style-grid {
  display: block;
}
.wardrobe .part-panel {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.part-panel > .card-heading,
.part-panel > h2,
.part-panel > h3,
.part-panel > .skin-controls,
.part-panel > #skinCount {
  display: none;
}
.part-tools {
  display: flex;
  align-items: center;
  min-height: 44px;
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-bottom: 10px;
  padding: 0 2px;
  gap: 7px;
}
.part-tools button {
  border: 1px solid #d9dacc;
  border-radius: 20px;
  padding: 8px 13px !important;
  background: #fffefb;
  font-size: 11px !important;
  min-height: 36px;
}
.part-tools .remove-part {
  font-size: 11px !important;
  line-height: 1.3 !important;
  color: #737465;
}
.part-tools button[aria-expanded="true"] {
  background: var(--pink);
  border-color: #e1adbf;
  color: #633d4e;
}
.active-part-name {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #555947;
  padding: 0 4px;
}
.active-part-name::before {
  content: "SELECT / ";
  font-size: 9px;
  font-weight: 400;
  color: #858975;
  letter-spacing: 0.09em;
}
.wardrobe .style-options {
  counter-reset: slots;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding: 13px;
  background: #efefe4;
  border: 1px solid #e2e3d6;
  border-radius: 17px;
  overflow: visible;
}
.wardrobe .style-option {
  counter-increment: slots;
  position: relative;
  padding: 6px;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid #dfdfd3;
  border-radius: 11px;
  background: #fffefb;
  box-shadow: 0 2px 0 #dfdfd3;
}
.wardrobe .style-option canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  background: transparent;
  border-radius: 5px;
}
.wardrobe .style-option::after {
  display: none;
  content: none;
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #6c705e;
}
.wardrobe .style-option[aria-pressed="true"] {
  border: 2px solid #a65b79;
  background: #fff4f7;
  box-shadow: 0 3px 0 #ecc5d4;
}
.wardrobe .style-option[aria-pressed="true"]::before {
  content: "✓";
  position: absolute;
  right: -5px;
  top: -6px;
  background: #a65b79;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  z-index: 1;
}
.wardrobe .style-option:disabled {
  opacity: 1;
  background: #f8f8f0;
  border: 1px dashed #d4d6c6;
  box-shadow: none;
}
.wardrobe .style-option:disabled::before {
  content: "＋";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c1c5af;
  font-size: 20px;
  font-weight: 300;
}
.wardrobe .style-option:disabled::after {
  content: "未登録";
  letter-spacing: 0;
  color: #8a8e79;
  font-size: 9px;
}
.color-drawer {
  padding: 10px;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 17px;
  margin-bottom: 12px;
}
.color-wheel {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-width: 100%;
  max-height: none;
  margin: 0;
  touch-action: none;
  cursor: crosshair;
  object-fit: contain;
}
.color-drawer .color-save {
  display: block;
  margin: 0 auto 10px;
  padding: 10px 27px;
  background: var(--lime);
  border: 1px solid #c9d68d;
  border-radius: 22px;
  color: #495136;
  font-weight: 700;
  font-size: 12px;
}
.wardrobe .control-card label {
  color: #666b55;
  font-size: 11px;
}
.control-card label output {
  color: #7f5266;
  font-size: 11px;
}
.wardrobe input[type="range"] {
  accent-color: #a65b79;
  min-height: 26px;
  height: 26px;
}
.wardrobe .control-card .swatches {
  gap: 12px;
  margin: 15px 0;
}
.wardrobe .swatches button {
  width: 27px;
  height: 27px;
  box-shadow: 0 0 0 1px #dcdccd;
}
.color-preset-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.wardrobe .control-card .color-preset-row .swatches {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
}
.color-preset-row > button {
  flex-shrink: 0;
  white-space: nowrap;
}
.color-drawer > button:not(.color-save),
.color-preset-row > button {
  font-size: 10px;
  padding: 7px 12px;
  border-radius: 15px;
  color: #6e715f;
}
.part-panel > p {
  font-size: 11px;
  line-height: 1.8;
  margin: 12px 3px;
}
.part-panel > button {
  margin-top: 10px;
  border-radius: 20px;
}
.compact-status {
  display: none;
}
.studio-note {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 28px 3px 8px;
  padding: 21px 15px;
  border-top: 1px dashed #cfd2bd;
  border-bottom: 1px dashed #cfd2bd;
  transform: rotate(-0.5deg);
}
.note-star {
  color: #a9637e;
  font-size: 46px;
  font-family: Georgia, serif;
  line-height: 1;
}
.studio-note .eyebrow {
  font-size: 8px;
  letter-spacing: 0.12em;
}
.studio-note p {
  font-size: 13px;
  font-weight: 700;
  color: #5d624c;
  margin: 5px 0;
}
.studio-note small {
  font-size: 10px;
  line-height: 1.8;
  color: #777d66;
}
.material-dialog {
  border: 1px solid #d8d8c8;
  border-radius: 24px;
  padding: 26px;
  max-width: 460px;
  width: calc(100% - 32px);
  max-height: 85dvh;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px #33372930;
}
.material-dialog::backdrop {
  background: #33372966;
  backdrop-filter: blur(5px);
}
.material-close {
  float: right;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #fff;
}
.material-dialog .upload-panel {
  border: 0;
  padding: 8px 0;
  background: transparent;
}
.material-dialog summary {
  pointer-events: none;
  list-style: none;
  font-size: 20px;
}
.material-dialog button.primary {
  background: var(--ink);
  color: #f7facd;
  border-color: var(--ink);
  border-radius: 20px;
}
.material-dialog select,
.material-dialog input {
  background: #fffefb;
  color: var(--ink);
}
.material-color-settings {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
}
.material-color-settings legend {
  font-weight: 600;
}
.material-color-settings > label {
  margin: 4px 0 10px;
  font-size: 12px;
}
.material-color-ranges > div {
  display: grid;
  grid-template-columns: 42px 1fr 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.material-color-ranges label {
  font-size: 10px;
  margin: 0;
}
.material-color-ranges input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}
.preview-panel[data-format="square"] {
  min-height: 0;
  height: auto;
  align-self: start;
}
.preview-panel[data-format="square"] .stage {
  flex: none;
  aspect-ratio: 1;
  width: 100%;
}
.preview-panel[data-format="square"] #preview {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
}
@media (min-width: 801px) and (max-width: 1050px) and (pointer: fine),
  (min-width: 801px) and (max-width: 1050px) and (pointer: none),
  (min-width: 1025px) and (max-width: 1050px) {
  main {
    padding-left: 20px;
    padding-right: 20px;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  header {
    padding-left: 20px;
    padding-right: 20px;
  }
  .preview-tag {
    display: none;
  }
  .part-tabs {
    gap: 3px;
    padding: 7px;
  }
  .wardrobe .style-options {
    gap: 6px;
    padding: 9px;
  }
  .studio-note {
    padding-left: 5px;
    padding-right: 5px;
  }
}
@media (max-width: 800px), (pointer: coarse) and (max-width: 1024px) {
  html,
  body {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  header {
    height: 60px;
    padding: 2px 12px;
    gap: 8px;
  }
  .wordmark {
    font-size: 23px;
  }
  .wordmark span {
    font-size: 19px;
  }
  header h1 {
    font-size: 6px;
    margin-top: 0;
    letter-spacing: 0;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions button {
    padding: 4px 12px;
    font-size: 9px;
    min-height: 27px;
  }
  main {
    height: calc(100dvh - 40px);
    min-height: 0;
    padding: 0 12px max(12px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
  }
  .preview-panel {
    position: relative;
    top: auto;
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 580px;
    border-radius: 18px;
  }
  .preview-panel:not([data-format="square"]) .stage {
    flex: 0 0 clamp(250px, 46dvh, 500px);
    min-height: 250px;
  }
  .preview-toolbar {
    padding: 9px 12px;
  }
  .preview-toolbar > span {
    font-size: 9px;
  }
  .preview-toolbar .view {
    max-width: 172px;
  }
  .preview-toolbar button {
    padding: 5px 8px;
    font-size: 9px;
  }
  .preview-tag {
    display: none;
  }
  #zoomHint {
    font-size: 9px !important;
    padding: 6px 10px 3px !important;
  }
  .preview-panel > #status {
    font-size: 8px;
    padding-bottom: 6px;
  }
  .stage::after {
    font-size: 12px;
    right: 10px;
    bottom: 12px;
    padding: 8px 12px;
  }
  .wardrobe {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    min-height: 0;
    padding: 0;
  }
  .wardrobe .style-grid {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
  }
  .wardrobe .section-intro {
    margin: 0 3px 16px;
    padding: 0;
  }
  .wardrobe .section-intro h2 {
    font-size: 22px;
    margin: 7px 0;
  }
  .wardrobe .section-intro p {
    font-size: 10px;
  }
  .part-tabs {
    flex-shrink: 0;
    gap: 4px;
    padding: 1px 8px;
    margin-bottom: 2px;
    border-radius: 16px;
  }
  .part-tabs button {
    width: 52px;
    height: 52px;
    min-height: 52px;
    font-size: 9px;
    gap: 3px;
  }
  .part-tabs svg {
    width: 21px;
    height: 21px;
  }
  .wardrobe .style-options {
    grid-template-columns: repeat(5, minmax(0, 64px));
    justify-content: start;
    gap: 7px;
    padding: 2px 10px;
  }
  .part-tools {
    min-height: 30px;
    margin-bottom: 2px;
    background: #fff;
  }
  .part-tools button {
    min-height: 26px;
    padding: 3px 13px !important;
  }
  .studio-note {
    margin-top: 23px;
    padding: 17px 7px;
  }
  .preview-panel[data-format="square"] {
    flex: none;
    width: min(100%, 38dvh);
    height: min(55svh, 55%);
    max-height: 580px;
    min-height: 0;
    align-self: center;
  }
  .preview-panel[data-format="square"] .stage {
    flex: 1;
    aspect-ratio: auto;
  }
}
@media (max-width: 800px), (pointer: coarse) and (max-width: 1024px) {
  .part-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #c5ce96 transparent;
    scroll-padding-inline: 8px;
  }
  .part-tabs button {
    flex: 0 0 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

/* Compact color editor */
.color-editor {
  display: grid;
  grid-template-columns: minmax(80px, 130px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}
.color-sliders {
  min-width: 0;
}
.color-wheel-column {
  min-width: 0;
}
.color-wheel-column .color-wheel {
  width: 85%;
  height: auto;
  margin: 0 auto;
}
.color-wheel-column .color-save {
  width: 100%;
  margin: 6px 0 0;
  padding: 6px 2px;
  font-size: 10px;
  white-space: nowrap;
}
.wardrobe .control-card .color-sliders label {
  margin: 2px 0 0;
  line-height: 1.2;
}
.wardrobe .color-sliders input[type="range"] {
  margin: 0;
  min-height: 22px;
  height: 22px;
}
@media (min-width: 801px) and (pointer: fine),
  (min-width: 801px) and (pointer: none),
  (min-width: 1025px) {
  .part-tabs {
    grid-template-columns: repeat(auto-fill, 60px);
  }
  .part-tabs button {
    width: 60px;
    height: 60px;
    min-height: 60px;
    gap: 4px;
    font-size: 9px;
  }
  .part-tabs svg {
    width: 23px;
    height: 23px;
  }
  .wardrobe .style-options {
    grid-template-columns: repeat(5, 60px);
    justify-content: start;
  }
  .material-dialog {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0;
    border-radius: 16px;
    box-shadow: none;
    overscroll-behavior: contain;
  }
}
@media (max-width: 800px), (pointer: coarse) and (max-width: 1024px) {
  .color-editor {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
  }
  body:has(.material-dialog[open]) {
    overflow: hidden;
  }
}
/* PNG registration form */
.material-dialog {
  padding: 24px 16px;
  background: #fffef7;
  border: 2px solid #c9c382;
  border-radius: 8px;
}
#skinOptions:not(.show-bodies),
.part-tools
  .remove-part:not(#outerNone):not(#leftFootNone):not(#rightFootNone):not(
    #leftShoesNone
  ):not(#rightShoesNone):not(#leftAccessoryNone):not(#rightAccessoryNone):not(
    #noseNone
  ) {
  display: none;
}
.material-dialog .material-close {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #b9b26b;
}
.material-dialog .upload-panel {
  padding: 0;
}
.registration-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 5px 0;
  font-size: 13px;
}
.registration-size {
  padding-right: 34px;
}
.material-dialog .registration-row label {
  margin: 0;
  font-size: inherit;
}
.material-dialog .registration-row select {
  width: min(100%, 230px);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.format-options,
.registration-choices {
  display: flex;
  align-items: center;
  gap: 14px;
}
.material-dialog .format-options button {
  padding: 6px 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  white-space: nowrap;
}
.format-options button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px #c9c382;
}
.material-dialog .format-options button[aria-pressed="false"] {
  background: #eeeeeb;
  color: #96968e;
  border-color: #e0e0da;
}
.material-dialog .registration-choices label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.material-dialog input[type="radio"],
.material-dialog #clearBack {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #a55c7c;
}
.material-dialog :is(#uploadFile, #uploadBackFile) {
  width: 100%;
  min-width: 0;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
}
.material-dialog :is(#uploadFile, #uploadBackFile)::file-selector-button {
  padding: 4px 8px;
  margin-right: 8px;
  border: 1px solid #c7c7c0;
  border-radius: 4px;
  background: #f5f5f2;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition:
    background 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
}
.material-dialog
  :is(#uploadFile, #uploadBackFile):not(:disabled)::file-selector-button:hover {
  background: #eeeeeb;
  box-shadow: 0 3px 0 #393a3014;
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .material-dialog :is(#uploadFile, #uploadBackFile)::file-selector-button {
    transition: none;
  }
}
.material-dialog .registration-hint {
  margin: 8px 0;
  font-size: 10px;
  line-height: 1.6;
  color: #a2a198;
}
.material-dialog .registration-divider {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed #d4cf9e;
}
.material-dialog .material-color-ranges {
  width: 310px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.material-dialog .material-color-ranges > div {
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 4px 0;
  font-size: 13px;
}
.material-dialog .material-color-ranges .range-head {
  font-size: 11px;
  white-space: nowrap;
}
.material-dialog .material-color-ranges input {
  height: 20px;
  padding: 4px 6px;
  border-radius: 2px;
  font-size: 11px;
}
.material-dialog .material-color-ranges input:disabled {
  background: #f2f2f2;
}
.registration-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 12px;
}
.material-dialog .registration-actions button {
  width: 150px;
  margin: 0;
  padding: 9px 12px;
  border: 0;
  border-radius: 4px;
  background: #ededed;
  color: #333;
}
.registration-actions-secondary {
  margin-top: 4px;
}
.material-dialog .registration-actions-secondary button {
  width: auto;
  padding: 6px 10px;
  font-size: 11px;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}
.material-dialog .registration-actions .primary {
  background: #ff9fa4;
  color: #333;
}
.material-dialog .registration-actions #uploadCancel {
  background: #eeeeeb;
  color: #96968e;
}
.material-dialog #uploadStatus {
  font-size: 10px;
}
@media (max-width: 1050px) {
  .registration-row {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 6px;
    font-size: 11px;
  }
  .registration-choices,
  .format-options {
    gap: 8px;
    flex-wrap: wrap;
  }
  .material-dialog .format-options button {
    padding: 5px 8px;
  }
}
