:root {
  color-scheme: light;
  --ink: #172f31;
  --sub: #49605d;
  --green: #195e53;
  --paper: #f7f5ee;
  --white: #fffcf4;
  --line: #c6cbc0;
  --rust: #963f2d;
  --serif: "Songti SC","STSong","Noto Serif CJK SC",SimSun,serif;
  --sans: "PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); overflow-wrap: anywhere; }
body [hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid #bd5a27; outline-offset: 4px; }
main:focus { outline: none; }
.wrap { width: min(68rem, calc(100% - 2.25rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; left: .8rem; top: .5rem; transform: translateY(-160%); background: var(--ink); color: white; padding: .5rem 1rem; }
.skip-link:focus { transform: none; }
.mast { border-bottom: 1px solid var(--line); }
.mast-row, .mast-id, .mast nav, .foot-inner, .foot nav { display: flex; align-items: center; }
.mast-row { min-height: 4.1rem; justify-content: space-between; gap: .75rem; }
.mast-id { gap: .78rem; }
.brand, .foot-brand { font: 700 1.9rem/1 var(--serif); letter-spacing: .035em; }
.brand, .section-name, .mast nav a, .foot-brand { text-decoration: none; }
.head-rule { width: 1px; height: 1.15rem; background: #9aa99e; }
.section-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.mast nav, .foot nav { gap: clamp(1rem, 3.6vw, 2rem); font-size: .87rem; color: var(--sub); }
.mast nav a, .foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.mast nav a:hover, .section-name:hover { text-decoration: underline; }
.foot { border-top: 1px solid var(--line); }
.foot-inner { justify-content: space-between; gap: .8rem; padding-block: 1.25rem 2rem; }
.foot-brand { font-size: 1.28rem; color: var(--sub); }
.shelf-main { padding-bottom: clamp(2.4rem, 6vw, 5rem); }
.shelf-intro { padding: clamp(1.9rem, 5vw, 3.45rem) 0 clamp(1.35rem, 3vw, 1.9rem); display: grid; gap: .65rem; }
.shelf-intro h1 { font: 650 clamp(2.7rem, 6.5vw, 4.9rem)/1.1 var(--serif); letter-spacing: -.035em; }
.shelf-intro p { color: var(--sub); font-size: clamp(.99rem, 1.45vw, 1.09rem); }
.daily { isolation: isolate; position: relative; background: #163634; color: #fffaf0; overflow: hidden; border-radius: .15rem; }
.daily::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,rgba(9,31,31,.95),rgba(9,31,31,.85) 40%,rgba(9,31,31,.27) 100%),url("/activities/tide-club/coast.webp") center 53%/cover no-repeat; }
.daily-body { padding: clamp(1.55rem,5.3vw,4.4rem); max-width: 44rem; }
.daily-tag { display: flex; align-items: center; gap: .55rem; color: #e4e6c7; font-size: .83rem; font-weight: 600; letter-spacing: .055em; }
.daily h2 { margin: .8rem 0 .56rem; font: 600 clamp(1.85rem,4.6vw,3.3rem)/1.3 var(--serif); text-wrap: balance; }
.daily-question { max-width: 31em; line-height: 1.78; color: #fff7e5; font-size: clamp(.98rem, 1.6vw, 1.12rem); }
.daily-cta { display: inline-flex; align-items: center; gap: .9rem; min-height: 2.8rem; margin-top: 1.4rem; padding: .5rem 1.15rem; background: #fff9e9; color: #173731; text-decoration: none; font-size: .95rem; font-weight: 650; border-radius: .16rem; }
.daily-cta:hover { background: #e8edc9; color: #143b33; }
.library-head { margin-top: clamp(2rem, 5.8vw, 4rem); border-bottom: 2px solid var(--ink); display: flex; align-items: center; justify-content: space-between; padding-bottom: .45rem; gap: .8rem; }
.library-head h2 { font: 650 clamp(1.7rem, 3.5vw, 2.4rem)/1.4 var(--serif); }
.category-nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: center; }
.category-nav a { padding: .58rem .12rem; min-height: 2.75rem; font-size: .9rem; color: var(--green); }
.topic-group { margin-top: 1.55rem; }
.group-title { color: var(--rust); font: 650 .95rem/1.45 var(--sans); margin-bottom: .5rem; }
.card-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: clamp(1.5rem,4.5vw,3.5rem); }
.card-grid li { border-top: 1px solid var(--line); min-width: 0; }
.shelf-card { display: flex; justify-content: space-between; align-items: flex-start; gap: .85rem; text-decoration: none; padding: 1.06rem .1rem 1.25rem; min-height: 6.3rem; }
.shelf-card h3 { font: 600 clamp(1.17rem,2.35vw,1.52rem)/1.5 var(--serif); }
.card-go { color: var(--green); font-size: 1.12rem; padding-top: .1rem; }
.shelf-card p { color: var(--sub); font-size: .93rem; margin-top: .24rem; line-height: 1.7; }
.shelf-card:hover h3 { color: var(--green); text-decoration: underline; text-underline-offset: .24em; }
.history:empty { display: none; }
.history { margin: 2.55rem 0 0; border: 1px solid var(--line); border-left: 3px solid #57746a; padding: clamp(1rem,2.7vw,1.65rem); background: #edf0e5; }
.history h2 { margin-bottom: .35rem; font: 600 1.35rem/1.5 var(--serif); }
.history p, .meet-recent-list { font-size: .94rem; color: var(--sub); }
.meet-recent-list { margin: .5rem 0 .9rem; padding-inline-start: 1.2rem; }
.meet-recent-list a { display: inline-block; padding-block: .36rem; }
.question-main { max-width: 44rem; }
.back-line { font-size: .89rem; color: var(--sub); margin: 1.22rem 0 .92rem; }
.back-line a { text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; gap: .45rem; }
.question-paper { background: #fffdf6; border: 1px solid #c8cdc1; border-top: 4px solid var(--green); border-radius: 0 .15rem .15rem; padding: clamp(1.3rem,5vw,3rem); box-shadow: .23rem .28rem 0 #e5e5d8; }
.rubric { display: flex; align-items: center; gap: .62rem; color: var(--rust); font-size: .84rem; font-weight: 650; }
.rubric-line { height: 1px; width: 1.7rem; background: currentColor; }
.question-intro h1 { margin-top: .7rem; font: 620 clamp(1.95rem,5.6vw,3.15rem)/1.3 var(--serif); text-wrap: balance; }
.scene { font-size: clamp(1.03rem,2.2vw,1.21rem); line-height: 1.85; margin-top: .8rem; color: #304742; }
.meet-panel, .fallback { margin-top: clamp(1.3rem, 4vw, 2rem); border-top: 1px solid var(--line); padding-top: 1.2rem; }
.meet-prompt, .fallback h2 { margin: 0 0 .75rem; font: 600 1.32rem/1.55 var(--serif); }
.meet-panel p { margin-block: .5rem; }
.meet-options { display: grid; gap: .66rem; margin: .7rem 0 1rem; }
.meet-option { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 3.3rem; padding: .65rem .95rem; text-align: start; border: 1px solid #b8c3b9; border-radius: .18rem; background: #f8f8ed; cursor: pointer; }
.meet-option:focus-visible, .meet-option:hover { border-color: var(--green); background: #e8efe3; }
.meet-letter { display: inline-grid; min-width: 1.8rem; min-height: 1.8rem; place-items: center; border: 1px solid #a4b7a5; color: var(--green); font-family: Georgia,serif; }
.meet-label { font-weight: 600; }
.meet-choice[aria-pressed="true"], .meet-option[aria-pressed="true"] { border-color: var(--green); background: #e0ebdc; }
.meet-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .65rem; margin-top: 1rem; }
.meet-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .48rem .9rem; border: 1px solid #97ada0; border-radius: .2rem; background: #fcfbf3; color: #205449; text-decoration: none; font-size: .93rem; cursor: pointer; }
.meet-btn:hover { background: #e7eddf; }
.meet-btn-primary { color: #fffdf2; background: var(--green); border-color: var(--green); font-weight: 600; }
.meet-btn-primary:hover { background: #154a42; color: white; }
.meet-status { color: var(--sub); font-size: .9rem; }
.meet-status:empty { display: none; }
.meet-kicker { color: var(--green); font-size: .83rem; font-weight: 650; }
.meet-result { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap: .75rem; margin: .9rem 0; }
.meet-answer { padding: .9rem 1rem; border: 1px solid #c8cabe; background: #f0f2e8; }
.meet-answer strong { display: block; font: 600 1.2rem/1.5 var(--serif); }
.meet-answer .meet-reason, .meet-panel .meet-hint { font-size: .92rem; color: var(--sub); }
.meet-followup { border-left: 2px solid var(--rust); padding-left: .8rem; }
.meet-share-url, .meet-panel input[readonly], .meet-panel textarea[readonly] { display: block; width: 100%; border: 1px solid #a5b3a7; padding: .55rem; background: #fffdf7; color: var(--ink); }
.fallback ul { margin: .5rem 0; padding-left: 1.35rem; }
.fallback p { color: var(--sub); font-size: .95rem; }
.next-read { margin: 1.6rem 0 2.9rem; display: grid; gap: .8rem; }
.next-issue { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.next-issue span, .all-issues { font-size: .88rem; color: var(--sub); }
.next-issue strong { font: 600 1.15rem/1.5 var(--serif); }
.next-issue b { font-weight: 500; }
.next-issue:hover strong { text-decoration: underline; }
.all-issues { justify-self: start; min-height: 2.75rem; line-height: 2.75rem; }
@media (max-width: 42rem) {
  .card-grid { grid-template-columns: 1fr; }
  .daily::before { background: linear-gradient(90deg,rgba(9,31,31,.94),rgba(9,31,31,.75)),url("/activities/tide-club/coast.webp") center/cover no-repeat; }
  .shelf-card { min-height: auto; padding-block: .85rem 1rem; }
  .back-line { margin-block: .55rem .45rem; }
}
@media (max-width: 24rem) {
  .wrap { width: calc(100% - 1.65rem); }
  .question-paper { padding-inline: 1.05rem; }
  .mast-id { gap: .5rem; }
  .mast nav { gap: .65rem; }
  .next-issue { gap: .55rem; }
}
@media print {
  .mast nav, .foot nav, .skip-link, .next-read, button, .category-nav, .daily-cta { display: none !important; }
  .daily { background: white; color: black; }
  .daily::before { display: none; }
  .daily-tag, .daily-question { color: black; }
  .question-paper { box-shadow: none; }
}
.poster-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .9rem; margin-top: .9rem; }
.poster-link a { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--green); font-weight: 600; font-size: .93rem; }
.poster-link > span { color: var(--sub); font-size: .85rem; }
.meet-recent-list a strong, .meet-recent-list a span { display: block; }
.meet-share-url { margin-top: .8rem; }
.shelf-takeaway { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-top: .85rem; font-size: .92rem; }
.shelf-takeaway a { display: inline-flex; gap: .28rem; align-items: center; color: var(--green); min-height: 2.75rem; font-weight: 650; }
.shelf-takeaway > span, .gallery-help, .gallery-actions > span { color: var(--sub); font-size: .89rem; }
.gallery-main { margin-bottom: 3.8rem; }
.gallery-top { max-width: 44rem; }
.gallery-top h1 { font: 650 clamp(2.3rem,5.7vw,3.9rem)/1.24 var(--serif); }
.gallery-intro { margin-top: .7rem; font-size: 1.05rem; }
.gallery-actions { display: flex; align-items: center; gap: .5rem .8rem; flex-wrap: wrap; margin: 1.1rem 0 .55rem; }
.gallery-top [role="status"] { color: var(--rust); font-size: .92rem; }
.gallery-top .category-nav { margin-top: .85rem; }
.poster-group { margin-top: 1.75rem; }
.poster-group h2 { margin-bottom: .85rem; border-top: 1px solid var(--line); padding-top: .75rem; color: var(--rust); font: 650 1.32rem/1.55 var(--serif); }
.poster-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.45rem 1.65rem; }
.poster-thumb { display: block; }
.poster-thumb img { width: 100%; height: auto; display: block; }
.poster-caption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .1rem .65rem; }
.poster-caption h3 { font: 600 1.12rem/1.5 var(--serif); margin-block: .25rem; }
.poster-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.poster-actions a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .88rem; color: var(--green); }
@media (max-width: 36rem) { .poster-grid { grid-template-columns: 1fr; } }
@page podium { size: A4 portrait; margin: 14mm 12mm; }
@media print {
  .gallery-page { page: podium; background: #fff; }
  .gallery-page .mast, .gallery-page .foot, .gallery-page .gallery-top, .gallery-page .poster-group h2, .gallery-page .poster-caption { display: none !important; }
  .gallery-main, .poster-group, .poster-grid { display: block; width: 100%; margin: 0; padding: 0; }
  .poster-group + .poster-group, .print-card:nth-child(2n+3) { break-before: page; page-break-before: always; }
  .print-card { display: block; break-inside: avoid; page-break-inside: avoid; padding: 4mm 0 8mm; margin: 0; }
  .print-card .poster-thumb { display: block; }
  .print-card img { display: block; width: 100%; height: auto; }
}
