:root {
  --paper: #f4efe4;
  --paper-deep: #e8e0cf;
  --card: #fffdf8;
  --ink: #1c1712;
  --muted: #5e564c;
  --line: #ddd3c2;
  --stamp: #c2410c;
  --stamp-dark: #9a3412;
  --pine: #1d5c40;
  --pine-soft: #e6f3ec;
  --navy: #1e3a4c;
  --warn: #7c2d12;
  --warn-bg: #fff4e8;
  --shadow: 0 1px 0 rgba(28, 23, 18, 0.04), 0 16px 40px rgba(28, 23, 18, 0.06);
  --header: 4rem;
  --measure: 68ch;
  color-scheme: light;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, #fff8ea 0, transparent 42%),
    var(--paper);
  color: var(--ink);
  font: 1.05rem/1.6 "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

html[lang="zh-Hans"] body,
html[lang="zh-Hans"] button,
html[lang="zh-Hans"] input,
html[lang="zh-Hans"] select,
html[lang="zh-Hans"] textarea,
html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3,
html[lang="zh-Hans"] .wordmark,
html[lang="zh-Hans"] .result-value {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  letter-spacing: 0;
}
html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3 { line-height: 1.3; }
html[lang="ms"] body { line-height: 1.65; }

img, svg, canvas { max-width: 100%; }

a { color: var(--stamp-dark); }
a:hover { color: var(--ink); }

h1, h2, h3, .wordmark, .result-value {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); margin: 0.15rem 0 0.45rem; }
h2 { font-size: 1.65rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.4rem; }

p { margin: 0.7rem 0; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 5;
}
.skip:focus { top: 0.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  position: relative;
  height: var(--header);
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
}

.brand {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.wordmark {
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.primary-nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.05rem;
  min-width: 0;
}
.nav-item { position: relative; }
.nav-link,
.nav-trigger,
.lang-trigger,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.2;
  font-family: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.nav-link {
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover,
.nav-trigger:hover,
.lang-trigger:hover,
.nav-toggle:hover,
.nav-link[aria-current="page"],
.nav-trigger[aria-expanded="true"],
.lang-trigger[aria-expanded="true"],
.nav-toggle[aria-expanded="true"] {
  background: #fff;
  border-color: var(--line);
}
.nav-trigger { position: relative; }
.nav-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.85rem;
}
.nav-trigger[aria-expanded="true"] .icon-chevron { transform: rotate(180deg); }
.icon-globe, .icon-chevron { width: 1.05rem; height: 1.05rem; flex: none; }
.icon-chevron { transition: transform 0.15s ease; }
.nav-toggle { display: none; }
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.lang-menu { position: relative; }
.nav-pop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15.5rem;
  padding-top: 0.4rem;
  z-index: 45;
}
.nav-item:nth-last-child(2) .nav-pop:not(.nav-mega) {
  left: auto;
  right: 0;
}
.nav-mega {
  position: fixed;
  top: var(--header);
  left: 50%;
  transform: translateX(-50%);
  width: min(54rem, calc(100% - 2rem));
  min-width: 0;
  padding-top: 0.35rem;
}
.nav-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(28, 23, 18, 0.12);
  padding: 0.4rem;
}
.nav-card ul { list-style: none; margin: 0; padding: 0; }
.nav-card li a,
.mega-col li a {
  display: block;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: "Segoe UI", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}
