@font-face {
  font-family: 'Geist';
  src: url('/vendor/geist/geist-sans/Geist-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-navy: #0A2850;
  --brand-navy-deep: #071D3B;
  --point-brown: #967850;
  --point-brown-deep: #7A5F3C;

  --font-sans: 'Pretendard Variable', 'Pretendard', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Consolas, monospace;

  --bg-theme: #FAF8F0;
  --bg-radial: rgba(150, 120, 80, 0.07);
  --bg-radial-2: rgba(10, 40, 80, 0.04);
  --surface: #F4F0E6;
  --surface-elevated: #FFFFFF;
  --surface-field: #FCFBF7;

  --ink-primary: #0A2850;
  --ink-secondary: #354A68;
  --ink-muted: #6B655B;

  --accent: #967850;
  --accent-solid: #0A2850;
  --on-accent: #FAF8F0;
  --accent-soft: rgba(150, 120, 80, 0.14);

  --border-subtle: rgba(10, 40, 80, 0.11);
  --border-strong: rgba(150, 120, 80, 0.36);

  --radius-card: 16px;
  --radius-control: 10px;
  --radius-pill: 999px;
  --site-nav-h: calc(56px + env(safe-area-inset-top, 0px));

  --shadow-card: 0 10px 26px -18px rgba(10, 40, 80, 0.14);
  --shadow-dock: 0 14px 32px -12px rgba(10, 40, 80, 0.22);
}

body[data-scroll-theme='dev'],
body[data-scroll-theme='game'],
body[data-scroll-theme='farm'] {
  --bg-theme: #FAF8F0;
  --bg-radial: rgba(150, 120, 80, 0.07);
  --bg-radial-2: rgba(10, 40, 80, 0.04);
  --surface: #F4F0E6;
  --surface-elevated: #FFFFFF;
  --surface-field: #FCFBF7;
  --ink-primary: #0A2850;
  --ink-secondary: #354A68;
  --ink-muted: #6B655B;
  --accent: #967850;
  --accent-solid: #0A2850;
  --on-accent: #FAF8F0;
  --accent-soft: rgba(150, 120, 80, 0.14);
  --border-subtle: rgba(10, 40, 80, 0.11);
  --border-strong: rgba(150, 120, 80, 0.36);
}

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

::selection {
  background: var(--accent-solid);
  color: var(--on-accent);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--site-nav-h, 56px);
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background-color: var(--bg-theme);
  line-height: 1.55;
  word-break: keep-all;
  overflow-x: clip;
  caret-color: var(--accent);
  transition: background-color 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

button {
  cursor: pointer;
}

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

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

.story-bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(64rem 42rem at 82% 8%, var(--bg-radial) 0%, transparent 62%),
    radial-gradient(56rem 38rem at 12% 88%, var(--bg-radial-2) 0%, transparent 64%),
    var(--bg-theme);
  transition: background-color 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-solid);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: var(--radius-control);
}

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

.container {
  width: min(1140px, calc(100% - 28px));
  margin-inline: auto;
}

/* Toast */
.hub-toast {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 15px;
  border-radius: var(--radius-control);
  background: #0A2850;
  border: 1px solid rgba(150, 120, 80, 0.45);
  color: #FAF8F0;
  box-shadow: var(--shadow-dock);
  font-size: 0.85rem;
  font-weight: 600;
}

.hub-toast[hidden] {
  display: none;
}

.hub-toast i {
  font-size: 1.15rem;
  color: #D8C09E;
  flex-shrink: 0;
}

.hub-toast p {
  margin: 0;
}

/* Top Navigation (Single line 56px Main Navy Fixed Header — Pinned on Desktop & Mobile) */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  height: var(--site-nav-h, 56px);
  padding-top: env(safe-area-inset-top, 0px);
  background: #0A2850;
  border-bottom: 1px solid rgba(250, 248, 240, 0.16);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: box-shadow 0.2s ease;
}

body.is-past-hero .site-nav {
  box-shadow: 0 6px 20px -8px rgba(4, 14, 32, 0.48);
}

.nav-inner {
  width: min(1220px, calc(100% - 28px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark-box {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #0A2850;
  border: 1px solid rgba(250, 248, 240, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.brand-mark-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-wordmark {
  font-size: 1.05rem;
  color: #FAF8F0;
}

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

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink-primary);
  background: rgba(10, 40, 80, 0.06);
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--point-brown-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pill-toggle {
  height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.18);
  background: #F3EFE5;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pill-toggle:hover {
  background: #E9E2D3;
  border-color: var(--border-strong);
}

.pill-toggle:active,
.btn:active,
.chip-btn:active,
.tab-pill:active,
.unit-pill:active,
.sticky-cta-btn:active {
  transform: scale(0.98);
}

/* Shared Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.2s ease, border-color 0.2s ease;
}

[hidden],
.btn[hidden] {
  display: none !important;
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 0.8rem;
}

.btn-md {
  height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
}

.btn-nav-cta {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  background: #0A2850;
  color: #FAF8F0;
}

.btn-nav-cta:hover {
  background: #12386B;
}

.btn-dev-solid {
  background: #0A2850;
  color: #FAF8F0;
}

.btn-dev-solid:hover {
  background: #12386B;
}

.btn-dev-outline {
  background: rgba(10, 40, 80, 0.05);
  border-color: rgba(10, 40, 80, 0.22);
  color: #0A2850;
}

.btn-dev-outline:hover {
  background: rgba(10, 40, 80, 0.10);
  border-color: #0A2850;
}

.btn-game-solid {
  background: #0A2850;
  color: #FAF8F0;
}

.btn-game-solid:hover {
  background: #12386B;
}

.btn-farm-solid {
  background: #8A6C45;
  color: #FAF8F0;
}

.btn-farm-solid:hover {
  background: #745A38;
}

.btn-farm-ghost,
.btn-secondary {
  background: #F3EFE5;
  border-color: rgba(10, 40, 80, 0.18);
  color: #0A2850;
}

.btn-farm-ghost:hover,
.btn-secondary:hover {
  background: #E8E0D0;
}

.btn-danger-ghost {
  background: rgba(166, 58, 50, 0.08);
  border-color: rgba(166, 58, 50, 0.28);
  color: #8F2D26;
}

.btn-danger-confirm {
  background: #9E352E;
  color: #FAF8F0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(10, 40, 80, 0.18);
  background: #F3EFE5;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #E8E0D0;
}

/* =========================================================
   1단계: Hero + 3-Tile Living Bento Grid
   ========================================================= */
.hero-stage {
  padding-block: 16px 26px;
}

.hero-headline-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0;
  max-width: 780px;
  font-size: clamp(1.32rem, 3.1vw, 2.18rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.hero-jump-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: #F3EFE5;
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.jump-chip:hover,
.jump-chip.is-active {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.hero-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.bento-hero-tile {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.bento-tile-dev {
  grid-column: span 6;
  background: #F4F0E6;
  border-color: rgba(150, 120, 80, 0.32);
}

.bento-tile-game {
  grid-column: span 6;
  background: #0A2850;
  border-color: rgba(10, 40, 80, 0.24);
}

.bento-tile-farm {
  grid-column: span 12;
  background: #2B2118;
  border-color: rgba(150, 120, 80, 0.38);
}

.bento-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bento-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scrim-game {
  background: linear-gradient(165deg, rgba(10, 40, 80, 0.84) 0%, rgba(7, 29, 59, 0.90) 100%);
}

.scrim-farm {
  background: linear-gradient(135deg, rgba(38, 29, 20, 0.90) 0%, rgba(10, 40, 80, 0.82) 100%);
}

.bento-top-row,
.bento-copy,
.dev-telemetry-strip,
.crop-loop-stage,
.bento-actions,
.bento-farm-grid {
  position: relative;
  z-index: 2;
}

.bento-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag-dev {
  background: rgba(10, 40, 80, 0.09);
  color: #0A2850;
}

.tag-game {
  background: rgba(250, 248, 240, 0.16);
  color: #FAF8F0;
}

.tag-farm {
  background: rgba(150, 120, 80, 0.34);
  color: #FAF8F0;
}

.bento-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0A2850;
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #967850;
  animation: beaconPulse 2.8s ease-in-out infinite;
}

.bento-play-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: #FAF8F0;
  color: #0A2850;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.bento-play-pill:hover {
  background: #ECE5D7;
}

.bento-pct-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.34);
  color: #FAF8F0;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bento-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.bento-title-wide {
  font-size: clamp(1.06rem, 2.2vw, 1.3rem);
}

.bento-desc {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.bento-tile-game .bento-title,
.bento-tile-game .tile-action-link,
.bento-tile-farm .bento-title,
.bento-tile-farm .tile-action-link {
  color: #FAF8F0;
}

.bento-tile-game .tile-action-link:hover,
.bento-tile-farm .tile-action-link:hover {
  color: #DFC8A6;
}

.bento-tile-game .bento-desc {
  color: #E6E1D6;
}

.bento-tile-farm .bento-desc {
  color: #EAE4D7;
}

/* Living Tile 1: Dev Live Telemetry Strip */
.dev-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FAF8F0;
  border: 1px solid rgba(150, 120, 80, 0.26);
}

.tele-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.tele-k {
  font-size: 0.64rem;
  font-weight: 700;
  color: #7A5F3C;
  font-family: var(--font-mono);
}

.tele-v {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: #0A2850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tele-sim {
  color: #7A5F3C;
}

/* Living Tile 2: CSS 2.5D Growth Loop Stage */
.crop-loop-stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 8px 10px 7px;
  border-radius: 10px;
  background: rgba(7, 24, 50, 0.68);
  border: 1px solid rgba(250, 248, 240, 0.18);
  overflow: hidden;
}

.crop-loop-beds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
}

.loop-bed-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.loop-soil-bed {
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: #7A5F3C;
  border: 1px solid #967850;
}

.loop-crop {
  position: relative;
  width: 24px;
  height: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: bottom center;
}

.crop-phase-1 {
  animation: cropPop 3.6s ease-in-out infinite;
}

.crop-phase-2 {
  animation: cropPop 3.6s ease-in-out 1.2s infinite;
}

.crop-phase-3 {
  animation: cropPop 3.6s ease-in-out 2.4s infinite;
}

.sprout-stem {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #A9BFA6;
}

.sprout-leaf {
  position: absolute;
  top: 4px;
  width: 8px;
  height: 5px;
  border-radius: 999px;
  background: #7F9D7D;
}

.sprout-leaf.leaf-l {
  left: 3px;
  transform: rotate(-28deg);
}

.sprout-leaf.leaf-r {
  right: 3px;
  transform: rotate(28deg);
}

.cabbage-crown {
  width: 18px;
  height: 13px;
  border-radius: 50%;
  background: #6B8B6B;
  border: 1px solid #B0C4AE;
}

.cabbage-core {
  position: absolute;
  bottom: 2px;
  width: 10px;
  height: 8px;
  border-radius: 50%;
  background: #D9E2D6;
}

.berry-stem {
  width: 14px;
  height: 7px;
  border-radius: 999px;
  background: #7F9D7D;
  position: absolute;
  top: 4px;
}

.berry-fruit {
  width: 11px;
  height: 13px;
  border-radius: 46% 46% 52% 52%;
  background: #B95D58;
  border: 1px solid #DFB0AD;
}

.loop-stage-caption {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #DEC8A8;
  white-space: nowrap;
  align-self: center;
}

.tile-action-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
}

.tile-action-link:hover {
  color: var(--point-brown-deep);
}

.bento-actions-dual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.tile-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.22);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tile-action-chip:hover {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

/* Living Tile 3: Wide Farm Funding Gauge */
.bento-farm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.hero-gauge-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(10, 24, 46, 0.72);
  border: 1px solid rgba(214, 195, 168, 0.28);
}

.hero-gauge-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: #FAF8F0;
}

.hero-gauge-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-gauge-money strong {
  color: #E2C9A6;
  font-size: 0.96rem;
}

.hero-gauge-track {
  position: relative;
  height: 9px;
  border-radius: var(--radius-pill);
  background: rgba(250, 248, 240, 0.18);
  overflow: hidden;
}

.hero-gauge-fill {
  height: 100%;
  min-width: 8px;
  border-radius: var(--radius-pill);
  background: #967850;
  transition: width 0.5s ease;
}

.hero-farm-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tile-farm .btn-farm-ghost {
  background: rgba(250, 248, 240, 0.14);
  border-color: rgba(250, 248, 240, 0.38);
  color: #FAF8F0;
}

.bento-tile-farm .btn-farm-ghost:hover {
  background: rgba(250, 248, 240, 0.24);
}

/* =========================================================
   Story Sections Shared Rhythm (More top space than below heading)
   ========================================================= */
.story-section {
  padding-block: 56px 40px;
  border-top: 1px solid var(--border-subtle);
}

.section-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.section-intro {
  max-width: 72ch;
}

