.character-panel.creating {
  grid-template-columns: minmax(0, 1fr);
  width: min(760px, calc(100vw - 20px));
  height: min(940px, calc(100dvh - 20px));
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 3px double #b28c46;
  border-radius: 3px;
  overflow: hidden;
  color: #241e13;
  background: #d9c49e url("../public/assets/ui/character-sheet-parchment.png") center / 100% 100%;
  box-shadow: 0 15px 70px #000b;
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
}
.character-panel.creating > header { display: none; }
.creating .creation-wizard { display: grid; height: 100%; min-height: 0; min-width: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; gap: 0; margin: 0; padding: 0; border: 0; }
.creation-wizard > *, .creation-footer > * { min-width: 0; }
.creation-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; color: #dec18b; background: #1c272b; border-bottom: 3px double #aa8446; }
.creation-brand > div { font-size: 31px; line-height: 1; }
.creation-brand small { display: block; font-size: 11px; text-align: center; padding-top: 6px; }
.creation-brand > span { font-size: 16px; text-align: right; }
.creation-wizard > h2 { text-align: center; font-size: 34px; margin: 16px 12px 12px; line-height: 1.15; }
.creation-steps { display: flex; justify-content: center; padding: 0 24px 18px; }
.creation-wizard button { color: #241e13; background: #d3b98a; border: 3px double #826235; border-radius: 3px; min-height: 44px; }
.creation-wizard button:hover { background: #ebd7af; }
.creation-wizard button:focus-visible, .creation-wizard input:focus-visible, .creation-wizard select:focus-visible { outline: 3px solid #31789a; outline-offset: 2px; }
.creation-wizard button.primary, .creation-wizard .creation-command { background: #254253; color: #fff0cf; border-color: #a67d38; }
.creation-steps button { min-height: 37px; width: 210px; min-width: 0; font-weight: bold; font-size: 17px; }
.creation-steps button[aria-selected="true"] { color: #fff0cf; background: #30312a; }
.creation-wizard > [role=tabpanel] { min-height: 0; overflow: auto; touch-action: pan-y; margin: 0 22px; padding: 8px 12px 16px; scrollbar-color: #987744 transparent; }
.creation-wizard h3 { font-size: 22px; margin: 0 0 12px; }
.creation-identity-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 22px; }
.creation-portrait-column { text-align: center; align-self: center; padding-right: 18px; border-right: 1px solid #ad915e; }
.creation-portrait-column h3 { font-size: 20px; }
.creation-portrait-carousel { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 7px; }
.creation-wizard .creation-arrow { min-height: 46px; padding: 0; background: #2c3535; color: #dfb968; }
.creation-arrow svg { width: 23px; height: 23px; }
.creation-wizard .face-portrait-choice { width: 100%; aspect-ratio: 1; height: auto; min-height: 0; padding: 0; display: block; overflow: hidden; background: #27332e; border: 4px double #92703b; box-shadow: 0 3px 6px #422d2340; }
.creation-wizard .face-portrait-choice img { width: 100%; height: 100%; object-fit: cover; }
#creationPortraitNumber { display: block; font-size: 13px; margin-top: 8px; color: #685334; }
#creationIdentityFields { display: grid; gap: 17px; align-content: start; }
.creation-wizard label { display: grid; gap: 5px; font-size: 19px; font-weight: bold; min-width: 0; color: #241e13; }
.creation-wizard input:not([type=range]), .creation-wizard select { width: 100%; min-width: 0; min-height: 43px; background: #e8d5ac; border: 1px solid #8e7247; border-radius: 2px; color: #261f15; padding: 8px 10px; font: 17px Georgia, serif; }
.creation-wizard fieldset { border: 0; padding: 0; margin: 0; min-width: 0; color: #241e13; }
.creation-wizard legend { font-size: 19px; font-weight: bold; margin-bottom: 7px; }
.creation-wizard .segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.creation-wizard .segmented-control button { font-size: 16px; padding: 7px 4px; }
.creation-wizard .segmented-control .selected { color: #fff0cf; background: #254253; }
.creation-attributes { margin-top: 24px; padding-top: 18px; border-top: 1px solid #9c7c48; }
.creation-attributes h3 { display: flex; justify-content: space-between; align-items: center; }
.creation-attributes h3 small { font: 14px Georgia, serif; color: #655035; }
.creation-wizard .creation-stat { display: grid; grid-template-columns: 62px minmax(0, 1fr) 34px; gap: 12px; align-items: center; min-height: 55px; font-size: 23px; }
.creation-stat input { appearance: none; width: 100%; min-width: 0; height: 14px; min-height: 14px; border: 3px double #8b6933; border-radius: 1px; background: linear-gradient(to right, #345568 0 var(--fill), #d7c08f var(--fill) 100%); cursor: pointer; padding: 0; }
.creation-stat input::-webkit-slider-thumb { appearance: none; width: 23px; height: 23px; border: 4px double #c3a369; background: #3d382a; transform: rotate(45deg); box-shadow: 0 0 0 1px #47331d; }
.creation-stat input::-moz-range-thumb { width: 18px; height: 18px; border: 3px double #c3a369; background: #3d382a; transform: rotate(45deg); border-radius: 0; }
.creation-stat output { font-size: 18px; text-align: right; }
.creation-command { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 175px; padding: 8px 16px; margin: 18px 0 0 74px; font-size: 21px; }
.creation-command svg { width: 30px; height: 30px; }
.creation-wizard .creation-command:hover, .creation-wizard button.primary:hover { background: #345c70; }
.creation-appearance-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; min-height: 100%; }
#creationPaperdollHost { min-width: 0; display: grid; padding: 7px 10px 0 0; border-right: 1px solid #ac9060; }
.creation-wizard .creation-uo-paperdoll { position: relative; align-self: stretch; min-height: 455px; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 0 0 20px; overflow: hidden; background: #242b2c; border: 5px double #a88950; border-radius: 150px 150px 3px 3px; box-shadow: inset 0 0 14px #0009, 0 2px 5px #45301880; }
.creation-uo-paperdoll .preview-body { transform: translateX(58px) scale(1.65); }
.creation-uo-paperdoll #previewName { color: #e8cea0; font-size: 17px; padding: 0 10px; overflow-wrap: anywhere; text-align: center; z-index: 8; }
#creationAppearanceFields { display: grid; gap: 13px; align-content: start; }
#creationAppearanceFields h3 { border-top: 1px solid #aa8d58; padding-top: 13px; margin: 0; }
.creation-wizard .swatch-control { display: flex; flex-wrap: wrap; gap: 5px; }
.creation-wizard .swatch-control button { position: relative; flex: 0 0 30px; min-height: 30px; width: 30px; height: 30px; padding: 0; border: 1px solid #806038; border-radius: 2px; background: var(--swatch); }
.creation-wizard .swatch-control button.selected { outline: 2px solid #62421c; outline-offset: 2px; box-shadow: none; }
.creation-wizard .swatch-control button.selected::after { content: "✓"; position: absolute; inset: 0; color: white; font: bold 22px/28px system-ui,sans-serif; text-shadow: 0 1px 2px #000, 1px 0 3px #000; }
.creation-clothing-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 10px; }
.creation-clothing-row label { font-size: 17px; }
.creation-clothing-row select { min-height: 35px; padding: 5px 8px; font-size: 15px; }
.creation-wizard .garment-swatches button { flex-basis: 24px; width: 24px; min-height: 24px; height: 24px; }
.creation-wizard .garment-swatches button.selected::after { font-size: 18px; line-height: 22px; }
.creation-error { color: #8b2821; font: 14px system-ui, sans-serif; padding: 4px 30px; }
.creation-error:empty { padding: 0; }
.creation-footer { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; margin: 0 30px 24px; padding-top: 16px; border-top: 1px solid #987744; }
.creation-footer button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; font-size: 20px; font-weight: bold; }
.creation-footer svg { width: 21px; height: 21px; }
@media(max-width: 580px) {
  .character-panel.creating { top: 8px; bottom: auto; height: calc(100dvh - 16px); max-height: none; transform: translateX(-50%); }
  .creation-brand { padding: 12px 18px; }
  .creation-brand > div { font-size: 24px; }
  .creation-brand > span { max-width: 115px; font-size: 12px; }
  .creation-brand small { font-size: 9px; }
  .creation-wizard > h2 { font-size: 25px; margin-block: 12px; }
  .creation-steps { padding: 0 16px 12px; }
  .creation-steps button { font-size: 15px; }
  .creation-wizard > [role=tabpanel] { margin: 0 12px; padding: 6px 8px 16px; }
  .creation-identity-grid { grid-template-columns: 1fr; gap: 18px; }
  .creation-portrait-column { padding: 0; border: 0; width: min(235px,100%); justify-self: center; }
  #creationIdentityFields { gap: 12px; }
  .creation-wizard h3 { font-size: 20px; }
  .creation-wizard label, .creation-wizard legend { font-size: 17px; }
  .creation-attributes { margin-top: 18px; }
  .creation-wizard .creation-stat { grid-template-columns: 44px minmax(0, 1fr) 30px; gap: 10px; font-size: 21px; }
  .creation-command { margin-left: 54px; min-width: 150px; }
  .creation-footer { gap: 10px; margin: 0 18px 20px; padding-top: 12px; grid-template-columns: 1fr 1.2fr; }
  .creation-footer button { font-size: 16px; min-height: 46px; }
  .creation-appearance-grid { grid-template-columns: 1fr; gap: 20px; }
  #creationPaperdollHost { border: 0; padding: 0; width: min(265px,100%); justify-self: center; }
  .creation-wizard .creation-uo-paperdoll { min-height: 350px; height: 350px; }
  .creation-uo-paperdoll .preview-body { transform: translateX(49px) scale(1.4); }
  #creationAppearanceFields { padding-bottom: 10px; }
}
