/* CatSir interface palette. Scene rendering and world assets remain independent. */
:root{--ink:#191919;--paper:#fff;--muted:#606060;--line:#dedede;--accent:#d6001c;--ui-red:#d6001c}
#hud,dialog,#chat-panel,#loading{color-scheme:light;color:var(--ink)}
#hud .topbar{background:#fffffff0;color:var(--ink);border-bottom:1px solid var(--line)}
#hud .wordmark{color:var(--ink)}
#hud .wordmark span{color:var(--ui-red)}
#hud .place small{color:var(--muted)}
#hud .hp-row progress,#hud .hp-row progress::-webkit-progress-bar{background:#dedede}
#hud .hp-row progress::-webkit-progress-value{background:#42844d}
#hud .hp-row progress::-moz-progress-bar{background:#42844d}
#hud .world-badge{background:#fffffff0;color:var(--ink);border:1px solid var(--line);border-radius:4px;box-shadow:none}
#hud .icon-button,#hud .bottom-bar button,#hud .skill-bar button,#touch-controls button{background:#fffffff0;color:var(--ink);border:1px solid #bfbfbf;box-shadow:0 2px 6px #00000018}
#hud .icon-button,#hud .bottom-bar button{border-radius:4px}
#hud .skill-bar small,#touch-controls > [data-control="interact"] small,#hud kbd{color:#606060}
#hud .skill-bar > span,#position,.keyboard-hint{color:#191919;background:#fffffff0;text-shadow:none;padding:4px 7px;border-radius:3px}
#hud button:active:not(:disabled),#hud button.held,#hud button[aria-pressed='true'],#touch-controls button.held{background:var(--ui-red);border-color:var(--ui-red);color:#fff}
#hud button:active:not(:disabled) small,#hud button.held small,#hud button[aria-pressed='true'] small,#hud button:active:not(:disabled) kbd{color:#fff}
#hud button:disabled{background:#e5e5e5;color:#666;border-color:#ccc;opacity:1;cursor:default}
#hud button:disabled small{color:#666}
#toast{background:#191919f5;color:#fff;border-radius:4px;border-left:4px solid var(--ui-red)}
dialog{background:#fff;color:#191919;border:1px solid #d6d6d6;border-radius:4px;box-shadow:0 16px 60px #0003}
dialog::backdrop{background:#0007}
.panel-heading{border-bottom:1px solid var(--line);padding-bottom:16px}
.panel-heading button,.chat-heading button{color:#191919;background:transparent;border-radius:4px}
.world-option{background:#f5f5f5;color:#191919;border-color:#dedede;border-radius:4px}
.world-option.current{border-color:var(--ui-red);background:#fff0f2}
.list-row button,.panel-action,dialog .primary,#chat-form button{background:var(--ui-red);color:#fff;border-radius:3px;border:1px solid var(--ui-red)}
.list-row button:disabled,.panel-action:disabled,dialog .primary:disabled,#chat-form button:disabled{background:#e5e5e5;color:#666;border-color:#ccc;opacity:1;cursor:default}
.panel-action.danger,dialog .danger{background:#191919;color:#fff;border-color:#191919}
.notice{background:#f4f4f4;color:#333;border-left:3px solid #d6001c;border-radius:2px}
.item-icon{background:#f2f2f2;color:#555;border:1px solid #e5e5e5;border-radius:4px}
#chat-panel{background:#fffffff5;color:#191919;border-radius:4px;border-color:#dedede}
#chat-input,dialog input,dialog select,dialog textarea{background:#fff;color:#191919;border-color:#bfbfbf;accent-color:var(--ui-red);caret-color:#191919}
#chat-input::placeholder,dialog input::placeholder,dialog textarea::placeholder{color:#707070;opacity:1}
#loading{background:#fffffff5;color:#191919}
#progress{accent-color:var(--ui-red)}
#progress::-webkit-progress-bar{background:#e5e5e5}
#progress::-webkit-progress-value{background:var(--ui-red)}
#progress::-moz-progress-bar{background:var(--ui-red)}
@media(hover:hover){#hud button:hover:not(:disabled){border-color:var(--ui-red)}.panel-action:hover:not(:disabled),.list-row button:hover:not(:disabled),#chat-form button:hover:not(:disabled){background:#b90018}.world-option:hover{border-color:var(--ui-red)}}

/* Translucent in-world surfaces; the website and sign-in keep their own palette. */
#hud,dialog,#chat-panel{--ink:#f5f5f5;--paper:#202024c9;--muted:#d0d0d5;--line:#ffffff29;color-scheme:dark;color:var(--ink)}
#hud .topbar,#hud .world-badge,#chat-panel,dialog{
  background:rgba(24,24,28,.66);color:#f5f5f5;border-color:#ffffff29;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
}
#hud .topbar{background:rgba(24,24,28,.48)}
#hud .wordmark,#hud .place small{color:#f5f5f5}
#hud .icon-button,#hud .bottom-bar button,#hud .skill-bar button,#touch-controls button{
  background:rgba(24,24,28,.48);color:#fff;border-color:#ffffff59;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 2px 8px #0002;
}
#hud .skill-bar small,#touch-controls > [data-control="interact"] small,#hud kbd{color:#e1e1e5}
#hud .skill-bar > span,#position,.keyboard-hint{background:#18181c80;color:#f5f5f5;text-shadow:0 1px 2px #0008}
#hud button:active:not(:disabled),#hud button.held,#hud button[aria-pressed='true'],#touch-controls button.held{background:#d6001ccc;color:#fff;border-color:#ff7385}
#hud button:disabled{background:#18181c38;color:#bcbcc4;border-color:#ffffff25}
#hud button:disabled small{color:#bcbcc4}
dialog::backdrop{background:#00000024;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.panel-heading button,.chat-heading button{color:#fff;background:transparent}
.world-option{background:#ffffff0d;color:#f5f5f5;border-color:#ffffff33}
.world-option.current{background:#d6001c30;border-color:#ff697e}
.list-row button,.panel-action,dialog .primary,#chat-form button{background:#d6001cb8;color:#fff;border-color:#ff738570}
.list-row button:disabled,.panel-action:disabled,dialog .primary:disabled,#chat-form button:disabled{background:#ffffff0d;color:#bcbcc4;border-color:#ffffff20}
.panel-action.danger,dialog .danger{background:#40081299;color:#ffced5;border-color:#ff738570}
.notice{background:#ffffff0a;color:#f0f0f3;border-left-color:#ff526c}
.item-icon{background:#ffffff0d;color:#e1e1e5;border-color:#ffffff20}
#chat-input,dialog input,dialog select,dialog textarea{background:#10101480;color:#fff;border-color:#ffffff45;caret-color:#fff;color-scheme:dark}
dialog select option{background:#252529;color:#fff}
#chat-input::placeholder,dialog input::placeholder,dialog textarea::placeholder{color:#bdbdc6}
#toast{background:#18181cd9;color:#fff;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
@media(hover:hover){#hud button:hover:not(:disabled){background:#28282c99;border-color:#ff7385}.panel-action:hover:not(:disabled),.list-row button:hover:not(:disabled),#chat-form button:hover:not(:disabled){background:#d6001ce6}.world-option:hover{background:#ffffff18;border-color:#ff7385}}

/* Readable field/table surfaces inside translucent game panels. */
#chat-input,dialog input,dialog select,dialog textarea,
.form-field input,.form-field select,.form-field textarea{
  background:rgba(255,255,255,.9);color:#191919;caret-color:#191919;
  color-scheme:light;border-color:#9c9ca3;--ink:#191919;--muted:#555;
}
dialog select option,dialog select optgroup{background:#fff;color:#191919}
#chat-input::placeholder,dialog input::placeholder,dialog textarea::placeholder,
.form-field input::placeholder,.form-field textarea::placeholder{color:#666;opacity:1}
#chat-input:-webkit-autofill,dialog input:-webkit-autofill,dialog textarea:-webkit-autofill{
  -webkit-text-fill-color:#191919;box-shadow:0 0 0 1000px #f7f7f7 inset;
}
dialog input:disabled,dialog select:disabled,dialog textarea:disabled{color:#555;opacity:1}
dialog table{
  background:rgba(255,255,255,.9);color:#191919;color-scheme:light;
  --ink:#191919;--muted:#555;--line:#00000026;
}
dialog th,dialog td{color:#191919;border-color:#00000026}
dialog th{background:#e5e5e5b3}
dialog td small,dialog th small{color:#555}

#panel-content.adventure-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#panel-content.adventure-menu > :not(button){grid-column:1 / -1;min-width:0}
#panel-content.adventure-menu > button{margin:0;width:100%;min-width:0;min-height:48px;white-space:normal;overflow-wrap:anywhere;align-self:stretch}
@media(max-width:600px){#panel-content.adventure-menu{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:340px){#panel-content.adventure-menu{grid-template-columns:minmax(0,1fr)}}

#quick-consumable .item-icon{width:36px;height:36px;flex:0 0 36px;background:transparent;border:0}
#quick-consumable .item-icon img{padding:1px}
#quick-consumable small{display:block;max-width:112px;white-space:normal;line-height:1.25}