.section-title {
  margin: 0;
  font-size: clamp(1.36rem, 2.8vw, 1.92rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.section-subtitle {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.section-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-counter-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-secondary);
}

.stat-counter-pill strong {
  color: var(--ink-primary);
  font-size: 0.94rem;
}

/* =========================================================
   2단계: The Bridge Vertical Pipeline
   ========================================================= */
.bridge-timeline {
  position: relative;
  margin-top: 24px;
  padding-left: 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bridge-spine {
  position: absolute;
  left: 15px;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: rgba(150, 120, 80, 0.24);
  overflow: hidden;
}

.bridge-spine-fill {
  width: 100%;
  height: calc(var(--bridge-progress, 0.15) * 100%);
  border-radius: 999px;
  background: linear-gradient(180deg, #0A2850 0%, #967850 100%);
  transition: height 0.12s linear;
}

.bridge-node {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 16px 18px;
  transition: border-color 0.35s ease, background-color 0.35s ease;
}

.bridge-node.is-lit {
  border-color: var(--border-strong);
  background: var(--surface-elevated);
}

.bridge-node-marker {
  position: absolute;
  left: -44px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FAF8F0;
  border: 1.5px solid rgba(150, 120, 80, 0.48);
  color: #0A2850;
  font-weight: 800;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.bridge-node.is-lit .bridge-node-marker {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: var(--on-accent);
}

.bridge-node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bridge-node-head i {
  font-size: 1.15rem;
  color: var(--accent);
  flex-shrink: 0;
}

.bridge-node-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.bridge-node p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  max-width: 72ch;
}

/* Sync Compare Panel */
.sync-compare-panel {
  margin-top: 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-strong);
  background: #F4F0E6;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sync-compare-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.sync-compare-head p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.sync-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.sync-col {
  padding: 12px 14px;
  border-radius: 12px;
  background: #FAF8F0;
  border: 1px solid var(--border-subtle);
}

.sync-col-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0A2850;
  margin-bottom: 8px;
}

.sync-col-badge.sync-col-real {
  color: #7A5F3C;
}

.sync-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.sync-arrow-bridge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #EAE3D5;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   3단계 Bento Sections (12-Column Responsive Grid)
   ========================================================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.card-span-12 { grid-column: span 12; }
.card-span-8 { grid-column: span 8; }
.card-span-7 { grid-column: span 7; }
.card-span-6 { grid-column: span 6; }
.card-span-5 { grid-column: span 5; }
.card-span-4 { grid-column: span 4; }

.story-card {
  min-width: 0;
  max-width: 100%;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

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

.card-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.card-note {
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.card-body {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

/* Chips / Pills */
.chip-group,
.tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn,
.tab-pill {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: var(--ink-secondary);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip-btn:hover,
.tab-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.chip-btn.is-active,
.tab-pill.is-active {
  background: var(--accent-solid);
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 800;
}

.unit-pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}

.unit-pill {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
}

.unit-pill.is-active {
  background: var(--accent-solid);
  color: var(--on-accent);
  font-weight: 800;
}

/* Dev Section */
.dev-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-card,
.program-slot-card,
.game-catalog-card,
.reward-card {
  min-width: 0;
  max-width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.14s ease;
}

.project-card:hover,
.program-slot-card.is-upload-slot:hover,
.game-catalog-card:hover,
.reward-card:hover {
  border-color: var(--accent);
  background: #FFFFFF;
  transform: translateY(-1px);
}

.program-slot-card.is-upload-slot {
  border-style: dashed;
  border-color: var(--border-strong);
}

.project-card-top,
.reward-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.project-card-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink-primary);
  min-width: 0;
}

.project-card-title-wrap i {
  color: var(--point-brown-deep);
  flex-shrink: 0;
}

.status-pill,
.program-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.16);
  color: #6E5535;
  font-size: 0.72rem;
  font-weight: 700;
  max-width: 100%;
  white-space: normal;
}

.project-card-summary,
.game-catalog-card p,
.reward-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.program-slot-cta,
.reward-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--point-brown-deep);
  margin-top: auto;
}

.stack-tag-row,
.tag-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-tag,
.tag-pill-list li {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.09);
  background: #ECE7DC;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* Game Section */
.game-visual-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 1024 / 510;
  background: #EAE4D7;
}

.game-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-feature-pills > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.07);
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
}

.game-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cuisine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cuisine-card {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cuisine-thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #EAE4D7;
}

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

.cuisine-card strong {
  font-size: 0.86rem;
  color: var(--ink-primary);
}

.cuisine-card span {
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

/* Farm Section */
.card-farm-vision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: center;
}

.vision-media-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 4 / 3;
  background: #EAE4D7;
}

.vision-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vision-copy-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-receipt-block {
  border-radius: 12px;
  background: #ECE7DC;
  border: 1px solid rgba(150, 120, 80, 0.26);
  padding: 12px 14px;
}

.receipt-line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.receipt-line-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.receipt-line-list strong,
.receipt-total-bar strong {
  font-variant-numeric: tabular-nums;
  color: #7A5F3C;
}

.receipt-total-bar {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-primary);
}

/* Dual Blueprint Matrix */
.crop-meta-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
}

.blueprint-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.bp-subbanner {
  margin: 0;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--ink-secondary);
}

.bp-matrix {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-row-cells {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.bp-cell {
  border-radius: 7px;
  border: 1px solid rgba(10, 40, 80, 0.16);
  background: #FAF8F0;
  padding: 7px 2px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #0A2850;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.bp-cell:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.bp-cell.is-partial {
  background: rgba(150, 120, 80, 0.22);
  border-color: #967850;
  color: #0A2850;
}

.bp-cell.is-full {
  background: #967850;
  border-color: transparent;
  color: #FAF8F0;
}

.bp-cell.is-selected {
  outline: 2px solid #0A2850;
  outline-offset: 1px;
}

.bp-cell.is-dimmed {
  opacity: 0.28;
}

.bp-path-bar {
  width: 100%;
  text-align: left;
  border-radius: 8px;
  border: 1px dashed rgba(150, 120, 80, 0.50);
  background: #ECE7DC;
  color: #354A68;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-path-bar.is-selected {
  outline: 2px solid #0A2850;
}

.bp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: #FAF8F0;
}

.swatch-partial {
  background: rgba(150, 120, 80, 0.24);
  border-color: #967850;
}

.swatch-full {
  background: #967850;
  border-color: transparent;
}

/* Campaign Progress & Inspector (Flat separated sections inside card, no nested card clutter) */
.tracker-block,
.inspector-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-divider {
  height: 1px;
  background: var(--border-subtle);
}

.progress-top,
.inspector-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.progress-money-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.progress-money-row strong {
  font-size: 1.44rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #7A5F3C;
}

.progress-money-row span {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.pct-pill {
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #7A5F3C;
}

.progress-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.10);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: #967850;
}

.progress-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 6px;
}

.progress-meta-grid div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.progress-meta-grid span {
  font-size: 0.7rem;
  color: var(--ink-secondary);
}

.progress-meta-grid strong {
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-primary);
}

.plot-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #7A5F3C;
}

.mode-title,
.roadmap-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.mode-desc,
.roadmap-desc {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-secondary);
}

.cost-breakdown-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #ECE7DC;
  border: 1px solid rgba(150, 120, 80, 0.26);
}

.cost-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7A5F3C;
  margin-bottom: 3px;
}

.cost-breakdown-box p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-primary);
}

.backer-list-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backer-entry {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  font-size: 0.8rem;
}

.backer-entry strong {
  display: block;
  color: var(--ink-primary);
}

.backer-entry p {
  margin: 3px 0 0;
  color: var(--ink-secondary);
}

/* Rewards / Roadmap / Diary / Calculator */
.passport-tier-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(10, 40, 80, 0.22);
  background: linear-gradient(135deg, rgba(10, 40, 80, 0.06) 0%, rgba(150, 120, 80, 0.08) 100%);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.passport-tier-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}

.passport-tier-copy .status-pill {
  width: fit-content;
  background: rgba(10, 40, 80, 0.12);
  color: #0A2850;
}

.passport-tier-copy strong {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-primary);
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reward-unified-perks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.reward-perk-line {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0A2850;
  background: rgba(10, 40, 80, 0.06);
  border: 1px solid rgba(10, 40, 80, 0.14);
  border-radius: 8px;
  padding: 4px 7px;
}

.reward-perk-line.is-game {
  color: #215129;
  background: rgba(58, 125, 68, 0.08);
  border-color: rgba(58, 125, 68, 0.2);
}

.reward-perk-line i {
  font-size: 0.85rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.reward-price {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #7A5F3C;
}

.reward-price-sub {
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0.82;
  margin-left: 4px;
}

.reward-card h4 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-primary);
}

.compliance-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.roadmap-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roadmap-items,
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.roadmap-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.roadmap-items strong {
  color: #7A5F3C;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.check-list i {
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
}

.calc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-field label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.calc-field input,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  background: var(--surface-field);
  color: var(--ink-primary);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #7B7468;
  opacity: 1;
}

