/* ==========================================================================
   Bangumi漫画 — 漫画周历 / 亮色编辑
   冷白 #F4F5F2 · 墨黑 #141414 · 信号蓝 #1F45FF · 柑橘黄 #E7FF4F · 雾灰 #D9DDD7
   ========================================================================== */

:root {
  --paper: #F4F5F2;
  --ink: #141414;
  --blue: #1F45FF;
  --citrus: #E7FF4F;
  --fog: #D9DDD7;
  --sans: "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --wrap: 1280px;
  --pad: clamp(20px, 4vw, 48px);
  --rail-gap: clamp(14px, 1.8vw, 22px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--citrus);
  color: var(--ink);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  z-index: 120;
  top: -70px;
  left: 16px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--citrus);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--fog);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav a:hover {
  background: var(--fog);
}

.nav .nav-dl {
  margin-left: 10px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
}

.nav .nav-dl:hover {
  background: var(--ink);
  color: #fff;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  place-content: center;
}

.menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2.5px auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .menu-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .menu-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 6vw, 84px) clamp(48px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.hero-copy {
  padding-top: clamp(4px, 1.4vw, 18px);
}

.hero-title {
  font-weight: 900;
}

.hero-brandline {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.hero-headline {
  display: block;
  font-size: clamp(46px, 6.2vw, 92px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.hero-lede {
  max-width: 33em;
  margin-top: clamp(20px, 2.4vw, 30px);
  color: rgba(20, 20, 20, 0.76);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--ink);
  background: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: rgba(20, 20, 20, 0.6);
  font-size: 12.5px;
}

.hero-note::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--citrus);
  box-shadow: 0 0 0 1px var(--ink);
}

/* ---------- Week panel ---------- */

.week-panel {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(20, 20, 20, 0.08);
}

.week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.week-issue b {
  color: var(--citrus);
  font-weight: 700;
}

.week-issue::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--citrus);
  vertical-align: 1px;
}

.week-range {
  color: var(--fog);
}

.week-list {
  display: block;
}

.week-row {
  display: grid;
  grid-template-columns: 44px 34px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
  min-height: 59px;
  padding: 8px 16px;
  border-top: 1px solid var(--fog);
}

.week-row:first-child {
  border-top: 0;
}

