/* Game-only presentation. All motion, input and localization remain on the existing controls. */
:root {
  --porcelain: var(--temple-paper, #f4ead4);
  --aged-gold: var(--temple-bronze, #c9a16b);
  --night-ink: var(--temple-ink, #191816);
  --lacquer: var(--temple-seal, #9f382c);
  --parchment: #e4d6ba;
  --muted-ink: #c5bcac;
  --rule: #b39f785f;
  --fine-rule: #baa98745;
  --control-fill: #1b1b19ee;
  --control-hover: #37352f;
  --panel-fill: #1c1c19;
  --sans: var(--temple-sans, system-ui, sans-serif);
  --serif: var(--temple-serif, Georgia, serif);
  --display: var(--temple-display, "Temple Serif", var(--serif));
  --sheet-paper: #e8dfc8;
  --paper-text: #322e26;
  --paper-subtle: #554b3b;
}
html:lang(en) { --serif: Georgia, "Times New Roman", serif; --display: var(--serif); }

.brand-home {
  display: grid;
  flex: none;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  color: var(--porcelain);
  pointer-events: auto;
}
.brand-home .brand-seal { width: 38px; height: 38px; }
.hud-brand { gap: .65rem; }
#route-level { color: #f0e3cf; }
.hud-tools button, #nav-toggle, .ritual-buttons button, #mazu-close-exit {
  background-color: #1d1e1bf0;
  color: var(--porcelain);
  box-shadow: 0 1px 8px #09090840;
}
.hud-tools button[aria-pressed="true"],
.language-picker button[aria-pressed="true"],
.nav-trigger[aria-expanded="true"] {
  background: #e0d6bf;
  color: #292820;
  border-color: #d2b789;
}
.hud-weather { color: #f7ecd5; }
.utility-tools .ui-icon, .nav-trigger .ui-icon, #actions .action-icon { color: #d6be91; }
.utility-tools [aria-pressed="true"] .ui-icon { color: #5c4933; }

body[data-mode="entry"] .scene-shading {
  background:
    linear-gradient(90deg, #11120fed 0, #141410c9 25%, #19181350 52%, transparent 76%),
    linear-gradient(0deg, #0c0d0bd6, transparent 37%),
    linear-gradient(#10110f8f, transparent 22%);
}
#entry {
  border-radius: 0;
  padding-inline-start: clamp(20px, 2.5vw, 38px);
  background: none;
}
#entry::before {
  background: linear-gradient(transparent, var(--aged-gold) 10%, #baa7807a 56%, transparent);
}
.entry-context { font-family: var(--serif); letter-spacing: .16em; color: #ead7af; }
.entry-context::before {
  inline-size: .55rem;
  block-size: .55rem;
  background: #c35444;
  transform: rotate(45deg);
}
#entry h1 {
  margin: .14em 0 .22em;
  font-size: clamp(4.2rem, 8.5vw, 8.6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .055em;
  color: var(--porcelain);
  text-shadow: 1px 3px 16px #090a08b8;
}
html:lang(en) #entry h1 {
  max-inline-size: 9em;
  font-size: clamp(3.05rem, 6.1vw, 6.25rem);
  line-height: 1;
}
.entry-copy { color: #e9e0ce; margin-block-end: 1.05rem; }
.entry-guide-links a { color: #ebd8b0; text-underline-offset: .23em; }
.entry-guide-links a:hover { color: white; }
#enter, #act, .primary-action {
  border: 1px solid #d78368;
  border-radius: 2px;
  background: linear-gradient(105deg, #913b30, #7a3029);
  color: #fff5df;
  font-family: var(--serif);
  font-weight: 600;
  box-shadow: inset 0 0 0 2px #743328, 0 3px 12px #090a084d;
}
#enter { justify-content: space-between; min-inline-size: 11rem; }
#entry-status { font-variant-numeric: tabular-nums; }
.nav-sheet, #site-overview {
  border: 1px solid #918567;
  background: linear-gradient(115deg, #292a24fa, #1a1b18fa 70%);
  box-shadow: 0 10px 26px #090a0866;
}
.nav-sheet { padding: .55rem; }
.nav-list { gap: .2rem .4rem; }
.nav-list button {
  min-height: 48px;
  background: transparent;
  border-color: transparent;
  border-bottom-color: #b9a77f38;
  border-radius: 0;
  text-align: start;
}
.nav-list .ui-icon, .site-controls .ui-icon { color: #d1b489; }
.nav-list button[aria-current="location"] {
  color: #f9ebcf;
  background: #503c2d;
  border-color: transparent;
  box-shadow: inset 3px 0 #d58a67;
}
#pad button { border-radius: 8px; background-color: #171815db; }
#pad button:active { border-color: #f4d9ae; background-color: #704b34; }
#site-overview { border-inline-start: 3px solid var(--aged-gold); }
#site-labels span { background: #23261ef2; color: #fff1d6; }
#notice { background: #22231fef; border-left: 3px solid #cb8058; }

dialog {
  color-scheme: light;
  color: var(--paper-text);
  border: 1px solid #c1ad85;
  border-top: 4px solid #954337;
  border-radius: 3px;
  background: linear-gradient(120deg, #f2e9d5, var(--sheet-paper) 65%, #e0d4ba);
  box-shadow: 0 20px 64px #090a078a;
  scrollbar-color: #8c7759 var(--sheet-paper);
}
dialog::backdrop { background: #10110fd1; }
dialog h2 { color: var(--paper-text); font-family: var(--display); font-weight: 500; font-size: clamp(1.65rem, 3vw, 2.05rem); line-height: 1.32; }
dialog :is(p, label) { color: var(--paper-subtle); }
dialog a { color: #7a362c; }
dialog :is(button, input, select, textarea) {
  background-color: #f6efdd;
  border-color: #aa9778;
  color: var(--paper-text);
}
dialog input::placeholder, dialog textarea::placeholder { color: #6b5c4a; }
dialog :focus-visible { outline-color: #823425; }
dialog button:not(.primary-action):not(:disabled):active,
dialog .language-picker button[aria-pressed="true"] { background: #574838; color: #fff4dd; }
#card > .modal-actions { border-color: #b3a083; }
#audio-panel .audio-heading { border-block-end: 1px solid #b3a083; padding-block-end: .65rem; }
#audio-panel output { color: #77392b; }
#audio-panel input[type="range"] { accent-color: #843e2e; }
#registration-status[data-state="error"] { color: #843e2e; }

@media (hover: hover) {
  .nav-list button:hover, .hud-tools button:not([aria-pressed="true"]):hover,
  #nav-toggle:hover, .ritual-buttons button:hover, #mazu-close-exit:hover {
    background-color: #444035;
    border-color: #b9a682;
  }
  dialog button:not(.primary-action):not([aria-pressed="true"]):not(:disabled):hover {
    background: #dfd2b8;
    border-color: #796c56;
    color: #302c24;
  }
}
@media (max-width: 650px) and (orientation: portrait) {
  body[data-mode="entry"] .scene-shading {
    background: linear-gradient(0deg, #11120ff5 2%, #151511d9 28%, #17171165 48%, transparent 72%),
                linear-gradient(#11120fa6, transparent 23%);
  }
  #entry { padding-inline-start: 14px; }
  #entry h1 { font-size: clamp(3.75rem, 15vw, 5.45rem); }
  html:lang(en) #entry h1 { font-size: clamp(2.95rem, 11vw, 4.1rem); }
  .nav-list button { min-height: 46px; }
}
@media (orientation: landscape) and (max-height: 530px) {
  #entry { padding-block: 0; }
  #entry h1 { font-size: clamp(2.6rem, 7vw, 3.8rem); }
  html:lang(en) #entry h1 { font-size: clamp(2rem, 5.3vw, 3rem); }
  .entry-context { margin-block: .15rem; }
  #audio-panel .audio-heading { background: var(--sheet-paper); }
}
@media (forced-colors: active) {
  .nav-list [aria-current="location"], .language-picker button[aria-pressed="true"] { outline: 2px solid Highlight; }
}
