:root {
  --ink: #10201a;
  --paper: #f5ead4;
  --paper-soft: #e9d8b9;
  --gold: #d5b36d;
  --gold-deep: #a67b3d;
  --jade: #6f907c;
  --red: #a64e39;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #0c1712; color: var(--paper); font-family: var(--sans);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.grain {
  position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient:before, .ambient:after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 58%; background-size: cover; background-position: center;
  opacity: .23; filter: blur(2px) saturate(.65) brightness(.7);
}
.ambient:before { left: 0; background-image: url("assets/cover-yesu.jpg?v=q1"); transform: scale(1.05); }
.ambient:after { right: 0; background-image: url("assets/cover-wangyue.jpg?v=q1"); background-position: 62% center; transform: scale(1.05); }
body:after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 18, 13, .9), rgba(8, 18, 13, .54) 45%, rgba(8, 18, 13, .83)),
    linear-gradient(180deg, rgba(8, 18, 13, .58), transparent 25%, rgba(8, 18, 13, .9));
}
.ambient-moon {
  position: absolute; width: 280px; height: 280px; border-radius: 50%; top: 7%; right: 9%;
  border: 1px solid rgba(244, 217, 155, .16);
  box-shadow: 0 0 90px rgba(248, 214, 138, .12), inset 0 0 80px rgba(248, 214, 138, .06);
}
.ambient-fire { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #f3ce7c; box-shadow: 0 0 14px 4px rgba(245, 204, 112, .4); animation: drift 9s ease-in-out infinite; }
.ambient-fire.a { left: 18%; top: 34%; animation-delay: -3s; }
.ambient-fire.b { left: 67%; top: 23%; animation-delay: -6s; }
.ambient-fire.c { left: 78%; top: 59%; animation-delay: -1s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); opacity: .2; } 50% { transform: translate(18px, -24px); opacity: .9; } }

