/* Codex Resets
   Visual thesis: sticker-sheet neo-brutalism. Warm cream paper, thick ink
   outlines, hard offset shadows, one loud orange, pastel sticker cards set
   at slight angles, rounded display type (Baloo 2). The humor is deadpan:
   the layout is a shrine to one man's tweets and the copy plays it straight.
   Signature interaction: buttons physically depress (shadow collapses),
   reset cells bounce on hover, the bell wiggles. */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url("/assets/baloo-bold?v=4") format("woff2");
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: optional;
  src: url("/assets/baloo-extrabold?v=4") format("woff2");
}

:root {
  color-scheme: light;

  --paper: #fff4dd;
  --ink: #26201a;
  --ink-2: #5c5347;
  --ink-3: #877b6b;

  --accent: #ff5c2b;
  --sun: #ffd84d;
  --rose: #ffb9cc;
  --sky: #a5dcff;
  --card: #fffdf7;

  --cg-empty: #f1e3c4;
  --cg-fill: var(--accent);

  --border: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 14px;

  --font-display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --cell-size: 22px;
  --measure: 58ch;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

.page {
  max-width: 1228px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* ---------------------------------------------------------------------- */
/* Masthead                                                                */
/* ---------------------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 34px 0 10px;
  position: relative;
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.masthead-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: var(--border);
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.masthead-brand:hover .masthead-avatar {
  transform: rotate(4deg) scale(1.06);
}

.masthead-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.masthead-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.masthead-visitors {
  margin: 0;
  color: var(--ink-3);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.masthead-visitors span {
  font-variant-numeric: tabular-nums;
}

.masthead-tagline {
  margin: 2px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-2);
}

.masthead-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.masthead-side:empty {
  display: none;
}

.subscription-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.push-control {
  position: relative;
}

.push-control[hidden] {
  display: none;
}

.subscription-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: var(--border);
  border-radius: 999px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.push-toggle {
  background: var(--sun);
}

.push-toggle:hover {
  background: #ffe070;
}

.subscription-action:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.push-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: var(--card);
}

.push-toggle:disabled {
  cursor: wait;
  opacity: 0.6;
}

.push-toggle-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 15%;
}

.push-toggle:hover .push-toggle-icon {
  animation: bell-wiggle 0.5s ease;
}

@keyframes bell-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  55% { transform: rotate(11deg); }
  80% { transform: rotate(-5deg); }
}

.push-toggle[aria-pressed="true"] .push-toggle-icon {
  fill: currentColor;
}

.telegram-link {
  background: var(--card);
  text-decoration: none;
}

.language-toggle {
  background: var(--sky);
}

.language-toggle:hover {
  background: #c4eaff;
}

.telegram-link:focus-visible {
  background: var(--sky);
  color: var(--ink);
}

.telegram-link-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.telegram-link:focus-visible .telegram-link-icon {
  transform: translate(2px, -2px) rotate(-4deg);
}

@media (hover: hover) {
  .telegram-link:hover {
    background: var(--sky);
    color: var(--ink);
  }

  .telegram-link:hover .telegram-link-icon {
    transform: translate(2px, -2px) rotate(-4deg);
  }
}

.push-hint {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 260px;
  white-space: normal;
  color: var(--ink-2);
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
  text-align: right;
  z-index: 2;
}

.push-hint:empty {
  display: none;
}

.demo-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--rose);
  border: var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(2deg);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  padding: 26px 0 0;
}

.hero-explainer {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 17px;
  margin: 0 0 16px;
}

.hero > .subscription-actions {
  margin-bottom: 36px;
}

/* Conditional reset forecast. It is absent from the layout when no watch is active. */
.watch-slot {
  margin: 0 0 30px;
}

.watch-card {
  padding: 20px 22px 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: #ffedb8;
  box-shadow: 6px 6px 0 var(--ink);
}

.watch-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 26px;
}

.watch-eyebrow {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.watch-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 4.5vw, 36px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.watch-percent {
  font-variant-numeric: tabular-nums;
}

.watch-deadline {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.watch-deadline time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
}

.watch-vote {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  font-size: 12px;
  white-space: nowrap;
}

.watch-vote > span {
  margin-right: 6px;
  color: var(--ink-2);
}

.watch-vote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 40px;
  padding: 7px 14px;
  border: var(--border);
  border-radius: 10px;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.watch-vote-button strong {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
}

.watch-vote-button--yes { background: #bce7a7; }
.watch-vote-button--no { background: var(--rose); }
.watch-vote-button:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.watch-vote-button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.watch-vote-button:disabled { cursor: default; opacity: 0.66; }
.watch-vote-button.is-selected { opacity: 1; outline: 3px solid rgba(38, 32, 26, 0.16); outline-offset: -6px; }

.watch-source {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-top: 13px;
  padding: 11px 13px;
  border: var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.watch-source:hover,
.watch-source:focus-visible { color: var(--ink); }
.watch-source img { width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 50%; object-fit: cover; }
.watch-source-meta { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; line-height: 1.25; }
.watch-source-meta strong { font-family: var(--font-display); font-size: 14px; }
.watch-source-meta span { color: var(--ink-2); font-family: var(--font-mono); font-size: 10px; }
.watch-source-body { min-width: 0; }
.watch-source-text { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.watch-vote-button .mono { color: var(--ink-2); font-size: 11px; }
.watch-vote-error { min-height: 0; margin: 8px 0 0; color: #8e2540; font-size: 12px; }
.watch-vote-error:empty { display: none; }

.hero-card {
  background: var(--card);
  background-image: radial-gradient(rgba(38, 32, 26, 0.1) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 26px 30px 30px;
  transform: rotate(-0.4deg);
}

.hero-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.hero-main-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 22px;
}

.hero-main-row .hero-figure {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.thanks-panel {
  flex: none;
  margin-left: auto;
  max-width: 100%;
}

.thanks-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.thanks-emoji { font-size: 18px; line-height: 1; }
.thanks-count { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.thanks-button:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.thanks-button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.thanks-button:disabled { cursor: wait; opacity: 0.78; }
.thanks-status { max-width: 200px; margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }

@media (max-width: 640px) {
  .thanks-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .thanks-button { transition: none; }
}

html[lang="zh-CN"] .hero-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-figure {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--sun);
  padding: 0 16px 4px;
  border-radius: 10px;
  transform: rotate(-1.2deg);
  cursor: default;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop-in {
  from { transform: rotate(-1.2deg) scale(0.85); opacity: 0; }
  to { transform: rotate(-1.2deg) scale(1); opacity: 1; }
}

.hero-figure--muted {
  background: var(--cg-empty);
  font-size: clamp(26px, 5vw, 40px);
}

.hero-sub {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  cursor: default;
}

/* Stat stickers */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 34px 0 0;
  padding: 0;
}

.stat-tile {
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px 16px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-tile--sun { background: var(--sun); transform: rotate(-1deg); }
.stat-tile--rose { background: var(--rose); transform: rotate(0.8deg); }
.stat-tile--sky { background: var(--sky); transform: rotate(-0.6deg); }

.stat-tile:hover {
  transform: rotate(0deg) translateY(-3px);
}

.stat-tile dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
  margin: 0 0 4px;
}

.stat-label-short {
  display: none;
}

.stat-tile dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------- */
/* Section headings                                                        */
/* ---------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.legend-chip {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1.5px solid var(--ink);
  background: var(--cg-empty);
  vertical-align: -1px;
}

.legend-chip--hit {
  background: var(--cg-fill);
}

.graph-section {
  padding: 46px 0 0;
}

.log-section {
  padding: 46px 0 8px;
}

/* ---------------------------------------------------------------------- */
/* Three-month reset calendar                                              */
/* ---------------------------------------------------------------------- */
.month-calendar-shell {
  width: 100%;
  margin: 0;
  padding: 18px;
  overflow: hidden;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.month-calendar-card {
  min-width: 0;
  padding: 4px 18px 8px;
}

.month-calendar-card + .month-calendar-card {
  border-left: 1.5px solid #eadfc8;
}

.month-calendar-card-head {
  min-height: 36px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.month-calendar-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  color: #342aa7;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 800;
  line-height: 1.05;
}

.month-calendar-count {
  flex: none;
  padding: 5px 9px;
  border-radius: 9px;
  background: #e5e1ff;
  color: #342aa7;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.month-weekdays,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.month-weekdays {
  margin-bottom: 5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.month-day {
  min-width: 0;
  min-height: 51px;
  padding: 5px 2px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1.5px solid #eadfc8;
  border-radius: 7px;
  background: #fffaf0;
}

.month-day--outside {
  visibility: hidden;
}

.month-day--reset {
  border-color: #d7c8ad;
  background: var(--card);
}

.month-day--today {
  outline: 2px solid #2f288f;
  outline-offset: 1px;
}

.month-day--future {
  opacity: 0.5;
}

.month-day-number {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.month-reset-list {
  width: 100%;
  min-height: 15px;
  margin-top: auto;
  display: grid;
  gap: 2px;
}

.month-reset-badge {
  position: relative;
  min-width: 0;
  min-height: 14px;
  padding: 2px 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  transition: filter .12s ease, transform .12s ease;
}

.month-reset-badge--regular {
  background: #3b32a8;
}

.month-reset-badge--banked {
  background: #d9d4ff;
  color: #332b91;
}

.month-reset-badge:hover,
.month-reset-badge:focus-visible {
  color: inherit;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.month-reset-multiplier {
  position: absolute;
  top: -6px;
  right: 1px;
  min-width: 12px;
  height: 12px;
  padding: 0 1px;
  display: grid;
  place-items: center;
  border: 1px solid #2f288f;
  border-radius: 6px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* Event log: speech bubbles                                               */
/* ---------------------------------------------------------------------- */
.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.log-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: var(--border);
  box-shadow: 2px 2px 0 var(--ink);
  margin-top: 4px;
}

.log-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 18px 14px;
}

/* Speech-bubble tail pointing at the avatar */
.log-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 18px;
  width: 13px;
  height: 13px;
  background: var(--card);
  border-left: var(--border);
  border-bottom: var(--border);
  transform: rotate(45deg);
}

.log-item-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.log-item-time {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  background: var(--sun);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 1px 10px 2px;
}

.log-item-abs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.log-item-text {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
  max-width: var(--measure);
}

.log-item-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.comment-panel {
  margin-top: 16px;
  border-top: 1.5px solid var(--ink);
  padding-top: 10px;
}

.comment-toggle {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 2px 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-count,
.comment-security,
.comment-item time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
}

.comment-toggle-mark {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  line-height: 1;
}

.comment-content {
  padding-top: 12px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.comment-item {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  padding: 8px 10px;
}

.comment-item p {
  margin: 0 0 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.comment-empty {
  color: var(--ink-2);
  font-size: 14px;
  font-style: italic;
}

.comment-form {
  margin-top: 12px;
}

.comment-form textarea {
  width: 100%;
  display: block;
  resize: vertical;
  min-height: 72px;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  line-height: 1.45;
}

.comment-form-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-form button {
  flex: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--sun);
  color: var(--ink);
  padding: 5px 11px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.comment-form button:disabled {
  cursor: wait;
  box-shadow: none;
  transform: translate(2px, 2px);
}

.comment-form-status {
  min-height: 1.25em;
  margin: 6px 0 0;
  color: #a51b00;
  font-size: 12px;
}

.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;
}

.log-empty {
  color: var(--ink-2);
  font-size: 16.5px;
  font-style: italic;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer {
  margin-top: 52px;
  padding-top: 18px;
  border-top: var(--border);
  font-size: 13px;
  color: var(--ink-2);
}

.site-footer p {
  margin: 0 0 6px;
}

/* ---------------------------------------------------------------------- */
/* Explicitly scheduled reset                                               */
/* ---------------------------------------------------------------------- */
.schedule-slot {
  margin: 0 0 28px;
}

.schedule-slot[hidden] {
  display: none;
}

.schedule-card {
  min-height: 94px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 22px 17px;
  border: var(--border);
  border-radius: 14px;
  box-shadow: 6px 7px 0 var(--ink);
  background: #fff0bb;
}

.schedule-main {
  min-width: 0;
}

.schedule-label {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.schedule-label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schedule-time-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.schedule-time-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 30px);
  line-height: 1;
}

.schedule-time-row time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

.schedule-link {
  flex: none;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
}

.schedule-link:hover,
.schedule-link:focus-visible {
  text-decoration-thickness: 2px;
}

.footer-fresh {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.footer-visitors {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                          */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-figure {
    animation: none;
  }

  .push-toggle:hover .push-toggle-icon {
    animation: none;
  }

  .telegram-link:hover .telegram-link-icon,
  .telegram-link:focus-visible .telegram-link-icon {
    transform: none;
  }

  .stat-tile,
  .month-reset-badge,
  .masthead-avatar,
  .subscription-action {
    transition: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width: 900px) {
  .month-calendar-shell {
    width: 100%;
    margin: 0 auto;
    padding: 14px;
  }

  .month-calendar-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .month-calendar-card {
    padding: 12px 8px 18px;
  }

  .month-calendar-card + .month-calendar-card {
    border-top: 1.5px solid #eadfc8;
    border-left: 0;
  }

  .month-calendar-card-head h3 {
    font-size: 23px;
  }

  .month-calendar-count {
    font-size: 11px;
  }

  .month-day {
    min-height: 61px;
  }

  .month-weekdays {
    font-size: 9px;
  }

  .month-reset-badge {
    font-size: 8px;
  }
}

@media (max-width: 640px) {
  :root {
    --cell-size: 15px;
  }

  .page {
    padding: 0 16px 56px;
  }

  .masthead {
    padding-top: 24px;
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .masthead-avatar {
    width: 40px;
    height: 40px;
  }

  .masthead-side {
    margin-left: auto;
  }

  .push-hint {
    max-width: min(260px, 76vw);
  }

  .hero-explainer {
    margin-bottom: 16px;
  }

  .hero > .subscription-actions {
    margin-bottom: 28px;
  }

  .watch-slot {
    margin-bottom: 26px;
  }

  .schedule-slot {
    margin-bottom: 26px;
  }

  .schedule-card {
    min-height: 0;
    padding: 16px 15px 18px;
    flex-direction: column;
    gap: 12px;
  }

  .schedule-time-row {
    gap: 8px 14px;
  }

  .schedule-link {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  .watch-card {
    padding: 17px 15px 15px;
  }

  .watch-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .watch-vote {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
  }

  .watch-vote > span {
    grid-column: 1 / -1;
    margin: 0;
  }

  .watch-vote-button {
    min-width: 0;
    min-height: 44px;
    width: 100%;
  }

  .watch-source {
    padding: 10px;
  }

  .hero-card {
    padding: 20px 18px 22px;
  }

  .hero-figure {
    padding: 0 10px 3px;
  }

  .section-head {
    flex-direction: column;
    gap: 4px;
  }

  .stat-row {
    gap: 12px;
  }

  .stat-tile {
    padding: 10px 12px 12px;
  }

  .stat-tile dt {
    font-size: 9px;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .stat-label-full {
    display: none;
  }

  .stat-label-short {
    display: inline;
  }

  .stat-tile dd {
    font-size: 22px;
  }

  .month-calendar-shell {
    padding: 8px;
  }

  .month-calendar-card {
    padding: 12px 4px 16px;
  }

  .month-calendar-card-head h3 {
    font-size: 19px;
  }

  .month-day {
    min-height: 55px;
  }

  .month-reset-badge {
    font-size: 8px;
  }

  .log-item {
    gap: 10px;
  }

  .log-avatar {
    width: 36px;
    height: 36px;
  }
}

/* Kept separate from the public tracker so the aaPanel administration views
   remain readable while the public page uses the supplied source styling. */
.admin { background: var(--paper); }
.admin-shell { width: min(880px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 72px; }
.admin-shell h1, .login-card h1 { font-family: var(--font-display); }
.admin-card, .login-card { margin: 18px 0; padding: 22px; border: var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.admin-card h2 { margin-top: 0; }
.admin-card code { font-family: var(--font-mono); font-size: 11px; }
.admin-event { padding: 12px 0; border-top: 1px dashed var(--ink-3); }
.admin-event p { margin: 6px 0; white-space: pre-line; }
.login-card { width: min(420px, calc(100% - 32px)); margin: 14vh auto 0; }
.login-card label { display: grid; gap: 7px; font-weight: 700; }
.login-card input { padding: 11px; border: var(--border); border-radius: 8px; font: inherit; }
.login-card button { margin-top: 16px; padding: 10px 14px; border: var(--border); border-radius: 999px; background: var(--sun); font-family: var(--font-display); font-weight: 700; }