.week-day {
  color: rgba(20, 20, 20, 0.56);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.week-date {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.week-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.week-thumb {
  flex: none;
  width: 34px;
  height: 45px;
  border: 1px solid var(--fog);
  border-radius: 2px;
  object-fit: cover;
}

.week-thumb-empty {
  border: 0;
  background: transparent;
}

.week-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.week-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-time {
  color: rgba(20, 20, 20, 0.56);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.week-state,
.week-today {
  justify-self: end;
  padding: 2px 5px;
  border: 1px solid rgba(20, 20, 20, 0.2);
  border-radius: 2px;
  color: rgba(20, 20, 20, 0.64);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  white-space: nowrap;
}

.week-today {
  display: none;
}

.week-row.is-feature {
  background: #eef1ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.week-row.is-feature .week-date,
.week-row.is-feature .week-time {
  color: var(--blue);
}

.week-row.is-today {
  background: var(--citrus);
  box-shadow: inset 3px 0 0 var(--ink);
}

.week-row.is-today .week-day,
.week-row.is-today .week-time,
.week-row.is-today .week-date {
  color: var(--ink);
}

.week-row.is-today .week-state {
  display: none;
}

.week-row.is-today .week-today {
  display: inline-block;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--citrus);
}

.week-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--fog);
  color: rgba(20, 20, 20, 0.56);
  font-size: 11px;
}

.week-foot a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ---------- Shared section furniture ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.section-head h2 {
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.section-head p {
  max-width: 36em;
  color: rgba(20, 20, 20, 0.7);
  font-size: 15px;
  line-height: 1.8;
}

.shelf-head .head-main p {
  margin-top: 14px;
}

/* ---------- Shelf ---------- */

.shelf {
  padding-block: clamp(52px, 7vw, 92px);
  background: var(--ink);
  color: var(--paper);
}

.shelf .section-head h2 {
  color: #fff;
}

.shelf .section-head p {
  color: rgba(217, 221, 215, 0.72);
}

.shelf-note {
  flex: none;
  color: var(--citrus);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid rgba(217, 221, 215, 0.28);
  border-radius: 4px;
}

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 78px;
  padding: 11px 12px;
  border-left: 1px solid rgba(217, 221, 215, 0.2);
}

.date-cell:first-child {
  border-left: 0;
}

.date-cell span {
  color: rgba(217, 221, 215, 0.66);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.date-cell b {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.date-cell::after {
  content: "";
  display: block;
  height: 13px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 13px;
}

.date-cell.is-today {
  background: var(--citrus);
  color: var(--ink);
}

.date-cell.is-today span {
  color: rgba(20, 20, 20, 0.7);
}

.date-cell.is-today::after {
  content: "今天";
}

.rail {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  scrollbar-color: var(--citrus) rgba(217, 221, 215, 0.18);
  scrollbar-width: thin;
}

.rail:focus-visible {
  outline-color: var(--citrus);
  outline-offset: 6px;
}

.rail-track {
  display: flex;
  align-items: flex-start;
  gap: var(--rail-gap);
  padding-bottom: 34px;
}

.comic {
  flex: 0 0 calc((100% - 5 * var(--rail-gap)) / 6);
  min-width: 0;
}

.comic:nth-child(even) {
  margin-top: 26px;
}

.comic-cover {
  overflow: hidden;
  border: 1px solid rgba(217, 221, 215, 0.32);
  border-radius: 4px;
  background: #1c1c1c;
}

.comic-cover img {
  width: 100%;
  height: auto;
}

.comic-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.comic-cat {
  color: var(--citrus);
}

.comic-ep {
  color: rgba(217, 221, 215, 0.62);
  white-space: nowrap;
}

.comic h3 {
  margin-top: 5px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.comic-time {
  margin-top: 3px;
  color: rgba(217, 221, 215, 0.66);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.comic-line {
  margin-top: 7px;
  color: rgba(244, 245, 242, 0.7);
  font-size: 13px;
  line-height: 1.65;
}

.rail-hint {
  display: none;
  margin-top: 6px;
  color: rgba(217, 221, 215, 0.58);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ---------- Screens ---------- */

.screens {
  padding-block: clamp(56px, 8vw, 104px);
}

.screens-head {
  align-items: flex-start;
}

.screens-head h2 {
  flex: none;
}

.screens-head p {
  max-width: 34em;
  padding-top: 6px;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(18px, 2.4vw, 32px);
  padding-bottom: 64px;
}

.screen-card {
  min-width: 0;
}

.screen-card:nth-child(even) {
  margin-top: 48px;
}

.device {
  padding: 8px;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(20, 20, 20, 0.09);
}

.device img {
  width: 100%;
  height: auto;
  border: 1px solid var(--fog);
  border-radius: 9px;
}

.screen-card figcaption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--fog);
}

.screen-card h3 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.screen-card p {
  margin-top: 5px;
  color: rgba(20, 20, 20, 0.68);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Reader ---------- */

.reader {
  padding-block: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--fog);
}

.reader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: start;
}

.reader-copy {
  position: sticky;
  top: 96px;
}

.reader h2 {
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
}

.reader-lede {
  max-width: 30em;
  margin-top: 22px;
  color: rgba(20, 20, 20, 0.74);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
}

.feature-list {
  margin-top: clamp(28px, 3.4vw, 42px);
}

.feature-list li {
  padding: 17px 0;
  border-top: 1px solid rgba(20, 20, 20, 0.22);
}

.feature-list li:last-child {
  border-bottom: 1px solid rgba(20, 20, 20, 0.22);
}

.feature-list h3 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.feature-list p {
  max-width: 30em;
  margin-top: 4px;
  color: rgba(20, 20, 20, 0.7);
  font-size: 14px;
  line-height: 1.75;
}

.reader-visual {
  position: relative;
  z-index: 0;
  isolation: isolate;
  justify-self: end;
  width: min(100%, 410px);
  margin-right: 16px;
}

.reader-frame {
  position: relative;
  z-index: 1;
  padding: 10px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.14);
}

.reader-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 20px -16px -16px 20px;
  border-radius: 4px;
  background: var(--blue);
}

.reader-frame img {
  width: 100%;
  height: auto;
}

.reader-caption {
  margin-top: 18px;
  color: rgba(20, 20, 20, 0.62);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

/* ---------- Download ---------- */

.download {
  padding-block: clamp(52px, 7vw, 96px);
}

.download-panel {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--citrus);
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.09);
}

