/* Pentacle site pages (/ko/, /en/, ...). Plain article pages around the game, in the
   game's own palette (src/web/style.css): the same night-blue ground, panel tones,
   gold for points and calls to action, and the same Latin + CJK system font stack. */
:root {
  --bg: #0f1420;
  --panel: #1a2233;
  --panel2: #222c42;
  --line: #33405c;
  --text: #e6ebf5;
  --soft: #c3cde0;
  --muted: #8ea0c0;
  --accent: #6fb1ff;
  --gold: #f2c04b;
  --gold-ink: #241a00;
  --felt: #1d3426;
  --wrap: 760px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "PingFang SC", "PingFang TC",
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK JP", "Noto Sans CJK SC",
    "Microsoft YaHei", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
:lang(ko) body, html[lang="ko"] body { word-break: keep-all; overflow-wrap: anywhere; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9cc9ff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---- header ---- */
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: rgba(15, 20, 32, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.wordmark {
  font-weight: 800; font-size: 21px; letter-spacing: .01em;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.wordmark span { color: var(--gold); }
.wordmark:hover { color: var(--text); }

.langs { display: flex; gap: 4px; font-size: 13px; font-weight: 700; }
.langs a, .langs span, .langs strong {
  display: inline-block; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel2);
  color: var(--soft); text-decoration: none; line-height: 1.3;
}
.langs a:hover { border-color: var(--accent); color: var(--text); }
.langs [aria-current], .langs strong { border-color: var(--gold); color: var(--gold); }

.site-nav {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 8px; font-size: 14px;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a, .foot-nav a {
  flex: none; color: var(--soft); text-decoration: none;
  padding: 5px 10px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover, .foot-nav a:hover { color: var(--text); background: var(--panel); }
.site-nav a[aria-current="page"] { color: var(--gold); background: var(--panel); }
.site-nav a:first-child { margin-left: -10px; }

/* ---- play button ----
   The header button has no text in the template, which has no per-language strings:
   its label comes from here, by the page's language. Buttons inside page content
   carry their own text. */
.play-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: var(--gold-ink);
  font-weight: 800; font-size: 18px; text-decoration: none;
  padding: 14px 28px; border-radius: 12px; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(242, 192, 75, .22);
  transition: filter .12s, transform .08s;
}
.play-btn::after { content: "\25B6"; font-size: .75em; }
.play-btn:hover { color: var(--gold-ink); filter: brightness(1.08); transform: translateY(-1px); }
.play-btn.small { font-size: 14px; padding: 7px 13px; border-radius: 9px; box-shadow: none; }
.play-btn.small::before { content: "Play now"; }
html[lang="ko"] .play-btn.small::before { content: "지금 플레이"; }
.play-btn.small::after { display: none; }

/* ---- article ---- */
.article { padding-top: 28px; padding-bottom: 32px; }
.article h1 {
  font-size: clamp(27px, 6.4vw, 40px); line-height: 1.25; margin: 8px 0 14px;
  letter-spacing: -.01em;
}
.article h2 {
  font-size: clamp(21px, 4.8vw, 26px); line-height: 1.35; margin: 48px 0 12px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.article h3 { font-size: 19px; line-height: 1.4; margin: 30px 0 8px; color: var(--gold); }
.article p, .article li { color: var(--soft); }
.article p { margin: 0 0 14px; }
.article strong { color: var(--text); }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 16px; }
.article li { margin: 4px 0; }
.article li::marker { color: var(--gold); }
.lead { font-size: 19px; color: var(--text) !important; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); text-transform: uppercase; margin: 0 !important;
}
.han { font-family: "Hiragino Mincho ProN", "Apple SD Gothic Neo", "Noto Serif CJK KR", serif; }

/* Hero: title, lead, the big play button. */
.hero { padding: 8px 0 8px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 22px 0 8px; }
.hero .actions .note { font-size: 14px; color: var(--muted); }

/* Screenshots. */
figure { margin: 22px 0 26px; }
figure img {
  display: block; width: 100%; height: auto;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
}
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
figure.narrow { max-width: 420px; }
figure.center { margin-left: auto; margin-right: auto; }
.shots { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; margin: 22px 0 26px; }
.shots figure { margin: 0; }
/* The phone screenshot: tall, so on a narrow screen keep it phone-sized. */
.shots figure + figure { max-width: 300px; width: 100%; margin: 0 auto; }
@media (min-width: 680px) {
  .shots { grid-template-columns: 2.6fr 1fr; }
  .shots figure + figure { max-width: none; }
}

/* Numbered legend under an annotated picture: the gold discs match the markers. */
.article ol.legend { list-style: none; padding: 0; counter-reset: lg; }
ol.legend > li { counter-increment: lg; position: relative; padding-left: 38px; margin: 10px 0; }
ol.legend > li::before {
  content: counter(lg); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: var(--bg); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Element tokens drawn inline, as in the game. */
.tok {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.45em; height: 1.45em; border-radius: 50%; vertical-align: -0.3em;
  font-size: .9em; font-weight: 800; color: rgba(0, 0, 0, .66);
  background: var(--g); border: 1px solid rgba(0, 0, 0, .45);
  font-family: "Hiragino Mincho ProN", "Apple SD Gothic Neo", serif;
}
.tok.wood { --g: #4a9e5c; } .tok.fire { --g: #d9483b; } .tok.metal { --g: #d8d8d0; }
.tok.water { --g: #2f6fd0; } .tok.earth { --g: #b08344; } .tok.qi { --g: #e0b84a; }

/* Small facts in a row. */
.article .facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0; padding: 0; list-style: none; }
.facts li {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 0; font-size: 15px; line-height: 1.45;
}
.facts b { display: block; color: var(--gold); font-size: 20px; line-height: 1.3; }
@media (min-width: 680px) { .article .facts { grid-template-columns: repeat(4, 1fr); } }

/* Cards of links to the other pages. */
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 18px 0; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards a {
  display: block; text-decoration: none; color: var(--soft);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 15px; line-height: 1.5;
}
.cards a b { display: block; color: var(--text); font-size: 17px; margin-bottom: 2px; }
.cards a:hover { border-color: var(--accent); }

/* Callout. */
.note-box {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 14px 16px; margin: 18px 0;
}
.note-box p:last-child { margin-bottom: 0; }

/* Tables (the level ladder). */
.table-wrap { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { color: var(--gold); font-weight: 700; }
td.dim, tr.dim td { color: var(--muted); }

/* Elo ladder bars. */
.bar { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3a5b8c, var(--gold)); min-width: 4px; }

/* FAQ. */
details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  margin: 10px 0; padding: 0 16px;
}
details[open] { border-color: #46557a; }
summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-weight: 700; color: var(--text); font-size: 17px; line-height: 1.5;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 11px;
  color: var(--gold); font-size: 22px; font-weight: 400;
}
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-top: 0; }
details > p:last-child, details > ul:last-child { padding-bottom: 6px; }

/* Closing call to action inside a page. */
.cta {
  margin: 44px 0 8px; padding: 22px 20px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #24402f, var(--felt) 80%);
  border: 2px solid #7a5a33; border-radius: 16px;
  box-shadow: inset 0 0 0 1px #c9a22745;
}
.cta p { color: var(--text) !important; font-size: 17px; margin-bottom: 16px; }

.small-print { font-size: 14px; color: var(--muted) !important; }

/* ---- footer ---- */
.site-foot { border-top: 1px solid var(--line); padding: 22px 0 36px; font-size: 13px; color: var(--muted); }
.site-foot p { margin: 8px 0; }
.site-foot a { color: var(--soft); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 8px -10px; font-size: 14px; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  .head-row { gap: 8px; }
  .wordmark { font-size: 19px; }
  .langs a, .langs span, .langs strong { padding: 3px 7px; }
  .play-btn { width: 100%; }
  .play-btn.small { width: auto; padding: 6px 10px; font-size: 13px; }
  th, td { padding: 9px 10px; }
}
