/* fun.tyurry.com — 游戏角
   暖米纸底、墨色文字、黄昏橘强调。无框架，无外链字体。 */

:root {
  --paper: #FBF6EC;
  --paper-deep: #F4EADB;
  --card: #FFFDF7;
  --ink: #3B3226;
  /* 小字对比度：ink-soft ≈ 6.5:1、ink-faint ≈ 5.1:1（对 --paper），均 ≥4.5:1 */
  --ink-soft: rgba(59, 50, 38, 0.82);
  --ink-faint: rgba(59, 50, 38, 0.73);
  --line: rgba(59, 50, 38, 0.12);
  --line-strong: rgba(59, 50, 38, 0.2);
  --accent: #CB6F38;
  --accent-deep: #A9541F;
  --accent-soft: rgba(203, 111, 56, 0.12);
  --danger: #B4553F;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(59, 50, 38, 0.05), 0 18px 40px -30px rgba(59, 50, 38, 0.55);
  --shadow-lift: 0 2px 4px rgba(59, 50, 38, 0.06), 0 26px 50px -28px rgba(59, 50, 38, 0.45);
  --page: 1160px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

/* touch 设备上按下时不要有灰块；所有可点元素统一交给 :active 反馈 */
*,
*::before,
*::after { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 82% -8%, rgba(233, 168, 108, 0.24), transparent 62%),
    radial-gradient(760px 420px at 4% 4%, rgba(190, 176, 148, 0.2), transparent 66%),
    radial-gradient(900px 620px at 50% 108%, rgba(154, 106, 150, 0.1), transparent 68%),
    linear-gradient(180deg, #FCF7EE 0%, #FBF6EC 48%, #F7EFE1 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 极淡的纸纹：细横线 + 竖向错位，避免纯平色块 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(0deg, rgba(59, 50, 38, 0.028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(59, 50, 38, 0.06) 100%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, var(--page));
  margin: 0 auto;
  /* 横屏刘海：安全区比 24px 边距更宽时补上差额 */
  padding-left: max(0px, calc(env(safe-area-inset-left) - 24px));
  padding-right: max(0px, calc(env(safe-area-inset-right) - 24px));
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
}
.skip-link:focus {
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  backdrop-filter: blur(10px) saturate(1.05);
  background: linear-gradient(180deg, rgba(251, 246, 236, 0.94), rgba(251, 246, 236, 0.78));
  border-bottom: 1px solid rgba(59, 50, 38, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(150deg, #FFF9EF, #F3E3CD);
  border: 1px solid rgba(59, 50, 38, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(59, 50, 38, 0.06);
  color: var(--ink);
}
.brand__mark svg { width: 24px; height: 24px; display: block; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* 手机 / 加到主屏后：显示站名而不是域名，更像一个 App */
.brand__app {
  display: none;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand__text em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-header__meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 6px 12px;
  border: 1px solid rgba(59, 50, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.6);
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7C8F63;
  box-shadow: 0 0 0 3px rgba(124, 143, 99, 0.16);
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color 150ms var(--ease), background 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-quiet:hover {
  color: var(--ink);
  background: rgba(255, 253, 247, 0.8);
  border-color: var(--line);
}
.btn-quiet svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding: 22px 0 10px;
}

.hero__copy { max-width: 660px; }

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-right: 4px;
}

.hero__seal {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
  color: rgba(168, 68, 48, 0.82);
  border: 1.5px solid rgba(168, 68, 48, 0.38);
  border-radius: 10px;
  transform: rotate(4deg);
  background: rgba(255, 253, 247, 0.35);
}

.hero__aside small {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 96px;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 50, 38, 0.26), transparent);
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.14;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  margin: 0;
  max-width: 33em;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  text-wrap: balance;
}

/* 中文断行：keep-all 把断行机会收回到标点处，不再从词中间劈开；
   break-word 只在某个词组长过一整行时兜底。.nb 用来钉住必须连排的词。 */
.hero__lede,
.card__desc,
.aside p,
.howto li {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
.nb {
  white-space: nowrap;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 14px; height: 14px; opacity: 0.7; }

/* ---------------------------------------------------------------- grid */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.section-head p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* ---------------------------------------------------------------- card */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid rgba(59, 50, 38, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), border-color 150ms var(--ease);
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(59, 50, 38, 0.16);
}

/* 整张卡都能点：CTA 的 ::after 铺满整卡（stretched link）。
   链接本体保持不动，所以 Tab 仍然只停在按钮上，语义也只是一个链接。 */
.card--clickable { cursor: pointer; }
.card--clickable .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: var(--radius);
}

/* 封面对 hover 的回应：极轻的推近，让"这块能点"在鼠标上说得清楚 */
@media (hover: hover) {
  .card--clickable:hover .card__cover svg,
  .card--clickable:hover .card__cover .cover-photo,
  .card--clickable:focus-within .card__cover svg,
  .card--clickable:focus-within .card__cover .cover-photo {
    transform: scale(1.015);
  }
}

.card__cover {
  position: relative;
  margin: 0;
  background: linear-gradient(160deg, #F3CB84, #E9A265 42%, #96698F 74%, #4E4A77);
  overflow: hidden;
  isolation: isolate;
}
.card__cover svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease);
}

