/* The appearance studio keeps the character readable against a restrained glass stage. */
#settingsWindow.appearance-open { width: 1020px; max-width: calc(100vw - 32px); }
#settingsWindow.appearance-open #btnLogoutSettings { display: none; }
#tabCustom { --appearance-accent: #99e6ea; --appearance-line: #334a54; --appearance-text: #eef3f2; --appearance-muted: #acbdc4; }
#tabCustom .appearance-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 4px 0 22px; }
#tabCustom .appearance-eyebrow { display: block; font-size: 9px; letter-spacing: .18em; color: #8baeb9; margin-bottom: 6px; }
#tabCustom .appearance-heading h2 { font-size: 27px !important; font-weight: 580; color: var(--appearance-text) !important; margin: 0; letter-spacing: -.06em; }
#tabCustom .appearance-heading p { font-size: 12px; color: var(--appearance-muted); line-height: 1.7; margin: 0; text-align: right; }
#tabCustom #customLayout { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(340px, 1.35fr); gap: 24px; align-items: start; }
#tabCustom .appearance-stage { background: linear-gradient(145deg, #18252be8, #0b1218f2 70%); border: 1px solid #38535e; border-radius: 12px; overflow: hidden; position: relative; box-shadow: inset 0 1px #c9f8ff10; }
#tabCustom .appearance-stage::before { content: ""; position: absolute; pointer-events: none; inset: 20% 10% 15%; background: radial-gradient(ellipse at 50% 60%, #8be4f010, transparent 65%); border-radius: 50%; }
#tabCustom .appearance-stage-top { display: flex; justify-content: space-between; gap: 8px; position: absolute; top: 15px; left: 17px; right: 17px; font-size: 10px; color: #bbd3d9; z-index: 1; pointer-events: none; }
#tabCustom #customPreviewState { color: #819da8; text-align: right; }
#tabCustom #customPreview { display: block; width: 100%; height: clamp(240px, calc(100dvh - 460px), 400px); object-fit: contain; background: transparent !important; border: 0 !important; border-radius: 0 !important; touch-action: none; cursor: grab; }
#tabCustom #customPreview:active { cursor: grabbing; }
#tabCustom .appearance-view { display: flex; gap: 3px; position: absolute; top: 47px; left: 50%; transform: translateX(-50%); padding: 3px; background: #080e13b8; border-radius: 8px; border: 1px solid #3a505b; }
#tabCustom .appearance-view button { padding: 6px 16px; font-size: 11px; min-height: 30px; }
#tabCustom .appearance-camera { display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; margin: -3px 12px 0; }
#tabCustom .appearance-camera button { min-height: 34px; font-size: 11px; padding: 7px 11px; }
#tabCustom .appearance-camera button:first-child, #tabCustom .appearance-camera button:last-child { padding: 7px 9px; }
#tabCustom .appearance-camera svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#tabCustom .appearance-drag-hint { font-size: 10px; color: #93abb5; text-align: center; line-height: 1.7; margin: 13px 8px 17px; }
#tabCustom #customControls { max-height: min(500px, calc(100dvh - 390px)); min-width: 0; padding: 0 6px 8px 0; overflow-y: auto; scrollbar-color: #496570 #10191f; }
#tabCustom .appearance-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: #cadde3; margin-bottom: 9px; }
#tabCustom .appearance-label span { color: #8fa4ae; font-size: 10px; font-weight: 400; }
#tabCustom .appearance-preset-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
#tabCustom button { font-family: inherit; cursor: pointer; }
#tabCustom button:not(.btn-gold) { color: var(--appearance-text) !important; background: #14212be0 !important; border: 1px solid #39515d !important; border-radius: 7px !important; box-shadow: inset 0 1px #c8eaff05 !important; }
#tabCustom button:not(.btn-gold):not(:disabled):hover { color: #f5ffff !important; background: #213743 !important; border-color: #84bdc7 !important; }
#tabCustom button[aria-pressed="true"] { background: #243f49 !important; border-color: #91cbd3 !important; color: #d3fbfb !important; box-shadow: inset 0 0 0 1px #9be7ed24 !important; }
#tabCustom .appearance-preset { display: flex; align-items: center; gap: 8px; padding: 10px 9px; text-align: left; min-width: 0; }
#tabCustom .appearance-preset b { display: block; font-size: 11px; color: #e4f0f2; font-weight: 550; line-height: 1.4; }
#tabCustom .appearance-preset small { display: block; margin-top: 3px; color: #9eb2bc !important; font-size: 9px; line-height: 1.6; }
#tabCustom .appearance-preset-mark { flex-shrink: 0; width: 23px; color: var(--swatch); filter: drop-shadow(0 0 6px #a2cfd81c); }
#tabCustom .appearance-preset-mark svg { display: block; width: 100%; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
#tabCustom .appearance-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; padding: 18px 0 17px; margin-bottom: 5px; border-bottom: 1px solid #30414b; }
#tabCustom .appearance-tabs button { padding: 10px 3px; font-size: 11px; }
#tabCustom .appearance-field { border: 0; padding: 0; margin: 18px 0 23px; min-width: 0; }
#tabCustom .appearance-field legend { padding: 0; font-size: 12px; font-weight: 550; letter-spacing: -.015em; margin-bottom: 11px; color: #dbe9ed; }
#tabCustom .appearance-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
#tabCustom .appearance-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 13px; min-height: 56px; text-align: left; }
#tabCustom .appearance-choice span { font-size: 12px; font-weight: 500; }
#tabCustom .appearance-choice small { font-size: 10px; color: #adc0c9 !important; font-weight: 400; line-height: 1.5; }
#tabCustom .appearance-choice[aria-pressed="true"]::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #a5eaf0; box-shadow: 0 0 9px #99e6ea55; position: absolute; right: 10px; top: 13px; }
#tabCustom .appearance-colors { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
#tabCustom button.appearance-swatch { width: 35px; height: 35px; padding: 4px; display: grid; place-items: center; border-radius: 50% !important; background: #101a20 !important; }
#tabCustom .appearance-swatch span { display: block; background: var(--swatch); border-radius: 50%; box-shadow: inset 0 0 0 1px #ffffff18; width: 100%; height: 100%; }
#tabCustom .appearance-swatch[aria-pressed="true"] { border-color: #b4f2f3 !important; box-shadow: 0 0 0 2px #99e6ea22 !important; }
#tabCustom .appearance-color-picker { display: flex; align-items: center; gap: 6px; margin-left: 4px; font-size: 10px; color: #c3d2d7; cursor: pointer; }
#tabCustom .appearance-color-picker input { width: 27px; height: 27px; border: 1px solid #68838e; background: transparent; border-radius: 5px; padding: 2px; cursor: pointer; }
#tabCustom .appearance-help { margin: 17px 0 24px; color: #adc0c9; font-size: 12px; line-height: 1.8; }
#tabCustom .appearance-range { display: block; margin: 25px 0; }
#tabCustom .appearance-range > span { display: flex; justify-content: space-between; align-items: center; color: #dce8eb; font-size: 12px; margin-bottom: 9px; }
#tabCustom .appearance-range output { font-variant-numeric: tabular-nums; font-size: 11px; color: #b4e1e7; }
#tabCustom .appearance-range input { width: 100%; margin: 0; accent-color: #99e6ea; }
#tabCustom .appearance-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #344650; }
#tabCustom .appearance-footer p { color: #aebfc7; font-size: 11px; line-height: 1.7; margin: 0; flex: 1; }
#tabCustom .appearance-footer p.is-error { color: #f1b5ac; }
#tabCustom .appearance-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
#tabCustom .appearance-footer button { min-height: 42px; padding: 10px 17px; font-size: 12px; }
#tabCustom button.btn-gold:not(:disabled) { color: #10262b !important; background: linear-gradient(130deg,#b9e6e7,#83bfc7) !important; border-color: #c6f3f4 !important; font-weight: 650 !important; }
#tabCustom button.btn-gold:not(:disabled):hover { color: #0c2024 !important; background: #cbf1f0 !important; }
#tabCustom button:disabled, #tabCustom input:disabled { cursor: wait !important; opacity: .6 !important; }
@media(max-width: 740px) {
  #settingsWindow.appearance-open { padding: 18px !important; max-width: calc(100vw - 18px); }
  #tabCustom .appearance-heading { margin-bottom: 16px; }
  #tabCustom .appearance-heading h2 { font-size: 23px !important; }
  #tabCustom .appearance-heading p { display: none; }
  #tabCustom #customLayout { grid-template-columns: 1fr; gap: 18px; }
  #tabCustom .appearance-stage { max-width: 340px; width: 100%; margin: auto; }
  #tabCustom #customPreview { height: 330px; object-fit: contain; }
  #tabCustom #customControls { max-height: none; overflow: visible; padding: 0; }
  #tabCustom .appearance-footer { flex-direction: column; align-items: stretch; gap: 12px; }
  #tabCustom .appearance-footer > div { display: grid; grid-template-columns: 1fr 1.3fr; }
}
@media(prefers-reduced-motion:reduce) { #tabCustom * { scroll-behavior: auto; transition: none !important; } }
