* { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 20px; }
body { margin: 0; color: var(--gbam-ink); font-family: var(--gbam-font); line-height: 1.6; }
a { color: var(--gbam-blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select { min-height: 44px; }
button { border: 1px solid var(--gbam-line); border-radius: 10px; padding: 8px 14px; background: #fff; color: var(--gbam-ink); }
:is(a, button, input, select, textarea):focus-visible { outline: 3px solid #497fee; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 16px; padding: 10px 16px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.zone-header { background: #fff; border-bottom: 1px solid var(--gbam-line); }
.zone-header-inner { max-width: 1200px; min-height: 80px; margin: auto; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 11px; align-items: center; min-width: 0; color: var(--gbam-ink); font-size: 20px; font-weight: 780; line-height: 1.2; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; color: var(--gbam-blue); flex: none; }
.brand small { display: block; margin-top: 5px; color: var(--gbam-muted); font-size: 11px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.sources-link { display: flex; min-height: 44px; align-items: center; color: var(--gbam-muted); font-size: 13px; text-decoration: none; }
.language-control select { width: 142px; max-width: 100%; border: 1px solid var(--gbam-line); border-radius: 10px; color: var(--gbam-ink); background: #fff; padding: 8px 10px; font-size: 13px; }
.zone-main { max-width: 1136px; margin: 0 auto; padding: 36px 24px 56px; }
.zone-identity { display: flex; justify-content: space-between; align-items: center; gap: 30px; min-height: 168px; margin-bottom: 30px; }
.identity-copy { min-width: 0; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--gbam-blue); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.eyebrow > span:first-child { border: 1px solid #cbdcf6; border-radius: 5px; background: #eaf1fc; padding: 0 6px; font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: 0; }
h1 { font-size: clamp(27px, 3.5vw, 39px); letter-spacing: -.03em; line-height: 1.25; margin: 0; font-weight: 780; overflow-wrap: anywhere; }
.zone-subtitle { margin: 4px 0 0; font-size: 17px; color: #506584; letter-spacing: .01em; }
.tagline { margin: 13px 0 0; color: var(--gbam-muted); font-size: 13px; }
.zone-rail-art { width: 330px; height: 154px; flex: none; overflow: hidden; }
.art-faint { stroke: #e1e8f1; stroke-width: 4; }
.art-main { stroke: #2865c6; stroke-width: 5; }
.art-secondary { stroke: #65a8a0; stroke-width: 4; }
.art-stops { fill: #fff; stroke: #527399; stroke-width: 3; }
.art-train { fill: #eaf1fc; stroke: #2865c6; stroke-width: 2.5; }
.art-track { stroke: #2865c6; stroke-width: 2.5; stroke-linecap: round; }
.art-window { fill: #fff; stroke: #2865c6; stroke-width: 2; }
.art-light { fill: #2865c6; }
.zone-tabs { display: flex; gap: 8px; padding: 6px; margin-bottom: 24px; border: 1px solid var(--gbam-line); border-radius: 14px; background: #edf1f7; }
.zone-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 12px; color: #52617a; text-decoration: none; border-radius: 9px; font-size: 14px; font-weight: 680; text-align: center; }
.zone-tabs a[aria-current="page"] { background: #fff; color: var(--gbam-blue); box-shadow: 0 1px 3px #142d4d12; }
.zone-tabs a:hover { background: #ffffffa6; color: var(--gbam-blue); }
.zone-workspace { padding: 28px; border: 1px solid var(--gbam-line); border-radius: 18px; background: #fff; }
.view-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-kicker { margin: 0 0 5px; color: #6a7c94; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; font-weight: 650; }
h2 { margin: 0; font-size: 24px; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
#view-heading:focus, #zone-view:focus { outline: none; }
.back-link { display: inline-flex; flex: none; min-height: 44px; align-items: center; font-size: 13px; text-decoration: none; }
.demo-notice { margin: -7px 0 22px; padding: 10px 13px; border-left: 3px solid #e2b65d; border-radius: 0 7px 7px 0; background: #fff9eb; color: #735723; font-size: 13px; }
.zone-controls { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(125px, 1fr) minmax(125px, 1fr); align-items: end; gap: 12px; }
.zone-controls.forum-controls { grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr); }
.zone-controls label { display: grid; gap: 7px; min-width: 0; font-size: 12px; font-weight: 650; }
.zone-controls :is(input, select) { width: 100%; min-width: 0; border: 1px solid #d6dfe9; border-radius: 9px; color: var(--gbam-ink); background: #fff; padding: 10px 12px; font-size: 14px; font-weight: 400; }
.zone-controls input { padding-left: 39px; }
.zone-controls input::placeholder { color: #8390a2; }
.search-box { display: flex; position: relative; }
.search-box svg { width: 18px; height: 18px; position: absolute; left: 13px; top: 14px; stroke: #7b8aa0; stroke-width: 1.8; pointer-events: none; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; margin: 8px 0 10px; }
#results-status { margin: 0; color: var(--gbam-muted); font-size: 12px; }
#clear-filters { border: 0; padding: 6px 0 6px 12px; background: transparent; color: var(--gbam-blue); font-size: 12px; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.resource-card { display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 20px; border: 1px solid var(--gbam-line); border-radius: 12px; background: #fff; color: var(--gbam-ink); text-decoration: none; }
.resource-card:hover, .topic-card:hover { border-color: #8eafd9; background: #f9fbff; }
.resource-card.guide-card { background: #f3f7fd; border-color: #dce6f4; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.kind-label, .board-label, .sample-label { display: inline-flex; align-items: center; border-radius: 5px; background: #edf3fc; color: #356397; padding: 2px 7px; font-size: 10px; font-weight: 700; letter-spacing: .025em; }
.guide-card .kind-label { background: #e2ebfa; }
.place-card .kind-label { background: #eaf5f1; color: #287369; }
.ride-card .kind-label { background: #f3eefb; color: #72539a; }
.resource-card h3, .topic-card h3 { font-size: 17px; line-height: 1.5; margin: 0 0 8px; letter-spacing: -.01em; }
.chinese-assistance { display: block; margin-top: 4px; color: var(--gbam-muted); font-size: 12px; line-height: 1.5; font-weight: 450; letter-spacing: 0; }
.resource-card p, .topic-card p { margin: 0; color: #5c6c83; font-size: 13px; line-height: 1.7; }
.resource-card .card-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; padding-top: 18px; }
.tag-line { color: #77869a; font-size: 10px; }
.card-arrow { flex: none; font-size: 21px; color: #3767a3; line-height: 1; }
.topic-list { display: grid; gap: 11px; }
.topic-card { display: block; padding: 20px; border: 1px solid var(--gbam-line); border-radius: 12px; color: var(--gbam-ink); text-decoration: none; }
.topic-card .card-meta { margin-bottom: 9px; }
.sample-label { color: #7a6b50; background: #f7f3ea; font-weight: 500; }
.topic-card h3 { display: flex; justify-content: space-between; gap: 15px; }
.empty-state { padding: 42px 20px; text-align: center; border: 1px dashed #d7e0ec; border-radius: 12px; background: #fafcff; }
.empty-state h3 { font-size: 17px; margin: 0 0 7px; }
.empty-state p { margin: 0 0 15px; color: var(--gbam-muted); font-size: 13px; }
.detail-article { max-width: 800px; }
.detail-summary { margin: 18px 0 20px; color: #4d6482; font-size: 17px; line-height: 1.8; }
.detail-article > p { color: #3f526b; line-height: 1.9; font-size: 14px; }
.detail-group { margin-top: 26px; padding-top: 23px; border-top: 1px solid #e8edf3; }
.detail-group h3, .template-panel h3 { margin: 0 0 10px; font-size: 16px; }
.detail-group ul { margin: 0; padding-left: 20px; color: #4d607a; font-size: 14px; line-height: 1.9; }
.detail-group li + li { margin-top: 8px; }
.restriction-group { padding: 17px 20px; border: 1px solid #eadfc9; border-radius: 10px; background: #fffaf1; }
.restriction-group h3 { color: #806333; }
.source-list { display: grid; gap: 11px; list-style: none; padding: 0 !important; }
.source-list a { font-size: 13px; }
.source-list small { display: block; color: var(--gbam-muted); font-size: 11px; }
.sample-body { padding: 20px; border: 1px solid var(--gbam-line); border-radius: 12px; }
.sample-body p { color: #415671; font-size: 14px; line-height: 1.9; }
.sample-body p:last-child { margin-bottom: 0; }
.sample-reply { margin-top: 12px; padding: 17px 20px; border-left: 3px solid #dce6f4; border-radius: 0 10px 10px 0; background: #f6f8fc; }
.sample-reply h3 { margin: 0 0 8px; color: #5d718b; font-size: 12px; font-weight: 650; }
.sample-reply p { margin: 0; color: #52647c; font-size: 13px; line-height: 1.8; }
.template-panel { margin-top: 26px; padding: 22px; border: 1px solid #dbe5f3; border-radius: 12px; background: #f5f8fd; }
.template-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.template-panel h3 { margin: 0; }
.template-panel > p { margin: 0 0 13px; color: #667994; font-size: 12px; }
#copy-template { display: flex; align-items: center; gap: 7px; flex: none; border-color: #c8d9ef; color: #215fb0; font-size: 12px; background: #fff; }
#copy-template svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.7; }
#ride-template { display: block; resize: vertical; width: 100%; min-height: 220px; border: 1px solid #d8e1ee; border-radius: 8px; padding: 14px; color: #49607d; background: #fff; line-height: 1.8; font-size: 13px; }
#copy-status { min-height: 20px; margin: 9px 0 0; color: #346c5a; font-size: 12px; }
.zone-footer { max-width: 1136px; margin: auto; padding: 0 24px 30px; display: flex; justify-content: space-between; gap: 16px; color: #7e8b9e; font-size: 11px; }
.zone-footer > span { font-family: ui-monospace, monospace; letter-spacing: .05em; }
.zone-footer > span > span { margin: 0 6px; color: #b6c1cf; }
.zone-footer a { color: #667c99; }
.noscript-note { margin: 20px; }
@media (min-width: 1400px) { .zone-main { padding-top: 45px; } }
@media (max-width: 767px) {
  .zone-header-inner { padding: 12px 20px; min-height: 74px; gap: 12px; }
  .brand { gap: 9px; font-size: 18px; }
  .brand-mark { width: 35px; height: 35px; }
  .header-actions { gap: 10px; }
  .header-actions .sources-link { display: none; }
  .language-control select { width: 125px; font-size: 12px; }
  .zone-main { padding: 25px 16px 36px; }
  .zone-identity { min-height: 145px; gap: 10px; margin-bottom: 23px; position: relative; }
  .identity-copy { position: relative; z-index: 1; max-width: 100%; }
  .zone-rail-art { width: 155px; height: 95px; position: absolute; right: -2px; top: 4px; opacity: .16; }
  h1 { font-size: 29px; max-width: 95%; }
  .zone-subtitle { font-size: 15px; }
  .tagline { font-size: 12px; margin-top: 12px; }
  .eyebrow { font-size: 10px; }
  .zone-tabs { gap: 3px; padding: 4px; margin-bottom: 18px; border-radius: 12px; }
  .zone-tabs a { padding: 9px 7px; font-size: 12px; }
  .zone-workspace { padding: 20px 16px; border-radius: 14px; }
  .view-heading { gap: 10px; margin-bottom: 19px; }
  h2 { font-size: 21px; }
  .section-kicker { font-size: 9px; }
  .back-link { font-size: 11px; }
  .zone-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .search-control { grid-column: 1 / -1; }
  .zone-controls.forum-controls { grid-template-columns: minmax(0, 1fr); }
  .zone-controls :is(input, select) { font-size: 14px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .resource-card { min-height: 185px; padding: 18px; }
  .resource-card h3, .topic-card h3 { font-size: 16px; }
  .resource-card .card-foot { padding-top: 15px; }
  .topic-card { padding: 17px; }
  .demo-notice { font-size: 12px; line-height: 1.8; padding: 9px 11px; }
  .detail-summary { font-size: 15px; }
  .detail-article > p, .detail-group ul { font-size: 13px; }
  .template-panel { padding: 17px; }
  .template-heading { align-items: flex-start; gap: 10px; }
  .template-panel h3 { font-size: 14px; }
  #copy-template { padding: 7px 10px; font-size: 11px; }
  #ride-template { font-size: 12px; padding: 12px; }
  .zone-footer { padding: 0 20px 25px; }
}
@media (max-width: 350px) {
  .zone-header-inner { padding-inline: 14px; }
  .brand small { font-size: 10px; }
  .language-control select { width: 115px; }
  .zone-main { padding-inline: 10px; }
  .zone-workspace { padding-inline: 13px; }
  h1 { font-size: 26px; }
  .zone-tabs a { font-size: 11px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .resource-card, .topic-card { transition: border-color 140ms ease, background-color 140ms ease; }
}