.nav-card li a:hover,
.nav-card li a[aria-current="page"],
.mega-col li a:hover,
.mega-col li a[aria-current="page"] { background: #f6f1e8; color: var(--stamp-dark); }
.mega-card { padding: 0.95rem 1.05rem 0.75rem; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.2rem;
}
.mega-col h2 {
  font-family: "Segoe UI", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
  font-weight: 750;
}
.mega-col h2 a { color: var(--muted); text-decoration: none; }
.mega-col h2 a:hover { color: var(--stamp-dark); }
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.mega-foot {
  margin: 0.8rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}
.mega-foot a { font-weight: 750; color: var(--stamp-dark); text-decoration: none; }

.lang-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 12.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(28, 23, 18, 0.12);
  padding: 0.35rem;
  z-index: 41;
  display: grid;
}
.lang-panel a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-family: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.lang-panel a:hover,
.lang-panel a[aria-current="page"] { background: #f6f1e8; }
.lang-panel a[aria-current="page"]::after { content: "✓"; margin-left: auto; color: var(--pine); }

.mobile-panel {
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: #fffdf8;
  overflow: auto;
  padding: 0.2rem 1rem 2rem;
}
.mobile-panel details { border-bottom: 1px solid var(--line); }
.mobile-panel summary {
  cursor: pointer;
  font-weight: 750;
  padding: 0.8rem 0.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-panel summary::-webkit-details-marker { display: none; }
.mobile-panel summary::after { content: "+"; color: var(--muted); font-weight: 500; font-size: 1.2rem; }
.mobile-panel details[open] summary::after { content: "–"; }
.mobile-panel ul { list-style: none; margin: 0 0 0.55rem; padding: 0 0 0.35rem 0.15rem; }
.mobile-panel li a {
  display: block;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}
.mobile-panel li a:hover,
.mobile-panel li a[aria-current="page"] { background: #f6f1e8; color: var(--stamp-dark); }
.mobile-direct {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-group { margin: 0.15rem 0 0.7rem; }
.mobile-label {
  display: inline-block;
  margin: 0.15rem 0 0.15rem 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--muted);
  text-decoration: none;
}
.mobile-label:hover { color: var(--stamp-dark); }
body.nav-open { overflow: hidden; }

.page-frame {
  width: min(1200px, calc(100% - 2rem));
  margin: 1.15rem auto 3rem;
}
.shell {
  width: auto;
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}
.page-frame:not(.is-hub) .shell > * {
  width: min(46rem, 100%);
  justify-self: center;
}
.page-frame:not(.is-hub) .more-tools {
  width: min(52rem, 100%);
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0.15rem 0 0;
}
.subnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.subnav a:hover,
.subnav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22rem;
}
.cat-section { margin-top: 0.35rem; }
.cat-section > h3 {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "Segoe UI", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
}

.lede { color: var(--muted); font-size: 1.12rem; max-width: var(--measure); }
.crumbs { margin: 0 0 0.85rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.2rem 0.45rem; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.92rem; }
.crumbs li { display: inline-flex; align-items: center; gap: 0.45rem; }
.crumbs li:not(:last-child)::after { content: "/"; color: #b7ad9e; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--stamp-dark); }

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.tool-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.chip {
  display: inline-block;
  border: 1.5px dashed var(--stamp);
  color: var(--stamp-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
}

label, .field { display: grid; gap: 0.25rem; font-size: 0.92rem; font-weight: 650; }
.field span, label span { font-weight: 650; }

input, select, textarea, button {
  font: inherit;
  color: inherit;
}

input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #cbbfaa;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  min-height: 2.75rem;
  font-weight: 450;
}

textarea { min-height: 7rem; resize: vertical; }

input[type="checkbox"] {
  width: 1.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  padding: 0;
  accent-color: var(--stamp-dark);
}
label.field {
  display: flex;
  align-items: flex-start;
}
label.field > span {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 550;
  line-height: 1.4;
}

.grid-2, .grid-3, .row-actions {
  display: grid;
  gap: 0.75rem;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #f6f1e6;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}
button.secondary, .button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: #cbbfaa;
}
button.ghost {
  background: transparent;
  color: var(--stamp-dark);
  border-color: transparent;
  padding-inline: 0.4rem;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }

.course-row, .subject-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.result {
  margin-top: 0.9rem;
  background: var(--pine-soft);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.result-value { font-size: clamp(2rem, 6vw, 3rem); margin: 0.1rem 0; }
.stat-list, .money-list { list-style: none; padding: 0; margin: 0.4rem 0; }
.stat-list li, .money-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(29, 92, 64, 0.12);
}
.muted { color: var(--muted); font-weight: 450; }
.fine { font-size: 0.88rem; color: var(--muted); }

.verify, .disclaimer {
  background: var(--warn-bg);
  border-left: 4px solid var(--stamp);
  padding: 0.7rem 0.85rem;
  border-radius: 0 10px 10px 0;
  margin: 0.8rem 0;
}

.prose { max-width: 78ch; }
.prose table, .tool table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td, .tool th, .tool td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th, .tool th { font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0;
}
.faq summary { cursor: pointer; font-weight: 750; }
.faq summary:focus-visible { outline-offset: 4px; }

.cards {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.card:hover { border-color: var(--stamp); }
.card h2, .card h3 { margin: 0.35rem 0; }
.mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #f6f1e6;
  font-family: Georgia, serif;
  font-weight: 700;
}

.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.85rem 0 0.45rem; }
.filters button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  border-radius: 999px;
  min-height: 2.25rem;
  padding: 0.25rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 650;
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fffdf8; }

.search {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.8rem;
}

.ad-slot {
  background: #f7f3ea;
  border: 1px solid #e6dccb;
  border-radius: 12px;
  min-height: 250px;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  overflow: hidden;
}
.ad-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a89880;
  font-family: "Segoe UI", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
}
.ad-leaderboard { min-height: 90px; }
.ad-rail {
  display: none;
  width: 160px;
  min-height: 600px;
  height: 600px;
}

