/* ALIEN DICE patch notes. Two parts: the note itself (.note-*, also loaded by
   /admin/ for its preview, so the preview is exactly the public look) and the
   /notes/ page around it (body.notes-page). Colors = the landing page's
   palette (the game's own); dark only. */

/* ------------------------------------------------------------ the note */

.note-article, .note-list {
  --n-panel: #160f2b; --n-rim: #33285e; --n-text: #d4d3ee; --n-muted: #9a96cc; --n-strong: #f6f4ff;
  --n-title: #5fe08a; --n-gold: #ffd23f; --n-gold-deep: #c98a1c; --n-ion: #6fd8f0; --n-ion-deep: #1659a0;
  --n-ember: #e84545; --n-ember-deep: #9c1f2e; --n-plasma: #ff6fd0; --n-plasma-deep: #7a1d6b;
}
.note-article {
  padding: 20px 22px 24px; background: var(--n-panel); border: 2px solid var(--n-rim); color: var(--n-text);
  min-width: 0; overflow-wrap: anywhere;
}
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13px; line-height: 20px; }
.note-cat, .note-pin {
  display: inline-block; padding: 0 8px; font-weight: 700; font-size: 12px; line-height: 20px; white-space: nowrap;
  border: 1px solid currentColor;
}
.note-cat-update { color: var(--n-ion); background: rgba(22, 89, 160, 0.25); }
.note-cat-maintenance { color: var(--n-gold); background: rgba(201, 138, 28, 0.18); }
.note-cat-event { color: var(--n-plasma); background: rgba(122, 29, 107, 0.3); }
.note-pin { color: var(--n-title); }
.note-version { color: var(--n-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.note-date { color: var(--n-muted); font-variant-numeric: tabular-nums; }
.note-title { margin: 12px 0 0; font-size: 24px; line-height: 1.35; color: var(--n-strong); }
.note-body { margin-top: 14px; font-size: 16px; line-height: 1.75; }
.note-body > :first-child { margin-top: 0; }
.note-body > :last-child { margin-bottom: 0; }
.note-body p { margin: 0 0 12px; }
.note-body h3 { margin: 22px 0 8px; font-size: 19px; line-height: 1.4; color: var(--n-ion); }
.note-body h4 { margin: 18px 0 6px; font-size: 16px; line-height: 1.4; color: var(--n-strong); }
.note-body ul, .note-body ol { margin: 0 0 12px; padding-left: 1.4em; }
.note-body li { margin: 2px 0; }
.note-body li::marker { color: var(--n-gold); }
.note-body strong { color: var(--n-strong); }
.note-body a { color: var(--n-ion); text-underline-offset: 2px; }
.note-body a:focus-visible { outline: 2px solid var(--n-gold); outline-offset: 2px; }

/* A list of notes (title rows). */
.note-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.note-row a {
  display: block; padding: 12px 14px; background: var(--n-panel); border: 2px solid var(--n-rim); color: var(--n-text);
  text-decoration: none; min-width: 0;
}
.note-row a:hover { border-color: var(--n-ion-deep); }
.note-row a:focus-visible { outline: 3px solid var(--n-ion); outline-offset: 2px; }
.note-row.pinned a { border-color: var(--n-gold-deep); }
.note-row-title { display: block; margin-top: 6px; font-size: 17px; line-height: 1.45; font-weight: 700; color: var(--n-strong); overflow-wrap: anywhere; }

/* Line breaking follows the language the note is shown in (md.js sets lang on
   the article and the row title): Korean keeps words whole, Japanese and
   Chinese break between characters (keep-all there would make a whole run
   one unbreakable word). */
.note-article:lang(ko), .note-row-title:lang(ko) { word-break: keep-all; }
.note-article:lang(en), .note-row-title:lang(en) { word-break: normal; line-break: auto; }
.note-article:lang(ja), .note-article:lang(zh-Hant),
.note-row-title:lang(ja), .note-row-title:lang(zh-Hant) { word-break: normal; line-break: strict; }

@media (max-width: 600px) {
  .note-article { padding: 16px 14px 18px; }
  .note-title { font-size: 21px; }
}

/* ------------------------------------------------------------ the /notes/ page */

body.notes-page {
  --sky: #0b0716; --panel: #160f2b; --rim: #33285e; --text: #d4d3ee; --muted: #9a96cc;
  --title: #5fe08a; --title-shadow: #17694a; --gold: #ffd23f; --gold-deep: #c98a1c; --ion: #6fd8f0;
  margin: 0; color: var(--text); background: var(--sky); font: 16px/1.65 var(--body);
  word-break: normal; overflow-wrap: anywhere;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
html { background: #0b0716; color-scheme: dark; }
html {
  --pixel: "Galmuri11", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
html[data-lang="ja"] {
  --pixel: "GalmuriLatin", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}
html[data-lang="zh-Hant"] {
  --pixel: "GalmuriLatin", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --body: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
/* The page's own text: keep-all for Korean only (as the codex and odds pages). */
html:not([data-lang]) body.notes-page, html[data-lang="ko"] body.notes-page { word-break: keep-all; }
html[data-lang="ja"] body.notes-page, html[data-lang="zh-Hant"] body.notes-page { word-break: normal; line-break: strict; }
@font-face {
  font-family: "Galmuri11"; src: url("../play/assets/assets/fonts/Galmuri11-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "GalmuriLatin"; src: url("../play/assets/assets/fonts/Galmuri11-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap; unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201D, U+2026;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Languages: every chrome text comes in four <span class="t" lang="..">. */
html:not([data-lang]) .t:not([lang="ko"]),
html[data-lang="ko"] .t:not([lang="ko"]),
html[data-lang="en"] .t:not([lang="en"]),
html[data-lang="ja"] .t:not([lang="ja"]),
html[data-lang="zh-Hant"] .t:not([lang="zh-Hant"]) { display: none; }

.notes-page .wrap { max-width: 760px; margin: 0 auto; padding-block: 16px 48px; }
.notes-page a { color: var(--ion); }
.notes-page .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.notes-page .home { font-weight: 700; text-decoration: none; }
.notes-page .langs { display: flex; flex-wrap: wrap; gap: 6px; }
html:not([data-lang]) .notes-page .langs { display: none; }
.notes-page .langs button {
  min-height: 32px; padding: 6px 10px; font: 700 13px/1 var(--body); color: var(--muted); cursor: pointer;
  background: var(--panel); border: 2px solid var(--rim);
}
.notes-page .langs button:hover { color: var(--text); }
.notes-page .langs button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-deep); }
.notes-page .langs button:focus-visible { outline: 3px solid var(--ion); outline-offset: 2px; }
.notes-page h1 {
  margin: 28px 0 6px; font: 700 32px/1.2 var(--pixel); color: var(--title); text-shadow: 3px 3px 0 var(--title-shadow);
}
.notes-page .intro { margin: 0 0 22px; color: var(--muted); }
.notes-page .state { margin: 18px 0; padding: 16px; background: var(--panel); border: 2px dashed var(--rim); color: var(--muted); }
.notes-page .state p { margin: 0; }
.notes-page .state button, .notes-page .more {
  margin-top: 12px; min-height: 40px; padding: 8px 18px; font: 700 15px/1 var(--body); color: #0b0716; cursor: pointer;
  background: var(--gold); border: 3px solid #0b0716; box-shadow: 0 3px 0 var(--gold-deep);
}
.notes-page .state button:focus-visible, .notes-page .more:focus-visible { outline: 3px solid var(--ion); outline-offset: 3px; }
.notes-page .more { display: block; margin: 18px auto 0; }
.notes-page .more:disabled { opacity: 0.6; cursor: default; }
.notes-page .back { display: inline-block; margin: 0 0 14px; }
.notes-page noscript p { margin: 6px 0; }
.notes-page footer {
  margin-top: 48px; padding-top: 20px; border-top: 2px solid var(--rim); color: var(--muted); font-size: 13px;
}
.notes-page footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }

@media (max-width: 600px) {
  .notes-page h1 { font-size: 26px; margin-top: 20px; }
}
