/* Atralith Wiki — shared styles. Tokens from Tasarım/wiki/OKU.md. */
:root {
  /* The game's own UI palette (Assets/Game/Scripts/UI/Kit/UiTheme.cs, PC01ItemArt.RarityTint). */
  --bg: #27211b;          /* one step lighter than UiTheme.Panel (#1e1a16), owner 2026-12-05 */
  --panel: #342d25;       /* one step over Raised (#2b251e) */
  --panel-hi: #3d352c;    /* one step over RaisedHover (#342e26) */
  --deep: #2d2620;        /* a well inside a page, one step over AccentFill (#221e19) */
  --inset: #1c1814;       /* the inner frame ring, one step over CardFace (#14110e) */
  --header: #2e2720;      /* the header band, one step over HeaderFill (#241f1a) */
  --selection-fill: #3b2f1c; /* one step over SelectionFill (#2f2516) */
  --owned: #3b2e14;       /* OwnedFill */
  --line: #5a4e41;        /* one step over Line (#4d4338) */
  --line-soft: #463c32;   /* between Line and LineSoft, visible on the lighter face */
  --line-gold: #8c6f3e;   /* FrameGold */
  --text: #f4ead8;        /* Text */
  --text-hi: #fbf3e4;
  --text-body: #c7baa5;   /* TextSoft */
  --muted: #a89c8a;       /* Muted */
  --gold: #e6b85c;        /* Accent / Selection */
  --gold-hi: #f2c872;     /* StrongHover */
  --gold-strong: #c49035; /* Strong: the header's gold rule */
  --on-gold: #1b1206;     /* OnAccent */
  --c-white: #e6e6e6;
  --c-green: #4cc35a;
  --c-blue: #4fb7f7;
  --c-purple: #c163f8;
  --c-yellow: #f2c14e;
  --c-red: #e86165;
  --e-poison: #7ed46b;    /* ResistPoison */
  --e-fire: #f08a3c;      /* ResistFire */
  --e-ice: #7ad2f0;       /* ResistFrost */
  /* The game's fonts: Pixelify Sans for titles, Noto Sans for text; each script falls back to its Noto family. */
  --noto: "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", system-ui, sans-serif;
  --serif: "Pixelify Sans", var(--noto);
  --sans: var(--noto);
}
/* Pixelify Sans has no Vietnamese marks: titles stay in Noto there. */
:lang(vi) { --serif: var(--noto); }

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
img.px { image-rendering: pixelated; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.c-white { color: var(--c-white); } .c-green { color: var(--c-green); } .c-blue { color: var(--c-blue); }
.c-purple { color: var(--c-purple); } .c-yellow { color: var(--c-yellow); } .c-red { color: var(--c-red); }

/* Header: logo + WIKI, icon tabs, language. Shrinks a little once the page scrolls (common.js sets .scrolled). */
.site-head { display: flex; align-items: center; gap: 12px 28px; padding: 10px 32px; background: rgba(46,39,32,.94);
  border-bottom: 2px solid var(--gold-strong); position: sticky; top: 0; z-index: 10; transition: padding .2s, box-shadow .2s;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.site-head.scrolled { padding-top: 6px; padding-bottom: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.brand img { height: 34px; width: auto; image-rendering: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); transition: height .2s, filter .2s; }
.site-head.scrolled .brand img { height: 28px; }
.brand:hover img { filter: drop-shadow(0 0 10px rgba(242,200,114,.45)); }
.brand span { padding: 3px 8px 2px; border: 1px solid var(--line-gold); border-radius: 4px; font: 800 13px var(--serif); letter-spacing: 3px; color: var(--gold); background: var(--selection-fill); }
.site-nav { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { position: relative; display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 14px 8px 10px; border: 1px solid transparent; border-radius: 8px;
  color: var(--text-body); font-size: 15px; font-weight: 600; white-space: nowrap; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.site-nav a img { width: 28px; height: 28px; transition: transform .2s; }
.site-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transition: transform .2s; }
.site-nav a:hover { color: var(--text-hi); background: var(--panel); border-color: var(--line); transform: translateY(-1px); }
.site-nav a:hover img { transform: scale(1.15) rotate(-6deg); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--gold); background: var(--selection-fill); border-color: var(--line-gold); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a.soon { opacity: .6; }
.site-nav a.soon::before { content: attr(data-soon); position: absolute; top: -2px; inset-inline-end: -2px; padding: 1px 5px; border-radius: 3px;
  background: var(--owned); color: var(--gold); font: 600 9px var(--sans); letter-spacing: .5px; text-transform: uppercase; }
.lang { position: relative; flex: none; }
.lang select { appearance: none; min-height: 40px; padding: 0 34px 0 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: 500 14px var(--sans); cursor: pointer; transition: border-color .15s; }
.lang select:hover { border-color: var(--line-gold); }
.lang::after { content: "▾"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: 13px; }
.crumbbar { max-width: 1240px; margin: 0 auto; padding: 14px 40px 0; }
.crumbs { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
  .site-head { flex-wrap: wrap; padding: 8px 16px; }
  .site-nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .site-nav a span { font-size: 14px; }
  .brand img, .site-head.scrolled .brand img { height: 24px; }
  .brand span { font-size: 11px; letter-spacing: 2px; padding: 2px 6px 1px; }
  .lang { margin-inline-start: auto; }
  .lang select { min-height: 36px; width: 128px; padding: 0 28px 0 10px; font-size: 13px; text-overflow: ellipsis; }
  .crumbbar { padding: 12px 16px 0; }
}

/* Section heading with ornaments */
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sec-title { display: flex; align-items: center; gap: 18px; width: 100%; }
.sec-title::before, .sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-title h2 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 26px; letter-spacing: 3px; color: var(--gold); text-align: center; text-transform: uppercase; display: flex; align-items: center; gap: 18px; }
.sec-title h2::before, .sec-title h2::after { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }
.sec-head p { margin: 0; font-size: 15px; color: var(--muted); text-align: center; }

/* Panels and cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--inset); }
.panel-deep { background: var(--deep); border: 1px solid var(--line); border-radius: 12px; }
.card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--gold) !important; box-shadow: inset 0 0 0 3px var(--inset), 0 10px 28px rgba(230,184,92,.16) !important; transform: translateY(-2px); }
.label { font-size: 13px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.tag { font: 600 11px var(--sans); letter-spacing: 1px; padding: 3px 7px; border-radius: 4px; background: var(--owned); color: var(--gold); }

/* Buttons */
.btn { min-height: 52px; padding: 0 22px; border-radius: 8px; font: 600 16px var(--sans); cursor: pointer; background: transparent; color: var(--gold); border: 1px solid var(--line-gold); }
.btn-primary { background: var(--gold); color: var(--on-gold); border: 0; padding: 0 26px; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.chip { min-height: 48px; padding: 0 18px; background: var(--deep); border: 2px solid var(--line); border-radius: 8px; font: 600 15px var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--selection-fill); border-color: var(--gold); }
.step { width: 48px; height: 48px; background: var(--deep); color: var(--gold); border: 1px solid var(--line-gold); border-radius: 8px; font: 600 22px var(--sans); cursor: pointer; }

/* Footer */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 26px 40px; background: var(--deep); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-foot .grow { flex: 999 1 320px; }

@media (max-width: 720px) {
  .site-head, .site-foot { padding-left: 16px; padding-right: 16px; }
  /* Phones: the tabs become a bar fixed to the bottom of the screen, like the game's own bottom menu.
     The header loses its blur here: backdrop-filter would make it the containing block of the fixed bar. */
  .site-head { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; background: rgba(46,39,32,.98); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); overflow: visible; background: rgba(46,39,32,.98);
    border-top: 2px solid var(--gold-strong); box-shadow: 0 -8px 24px rgba(0,0,0,.45); }
  .site-nav a { flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 6px 1px 7px; text-align: center; white-space: normal; }
  .site-nav a img { width: 26px; height: 26px; }
  .site-nav a span { font-size: 10.5px; line-height: 1.15; hyphens: auto; overflow-wrap: break-word; }
  .site-nav a::after { left: 28%; right: 28%; bottom: 2px; }
  .site-nav a:hover { transform: none; background: transparent; border-color: transparent; }
  .site-nav a[aria-current="page"] { background: var(--selection-fill); border-color: var(--line-gold); }
  .site-nav a.soon::before { top: 1px; inset-inline-end: 2px; padding: 0 4px; font-size: 8px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .lang select { width: 116px; }
  [data-reveal] { scroll-margin-top: 64px; }
  .sec-title h2 { font-size: 20px; letter-spacing: 2px; gap: 12px; }
}
