* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  background: #101018;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: #f7f5ec;
  font:
    500 16px/1.45 "DM Sans",
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  background:
    radial-gradient(ellipse at 78% -28%, #302945 0, transparent 60%), #101018;
  min-height: 100svh;
}
html[lang="en"] [lang="zh-CN"],
html[lang="zh-CN"] [lang="en"] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
a,
button {
  touch-action: manipulation;
}
.wrap {
  width: min(1140px, calc(100% - 80px));
  margin-inline: auto;
}
.sitehead {
  border-bottom: 1px solid #ffffff15;
}
.headrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 74px;
}
.headrow .brand-logo {
  margin-inline-end: auto;
}
.word {
  display: flex;
  align-items: center;
  gap: 30px;
}
.lang {
  background: #272630;
  border: 1px solid #44404e;
  border-radius: 24px;
  padding: 7px 15px;
  min-height: 40px;
  font-size: 14px;
  color: #eae6f2;
}
main.wrap {
  padding-top: 28px;
}
a:focus-visible,button:focus-visible { outline:3px solid #dfff72;outline-offset:3px }
.library-heading {margin:14px 0 22px}
.library-heading h1 {margin:0;font-size:clamp(28px,4vw,48px);letter-spacing:-.035em;line-height:1.15}
.library-heading p {margin:8px 0 0;color:#c6c3ce}
.arcade-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.arcade-card {min-width:0;border:1px solid #ffffff25;border-radius:18px;background:#211f29;overflow:hidden}
.card-cover,.cover {display:block;width:100%}.cover {aspect-ratio:16/8;height:auto;object-fit:cover}
.card-body {padding:clamp(16px,2vw,26px)}
.card-body h2 {font-size:clamp(24px,3vw,36px);line-height:1.15;margin:6px 0 10px}
.card-body p {margin:0;color:#d1ced8;line-height:1.55;max-width:48ch}
.genre-label,.state-tag {color:#dfff72;font-size:13px;font-weight:650}
.state-tag {color:#cdc5de}
.card-actions {display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.card-actions {margin:14px 0 6px}.card-actions small {color:#cbc9d1}
.start-link {background:#dfff72;color:#20261b;font-weight:750;border-radius:9px;min-height:44px;padding:10px 17px;display:inline-flex;align-items:center;gap:8px}
.start-link:hover {background:#f1ffbb}
.card-body .guide-link {display:inline-flex;align-items:center;min-height:44px;color:#dad5e8;font-size:14px}
.recent-games{margin:0 0 clamp(18px,3vw,30px)}
.recent-games[hidden],.recent-games button[hidden]{display:none}
.recent-games header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:42px}
.recent-games h2{font-size:clamp(17px,2vw,21px);line-height:1.25;margin:0;color:#f2efdf;letter-spacing:-.02em}
.recent-games button{min-height:44px;background:none;border:0;padding:0 4px;color:#dfff72;font-size:14px}
.recent-games ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;list-style:none;margin:4px 0 0;padding:0}
.recent-games li{min-width:0}
.recent-games li a{display:grid;height:100%;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 14px 8px 8px;border:1px solid #44414d;border-radius:12px;background:linear-gradient(115deg,#2b2933,#211f29)}
.recent-games li a:hover{border-color:#92a664;background:#302f38}
.recent-games img{display:block;width:54px;height:54px;object-fit:cover;border-radius:7px}
.recent-games strong,.recent-games small{display:block;overflow-wrap:anywhere}
.recent-games strong{font-size:16px;line-height:1.25}
.recent-games small{font-size:13px;line-height:1.4;color:#d2cddb;margin-top:3px;font-variant-numeric:tabular-nums}
.recent-games b{font-size:13px;color:#dfff72}
@media(max-width:680px){.recent-games ul{grid-template-columns:minmax(0,1fr)}.recent-games li a{grid-template-columns:46px minmax(0,1fr) auto;gap:9px;padding:7px 10px 7px 7px}.recent-games img{width:46px;height:46px}.recent-games small{font-size:12px}}
footer.wrap {display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:35px;padding-block:20px;border-top:1px solid #ffffff24;font-size:14px;color:#c8c4cf}
footer.wrap nav{display:flex;flex-wrap:wrap;gap:0 14px}footer.wrap a{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:650px){
  .wrap {width:calc(100% - 28px)}.headrow{min-height:60px}
  main.wrap{padding-top:10px}.library-heading{margin:12px 0 16px}.library-heading p{font-size:14px}
  .arcade-grid{grid-template-columns:1fr;gap:12px}.arcade-card{display:grid;grid-template-columns:32% minmax(0,1fr);border-radius:13px}
  .cover {height:100%;min-height:120px;aspect-ratio:auto}.card-body {padding:13px}.card-body h2{margin:3px 0 6px}
  .card-actions{gap:6px;margin:8px 0 0}.card-body p{font-size:14px}.card-body .guide-link{font-size:13px}
  .upcoming .card-body{align-self:center}
}
.game-guide { max-width: 920px; padding-block: 22px 64px; }
.game-guide nav, .guide-access { color: #c2bfd2; font-size: .93rem; }
.game-guide nav a, .chapter-notes a, .guide-link { text-decoration: underline; text-underline-offset: .22em; }
.guide-intro { margin-top: 18px; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(16px,4vw,40px); align-items: center; }
.guide-intro h1 { line-height: 1.15; font-size: clamp(2rem,4.6vw,3.5rem); margin: 0; text-wrap: balance; }
.guide-intro p, .chapter-notes p { line-height: 1.65; max-width: 66ch; }
.guide-intro img { width: 100%; height: auto; border-radius: 14px; }
.chapter-notes { padding-block: 18px; border-top: 1px solid #ffffff26; }
.chapter-notes h2 { margin: 0; }
.chapter-notes details { margin-bottom: 12px; }
.chapter-notes summary { cursor: pointer; color: #ddd7ee; width: fit-content; padding-block: 6px; }
.chapter-notes ul { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 18px; }
.chapter-notes li span { color: #c1d88a; font-variant-numeric: tabular-nums; }
@media(max-width: 600px) { .guide-intro { grid-template-columns: 1fr; } .guide-intro img { max-height: 170px; object-fit: cover; } }
@media(max-width:650px) and (orientation:portrait){
 .arcade-card{display:block}.arcade-card .cover{aspect-ratio:auto;height:clamp(92px,18svh,158px);min-height:0;object-position:50% 56%}
 .upcoming .cover{object-position:50% 48%}.card-body{padding:12px 14px}
 .card-body h2{font-size:23px}.available .card-body{display:grid;grid-template-columns:1fr auto;column-gap:8px;align-items:center}
 .available .card-body h2,.available .genre-label,.available .card-body p{grid-column:1/-1}
 .card-body .guide-link{align-self:end;justify-self:end}.card-actions small{font-size:12px}
}
.game-guide .play{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;background:#dfff72;color:#20261b;border-radius:9px;font-weight:700}


.card-record{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:1px 8px;margin:2px 0 8px;color:var(--ink,currentColor);line-height:1.3}
.card-record span{font-weight:650;font-size:12px}.card-record strong{font-size:16px;font-variant-numeric:tabular-nums}
.card-record small{grid-column:1/-1;max-width:100%;text-align:start;overflow-wrap:anywhere;white-space:normal;font-size:12px}

.game-guide .chapter-notes { scroll-margin-top: 1rem; }
.chapter-notes > p { margin: .7em 0; }
.worked-level { margin: 18px 0; padding-inline-start: 16px; border-inline-start: 2px solid #c1d88a; }
.worked-level h3 { margin: 0; font-size: 1.15rem; }
.worked-level ol { padding-inline-start: 1.5rem; line-height: 1.65; }
.float-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(8px,2vw,16px); max-width: 490px; margin-block: 16px 4px; }
.float-comparison figure { margin: 0; }
.float-comparison img { display: block; width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; }
.float-comparison figcaption { margin-top: 6px; color: #e5dfd0; font-size: .9rem; }

/* The same image edge and title rhythm frame four different art directions. */
.arcade-card[data-game]{--cover-focus:50% 50%}
.arcade-card[data-game=only-the-king]{--cover-focus:54% 45%}
.arcade-card[data-game=lantern-watch]{--cover-focus:52% 48%}
.arcade-card[data-game=after-the-tide]{--cover-focus:54% 55%}
.arcade-card .card-cover{position:relative;overflow:hidden}
.arcade-card .card-cover::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 1px #eee7d522}
.arcade-card .card-cover img{object-position:var(--cover-focus)}
.arcade-card .card-body h2{letter-spacing:-.025em;text-wrap:balance}