.scale-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scale-chip {
  padding: 9px 10px;
  border-radius: 10px;
  background: #FAF8F0;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scale-chip strong {
  font-size: 0.8rem;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.scale-chip span {
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

/* Footer (Extra bottom space so sticky action bar never overlaps footer links) */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0 calc(104px + env(safe-area-inset-bottom));
  background: #F2EEE4;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-brand strong {
  display: block;
  color: var(--ink-primary);
}

.footer-brand p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-link-btn {
  border: 0;
  background: transparent;
  padding: 5px 8px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.footer-link-btn:hover {
  color: var(--accent);
}

.footer-copy {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.footer-copy p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

/* =========================================================
   4단계: Sticky Bottom Thumb Action Bar
   ========================================================= */
.sticky-funding-bar {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: min(680px, calc(100% - 24px));
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  background: rgba(250, 248, 240, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(150, 120, 80, 0.42);
  box-shadow: var(--shadow-dock);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sticky-funding-bar.is-hidden-by-modal {
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
}

.sticky-bar-status {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sticky-status-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sticky-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #967850;
  flex-shrink: 0;
  animation: beaconPulse 2.8s ease-in-out infinite;
}

.sticky-status-top strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-status-sub {
  font-size: 0.72rem;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-mini-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(10, 40, 80, 0.10);
  overflow: hidden;
}

.sticky-mini-fill {
  height: 100%;
  min-width: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7A5F3C, #967850);
  transition: width 0.4s ease;
}

.sticky-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: #0A2850;
  color: #FAF8F0;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.14s ease;
}

.sticky-cta-btn:hover {
  background: #12386B;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 40, 80, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-sheet {
  width: min(560px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(150, 120, 80, 0.40);
  background: #FAF8F0;
  color: #0A2850;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-dock);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.modal-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #7A5F3C;
}

.modal-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.two-col-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-actions-split {
  justify-content: space-between;
  align-items: center;
}

.modal-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#project-modal-desc {
  white-space: pre-line;
}

/* Animations */
@keyframes beaconPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes cropPop {
  0%, 100% { transform: scaleY(0.72) scaleX(0.92); opacity: 0.72; }
  35%, 70% { transform: scaleY(1.06) scaleX(1.03); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 959px) {
  .card-span-8,
  .card-span-7,
  .card-span-6,
  .card-span-5,
  .card-span-4 {
    grid-column: span 12;
  }

  .card-farm-vision,
  .game-catalog-grid,
  .sync-compare-grid {
    grid-template-columns: 1fr;
  }

  .sync-arrow-bridge {
    transform: rotate(90deg);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-inner {
    width: min(100% - 22px, 1140px);
  }

  .nav-links,
  .hide-xs {
    display: none;
  }

  .hero-stage {
    padding-block: 6px 14px;
  }

  .hero-headline-row {
    gap: 6px;
    margin-bottom: 7px;
  }

  .hero-title {
    font-size: 1.14rem;
    line-height: 1.25;
  }

  .jump-chip {
    height: 26px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .hero-bento {
    gap: 7px;
  }

  .bento-hero-tile {
    padding: 9px 10px;
    gap: 5px;
  }

  .bento-top-row {
    gap: 4px;
  }

  .bento-tag {
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .bento-live-pill {
    font-size: 0.68rem;
    gap: 3px;
  }

  .bento-title {
    font-size: 0.88rem;
    line-height: 1.26;
  }

  .bento-title-wide {
    font-size: 0.92rem;
    line-height: 1.26;
  }

  .bento-desc {
    font-size: 0.7rem;
    line-height: 1.32;
  }

  .dev-telemetry-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 5px 7px;
    gap: 3px 5px;
  }

  .tele-k {
    font-size: 0.58rem;
  }

  .tele-v {
    font-size: 0.68rem;
  }

  .crop-loop-stage {
    padding: 6px 8px 5px;
    gap: 3px;
  }

  .bento-actions-dual {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .tile-action-link {
    font-size: 0.72rem;
    gap: 3px;
  }

  .tile-action-chip {
    height: 24px;
    padding: 0 7px;
    font-size: 0.68rem;
    gap: 3px;
  }

  .bento-farm-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-gauge-panel {
    padding: 8px 10px;
    gap: 5px;
  }

  .hero-gauge-meta {
    font-size: 0.72rem;
    gap: 4px;
  }

  .hero-gauge-money strong {
    font-size: 0.86rem;
  }

  .hero-farm-cta-row {
    gap: 6px;
  }

  .hero-farm-cta-row .btn-sm {
    height: 29px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .story-section {
    padding-block: 38px 28px;
  }

  .bridge-timeline {
    padding-left: 36px;
  }

  .bridge-spine {
    left: 12px;
  }

  .bridge-node {
    padding: 13px 14px;
  }

  .bridge-node-marker {
    left: -36px;
    width: 26px;
    height: 26px;
    font-size: 0.76rem;
  }

  .dev-projects-grid,
  .rewards-grid,
  .calc-inputs-grid,
  .scale-compare-grid,
  .two-col-inputs {
    grid-template-columns: minmax(0, 1fr);
  }

  .bp-row-cells {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sticky-funding-bar {
    width: calc(100% - 16px);
    padding: 9px 10px 9px 12px;
    gap: 8px;
  }

  .sticky-status-top strong {
    font-size: 0.76rem;
  }

  .sticky-status-sub {
    font-size: 0.68rem;
  }

  .sticky-cta-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-sheet {
    border-radius: 22px 22px 0 0;
    max-height: 88dvh;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
}

/* Dev Subtabs, Search Toolbar, Idea Lab & Custom Order Studio */
.dev-subtabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.dev-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(150, 120, 80, 0.26);
  background: #ECE7DC;
}

.dev-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dev-subtab-btn.is-active {
  background: var(--accent-solid);
  color: var(--on-accent);
  font-weight: 800;
}

.subtab-count {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.09);
  color: #0A2850;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.dev-subtab-btn.is-active .subtab-count {
  background: rgba(250, 248, 240, 0.22);
  color: #FAF8F0;
}

.dev-subpanel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-subpanel[hidden] {
  display: none;
}

.dev-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pricing-filter-group,
.idea-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dev-search-wrap {
  position: relative;
  flex: 1 1 200px;
  max-width: 280px;
  min-width: 0;
}

.dev-search-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--ink-muted);
  pointer-events: none;
}

.dev-search-wrap input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-field);
  color: var(--ink-primary);
  font-size: 0.8rem;
}

.dev-search-wrap input::placeholder {
  color: #7B7468;
  opacity: 1;
}

.idea-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.idea-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(150, 120, 80, 0.26);
  background: #ECE7DC;
}

.idea-step-item i {
  font-size: 1.05rem;
  color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.idea-step-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-primary);
}

.idea-step-item p {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.dev-ideas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.idea-card {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idea-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.idea-card-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.idea-card-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.idea-split-note {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(150, 120, 80, 0.14);
  font-size: 0.75rem;
  color: #5C462A;
}

.idea-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.idea-author-meta {
  font-size: 0.74rem;
  color: var(--ink-muted);
  min-width: 0;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.vote-btn.is-voted {
  background: var(--accent-solid);
  border-color: transparent;
  color: var(--on-accent);
}

.idea-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.idea-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(166, 58, 50, 0.30);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.idea-delete-btn:hover {
  background: rgba(166, 58, 50, 0.15);
}

.idea-delete-btn.btn-danger-confirm {
  border-color: transparent;
}

.idea-delete-btn.btn-danger-confirm:hover {
  background: #882C26;
}

.idea-delete-btn:active,
.vote-btn:active {
  transform: scale(0.97);
}

.custom-flow-summary {
  border-radius: 12px;
  border: 1px solid rgba(150, 120, 80, 0.26);
  background: #ECE7DC;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.custom-flow-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.custom-flow-row span {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.custom-flow-row strong {
  font-size: 0.82rem;
  color: var(--ink-primary);
}

.legal-inline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.text-link-btn {
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: underline;
}

.text-link-btn:hover {
  color: var(--point-brown-deep);
}

.admin-rtdb-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1.5px solid #D97706;
  background: #FFF7E6;
  color: #7C2D12;
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 600;
}

.admin-rtdb-banner[hidden] {
  display: none;
}

.admin-rtdb-banner i {
  font-size: 1.2rem;
  color: #B91C1C;
  flex-shrink: 0;
  margin-top: 2px;
}

.admin-rtdb-banner code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(185, 28, 28, 0.10);
  color: #7F1D1D;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.admin-rtdb-banner.is-compact {
  margin-bottom: 0;
  padding: 10px 12px;
  font-size: 0.8rem;
}

.admin-rtdb-banner-body {
  flex: 1;
  min-width: 0;
}

.admin-rtdb-recheck-btn {
  flex-shrink: 0;
  align-self: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #B45309;
  background: #FFFFFF;
  color: #9A3412;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.admin-rtdb-recheck-btn:hover:not(:disabled) {
  background: #FFEDD5;
}

.admin-rtdb-recheck-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.modal-sheet-wide {
  width: min(640px, 100%);
}

.idea-modal-quota {
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(150, 120, 80, 0.14);
  color: #5C462A;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inquiry-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inquiry-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(10, 40, 80, 0.10);
  overflow: hidden;
}

.inquiry-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #967850;
  transition: width 0.25s ease;
}

.inquiry-step-labels {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.inquiry-step-labels span.is-active {
  color: #0A2850;
  font-weight: 800;
}

.inquiry-step-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inquiry-step-panel[hidden] {
  display: none;
}

.inquiry-step-heading {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.option-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.option-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-chip-btn {
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.option-chip-btn.is-selected {
  border-color: #0A2850;
  background: rgba(10, 40, 80, 0.08);
  color: #0A2850;
}

.inquiry-summary-box {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(150, 120, 80, 0.26);
  background: #ECE7DC;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  font-size: 0.78rem;
}

.inquiry-summary-box div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inquiry-summary-box span {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.inquiry-summary-box strong {
  color: var(--ink-primary);
}

.legal-body-scroll {
  max-height: 55dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.legal-section-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
}

.legal-section-item h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.legal-section-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  white-space: pre-line;
}

@media (max-width: 640px) {
  .dev-search-wrap {
    max-width: none;
    flex-basis: 100%;
  }

  .idea-steps-grid,
  .dev-ideas-grid,
  .option-grid-2,
  .inquiry-summary-box {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav {
    background: #0A2850;
  }

  .sticky-funding-bar {
    background: #FAF8F0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Horizontal 4-Panel Book-Spine Accordion Layout (Dark Theme)
   ========================================================= */
:root {
  --spine-w: 56px;
}

body.book-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--site-nav-h, 56px);
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

body.book-shell .site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  height: var(--site-nav-h, 56px);
  padding-top: env(safe-area-inset-top, 0px);
  background: #0A2850;
  border-bottom: 1px solid rgba(250, 248, 240, 0.16);
}

.book-accordion {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
}

.book-panel {
  flex: 1 1 0%;
  width: 25%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  position: relative;
  transition:
    flex-grow 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    flex-basis 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.book-accordion.has-open-panel > .book-panel:not(.is-open) {
  flex: 0 0 var(--spine-w);
  width: var(--spine-w);
  min-width: var(--spine-w);
}

.book-accordion.has-open-panel > .book-panel.is-open {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
}

.book-spine {
  flex: 0 0 var(--spine-w);
  width: var(--spine-w);
  min-width: var(--spine-w);
  height: 100%;
  padding: 16px 0;
  border: 0;
  border-right: 1px solid rgba(150, 120, 80, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  position: relative;
  z-index: 4;
  transition:
    flex-basis 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.32s ease,
    background-color 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease;
}

.book-accordion:not(.has-open-panel) > .book-panel > .book-spine {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  padding: 28px 12px calc(94px + env(safe-area-inset-bottom));
}

.book-accordion:not(.has-open-panel) > .book-panel:last-child > .book-spine {
  border-right: 0;
}

.book-panel.is-open > .book-spine {
  flex: 0 0 var(--spine-w);
  width: var(--spine-w);
  min-width: var(--spine-w);
  padding: 16px 0;
}

.book-panel.is-open + .book-panel > .book-spine {
  border-left: 1px solid rgba(150, 120, 80, 0.36);
}

.spine-dev {
  background: #F7F4EC;
  color: #0A2850;
}
.spine-dev:hover {
  background: #EFEADF;
  color: #0A2850;
}

.spine-farm {
  background: #F1ECE1;
  color: #0A2850;
}
.spine-farm:hover {
  background: #E8E0D1;
  color: #0A2850;
}

.spine-game {
  background: #ECE5D7;
  color: #0A2850;
}
.spine-game:hover {
  background: #E2D9C7;
  color: #0A2850;
}

.spine-reports {
  background: #E6DEC9;
  color: #0A2850;
}
.spine-reports:hover {
  background: #DCD2BA;
  color: #0A2850;
}

.book-panel.is-open > .book-spine {
  background: #0A2850;
  color: #FAF8F0;
  border-right-color: #0A2850;
}

.spine-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7A5F3C;
  opacity: 0.88;
  transition: font-size 0.28s ease, opacity 0.25s ease, color 0.25s ease;
}

.book-accordion:not(.has-open-panel) .spine-num {
  font-size: 0.88rem;
  opacity: 0.92;
}

.book-panel.is-open > .book-spine .spine-num {
  opacity: 1;
  color: #D8C2A3;
}

.spine-title {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  white-space: nowrap;
  transition: font-size 0.28s ease, letter-spacing 0.28s ease;
}

.book-accordion:not(.has-open-panel) .spine-title {
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
  letter-spacing: 0.22em;
}

html[lang='en'] .spine-title {
  text-orientation: mixed;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}

html[lang='en'] .book-accordion:not(.has-open-panel) .spine-title {
  font-size: clamp(0.92rem, 1.3vw, 1.12rem);
  letter-spacing: 0.18em;
}

.spine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #967850;
  opacity: 0.55;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.book-accordion:not(.has-open-panel) .spine-dot {
  opacity: 0.65;
}

.book-panel.is-open > .book-spine .spine-dot {
  opacity: 1;
  background: #C8AD88;
  box-shadow: none;
  transform: scale(1.15);
}

.book-body-clip {
  flex: 0 0 0px;
  width: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.book-panel.is-open > .book-body-clip {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scroll-behavior: smooth;
}

.book-body-clip .container {
  width: min(1100px, calc(100% - 56px));
}

.book-story-section {
  border-top: 0;
  padding-block: 28px calc(112px + env(safe-area-inset-bottom));
}

@media (max-width: 1160px) {
  .book-body-clip .card-span-8,
  .book-body-clip .card-span-7,
  .book-body-clip .card-span-6,
  .book-body-clip .card-span-5,
  .book-body-clip .card-span-4 {
    grid-column: span 12;
  }

  .book-body-clip .card-farm-vision,
  .book-body-clip .game-catalog-grid,
  .book-body-clip .sync-compare-grid {
    grid-template-columns: 1fr;
  }

  .book-body-clip .sync-arrow-bridge {
    transform: rotate(90deg);
    justify-self: center;
  }
}

@media (max-width: 959px) {
  :root {
    --spine-w: 44px;
  }

  .spine-title {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }
}

@media (max-width: 640px) {
  :root {
    --spine-w: 28px;
  }

  .book-spine {
    padding: 10px 0;
  }

  .book-accordion:not(.has-open-panel) > .book-panel > .book-spine {
    padding: 18px 6px calc(88px + env(safe-area-inset-bottom));
  }

  .book-accordion.has-open-panel .book-spine {
    padding: 10px 0;
  }

  .spine-num {
    font-size: 0.62rem;
  }

  .book-accordion:not(.has-open-panel) .spine-num {
    font-size: 0.72rem;
  }

  .spine-title {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .book-accordion:not(.has-open-panel) .spine-title {
    font-size: 0.92rem;
    letter-spacing: 0.15em;
  }

  html[lang='en'] .spine-title {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  html[lang='en'] .book-accordion:not(.has-open-panel) .spine-title {
    font-size: 0.74rem;
    letter-spacing: 0.11em;
  }

  .spine-dot {
    width: 5px;
    height: 5px;
  }

  .book-body-clip .container {
    width: calc(100% - 18px);
  }

  .book-story-section {
    padding-block: 16px calc(108px + env(safe-area-inset-bottom));
  }

  .book-body-clip .hero-bento,
  .book-body-clip .rewards-grid,
  .book-body-clip .calc-inputs-grid,
  .book-body-clip .scale-compare-grid,
  .book-body-clip .dev-projects-grid,
  .book-body-clip .cuisine-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-body-clip .bento-hero-tile,
  .book-body-clip .bento-wide {
    grid-column: span 1;
  }

  .book-body-clip .hero-farm-cta-row,
  .book-body-clip .card-actions {
    flex-wrap: wrap;
  }
}

/* =========================================================
   Header Google Auth & Ko-fi All-Pass Subscription UI
   ========================================================= */
.btn[hidden],
.nav-user-pill[hidden],
.nav-user-avatar[hidden],
.nav-user-badge[hidden],
.allpass-inline-form[hidden] {
  display: none !important;
}

.btn-allpass {
  background: #8A6C45;
  border-color: #7A5F3C;
  color: #FAF8F0;
}

.btn-allpass:hover {
  background: #755B39;
  border-color: #634C2F;
}

.btn-allpass.is-subscribed {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.btn-allpass.is-subscribed i {
  color: #D8C09E;
}

.btn-google-auth {
  background: #FAF8F0;
  border-color: rgba(10, 40, 80, 0.22);
  color: #0A2850;
}

.btn-google-auth:hover {
  background: #EFEBE1;
  border-color: rgba(10, 40, 80, 0.38);
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 5px 0 6px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.20);
  background: #F3EFE5;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
  max-width: 240px;
}

.nav-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-badge {
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.22);
  color: #6E5535;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.nav-logout-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(10, 40, 80, 0.07);
  color: #354A68;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-logout-btn:hover {
  background: rgba(166, 58, 50, 0.14);
  color: #8F2D26;
}

.allpass-status-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(150, 120, 80, 0.28);
  background: #ECE7DC;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.allpass-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}

.allpass-status-label {
  color: var(--ink-muted);
}

.allpass-status-row strong {
  color: var(--ink-primary);
  text-align: right;
  word-break: break-all;
}

.allpass-status-row strong.is-active {
  color: #0A2850;
}

.allpass-perks-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.allpass-perks-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.allpass-perks-list i {
  font-size: 1rem;
  color: #967850;
  margin-top: 2px;
  flex-shrink: 0;
}

.allpass-inline-form {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.allpass-admin-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.allpass-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.allpass-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #FCFBF7;
  color: #0A2850;
  font-size: 0.8rem;
}

.status-pill.is-allpass-unlocked {
  background: rgba(10, 40, 80, 0.10);
  color: #0A2850;
  border: 1px solid rgba(10, 40, 80, 0.22);
}

.status-pill.is-allpass-locked {
  background: rgba(150, 120, 80, 0.16);
  color: #6E5535;
  border: 1px solid rgba(150, 120, 80, 0.34);
}

@media (max-width: 640px) {
  .brand-link {
    gap: 6px;
  }

  .brand-mark-box {
    width: 26px;
    height: 26px;
  }

  .brand-wordmark {
    font-size: 0.92rem;
  }

  .nav-actions {
    gap: 4px;
    min-width: 0;
  }

  #header-allpass-btn,
  #header-google-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .pill-toggle {
    height: 28px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .nav-user-pill {
    height: 28px;
    padding: 0 4px 0 5px;
    gap: 4px;
  }

  .nav-user-avatar {
    width: 18px;
    height: 18px;
  }

  .nav-user-name {
    max-width: 64px;
    font-size: 0.7rem;
  }

  .nav-user-badge {
    display: none;
  }

  .nav-logout-btn {
    width: 20px;
    height: 20px;
  }
}

/* =========================================================
   devcustom Studio Program Page Migration (#section-dev)
   Official Brand Palette: #FAF8F0 (Paper) · #0A2850 (Navy) · #967850 (Brown)
   ========================================================= */
.devstudio-shell {
  padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.devstudio-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(250, 248, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.devstudio-topbar-inner {
  padding-block: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.devstudio-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.devstudio-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0A2850;
  font-weight: 800;
  flex-shrink: 0;
}

.devstudio-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #0A2850;
  color: #FAF8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.devstudio-brand-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0A2850;
}

.devstudio-total-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.16);
  color: #6E5535;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.devstudio-right,
.devstudio-sites-controls,
.devstudio-global-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.devstudio-sites-controls[hidden] {
  display: none !important;
}

.devstudio-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.devstudio-topbar .dev-search-wrap {
  position: relative;
  flex: 0 1 190px;
  min-width: 140px;
  max-width: 220px;
}

.devstudio-topbar .dev-search-wrap input {
  padding-right: 28px;
  border-radius: 10px;
}

.dev-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.dev-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #ECE7DC;
}

.dev-view-btn {
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}

.dev-view-btn.is-active {
  background: #FAF8F0;
  color: #0A2850;
}

.devstudio-main {
  padding-top: 22px;
  padding-bottom: 32px;
  flex: 1 0 auto;
}

.dev-popularity-strip {
  border-radius: 16px;
  border: 1px solid rgba(10, 40, 80, 0.16);
  background: #F4F0E6;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

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

.dev-pop-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0A2850;
}

.dev-pop-title i {
  color: #8A6C45;
  font-size: 1rem;
}

.dev-pop-note {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.dev-pop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 8px;
}

.dev-pop-card {
  border-radius: 12px;
  border: 1px solid rgba(10, 40, 80, 0.14);
  background: #FAF8F0;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.dev-pop-card:hover {
  border-color: #8A6C45;
  background: #FFFFFF;
}

.dev-pop-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dev-pop-card-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0A2850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-pop-card-host {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-pop-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.dev-pop-empty-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.site-pop-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #8A6C45;
  color: #FAF8F0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-card-metrics-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.devstudio-filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.devstudio-pricing-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
}

.dev-pricing-tab {
  border: 0;
  border-radius: 9px;
  padding: 6px 12px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.dev-pricing-tab.is-active {
  background: #0A2850;
  color: #FAF8F0;
}

.dev-pricing-count {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(10, 40, 80, 0.09);
  color: #0A2850;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.dev-pricing-tab.is-active .dev-pricing-count {
  background: rgba(250, 248, 240, 0.22);
  color: #FAF8F0;
}

.devstudio-paid-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(150, 120, 80, 0.30);
  background: #F4F0E6;
  color: var(--ink-secondary);
  font-size: 0.76rem;
  font-weight: 600;
}

.devstudio-paid-hint i {
  color: #967850;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Browser Window Program Cards Grid */
.site-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.site-board-empty {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 56px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.site-board-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #0A2850;
  color: #FAF8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.site-board-empty h4 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0A2850;
}

.site-board-empty p {
  margin: 0;
  max-width: 44ch;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.site-board-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.site-board-card {
  min-width: 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.16s ease;
}

.site-board-card:hover {
  border-color: var(--point-brown);
  transform: translateY(-2px);
}

.site-board-card.is-membership {
  border-color: rgba(150, 120, 80, 0.34);
}

.site-browser-bar {
  height: 36px;
  padding: 0 10px;
  background: #F4F0E6;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.site-window-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.site-window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(10, 40, 80, 0.20);
}

.site-url-pill {
  flex: 1 1 auto;
  min-width: 0;
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-secondary);
}

.site-url-pill > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-url-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #967850;
}

.site-url-dot.is-live {
  background: #0A2850;
}

.site-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.site-bar-icon-btn {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.site-bar-icon-btn:hover {
  background: rgba(10, 40, 80, 0.08);
  color: #0A2850;
}

.site-bar-icon-btn.is-danger:hover,
.site-bar-icon-btn.is-armed {
  background: rgba(166, 58, 50, 0.14);
  color: #8F2D26;
}

.site-copy-chip {
  height: 23px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.site-copy-chip.is-copied {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.site-viewport-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #ECE7DC;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.site-preview-stage,
.site-preview-empty {
  width: 100%;
  height: 100%;
  position: relative;
}

.site-preview-empty,
.site-preview-loader,
.site-preview-fallback {
  width: 100%;
  height: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: #EFEBE1;
  color: var(--ink-secondary);
}

.site-preview-loader[hidden],
.site-preview-fallback[hidden],
.site-preview-img[hidden] {
  display: none !important;
}

.site-preview-loader i {
  font-size: 1.25rem;
  color: #0A2850;
}

.site-preview-loader span,
.site-preview-empty span {
  font-size: 0.72rem;
  font-weight: 600;
}

.site-preview-loader small,
.site-preview-fallback small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.site-preview-fallback-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FAF8F0;
  border: 1px solid var(--border-subtle);
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.site-preview-fallback strong {
  font-size: 0.84rem;
  color: #0A2850;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-preview-retry {
  margin-top: 3px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-viewport-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(10, 40, 80, 0.90);
  color: #FAF8F0;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-viewport-badge i {
  color: #E2C9A6;
}

.site-viewport-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(10, 40, 80, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.site-board-card:hover .site-viewport-overlay,
.site-board-card:focus-within .site-viewport-overlay {
  opacity: 1;
  pointer-events: auto;
}

.site-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: space-between;
}

.site-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.site-card-title-col {
  min-width: 0;
  flex: 1;
}

.site-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.site-card-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #0A2850;
  cursor: pointer;
}

.site-card-title:hover {
  text-decoration: underline;
}

.site-badge-status,
.site-badge-membership,
.site-badge-free,
.site-badge-review {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-badge-status {
  background: rgba(10, 40, 80, 0.08);
  color: #0A2850;
}

.site-badge-membership {
  background: #0A2850;
  color: #FAF8F0;
}

.site-badge-free,
.site-badge-review {
  background: #ECE7DC;
  color: #354A68;
}

.site-card-desc {
  margin: 5px 0 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-launch-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: #0A2850;
  color: #FAF8F0;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-launch-btn:hover {
  background: #12386B;
}

.site-membership-box {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.site-membership-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0A2850;
}

.site-membership-title,
.site-membership-rev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-membership-title i {
  color: #967850;
}

.site-trial-note {
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  font-size: 0.73rem;
  color: var(--ink-secondary);
}

.site-latest-review {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.7rem;
}

.site-review-stars {
  color: #967850;
  font-weight: 800;
  flex-shrink: 0;
}

.site-review-quote {
  color: var(--ink-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.site-latest-review small {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.site-trial-cta {
  width: 100%;
  justify-content: center;
}

.site-membership-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.site-board-add-card {
  min-height: 220px;
  border-radius: var(--radius-card);
  border: 2px dashed rgba(150, 120, 80, 0.45);
  background: rgba(244, 240, 230, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.site-board-add-card:hover {
  border-color: #0A2850;
  background: #F4F0E6;
  color: #0A2850;
}

.site-board-add-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ECE7DC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* List View */
.site-list-panel {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.site-list-row {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.site-list-row:last-child {
  border-bottom: 0;
}

.site-list-row:hover {
  background: #FAF8F0;
}

.site-list-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1 1 280px;
}

.site-list-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  padding-top: 2px;
}

.site-list-info {
  min-width: 0;
  flex: 1;
}

.site-list-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.site-list-title-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: #0A2850;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
}

.site-list-title-btn:hover {
  text-decoration: underline;
}

.site-list-desc {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.site-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.site-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

/* Idea Lab Section Enhancements */
.idea-hero-panel {
  gap: 16px;
}

.idea-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.idea-hero-copy {
  min-width: 0;
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idea-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.idea-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #ECE7DC;
  color: #0A2850;
  font-size: 0.72rem;
  font-weight: 700;
}

.idea-badge-pill i {
  color: #967850;
}

.idea-hero-title {
  margin: 0;
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0A2850;
}

.idea-hero-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  max-width: 68ch;
}

.idea-admin-pending-banner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ECE7DC;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
  width: fit-content;
}

.idea-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex-shrink: 0;
}

.idea-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idea-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.devstudio-main .dev-ideas-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.idea-card.is-rejected {
  opacity: 0.62;
}

.idea-admin-review-bar {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #F4F0E6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0A2850;
}

.idea-admin-review-btns {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-xs {
  height: 26px;
  padding: 0 9px;
  font-size: 0.7rem;
}

.idea-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.idea-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #ECE7DC;
  color: #354A68;
  font-size: 0.68rem;
  font-weight: 700;
}

.idea-status-select {
  height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
  color: #0A2850;
  font-size: 0.68rem;
  font-weight: 700;
}

.idea-split-note strong {
  display: block;
  font-size: 0.7rem;
  color: #0A2850;
  margin-bottom: 2px;
}

.idea-trial-box {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.idea-trial-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0A2850;
}

.idea-trial-head > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.idea-trial-head i {
  color: #967850;
}

.idea-trial-note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.idea-trial-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.idea-trial-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: #FAF8F0;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.idea-author-meta strong {
  display: block;
  color: #0A2850;
  font-size: 0.76rem;
}

.idea-author-meta span {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* Studio Footer */
.devstudio-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #F4F0E6;
  padding-block: 16px;
}

.devstudio-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.devstudio-footer-meta,
.devstudio-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.devstudio-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0A2850;
}

.devstudio-footer-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #0A2850;
  color: #FAF8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
}

.devstudio-sep {
  color: rgba(10, 40, 80, 0.25);
}

.devstudio-mail-link {
  font-family: var(--font-mono);
  color: #0A2850;
  font-weight: 600;
  text-decoration: none;
}

.devstudio-mail-link:hover {
  text-decoration: underline;
}

.devstudio-copy-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Upgraded Program Detail & Review Modal */
.prog-detail-sheet {
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.prog-detail-head {
  padding: 18px 20px;
  background: #0A2850;
  color: #FAF8F0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.prog-detail-head-copy {
  min-width: 0;
  flex: 1;
}

.prog-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.prog-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(250, 248, 240, 0.14);
  color: #FAF8F0;
  font-size: 0.7rem;
  font-weight: 700;
}

.prog-detail-head .modal-kicker {
  color: #D8C09E;
}

.prog-detail-head h2 {
  margin: 0;
  color: #FAF8F0;
  font-size: 1.18rem;
}

.prog-detail-url {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #D8C2A3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prog-detail-close {
  background: rgba(250, 248, 240, 0.14);
  border-color: rgba(250, 248, 240, 0.24);
  color: #FAF8F0;
  flex-shrink: 0;
}

.prog-detail-close:hover {
  background: rgba(250, 248, 240, 0.24);
}

.prog-detail-sheet > *:not(.prog-detail-head) {
  margin-inline: 20px;
}

.prog-detail-sheet > *:last-child {
  margin-bottom: 20px;
}

.prog-detail-allpass-box {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #ECE7DC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.prog-detail-allpass-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: #0A2850;
}

.prog-detail-allpass-title i {
  color: #967850;
}

.prog-detail-allpass-box p {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.prog-detail-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prog-detail-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.prog-detail-box {
  margin: 0;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  white-space: pre-line;
}

.prog-detail-box.is-strong {
  font-weight: 700;
  color: #0A2850;
}

.prog-detail-guide-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.prog-detail-guide-box i {
  color: #967850;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.prog-reviews-section {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-reviews-heading {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prog-review-form {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prog-review-meta-row,
.prog-review-submit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.prog-review-meta-row input {
  width: 150px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
  font-size: 0.78rem;
}

.prog-review-submit-row input {
  flex: 1 1 200px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
  font-size: 0.8rem;
}

.prog-review-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
}

.star-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(10, 40, 80, 0.20);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
}

.star-btn.is-lit {
  color: #967850;
}

.prog-reviews-list {
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prog-review-item {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.prog-review-body {
  min-width: 0;
  flex: 1;
}

.prog-review-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
}

.prog-review-item-head small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.prog-review-body p {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.prog-review-form[hidden],
.prog-review-already-notice[hidden] {
  display: none !important;
}

.prog-review-already-notice {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(10, 40, 80, 0.14);
  background: #F4F0E6;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.45;
}

.prog-review-item.is-mine {
  border-color: rgba(150, 120, 80, 0.45);
  background: #FCFBF7;
}

.prog-review-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.prog-review-mine-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: #0A2850;
  color: #FCFBF7;
  font-size: 0.64rem;
  font-weight: 800;
}

.prog-review-edited-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #967850;
}

.prog-review-edit-done-tag {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  color: var(--ink-muted);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.prog-review-edit-box {
  margin-top: 7px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-review-edit-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
}

.prog-review-edit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.prog-review-edit-input {
  flex: 1 1 180px;
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #FCFBF7;
  font-size: 0.78rem;
}

.prog-reviews-empty {
  padding: 16px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  background: #F4F0E6;
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.prog-detail-legal-notice {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #ECE7DC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.prog-pricing-box {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prog-paid-fields {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-summary-banner {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #ECE7DC;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.legal-summary-banner strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0A2850;
  font-size: 0.82rem;
}

.legal-summary-banner p {
  margin: 0;
}

@media (max-width: 1160px) {
  .site-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .devstudio-main .dev-ideas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .devstudio-topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .devstudio-left,
  .devstudio-right,
  .devstudio-sites-controls,
  .devstudio-global-actions {
    width: 100%;
  }

  .devstudio-topbar .dev-subtabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .devstudio-topbar .dev-subtab-btn {
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .devstudio-topbar .dev-search-wrap {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }

  .devstudio-pricing-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dev-pricing-tab {
    justify-content: center;
    padding: 6px 6px;
    font-size: 0.72rem;
  }

  .site-board-grid,
  .devstudio-main .dev-ideas-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .idea-hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-membership-actions,
  .idea-trial-actions,
  .prog-detail-legal-notice {
    grid-template-columns: minmax(0, 1fr);
    flex-direction: column;
    align-items: stretch;
  }

  .prog-detail-head {
    padding: 14px 16px;
  }

  .prog-detail-sheet > *:not(.prog-detail-head) {
    margin-inline: 14px;
  }
}

/* =========================================================
   Navy Sticky Header Controls + Stage 1 Entry Intro Page + Stage 2 Hub Workspace
   ========================================================= */
.site-nav .btn-allpass {
  background: #967850;
  border-color: #967850;
  color: #FAF8F0;
}

.site-nav .btn-allpass:hover {
  background: #A88960;
  border-color: #A88960;
}

.site-nav .btn-allpass.is-subscribed {
  background: rgba(150, 120, 80, 0.30);
  border-color: #D2BA99;
  color: #FAF8F0;
}

.site-nav .btn-allpass.is-subscribed i {
  color: #E6CFAF;
}

.site-nav .btn-google-auth {
  background: #FAF8F0;
  border-color: #FAF8F0;
  color: #0A2850;
}

.site-nav .btn-google-auth:hover {
  background: #EFEADF;
  border-color: #EFEADF;
}

.site-nav .nav-user-pill {
  background: rgba(250, 248, 240, 0.12);
  border-color: rgba(250, 248, 240, 0.28);
  color: #FAF8F0;
}

.site-nav .nav-user-badge {
  background: #967850;
  color: #FAF8F0;
}

.site-nav .nav-logout-btn {
  background: rgba(250, 248, 240, 0.16);
  color: #FAF8F0;
}

.site-nav .nav-logout-btn:hover {
  background: rgba(198, 72, 62, 0.44);
  color: #FAF8F0;
}

.site-nav .pill-toggle {
  background: rgba(250, 248, 240, 0.10);
  border-color: rgba(250, 248, 240, 0.26);
  color: #FAF8F0;
}

.site-nav .pill-toggle:hover {
  background: rgba(250, 248, 240, 0.20);
  border-color: rgba(250, 248, 240, 0.45);
}

/* Stage 1: Entry Full-Sheet Intro Page */
.landing-intro-sheet {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - var(--site-nav-h, 56px));
  background: #FAF8F0;
  border-bottom: 1px solid rgba(150, 120, 80, 0.28);
  display: flex;
  flex-direction: column;
}

.landing-intro-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: min(1220px, calc(100% - 36px));
  margin-inline: auto;
  padding-block: clamp(12px, 1.8vh, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(10px, 1.5vh, 16px);
}

.landing-intro-head {
  display: block;
}

.landing-intro-copy {
  min-width: 0;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: #F1ECE1;
  border: 1px solid rgba(150, 120, 80, 0.34);
  color: #6E5535;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.landing-eyebrow i {
  color: #8A6C45;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.landing-eyebrow span {
  min-width: 0;
  overflow-wrap: break-word;
}

.landing-title {
  margin: 0;
  max-width: 860px;
  font-size: clamp(1.38rem, 2.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.028em;
  color: #0A2850;
  text-wrap: balance;
}

/* Dual Live Ranking Board inside Stage 1 Hero Space */
.landing-live-rankings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.ranking-board-card {
  border-radius: 18px;
  border: 1px solid rgba(150, 120, 80, 0.30);
  background: #F4F0E6;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ranking-board-card.ranking-board-pledges {
  border-color: rgba(138, 108, 69, 0.42);
}

.ranking-board-card.ranking-board-programs {
  border-color: rgba(10, 40, 80, 0.22);
}

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

.ranking-board-title-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ranking-board-title-wrap i {
  font-size: 1rem;
  color: #8A6C45;
  flex-shrink: 0;
}

.ranking-board-programs .ranking-board-title-wrap i {
  color: #0A2850;
}

.ranking-board-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #0A2850;
}

.ranking-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.14);
  background: #FAF8F0;
  color: #354A68;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ranking-seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.16);
  background: #FAF8F0;
  flex-shrink: 0;
}

.ranking-seg-btn {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  background: transparent;
  color: #354A68;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.ranking-seg-btn:hover {
  color: #0A2850;
  background: rgba(10, 40, 80, 0.06);
}

.ranking-seg-btn.is-active {
  background: #0A2850;
  color: #FAF8F0;
}

.ranking-board-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 162px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 108, 69, 0.45) transparent;
}

.ranking-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  background: #FAF8F0;
  border: 1px solid rgba(10, 40, 80, 0.11);
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.ranking-row.is-interactive {
  cursor: pointer;
}

.ranking-row.is-interactive:hover {
  border-color: #8A6C45;
  background: #FFFFFF;
}

.ranking-row.is-placeholder {
  border-style: dashed;
  border-color: rgba(150, 120, 80, 0.36);
  background: rgba(250, 248, 240, 0.78);
}

.ranking-row-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.rank-num-badge {
  min-width: 28px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: #EFEADF;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.rank-num-badge.is-top1 {
  background: #8A6C45;
  color: #FAF8F0;
}

.rank-num-badge.is-top2 {
  background: #0A2850;
  color: #FAF8F0;
}

.rank-num-badge.is-top3 {
  background: #6E5535;
  color: #FAF8F0;
}

.ranking-row-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ranking-row-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ranking-name {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0A2850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-country-chip {
  font-size: 0.66rem;
  font-weight: 700;
  color: #6E5535;
  white-space: nowrap;
  flex-shrink: 0;
}

.ranking-submeta {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ranking-plot-chip {
  padding: 2px 6px;
  border-radius: 6px;
  background: #EFEADF;
  border: 1px solid rgba(138, 108, 69, 0.28);
  color: #6E5535;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.ranking-metrics {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0A2850;
  white-space: nowrap;
}

.ranking-cat-chip {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(10, 40, 80, 0.08);
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.ranking-visit-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(10, 40, 80, 0.06);
  color: #354A68;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.prog-like-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.20);
  background: #FAF8F0;
  color: #0A2850;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.prog-like-btn:hover {
  background: #EFEADF;
  border-color: #8A6C45;
}

.prog-like-btn:active {
  transform: scale(0.96);
}

.prog-like-btn.is-liked {
  background: #C93B4B;
  border-color: #C93B4B;
  color: #FAF8F0;
}

.prog-like-btn.is-liked:hover {
  background: #B02E3D;
  border-color: #B02E3D;
}

.btn.is-copied {
  background: #EAF6EF;
  border-color: #2E7D57;
  color: #1B5E3F;
}

.ranking-launch-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(10, 40, 80, 0.18);
  background: #0A2850;
  color: #FAF8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: background-color 0.16s ease;
}

.ranking-launch-icon:hover {
  background: #12386B;
}

.ranking-board-foot {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.ranking-flags-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.ranking-flags-strip .nation-flag-svg {
  width: 18px;
  height: 13px;
}

.ranking-flags-more {
  font-size: 0.67rem;
  font-weight: 700;
  color: #6E5535;
  margin-left: 2px;
  white-space: nowrap;
}

.ranking-foot-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.ranking-foot-note i {
  color: #8A6C45;
  font-size: 0.8rem;
}

.ranking-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ranking-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.18);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.69rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.ranking-foot-link:hover {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.ranking-foot-link.is-admin {
  border-color: rgba(138, 108, 69, 0.42);
  color: #6E5535;
}

.ranking-foot-link.is-admin:hover {
  background: #8A6C45;
  border-color: #8A6C45;
  color: #FAF8F0;
}

/* 3-Column Connected Pillars Grid */
.landing-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.landing-pillar-card {
  border-radius: 18px;
  border: 1px solid rgba(150, 120, 80, 0.30);
  background: #F4F0E6;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.landing-pillar-card:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 40, 80, 0.34);
  background: #F0ECE0;
}

.landing-pillar-card.pillar-farm {
  border-color: rgba(138, 108, 69, 0.45);
}

.pillar-visual {
  position: relative;
  height: clamp(86px, 11vh, 120px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(10, 40, 80, 0.14);
  background: #0A2850;
}

.pillar-visual-dev {
  background: #FAF8F0;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(10, 40, 80, 0.10);
}

.pillar-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.pillar-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(10, 40, 80, 0.26);
  display: inline-block;
}

.pillar-dots i:first-child {
  background: #8A6C45;
}

.pillar-host {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #354A68;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pillar-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pillar-chip-cloud span {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #EFEADF;
  border: 1px solid rgba(10, 40, 80, 0.14);
  color: #0A2850;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.pillar-visual-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pillar-visual-map {
  background: #E8ECEF;
  position: relative;
}

.pillar-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pillar-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 40, 80, 0.08) 0%, rgba(10, 40, 80, 0.56) 100%);
}

.pillar-photo-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(250, 248, 240, 0.94);
  color: #0A2850;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pillar-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pillar-num-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.09);
  color: #0A2850;
}

.pillar-num-tag.tag-brown {
  background: rgba(150, 120, 80, 0.20);
  color: #6E5535;
}

.pillar-live-stat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.pillar-live-stat strong {
  color: #0A2850;
}

.pillar-live-stat-game {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.pillar-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(10, 40, 80, 0.28);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.pillar-live-dot.is-online {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

.game-visits-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.16);
  background: rgba(250, 248, 240, 0.92);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game-visits-pill strong {
  color: #0A2850;
  font-weight: 800;
}

.pillar-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: #0A2850;
}

.pillar-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.pillar-mini-gauge {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.12);
  overflow: hidden;
}

.pillar-mini-fill {
  height: 100%;
  min-width: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #7A5F3C, #967850);
  transition: width 0.35s ease;
}

.pillar-card-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pillar-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 12px;
  max-width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.22);
  background: #FAF8F0;
  color: #0A2850;
  font-size: 0.76rem;
  font-weight: 800;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pillar-jump-btn:hover {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.pillar-play-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 12px;
  max-width: 100%;
  border-radius: var(--radius-pill);
  background: #8A6C45;
  color: #FAF8F0;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  transition: background-color 0.18s ease;
}

.pillar-play-link:hover {
  background: #745A38;
}

/* Stage 2: Lower 4-Spine Accordion + Bottom Gauge Workspace */
.hub-workspace-stage {
  height: calc(100vh - 56px);
  height: calc(100dvh - var(--site-nav-h, 56px));
  min-height: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid rgba(150, 120, 80, 0.30);
  background: var(--bg-paper);
}

body.book-shell:not(.is-in-workspace) .sticky-funding-bar {
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 960px) and (min-height: 760px) {
  .landing-intro-sheet {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - var(--site-nav-h, 56px));
  }
}

@media (max-width: 959px) {
  .landing-live-rankings-grid {
    grid-template-columns: 1fr;
  }

  .landing-pillars-grid {
    grid-template-columns: 1fr;
  }

  .pillar-visual {
    height: 124px;
  }
}

@media (max-width: 640px) {
  .landing-intro-frame {
    width: calc(100% - 24px);
    padding-block: 14px 20px;
    gap: 12px;
  }

  .ranking-board-card {
    padding: 11px 12px;
  }

  .ranking-board-list {
    max-height: 196px;
  }

  .landing-eyebrow {
    border-radius: 12px;
    font-size: 0.68rem;
    line-height: 1.35;
    padding: 6px 11px;
  }

  .landing-title {
    font-size: 1.24rem;
  }

  .landing-pillar-card {
    padding: 12px;
  }
}

/* =========================================================
   04. Daily Work Reports & Diary Feed (#section-reports)
   Official Brand Palette: #FAF8F0 (Paper) · #0A2850 (Navy) · #967850 (Brown)
   ========================================================= */
.reports-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 36px;
}

#reports-category-filters {
  gap: 8px;
}

.reports-intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.reports-subtitle {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.reports-latest-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(150, 120, 80, 0.34);
  background: #F2EDE1;
  color: #6E5535;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reports-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-diary-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.report-diary-card:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 40, 80, 0.28);
  background: #F6F2E8;
}

.report-date-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 14px;
  background: #F1ECE1;
  border: 1px solid rgba(150, 120, 80, 0.32);
  text-align: center;
  align-self: flex-start;
  min-width: 0;
}

.report-date-ym {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #6E5535;
  letter-spacing: 0.03em;
}

.report-date-day {
  font-family: var(--font-mono);
  font-size: 1.56rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0A2850;
  margin-block: 2px;
}

.report-date-weekday {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.report-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.report-card-meta-left {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.report-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-cat-badge.cat-program {
  background: #0A2850;
  color: #FAF8F0;
}

.report-cat-badge.cat-farm {
  background: #8A6C45;
  color: #FAF8F0;
}

.report-cat-badge.cat-game {
  background: #DCE3ED;
  color: #0A2850;
  border: 1px solid rgba(10, 40, 80, 0.18);
}

.report-cat-badge.cat-daily {
  background: #EDE6D8;
  color: #5C462A;
  border: 1px solid rgba(150, 120, 80, 0.34);
}

.report-author-note {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.report-card-body-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-card-copy {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-card-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.35;
  color: #0A2850;
  cursor: pointer;
}

.report-card-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-card-summary {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
  color: #6E5535;
}

.report-card-excerpt {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--ink-secondary);
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-thumb-btn {
  flex: 0 0 132px;
  width: 132px;
  height: 94px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(150, 120, 80, 0.30);
  overflow: hidden;
  background: #EFEADF;
}

.report-card-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.report-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(150, 120, 80, 0.22);
}

.report-card-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

/* Report Detail Reader Modal */
.report-detail-sheet {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-detail-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.report-detail-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.report-detail-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.32;
  color: #0A2850;
}

.report-detail-summary {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #F1ECE1;
  border-left: 3px solid #8A6C45;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
  color: #5C462A;
}

.report-detail-image-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(150, 120, 80, 0.30);
  background: #EFEADF;
  max-height: 360px;
}

.report-detail-image-wrap img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.report-detail-body {
  font-size: 0.92rem;
  line-height: 1.78;
  color: var(--ink-primary);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.report-detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.report-detail-foot-left,
.report-detail-foot-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.report-detail-author {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Report Editor Photo Input & Preview */
.report-photo-inputs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.report-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.24);
  background: #F3EFE5;
  color: #0A2850;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.report-upload-btn:hover {
  background: #E8E0D0;
}

.report-image-preview-wrap {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
}

.report-image-preview-wrap img {
  width: 96px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(150, 120, 80, 0.25);
}

@media (max-width: 640px) {
  .report-diary-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .report-date-stamp {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 12px;
  }

  .report-date-day {
    font-size: 1.05rem;
    margin-block: 0;
  }

  .report-card-body-row {
    flex-direction: column;
  }

  .report-card-thumb-btn {
    flex: none;
    width: 100%;
    height: 150px;
  }

  .report-photo-inputs {
    grid-template-columns: 1fr;
  }

  .prog-image-preview-wrap {
    align-items: flex-start;
  }

  .prog-image-preview-wrap img {
    width: 100%;
    max-width: 240px;
  }
}

/* =========================================================
   dailyplant Nation Concept UI (Passport, Flags, Plaques & Leaderboard)
   Official Palette Only: #FAF8F0 (Paper) · #0A2850 (Navy) · #967850 (Brown)
   ========================================================= */
.brand-territory-pill {
  margin-left: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(250, 248, 240, 0.24);
  background: rgba(250, 248, 240, 0.10);
  color: #E6CFAF;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nation-charter-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.nation-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10, 40, 80, 0.16);
  background: #F3EFE5;
  color: #0A2850;
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.nation-pill i {
  color: #8A6C45;
  font-size: 0.82rem;
}

.nation-pill-link {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.nation-pill-link:hover,
.nation-pill-link:focus-visible {
  border-color: rgba(150, 120, 80, 0.55);
  background: #EAE2D1;
  transform: translateY(-1px);
  outline: none;
}

.nation-pill-link i:last-child {
  font-size: 0.74rem;
  opacity: 0.78;
}

.pillar-passport-btn {
  background: #0A2850;
  border: 0;
  color: #FAF8F0;
}

.pillar-passport-btn:hover {
  background: #12386B;
}

.modal-sheet-passport {
  width: min(620px, 100%);
}

/* =========================================================
   Realistic Passport Inner Page Specimen (진짜 여권 내지 디자인)
   ========================================================= */
.passport-page-specimen {
  position: relative;
  border-radius: 14px;
  border: 1.5px solid #C8B99F;
  /* 실제 여권 내지의 미세 보안 기요셰(Guilloche) 패턴 + 웜 크림 페이퍼 질감 */
  background:
    radial-gradient(circle at 50% 30%, rgba(10, 40, 80, 0.03) 0%, transparent 65%),
    repeating-linear-gradient(45deg, rgba(150, 120, 80, 0.035) 0px, rgba(150, 120, 80, 0.035) 1px, transparent 1px, transparent 6px),
    repeating-linear-gradient(-45deg, rgba(10, 40, 80, 0.025) 0px, rgba(10, 40, 80, 0.025) 1px, transparent 1px, transparent 6px),
    #FAF7F0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 4px rgba(150, 120, 80, 0.15),
    0 4px 18px rgba(10, 40, 80, 0.12);
  color: #1A2838;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 상단 여권 헤더 줄 */
.passport-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #D6C8B0;
  position: relative;
}

.passport-page-header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(150, 120, 80, 0.25);
}

.passport-emblem-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.passport-gold-emblem {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #A8874D;
  background: radial-gradient(circle, #FCF8EE 30%, #E8D7B5 100%);
  box-shadow: 0 1px 4px rgba(150, 120, 80, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.passport-gold-emblem img {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.passport-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.passport-country-en {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #0A2850;
}

.passport-country-kr {
  font-size: 0.78rem;
  font-weight: 800;
  color: #7A5F3C;
  letter-spacing: -0.01em;
}

.passport-type-badge {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.passport-type-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #0A2850;
  letter-spacing: 0.05em;
}

.passport-iso-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #8A6C45;
}

/* 본문 레이아웃 (좌측 사진/도장 + 우측 인적사항 필드) */
.passport-page-body {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.passport-photo-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.passport-photo-box {
  width: 104px;
  height: 130px;
  border-radius: 6px;
  border: 1.5px solid #B8A68B;
  background: #EFE9DC;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passport-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.passport-photo-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #8A7255;
  text-align: center;
}

.passport-photo-fallback i {
  font-size: 2.2rem;
  opacity: 0.55;
}

.passport-photo-fallback span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.passport-stamp-seal {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px dashed rgba(168, 56, 48, 0.6);
  background: rgba(186, 68, 58, 0.06);
  color: #9C342C;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-2deg);
}

.passport-stamp-seal i {
  font-size: 1rem;
}

/* 우측 필드 그리드 */
.passport-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  align-content: start;
}

.passport-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-bottom: 3px;
  border-bottom: 1px dotted rgba(150, 120, 80, 0.35);
}

.passport-field.p-field-full {
  grid-column: 1 / -1;
}

.p-field-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #8A6C45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.p-field-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0A2850;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.p-field-no {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: #9C342C;
}

.p-field-name {
  font-size: 0.88rem;
  color: #0A2850;
}

.p-field-status {
  color: #7A5F3C;
}

.p-field-status.is-active {
  color: #0F5B38;
}

/* 하단 MRZ 판독 영역 */
.passport-mrz-zone {
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #EFE9DB;
  border: 1px solid #D4C5AD;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 48px;
}

.p-mrz-line {
  font-family: "Courier New", Courier, monospace, var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #1C2E42;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  display: block;
  line-height: 1.25;
}

@media (max-width: 540px) {
  .passport-page-specimen {
    padding: 14px 12px 10px;
    gap: 10px;
  }

  .passport-page-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .passport-type-badge {
    text-align: left;
  }

  .passport-page-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .passport-photo-zone {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
  }

  .passport-photo-box {
    width: 72px;
    height: 92px;
  }

  .passport-stamp-seal {
    width: auto;
    flex: 1 1 auto;
  }

  .p-field-val {
    font-size: 0.74rem;
  }

  .passport-mrz-zone {
    padding: 8px 10px;
    overflow: hidden;
  }

  .p-mrz-line {
    font-size: clamp(0.45rem, 2.3vw, 0.62rem);
    letter-spacing: 0.02em;
  }
}

/* Blueprint Solo vs Joint Cells & SVG Flags */
.bp-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.bp-cell.is-full-joint {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.swatch-joint {
  background: #0A2850;
  border-color: #0A2850;
}

.bp-cell-meta {
  font-size: 0.56rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(250, 248, 240, 0.24);
  color: inherit;
  line-height: 1.1;
}

.bp-cell.is-partial .bp-cell-meta {
  background: rgba(10, 40, 80, 0.14);
  color: #0A2850;
}

.nation-flag-svg {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  border: 1px solid rgba(10, 40, 80, 0.20);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  background: #FAF8F0;
}

/* Territory Engraved Plaque inside Plot Inspector */
.territory-plaque-card {
  border-radius: 14px;
  border: 1.5px solid rgba(138, 108, 69, 0.52);
  background: #F1ECE0;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.territory-plaque-card.mode-solo {
  border-color: #8A6C45;
  background: #EFE7D5;
}

.territory-plaque-card.mode-joint {
  border-color: #0A2850;
  background: #EEF1F6;
}

.plaque-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(138, 108, 69, 0.38);
}

.plaque-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
}

.plaque-mode-pill.solo {
  background: #8A6C45;
  color: #FAF8F0;
}

.plaque-mode-pill.joint {
  background: #0A2850;
  color: #FAF8F0;
}

.plaque-mode-pill.partial {
  background: rgba(150, 120, 80, 0.24);
  color: #5C462A;
}

.plaque-addr {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.plaque-shares-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plaque-share-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(250, 248, 240, 0.85);
  border: 1px solid rgba(10, 40, 80, 0.10);
}

.plaque-share-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.plaque-share-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plaque-share-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.8rem;
  color: #0A2850;
}

.plaque-country-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6E5535;
}

.plaque-channel-badge {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.08);
  color: #0A2850;
}

