/* Shared chrome for noscript, 404, 500 — loads without the React bundle. */

/* Keep the shell dark before React CSS hydrates. */
html, body {
  margin: 0;
  min-height: 100%;
  background: #041810;
}

#root:empty {
  min-height: 100dvh;
}

:root {
  --cream: #f1eee1;
  --muted: #b1c1b5;
  --gold: #dfb86d;
  --brass: #b99553;
  --walnut: #5c3a22;
  --felt: #0b6048;
  --felt-deep: #041810;
  --ink: #14201d;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body.site-chrome {
  min-height: 100dvh;
  font-family: "Manrope", "Noto Sans TC", system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% 28%, #11362c 0%, #08271f 48%, var(--felt-deep) 100%);
}

.site-chrome-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px);
}

.site-chrome-panel {
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 40px) clamp(22px, 4vw, 34px) clamp(24px, 4vw, 32px);
  border-radius: 22px;
  border: 1px solid rgba(224, 195, 106, 0.38);
  background:
    linear-gradient(165deg, rgba(74, 44, 24, 0.94), rgba(28, 16, 9, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 200, 0.16),
    0 28px 60px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.site-chrome-mark {
  margin: 0 0 10px;
  font-family: "Bricolage Grotesque", "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-chrome-code {
  margin: 0 0 8px;
  font-family: "Bricolage Grotesque", "Noto Sans TC", sans-serif;
  font-size: clamp(3.2rem, 12vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--cream);
}

.site-chrome-panel h1 {
  margin: 0 0 12px;
  font-family: "Bricolage Grotesque", "Noto Sans TC", sans-serif;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.site-chrome-panel h1 em {
  color: var(--gold);
  font-style: normal;
}

.site-chrome-panel p {
  margin: 0 auto 22px;
  max-width: 38ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(241, 238, 225, 0.82);
}

.site-chrome-tiles {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
}

.site-chrome-tile {
  width: 52px;
  aspect-ratio: 90 / 124;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbf5e6, #efe3c6);
  box-shadow:
    inset 0 0 0 1px rgba(184, 154, 106, 0.55),
    0 5px 0 #e4d4ad,
    0 9px 0 #c4741f,
    0 16px 22px rgba(0, 12, 8, 0.45);
  font: 700 1.55rem/1 "Noto Serif TC", "Instrument Serif", serif;
  color: #1a2744;
}

.site-chrome-tile:nth-child(2) { color: #c0392b; transform: translateY(-6px); }
.site-chrome-tile:nth-child(3) { color: #1e7a3a; }

.site-chrome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.site-chrome-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  text-decoration: none;
  font: 600 0.95rem/1 "Manrope", system-ui, sans-serif;
  transition: transform 160ms ease, filter 160ms ease;
}

.site-chrome-actions a.primary {
  background: linear-gradient(180deg, #e5c280, var(--brass));
  color: var(--ink);
  border: 1px solid #f7d99d;
}

.site-chrome-actions a.secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid #6e8774;
}

.site-chrome-actions a:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.site-chrome-foot {
  margin: 18px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(177, 193, 181, 0.75);
}

/* Noscript banner sits above an empty root when JS is off. */
.noscript-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(ellipse at 50% 28%, #11362c 0%, #08271f 48%, var(--felt-deep) 100%);
  color: var(--cream);
  font-family: "Manrope", "Noto Sans TC", system-ui, sans-serif;
}

.noscript-gate .site-chrome-panel {
  width: min(640px, 100%);
}

.noscript-gate .steps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  text-align: left;
  display: grid;
  gap: 10px;
}

.noscript-gate .steps li {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(224, 195, 106, 0.28);
  background: rgba(8, 24, 20, 0.45);
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(241, 238, 225, 0.88);
}

.noscript-gate .steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