/* 生图封面：铺满封面区，靠 object-position 把猫留在画面里（猫在 62% / 69%，
   竖切时重心偏下，所以取 60% 70%）。底下那层 SVG 兜底保持原样。 */
.cover-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 70%;
  transition: transform 520ms var(--ease);
  background: linear-gradient(160deg, #F3CB84, #E9A265 42%, #96698F 74%, #4E4A77);
}
.card--featured .card__cover { min-height: 100%; }

.card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

/* 封面里极慢的云飘动（≥20s）。prefers-reduced-motion: reduce 时由文件末尾的
   全局规则一并关掉，这里不再重复。 */
.cover-art .nt-cloud {
  animation-name: nt-drift;
  animation-duration: var(--drift, 72s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.cover-art .nt-cloud--a { --drift: 64s; }
.cover-art .nt-cloud--b { --drift: 88s; animation-delay: -12s; }
.cover-art .nt-cloud--c { --drift: 104s; animation-delay: -30s; }

@keyframes nt-drift {
  from { transform: translateX(0); }
  to { transform: translateX(var(--drift-x, -14px)); }
}

.badge-new {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 5px 11px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #FFF8EE;
  background: var(--accent-deep);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(146, 72, 32, 0.4);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 26px;
  flex: 1;
}

.card__kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.card__title span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
}

.card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 4px 10px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: rgba(251, 246, 236, 0.9);
  border: 1px solid rgba(59, 50, 38, 0.1);
  border-radius: 999px;
}