.plaque-channel-badge.ch-game {
  background: rgba(150, 120, 80, 0.22);
  color: #5C462A;
}

.plaque-share-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

.plaque-share-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: #0A2850;
}

.plaque-del-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(166, 58, 50, 0.28);
  background: rgba(166, 58, 50, 0.08);
  color: #8F2D26;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.plaque-del-btn:hover {
  background: #9E352E;
  color: #FAF8F0;
}

/* Country Leaderboard & Territory Plaque Registry Card (3B-3) */
.card-nation-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-subtitle-sm {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

.nation-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.nation-kpi-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #F2EDE1;
  border: 1px solid rgba(150, 120, 80, 0.28);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nation-kpi-item span {
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.nation-kpi-item strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0A2850;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

.nation-kpi-link {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  align-items: stretch;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.nation-kpi-link:hover,
.nation-kpi-link:focus-visible {
  border-color: #8A6C45;
  background: #EAE2D1;
  transform: translateY(-1px);
  outline: none;
}

.nation-kpi-label {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.nation-kpi-map-cue {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.16);
  color: #7A5F3C;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.nation-kpi-map-cue span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.nation-stats-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nation-col-box {
  padding: 13px 14px;
  border-radius: 14px;
  background: #FAF8F0;
  border: 1px solid rgba(10, 40, 80, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

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

.nation-col-heading {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0A2850;
}

.nation-col-heading i {
  color: #8A6C45;
  font-size: 1rem;
}

.nation-leaderboard-list,
.nation-recent-plaques {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nation-rank-row {
  padding: 8px 10px;
  border-radius: 11px;
  background: #F4F0E6;
  border: 1px solid rgba(150, 120, 80, 0.24);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nation-rank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nation-rank-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0A2850;
}

.nation-rank-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #8A6C45;
  min-width: 18px;
}

.nation-rank-metrics {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: #0A2850;
  white-space: nowrap;
}

.nation-rank-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(10, 40, 80, 0.10);
  overflow: hidden;
}

.nation-rank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0A2850, #8A6C45);
}

.recent-plaque-item {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 11px;
  background: #F4F0E6;
  border: 1px solid rgba(150, 120, 80, 0.26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.recent-plaque-item:hover {
  border-color: #0A2850;
  background: #EDE7D9;
}

.recent-plaque-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.recent-plaque-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.recent-plaque-info strong {
  font-size: 0.8rem;
  color: #0A2850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-plaque-info span {
  font-size: 0.7rem;
  color: var(--ink-secondary);
}

.recent-plaque-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.recent-plaque-plot {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(10, 40, 80, 0.09);
  color: #0A2850;
}

.recent-plaque-amt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: #6E5535;
}

.nation-empty-note {
  padding: 16px 14px;
  border-radius: 11px;
  border: 1px dashed rgba(150, 120, 80, 0.42);
  background: #F4F0E6;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* Google Map Territory Location Card (3B-4) */
/* Passport-Free & Donae-ri Link Banner in 03 농사게임 */
.game-passport-free-banner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.game-banner-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(150, 120, 80, 0.34);
  background: #F3EFE5;
}

.game-banner-item i {
  font-size: 1.2rem;
  color: #0A2850;
  flex-shrink: 0;
  margin-top: 2px;
}

.game-banner-item strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0A2850;
  margin-bottom: 2px;
}

.game-banner-item span {
  display: block;
  font-size: 0.76rem;
  line-height: 1.48;
  color: var(--ink-secondary);
}

@media (max-width: 959px) {
  .nation-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nation-stats-columns,
  .game-passport-free-banner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nation-kpi-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .nation-charter-strip {
    gap: 5px;
  }

  .nation-pill {
    max-width: 100%;
    border-radius: 10px;
    font-size: 0.66rem;
    line-height: 1.35;
    white-space: normal;
  }

  .nation-pill i {
    flex-shrink: 0;
  }
}

/* =========================================================
   Seasonal Field Diary (R1~R4 Admin-Only Writable Feed)
   ========================================================= */
.diary-season-hint {
  margin: -4px 0 12px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.diary-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.16);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.tab-pill.is-active .diary-tab-count {
  background: rgba(250, 248, 240, 0.20);
}

.field-diary-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.field-diary-empty {
  padding: 20px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(150, 120, 80, 0.42);
  background: #F4F0E6;
  text-align: center;
}

.field-diary-empty-title {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 800;
  color: #0A2850;
}

.field-diary-empty p {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.field-diary-empty .btn {
  margin-top: 12px;
}

.field-diary-entry {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: #FCF9F2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.fdiary-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.fdiary-season-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: #0A2850;
  color: #FAF8F0;
  font-size: 0.70rem;
  font-weight: 700;
}

.fdiary-crops-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(150, 120, 80, 0.40);
  background: rgba(150, 120, 80, 0.11);
  color: #7A5E3B;
  font-size: 0.72rem;
  font-weight: 700;
}

.fdiary-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.fdiary-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: #0A2850;
  line-height: 1.4;
}

.fdiary-body {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.62;
  color: var(--ink-secondary);
  white-space: pre-line;
}

.fdiary-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(150, 120, 80, 0.24);
}

.fdiary-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(150, 120, 80, 0.18);
}

