:root {
  --bg: #07090e;
  --surface: #111520;
  --surface-2: #181e2e;
  --glass: rgba(10, 13, 20, 0.56);
  --glass-strong: rgba(12, 15, 24, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7f4ed;
  --text-sub: #d2d6e0;
  --mute: #94a0b8;
  --gold: #d8b36a;
  --gold-soft: rgba(216, 179, 106, 0.16);
  --green: #10b981;
  --blue: #38bdf8;
  --red: #fb7185;
  --nav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #030407;
  color: var(--text);
  font: 14px/1.45 "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  height: 100%;
  overflow: hidden;
}

button, input, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Lock Screen */
.pin-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at top, #151b2b 0%, #07090e 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pin-box {
  width: 100%;
  max-width: 340px;
  background: rgba(17, 21, 32, 0.9);
  border: 1px solid rgba(216, 179, 106, 0.25);
  border-radius: 24px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  position: relative;
}
.pin-logo-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.pin-logo-img { width: 56px; height: 56px; border-radius: 14px; }
.pin-box h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.pin-sub { margin: 4px 0 18px; color: var(--mute); font-size: 13px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; cursor: pointer; }
.pin-dots .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(216, 179, 106, 0.45);
  transition: transform 0.15s, background 0.15s;
}
.pin-dots .dot.filled { background: var(--gold); border-color: var(--gold); transform: scale(1.1); }
#pinHiddenInput {
  position: absolute;
  opacity: 0.01;
  width: 240px;
  height: 44px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -54px;
  z-index: 2;
}
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
  z-index: 3;
}
.pin-key {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 0;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.pin-key:active { background: rgba(216, 179, 106, 0.22); }
.pin-clear, .pin-del { font-size: 13px; color: var(--mute); }
.pin-error { min-height: 18px; margin-top: 12px; color: var(--red); font-size: 12.5px; font-weight: 600; }
.shake { animation: shakeAnim 0.4s ease; }
@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* App Shell */
.stash-shell {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Blurred Subtle Top Bar */
.stash-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
  background: rgba(7, 9, 14, 0.44);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.topbar-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-logo { width: 22px; height: 22px; border-radius: 6px; }
.month-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 2px 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.chevron-down { font-size: 10px; color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.today-chip, .topbar-pill {
  background: rgba(216, 179, 106, 0.18);
  border: 1px solid rgba(216, 179, 106, 0.45);
  color: var(--gold);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Draggable Day Number Strip */
.day-strip-viewport {
  margin-top: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}
.day-strip-viewport::-webkit-scrollbar { display: none; }
.day-strip-viewport:active { cursor: grabbing; }
.day-strip-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 42%;
  width: max-content;
}
.day-pill {
  min-width: 34px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}
.day-pill.has-content::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(216, 179, 106, 0.65);
  margin-top: 1px;
}
.day-pill.active {
  background: rgba(247, 244, 237, 0.94);
  color: #07090e;
  font-weight: 800;
  transform: scale(1.06);
}
.day-pill.active::after { background: #07090e; }

/* Main Stage & Views */
.stash-main {
  width: 100%;
  height: 100%;
  position: relative;
}
.stash-view {
  display: none;
  width: 100%;
  height: 100%;
}
.stash-view.active { display: block; }
.stash-scroll-view {
  overflow-y: auto;
  padding: 88px 14px calc(var(--nav-h) + 28px);
}
.section-inner { display: flex; flex-direction: column; gap: 14px; }

/* Vertical TikTok For You Feed */
.fyp-feed, .single-card-stage {
  width: 100%;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.fyp-feed::-webkit-scrollbar, .single-card-stage::-webkit-scrollbar { display: none; }

.stash-fyp-card {
  position: relative;
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07090e;
}

.card-ambient-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(42px) brightness(0.32) saturate(1.25);
  transform: scale(1.18);
  pointer-events: none;
}

/* Aspect Ratio Adaptive Frames */
.card-stage-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.stash-fyp-card[data-ratio="9:16"] .card-stage-frame {
  height: 100%;
  width: 100%;
}
.stash-fyp-card[data-ratio="4:5"] .card-stage-frame,
.stash-fyp-card[data-ratio="3:4"] .card-stage-frame {
  width: calc(100% - 16px);
  max-width: 440px;
  max-height: calc(100dvh - 180px);
  margin-top: 12px;
  margin-bottom: 52px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.stash-fyp-card[data-ratio="4:5"] .card-stage-frame { aspect-ratio: 4 / 5; }
.stash-fyp-card[data-ratio="3:4"] .card-stage-frame { aspect-ratio: 3 / 4; }

body.stash-immersive-mode .stash-fyp-card[data-ratio="4:5"] .card-stage-frame,
body.stash-immersive-mode .stash-fyp-card[data-ratio="3:4"] .card-stage-frame {
  max-height: calc(100dvh - 28px);
  margin-top: 0;
  margin-bottom: 0;
}

.card-media-img, .card-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stash-fyp-card[data-ratio="9:16"] .card-media-video {
  object-fit: cover;
  background: #000;
}

/* Carousel Track */
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
}
.carousel-hud {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 8px;
  border-radius: 999px;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.carousel-dot.active { background: var(--gold); width: 14px; border-radius: 4px; }

/* Designed Editorial / News / Music / Brief / Me Surfaces */
.visual-card-canvas {
  width: 100%;
  height: 100%;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.stash-fyp-card[data-ratio="9:16"] .visual-card-canvas {
  padding: 96px 68px 150px 20px;
}
.stash-fyp-card[data-ratio="4:5"] .visual-card-canvas,
.stash-fyp-card[data-ratio="3:4"] .visual-card-canvas {
  padding: 24px 22px;
}

.theme-broadsheet {
  background: linear-gradient(165deg, #f3ede1 0%, #e6dcc8 100%);
  color: #16181d;
}
.theme-obsidian {
  background: radial-gradient(circle at top right, #232a3e 0%, #0d1018 75%);
  color: #f7f4ed;
}
.theme-swiss {
  background: linear-gradient(155deg, #101d2b 0%, #091019 100%);
  color: #f7f4ed;
  border-top: 4px solid var(--gold);
}
.theme-ivory {
  background: linear-gradient(170deg, #faf7f0 0%, #efe6d5 100%);
  color: #1a1b20;
}
.theme-forest {
  background: linear-gradient(165deg, #10241d 0%, #07110d 100%);
  color: #eef5f0;
}

.card-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.78;
}
.card-quote-hero {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 5.4vw, 31px);
  line-height: 1.24;
  font-weight: 700;
  margin: 10px 0;
}
.card-headline-hero {
  font-size: clamp(20px, 4.8vw, 27px);
  line-height: 1.2;
  font-weight: 800;
  margin: 8px 0;
}
.card-body-copy {
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.9;
}
.card-author-foot {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  padding-top: 10px;
  border-top: 1px solid currentColor;
  border-color: rgba(128, 128, 128, 0.25);
}

/* Audio Player Card */
.audio-stage-box {
  width: 100%;
  height: 100%;
  padding: 94px 68px 150px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(circle at 30% 25%, #271b3d 0%, #0b0d14 75%);
}
.audio-cover-art {
  width: 128px;
  height: 128px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(216, 179, 106, 0.3), rgba(56, 189, 248, 0.18));
  border: 1px solid rgba(216, 179, 106, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
}
.audio-player-el { width: 100%; height: 42px; filter: invert(0.92) hue-rotate(180deg); }

/* Brief 9:16 Card */
.brief-card-inner {
  width: 100%;
  height: 100%;
  padding: 92px 66px 140px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.16), transparent 45%),
              radial-gradient(circle at 20% 85%, rgba(216, 179, 106, 0.14), transparent 45%),
              #090d16;
  overflow-y: auto;
}
.brief-block {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 14px;
}
.brief-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 6px;
}
.weather-main-row { display: flex; align-items: center; gap: 12px; }
.weather-icon-big { font-size: 32px; }
.weather-temp-big { font-size: 20px; font-weight: 800; }
.weather-sub { font-size: 12px; color: var(--text-sub); }
.cosmic-visual-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.cosmic-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #f5d38c, #5c3a9e 65%, #121526 100%);
  box-shadow: 0 0 18px rgba(216, 179, 106, 0.35);
}
.cosmic-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cosmic-tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-sub);
}
.cal-event-row {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
}
.cal-event-row:last-child { border-bottom: none; }
.cal-ev-time { color: var(--gold); font-weight: 700; min-width: 72px; font-size: 11.5px; }

/* Me Card Photo Switcher */
.me-top-actions {
  position: absolute;
  top: 90px;
  left: 16px;
  z-index: 15;
  display: flex;
  gap: 8px;
}
.me-pill-btn {
  background: rgba(9, 11, 16, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Overlays: Gradient, Right Action Rail, Bottom Caption */
.card-bottom-scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  z-index: 12;
  background: linear-gradient(to top, rgba(5, 7, 11, 0.92) 28%, rgba(5, 7, 11, 0.45) 68%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.card-caption-bar {
  position: absolute;
  left: 14px;
  right: 72px;
  bottom: calc(var(--nav-h) + 14px);
  z-index: 18;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.caption-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.caption-format-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 179, 106, 0.22);
  color: var(--gold);
  border: 1px solid rgba(216, 179, 106, 0.35);
}
.caption-title-text {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}
.see-more-btn {
  margin-top: 5px;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Right-Side Action Rail (6 Buttons Only) */
.card-right-rail {
  position: absolute;
  right: 10px;
  bottom: calc(var(--nav-h) + 18px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.rail-btn {
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #fff;
}
.rail-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(12, 15, 24, 0.62);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.rail-icon-circle svg { width: 19px; height: 19px; }
.rail-btn:active .rail-icon-circle { transform: scale(0.92); }
.rail-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.rail-btn.active[data-rail-action="heart"] .rail-icon-circle {
  background: rgba(251, 113, 133, 0.26);
  border-color: var(--red);
  color: var(--red);
}
.rail-btn.active[data-rail-action="check"] .rail-icon-circle {
  background: rgba(16, 185, 129, 0.26);
  border-color: var(--green);
  color: var(--green);
}
.rail-btn.active[data-rail-action="favorite"] .rail-icon-circle {
  background: rgba(216, 179, 106, 0.28);
  border-color: var(--gold);
  color: var(--gold);
}

/* Bottom Navigation (5 Slots) */
.stash-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 45;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.nav-slot {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--mute);
  cursor: pointer;
  padding: 6px 2px;
}
.nav-slot.active { color: var(--text); }
.nav-ico svg { width: 20px; height: 20px; display: block; }
.nav-label { font-size: 10.5px; font-weight: 700; }
.nav-slot-center .nav-center-pill {
  width: 44px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #b99044);
  color: #07090e;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-slot-center .nav-center-pill svg { width: 17px; height: 17px; }

/* Immersive Full-Screen Mode (Tap or Pinch Hides Overlays) */
body.stash-immersive-mode .stash-topbar,
body.stash-immersive-mode .stash-bottom-nav,
body.stash-immersive-mode .card-right-rail,
body.stash-immersive-mode .card-caption-bar,
body.stash-immersive-mode .card-bottom-scrim,
body.stash-immersive-mode .me-top-actions {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Outreach & Archive Cards */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
}
.panel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.panel-title { margin: 0; font-size: 16px; font-weight: 800; }
.panel-sub { font-size: 12px; color: var(--mute); }
.lead-dm-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  color: var(--text-sub);
  white-space: pre-wrap;
  margin: 10px 0;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.primary-action-btn, .ghost-action-btn {
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.primary-action-btn { background: var(--gold); color: #07090e; }
.ghost-action-btn { background: rgba(255, 255, 255, 0.06); border-color: var(--line); color: var(--text); }
.ghost-action-btn.done { border-color: var(--green); color: var(--green); background: rgba(16, 185, 129, 0.14); }

.archive-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.archive-filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--mute);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.filter-pill.active { background: var(--gold); color: #07090e; border-color: var(--gold); }

/* Modals */
.stash-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.stash-modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 84dvh;
  background: #101522;
  border-top: 1px solid rgba(216, 179, 106, 0.3);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.modal-sub { margin: 3px 0 0; font-size: 12px; color: var(--mute); }
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Calendar Grid */
.cal-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month-title { font-weight: 800; font-size: 14.5px; }
.cal-step-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.cal-weekdays span { font-size: 11px; color: var(--mute); font-weight: 700; padding: 4px 0; }
.cal-day-btn {
  padding: 9px 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.cal-day-btn.has-data { border-color: rgba(216, 179, 106, 0.35); }
.cal-day-btn.selected { background: var(--gold); color: #07090e; }

/* Caption Sheet */
.caption-sheet-meta { display: flex; align-items: center; gap: 8px; }
.caption-badge {
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.caption-date { font-size: 11.5px; color: var(--mute); }
.caption-sheet-title { margin: 4px 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.caption-sheet-credit { font-size: 12.5px; color: var(--gold); font-weight: 600; margin-bottom: 12px; }
.caption-sheet-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-sub);
  white-space: pre-wrap;
}
.caption-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Comments */
.comment-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; margin-bottom: 12px; }
.comment-item { background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 9px 11px; font-size: 13px; }
.comment-item-meta { font-size: 11px; color: var(--mute); margin-bottom: 3px; }
.comment-compose-row { display: flex; flex-direction: column; gap: 8px; }
.comment-compose-row textarea, .sub-add-row input {
  width: 100%;
  background: #090c14;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
}

/* Settings & Subscriptions */
.settings-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings-block h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.logo-options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.logo-opt-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.logo-opt-btn.active { border-color: var(--gold); background: var(--gold-soft); }
.logo-opt-btn img { width: 40px; height: 40px; border-radius: 10px; }
.sub-add-row { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.subs-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow-y: auto; }
.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
}
.sub-chip button { background: transparent; border: none; color: var(--mute); cursor: pointer; font-weight: 800; }

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 22px);
  transform: translateX(-50%) translateY(16px);
  background: rgba(16, 21, 34, 0.96);
  border: 1px solid rgba(216, 179, 106, 0.45);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
