/* Ludisce 首页（index.html 中文、en.html 英文）。10-25 owner 在设计画布上挑了「D 游戏机主屏」：上面一排作品格子，选中哪格，下面就是哪部的介绍。
   深色底，不跟系统深浅色切换（深色本身在两种模式下都看得清）。
   不引外部字体和脚本；HTML 里没有行内 style 和行内脚本，CSP 只放 'self'。标题字体是站酷庆科黄油体（OFL，assets/display-OFL.txt），只截了页面用到的几个字。 */
@font-face {
  font-family: "Ludisce Display";
  src: url("assets/display.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ground: #111412;
  --panel: #1a1f1c;
  --line: #2a322e;
  --text: #edeae2;
  --soft: #c9ccc6;
  --dim: #8e968f;
  --amber: #f2b544;
  --amber-hi: #ffc65e;
  --amber-ink: #1b1504;
  --mint: #5fb98e;
  --mint-ink: #0c1f16;
  --display: "Ludisce Display", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --body: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 1rem/1.7 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-underline-offset: .2em; }
a:hover { color: var(--amber-hi); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
h1, h2, p, figure, dl, dd { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.wrap { width: 100%; max-width: 75rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 640px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--panel); padding: 4px 12px; }

/* 顶栏 */
.top .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.id { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; }
.brand { font: 400 1.9rem/1 var(--display); letter-spacing: .04em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.tagline { font-size: .95rem; color: var(--dim); }
.nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .95rem; }
.nav a { color: var(--soft); text-decoration: none; }
.nav a:hover { color: var(--text); text-decoration: underline; }

main { flex: 1; }

/* 作品格子：一排，放不下就在这一排里横着滑（整页不横滑） */
.tiles { list-style: none; margin: 0; padding: 8px 6px 14px; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; }
.tiles li { flex: 0 0 auto; scroll-snap-align: start; }
.tile { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: none; display: flex; flex-direction: column; gap: 10px; width: 176px; }
.tile .face { display: block; width: 176px; height: 176px; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .15s ease; }
.tile:hover .face { transform: translateY(-2px); }
.tile .face img { width: 100%; height: 100%; object-fit: cover; object-position: 6% 50%; }
.tile .name { font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--dim); }
.tile:hover .name { color: var(--soft); }
.tile[aria-pressed="true"] .face { outline: 3px solid var(--amber); outline-offset: 4px; }
.tile[aria-pressed="true"] .name { color: var(--text); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .face { outline: 3px solid var(--text); outline-offset: 4px; }
.face.locked { display: flex; align-items: center; justify-content: center; color: var(--dim); }
.face.cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-content: center; padding: 26px; }
.face.cal i { aspect-ratio: 1; border-radius: 6px; background: var(--line); }
.face.cal i.d0 { background: var(--amber); }
.face.cal i.d3 { background: var(--mint); }
@media (prefers-reduced-motion: reduce) { .tile .face { transition: none; } .tile:hover .face { transform: none; } }

/* 选中的作品 */
.work .wrap { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; padding-block: 20px 80px; }
.gallery { flex: 999 1 560px; min-width: 0; }
.gallery .shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--panel); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs button { appearance: none; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--panel); cursor: pointer; opacity: .55; transition: opacity .15s ease; }
.thumbs button:hover { opacity: .85; }
.thumbs button[aria-pressed="true"] { opacity: 1; outline: 2px solid var(--amber); outline-offset: 2px; }
.thumbs button:focus-visible { opacity: 1; outline: 3px solid var(--text); outline-offset: 2px; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery .note { margin-top: 10px; font-size: .82rem; color: var(--dim); }

.info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.info h1 { font: 400 clamp(2.6rem, 8vw, 3.75rem)/1.05 var(--display); letter-spacing: .02em; }
.kind { font-size: 1.2rem; font-weight: 700; color: var(--amber); }
.desc { font-size: 1rem; line-height: 1.8; color: var(--soft); }
.facts { display: grid; gap: 10px; padding-block: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 14px; }
:lang(en) .facts div { grid-template-columns: 6.5em minmax(0, 1fr); }
.facts dt { color: var(--dim); }
.price { display: flex; flex-direction: column; gap: 6px; }
.price b { font-size: 1.4rem; color: var(--amber); }
.price .small { font-size: .88rem; color: var(--dim); }
.go { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; font-weight: 700; }
.play { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 40px; border-radius: 8px; background: var(--amber); color: var(--amber-ink); font-size: 1.12rem; font-weight: 900; text-decoration: none; }
.play:hover { background: var(--amber-hi); color: var(--amber-ink); }

/* 还在做的格子 */
.soon .wrap { padding-block: 20px 80px; }
.slot { border: 1px dashed #3a443f; border-radius: 12px; padding: 72px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: var(--soft); }
.slot h2 { font-size: 1.6rem; font-weight: 900; color: var(--text); }

/* 学完以后 */
.after { border-top: 1px solid var(--line); }
.after .wrap { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: center; padding-block: 72px 88px; }
.after .text { flex: 1 1 340px; min-width: 0; }
.after h2 { font-size: 2rem; font-weight: 900; line-height: 1.3; }
.after .text p { margin-top: 16px; font-size: 1.06rem; line-height: 1.8; color: var(--soft); }
.days { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.days span { aspect-ratio: 1; border-radius: 10px; background: var(--panel); color: var(--dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .8rem; font-weight: 700; line-height: 1.2; }
.days b { font-size: 1.25rem; font-weight: 700; }
.days .d0 { background: var(--amber); color: var(--amber-ink); }
.days .d3 { background: var(--mint); color: var(--mint-ink); }
.days figcaption { grid-column: 1 / -1; font-size: .82rem; color: var(--dim); }

/* 页脚 */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: center; padding-block: 1.6rem 2rem; font-size: .88rem; color: var(--dim); }
footer a { color: var(--soft); }
footer a:hover { color: var(--text); }
footer .mail { user-select: all; }
footer .end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1.2rem; }

@media (max-width: 640px) {
  .tiles { gap: 14px; }
  .tile { width: 132px; }
  .tile .face { width: 132px; height: 132px; }
  .face.cal { padding: 20px; gap: 5px; }
  .work .wrap { gap: 24px; padding-block: 12px 56px; }
  .slot { padding: 48px 20px; }
  .after .wrap { padding-block: 56px 64px; gap: 28px; }
  .days { gap: 5px; }
  .days span { font-size: .7rem; border-radius: 8px; }
  .days b { font-size: 1.05rem; }
  footer .end { margin-left: 0; }
}