/* =========================================================
   Editorial Modal & Form Controls Polish
   Palette: #FAF8F0 (Paper) · #0A2850 (Navy) · #967850 (Brown)
   ========================================================= */
.modal-sheet-wide {
  width: min(660px, 100%);
  padding: 24px 26px;
  gap: 16px;
}

.modal-header,
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(150, 120, 80, 0.24);
}

.modal-header h2,
.modal-head h2,
.modal-head h3 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: #0A2850;
}

.modal-header .icon-btn,
.modal-head .icon-btn {
  flex-shrink: 0;
}

.modal-kicker,
.modal-head .badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  margin-bottom: 6px;
  border-radius: var(--radius-pill);
  background: rgba(150, 120, 80, 0.14);
  border: 1px solid rgba(150, 120, 80, 0.30);
  color: #7A5E3B;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.contact-form,
.inquiry-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.two-col-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field,
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 0.80rem;
  font-weight: 800;
  color: #0A2850;
}

.form-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.field-group input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.field-group select,
.field-group textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.88rem;
  color: #0A2850;
  background: #FCFBF7;
  border: 1px solid rgba(150, 120, 80, 0.42);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-field textarea,
.field-group textarea {
  min-height: 132px;
  line-height: 1.62;
  resize: vertical;
}

#report-input-content {
  min-height: 168px;
}