.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 8px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.stat__value {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat__value small {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-left: 5px;
}

.card__note {
  margin: 0 0 3px;
  max-width: 15em;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #FFF8EE;
  text-decoration: none;
  background: linear-gradient(180deg, #B25422, #9E4A1C);
  border: 1px solid rgba(126, 58, 20, 0.45);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(126, 58, 20, 0.22), 0 10px 22px -14px rgba(126, 58, 20, 0.9);
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), background 150ms var(--ease);
  white-space: nowrap;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #A34D1E, #8E4117);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(126, 58, 20, 0.2), 0 14px 26px -14px rgba(126, 58, 20, 0.95);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary svg { width: 15px; height: 15px; }

/* featured */
.card--featured {
  grid-column: 1 / -1;
  display: grid;
  /* 桌面端左文右图，图占 46% */
  grid-template-columns: 1.08fr 0.92fr;
  align-items: stretch;
}
.card--featured .card__cover {
  order: 2;
  border-left: 1px solid rgba(59, 50, 38, 0.08);
  min-height: 348px;
}
.card--featured .card__body {
  order: 1;
  padding: 32px 36px 30px;
  gap: 14px;
}
.card--featured .card__title { font-size: clamp(28px, 3.4vw, 38px); }
.card--featured .card__desc { font-size: 14.5px; line-height: 1.8; max-width: 30em; }
.card--featured .card__foot { padding-top: 10px; }

.card__cover-note {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: rgba(255, 249, 238, 0.92);
  text-shadow: 0 1px 4px rgba(38, 28, 22, 0.55), 0 0 1px rgba(38, 28, 22, 0.7);
}

/* 即将上线的游戏：一条细提示条，不再占半屏 */
.card--ghost {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  background: rgba(255, 253, 247, 0.5);
  border: 1.5px dashed rgba(59, 50, 38, 0.2);
  border-radius: 999px;
  color: var(--ink-faint);
}
.card--ghost:hover { transform: none; box-shadow: none; border-color: rgba(203, 111, 56, 0.45); }
.card--ghost strong {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.card--ghost p {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.ghost__rule {
  flex: 1;
  height: 0;
  margin-left: 4px;
  border-top: 1px dashed rgba(59, 50, 38, 0.18);
}
.ghost__icon { width: 20px; height: 20px; flex: none; opacity: 0.55; }

/* ---------------------------------------------------------------- lower panels */

.lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 26px 0 0;
}

.panel,
.aside {
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(59, 50, 38, 0.1);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
}

/* 由来面板：整幅通栏，左边一段话、右边一张水彩局部，避免正文挤成窄长条 */
.aside.origin {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.58fr);
  grid-template-areas:
    "head head"
    "text art";
  align-items: center;
  column-gap: 34px;
  row-gap: 8px;
}
.origin .panel-head { grid-area: head; align-self: end; }
.origin__text {
  grid-area: text;
  margin: 0;
  max-width: 40em;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}
.origin__figure {
  grid-area: art;
  position: relative;
  margin: 0;
}
.origin__art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(59, 50, 38, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 26px -22px rgba(59, 50, 38, 0.75);
}
/* 图上压一层很淡的暗角，caption 落在草地上也读得清 */
.origin__figure::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 54px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(38, 28, 22, 0), rgba(38, 28, 22, 0.4));
  pointer-events: none;
}
.origin__figure figcaption {
  z-index: 1;
  position: absolute;
  right: 10px;
  bottom: 7px;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 249, 238, 0.96);
  text-shadow: 0 1px 5px rgba(38, 28, 22, 0.6), 0 0 1px rgba(38, 28, 22, 0.75);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.panel-head p {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* 怎么玩：入口说明 + 规则清单（小图标自绘，不用 emoji） */
.howto__lede {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.howto {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 10px 30px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.howto li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.howto svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--accent-deep);
  opacity: 0.85;
}
.howto span { display: block; flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 60px 0 0;
  padding: 26px 0 calc(34px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.site-footer p { margin: 0; }
.link-btn {
  padding: 4px 2px;
  font: inherit;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(59, 50, 38, 0.24);
  cursor: pointer;
}
.link-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- dialog */

/* 抽屉：桌面上是居中弹窗，手机上（见文件末尾）从底部滑出 */
dialog.sheet {
  position: relative;
  width: min(100% - 40px, 470px);
  max-height: min(86vh, 680px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
  background: var(--card);
  border: 1px solid rgba(59, 50, 38, 0.14);
  border-radius: 22px;
  box-shadow: 0 30px 80px -30px rgba(59, 50, 38, 0.6);
}
.sheet__grip { display: none; }
.sheet__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 24px 26px 4px;
  padding-right: 62px;
}
.sheet__head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.sheet__head p { margin: 0; font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-faint); }
.sheet__body { padding: 6px 26px 26px; }

dialog.about {
  position: relative;
  width: min(100% - 40px, 470px);
  padding: 34px 34px 26px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid rgba(59, 50, 38, 0.14);
  border-radius: 22px;
  box-shadow: 0 30px 80px -30px rgba(59, 50, 38, 0.6);
}
dialog.about::backdrop {
  background: rgba(48, 40, 32, 0.36);
  backdrop-filter: blur(3px);
}
dialog.about h2 {
  margin: 0 0 14px;
  padding-right: 32px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
dialog.about p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}
dialog.about .dialog-note {
  margin-top: 18px;
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: 0.04em;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.dialog-close:hover { color: var(--ink); background: rgba(59, 50, 38, 0.06); }
.dialog-close svg { width: 18px; height: 18px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.dialog-actions .btn-primary {
  border: 0;
  cursor: pointer;
}

/* ---------------------------------------------------------------- misc */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__aside { display: none; }
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card__cover {
    order: 1;
    height: 240px;
    min-height: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(59, 50, 38, 0.08);
  }
  .card--featured .card__body { order: 2; padding: 30px 32px 32px; }
  .lower { grid-template-columns: 1fr; }
  .aside.origin {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "text" "art";
    column-gap: 0;
    row-gap: 16px;
  }
}

/* ---------------------------------------------------------------- 手机端 */

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, var(--page)); }
  .grid { grid-template-columns: 1fr; gap: 14px; }

  /* 页头收短，但每个可点元素都留够 44px 热区 */
  .site-header__inner { padding: 6px 0; }
  .brand { min-height: 44px; gap: 10px; }
  .brand__mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand__mark svg { width: 21px; height: 21px; }
  .brand__text strong { font-size: 15px; }
  .brand__text em { display: none; }
  .brand__domain { display: none; }
  .brand__app { display: inline; font-size: 17px; }
  .status { font-size: 11px; padding: 5px 10px; }

  /* Hero：只留一句话，把首屏让给卡片 */
  .hero { padding: 8px 0 4px; }
  .eyebrow { display: none; }
  .hero h1 { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.12; margin-bottom: 6px; }
  .hero__lede {
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero__meta { display: none; }

  .section-head { margin: 4px 0 8px; padding-bottom: 6px; }
  .section-head h2 { font-size: 13px; line-height: 1.2; letter-spacing: 0.14em; }
  .section-head p { font-size: 11.5px; }

  /* 卡片：封面在上、文案在下，按钮铺满内边距 */
  .card--featured .card__cover {
    order: 1;
    height: 160px;
    min-height: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(59, 50, 38, 0.08);
  }
  .card--featured .card__body { order: 2; padding: 12px 14px 14px; gap: 8px; }
  .card__body { padding: 14px 14px 16px; gap: 10px; }
  .card__kicker { display: none; }
  .card__title { font-size: 21px; line-height: 1.2; }
  .card__title span { margin-top: 2px; font-size: 11px; letter-spacing: 0.18em; }
  .card--featured .card__title { font-size: 22px; }
  .card__desc,
  .card--featured .card__desc {
    font-size: 12.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: none;
  }
  /* 手机上收起最后一句，让两行正好落在句号上，不在逗号处被裁断 */
  .card__desc .desc-more { display: none; }
  .tags { display: none; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 0; }
  .stat { flex-direction: row; align-items: baseline; gap: 8px; }
  .stat__label { font-size: 10.5px; }
  .stat__value { font-size: 18px; }
  .card__note { max-width: none; font-size: 12px; }
  .card__foot .btn-primary { justify-content: center; min-height: 48px; padding: 12px 18px; width: 100%; }

  .card--ghost { flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; border-radius: 14px; }
  .card--ghost p { font-size: 11.5px; }
  .ghost__rule { display: none; }

  .lower { gap: 14px; margin-top: 20px; }
  .panel, .aside { padding: 18px 16px; }
  .panel-head { margin-bottom: 10px; flex-wrap: wrap; gap: 4px 10px; }
  .panel-head h2 { font-size: 16px; }
  .panel-head p { font-size: 11px; }
  .howto { gap: 9px; }
  .howto__lede { margin-bottom: 10px; font-size: 13px; }
  .origin__text { font-size: 13px; line-height: 1.9; }
  .origin__figure { padding-top: 4px; }

  .site-footer { margin: 32px 0 0; padding: 18px 0 calc(24px + env(safe-area-inset-bottom)); }
  .link-btn { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; }
}

/* 小屏手机：封面再压一档，图仍在上、猫仍在框内 */
@media (max-width: 560px) {
  .card--featured .card__cover { height: 140px; }
}

/* 矮屏（横过来的手机、内置浏览器）：再压一档，保证「开始游戏」露出来 */
@media (max-width: 680px) and (max-height: 560px) {
  .site-header__inner { padding: 4px 0; }
  .brand__mark { width: 32px; height: 32px; }
  .hero { padding: 4px 0 2px; }
  .hero h1 { font-size: clamp(22px, 6.4vw, 28px); margin-bottom: 0; }
  .hero__lede { display: none; }
  .section-head { margin: 2px 0 6px; }
  .card--featured .card__cover { height: 104px; }
  .card--featured .card__body { padding: 8px 12px 10px; gap: 6px; }
  .card__desc, .card--featured .card__desc { display: none; }
  .card__title span { display: none; }
  .card__foot { flex-direction: row; align-items: center; gap: 10px; }
  .card__foot .btn-primary { width: auto; flex: 1; min-height: 46px; }
}

/* 触控反馈：手机上不要只有 hover */
@media (hover: none) {
  .card:hover,
  .card:focus-within {
    transform: none;
    box-shadow: var(--shadow-card);
    border-color: rgba(59, 50, 38, 0.1);
  }
  .btn-primary:hover {
    background: linear-gradient(180deg, #B25422, #9E4A1C);
    transform: none;
  }
  .card:active { transform: scale(0.994); box-shadow: var(--shadow-card); }
  .btn-primary:active {
    transform: translateY(1px) scale(0.985);
    background: linear-gradient(180deg, #A34D1E, #8E4117);
  }
  .link-btn:active { color: var(--accent-deep); transform: scale(0.97); }
  .dialog-close:active { background: rgba(59, 50, 38, 0.1); }
  .brand:active { opacity: 0.7; }
}

/* 手机上：弹窗改成底部抽屉 —— 圆角顶、可滚动、可下滑关闭 */
@media (max-width: 680px) {
  dialog.sheet,
  dialog.about {
    position: fixed;
    inset: auto 0 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -14px 44px -22px rgba(59, 50, 38, 0.55);
    animation: sheet-in 260ms var(--ease);
  }
  dialog.sheet::backdrop,
  dialog.about::backdrop { background: rgba(48, 40, 32, 0.44); }

  .sheet__grip {
    display: block;
    width: 44px;
    height: 4px;
    margin: 10px auto 2px;
    border-radius: 999px;
    background: rgba(59, 50, 38, 0.22);
  }
  .sheet__head { padding: 4px 18px 2px; padding-right: 64px; gap: 8px; flex-wrap: wrap; }
  .sheet__head h2 { font-size: 17px; }
  .sheet__body { padding: 6px 18px calc(16px + env(safe-area-inset-bottom)); }

  dialog.about { padding: 0 18px calc(18px + env(safe-area-inset-bottom)); }
  dialog.about h2 { margin-top: 8px; font-size: 19px; }
  dialog.about p { font-size: 13.5px; }
  dialog.about .dialog-actions { margin-top: 16px; }
  dialog.about .dialog-actions .btn-primary { width: 100%; min-height: 48px; justify-content: center; }

  .dialog-close {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
  }
}

@keyframes sheet-in {
  from { transform: translateY(14%); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