.site-footer {
  background: #fffdf8;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding: 2.1rem 1.15rem 2.6rem;
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--stamp-dark); }
.footer-grid {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  gap: 1.2rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0.35rem 0 0; }
.site-footer li { margin: 0.22rem 0; }
.legal-note { color: var(--muted); font-size: 0.9rem; }

.block-wrap { overflow: auto; max-width: 100%; }
.block-grid {
  border-collapse: separate;
  border-spacing: 2px;
  margin: 0 auto;
}
.block-grid td {
  width: 28px;
  height: 28px;
  min-width: 28px;
  text-align: center;
  font-size: 0.68rem;
  background: #efe6d4;
  color: transparent;
  border-radius: 3px;
}
.block-grid td.on {
  background: var(--pine);
  color: #f4fff8;
}
.block-grid td.origin { outline: 2px solid var(--stamp); }

.keys {
  display: grid;
  gap: 0.35rem;
  user-select: none;
}
.key-row { display: flex; gap: 0.3rem; justify-content: center; flex-wrap: wrap; }
.key {
  min-width: 2.4rem;
  min-height: 2.6rem;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  border: 1px solid #cbbfaa;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}
.key.wide { min-width: 4.2rem; }
.key.space { min-width: 9rem; flex: 1; }
.key.is-down {
  background: var(--stamp);
  color: white;
  border-color: var(--stamp-dark);
}

.bingo-sheet {
  display: grid;
  gap: 1rem;
}
.bingo-card {
  border: 2px solid var(--ink);
  background: white;
  padding: 0.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
}
.bingo-card h3 { text-align: center; margin: 0.2rem 0 0.4rem; font-size: 1rem; }
.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}
.bingo-grid.cols-9 { grid-template-columns: repeat(9, 1fr); }
.bingo-grid.cols-9 .bingo-cell { aspect-ratio: 3 / 4; font-size: 0.85rem; }
.bingo-cell.blank { border-color: transparent; background: transparent; }
.bingo-cell {
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.15rem;
  font-size: 0.78rem;
  overflow: hidden;
  word-break: break-word;
}
.bingo-cell img { width: 100%; height: 100%; object-fit: cover; }
.jawi-preview {
  min-height: 8rem;
  font-size: 2.4rem;
  line-height: 1.5;
  direction: rtl;
  text-align: center;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--line);
}