.form-field input:not([type="file"]):hover,
.form-field select:hover,
.form-field textarea:hover,
.field-group input:not([type="file"]):hover,
.field-group select:hover,
.field-group textarea:hover {
  border-color: rgba(10, 40, 80, 0.44);
}

.form-field input:not([type="file"]):focus,
.form-field select:focus,
.form-field textarea:focus,
.field-group input:not([type="file"]):focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  background: #FFFFFF;
  border-color: #0A2850;
  box-shadow: 0 0 0 3px rgba(10, 40, 80, 0.10);
}

.report-photo-inputs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 120, 80, 0.45);
  background: #F3EFE5;
}

.report-upload-btn {
  height: 40px;
  background: #FAF8F0;
}

.prog-preview-upload-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 120, 80, 0.45);
  background: #F3EFE5;
}

.prog-preview-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-upload-btn.is-capture {
  background: #0A2850;
  border-color: #0A2850;
  color: #FAF8F0;
}

.report-upload-btn.is-capture:hover:not(:disabled) {
  background: #133B73;
}

.report-upload-btn.is-capture:disabled {
  opacity: 0.65;
  cursor: wait;
}

.prog-image-preview-wrap {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #F4F0E6;
}

.prog-image-preview-wrap[hidden] {
  display: none;
}