.download-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 4.6vw, 64px);
  background: var(--blue);
  color: #fff;
}

.download-copy h2 {
  max-width: 10em;
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.dl-title-brand {
  white-space: nowrap;
}

.download-copy p {
  max-width: 26em;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.75;
}

.download-panel:not(:has(.dl-entry:not([hidden]))) {
  grid-template-columns: minmax(0, 1fr);
}

.download-side:not(:has(.dl-entry:not([hidden]))) {
  display: none;
}

.download-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3vw, 40px);
  background: var(--citrus);
}

.download-entries {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

.dl-entry:not([hidden]) {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.dl-entry:not([hidden]):hover {
  background: var(--ink);
  color: #fff;
}

.dl-label {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.dl-note {
  color: rgba(20, 20, 20, 0.64);
  font-size: 12px;
  line-height: 1.6;
}

.dl-entry:not([hidden]):hover .dl-note {
  color: var(--fog);
}

.dl-entry:focus-visible {
  outline-color: var(--ink);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(40px, 5vw, 64px) 28px;
  background: var(--ink);
  color: var(--paper);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.4;
}

.footer-line {
  margin-top: 3px;
  color: rgba(217, 221, 215, 0.68);
  font-size: 13px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  padding-top: 4px;
}

.footer-nav a {
  color: var(--fog);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.footer-nav a:hover {
  color: var(--citrus);
}

.footer-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid rgba(217, 221, 215, 0.22);
  border-bottom: 1px solid rgba(217, 221, 215, 0.22);
}

.footer-days span {
  padding: 11px 0;
  border-left: 1px solid rgba(217, 221, 215, 0.12);
  color: rgba(217, 221, 215, 0.52);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-align: center;
}

.footer-days span:first-child {
  border-left: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: rgba(217, 221, 215, 0.6);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.footer-bottom a {
  color: var(--fog);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom a:hover {
  color: var(--citrus);
}

/* ---------- 404 ---------- */

.error-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.error-main {
  display: flex;
  flex: 1;
  align-items: center;
  padding-block: clamp(48px, 9vw, 116px);
}

.error-wrap {
  max-width: 980px;
  margin-inline: auto;
}

.error-code {
  margin-bottom: 18px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.error-title {
  font-size: clamp(46px, 8vw, 102px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.error-lede {
  max-width: 30em;
  margin-top: 24px;
  color: rgba(20, 20, 20, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.error-wrap .btn {
  margin-top: 30px;
}

.error-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 64px);
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.error-strip span {
  padding: 13px 0;
  border-left: 1px solid var(--fog);
  color: rgba(20, 20, 20, 0.55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: center;
}

.error-strip span:first-child {
  border-left: 0;
}

.error-strip .is-gone {
  background: var(--citrus);
  color: var(--ink);
  font-weight: 700;
}

.error-footer {
  padding-block: 22px;
  border-top: 1px solid var(--fog);
}

.error-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(20, 20, 20, 0.6);
  font-size: 12px;
}

.error-footer .footer-brand {
  gap: 10px;
  align-items: center;
}

.error-footer .footer-logo {
  width: 30px;
  height: 30px;
}

.error-footer .footer-name {
  font-size: 15px;
}

.error-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .comic {
    flex-basis: clamp(176px, 26vw, 224px);
  }

  .comic:nth-child(even) {
    margin-top: 0;
  }

  .rail-track {
    padding-bottom: 10px;
  }

  .rail-hint {
    display: block;
  }
}

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: 32px;
  }

  .week-row {
    grid-template-columns: 38px 30px minmax(0, 1fr) 48px;
    gap: 8px;
    padding-inline: 12px;
  }

  .week-thumb {
    width: 30px;
    height: 40px;
  }

  .reader-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: 42em;
  }

  .week-panel {
    max-width: 720px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 14px;
  }

  .screens-head p {
    padding-top: 0;
  }

  .shelf-note {
    margin-top: 12px;
  }

  .screen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 0;
  }

  .screen-card:nth-child(even) {
    margin-top: 0;
  }

  .device {
    max-width: 360px;
  }

  .reader-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .reader-copy {
    position: static;
  }

  .reader-visual {
    justify-self: start;
    width: min(100%, 420px);
    margin-right: 0;
    margin-left: 8px;
  }

  .download-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .menu-btn {
    display: grid;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 20px;
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
    box-shadow: 0 22px 30px rgba(20, 20, 20, 0.08);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav a {
    min-height: 52px;
    padding: 0 4px;
    border-bottom: 1px solid var(--fog);
    border-radius: 0;
    font-size: 17px;
  }

  .nav a:hover {
    background: transparent;
    color: var(--blue);
  }

  .nav .nav-dl {
    margin: 14px 0 0;
    min-height: 50px;
    border: 0;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    justify-content: center;
  }

  .nav .nav-dl:hover {
    background: var(--ink);
    color: #fff;
  }
}

@media (max-width: 620px) {
  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 16.5px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-headline {
    font-size: clamp(42px, 12.4vw, 58px);
  }

  .hero-brandline {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .hero-lede {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .btn {
    min-height: 46px;
    padding: 0 18px;
    font-size: 14.5px;
  }

  .hero-note {
    margin-top: 16px;
    font-size: 12px;
  }

  .week-head {
    padding: 11px 12px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .week-row {
    grid-template-columns: 34px 26px minmax(0, 1fr) 42px;
    gap: 7px;
    min-height: 54px;
    padding: 7px 11px;
  }

  .week-day {
    font-size: 9px;
  }

  .week-date {
    font-size: 18px;
  }

  .week-slot {
    gap: 8px;
  }

  .week-thumb {
    width: 28px;
    height: 37px;
  }

  .week-name {
    font-size: 13px;
  }

  .week-time {
    font-size: 9px;
  }

  .week-state,
  .week-today {
    font-size: 8px;
    padding: 1px 4px;
  }

  .week-foot {
    padding: 10px 12px;
    font-size: 10px;
  }

  .date-cell {
    min-height: 68px;
    padding: 8px 7px;
  }

  .date-cell span {
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .date-cell b {
    font-size: 16px;
  }

  .date-strip {
    margin-bottom: 24px;
  }

  .screen-grid {
    gap: 20px;
  }

  .device {
    padding: 5px;
    border-radius: 12px;
  }

  .device img {
    border-radius: 7px;
  }

  .screen-card figcaption {
    margin-top: 11px;
    padding-top: 10px;
  }

  .screen-card h3 {
    font-size: 15px;
  }

  .screen-card p {
    font-size: 12px;
    line-height: 1.65;
  }

  .reader h2 {
    font-size: clamp(36px, 10.4vw, 48px);
  }

  .reader-lede {
    font-size: 15px;
  }

  .feature-list h3 {
    font-size: 17px;
  }

  .feature-list p {
    font-size: 13.5px;
  }

  .reader-visual {
    margin-left: 0;
    width: calc(100% - 14px);
  }

  .reader-frame::before {
    inset: 14px -14px -14px 14px;
  }

  .download-copy {
    padding: 32px 24px;
  }

  .download-copy h2 {
    font-size: clamp(32px, 9.4vw, 44px);
  }

  .download-side {
    padding: 20px;
  }

  .dl-entry:not([hidden]) {
    min-height: 68px;
    padding: 11px 15px;
  }

  .dl-label {
    font-size: 17px;
  }

  .footer-top {
    display: block;
  }

  .footer-nav {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(217, 221, 215, 0.2);
    gap: 10px 22px;
  }

  .footer-days span {
    font-size: 8px;
    letter-spacing: 0.08em;
    padding: 9px 0;
  }

  .footer-bottom {
    display: block;
    line-height: 2;
  }

  .footer-bottom p {
    margin-bottom: 4px;
  }

  .error-main {
    padding-block: 56px;
  }

  .error-title {
    font-size: clamp(42px, 12vw, 56px);
  }

  .error-strip span {
    font-size: 8px;
    padding: 10px 0;
  }
}

@media (max-width: 360px) {
  .week-row {
    grid-template-columns: 30px 24px minmax(0, 1fr) 38px;
    gap: 6px;
    padding-inline: 9px;
  }

  .week-thumb {
    width: 25px;
    height: 33px;
  }

  .week-name {
    font-size: 12.5px;
  }

  .week-time {
    font-size: 8.5px;
  }

  .date-cell {
    padding-inline: 5px;
  }

  .screen-grid {
    gap: 14px;
  }

  .screen-card h3 {
    font-size: 14px;
  }

  .screen-card p {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

#week,
#shelf,
#read,
#download {
  scroll-margin-top: 84px;
}