:root {
  --paper: #fff8ea;
  --panel: #fffdf8;
  --ink: #132b31;
  --muted: #66736f;
  --line: #e5d7bf;
  --gold: #f0b84e;
  --teal: #0e5a5e;
  --coral: #e66a53;
  --leaf: #5b8b62;
  --blue: #4f7fc4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

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

.topbar {
  align-items: center;
  background: #10262b;
  color: #fff3cf;
  display: flex;
  justify-content: space-between;
  min-height: 108px;
  padding: 22px 34px;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 26px;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.primary,
.ghost,
.tab,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 0 18px;
}

.primary {
  background: var(--gold);
  color: #10262b;
}

.primary.full {
  width: 100%;
}

.ghost.full {
  justify-content: center;
  width: 100%;
}

.ghost {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff3cf;
  display: inline-flex;
  text-decoration: none;
}

.ghost.light {
  background: #f1e7d5;
  color: var(--ink);
}

.icon-button {
  background: #f1e7d5;
  color: var(--ink);
  font-size: 26px;
  height: 38px;
  padding: 0;
  width: 38px;
}

.toggle {
  align-items: center;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.app {
  display: grid;
  gap: 24px;
  grid-template-columns: 250px 1fr;
  padding: 24px;
}

.content,
.view,
.calendar-panel,
.river-shell {
  min-width: 0;
}

.sidebar {
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(31, 25, 14, 0.08);
  padding: 18px;
  position: sticky;
  top: 20px;
}

.stat {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.stat span {
  color: var(--teal);
  font-size: 30px;
  font-weight: 800;
}

.stat small {
  align-self: center;
  color: var(--muted);
}

.tabs {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.tab {
  background: #f1e7d5;
  color: var(--ink);
  text-align: left;
}

.tab.active {
  background: var(--teal);
  color: #fff;
}

.search {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.content {
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title p {
  color: var(--muted);
  max-width: 520px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.memory-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(31, 25, 14, 0.08);
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 150px;
  overflow: hidden;
}

.memory-card.large {
  grid-template-columns: 320px 1fr;
  max-width: 900px;
  min-height: 260px;
}

.thumb {
  align-items: center;
  background: linear-gradient(135deg, #fde5a3, #f8f0df 58%, #d6e4d8);
  color: rgba(19, 43, 49, 0.62);
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 150px;
  overflow: hidden;
}

.thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: 20px 22px;
}

.meta {
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.memory-text {
  font-size: 22px;
  line-height: 1.55;
}

.random-stage {
  align-items: start;
  display: grid;
  gap: 22px;
  justify-items: stretch;
}

.gacha-panel {
  align-items: center;
  background:
    radial-gradient(circle at 82% 20%, rgba(240, 184, 78, 0.42), transparent 28%),
    linear-gradient(135deg, #10262b 0%, #15363b 48%, #0b1d21 100%);
  border: 1px solid rgba(240, 184, 78, 0.44);
  border-radius: 10px;
  box-shadow:
    0 22px 58px rgba(16, 38, 43, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  color: #fff3cf;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 340px);
  max-width: 960px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.gacha-panel::before {
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  content: "";
  height: 180%;
  left: -28%;
  pointer-events: none;
  position: absolute;
  top: -40%;
  transform: rotate(12deg);
  width: 120px;
}

.gacha-copy {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.gacha-copy h3 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
}

.gacha-copy p:not(.eyebrow) {
  color: rgba(255, 243, 207, 0.76);
  line-height: 1.55;
}

.gacha-meter {
  align-items: center;
  background: rgba(255, 248, 234, 0.1);
  border: 1px solid rgba(255, 243, 207, 0.18);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  min-width: 132px;
  padding: 12px 14px;
  position: relative;
  z-index: 1;
}

.gacha-meter strong {
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.gacha-meter span {
  color: rgba(255, 243, 207, 0.74);
  font-size: 12px;
  font-weight: 900;
}

.gacha-button {
  background:
    linear-gradient(180deg, #ffe08a 0%, #f0b84e 54%, #ca7b2f 100%);
  border: 0;
  border-radius: 8px;
  box-shadow:
    0 14px 0 #7f421b,
    0 26px 42px rgba(0, 0, 0, 0.34),
    inset 0 2px 0 rgba(255, 255, 255, 0.56);
  color: #10262b;
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 92px;
  overflow: hidden;
  padding: 16px 22px 18px;
  position: relative;
  text-align: center;
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  z-index: 1;
}

.gacha-button::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  content: "";
  height: 160%;
  left: -65%;
  position: absolute;
  top: -30%;
  transform: rotate(14deg);
  width: 48%;
}

.gacha-button:hover,
.gacha-button:focus-visible {
  box-shadow:
    0 16px 0 #7f421b,
    0 30px 52px rgba(0, 0, 0, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  filter: saturate(1.06);
  outline: 3px solid rgba(255, 243, 207, 0.46);
  outline-offset: 4px;
  transform: translateY(-2px);
}

.gacha-button:active,
.gacha-button.is-drawing {
  box-shadow:
    0 5px 0 #7f421b,
    0 14px 28px rgba(0, 0, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(9px);
}

.gacha-button.is-drawing::before,
.gacha-button:hover::before {
  animation: gacha-shine 820ms ease;
}

.gacha-button-main {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
}

.gacha-button-sub {
  color: rgba(16, 38, 43, 0.7);
  font-size: 13px;
  font-weight: 900;
}

@keyframes gacha-shine {
  from {
    left: -70%;
  }
  to {
    left: 120%;
  }
}

.screenshot-grid {
  column-count: 2;
  column-gap: 18px;
}

.timeline-footer {
  break-inside: avoid;
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 10px 0 26px;
  width: 100%;
}

.timeline-count-note {
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 14px;
}

.timeline-load-more {
  min-width: min(280px, 100%);
}

.screenshot-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(31, 25, 14, 0.08);
  break-inside: avoid;
  display: inline-block;
  margin: 0 0 18px;
  overflow: hidden;
  width: 100%;
}

.screenshot-card.large {
  display: grid;
  max-width: 720px;
}

.shot-link {
  background: #f1e7d5;
  display: block;
}

.shot {
  display: block;
  height: auto;
  width: 100%;
}

.shot-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.card-actions,
.dialog-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(16, 38, 43, 0.24);
  color: var(--ink);
  max-width: 720px;
  padding: 0;
  width: min(720px, calc(100vw - 28px));
}

.report-dialog::backdrop {
  background: rgba(16, 38, 43, 0.38);
}

.report-dialog form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.dialog-head {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dialog-target {
  color: var(--muted);
  font-weight: 800;
}

.report-dialog label,
.admin-fields label {
  display: grid;
  gap: 6px;
}

.report-dialog label span,
.admin-fields label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-dialog input,
.report-dialog textarea,
.report-dialog select,
.token-input,
.admin-fields input,
.admin-fields textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  width: 100%;
}

.report-dialog textarea,
.admin-fields textarea {
  line-height: 1.55;
  min-height: 110px;
  resize: vertical;
}

.suggested-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.suggested-fields .wide {
  grid-column: 1 / -1;
}

.admin-token-bar {
  min-width: min(640px, 100%);
}

.token-input {
  max-width: 320px;
}

.admin-app {
  grid-template-columns: 250px 1fr;
}

.admin-handoff-tools {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.monthly-guide {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 14px;
  padding: 10px 12px;
}

.monthly-guide summary {
  color: var(--teal);
  cursor: pointer;
  font-weight: 900;
}

.monthly-guide ol {
  margin: 10px 0 0 18px;
  padding: 0;
}

.monthly-guide code {
  background: rgba(16, 38, 43, 0.06);
  border-radius: 4px;
  padding: 1px 4px;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(31, 25, 14, 0.08);
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
}

.section-title.compact {
  margin-bottom: 0;
}

.calendar-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-admin-status {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  padding: 10px 12px;
}

.calendar-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-source-list a {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.calendar-events-editor {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  min-height: 360px;
  resize: vertical;
  white-space: pre;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-report {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(31, 25, 14, 0.08);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 390px) 1fr 120px;
  padding: 16px;
}

.admin-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.admin-fields .wide,
.report-title,
.report-message,
.admin-actions {
  grid-column: 1 / -1;
}

.report-title {
  color: var(--teal);
  font-weight: 900;
}

.report-message {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
  padding: 10px;
  white-space: pre-wrap;
}

.review-list {
  display: grid;
  gap: 14px;
}

.review-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 460px) minmax(360px, 1fr) 120px;
  padding: 16px;
}

.review-image {
  display: grid;
  gap: 8px;
}

.review-image a {
  display: block;
}

.review-image img {
  background: #f1e7d5;
  border-radius: 8px;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  width: 100%;
}

.review-image span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.review-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 150px;
}

.review-fields label {
  display: grid;
  gap: 6px;
}

.review-fields label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-fields .text-field,
.ocr-panel {
  grid-column: 1 / -1;
}

.review-fields textarea {
  min-height: 72px;
  resize: vertical;
}

.review-fields input,
.review-fields textarea,
.review-fields select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  width: 100%;
}

.review-fields textarea {
  min-height: 150px;
  line-height: 1.55;
}

.review-status {
  display: flex;
  justify-content: flex-start;
}

.ocr-panel {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ocr-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
}

.ocr-head span {
  color: var(--muted);
  font-size: 12px;
}

.ocr-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocr-warning,
.ocr-ok {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.ocr-warning {
  background: #fff1ce;
  color: #a76b00;
}

.ocr-ok {
  background: #dceadc;
  color: var(--leaf);
}

.ocr-panel summary {
  color: var(--teal);
  cursor: pointer;
  font-weight: 800;
}

.ocr-lines {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 10px 0 0;
  max-height: 260px;
  overflow: auto;
  padding: 0;
}

.ocr-lines li {
  align-items: start;
  border-bottom: 1px solid rgba(229, 215, 191, 0.8);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 48px;
  padding: 5px 0;
}

.ocr-lines small {
  color: var(--muted);
  text-align: right;
}

.status-badge {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  justify-self: start;
  padding: 7px 10px;
}

.status-approved {
  background: #dceadc;
  color: var(--leaf);
}

.status-pending {
  background: #fff1ce;
  color: #a76b00;
}

.status-hidden {
  background: #f9d8d5;
  color: var(--coral);
}

.status-open {
  background: #fff1ce;
  color: #a76b00;
}

.status-applied,
.status-done {
  background: #dceadc;
  color: var(--leaf);
}

.status-ignored {
  background: #e7e0d5;
  color: var(--muted);
}

.empty {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.calendar-panel {
  display: grid;
  gap: 18px;
}

.calendar-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.calendar-summary div {
  background: var(--panel);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 25, 14, 0.07);
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.calendar-summary strong {
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
}

.calendar-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-emotions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emotion-chip {
  background: #dceadc;
  border: 1px solid rgba(91, 139, 98, 0.18);
  border-radius: 999px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
}

.emotion-chip.muted {
  background: #f1e7d5;
  border-color: var(--line);
  color: var(--muted);
}

.calendar-scroll {
  background:
    radial-gradient(circle at 16% 12%, rgba(240, 184, 78, 0.2), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff8ea 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(31, 25, 14, 0.1);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--gold) rgba(229, 215, 191, 0.55);
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.calendar-scroll::-webkit-scrollbar,
.river-scroll::-webkit-scrollbar,
.calendar-node-track::-webkit-scrollbar {
  height: 10px;
}

.calendar-scroll::-webkit-scrollbar-track,
.river-scroll::-webkit-scrollbar-track,
.calendar-node-track::-webkit-scrollbar-track {
  background: rgba(229, 215, 191, 0.58);
  border-radius: 999px;
}

.calendar-scroll::-webkit-scrollbar-thumb,
.river-scroll::-webkit-scrollbar-thumb,
.calendar-node-track::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--gold), var(--teal));
  border-radius: 999px;
}

.calendar-scroll-control {
  align-items: center;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(229, 215, 191, 0.86);
  border-radius: 999px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(120px, 1fr);
  margin: 10px 0 12px;
  padding: 8px 12px;
}

.calendar-scroll-control span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-scroll-range {
  accent-color: var(--gold);
  cursor: pointer;
  width: 100%;
}

.river-shell {
  max-width: 100%;
}

.river-scroll {
  background:
    radial-gradient(circle at 16% 12%, rgba(240, 184, 78, 0.2), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff8ea 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(31, 25, 14, 0.1);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--gold) rgba(229, 215, 191, 0.55);
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.river-canvas {
  isolation: isolate;
  position: relative;
}

.calendar-river {
  display: block;
  min-width: 100%;
  pointer-events: none;
}

.calendar-plot {
  isolation: isolate;
  position: relative;
}

.calendar-river * {
  pointer-events: none;
}

.axis {
  stroke: rgba(102, 115, 111, 0.32);
  stroke-dasharray: 6 7;
}

.river-grid-line {
  stroke: rgba(102, 115, 111, 0.12);
  stroke-dasharray: 3 10;
}

.river-area {
  fill: url(#riverFill);
}

.river-line {
  fill: none;
  filter: drop-shadow(0 8px 10px rgba(14, 90, 94, 0.16));
  stroke: url(#riverStroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.river-shell .river-area {
  fill: url(#riverArea);
}

.river-shell .river-line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.river-grid,
.river-axis {
  stroke: rgba(102, 115, 111, 0.18);
  stroke-dasharray: 5 8;
}

.river-active-rule {
  stroke: rgba(230, 106, 83, 0.44);
  stroke-dasharray: 5 8;
  stroke-linecap: round;
  stroke-width: 2;
}

.river-node-dot {
  fill: var(--gold);
  stroke: #fffdf8;
  stroke-width: 5;
}

.river-node.empty .river-node-dot {
  fill: #d8cdb8;
  opacity: 0.58;
  stroke-width: 3;
}

.river-node.active .river-node-dot {
  fill: var(--coral);
}

.river-node-halo {
  fill: rgba(230, 106, 83, 0.16);
  stroke: rgba(230, 106, 83, 0.36);
  stroke-width: 2;
}

.river-count {
  fill: var(--teal);
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 4px;
}

.river-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 4px;
}

.river-point circle {
  fill: #e1d4be;
  stroke: #fffdf8;
  stroke-width: 3;
}

.river-point.has-data circle {
  fill: var(--gold);
  stroke: #fffdf8;
  stroke-width: 4;
}

.river-point.active circle {
  fill: var(--coral);
}

.node-tick {
  stroke: rgba(102, 115, 111, 0.42);
  stroke-linecap: round;
  stroke-width: 2;
}

.river-point.is-empty .node-tick {
  stroke: rgba(102, 115, 111, 0.2);
}

.node-count {
  fill: var(--teal);
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 4px;
  text-anchor: middle;
}

.node-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fffdf8;
  stroke-width: 4px;
  text-anchor: middle;
}

.active-marker line {
  stroke: rgba(230, 106, 83, 0.45);
  stroke-dasharray: 5 8;
  stroke-linecap: round;
  stroke-width: 2;
}

.active-halo {
  fill: rgba(230, 106, 83, 0.14);
  stroke: rgba(230, 106, 83, 0.34);
  stroke-width: 2;
}

.active-core {
  fill: none;
  stroke: rgba(230, 106, 83, 0.9);
  stroke-width: 3;
}

.river-hotspots {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 4;
}

.river-hotspot {
  background: rgba(230, 106, 83, 0);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  position: absolute;
  touch-action: manipulation;
  z-index: 5;
}

.river-hotspot::after {
  border: 2px solid rgba(230, 106, 83, 0);
  border-radius: inherit;
  content: "";
  inset: -4px;
  position: absolute;
}

.river-hotspot:hover::after,
.river-hotspot:focus-visible::after {
  background: rgba(240, 184, 78, 0.16);
  border-color: rgba(230, 106, 83, 0.5);
  outline: 0;
}

.river-hotspot:focus-visible {
  outline: 3px solid rgba(240, 184, 78, 0.45);
  outline-offset: 5px;
}

.calendar-node-track {
  display: grid;
  gap: 10px;
  grid-auto-columns: minmax(108px, 138px);
  grid-auto-flow: column;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

.calendar-node-button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(31, 25, 14, 0.06);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 10px;
  scroll-snap-align: center;
  text-align: left;
}

.calendar-node-button:hover,
.calendar-node-button:focus-visible {
  border-color: rgba(14, 90, 94, 0.5);
  box-shadow: 0 12px 26px rgba(14, 90, 94, 0.12);
  outline: 3px solid rgba(240, 184, 78, 0.35);
  outline-offset: 2px;
}

.calendar-node-button.active {
  background: #10262b;
  border-color: #10262b;
  color: #fff3cf;
}

.calendar-node-button.is-empty {
  opacity: 0.62;
}

.calendar-node-button.active.is-empty {
  opacity: 1;
}

.node-button-count {
  color: var(--coral);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.calendar-node-button.active .node-button-count {
  color: var(--gold);
}

.node-button-label {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.node-button-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-node-button.active .node-button-meta {
  color: rgba(255, 243, 207, 0.72);
}

.calendar-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(31, 25, 14, 0.08);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.calendar-detail-head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.calendar-detail h3 {
  font-size: 24px;
  margin: 0 0 6px;
}

.calendar-detail p,
.calendar-note {
  color: var(--muted);
  line-height: 1.6;
}

.calendar-list-status {
  background: #f8f1e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  justify-self: start;
  padding: 8px 10px;
}

.node-metric {
  background: #10262b;
  border-radius: 8px;
  color: #fff3cf;
  display: grid;
  min-width: 116px;
  padding: 12px;
  text-align: center;
}

.node-metric strong {
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.node-metric span {
  font-size: 12px;
  font-weight: 800;
}

.calendar-card-grid {
  column-count: 2;
  column-gap: 18px;
}

.access-gate {
  align-items: center;
  background: rgba(16, 38, 43, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1000;
}

.access-card {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(16, 38, 43, 0.28);
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 28px;
  width: min(100%, 420px);
}

.access-card h2 {
  color: var(--ink);
  font-size: 34px;
  line-height: 1.1;
  margin: 0;
}

.access-note {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.access-input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  padding: 13px 14px;
}

.access-message {
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  min-height: 20px;
}

.access-submit {
  justify-self: start;
}

@media (max-width: 900px) {
  .topbar,
  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .memory-card,
  .memory-card.large,
  .review-item,
  .admin-report {
    grid-template-columns: 1fr;
  }

  .review-fields,
  .admin-fields,
  .suggested-fields {
    grid-template-columns: 1fr;
  }

  .screenshot-grid {
    column-count: 1;
  }

  .calendar-summary {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-detail-head {
    flex-direction: column;
  }

  .calendar-card-grid {
    column-count: 1;
  }

  .gacha-panel {
    grid-template-columns: 1fr;
  }

  .gacha-meter {
    justify-self: start;
  }

  .review-status {
    justify-content: flex-start;
  }
}