.prog-image-preview-wrap img {
  width: 128px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 1px solid rgba(150, 120, 80, 0.35);
  background: #ECE7DC;
  flex-shrink: 0;
}

.prog-image-preview-meta {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prog-image-preview-meta strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0A2850;
}

.prog-image-preview-meta small {
  font-size: 0.74rem;
  color: #5C462A;
  line-height: 1.4;
  word-break: keep-all;
}

.prog-image-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.modal-footer-bar,
.inquiry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid rgba(150, 120, 80, 0.24);
}

@media (max-width: 640px) {
  .modal-sheet-wide {
    padding: 18px 16px;
  }

  .two-col-inputs {
    grid-template-columns: 1fr;
  }

  .report-photo-inputs {
    grid-template-columns: 1fr;
  }

  .prog-image-preview-wrap {
    align-items: flex-start;
  }

  .prog-image-preview-wrap img {
    width: 100%;
    max-width: 240px;
  }
}

/* =========================================================
   All-Vertical Book-Spine Mobile Architecture (<= 820px / <= 640px / <= 400px)
   Preserves 4 vertical book spines in BOTH folded & open states while tuning
   spine widths, hiding redundant scrollbars, and refining inner component grids.
   ========================================================= */
@media (max-width: 820px) {
  :root {
    --spine-w: 32px;
  }

  .book-body-clip {
    scrollbar-width: none;
  }

  .book-body-clip::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .book-accordion.has-open-panel .book-spine {
    padding: 12px 0;
  }

  .book-accordion.has-open-panel .spine-num {
    font-size: 0.62rem;
  }

  .book-accordion.has-open-panel .spine-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
  }

  html[lang='en'] .book-accordion.has-open-panel .spine-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .devstudio-topbar {
    position: static;
  }

  .pillar-visual-dev {
    height: auto;
    min-height: 112px;
  }
}

@media (max-width: 640px) {
  :root {
    --spine-w: 24px;
  }

  .site-nav .nav-inner {
    width: calc(100% - 20px);
    gap: 6px;
  }

  .brand-mark-box {
    width: 24px;
    height: 24px;
  }

  .brand-wordmark {
    font-size: 0.86rem;
  }

  .nav-actions {
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }

  #header-allpass-btn,
  #header-google-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 0.69rem;
    gap: 4px;
    white-space: nowrap;
  }

  .pill-toggle {
    height: 28px;
    min-width: 28px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .nav-user-pill {
    max-width: 128px;
  }

  .nav-user-name {
    max-width: 52px;
  }

  .book-accordion:not(.has-open-panel) > .book-panel > .book-spine {
    padding: 24px 4px calc(92px + env(safe-area-inset-bottom));
  }

  .book-accordion:not(.has-open-panel) .spine-title {
    font-size: 0.96rem;
    letter-spacing: 0.16em;
  }

  html[lang='en'] .book-accordion:not(.has-open-panel) .spine-title {
    font-size: 0.76rem;
    letter-spacing: 0.11em;
  }

  .book-accordion.has-open-panel .spine-num {
    font-size: 0.56rem;
  }

  .book-accordion.has-open-panel .spine-title {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  html[lang='en'] .book-accordion.has-open-panel .spine-title {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }

  .book-body-clip .container {
    width: calc(100% - 12px);
  }

  .book-story-section {
    padding-block: 14px calc(108px + env(safe-area-inset-bottom));
  }

  .story-card {
    padding: 12px;
  }

  .section-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .section-tools .btn {
    width: 100%;
    justify-content: center;
  }

  .receipt-list li,
  .receipt-total-bar {
    gap: 10px;
    font-size: 0.78rem;
  }

  .receipt-list li strong,
  .receipt-total-bar strong {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .devstudio-topbar .dev-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-radius: 14px;
    padding: 5px;
  }

  .dev-subtab-btn {
    flex: 1 1 100%;
    justify-content: center;
    padding: 6px 8px;
    gap: 5px;
    min-width: 0;
    border-radius: 10px;
    white-space: normal;
    text-align: center;
  }

  .devstudio-pricing-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .dev-pricing-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.70rem;
    gap: 4px;
    white-space: nowrap;
  }

  .bp-row-cells {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .bp-cell {
    min-height: 38px;
    padding: 5px 1px;
    font-size: 0.66rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .bp-path-bar {
    padding: 6px 8px;
    gap: 8px;
    font-size: 0.72rem;
  }

  .progress-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .progress-meta-grid > div {
    padding: 8px 8px;
    min-width: 0;
  }

  .progress-meta-grid > div:first-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .progress-meta-grid span {
    font-size: 0.68rem;
  }

  .progress-meta-grid strong {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nation-kpi-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .nation-kpi-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
  }

  .nation-kpi-link {
    text-align: center;
    align-items: center;
  }

  .nation-kpi-label {
    justify-content: center;
    width: auto;
  }

  #roadmap-tabs,
  #diary-tabs,
  #reports-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  #roadmap-tabs .chip-btn,
  #diary-tabs .tab-pill,
  #reports-category-filters .chip-btn {
    width: auto;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .book-body-clip .calc-inputs-grid,
  .book-body-clip .scale-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .book-body-clip .cuisine-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .game-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sticky-funding-bar {
    width: calc(100% - 16px);
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 8px 10px 8px 12px;
    gap: 8px;
    border-radius: 14px;
  }
}

@media (max-width: 440px) {
  :root {
    --spine-w: 22px;
  }

  .site-nav .nav-inner {
    width: calc(100% - 16px);
    gap: 4px;
  }

  .brand-mark-box {
    width: 22px;
    height: 22px;
  }

  .brand-wordmark {
    font-size: 0.80rem;
  }

  #header-allpass-btn i,
  #header-google-btn i {
    display: none;
  }

  #header-allpass-btn,
  #header-google-btn {
    height: 26px;
    padding: 0 7px;
    font-size: 0.64rem;
  }

  .pill-toggle {
    height: 26px;
    min-width: 26px;
    padding: 0 6px;
    font-size: 0.64rem;
  }
}

@media (max-width: 360px) {
  .brand-wordmark {
    display: none;
  }
}

/* =========================================================
   Stage 0: DAILYPLANT NATION Photorealistic Hanok Gate
   ========================================================= */
.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;
}

body.book-shell.gate-locked {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

html.gate-skip-session #nation-gate {
  display: none !important;
}

html.gate-skip-session body.book-shell.gate-locked {
  overflow-x: clip;
  overflow-y: visible;
  height: auto;
}

html.gate-skip-session body.gate-locked .landing-intro-frame {
  transform: none;
  opacity: 1;
}

body.gate-locked .landing-intro-frame {
  transform: scale(0.955);
  opacity: 0.78;
}

body.gate-opening .landing-intro-frame {
  transform: scale(1);
  opacity: 1;
  transition:
    transform 0.98s cubic-bezier(0.16, 1, 0.3, 1) 0.16s,
    opacity 0.76s ease 0.16s;
  will-change: transform, opacity;
}

.nation-gate {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 300;
  overflow: hidden;
  perspective: 1900px;
  perspective-origin: 50% 50%;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nation-gate.is-opening {
  pointer-events: none;
}

.nation-gate.is-entered {
  display: none !important;
}

/* 문 틈새에서 안마당으로 퍼지는 따뜻한 자연광 */
.nation-gate-seam-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 24px;
  height: 100%;
  transform: translateX(-50%) scaleX(0.35);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(255, 250, 232, 0.98) 0%,
    rgba(235, 206, 146, 0.84) 38%,
    rgba(200, 164, 100, 0.3) 68%,
    transparent 100%
  );
  filter: blur(6px);
}

.nation-gate.is-opening .nation-gate-seam-glow {
  animation: gateSeamSunlight 0.62s ease-out forwards;
}

@keyframes gateSeamSunlight {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.35);
  }
  28% {
    opacity: 0.95;
    transform: translateX(-50%) scaleX(2.5);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleX(7.5);
  }
}

/* 상단 실사 기와 처마 · 상인방 목재 보 · 입체 목판 현판 */
.hanok-gate-eaves {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    transform 0.95s cubic-bezier(0.62, 0.02, 0.2, 1) 0.12s,
    opacity 0.36s ease 0.72s;
}