:focus-visible {
  outline: 3px solid var(--stamp);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .course-row { grid-template-columns: 1.4fr 0.6fr 0.8fr auto; align-items: end; }
  .course-row:has(.course-mark:not([hidden])) { grid-template-columns: 1.15fr 0.45fr 0.7fr 0.7fr auto; }
  .subject-row { grid-template-columns: 1.4fr 0.8fr auto; align-items: end; }
  .stpm-row { grid-template-columns: 1.1fr 0.7fr auto auto auto; align-items: end; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .tool { padding: 1.25rem 1.3rem; }
}

@media (min-width: 1024px) {
  .is-hub .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1360px) {
  .header-inner,
  .page-frame {
    width: min(1560px, calc(100% - 2rem));
  }
  .page-frame {
    display: grid;
    /* Named areas keep .shell centred when a filter removes either rail. */
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    grid-template-areas: "left main right";
    column-gap: 1.25rem;
    align-items: start;
  }
  .page-frame > .shell { grid-area: main; min-width: 0; }
  .ad-rail-left { grid-area: left; }
  .ad-rail-right { grid-area: right; }
  .ad-rail {
    display: block;
    position: sticky;
    top: calc(var(--header) + 0.75rem);
    justify-self: center;
    max-width: 100%;
  }
}

@media (min-width: 1800px) {
  .header-inner,
  .page-frame { width: min(1860px, calc(100% - 2rem)); }
  .page-frame {
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    grid-template-areas: "left main right";
  }
  .page-frame > .shell { grid-area: main; min-width: 0; }
  .ad-rail-left { grid-area: left; }
  .ad-rail-right { grid-area: right; }
  .ad-rail { width: 300px; }
}

@media (max-width: 1023px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; padding-inline: 0.5rem; }
  .lang-current { max-width: 6.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-inner { width: min(1200px, calc(100% - 1.2rem)); }
  .page-frame { width: min(1200px, calc(100% - 1.4rem)); }
}

@media (max-width: 719px) {
  :root { --header: 3.75rem; }
  .wordmark { font-size: 1rem; }
  .lang-trigger { padding-inline: 0.4rem; }
  .ad-leaderboard { min-height: 100px; }
  .ad-between,
  .ad-incontent,
  .ad-before-faq { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .icon-chevron { transition: none; }
}

.drop {
  border: 1.5px dashed #cbbfaa;
  border-radius: 14px;
  padding: 0.85rem;
  background: #fff;
}
.file-list { list-style: none; padding: 0; margin: 0.55rem 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.metro-face {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0.7rem auto;
  border-radius: 50%;
  border: 3px solid var(--ink);
  display: grid;
  place-items: center;
  background: #fff;
}
#metro-lamp {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #efe6d4;
}
#metro-lamp.is-on { background: var(--stamp); }
.wheel-wrap { display: grid; justify-items: center; gap: 0.35rem; }
.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid var(--stamp-dark);
}
.wheel-canvas {
  width: min(100%, 440px);
  height: auto;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 50%;
}
.fancy-list { display: grid; gap: 0.55rem; }
.fancy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}
.fancy-row p { margin: 0; overflow-wrap: anywhere; font-size: 1.2rem; line-height: 1.45; }
.fancy-row .style-name {
  display: block;
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.qr-box { display: grid; justify-items: center; gap: 0.65rem; }
#qr-canvas {
  width: min(100%, 280px);
  height: auto;
  background: #fff;
  border-radius: 12px;
  aspect-ratio: 1;
}
.table-wrap { overflow: auto; max-width: 100%; max-height: 28rem; }
.pair-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.8rem; }
.compare-list { display: grid; gap: 0.8rem; margin-top: 0.8rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.compare figure { margin: 0; }
.compare img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.compare figcaption { font-size: 0.82rem; color: var(--muted); }
@media (max-width: 560px) {
  .compare { grid-template-columns: 1fr; }
  .compare img { height: 180px; }
}

@media print {
  .site-header, .site-footer, .prose, .faq, .more-tools, .ad-slot,
  .page-intro, .skip, .no-print, .nav-toggle, .mobile-panel, .nav-pop, .lang-panel { display: none !important; }
  body { background: white; }
  .page-frame { display: block; width: 100%; grid-template-columns: none; }
  .shell { width: 100%; margin: 0; display: block; }
  .tool { box-shadow: none; border: 0; padding: 0; }
  .bingo-sheet { grid-template-columns: 1fr 1fr; }
}