.top {
  position: sticky; top: var(--sat, env(safe-area-inset-top, 0px)); z-index: 120;
  max-width: 1260px; margin: 0 auto; height: 82px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 34px;
  background: rgba(9, 19, 14, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid rgba(236, 209, 156, .1);
}
.top-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; }
.top-right .qb-views.top-nav { flex-shrink: 1; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(238, 211, 155, .55);
  display: grid; place-items: center; color: #f1d392; font-family: var(--serif); font-size: 22px;
}
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy b { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: .09em; color: #f7ecd7; }
.brand-copy em { font-style: normal; color: rgba(237, 221, 193, .52); font-size: 14px; letter-spacing: .08em; }
.count { color: rgba(239, 221, 188, .52); font-size: 14px; letter-spacing: .08em; }
.sound {
  height: 33px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  background: rgba(22, 39, 31, .44); color: rgba(245, 230, 201, .75);
  border: 1px solid rgba(235, 208, 155, .22); font-size: 14px; letter-spacing: .06em;
}
.sound:hover { border-color: rgba(237, 206, 143, .55); color: #f8ead0; }

.hub { position: relative; z-index: 10; max-width: 1260px; margin: 0 auto; padding: 5vh 34px 0; }
.hero { max-width: 780px; margin-bottom: 31px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; color: #d8b872; font-size: 14px; letter-spacing: .28em; }
.hero-kicker i { width: 30px; height: 1px; background: rgba(218, 184, 113, .65); }
.hero h1 {
  margin: 16px 0 12px; font-family: var(--serif); font-weight: 500;
  font-size: clamp(47px, 6.2vw, 82px); line-height: 1.08; letter-spacing: .07em; color: #f8efdd;
  text-shadow: 0 8px 34px rgba(0, 0, 0, .24);
}
.hero h1 em { font-style: normal; color: #dfc07e; }
.hero p { margin: 0; color: rgba(241, 228, 202, .7); font-family: var(--serif); font-size: 14px; line-height: 1.95; letter-spacing: .04em; }
.hero-meta { display: flex; gap: 23px; margin-top: 20px; color: rgba(238, 220, 187, .54); font-size: 14px; letter-spacing: .1em; }
.hero-meta b { color: #e5c47e; font-family: var(--serif); font-size: 19px; font-weight: 500; margin-right: 3px; }

.poem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.poem-card {
  position: relative; min-height: 458px; overflow: hidden; border-radius: 4px;
  border: 1px solid rgba(243, 223, 184, .22); box-shadow: 0 26px 70px rgba(0, 0, 0, .33);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .35s cubic-bezier(.22, .8, .25, 1), border-color .35s, box-shadow .35s;
  isolation: isolate;
}
.poem-card:hover { transform: translateY(-6px); border-color: rgba(242, 211, 146, .62); box-shadow: 0 34px 86px rgba(0, 0, 0, .46); }
.card-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform 1s ease; }
.poem-card:hover .card-bg { transform: scale(1.05); }
.poem-card.night .card-bg { background-image: url("assets/cover-yesu.jpg?v=q1"); }
.poem-card.day .card-bg { background-image: url("assets/cover-wangyue.jpg?v=q1"); background-position: center 42%; }
.card-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 16, 12, .1) 0%, rgba(6, 16, 12, .25) 38%, rgba(6, 16, 12, .91) 100%);
}
.poem-card.day .card-shade { background: linear-gradient(180deg, rgba(9, 20, 14, .04) 0%, rgba(9, 20, 14, .3) 38%, rgba(8, 19, 14, .91) 100%); }
.card-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 17px 18px 0; }
.chapter { color: rgba(250, 233, 200, .92); font-size: 14px; letter-spacing: .12em; padding: 3px 9px; border-radius: 999px; background: rgba(7, 19, 13, .7); }
.open { color: #edcf91; font-size: 14px; letter-spacing: .08em; border-bottom: 1px solid rgba(236, 204, 140, .4); padding-bottom: 3px; }
.open i { font-style: normal; margin-left: 4px; }
.card-body { position: relative; padding: 0 20px; align-self: flex-end; width: 100%; }
.poem-no { color: rgba(239, 216, 173, .44); font-family: var(--serif); font-size: 14px; letter-spacing: .16em; }
.card-body h2 { margin: 4px 0 2px; font-family: var(--serif); font-size: clamp(37px, 4.4vw, 55px); font-weight: 500; letter-spacing: .13em; line-height: 1.08; color: #fbf2df; text-shadow: 0 4px 26px rgba(0, 0, 0, .3); }
.author { color: rgba(242, 223, 189, .64); font-family: var(--serif); font-size: 14px; letter-spacing: .18em; }
.lines { margin: 15px 0 10px; font-family: var(--serif); font-size: 14px; line-height: 1.75; color: rgba(246, 233, 208, .84); letter-spacing: .05em; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tags span { border: 1px solid rgba(241, 219, 175, .2); border-radius: 999px; padding: 3px 7px; font-size: 14px; color: rgba(243, 226, 194, .6); letter-spacing: .04em; }
.card-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 13px 18px 15px; margin-top: 10px; border-top: 1px solid rgba(241, 220, 180, .16); color: rgba(242, 224, 190, .56); font-size: 14px; letter-spacing: .05em; }
.arrow { color: #e6c47f; font-size: 19px; transition: transform .3s; }
.poem-card:hover .arrow { transform: translateX(5px); }

.timeline { position: relative; margin: 29px 0 0; padding: 0 3px; }
.timeline-label { color: rgba(239, 221, 187, .44); font-size: 14px; letter-spacing: .25em; margin-bottom: 10px; }
.timeline-line { display: flex; align-items: center; gap: 10px; }
.timeline-node { display: flex; align-items: baseline; gap: 7px; color: rgba(243, 227, 198, .58); padding: 5px 0; }
.timeline-node b { width: 21px; height: 21px; border-radius: 50%; border: 1px solid rgba(241, 215, 167, .26); display: grid; place-items: center; font-family: var(--serif); font-size: 14px; font-weight: 400; color: rgba(244, 230, 203, .6); }
.timeline-node span { font-family: var(--serif); font-size: 14px; letter-spacing: .07em; }
.timeline-node em { font-style: normal; font-size: 14px; opacity: .5; letter-spacing: .05em; }
.timeline-node.done b { background: rgba(198, 157, 85, .22); border-color: rgba(237, 203, 134, .6); color: #f0d294; }
.timeline-node.locked { opacity: .33; }
.rail { flex: 1; height: 1px; max-width: 140px; background: linear-gradient(90deg, rgba(213, 179, 109, .35), rgba(213, 179, 109, .1)); }
.rail.ghost { opacity: .3; }
.foot { position: relative; z-index: 10; max-width: 1260px; margin: 18px auto 0; padding: 15px 34px 22px; display: flex; justify-content: space-between; color: rgba(239, 223, 193, .35); font-size: 14px; letter-spacing: .08em; border-top: 1px solid rgba(235, 213, 175, .1); }

@media (max-width: 960px) {
  .top { height: 72px; padding: 0 20px; }
  .hub { padding: 3vh 20px 0; }
  .poem-grid { gap: 12px; }
  .poem-card { min-height: 390px; }
  .card-body h2 { font-size: 40px; }
}
@media (max-width: 720px) {
  .top-right .count { display: none; }
  .brand-copy em { display: none; }
  .hub { padding: 2vh 14px 0; }
  .hero { margin-bottom: 20px; }
  .hero h1 { font-size: 46px; }
  .hero p { font-size: 14px; }
  .poem-grid { grid-template-columns: 1fr; }
  .poem-card { min-height: 360px; }
  .timeline-line { flex-wrap: wrap; }
  .rail { display: none; }
  .timeline { margin-top: 22px; }
  .foot { padding: 14px 16px 20px; flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* third poem */
.poem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.poem-card.river .card-bg { background-image: url("assets/cover-wtm.jpg?v=q1"); background-position: center 48%; }
.poem-card.river .card-shade { background: linear-gradient(180deg, rgba(6, 18, 13, .02) 0%, rgba(6, 18, 13, .24) 38%, rgba(6, 18, 13, .92) 100%); }
.poem-card.river .tags span { color: rgba(243, 226, 194, .7); }
@media (max-width: 1100px) {
  .poem-grid { grid-template-columns: 1fr 1fr; }
  .poem-card.river { grid-column: 1 / -1; min-height: 360px; }
}
@media (max-width: 720px) {
  .poem-grid { grid-template-columns: 1fr; }
  .poem-card.river { grid-column: auto; }
}

/* ---------- 4:3 poem cards ---------- */
.poem-grid .poem-card {
  aspect-ratio: 4 / 3;
  min-height: 0 !important;
  height: auto;
}
.poem-grid .poem-card .card-body h2 {
  font-size: clamp(30px, 3.1vw, 42px);
}
.poem-grid .poem-card .lines {
  margin: 10px 0 8px;
  font-size: 14px;
  line-height: 1.7;
}
.poem-grid .poem-card .card-bottom {
  padding-top: 9px;
  padding-bottom: 11px;
  margin-top: 6px;
}
@media (max-width: 1100px) {
  .poem-grid .poem-card.river { grid-column: auto; }
}
@media (max-width: 720px) {
  .poem-grid .poem-card { aspect-ratio: 4 / 3; min-height: 0 !important; }
  .poem-grid .poem-card .card-body h2 { font-size: 34px; }
  .poem-grid .poem-card .lines { font-size: 14px; }
}

/* readable "enter adventure" chip on bright/day cards */
.poem-card .open {
  border-bottom: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 19, 13, .52);
  color: #f4d99e;
  backdrop-filter: blur(8px);
}

/* MIN_FONT_14: no readable text below 14px */
body, button, input, select, textarea { font-size: 14px; }

@media (max-width: 720px) {
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* ---------- play progress on cards ---------- */
.count b { color: #ffd877; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.card-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 14px; }
.card-progress:empty { display: none; }
.cp-new { color: #f3d99a; padding: 2px 10px; border-radius: 999px; background: rgba(7, 19, 13, .45); animation: cp-wink 2.4s ease-in-out infinite; }
@keyframes cp-wink { 50% { color: #fff1c8; box-shadow: 0 0 14px rgba(255, 214, 120, .35); } }
.cp-row { display: flex; align-items: center; gap: 8px; color: #f6e6c4; }
.cp-bar { width: 74px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.cp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8fc39b, #f2cf6c); }
.cp-row b { font-weight: 500; }
.cp-stars { color: #ffd877; }
.cp-levels { display: flex; align-items: center; gap: 8px; color: #f2c35a; letter-spacing: .04em; }
.cp-trophy { margin-left: 2px; padding: 1px 9px; border-radius: 999px; background: rgba(240, 180, 69, .22); border: 1px solid rgba(255, 216, 120, .45); color: #ffe3a0; letter-spacing: 0; font-size: 13px; }
.card-body:has(.card-progress:not(:empty)) .tags { display: none; }
.poem-card.is-done .poem-no:after { content: " · 已通关"; color: #b9d3ae; letter-spacing: .08em; }
.poem-card.is-perfect .poem-no:after { content: " · 全三星"; color: #ffd877; }
.timeline-node.current b { border-color: #f0d294; color: #f0d294; animation: node-pulse 1.8s ease-in-out infinite; }
.timeline-node.current span { color: #f6e2b4; }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 5px rgba(240, 210, 148, .18); } }
@media (prefers-reduced-motion: reduce) {
  .cp-new, .timeline-node.current b { animation: none; }
}

/* app download entry */
.download-link {
  display: inline-flex; align-items: center; height: 33px; padding: 0 13px;
  border-radius: 999px; border: 1px solid rgba(226, 192, 123, .48);
  background: rgba(83, 54, 25, .42); color: #f4d79a; font-size: 14px;
  letter-spacing: .04em; text-decoration: none; white-space: nowrap;
}
.download-link:hover { background: rgba(123, 82, 35, .62); border-color: #e8c477; }

/* ---------- lan QR scan ---------- */
.lan-qr-btn {
  height: 33px; padding: 0 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(232, 196, 119, .55); background: rgba(25, 43, 34, .45);
  color: #f0d9a4; font-size: 14px; letter-spacing: .06em;
}
.lan-qr-btn:hover { border-color: #e8c477; color: #fff1d2; background: rgba(123, 82, 35, .35); }
.lan-qr-modal {
  position: fixed; inset: 0; z-index: 320; display: none; align-items: center; justify-content: center; padding: 20px;
}
.lan-qr-modal.is-open { display: flex; }
.lan-qr-backdrop { position: absolute; inset: 0; background: rgba(4, 13, 9, .72); backdrop-filter: blur(8px); }
.lan-qr-card {
  position: relative; z-index: 1; width: min(360px, 100%); padding: 26px 24px 22px; text-align: center;
  border-radius: 6px; border: 1px solid rgba(255, 255, 255, .4);
  background: linear-gradient(145deg, #f8efda, #ead9bc);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45); color: #3c4538;
}
.lan-qr-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(120, 92, 55, .28); background: transparent; color: #7b674d; cursor: pointer; font-size: 18px; line-height: 1;
}
.lan-qr-close:hover { background: rgba(255, 250, 240, .65); }
.lan-qr-card h2 { margin: 0 0 6px; font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: .08em; color: #334c3d; }
.lan-qr-tip { margin: 0 0 14px; color: #7b6d58; font-size: 14px; line-height: 1.5; min-height: 1.5em; }
.lan-qr-frame {
  width: 236px; height: 236px; margin: 0 auto 12px; padding: 8px; border-radius: 10px;
  background: #f5ead4; border: 1px solid rgba(120, 92, 55, .18); display: grid; place-items: center;
}
.lan-qr-frame img { display: block; width: 220px; height: 220px; object-fit: contain; background: #f5ead4; }
.lan-qr-pick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 10px; }
.lan-qr-ip {
  border: 1px solid rgba(120, 92, 55, .28); background: rgba(255, 251, 241, .7); color: #5a4a34;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.lan-qr-ip.on { background: #9d4a37; border-color: #9d4a37; color: #fff0d5; }
.lan-qr-url {
  display: block; width: 100%; border: 0; background: transparent; cursor: pointer; text-align: center;
  color: #6f5a3d; font-size: 12px; line-height: 1.45; word-break: break-all; padding: 4px 2px;
}
.lan-qr-url:hover { color: #9d4a37; }
@media (max-width: 620px) {
  .lan-qr-btn { padding: 0 9px; }
  .count { display: none; }
}

/* ---------- auth slot / modal ---------- */
.auth-slot { display: inline-flex; align-items: center; gap: 6px; position: relative; z-index: 30; }
.auth-member-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11px; letter-spacing: .04em; white-space: nowrap;
  border: 1px solid rgba(235, 208, 155, .28); background: rgba(25, 43, 34, .55); color: rgba(245, 230, 201, .82);
}
.auth-member-badge.is-vip {
  border-color: rgba(232, 196, 119, .65); background: rgba(123, 82, 35, .72); color: #ffe9b8;
  box-shadow: 0 0 0 1px rgba(12, 23, 18, .35);
}
.auth-member-badge.is-normal { color: rgba(220, 228, 222, .78); }
.auth-pop-meta { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.auth-pop-meta .auth-member-badge { height: 20px; padding: 0 7px; font-size: 10px; }
.auth-menu { position: relative; }
.auth-avatar {
  width: 42px; height: 42px; padding: 0; border-radius: 50%; overflow: hidden; flex: 0 0 42px;
  border: 2px solid #f0d294; box-shadow: 0 0 0 2px rgba(12, 23, 18, .65);
  background: #3a2a22; cursor: pointer;
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 28% 32%; display: block; }
.auth-avatar:hover, .auth-avatar[aria-expanded="true"] { border-color: #fff1cc; }
.auth-pop {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 50;
  width: 188px; padding: 8px; display: grid;
  border-radius: 16px; border: 1px solid rgba(240, 210, 148, .42);
  background: #163028;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .48);
}
.auth-pop::before {
  content: ""; position: absolute; top: -6px; right: 15px; width: 12px; height: 12px;
  background: #163028; border-top: 1px solid rgba(240, 210, 148, .42); border-left: 1px solid rgba(240, 210, 148, .42);
  transform: rotate(45deg);
}
.auth-pop[hidden] { display: none; }
.auth-pop-user {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  margin: 2px 4px 6px; padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(240, 210, 148, .2);
}
.auth-pop-user img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 28% 32%; flex: 0 0 28px;
}
.auth-pop-user b {
  min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #f8edd4; font-weight: 500; font-size: 15px; font-family: var(--serif);
}
.auth-pop-item {
  display: flex; align-items: center; width: 100%; height: 38px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  color: #f4e7cf; font-size: 14px; letter-spacing: .04em; text-align: left;
}
.auth-pop-item:hover { background: rgba(240, 210, 148, .14); color: #fff8ea; }
#logoutBtn.auth-pop-item { color: #efc3b4; }
.auth-entry, .auth-logout {
  height: 33px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(235, 208, 155, .32); background: rgba(25, 43, 34, .45);
  color: rgba(248, 234, 208, .9); font-size: 14px; letter-spacing: .04em;
}
.auth-entry:hover, .auth-logout:hover { border-color: rgba(241, 205, 137, .65); color: #fff1d2; }
.auth-entry.is-register {
  border-color: rgba(226, 192, 123, .62); background: rgba(123, 82, 35, .62); color: #f6dfa8;
}
.auth-entry.is-register:hover { background: rgba(123, 82, 35, .82); border-color: #e8c477; color: #fff1d2; }
.auth-me {
  height: 33px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; white-space: nowrap;
  border: 1px solid rgba(232, 196, 119, .6); background: rgba(123, 82, 35, .42); color: #f6dfa8; font-size: 14px; letter-spacing: .04em;
}
.auth-me:hover { background: rgba(123, 82, 35, .62); border-color: #e8c477; }
.auth-name { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eed39b; font-size: 14px; }
.auth-modal {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-modal.is-open { display: flex; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(4, 13, 9, .7); backdrop-filter: blur(9px); }
.auth-card {
  position: relative; z-index: 1; width: min(430px, 100%); padding: 28px 30px 22px;
  border-radius: 5px; border: 1px solid rgba(255, 255, 255, .45);
  background: linear-gradient(135deg, #f9efdb, #ecddc1);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .44), inset 0 0 70px rgba(255, 251, 240, .25);
  color: #3c4538;
}
.auth-card:before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(137, 105, 61, .18); pointer-events: none; }
.auth-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(120, 92, 55, .28); background: transparent; color: #7b674d; cursor: pointer; font-size: 14px; }
.auth-close:hover { background: rgba(255, 250, 240, .65); }
.auth-brand { display: flex; align-items: center; gap: 8px; color: #7a6447; font-family: var(--serif); font-size: 14px; letter-spacing: .08em; }
.auth-seal { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #f4dfb4; background: #9d4a37; border: 1px solid rgba(252, 234, 199, .7); font-size: 14px; }
.auth-tabs { display: flex; gap: 16px; margin-top: 19px; border-bottom: 1px solid rgba(113, 89, 54, .22); }
.auth-tab { padding: 7px 2px 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #95846a; font-family: var(--serif); font-size: 16px; letter-spacing: .08em; cursor: pointer; }
.auth-tab.active { color: #3f5c49; border-bottom-color: #9a7440; }
.auth-card h2 { position: relative; margin: 18px 0 5px; font-family: var(--serif); font-size: 28px; font-weight: 500; color: #334c3d; letter-spacing: .06em; }
.auth-sub { position: relative; margin: 0 0 16px; color: #7b6d58; font-size: 14px; line-height: 1.65; }
.auth-form { position: relative; display: grid; gap: 12px; }
.auth-field { display: grid; gap: 5px; }
.auth-field > span { color: #76664e; font-size: 14px; letter-spacing: .05em; }
.auth-field.is-required > span::after { content: " *"; color: #a14836; font-weight: 600; }
.auth-required-hint { margin: 0 0 4px; font-size: 13px; color: #8c7b62; letter-spacing: .04em; }
.auth-required-hint .req-mark { color: #a14836; font-weight: 600; }
.auth-required-hint[hidden] { display: none !important; }
.auth-field input {
  height: 42px; width: 100%; padding: 0 11px; border-radius: 6px;
  border: 1px solid rgba(116, 91, 56, .28); background: rgba(255, 251, 241, .74);
  color: #3a3a2f; font-size: 15px; outline: none;
}
.auth-field input:focus { border-color: #8d9f83; box-shadow: 0 0 0 3px rgba(105, 137, 110, .1); }
.auth-error { min-height: 19px; color: #a14836; font-size: 14px; line-height: 1.4; }
.auth-submit {
  height: 45px; border: 1px solid rgba(232, 207, 159, .4); border-radius: 7px; cursor: pointer;
  background: linear-gradient(135deg, #a24f3a, #7f3429); color: #fff0d5;
  font-size: 15px; letter-spacing: .08em;
}
.auth-submit:hover { background: linear-gradient(135deg, #b35c43, #8d3b2e); }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-demo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(127, 99, 61, .25); color: #8c7b62; font-size: 14px; }
.auth-demo b { color: #916e42; font-weight: 500; }
.auth-demo span { color: #4f654f; font-family: var(--serif); }
.auth-demo i { color: #b7a58a; font-style: normal; }
.auth-policy { margin: 10px 0 0; text-align: center; color: #a2947f; font-size: 14px; line-height: 1.5; }
@media (max-width: 620px) {
  .auth-card { padding: 23px 20px 18px; }
  .auth-card h2 { font-size: 25px; }
  .auth-slot .auth-name { max-width: 68px; }
  .auth-entry, .auth-logout { padding: 0 9px; }
}

.auth-realname[hidden], .auth-invite[hidden] { display: none !important; }

/* grade 4 poem sections */
.grade-section { margin-top: 34px; }
.grade-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 14px; }
.grade-head span { font-family: var(--serif); color: #e5c98b; font-size: 20px; letter-spacing: .1em; }
.grade-head i { flex: 1; height: 1px; background: rgba(234, 210, 166, .16); }
.grade-head em { color: rgba(237, 220, 186, .42); font-style: normal; font-size: 14px; letter-spacing: .06em; }
.grade-grid { margin-bottom: 6px; }
.grade-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grade-grid, .grade-grid.two { grid-template-columns: 1fr; }
  .grade-section { margin-top: 24px; }
  .grade-head span { font-size: 18px; }
}

/* grade cards: long poem titles fit 4:3 cards */
.grade-grid .poem-card .card-body h2 {
  font-size: clamp(28px, 2.6vw, 34px);
  line-height: 1.14;
  letter-spacing: .05em;
}

/* high school poem scroll cards */
.high-grid .poem-card .card-body h2 { font-size: clamp(27px, 2.35vw, 32px); }
.high-grid .poem-card .card-body .author { letter-spacing:.03em; }
.high-grid .poem-card .card-progress .cp-new { color: rgba(238, 219, 180, .66); }

.card-note { margin-top: 8px; font-size:14px; }
.card-note .cp-new { color: rgba(238,219,180,.68); }

/* touch devices: no double-tap zoom or grey tap flash; ~50 blurred chips re-blur on every scroll frame on phones */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .poem-card .open { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 19, 13, .7); }
}
/* phones: logged-in header (name, logout, sound, download) no longer wraps the brand into a column */
@media (max-width: 480px) {
  .top { padding: 0 12px; gap: 10px; }
  .top-right { gap: 8px; }
  /* 小屏也保留品牌名，与「我的闯关 / 下载」页头部保持一致；空间不足时自动省略号 */
  .brand { gap: 8px; }
  .brand-copy { display: flex; }
  .brand-copy b { font-size: 13px; letter-spacing: .04em; }
  .seal { width: 34px; height: 34px; font-size: 19px; }
  .sound, .auth-entry, .auth-logout { white-space: nowrap; padding: 0 9px; }
}

/* lite tier, chosen on the game pages (shared/engine.js) */
html.perf-lite *, html.perf-lite *::before, html.perf-lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.perf-lite .grain { display: none; }
html.perf-lite .ambient:before, html.perf-lite .ambient:after { filter: saturate(.65) brightness(.7); }

/* middle school collapsible grade sections */
.middle-school { margin-top: 38px; }
.grade-details { border-top: 1px solid rgba(228,201,154,.14); padding: 0; }
.grade-details summary {
  display:flex; align-items:center; gap:12px; cursor:pointer; list-style:none;
  padding:16px 2px; color:#e5c98b; font-family:var(--serif); font-size:20px; letter-spacing:.1em;
}
.grade-details summary::-webkit-details-marker { display:none; }
.grade-details summary i { flex:1; height:1px; background:rgba(234,210,166,.16); }
.grade-details summary em { color:rgba(237,220,186,.42); font-style:normal; font-size:14px; letter-spacing:.06em; }
.grade-details summary:after { content:"＋"; color:rgba(231,201,143,.65); font-family:var(--sans); font-size:18px; }
.grade-details[open] summary:after { content:"−"; }
.grade-details[open] summary { padding-bottom:14px; }
.grade-existing { margin:-2px 2px 14px; color:rgba(238,219,180,.55); font-size:14px; }
.grade-existing a { color:#e6c98f; text-decoration:none; border-bottom:1px solid rgba(230,201,143,.45); padding-bottom:1px; }
.grade-existing a:hover { color:#fff0cf; }
.middle-grid .poem-card .card-body h2 { font-size:clamp(26px,2.25vw,31px); }
.middle-grid .poem-card .card-body .lines { font-size:14px; }
@media (max-width:720px) {
  .grade-details summary { font-size:18px; padding:14px 1px; }
}

/* 全部诗词：互动设计趣味快评，不是诗歌文学评分 */
.fun-score {
  --score-color: #a9c7e8;
  display: grid; grid-template-columns: auto minmax(36px, 1fr) auto; align-items: center; gap: 8px;
  margin-top: 8px; padding: 5px 8px; border-radius: 8px;
  color: rgba(246, 233, 208, .72); background: rgba(7, 19, 13, .48);
  border: 1px solid rgba(241, 219, 175, .15); backdrop-filter: blur(5px);
}
.fun-score[data-tier="top"] { --score-color: #ffd877; }
.fun-score[data-tier="high"] { --score-color: #a9d4bd; }
.fun-score-label { font-size: 14px; white-space: nowrap; }
.fun-score-track { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.fun-score-track i { display: block; height: 100%; border-radius: inherit; background: var(--score-color); box-shadow: 0 0 8px var(--score-color); }
.fun-score-value { color: var(--score-color); font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1; white-space: nowrap; }
.fun-score-value small { margin-left: 2px; color: rgba(246, 233, 208, .48); font-family: var(--sans); font-size: 14px; font-weight: 400; }
@media (hover: none) { .fun-score { backdrop-filter: none; } }
@media (max-width: 480px) {
  .fun-score { gap: 7px; padding: 5px 7px; }
  .fun-score-label { font-size: 14px; }
}
/* Scores are real content: let cards grow instead of clipping their bottom row. */
.poem-grid .poem-card { aspect-ratio: auto; }

/* 今日挑战 + 奖章墙 */
.daily { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; margin: -8px 0 28px; }
.daily-card {
  position: relative; display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: var(--paper);
  background: linear-gradient(135deg, rgba(166, 78, 57, .55), rgba(213, 179, 109, .28)); box-shadow: inset 0 0 0 1px rgba(229, 196, 126, .45), 0 10px 26px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.daily-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 216, 119, .8), 0 14px 30px rgba(0, 0, 0, .3); }
.daily-card.done { background: linear-gradient(135deg, rgba(111, 144, 124, .55), rgba(213, 179, 109, .2)); }
.daily-tag { justify-self: start; padding: 2px 10px; border-radius: 999px; background: #ffd877; color: #5a3a08; font-size: 13px; font-weight: 700; }
.daily-card b { font-family: var(--serif); font-size: 24px; font-weight: 600; color: #ffe8b0; }
.daily-card small { color: rgba(245, 234, 212, .8); font-size: 13px; line-height: 1.6; }
.daily-go { justify-self: end; color: #ffd877; font-size: 14px; }
.medal-wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.medal-wall div { display: grid; place-content: center; gap: 4px; padding: 10px 4px; border-radius: 14px; text-align: center; background: rgba(245, 234, 212, .07); box-shadow: inset 0 0 0 1px rgba(213, 179, 109, .25); }
.medal-wall b { color: #ffe1a0; font-family: var(--serif); font-size: 20px; font-weight: 600; white-space: nowrap; }
.medal-wall span { color: rgba(238, 220, 187, .62); font-size: 12px; }
.poem-card.is-daily { box-shadow: 0 0 0 2px #ffd877, 0 0 24px rgba(255, 216, 119, .45); }
.poem-card.is-daily .card-body::before { content: "🎯 今日挑战"; display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px; background: #ffd877; color: #5a3a08; font-size: 12px; font-weight: 700; }
@media (max-width: 760px) {
  .daily { grid-template-columns: 1fr; }
  .medal-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .medal-wall b { font-size: 16px; }
  .medal-wall span { font-size: 11px; }
}

/* ========== 国风 PNG 图标（本地 GPU 生成，见 tools/icon_jobs.json） ========== */
.ui-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.13em; object-fit: contain; }
.medal-wall b .ui-ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 1px; }
.daily-tag .ui-ico, .daily-go .ui-ico { width: 1em; height: 1em; }
.poem-card.is-daily .card-body::before { content: "今日挑战"; padding-left: 26px; background: #ffd877 url(/assets/icons/target.png) no-repeat 8px center/18px 18px; }
.ui-star { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; margin: 0 1px; object-fit: contain; }
.cp-levels .ui-star { width: 14px; height: 14px; }

/* ========== 首页导航 / 搜索 / 移动端优化（2026-11） ========== */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 吸顶诗词导航 */
.quickbar {
  position: sticky; top: 0; z-index: 90;
  background: rgba(9, 19, 14, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid rgba(236, 209, 156, .14);
}
.qb-inner { max-width: 1260px; margin: 0 auto; padding: 8px 34px; display: flex; align-items: center; gap: 14px; }
.qb-home {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(238, 211, 155, .45); color: #f1d392;
  display: grid; place-items: center; font-family: var(--serif); font-size: 14px; text-decoration: none;
}
.qb-tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; }
.qb-tabs::-webkit-scrollbar { display: none; }
.qb-tab {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(236, 209, 156, .16); color: rgba(245, 232, 206, .68);
  text-decoration: none; font-size: 13px; letter-spacing: .04em; white-space: nowrap; transition: .2s;
}
.qb-tab:hover { color: #fff3d8; border-color: rgba(236, 209, 156, .5); }
.qb-tab.on { background: rgba(213, 179, 109, .16); border-color: rgba(236, 209, 156, .6); color: #ffe8b8; }
.qb-search {
  flex: 0 1 230px; min-width: 0; display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(236, 209, 156, .2); background: rgba(255, 250, 235, .05);
}
.qb-search:focus-within { border-color: rgba(236, 209, 156, .55); background: rgba(255, 250, 235, .09); }
.qb-search-ico { color: rgba(240, 220, 180, .55); font-size: 15px; }
.qb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #f6ecd6; font: inherit; font-size: 13px; }
.qb-search input::placeholder { color: rgba(238, 222, 190, .42); }
.qb-search input::-webkit-search-cancel-button { display: none; }
.qb-clear {
  flex: 0 0 auto; width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: rgba(236, 209, 156, .18); color: #f6ecd6; cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.qb-count { flex: 0 0 auto; font-size: 12px; color: rgba(240, 224, 192, .6); white-space: nowrap; }
@media (max-width: 900px) {
  .qb-inner { padding: 7px 14px; gap: 8px; flex-wrap: wrap; }
  .qb-tabs { order: 2; flex: 1 0 100%; }
  .qb-search { order: 1; flex: 1 1 auto; }
  .qb-count { order: 1; }
}

/* 搜索时隐藏 hero / 今日挑战，聚焦结果 */
body.is-searching .hero, body.is-searching .daily { display: none; }
.is-hidden { display: none !important; }

/* Hero 操作按钮与数字 */
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 26px; border-radius: 999px;
  background: linear-gradient(135deg, #a34e37, #7b3026); border: 1px solid rgba(245, 221, 174, .58); white-space: nowrap;
  color: #fff3d8; text-decoration: none; font-size: 15px; letter-spacing: .08em;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .32);
}
.hero-cta:hover { filter: brightness(1.08); }
.hero-cta i { font-style: normal; transition: transform .2s; }
.hero-cta:hover i { transform: translateX(4px); }
.hero-ghost {
  color: rgba(240, 224, 192, .62); text-decoration: none; font-size: 14px; letter-spacing: .06em;
  border-bottom: 1px solid rgba(236, 209, 156, .28); padding-bottom: 2px;
}
.hero-ghost:hover { color: #ffe8b8; border-color: rgba(236, 209, 156, .6); }
@media (min-width: 1200px) {
  .hero { position: relative; }
  .hero::after {
    content: "会当凌绝顶\A一览众山小"; white-space: pre;
    writing-mode: vertical-rl; position: absolute; right: -250px; top: -6px;
    font-family: var(--serif); font-size: 26px; letter-spacing: .5em; line-height: 2;
    color: rgba(232, 209, 160, .14); pointer-events: none;
  }
}

/* 回到顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(236, 209, 156, .4); background: rgba(12, 25, 19, .78); color: #f2d9a6;
  font-size: 18px; cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: rgba(236, 209, 156, .75); color: #fff; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* 锚点滚动留出吸顶导航高度 */
.grade-section, .middle-school, .daily { scroll-margin-top: 76px; }

/* 长列表图片已懒加载；不用 content-visibility，避免锚点滚动时页面高度跳动 */

/* 移动端头部：保证 390px 不溢出 */
@media (max-width: 620px) {
  .lan-qr-btn { display: none; }
  .top { height: 64px; padding: 0 12px; gap: 8px; }
  .brand, .brand-copy { min-width: 0; }
  .brand-copy b { font-size: 14px; }
  .top-right { gap: 6px; min-width: 0; }
  .download-link { display: none !important; }
  .sound, .auth-entry, .auth-logout { height: 30px; font-size: 13px; padding: 0 9px; }
  .hero-actions { margin-top: 18px; }
  .hero-cta { height: 42px; padding: 0 22px; font-size: 14px; }
}
.top-right > .download-link { display: none !important; }

/* 触屏设备减少实时模糊 */
@media (hover: none) {
  .fun-score, .poem-card .open { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 头部不挤压、搜索清空按钮隐藏 */
.top-right { flex: 0 0 auto; }
.top-right > * { flex: 0 0 auto; }
.brand { min-width: 0; }
.brand-copy { min-width: 0; overflow: hidden; }
.brand-copy b, .brand-copy em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-clear[hidden] { display: none !important; }
/* 小屏手机（≤380px）也保留下载入口，避免看不到 App 下载；
   320px 实测头部不溢出，品牌文字由 ≤480px 规则隐藏、只留印章 */
@media (max-width: 380px) {
  .download-link { height: 28px; padding: 0 8px; }
}

/* 已登录头像区在手机上收紧，避免"我的闯关 + 昵称 + 退出"挤爆头部 */
@media (max-width: 620px) {
  .auth-pop { width: 176px; }
  .auth-me { height: 30px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .auth-logout { height: 30px; padding: 0 9px; font-size: 13px; }
}

/* ========== 两屏首页：精选信息 + 年级切换 + 横向诗卡 ========== */
.top { height: 68px; overflow: visible; z-index: 120; }
.auth-slot { flex: 0 0 auto; }
.hub { max-width: 1380px; padding-top: 22px; }
.hero {
  max-width: none; margin-bottom: 16px; padding: 18px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: end;
  border: 1px solid rgba(236, 209, 156, .2); border-radius: 22px;
  background: linear-gradient(115deg, rgba(29, 50, 39, .8), rgba(26, 39, 31, .38));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
}
.hero-kicker { grid-column: 1 / -1; }
.hero h1 { margin: 8px 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.12; }
.hero h1 br { display: none; }
.hero h1 em::before { content: " "; }
.hero p { grid-column: 1; line-height: 1.65; }
.hero p br { display: none; }
.hero-meta { grid-column: 2; grid-row: 2; flex-direction: column; align-items: flex-end; gap: 4px; margin: 0; white-space: nowrap; }
.hero-actions { grid-column: 2; grid-row: 3; margin-top: 10px; }
.hero::after { display: none !important; }
.hero-cta { height: 42px; padding: 0 22px; }
.daily { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 12px; margin: 0 0 16px; }
.daily-card { padding: 12px 16px; gap: 4px; border-radius: 16px; }
.daily-card b { font-size: 20px; }
.daily-card small { line-height: 1.45; }
.medal-wall div { padding: 8px 4px; }
.hub > .poem-grid, .timeline { display: none; }
.grade-section, .middle-school { margin-top: 14px; }
.grade-section[hidden], .middle-school[hidden] { display: none; }
.grade-head { margin-bottom: 9px; }
.grade-head span { font-size: 19px; }
.grade-grid {
  display: flex; gap: 14px; margin: 0; padding: 4px 4px 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: rgba(213, 179, 109, .5) rgba(255, 255, 255, .05);
}
.grade-grid::-webkit-scrollbar { height: 6px; }
.grade-grid::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(213, 179, 109, .45); }
.grade-grid .poem-card {
  flex: 0 0 clamp(250px, 24vw, 310px); height: 252px; min-height: 252px !important;
  border-radius: 16px; scroll-snap-align: start;
}
.grade-grid .card-top { padding: 12px 14px 0; }
.grade-grid .card-body { padding: 0 16px; }
.grade-grid .poem-card .card-body h2 { font-size: 27px; line-height: 1.15; }
.grade-grid .lines, .grade-grid .tags, .grade-grid .card-bottom, .grade-grid .cp-levels { display: none; }
.grade-grid .card-progress { margin-top: 6px; }
.grade-grid .fun-score { margin-top: 6px; padding: 4px 7px; }
.grade-grid .poem-card.is-daily .card-body::before { margin-bottom: 4px; }
.grade-details summary { padding: 10px 2px; font-size: 17px; }
.grade-details[open] summary { padding-bottom: 10px; }
.grade-existing { display: none; }
.foot { margin-top: 10px; padding-top: 12px; padding-bottom: 16px; }
body.is-searching .hub > .poem-grid { display: none; }
body.is-searching .grade-grid { flex-wrap: wrap; overflow: visible; }
body.is-searching .grade-grid .poem-card { flex-basis: calc(25% - 11px); }

@media (max-width: 1000px) {
  .hero { column-gap: 20px; padding: 16px 20px; }
  .hero h1 { font-size: 38px; }
  .hero-meta span:last-child { display: none; }
  .daily { grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr); }
  .grade-grid .poem-card { flex-basis: 270px; }
  body.is-searching .grade-grid .poem-card { flex-basis: calc(33.333% - 10px); }
}
@media (max-width: 760px) {
  .hub { padding-top: 14px; }
  .hero { display: block; padding: 16px 18px; }
  /* 手机上让标题按设计语义分成「诗词探险，」/「益智又好玩」两行，避免最后一字单独成行 */
  .hero h1 br { display: inline; }
  .hero h1 em::before { content: none; }
  .hero h1 { font-size: 38px; line-height: 1.16; }
  .hero-meta { flex-direction: row; align-items: center; gap: 16px; margin-top: 10px; }
  .hero-actions { margin-top: 12px; }
  .daily { grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr); }
  .daily-card small { display: none; }
  .medal-wall { gap: 5px; }
  .medal-wall div { padding: 8px 2px; }
  .grade-grid .poem-card { flex-basis: 250px; height: 240px; min-height: 240px !important; }
  body.is-searching .grade-grid .poem-card { flex-basis: calc(50% - 7px); }
}
@media (max-width: 600px) {
  .hero { border-radius: 18px; }
  .hero-kicker { font-size: 13px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14px; }
  .hero-meta { gap: 13px; }
  .daily { grid-template-columns: 1fr; }
  .daily-card { min-height: 100px; }
  .daily-card small { display: block; }
  .medal-wall div { padding: 7px 2px; }
  .grade-grid .poem-card { flex-basis: 78vw; }
  .foot { margin-top: 6px; }
}

/* 五、六年级先提供可检索的诗词档案，游戏完成后再开放入口。 */
.poem-card.upcoming { cursor: default; }
.poem-card.upcoming:hover { transform: none; border-color: rgba(243, 223, 184, .22); box-shadow: 0 18px 45px rgba(0, 0, 0, .28); }
.poem-card.upcoming .card-bg { background: radial-gradient(circle at 78% 18%, rgba(229, 201, 139, .26), transparent 30%), linear-gradient(145deg, #294337, #14271f 68%, #3b3023); }
.poem-card.upcoming .card-bg::before,
.poem-card.upcoming .card-bg::after { content: ""; position: absolute; left: -8%; right: -8%; bottom: 20%; height: 42%; border-radius: 50% 50% 0 0; transform: rotate(-7deg); background: rgba(115, 145, 119, .16); }
.poem-card.upcoming .card-bg::after { bottom: 4%; left: 22%; transform: rotate(9deg); background: rgba(213, 179, 109, .1); }
.poem-card.upcoming .card-bg[data-bg]::before,
.poem-card.upcoming .card-bg[data-bg]::after { display: none; }
.poem-card.upcoming .card-shade { background: linear-gradient(180deg, rgba(6, 16, 12, .02), rgba(6, 16, 12, .55)); }
.poem-card.upcoming .open { color: rgba(245, 227, 192, .72); background: rgba(7, 19, 13, .36); }
.poem-card.upcoming .lines { display: block; margin: 12px 0 8px; font-size: 14px; line-height: 1.7; }

.rail-nav { display: none; }
/* ========== iPad：竖屏 744–900，横屏到 12.9 寸 1366 ========== */
@media (min-width: 744px) and (max-width: 1400px) {
  .top { height: 72px; padding: 0 24px; }
  .top-right { gap: 10px; }
  .sound, .lan-qr-btn, .download-link, .auth-entry, .auth-logout, .auth-me {
    height: 40px; padding: 0 14px;
  }
  .qb-inner { flex-wrap: nowrap; align-items: center; padding: 8px 24px; gap: 10px; }
  .qb-home { display: grid; width: 36px; height: 36px; }
  .qb-tabs { order: 0; flex: 1 1 auto; gap: 6px; }
  .qb-search { order: 0; flex: 0 1 180px; height: 40px; }
  .qb-tabs.is-overflow {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
  }
  .qb-search input { font-size: 14px; }
  .qb-count { order: 0; font-size: 14px; }
  .qb-tab {
    order: 0; min-height: 40px; padding: 0 13px; font-size: 14px;
    display: inline-flex; align-items: center;
  }
  .hub { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 18px 22px; }
  .hero-cta { height: 46px; padding: 0 24px; }
  .daily-card { min-height: 112px; }
  .medal-wall b { font-size: 22px; }
  .medal-wall span { font-size: 14px; }
  .grade-details summary { min-height: 48px; padding: 12px 4px; }
  .grade-grid {
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    gap: 14px;
    padding-bottom: 16px;
  }
  .grade-grid .poem-card {
    flex-basis: calc((100% - 16px) / 2.22);
    height: 276px;
    min-height: 276px !important;
    scroll-snap-align: start;
  }
  .grade-grid .poem-card .card-body h2 { font-size: 28px; }
  .rail-wrap { position: relative; }
  .rail-nav {
    position: absolute; left: 0; right: 0; top: 0; bottom: 16px; z-index: 3;
    display: flex; align-items: center; justify-content: space-between; pointer-events: none;
  }
  .rail-btn {
    pointer-events: none; opacity: 0; width: 44px; height: 44px; margin: 0 4px;
    border-radius: 50%; border: 1px solid rgba(236, 209, 156, .55);
    background: rgba(12, 25, 19, .82); color: #f6e7c8; font-size: 26px; line-height: 1;
    cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
  }
  .rail-wrap.can-prev .rail-btn.prev,
  .rail-wrap.can-next .rail-btn.next { opacity: 1; pointer-events: auto; }
  .rail-wrap.can-next .grade-grid {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 52px), transparent);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 52px), transparent);
  }
  .rail-wrap.can-prev.can-next .grade-grid {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 52px, #000 calc(100% - 52px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 52px, #000 calc(100% - 52px), transparent);
  }
  .rail-wrap.can-prev:not(.can-next) .grade-grid {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 52px, #000 100%);
    mask-image: linear-gradient(90deg, transparent, #000 52px, #000 100%);
  }
  body.is-searching .rail-nav { display: none; }
  body.is-searching .grade-grid {
    -webkit-mask-image: none; mask-image: none;
  }
  .foot { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1080px) and (max-width: 1400px) {
  .grade-grid .poem-card { flex-basis: calc((100% - 32px) / 3.28); }
  .hero h1 { font-size: 44px; }
  .hero-meta span:last-child { display: inline; }
}
@media (min-width: 744px) and (max-width: 900px) {
  .top .count { display: none; }
  .brand-copy em { display: none; }
  .qb-inner { flex-wrap: wrap; row-gap: 8px; }
  .qb-search { order: 1; flex: 1 1 auto; min-width: 0; }
  .qb-count { order: 2; }
  .qb-tabs { order: 3; flex: 1 0 100%; }
  .hero { display: block; }
  .hero h1 { font-size: 40px; }
  .hero-meta { flex-direction: row; align-items: center; gap: 16px; margin-top: 12px; white-space: normal; }
  .hero-actions { margin-top: 14px; }
  .daily { grid-template-columns: 1fr; }
  .daily-card small { display: block; }
}
@media (hover: none) {
  .poem-card:hover, .daily-card:hover { transform: none; }
  .poem-card:active { transform: scale(.985); }
  .hero-cta:active, .qb-tab:active, .daily-card:active, .rail-btn:active { filter: brightness(1.12); }
}
.poem-card.upcoming .card-note { margin-top: 8px; }
.poem-card.upcoming .cp-new { animation: none; color: rgba(243, 226, 194, .72); background: rgba(7, 19, 13, .36); }

/* 首页只留玩法与推荐；诗集是可排序列表 */
.grade-section, .middle-school { display: none !important; }
.qb-tabs { display: none !important; }
.qb-views {
  display: flex; gap: 4px; padding: 4px; flex: 0 0 auto;
  border-radius: 999px; border: 1px solid rgba(236, 209, 156, .22);
  background: rgba(255, 250, 235, .05);
}
.qb-view, .qb-sort .qb-tab, .access-tabs .qb-tab {
  min-height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 0; background: transparent;
  color: rgba(245, 232, 206, .74); font-size: 14px; letter-spacing: .06em;
}
a.qb-view { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; white-space: nowrap; }
.qb-view:hover { color: #fff3d8; background: rgba(240, 210, 148, .1); }
.qb-view.on {
  background: linear-gradient(180deg, #f2d79a, #d5b36d);
  color: #2a2113; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .24);
}
.qb-sort .qb-tab.on, .access-tabs .qb-tab.on { background: rgba(213, 179, 109, .2); border: 1px solid rgba(236, 209, 156, .7); color: #ffe8b8; }
.qb-sort .qb-tab, .access-tabs .qb-tab {
  border: 1px solid rgba(236, 209, 156, .28);
  color: rgba(245, 232, 206, .78);
}
.access-tabs .qb-tab[data-access="free"].on { background: rgba(47, 143, 91, .35); border-color: #7dcea0; color: #f4fff8; }
.access-tabs .qb-tab[data-access="vip"].on { background: rgba(196, 150, 58, .35); border-color: #f0d48a; color: #ffe7b0; }
.qb-sort { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; }
.qb-sort[hidden] { display: none !important; }
.access-bar {
  display: flex; align-items: center; gap: 14px;
  margin: 0 2px 16px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid rgba(236, 209, 156, .22);
  background: rgba(16, 32, 24, .62);
}
.access-bar[hidden] { display: none !important; }
.access-label {
  color: #e5c98b; font-family: var(--serif); font-size: 16px;
  letter-spacing: .12em; white-space: nowrap;
}
.access-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.play-intro {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px;
}
.play-intro article {
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(236, 209, 156, .18);
  background: rgba(16, 32, 24, .45);
}
.play-intro b {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(236, 209, 156, .45); color: #f0d294; font-family: var(--serif); font-weight: 500;
}
.play-intro h2 { margin: 8px 0 4px; font-family: var(--serif); font-size: 18px; font-weight: 500; color: #f6ecd8; }
.play-intro p { margin: 0; color: rgba(241, 228, 202, .72); font-size: 14px; line-height: 1.65; }
.featured { margin-bottom: 8px; }
.poem-list { display: grid; gap: 8px; }
.poet-stats { display: grid; gap: 14px; margin: 0 2px 18px; scroll-margin-top: 96px; }
.poet-stats[hidden] { display: none !important; }
.poet-stat-block h3 {
  margin: 0 0 8px; color: #e5c98b; font-family: var(--serif);
  font-size: 16px; font-weight: 500; letter-spacing: .12em;
}
.poet-stat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.poet-stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(236, 209, 156, .28);
  background: rgba(16, 32, 24, .55); color: #f6e6c4; font-size: 14px;
}
.poet-stat-chip b { color: #f0d48a; font-weight: 700; }
.poet-stat-chip em { color: rgba(237, 220, 186, .62); font-style: normal; font-size: 12px; }
.poet-stat-chip:hover { border-color: rgba(236, 209, 156, .7); }
.poem-group { display: flex; align-items: center; gap: 12px; margin: 14px 2px 4px; scroll-margin-top: 96px; }
.poem-group span { font-family: var(--serif); color: #e5c98b; font-size: 18px; letter-spacing: .08em; }
.poem-group i { flex: 1; height: 1px; background: rgba(234, 210, 166, .16); }
.poem-group em { color: rgba(237, 220, 186, .5); font-style: normal; font-size: 14px; }
.poem-row {
  display: grid; grid-template-columns: 192px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  min-height: 160px; padding: 8px 16px 8px 8px; border-radius: 16px; text-decoration: none; color: inherit;
  border: 1px solid rgba(236, 209, 156, .16); background: rgba(16, 32, 24, .42);
}
.poem-row:active { transform: scale(.995); }
.poem-row-cover {
  position: relative; overflow: hidden;
  width: 192px; height: 144px; border-radius: 12px; background: #1c3328 center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(236, 209, 156, .22);
}
.poem-row-cover.is-plain {
  display: grid; place-items: center; font-family: var(--serif); font-size: 32px; color: #f0d294;
  background: radial-gradient(circle at 78% 18%, rgba(229, 201, 139, .26), transparent 42%), linear-gradient(145deg, #294337, #14271f 70%);
}
.poem-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.poem-row-main strong { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--serif); font-size: 18px; font-weight: 500; color: #fbf2df; }
.poem-row-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poem-row-main em { font-style: normal; color: rgba(242, 223, 189, .64); font-size: 14px; }
.poem-row-meta { color: rgba(237, 220, 186, .62); font-size: 14px; white-space: nowrap; }
.poem-row-go { color: #edcf91; font-size: 14px; }
.poem-row.is-soon { cursor: default; }
.poem-row.is-soon .poem-row-go { color: rgba(237, 220, 186, .45); }
.adventure-lock {
  display: flex; align-items: center; gap: 14px;
  margin: 0 2px 16px; padding: 14px 16px; border-radius: 18px;
  border: 1px solid rgba(236, 209, 156, .38);
  background:
    radial-gradient(circle at 10% 50%, rgba(255, 214, 120, .2), transparent 46%),
    rgba(16, 32, 24, .78);
}
.adventure-lock[hidden] { display: none !important; }
.adventure-lock img {
  width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35));
}
.adventure-lock b {
  display: block; font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: #ffe7b8; letter-spacing: .08em;
}
.adventure-lock span { display: block; margin-top: 4px; color: rgba(241, 228, 202, .74); font-size: 14px; line-height: 1.5; }
.adventure-lock button {
  margin-left: auto; height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(232, 207, 159, .45);
  background: linear-gradient(135deg, #a24f3a, #7f3429); color: #fff0d5;
  font-size: 15px; letter-spacing: .08em; white-space: nowrap;
}
.adventure-lock button:hover { background: linear-gradient(135deg, #b35c43, #8d3b2e); }
.adventure-lock button:disabled { opacity: .7; cursor: wait; }
.adventure-lock.is-unlocking img { animation: adventure-lock-open 1s ease forwards; }
.adventure-lock.is-unlocking { animation: adventure-glow 1s ease; }
.adventure-lock.is-open b { color: #f3ffd8; }
@keyframes adventure-lock-open {
  0% { transform: rotate(0) scale(1); opacity: 1; }
  16% { transform: rotate(-16deg) scale(1.05); }
  32% { transform: rotate(14deg) scale(1.05); }
  50% { transform: rotate(-4deg) scale(1.2); filter: drop-shadow(0 0 14px rgba(255, 220, 140, .95)) brightness(1.5); }
  100% { transform: rotate(0) scale(1.4); opacity: 0; filter: brightness(2); }
}
@keyframes adventure-glow {
  45% { box-shadow: inset 0 0 0 1px rgba(255, 226, 160, .65), 0 0 32px 4px rgba(255, 214, 120, .42); }
  100% { box-shadow: inset 0 0 0 1px rgba(143, 195, 155, .45); }
}
.poem-row.is-gated { cursor: pointer; }
.poem-row.is-gated .poem-row-cover { filter: saturate(.7) brightness(.78); }
.poem-row.is-gated .poem-row-cover::after {
  content: ""; position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px;
  border-radius: 50%; border: 1px solid rgba(236, 209, 156, .5);
  background: rgba(10, 20, 15, .72) url("/assets/icons/lock.png") center / 16px no-repeat;
}
.poem-row.is-gated .poem-row-go,
.poem-row.is-open .poem-row-go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
}
.poem-row.is-gated .poem-row-go {
  border: 1px solid rgba(232, 207, 159, .55);
  background: rgba(123, 82, 35, .55); color: #ffe7b0;
}
.poem-row.is-open .poem-row-go {
  border: 1px solid rgba(143, 195, 155, .55); background: rgba(47, 92, 64, .55); color: #e9f8e0;
}
.poem-row.is-vip { cursor: pointer; }
.poem-row.is-vip .poem-row-cover::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(8, 14, 10, .16);
}
.poem-row.is-vip .poem-row-cover::after,
.poem-row.is-vip .poem-row-go,
.poem-row.is-vip.is-passed .poem-row-go,
.map-poem-link.is-vip .map-poem-go,
.vip-mark {
  border: 1px solid #f6e4b4;
  background: linear-gradient(180deg, #f0d48a 0%, #c4963a 100%);
  color: #3d2808;
  box-shadow: none;
}
.poem-row.is-vip .poem-row-cover::after {
  content: "VIP";
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: auto; height: auto; padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; line-height: 1.3;
}
.poem-row.is-vip .poem-row-go,
.poem-row.is-vip.is-passed .poem-row-go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  font-size: 15px; font-weight: 700; letter-spacing: .12em;
}
.poem-row.is-free .poem-row-cover::after,
.poem-row.is-free .poem-row-go,
.poem-row.is-free.is-open .poem-row-go,
.poem-row.is-free.is-passed .poem-row-go,
.map-poem-link.is-free .map-poem-go {
  border: 1px solid #d9f5e4;
  background: linear-gradient(180deg, #7dcea0 0%, #2f8f5b 100%);
  color: #f4fff8;
  box-shadow: none;
}
.poem-row.is-free .poem-row-cover::after {
  content: "免费";
  position: absolute; right: 8px; top: 8px; z-index: 2;
  width: auto; height: auto; padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; line-height: 1.3;
}
.poem-row.is-free .poem-row-go,
.poem-row.is-free.is-open .poem-row-go,
.poem-row.is-free.is-passed .poem-row-go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  font-size: 15px; font-weight: 700; letter-spacing: .12em;
}
.poem-row.is-passed { border-color: rgba(185, 211, 174, .42); }
.poem-row.is-passed.is-gated .poem-row-cover::after { display: none; }
.poem-row.is-passed .poem-row-go {
  border-color: rgba(185, 211, 174, .7); background: rgba(47, 110, 68, .78); color: #f3ffe8;
}
.poem-row.is-unlocking { position: relative; overflow: hidden; }
.poem-row.is-unlocking .poem-row-cover { filter: none; }
.poem-row.is-unlocking .poem-row-cover::after { animation: adventure-badge-out .45s ease forwards; }
.poem-row.is-unlocking::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 236, 180, .55), transparent 70%);
  transform: translateX(-120%);
  animation: shiji-unlock-sweep .7s ease forwards;
  animation-delay: calc(var(--unlock-i, 0) * 60ms);
}
@keyframes adventure-badge-out { to { opacity: 0; transform: scale(1.4); } }
@keyframes shiji-unlock-sweep { to { transform: translateX(120%); } }
@media (max-width: 800px) {
  .adventure-lock {
    display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px 12px;
  }
  .adventure-lock button { grid-column: 2; margin-left: 0; justify-self: start; }
  .poem-row.is-open .poem-row-go, .poem-row.is-gated .poem-row-go, .poem-row.is-passed .poem-row-go { font-size: 13px; padding: 0 10px; min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .adventure-lock.is-unlocking img,
  .adventure-lock.is-unlocking,
  .adventure-lock.is-open,
  .poem-row.is-unlocking::after { animation: none; }
}
.poem-empty { margin: 12px 2px; color: rgba(237, 220, 186, .6); }
body.view-home .collection { display: none; }
body.view-shiji .hero,
body.view-shiji .play-intro,
body.view-shiji .featured,
body.view-shiji .daily { display: none; }
body.view-home .qb-search { flex: 1 1 240px; max-width: 420px; }
.brand-copy em, .count, .qb-home, .dl-long { display: none !important; }
.dl-short { display: inline !important; }
@media (max-width: 800px) {
  .play-intro { grid-template-columns: 1fr; }
  .poem-row { grid-template-columns: 144px minmax(0, 1fr) auto; gap: 10px; min-height: 124px; padding-right: 10px; }
  .poem-row-cover { width: 144px; height: 108px; }
  .poem-row-meta { display: none; }
  body.view-shiji .qb-sort { flex: 1 0 100%; order: 3; }
}

/* 精彩推荐改为纵向瀑布式卡片区，不再横向滑动。 */
#featuredGrid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  padding: 4px; overflow: visible; scroll-snap-type: none;
  -webkit-mask-image: none !important; mask-image: none !important;
}
#featuredGrid::-webkit-scrollbar { display: none; }
#featuredGrid .poem-card {
  width: auto; height: 270px; min-height: 270px !important;
  scroll-snap-align: none;
}
#featured .rail-nav { display: none !important; }
@media (max-width: 1080px) {
  #featuredGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #featuredGrid { grid-template-columns: 1fr; gap: 14px; }
  #featuredGrid .poem-card { height: 250px; min-height: 250px !important; }
}

/* ========== 手机端整体适配与交互易用性（2026-11） ========== */
/* iPhone 刘海 / 灵动岛 / 底部手势条：安全区内缩；普通浏览器 env() 为 0，不影响现有布局
   --sat 等变量由 /safe-area.js 兜底写入（独立 App / WebView 里 env() 可能为 0） */
body {
  padding-top: var(--sat, env(safe-area-inset-top, 0px));
  padding-bottom: var(--sab, env(safe-area-inset-bottom, 0px));
  padding-left: var(--sal, env(safe-area-inset-left, 0px));
  padding-right: var(--sar, env(safe-area-inset-right, 0px));
}
@media (max-width: 620px) {
  /* 触控目标：头部按钮 30px -> 36px，搜索框 32 -> 36 */
  .sound, .download-link, .auth-entry, .auth-logout, .auth-me { height: 36px; }
  .download-link { padding: 0 11px; }
  .qb-search { height: 36px; }
  .qb-search input { font-size: 14px; }
  .quickbar { top: var(--sat, env(safe-area-inset-top, 0px)); }
  /* 悬浮按钮避开底部手势条；列表底部留白，避免压住最后一行 */
  .to-top { bottom: calc(18px + var(--sab, env(safe-area-inset-bottom, 0px))); width: 46px; height: 46px; }
  .foot { padding-bottom: calc(20px + var(--sab, env(safe-area-inset-bottom, 0px))); }
  .hub { padding-bottom: 26px; }
  body.view-shiji .collection { padding-bottom: 64px; }
  .medal-wall span { font-size: 12px; }
  /* 纯文字链接也留出 36px 触控高度 */
  .hero-ghost { display: inline-flex; align-items: center; min-height: 36px; }
}
/* 触屏按压反馈：点击有即时响应 */
@media (hover: none) {
  .sound:active, .download-link:active, .auth-entry:active, .auth-logout:active,
  .qb-view:active, .qb-tab:active, .hero-cta:active, .hero-ghost:active,
  .poem-row:active, .daily-card:active, .to-top:active { transform: scale(.96); transition: transform .08s ease; }
  .poem-card:active { transform: scale(.99); }
}
/* 横屏手机：压缩首屏，避免一屏只剩标题 */
@media (orientation: landscape) and (max-height: 500px) {
  .top { height: 52px; }
  .hub { padding-top: 8px; }
  .hero { padding: 12px 16px; margin-bottom: 10px; }
  .hero h1 { font-size: 30px; margin: 6px 0 8px; }
  .hero p { font-size: 14px; }
  .hero-meta { margin-top: 6px; }
  #featuredGrid .poem-card { height: 200px; min-height: 200px !important; }
}

/* 诗里中国：本地 GeoJSON 中国地图与诗作地点联动 */
.poem-map-view[hidden], .poem-list[hidden] { display: none !important; }
.poem-map-view { margin-top: 4px; }
.map-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 2px 14px; }
.map-heading span { color: #e5c98b; font-family: var(--serif); font-size: 15px; letter-spacing: .18em; }
.map-heading h2 { margin: 5px 0 0; color: #f7edd8; font-family: var(--serif); font-size: 25px; font-weight: 500; letter-spacing: .06em; }
.map-heading-actions { display: flex; align-items: center; gap: 14px; }
.map-heading-actions > strong { color: rgba(237, 220, 186, .62); font-size: 14px; font-weight: 400; white-space: nowrap; }
.map-poet-filter { position: relative; display: flex; align-items: center; }
.map-poet-trigger {
  display: inline-flex; align-items: center; gap: 8px; max-width: 214px; height: 36px; padding: 0 12px;
  border: 1px solid rgba(236, 209, 156, .28); border-radius: 10px;
  color: #f5e6c6; background: #14291f; font-size: 13px; cursor: pointer;
}
.map-poet-trigger > span { color: rgba(237, 220, 186, .55); font-size: 12px; letter-spacing: .06em; }
.map-poet-trigger > b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.map-poet-trigger > i { color: rgba(237, 220, 186, .6); font-style: normal; transition: transform .18s; }
.map-poet-trigger[aria-expanded="true"] > i { transform: rotate(180deg); }
.map-poet-trigger:hover { border-color: rgba(236, 209, 156, .45); }
.map-poet-trigger:focus-visible { outline: 2px solid rgba(236, 209, 156, .55); outline-offset: 2px; }
.map-poet-panel {
  position: absolute; z-index: 12; top: calc(100% + 10px); right: 0;
  display: flex; flex-direction: column;
  width: min(380px, calc(100vw - 36px)); max-height: min(70vh, 520px); padding: 12px;
  border: 1px solid rgba(236, 209, 156, .3); border-radius: 16px;
  background: #0f241c; box-shadow: 0 22px 54px rgba(0, 0, 0, .5);
}
.map-poet-panel.is-above { top: auto; bottom: calc(100% + 10px); }
.map-poet-panel[hidden] { display: none; }
.map-poet-panel-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; }
.map-poet-panel-head > b { color: #f3e3bd; font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .08em; }
.map-poet-close {
  width: 26px; height: 26px; border: 0; border-radius: 50%; color: rgba(237, 220, 186, .7);
  background: rgba(236, 209, 156, .08); font-size: 16px; line-height: 1; cursor: pointer;
}
.map-poet-close:hover { background: rgba(236, 209, 156, .16); }
.map-poet-search {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid rgba(236, 209, 156, .24); border-radius: 9px;
  color: #f5e6c6; background: rgba(7, 23, 18, .6); font-size: 13px;
}
.map-poet-search::placeholder { color: rgba(237, 220, 186, .42); }
.map-poet-search:focus { outline: 2px solid rgba(236, 209, 156, .45); outline-offset: 1px; }
.map-poet-list {
  flex: 1 1 auto; min-height: 0; max-height: 340px; margin-top: 10px; overflow: auto;
  scrollbar-width: thin; scrollbar-color: rgba(229, 201, 139, .28) transparent;
}
.map-poet-group { margin: 0 0 10px; }
.map-poet-group > b { display: block; margin: 2px 2px 6px; color: rgba(237, 220, 186, .5); font-size: 11px; font-weight: 400; letter-spacing: .12em; }
.map-poet-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.map-poet-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px;
  border: 1px solid rgba(236, 209, 156, .22); border-radius: 999px;
  color: #e9d7b0; background: rgba(236, 209, 156, .05); font-size: 12px; cursor: pointer;
}
.map-poet-chip > em { color: rgba(237, 220, 186, .45); font-style: normal; font-size: 11px; }
.map-poet-chip:hover { border-color: rgba(236, 209, 156, .45); background: rgba(236, 209, 156, .1); }
.map-poet-chip:focus-visible { outline: 2px solid rgba(236, 209, 156, .55); outline-offset: 2px; }
.map-poet-chip.is-on { border-color: #e5c98b; background: rgba(229, 201, 139, .18); color: #fff3d4; }
.map-poet-chip.is-on > em { color: rgba(255, 243, 212, .7); }
.map-poet-empty { padding: 14px 4px; color: rgba(237, 220, 186, .5); font-size: 13px; text-align: center; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, .85fr); gap: 16px; align-items: stretch; }
.china-map-shell { position: relative; display: flex; min-width: 0; }
.china-map {
  position: relative; flex: 1; min-width: 0; max-height: 650px; overflow: auto; border-radius: 22px;
  border: 1px solid rgba(236, 209, 156, .2);
  background:
    radial-gradient(circle at 76% 18%, rgba(224, 192, 119, .11), transparent 32%),
    linear-gradient(145deg, rgba(24, 49, 38, .88), rgba(7, 23, 18, .92));
  box-shadow: inset 0 1px rgba(255, 244, 216, .04), 0 18px 48px rgba(0, 0, 0, .14);
  scrollbar-width: thin; scrollbar-color: rgba(229, 201, 139, .28) transparent;
}
.china-map.is-panning { cursor: grabbing; user-select: none; }
.china-map-svg { display: block; width: 100%; height: auto; min-height: 420px; }
.map-zoom-controls {
  position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; align-items: center; gap: 3px;
  padding: 4px; border: 1px solid rgba(236, 209, 156, .3); border-radius: 12px;
  background: rgba(7, 23, 18, .9); box-shadow: 0 5px 18px rgba(0, 0, 0, .25); backdrop-filter: blur(10px);
}
.map-zoom-controls button {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  color: #ffe8b8; background: transparent; font: 600 21px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.map-zoom-controls button:hover, .map-zoom-controls button:focus-visible { background: rgba(213, 179, 109, .18); outline: none; }
.map-zoom-controls button:disabled { color: rgba(245, 232, 206, .28); cursor: default; background: transparent; }
.map-zoom-controls .map-zoom-level { width: 58px; font-size: 12px; font-weight: 500; }
.map-zoom-controls .map-fullscreen { width: 44px; font-size: 12px; font-weight: 500; }
#poemMapView:fullscreen, #poemMapView.is-fullscreen-fallback {
  display: flex; flex-direction: column; box-sizing: border-box; width: 100vw; height: 100vh; margin: 0;
  padding: 18px 24px; overflow: auto; background: #0b1c15;
}
#poemMapView:fullscreen::backdrop { background: #0b1c15; }
#poemMapView.is-fullscreen-fallback { position: fixed; inset: 0; z-index: 9999; }
body.map-fullscreen-open { overflow: hidden; }
#poemMapView:fullscreen .map-layout, #poemMapView.is-fullscreen-fallback .map-layout { flex: 1; min-height: 0; }
#poemMapView:fullscreen .china-map-shell, #poemMapView.is-fullscreen-fallback .china-map-shell { min-height: 0; }
#poemMapView:fullscreen .china-map, #poemMapView.is-fullscreen-fallback .china-map { height: 100%; min-height: 0; max-height: none; }
#poemMapView:fullscreen .china-map-svg, #poemMapView.is-fullscreen-fallback .china-map-svg { min-height: 0; }
#poemMapView:fullscreen .map-place-panel, #poemMapView.is-fullscreen-fallback .map-place-panel { max-height: none; }
#poemMapView:fullscreen .map-disclaimer, #poemMapView.is-fullscreen-fallback .map-disclaimer { display: none; }
.map-route-line {
  fill: none; stroke: #f2cc73; stroke-width: 2; stroke-dasharray: 7 6; opacity: .86;
  vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}
.map-route-arrow { fill: #ffe2a0; }
.map-route-status {
  position: absolute; z-index: 2; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px); padding: 6px 9px; border: 1px solid rgba(236, 209, 156, .24); border-radius: 10px;
  color: rgba(255, 232, 184, .82); background: rgba(7, 23, 18, .9); font-size: 11px; line-height: 1.5;
  backdrop-filter: blur(8px);
}
.map-route-status[hidden] { display: none !important; }
.map-route-status i { flex: 0 0 24px; height: 0; border-top: 2px dashed #f2cc73; }
.map-route-buttons { display: flex; flex: 0 0 auto; gap: 2px; }
.map-route-buttons button {
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  color: #ffe8b8; background: rgba(213, 179, 109, .1); font: 600 17px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.map-route-buttons button:hover, .map-route-buttons button:focus-visible { background: rgba(213, 179, 109, .26); outline: none; }
.map-route-buttons button:disabled { color: rgba(245, 232, 206, .25); background: transparent; cursor: default; }
.map-route-buttons .map-route-play { font-size: 12px; background: rgba(213, 179, 109, .22); }
#mapRouteText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-province { fill: url(#provinceFill); stroke: rgba(221, 205, 163, .3); stroke-width: .72; vector-effect: non-scaling-stroke; }
.map-province:hover { fill: #315744; }
.map-marker { cursor: pointer; outline: none; }
.map-marker-halo { fill: rgba(236, 198, 111, .13); stroke: rgba(246, 218, 153, .15); stroke-width: calc(1px * var(--mscale, 1)); transition: fill .18s, stroke .18s; }
.map-marker-circle { fill: #d6ae5f; stroke: #fff0c7; stroke-width: calc(1.25px * var(--mscale, 1)); filter: drop-shadow(0 calc(3px * var(--mscale, 1)) calc(5px * var(--mscale, 1)) rgba(0, 0, 0, .35)); transition: fill .18s, stroke-width .18s; }
.map-marker-count { fill: #17291f; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 800; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map-marker:hover .map-marker-circle, .map-marker:focus-visible .map-marker-circle, .map-marker.is-selected .map-marker-circle { fill: #ffe3a0; stroke-width: calc(2px * var(--mscale, 1)); }
.map-marker:hover .map-marker-halo, .map-marker:focus-visible .map-marker-halo, .map-marker.is-selected .map-marker-halo { fill: rgba(255, 221, 143, .25); stroke: rgba(255, 229, 167, .48); }
.map-marker.is-route-current .map-marker-halo { fill: rgba(255, 221, 143, .38); stroke: #ffe2a0; stroke-width: calc(2.5px * var(--mscale, 1)); }
.map-marker.is-route-current .map-marker-circle { stroke: #fff7df; stroke-width: calc(2.5px * var(--mscale, 1)); }
.map-place-label rect { fill: rgba(8, 24, 18, .94); stroke: rgba(241, 207, 135, .55); stroke-width: 1; }
.map-place-label text { fill: #ffe8b8; font-family: var(--serif); font-size: 14px; }
.map-place-panel {
  min-width: 0; max-height: 590px; overflow-y: auto; padding: 20px; border-radius: 22px;
  border: 1px solid rgba(236, 209, 156, .2); background: rgba(16, 32, 24, .66);
  scrollbar-width: thin; scrollbar-color: rgba(229, 201, 139, .28) transparent;
}
.map-panel-eyebrow { display: block; color: rgba(229, 201, 139, .62); font-size: 12px; letter-spacing: .1em; }
.map-place-panel h3 { margin: 6px 0 16px; color: #f5e6c6; font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.4; }
.map-panel-empty { color: rgba(237, 220, 186, .56); font-size: 14px; line-height: 1.7; }
.map-place-poems { display: grid; gap: 10px; }
.map-poem-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px 10px; align-items: center;
  padding: 13px; border-radius: 14px; color: inherit; text-decoration: none;
  border: 1px solid rgba(236, 209, 156, .14); background: rgba(34, 57, 43, .48);
  transition: border-color .18s, background .18s, transform .18s;
}
.map-poem-link:hover { border-color: rgba(236, 209, 156, .5); background: rgba(45, 70, 52, .65); transform: translateY(-1px); }
.map-poem-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.map-poem-main strong { color: #fbf2df; font-family: var(--serif); font-size: 17px; font-weight: 500; line-height: 1.4; }
.map-poem-link.is-passed { border-color: rgba(185, 211, 174, .42); }
.map-poem-link.is-vip .map-poem-go {
  padding: 2px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
.vip-mark {
  display: inline-grid; place-items: center;
  min-width: 64px; height: 36px; padding: 0 12px; border-radius: 999px;
  font-size: 18px; font-weight: 700; letter-spacing: .12em;
}
.vip-modal[hidden] { display: none !important; }
.vip-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 24px;
}
.vip-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.vip-card {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 14px;
  width: min(360px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  border: 1px solid rgba(236, 209, 156, .4);
  background: #12201b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  text-align: center;
}
.vip-card b {
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  color: #f6e6c4; letter-spacing: .06em;
}
.vip-card button {
  min-height: 40px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(232, 207, 159, .45);
  background: linear-gradient(135deg, #a24f3a, #7f3429); color: #fff0d5;
  font-size: 15px;
}
.map-poem-main em { color: rgba(242, 223, 189, .56); font-size: 12px; font-style: normal; }
.map-poem-kind { padding: 3px 7px; border-radius: 999px; color: #e8ca8a; background: rgba(213, 179, 109, .1); font-size: 11px; white-space: nowrap; }
.map-poem-go { color: #edcf91; font-size: 12px; white-space: nowrap; }
.map-poem-note { grid-column: 1 / -1; color: rgba(237, 220, 186, .58); font-size: 12px; line-height: 1.65; }
.map-disclaimer { margin: 12px 3px 0; color: rgba(237, 220, 186, .48); font-size: 12px; line-height: 1.75; }
.map-loading, .map-load-error { padding: 48px 24px; color: rgba(237, 220, 186, .6); text-align: center; }
.map-retry { display: block; margin: 14px auto 0; padding: 8px 14px; border: 1px solid rgba(236, 209, 156, .35); border-radius: 999px; color: #ffe8b8; background: transparent; cursor: pointer; }
@media (max-width: 980px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-place-panel { max-height: 420px; }
  .china-map-svg { min-height: 0; }
}
@media (max-width: 620px) {
  .map-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .map-heading h2 { font-size: 22px; }
  .map-heading-actions { width: 100%; justify-content: space-between; }
  .map-poet-trigger { max-width: 168px; }
  .map-poet-panel { left: 0; right: auto; width: calc(100vw - 32px); }
  .china-map { border-radius: 17px; }
  .china-map-svg { width: 650px; max-width: none; }
  .map-place-panel { padding: 16px; border-radius: 17px; }
  .map-place-panel h3 { font-size: 21px; }
  .map-poem-link { grid-template-columns: minmax(0, 1fr) auto; }
  .map-poem-kind { grid-row: 2; grid-column: 1; justify-self: start; }
  .map-poem-go { grid-row: 1; grid-column: 2; }
  .map-poem-note { grid-row: 3; }
}

/* ============================================================
   PAD / 平板顶部导航（2026-11）
   目标：顶部只保留高频操作，所有可点区域 ≥44px，
        扫码 / 下载等次要入口收进「更多」，手机与桌面保持原样。
   生效范围：744–1400px（iPad 竖屏 744/768/834/1024，横屏 1024/1194/1366/1376）
   ============================================================ */
.pad-more { display: none; position: relative; }
.pad-more-pop[hidden] { display: none !important; }
.pad-more-pop { display: none; }
.qb-sort-label { display: none; }

@media (min-width: 744px) and (max-width: 1400px) and (min-height: 640px) {
  /* ---------- 第一行：品牌 + 高频操作 ---------- */
  .top {
    height: 72px; padding: 0 28px; gap: 20px; max-width: 1380px;
    border-bottom: 1px solid rgba(236, 209, 156, .07);
  }
  .brand { gap: 14px; min-width: 0; }
  .seal { width: 44px; height: 44px; font-size: 23px; }
  .brand-copy { gap: 2px; }
  .brand-copy b { font-size: 18px; letter-spacing: .1em; }
  .brand-copy em { display: block !important; font-size: 13px; letter-spacing: .06em; }

  .top-right { gap: 10px; }
  .count { display: none !important; }
  /* 扫码 / 下载 → 「更多」菜单，顶部只留常用操作 */
  .top-right > .lan-qr-btn,
  .top-right > .download-link { display: none !important; }

  .sound, .auth-entry, .auth-logout, .auth-me {
    height: 44px; min-height: 44px; padding: 0 20px; font-size: 15px;
    letter-spacing: .05em; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .sound { color: rgba(245, 230, 201, .82); }
  .auth-slot { gap: 8px; }
  .auth-entry { color: rgba(248, 234, 208, .92); }
  .auth-entry.is-register {
    background: linear-gradient(180deg, #f2d79a, #d5b36d);
    border-color: rgba(255, 234, 186, .85);
    color: #2a2113; font-weight: 600;
  }
  .auth-entry.is-register:hover {
    background: linear-gradient(180deg, #f7e0ab, #dcbb75);
    color: #231b0f;
  }
  .auth-avatar { width: 46px; height: 46px; flex-basis: 46px; }
  .auth-pop { width: 220px; }
  .auth-pop-item { height: 44px; font-size: 15px; }

  /* ---------- 更多菜单 ---------- */
  .pad-more { display: block; }
  .pad-more-btn {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid rgba(235, 208, 155, .3);
    background: rgba(25, 43, 34, .45); color: #f3e3c3;
    font-size: 22px; line-height: 1; cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
  }
  .pad-more-btn:hover, .pad-more-btn[aria-expanded="true"] {
    border-color: rgba(241, 205, 137, .7);
    background: rgba(123, 82, 35, .42); color: #fff1d2;
  }
  .pad-more-pop {
    display: grid; position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
    min-width: 216px; padding: 6px; gap: 2px;
    border-radius: 16px; border: 1px solid rgba(240, 210, 148, .42);
    background: #163028; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  }
  .pad-more-item {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    min-height: 52px; padding: 10px 14px; border: 0; border-radius: 10px;
    background: transparent; color: #f4e7cf; font-size: 15px; text-align: left;
    text-decoration: none; cursor: pointer;
  }
  .pad-more-item em { font-style: normal; font-size: 12px; color: rgba(240, 224, 192, .55); }
  .pad-more-item:hover, .pad-more-item:focus-visible { background: rgba(240, 210, 148, .14); color: #fff8ea; }
  .pad-more-item:active { background: rgba(240, 210, 148, .2); }

  /* ---------- 吸顶：搜索 / 排序（主导航在顶栏右上角） ---------- */
  .quickbar {
    top: var(--sat, env(safe-area-inset-top, 0px));
    background: rgba(9, 19, 14, .9);
    border-bottom: 1px solid rgba(236, 209, 156, .16);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
  }
  .qb-inner {
    max-width: 1380px; padding: 8px 28px; gap: 12px; row-gap: 8px;
    flex-wrap: wrap; align-items: center;
  }
  .top-right .qb-views.top-nav .qb-view {
    min-height: 44px; padding: 0 20px; font-size: 15px;
  }
  .qb-search {
    flex: 1 1 220px; min-width: 150px; max-width: none;
    height: 48px; padding: 0 16px; gap: 8px; border-radius: 999px;
  }
  .qb-search input { font-size: 16px; }
  .qb-search-ico { font-size: 18px; }
  .qb-search { order: 2; }
  .qb-count { order: 4; flex: 0 0 auto; font-size: 14px; }
  .qb-sort-label {
    display: inline-flex; align-items: center; flex: 0 0 auto;
    min-height: 44px; padding-right: 2px;
    color: rgba(240, 224, 192, .48); font-size: 14px; letter-spacing: .1em;
  }

  /* 诗集：排序独立成行，44px 触控，可横向滑动 */
  .qb-sort {
    order: 5; flex: 1 0 100%; gap: 8px; min-width: 0;
    overflow-x: auto; scrollbar-width: none; padding: 1px;
    align-items: center;
  }
  .qb-sort::-webkit-scrollbar { display: none; }
  .qb-sort .qb-tab {
    min-height: 44px; padding: 0 22px; font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap;
  }
  .qb-sort .qb-tab.on {
    background: rgba(213, 179, 109, .24); border-color: rgba(236, 209, 156, .75);
    color: #ffe8b8; font-weight: 600;
  }
  body.view-home .qb-sort { display: none !important; }
  body.view-home .qb-search { flex: 1 1 auto; max-width: 560px; margin-left: auto; }

  /* 触屏：去掉点按高亮，按下有即时反馈 */
  .qb-view, .qb-tab, .sound, .auth-entry, .auth-logout, .auth-me,
  .pad-more-btn, .lan-qr-btn, .download-link, .qb-clear {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .qb-view:active, .qb-sort .qb-tab:active, .pad-more-btn:active,
  .sound:active, .auth-entry:active { transform: scale(.96); transition: transform .08s ease; }

  /* 键盘 / 触控笔聚焦可见 */
  .qb-view:focus-visible, .qb-sort .qb-tab:focus-visible, .sound:focus-visible,
  .auth-entry:focus-visible, .pad-more-btn:focus-visible, .pad-more-item:focus-visible {
    outline: 2px solid rgba(240, 210, 148, .8); outline-offset: 2px;
  }

  /* 锚点滚动避开吸顶导航 */
  .grade-section, .middle-school, .daily, .featured { scroll-margin-top: 118px; }
  .hub { padding-top: 16px; }
}

/* 横屏平板宽度更充裕：搜索 / 排序并回一行，吸顶更薄 */
@media (min-width: 1024px) and (max-width: 1400px) and (min-height: 640px) {
  .qb-sort { order: 3; flex: 0 1 auto; overflow-x: auto; margin-left: auto; }
  .qb-search { flex: 1 1 260px; max-width: 680px; }
  body.view-home .qb-search { max-width: 560px; }
  .qb-inner { flex-wrap: nowrap; }
}

/* ============================================================
   顶部导航一致性修正（2026-11）
   1) 顶栏吸顶时铺满整宽，宽屏两侧不再露出滚动内容
   2) 第二行（搜索/排序）贴在顶栏下方吸顶，不再被顶栏盖住
   与 /shiji/、/download/ 共用同一套尺寸（见 site-nav.css 同名段）
   ============================================================ */
:root { --topbar-h: 68px; }
@media (min-width: 744px) and (max-width: 1400px) and (min-height: 640px) {
  :root { --topbar-h: 72px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topbar-h: 52px; }
}

/* 宽屏：顶栏背景通栏，内容仍与页面同宽 */
@media (min-width: 1401px) {
  .top {
    max-width: none;
    padding-left: calc((100vw - 1260px) / 2 + 34px);
    padding-right: calc((100vw - 1260px) / 2 + 34px);
  }
}

/* 吸顶顶栏下方的搜索 / 排序条 */
.quickbar { top: calc(var(--sat, env(safe-area-inset-top, 0px)) + var(--topbar-h)); }

/* 顶栏按钮与登录尺寸（PAD）与首页对齐 */
@media (min-width: 744px) and (max-width: 1400px) and (min-height: 640px) {
  .top-right .auth-entry, .top-right .auth-logout, .top-right .auth-me {
    height: 44px; padding: 0 12px; font-size: 15px;
  }
  .top-right .auth-avatar { width: 44px; height: 44px; flex-basis: 44px; }
}

/* 品牌印章不被 flex 压扁（小屏保持正圆） */
.brand .seal { flex: 0 0 auto; }