.hanok-eaves-photo {
  width: 100%;
  height: clamp(86px, 13.5vh, 128px);
  background: #1B1D21 url('/assets/hanok-eaves.webp?v=20261122_547') center bottom / auto 100% repeat-x;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.48);
}

.hanok-rafter-beam {
  width: 100%;
  height: clamp(10px, 1.5vh, 14px);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 214, 168, 0.03) 0px,
      rgba(255, 214, 168, 0.03) 2px,
      rgba(10, 4, 1, 0.09) 2px,
      rgba(10, 4, 1, 0.09) 6px
    ),
    linear-gradient(180deg, #2D190E 0%, #1F1008 65%, #120904 100%);
  border-top: 1px solid rgba(190, 152, 102, 0.16);
  border-bottom: 1.5px solid #0B0502;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.85);
}

/* 입체 고재 목판 현판(懸板) */
.hanok-hyeonpan {
  position: relative;
  margin-top: -8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 8px 18px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 218, 174, 0.025) 0px,
      rgba(255, 218, 174, 0.025) 2px,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(0, 0, 0, 0.08) 5px
    ),
    linear-gradient(180deg, #331D11 0%, #21120A 54%, #150B05 100%);
  border: 2px solid #4A2D1B;
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 180, 0.16),
    inset 0 0 0 1.5px rgba(192, 152, 92, 0.42),
    inset 0 -3px 10px rgba(0, 0, 0, 0.72),
    0 14px 30px rgba(4, 2, 1, 0.82);
}

.hanok-hyeonpan-text {
  font-size: clamp(0.76rem, 1.35vw, 0.96rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #EDE0C4;
  text-shadow:
    0 1px 0 rgba(255, 240, 208, 0.16),
    0 2px 5px rgba(0, 0, 0, 0.92);
  white-space: nowrap;
}

.hanok-hyeonpan-seal {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 3px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 210, 190, 0.18), transparent 65%),
    linear-gradient(180deg, #B93B2E 0%, #8C2319 100%);
  border: 1px solid rgba(235, 196, 146, 0.55);
  color: #FAF0DC;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.55);
}

.nation-gate.is-opening .hanok-gate-eaves {
  transform: translate3d(0, -108%, 0);
  opacity: 0;
}

/* 하단 파주 화강암 장대석 문지방 */
.hanok-gate-threshold {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(16px, 2.3vh, 24px);
  z-index: 7;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 40%, rgba(255, 252, 244, 0.16) 0 1px, transparent 1.5px) 0 0 / 15px 11px,
    radial-gradient(circle at 68% 65%, rgba(16, 14, 12, 0.28) 0 1.2px, transparent 1.7px) 0 0 / 12px 9px,
    radial-gradient(circle at 42% 28%, rgba(210, 204, 194, 0.14) 0 1px, transparent 1.6px) 0 0 / 21px 13px,
    linear-gradient(180deg, #7B766D 0%, #635F56 26%, #4D4942 78%, #35322D 100%);
  border-top: 1.5px solid rgba(228, 220, 206, 0.42);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.45),
    0 -10px 24px rgba(4, 2, 1, 0.75);
  transition:
    transform 0.95s cubic-bezier(0.62, 0.02, 0.2, 1) 0.12s,
    opacity 0.36s ease 0.72s;
}

.nation-gate.is-opening .hanok-gate-threshold {
  transform: translate3d(0, 115%, 0);
  opacity: 0;
}

/* 양쪽 실사 고재 송판 한옥 대문 짝 */
.nation-gate-door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.nation-gate-door--left {
  left: 0;
  transform-origin: 0% 50%;
  background: #2A190E url('/assets/hanok-door-left.webp?v=20261122_547') right center / cover no-repeat;
  border-right: 1px solid #120904;
}

.nation-gate-door--right {
  right: 0;
  transform-origin: 100% 50%;
  background: #2A190E url('/assets/hanok-door-right.webp?v=20261122_547') left center / cover no-repeat;
  border-left: 1px solid rgba(10, 5, 2, 0.75);
}

/* 열릴 때 드러나는 실제 원목 대문 측면 두께 단면 */
.nation-gate-door::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  pointer-events: none;
  background: linear-gradient(180deg, #3C2415 0%, #29180D 55%, #1A0E07 100%);
}

.nation-gate-door--left::before {
  right: 0;
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
}

.nation-gate-door--right::before {
  left: 0;
  transform-origin: 0% 50%;
  transform: rotateY(90deg);
}

/* 처마 그림자 · 문지방 접지 그림자 · 전체 공간 비네팅 */
.nation-gate-door::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 42px 68px rgba(0, 0, 0, 0.5),
    inset 0 -34px 56px rgba(0, 0, 0, 0.45),
    inset 0 0 110px rgba(0, 0, 0, 0.36);
}

.nation-gate.is-opening .nation-gate-door {
  will-change: transform, opacity;
  transition:
    transform 1.12s cubic-bezier(0.62, 0.02, 0.2, 1) 0.12s,
    opacity 0.34s ease 0.86s;
}

.nation-gate.is-opening .nation-gate-door--left {
  transform: translate3d(-16%, 0, 0) rotateY(88deg);
  opacity: 0;
}

.nation-gate.is-opening .nation-gate-door--right {
  transform: translate3d(16%, 0, 0) rotateY(-88deg);
  opacity: 0;
}

.nation-gate-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 3, 1, 0.78), rgba(6, 3, 1, 0.2));
  opacity: 0;
  transition: opacity 0.96s cubic-bezier(0.62, 0.02, 0.2, 1) 0.12s;
}

.nation-gate-door--right .nation-gate-shade {
  background: linear-gradient(-90deg, rgba(6, 3, 1, 0.78), rgba(6, 3, 1, 0.2));
}

.nation-gate.is-opening .nation-gate-shade {
  opacity: 0.62;
}

/* 중앙 공식 dailyplant® 주물 청동 명패 로고 영역 */
.nation-gate-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2vh, 20px);
  text-align: center;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.nation-gate-seal {
  position: relative;
  width: clamp(150px, 24vmin, 192px);
  height: clamp(150px, 24vmin, 192px);
  border-radius: 50%;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    transform 0.36s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.32s ease,
    filter 0.32s ease;
}

.nation-gate-seal:focus-visible {
  outline: 2px solid #F6E6C2;
  outline-offset: 8px;
}

.nation-gate-seal-aura {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(220, 186, 122, 0.34) 0%,
    rgba(200, 164, 100, 0.12) 52%,
    transparent 74%
  );
  animation: gateSealPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gateSealPulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.42;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.85;
  }
}

/* 브러시드 앤틱 황동·청동 주물 외곽 베젤 + 목재 접지 그림자 */
.nation-gate-seal-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(
      from 28deg,
      #8B6D3B 0deg,
      #D9BE85 48deg,
      #594220 105deg,
      #C8A568 175deg,
      #4A3519 235deg,
      #E0C58E 295deg,
      #8B6D3B 360deg
    );
  padding: 6px;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.88),
    0 6px 14px rgba(0, 0, 0, 0.78),
    0 0 0 2px #1D120A,
    inset 0 2px 3px rgba(255, 245, 214, 0.45),
    inset 0 -3px 6px rgba(24, 14, 6, 0.75);
  transition:
    transform 0.56s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.28s ease,
    box-shadow 0.28s ease;
}

/* 옻칠 흑단 내측 단차 테두리 */
.nation-gate-seal-outer::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 3px solid #21140B;
  box-shadow:
    inset 0 0 0 1px rgba(218, 186, 128, 0.5),
    0 0 0 1px rgba(18, 10, 4, 0.7);
}

/* 공식 로고(/assets/logo.png) 배경 #0A2550과 100% 일치하는 칠보 디스크 */
.nation-gate-seal-inner {
  position: absolute;
  inset: 10px;
  z-index: 2;
  border-radius: 50%;
  background: #0A2550;
  border: 1.5px solid rgba(214, 180, 118, 0.6);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 3px 12px rgba(2, 8, 22, 0.72),
    inset 0 -2px 6px rgba(14, 48, 98, 0.5);
  pointer-events: none;
}

/* 칠보/에나멜 유리 광택 오버레이 */
.nation-gate-seal-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.03) 28%,
    transparent 44%,
    rgba(0, 0, 0, 0.28) 100%
  );
  pointer-events: none;
}

.nation-gate-logo-img {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  object-fit: contain;
  display: block;
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 호버 / 포커스 */
.nation-gate-seal:hover,
.nation-gate-seal:focus-visible {
  transform: scale(1.045);
}

.nation-gate-seal:hover .nation-gate-seal-outer,
.nation-gate-seal:focus-visible .nation-gate-seal-outer {
  transform: rotate(14deg);
  filter: brightness(1.08);
  box-shadow:
    0 28px 58px rgba(0, 0, 0, 0.92),
    0 8px 18px rgba(0, 0, 0, 0.82),
    0 0 0 2px #1D120A,
    0 0 0 4px rgba(226, 198, 144, 0.45),
    inset 0 2px 4px rgba(255, 245, 214, 0.6);
}

.nation-gate-seal:hover .nation-gate-logo-img,
.nation-gate-seal:focus-visible .nation-gate-logo-img {
  transform: scale(1.03);
}

.nation-gate-seal:active {
  transform: scale(0.98);
}

/* 바깥 문 클릭 시 로고 클릭 유도 넛지 */
.nation-gate-seal.is-nudged {
  animation: gateSealNudge 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gateSealNudge {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.09);
  }
  100% {
    transform: scale(1);
  }
}

/* 열림 모션 시 중앙 인장 회전 소멸 */
.nation-gate.is-opening .nation-gate-seal {
  transform: scale(1.12);
  opacity: 0;
  filter: blur(4px);
}

.nation-gate.is-opening .nation-gate-seal-outer {
  transform: rotate(45deg);
}

/* 모바일 반응형 */
@media (max-width: 640px) {
  .hanok-eaves-photo {
    height: clamp(76px, 11.5vh, 104px);
  }

  .hanok-hyeonpan {
    padding: 5px 12px 6px 14px;
    gap: 8px;
  }

  .hanok-hyeonpan-text {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
  }

  .hanok-hyeonpan-seal {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .nation-gate-seal {
    width: 146px;
    height: 146px;
  }
}

@media (max-height: 640px) {
  .hanok-eaves-photo {
    height: 68px;
  }

  .nation-gate-seal {
    width: 132px;
    height: 132px;
  }
}

/* 접근성: 동작 축소 환경 */
@media (prefers-reduced-motion: reduce) {
  .nation-gate-seal-aura {
    animation: none !important;
    opacity: 0.35;
  }

  .nation-gate.is-opening .nation-gate-seam-glow {
    animation: none !important;
    opacity: 0;
  }

  .nation-gate.is-opening,
  .nation-gate.is-opening .nation-gate-door,
  .nation-gate.is-opening .hanok-gate-eaves,
  .nation-gate.is-opening .hanok-gate-threshold,
  .nation-gate.is-opening .nation-gate-center,
  .nation-gate.is-opening .nation-gate-seal,
  body.gate-opening .landing-intro-frame {
    transition-duration: 0.18s !important;
    transition-delay: 0s !important;
  }

  .nation-gate.is-opening .nation-gate-door--left,
  .nation-gate.is-opening .nation-gate-door--right,
  .nation-gate.is-opening .hanok-gate-eaves,
  .nation-gate.is-opening .hanok-gate-threshold {
    transform: none !important;
    opacity: 0;
  }

  .nation-gate.is-opening .nation-gate-seal {
    transform: none !important;
    filter: none !important;
  }
}

/* =====================================================================
   Sponsor Benefits Hub (4-Pick Gift, Diamond Visit, Dedup & Cert)
   ===================================================================== */
.sponsor-benefits-hub {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fffdf7;
  border: 1.5px solid rgba(197, 155, 39, 0.42);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.sponsor-hub-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0a2850;
}

.sponsor-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(10, 40, 80, 0.08);
  border: 1px solid rgba(10, 40, 80, 0.18);
  color: #0a2850;
}

.sponsor-mandatory-banner {
  padding: 9px 11px;
  border-radius: 8px;
  background: #fef3c7;
  border: 1.5px solid #d97706;
  color: #78350f;
  font-size: 0.77rem;
  font-weight: 800;
  line-height: 1.45;
}

.sponsor-claimed-banner {
  padding: 9px 11px;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  color: #065f46;
  font-size: 0.77rem;
  font-weight: 800;
  line-height: 1.45;
}

.sponsor-gift-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 820px) {
  .sponsor-gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sponsor-gift-card {
  padding: 9px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.sponsor-gift-card.is-claimed {
  background: #ecfdf5;
  border-color: #10b981;
}

.sponsor-gift-card.is-locked {
  opacity: 0.65;
}

.sponsor-gift-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.sponsor-gift-note {
  font-size: 0.71rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

.sponsor-gift-btn {
  width: 100%;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid #0a2850;
  background: #0a2850;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.sponsor-gift-btn:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
  cursor: not-allowed;
}

.sponsor-extra-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  font-size: 0.76rem;
  color: #064e3b;
}

.sponsor-minor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.sponsor-minor-chip {
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.sponsor-claim-summary-bar {
  padding: 9px 11px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
  font-size: 0.8rem;
  font-weight: 800;
}










