:root {
  --ink: #0a0a0a;
  --paper: #f5f0e6;
  --cream: #ebe4d2;
  --red: #e11d2e;
  --red-deep: #991b1b;
  --gold: #d4a843;
}
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; }
html, body {
  background: #050505;
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  overflow-x: hidden;
}
.serif { font-family: 'Fraunces', serif; }
.mono { font-family: 'JetBrains Mono', monospace; }
.gothic { font-family: 'UnifrakturMaguntia', serif; }
.typewriter { font-family: 'Special Elite', monospace; }
.hand { font-family: 'Caveat', cursive; }
.baskerville { font-family: 'Libre Baskerville', serif; }

/* Cinematic background: layered gradient bloom + multi-layer star field */
.specks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(225, 29, 46, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(225, 29, 46, 0.05) 0%, transparent 60%);
}
.speck {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.speck-drifter {
  background: var(--red);
  animation: drift linear infinite;
}
.speck-twinkle {
  background: rgba(245, 240, 230, 0.7);
  box-shadow: 0 0 4px rgba(245, 240, 230, 0.35);
  animation: twinkle ease-in-out infinite;
}
.speck-bright {
  background: rgba(245, 240, 230, 0.95);
  box-shadow:
    0 0 6px rgba(245, 240, 230, 0.7),
    0 0 14px rgba(225, 29, 46, 0.35);
  animation: twinkle-bright ease-in-out infinite;
}
.speck-streak {
  background: linear-gradient(180deg, var(--red), transparent);
  width: 1.5px !important;
  height: 60px !important;
  border-radius: 0;
  filter: blur(0.5px);
  animation: streak linear infinite;
  opacity: 0.4;
}
@keyframes drift {
  0%   { transform: translateY(100vh); opacity: 0; }
  15%  { opacity: 0.55; }
  85%  { opacity: 0.3; }
  100% { transform: translateY(-10vh); opacity: 0; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.85; }
}
@keyframes twinkle-bright {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50%      { opacity: 1; transform: scale(1); }
}
@keyframes streak {
  0%   { transform: translate(0, -20vh) rotate(15deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translate(-20vw, 110vh) rotate(15deg); opacity: 0; }
}

.brand-mark {
  width: 38px; height: 38px;
  background: var(--red); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 900; font-size: 22px; color: var(--paper);
  box-shadow: 0 4px 16px rgba(225, 29, 46, 0.3);
}

.hero-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 24px;
}
.hero {
  font-family: 'Fraunces', serif;
  font-size: clamp(3.25rem, 13vw, 7.25rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 18px;
  text-shadow: 0 6px 32px rgba(225, 29, 46, 0.18);
}
.hero-accent {
  color: var(--red);
  font-style: italic;
  font-weight: 700;
}
.hero-sub {
  font-size: 17px;
  color: rgba(245, 240, 230, 0.75);
  line-height: 1.45;
  font-style: italic;
  margin: 0 0 14px;
  max-width: 28ch;
}
.hero-meta {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(245, 240, 230, 0.45);
  text-transform: uppercase;
  margin: 0 0 28px;
  display: inline-flex;
  gap: 2px;
}

.shell {
  background:
    linear-gradient(180deg, rgba(245, 240, 230, 0.04) 0%, rgba(245, 240, 230, 0.015) 100%);
  border: 1px solid rgba(245, 240, 230, 0.1);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 36px rgba(0, 0, 0, 0.18);
}
.shell:focus-within {
  border-color: rgba(225, 29, 46, 0.5);
  background:
    linear-gradient(180deg, rgba(245, 240, 230, 0.06) 0%, rgba(245, 240, 230, 0.02) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 14px 44px rgba(225, 29, 46, 0.1);
}
textarea.field, input.field {
  background: transparent; border: none; outline: none;
  color: var(--paper); width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px; line-height: 1.6;
}
textarea.field { resize: none; }
textarea.field::placeholder, input.field::placeholder { color: rgba(245, 240, 230, 0.3); }

.upload-zone {
  border: 2px dashed rgba(245, 240, 230, 0.18);
  border-radius: 18px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(245, 240, 230, 0.015);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--red);
  background: rgba(225, 29, 46, 0.04);
}
.upload-icon {
  width: 36px; height: 36px;
  margin: 0 auto 12px;
  color: rgba(245, 240, 230, 0.5);
}

.preview-container {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  margin-bottom: 0;
}
.preview-container img {
  display: block;
  width: 100%;
  height: auto;
}

/* THE STAMP — official notarial certificate.
   Cream paper background with deep red ink, embossed border, professional
   typography. Looks like a real credential applied to the surface. */
.stamp-seal {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: linear-gradient(180deg, #f8f3e6 0%, #ede5d0 100%);
  border: 1.5px solid #7a1219;
  border-radius: 6px;
  padding: 8px 12px 8px 10px;
  color: #1c1611;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 84%;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 0 0 3px rgba(248, 243, 230, 0.0),
    inset 0 0 0 4px rgba(122, 18, 25, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(122, 18, 25, 0.12);
  /* Subtle paper texture */
  background-image:
    radial-gradient(rgba(122, 18, 25, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #f8f3e6 0%, #ede5d0 100%);
  background-size: 4px 4px, 100% 100%;
}
.stamp-seal.capsule { border-color: #8a6920; }
.stamp-seal.capsule .stamp-seal-mark { background: var(--gold); color: #1c1611; }
.stamp-seal.capsule .stamp-seal-brand,
.stamp-seal.capsule .stamp-seal-cert,
.stamp-seal.capsule .stamp-seal-id { color: #7a4a08; }
.stamp-seal.capsule .stamp-seal-rule { background: rgba(138, 105, 32, 0.35); }
.stamp-seal.pro { border-color: #6f4e0e; }
.stamp-seal.pro .stamp-seal-mark { background: linear-gradient(135deg, #d4a843 0%, #8a6920 100%); color: #1c1611; }

.stamp-seal-emblem {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.stamp-seal-mark {
  width: 26px; height: 26px;
  background: #991b1b;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 16px;
  color: #f8f3e6;
  flex-shrink: 0;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 1px 2px rgba(0,0,0,0.2);
}
.stamp-seal-brandblock {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.stamp-seal-brand {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #7a1219;
  text-transform: uppercase;
}
.stamp-seal-cert {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: rgba(28, 22, 17, 0.55);
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 700;
}
.stamp-seal-rule {
  width: 1px;
  align-self: stretch;
  background: rgba(122, 18, 25, 0.25);
  margin: 1px 0;
  flex-shrink: 0;
}
.stamp-seal-data {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.stamp-seal-handle {
  color: #1c1611;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
}
.stamp-seal-handle .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  background: #991b1b;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 900;
  color: #f8f3e6;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2);
}
.stamp-seal-meta {
  color: rgba(28, 22, 17, 0.7);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.stamp-seal-id {
  color: #7a1219;
  font-size: 8px;
  letter-spacing: 0.22em;
  margin-top: 3px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* Preview hint badge — shown in upload preview, hidden during capture */
.preview-hint {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(245, 240, 230, 0.82);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 46, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 5;
  text-transform: uppercase;
}
.preview-hint-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: preview-hint-pulse 1.6s ease-in-out infinite;
}
@keyframes preview-hint-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.2); }
}
.hash-bar {
  background: #0a0a0a;
  border: 1px solid rgba(245, 240, 230, 0.08);
  border-top: 1px solid rgba(225, 29, 46, 0.25);
  border-radius: 0 0 14px 14px;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(245, 240, 230, 0.55);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.5;
  margin-top: -1px;
}
.hash-bar .hash-label {
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hash-bar code {
  color: rgba(245, 240, 230, 0.85);
  font-size: 9.5px;
  word-break: break-all;
}

.row-control {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(245, 240, 230, 0.08);
  font-size: 13px;
}
.toggle {
  position: relative; width: 44px; height: 24px;
  background: rgba(245, 240, 230, 0.15); border-radius: 999px;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.toggle.on { background: var(--red); }
.toggle.gold.on { background: var(--gold); }
.toggle::after {
  content: ""; position: absolute;
  top: 2px; left: 2px; width: 20px; height: 20px;
  background: var(--paper); border-radius: 50%;
  transition: all 0.2s;
}
.toggle.on::after { left: 22px; }
.row-label-main { color: rgba(245,240,230,0.95); font-size: 14px; }
.row-label-meta { font-size: 11px; color: rgba(245,240,230,0.5); margin-top: 2px; }

.capsule-picker {
  margin-top: 12px;
  padding: 14px;
  background: rgba(212, 168, 67, 0.05);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 12px;
  display: none;
}
.capsule-picker.show { display: block; }
.capsule-picker label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.capsule-picker input[type="date"] {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  width: 100%;
  color-scheme: dark;
}
.capsule-quickdates {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.capsule-quickdate {
  background: rgba(212, 168, 67, 0.1);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 67, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}
.capsule-quickdate:hover {
  background: var(--gold);
  color: var(--ink);
}

.mode-tabs {
  display: flex;
  background: rgba(245, 240, 230, 0.04);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(245,240,230,0.6);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-tab.active {
  background: var(--red);
  color: var(--paper);
  font-weight: 600;
}
.mode-tab.creative.active {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
}
.mode-tab .pro-badge {
  font-size: 8px;
  background: var(--gold);
  color: var(--ink);
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.chips-row {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  padding: 12px 22px;
  border: 1px solid rgba(245, 240, 230, 0.15);
  border-radius: 999px; cursor: pointer; transition: all 0.2s;
  font-size: 11px; letter-spacing: 0.18em;
  color: rgba(245, 240, 230, 0.6);
  background: transparent; white-space: nowrap;
  text-transform: uppercase; font-family: 'JetBrains Mono', monospace;
}
.chip:hover { border-color: var(--red); color: var(--paper); }
.chip.active { background: var(--red); color: var(--paper); border-color: var(--red); font-weight: 500; }

.btn-stamp {
  background: linear-gradient(180deg, #e11d2e 0%, #b21724 100%);
  color: var(--paper);
  padding: 20px 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  width: 100%;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  box-shadow:
    0 10px 28px rgba(225, 29, 46, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-stamp:hover {
  background: linear-gradient(180deg, #f02838 0%, #991b1b 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px rgba(225, 29, 46, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}
.btn-stamp:active { transform: translateY(0); }
.btn-stamp:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent; color: var(--paper);
  border: 1px solid rgba(245, 240, 230, 0.2);
  padding: 14px 22px; border-radius: 999px;
  cursor: pointer; transition: all 0.2s;
  font-size: 12px; font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-icon {
  background: rgba(245, 240, 230, 0.04);
  color: var(--paper);
  border: 1px solid rgba(245, 240, 230, 0.12);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-icon:hover { border-color: var(--red); }

.dots span { display: inline-block; animation: blink 1.4s infinite; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(245,240,230,0.08);
  z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}
.tab-btn {
  background: transparent; border: none;
  color: rgba(245,240,230,0.4);
  cursor: pointer; padding: 4px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s;
}
.tab-btn.active { color: var(--red); }
.tab-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

.feed-container {
  max-width: 540px; margin: 0 auto;
  padding: 20px 16px 120px;
}
.feed-tabs {
  display: flex; gap: 24px; padding: 0 4px 16px;
  border-bottom: 1px solid rgba(245,240,230,0.08);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab {
  background: none; border: none;
  color: rgba(245,240,230,0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 0; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.feed-tab.active { color: var(--paper); border-bottom-color: var(--red); }

.post-card {
  background: rgba(245,240,230,0.025);
  border: 1px solid rgba(245,240,230,0.08);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  transition: all 0.2s;
}
.post-card:hover { border-color: rgba(225,29,46,0.3); }

.post-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.post-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700;
  color: var(--paper); flex-shrink: 0; cursor: pointer;
}
.post-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--paper);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.post-handle:hover { color: var(--red); }
.verified-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  background: var(--red); border-radius: 50%;
  font-size: 8px; color: var(--paper); font-weight: 900;
}
.post-meta {
  font-size: 10px; letter-spacing: 0.15em;
  color: rgba(245,240,230,0.4);
  text-transform: uppercase; margin-top: 2px;
}
.post-pill {
  margin-left: auto;
  font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(225,29,46,0.4);
  padding: 3px 8px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.post-pill.capsule {
  color: var(--gold);
  border-color: rgba(212, 168, 67, 0.4);
}

.post-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.post-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.post-image-wrap .post-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  padding: 30px;
  text-align: center;
  line-height: 1.3;
  position: relative;
}
.post-image-wrap .post-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(225, 29, 46, 0.12) 0%, transparent 60%);
}
.post-image-wrap .post-placeholder span { position: relative; z-index: 2; }

.post-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(245,240,230,0.06);
}
.post-action {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: rgba(245,240,230,0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; cursor: pointer;
  transition: color 0.2s; padding: 4px 0;
}
.post-action:hover { color: var(--paper); }
.post-action.active { color: var(--red); }
.post-action svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.post-action.active svg { fill: currentColor; }

.stage {
  background: #050505;
  padding: 24px 16px 100px;
  display: flex; flex-direction: column; align-items: center;
  min-height: 60vh;
}
.stage-card { max-width: 540px; width: 100%; }
.verify-strip {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(245, 240, 230, 0.025);
  border: 1px solid rgba(245, 240, 230, 0.08);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(245, 240, 230, 0.65);
  line-height: 1.6;
}
.verify-strip .label {
  color: var(--red);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.verify-strip code {
  color: rgba(245, 240, 230, 0.9);
  word-break: break-all;
  font-size: 10px;
}

.action-bar {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 20px; flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
  border: 1px solid rgba(225,29,46,0.3);
  border-radius: 24px;
  max-width: 460px; width: 100%;
  padding: 32px 26px;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: rgba(245,240,230,0.5); cursor: pointer;
  font-size: 24px; padding: 6px 10px;
}
.modal-close:hover { color: var(--paper); }

.auth-mode-btn {
  flex: 1;
  padding: 10px;
  background: rgba(245,240,230,0.04);
  border: 1px solid rgba(245,240,230,0.08);
  color: rgba(245,240,230,0.6);
  border-radius: 10px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-mode-btn.active {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
  font-weight: 600;
}

.oauth-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(245,240,230,0.05);
  border: 1px solid rgba(245,240,230,0.12);
  color: var(--paper);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.oauth-btn:hover {
  background: rgba(245,240,230,0.08);
  border-color: rgba(245,240,230,0.2);
}

.auth-divider {
  text-align: center;
  margin: 18px 0;
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245,240,230,0.4);
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 60px);
  height: 1px;
  background: rgba(245,240,230,0.1);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-field {
  background: rgba(245,240,230,0.04);
  border: 1px solid rgba(245,240,230,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--paper);
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: border-color 0.2s;
}
.auth-field:focus { border-color: var(--red); }
.auth-field::placeholder { color: rgba(245,240,230,0.35); }

.pricing-tier {
  border: 1px solid rgba(245, 240, 230, 0.1);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-top: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  background: linear-gradient(180deg, rgba(245, 240, 230, 0.03) 0%, rgba(245, 240, 230, 0.01) 100%);
  position: relative;
}
.pricing-tier:hover {
  border-color: rgba(225, 29, 46, 0.7);
  background: linear-gradient(180deg, rgba(225, 29, 46, 0.06) 0%, rgba(225, 29, 46, 0.02) 100%);
  transform: translateY(-1px);
}
.pricing-tier.selected {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(225, 29, 46, 0.1) 0%, rgba(225, 29, 46, 0.03) 100%);
  box-shadow:
    0 0 0 1px rgba(225, 29, 46, 0.4),
    0 14px 34px rgba(225, 29, 46, 0.18);
}
.pricing-tier.recommended {
  border-color: rgba(225, 29, 46, 0.45);
  background: linear-gradient(180deg, rgba(225, 29, 46, 0.07) 0%, rgba(225, 29, 46, 0.02) 100%);
}
.pricing-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.18em;
  background: linear-gradient(180deg, #e11d2e 0%, #991b1b 100%);
  color: var(--paper);
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(225, 29, 46, 0.3);
  font-family: 'JetBrains Mono', monospace;
}
.pricing-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pricing-price {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.02em;
}
.pricing-price small {
  font-size: 13px;
  color: rgba(245, 240, 230, 0.5);
  font-weight: 400;
  margin-left: 2px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 12.5px;
  color: rgba(245, 240, 230, 0.78);
  line-height: 1.65;
}
.pricing-features li {
  position: relative;
  padding-left: 16px;
  margin: 4px 0;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.pricing-features li strong {
  color: var(--paper);
  font-weight: 700;
}
.pricing-features li code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(225, 29, 46, 0.1);
  color: var(--red);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.profile-header {
  padding: 28px 16px 20px;
  border-bottom: 1px solid rgba(245,240,230,0.08);
  text-align: center;
}
.profile-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700;
  font-size: 36px; color: var(--paper);
  margin: 0 auto 12px;
}
.profile-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; color: var(--paper);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.profile-stats {
  display: flex; justify-content: center; gap: 28px;
  margin-top: 16px;
}
.profile-stat-num { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--paper); }
.profile-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.18em;
  color: rgba(245,240,230,0.5);
  text-transform: uppercase; margin-top: 2px;
}

.empty {
  text-align: center; padding: 60px 20px;
  color: rgba(245, 240, 230, 0.5);
}

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--red);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.3s;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }

@media (max-width: 540px) {
  .stamp-seal { padding: 7px 10px 7px 8px; gap: 8px; max-width: 88%; }
  .stamp-seal-mark { width: 22px; height: 22px; font-size: 13px; }
  .stamp-seal-brand { font-size: 11px; letter-spacing: 0.03em; }
  .stamp-seal-cert { font-size: 6.5px; letter-spacing: 0.16em; }
  .stamp-seal-handle { font-size: 10px; }
  .stamp-seal-meta { font-size: 7.5px; }
  .stamp-seal-id { font-size: 7px; letter-spacing: 0.18em; }
  .stamp-seal-rule { margin: 1px 0; }
  .stamp-seal-emblem { gap: 6px; }
}

/* ============ TIER BADGES ============ */
.tier-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-top: 8px;
  font-weight: 700;
}
.tier-badge.tier-free {
  background: rgba(245,240,230,0.06);
  color: rgba(245,240,230,0.65);
  border: 1px solid rgba(245,240,230,0.15);
}
.tier-badge.tier-premium {
  background: rgba(225,29,46,0.12);
  color: var(--red);
  border: 1px solid rgba(225,29,46,0.45);
}
.tier-badge.tier-pro {
  background: linear-gradient(135deg, rgba(212,168,67,0.18) 0%, rgba(225,29,46,0.12) 100%);
  color: var(--gold);
  border: 1px solid rgba(212,168,67,0.5);
}

.pro-mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.toggle-locked {
  width: 44px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245,240,230,0.05);
  border: 1px dashed rgba(245,240,230,0.18);
  border-radius: 999px;
  color: rgba(245,240,230,0.55);
  font-size: 13px;
  flex-shrink: 0;
}

.upgrade-link { cursor: pointer; }

/* ============ LEDGER GATE (for non-premium) ============ */
.ledger-gate {
  background: linear-gradient(160deg, rgba(225,29,46,0.06) 0%, rgba(245,240,230,0.025) 100%);
  border: 1px solid rgba(225,29,46,0.3);
  border-radius: 22px;
  padding: 36px 24px;
  text-align: center;
  max-width: 540px;
  margin: 16px auto;
}
.ledger-gate-mark {
  font-size: 36px;
  margin-bottom: 14px;
}
.ledger-gate h2 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 10px;
}
.ledger-gate p {
  color: rgba(245,240,230,0.7);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.ledger-gate-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  display: inline-block;
}
.ledger-gate-perks li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(245,240,230,0.85);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ledger-gate-perks li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--red);
  color: var(--paper);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}
.ledger-gate-meta {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245,240,230,0.4);
  text-transform: uppercase;
}

/* ============ POST CAPTION (write-up) ============ */
.post-caption {
  font-size: 15px;
  color: rgba(245,240,230,0.85);
  line-height: 1.55;
  margin-top: 12px;
  white-space: pre-wrap;
}

.post-id {
  color: rgba(225,29,46,0.7);
  font-size: 9px;
  letter-spacing: 0.18em;
}

/* ============ VERIFY VIEW ============ */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(245,240,230,0.08);
  margin-bottom: 22px;
}
.verify-banner-mark {
  width: 48px; height: 48px;
  background: var(--red);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--paper);
}
.verify-banner-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
}
.verify-banner-meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(245,240,230,0.5);
  text-transform: uppercase;
  margin-top: 2px;
}

.verify-card {
  border-radius: 18px;
  padding: 22px;
  background: rgba(245,240,230,0.025);
  border: 1px solid rgba(245,240,230,0.1);
}
.verify-card.verified {
  border-color: rgba(225,29,46,0.45);
  background: linear-gradient(160deg, rgba(225,29,46,0.06) 0%, rgba(245,240,230,0.02) 100%);
}
.verify-card.private {
  border-color: rgba(212,168,67,0.45);
}
.verify-card.not-found {
  border-color: rgba(245,240,230,0.1);
}
.verify-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--red);
}
.verify-card.private .verify-status { color: var(--gold); }
.verify-card.not-found .verify-status { color: rgba(245,240,230,0.55); }
.verify-image {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.verify-image img { display: block; width: 100%; height: auto; }
.verify-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: 14px;
}
.verify-grid > div { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(245,240,230,0.85); }
.verify-grid .label {
  display: block;
  color: var(--red);
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.verify-grid code { font-size: 11px; color: rgba(245,240,230,0.9); word-break: break-all; }
.verify-grid code.hash { font-size: 9px; }
.verify-caption {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--red);
  background: rgba(245,240,230,0.025);
  font-style: italic;
  color: rgba(245,240,230,0.85);
  font-size: 14px;
  line-height: 1.55;
  border-radius: 0 8px 8px 0;
}
.verify-note {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(245,240,230,0.55);
}
@media (max-width: 540px) {
  .verify-grid { grid-template-columns: 1fr; }
}
.verify-match-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(245,240,230,0.025);
  border: 1px solid rgba(245,240,230,0.12);
}
.verify-match-card.yes {
  border-color: rgba(225,29,46,0.5);
  background: rgba(225,29,46,0.05);
}
.verify-match-card.no {
  border-color: rgba(212,168,67,0.5);
  background: rgba(212,168,67,0.05);
}
.verify-match-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 700;
}
.verify-match-card.yes .verify-match-status { color: var(--red); }
.verify-match-card.no .verify-match-status { color: var(--gold); }

/* ============ CREATIVE MODE PREVIEW ============ */
.creative-preview {
  margin-top: 22px;
  background: rgba(245,240,230,0.025);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 18px;
  padding: 16px;
}
.creative-preview-stage {
  background: #050505;
  border-radius: 12px;
  padding: 14px;
  overflow: hidden;
}
.creative-preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}
.creative-result {
  background: #050505;
  padding: 14px;
}
.creative-result-stage > * { margin: 0 auto; }

/* ---------- Style: Newspaper ---------- */
.cm-newspaper {
  background: #f1ead8;
  color: #1a1a1a;
  font-family: 'Libre Baskerville', serif;
  padding: 26px 24px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.cm-newspaper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
}
.cm-newspaper-masthead {
  text-align: center;
  border-bottom: 3px double #1a1a1a;
  padding-bottom: 8px;
  margin-bottom: 14px;
  position: relative;
}
.cm-newspaper-name {
  font-family: 'UnifrakturMaguntia', serif;
  font-size: 36px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.cm-newspaper-edition {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}
.cm-newspaper-headline {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.05;
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  position: relative;
}
.cm-newspaper-subhead {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 15px;
  text-align: center;
  margin-bottom: 14px;
  color: #2a2a2a;
  position: relative;
}
.cm-newspaper-byline {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 4px;
  position: relative;
}
.cm-newspaper-dateline {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  position: relative;
}
.cm-newspaper-body {
  column-count: 2;
  column-gap: 20px;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: justify;
  position: relative;
}
.cm-newspaper-body p { margin: 0 0 8px; }
.cm-newspaper-body p:first-child::first-letter {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 36px;
  float: left;
  line-height: 0.85;
  margin-right: 4px;
  margin-top: 4px;
}
@media (max-width: 480px) {
  .cm-newspaper-body { column-count: 1; }
}

/* ---------- Style: Betting Slip ---------- */
.cm-slip {
  background: #fdfcf6;
  color: #181818;
  font-family: 'JetBrains Mono', monospace;
  padding: 22px 20px;
  border-radius: 4px;
  max-width: 360px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.cm-slip::before, .cm-slip::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 12px;
  background-image: radial-gradient(circle at 6px 6px, transparent 4px, #fdfcf6 4px);
  background-size: 12px 12px;
}
.cm-slip::before { top: -6px; }
.cm-slip::after  { bottom: -6px; transform: scaleY(-1); }
.cm-slip-header {
  text-align: center;
  border-bottom: 1px dashed #999;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.cm-slip-book {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2em;
}
.cm-slip-ticket {
  font-size: 10px;
  color: #666;
  margin-top: 4px;
  letter-spacing: 0.15em;
}
.cm-slip-divider {
  border-top: 1px dashed #999;
  margin: 10px 0;
}
.cm-slip-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #555;
  text-transform: uppercase;
}
.cm-slip-row {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 2px;
  margin: 8px 0;
}
.cm-slip-label {
  font-weight: 700;
  font-size: 13px;
}
.cm-slip-line {
  font-size: 10px;
  color: #555;
  grid-column: 1;
}
.cm-slip-odds {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-weight: 700;
  font-size: 16px;
  color: #b00b1e;
  align-self: center;
}
.cm-slip-totals {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 8px;
}
.cm-slip-totals span {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #777;
  text-transform: uppercase;
  display: block;
}
.cm-slip-totals strong { font-size: 16px; }
.cm-slip-payout { color: #b00b1e; }

/* ---------- Style: Court Doc ---------- */
.cm-court {
  background: #fbf8eb;
  color: #1c1a14;
  font-family: 'Special Elite', monospace;
  padding: 32px 28px;
  border: 1px solid #c9bfa1;
  border-radius: 2px;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.cm-court::before {
  content: "";
  position: absolute;
  left: 12px; top: 12px; right: 12px; bottom: 12px;
  border: 1px solid rgba(28, 26, 20, 0.15);
  pointer-events: none;
  border-radius: 2px;
}
.cm-court-seal {
  font-size: 32px;
  text-align: center;
  margin-bottom: 8px;
}
.cm-court-court {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.18em;
  margin-bottom: 4px;
}
.cm-court-case {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
}
.cm-court-caption {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
  font-style: italic;
}
.cm-court-divider {
  border-top: 1px solid #1c1a14;
  margin: 16px 0;
}
.cm-court-statement {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.cm-court-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
  margin-top: 6px;
}
.cm-court-sig {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  border-bottom: 1px solid #1c1a14;
  padding-bottom: 2px;
  min-width: 200px;
  text-align: center;
}

/* ---------- Style: Polaroid ---------- */
.cm-polaroid {
  background: #f5f1e8;
  padding: 12px 12px 24px;
  border-radius: 3px;
  max-width: 320px;
  margin: 18px auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
  transform: rotate(-1deg);
  position: relative;
  font-family: 'Caveat', cursive;
}
.cm-polaroid-photo {
  background: linear-gradient(160deg, #1f1f1f 0%, #3a3a3a 100%);
  aspect-ratio: 1 / 1;
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  color: #f1ead8;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}
.cm-polaroid-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(225,29,46,0.18) 0%, transparent 60%);
}
.cm-polaroid-scene { position: relative; z-index: 2; }
.cm-polaroid-margin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6px 0;
  color: #1c1a14;
}
.cm-polaroid-hand {
  font-size: 22px;
  line-height: 1.1;
}
.cm-polaroid-date {
  font-size: 18px;
  color: #555;
}

/* ---------- Style: Text Msg ---------- */
.cm-text {
  background: #0e0e10;
  color: #fff;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  max-width: 360px;
  margin: 0 auto;
  border: 1px solid rgba(245,240,230,0.08);
}
.cm-text-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(245,240,230,0.04);
  border-bottom: 1px solid rgba(245,240,230,0.08);
  padding: 10px 14px;
}
.cm-text-back {
  color: #4a90e2;
  font-size: 22px;
  line-height: 1;
}
.cm-text-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.cm-text-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #555, #333);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.cm-text-name {
  font-size: 11px;
  color: rgba(245,240,230,0.6);
  margin-top: 3px;
}
.cm-text-thread {
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cm-text-row {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}
.cm-text-row.me { align-self: flex-end; align-items: flex-end; }
.cm-text-row.them { align-self: flex-start; align-items: flex-start; }
.cm-text-bubble {
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}
.cm-text-row.me .cm-text-bubble {
  background: #2a78f3;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.cm-text-row.them .cm-text-bubble {
  background: #2c2c2e;
  color: #f1ead8;
  border-bottom-left-radius: 4px;
}
.cm-text-time {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(245,240,230,0.4);
  margin-top: 2px;
  text-transform: uppercase;
}

/* ============ PROFILE EXTRAS ============ */
.profile-cta-row .btn-stamp {
  box-shadow: 0 6px 18px rgba(225,29,46,0.25);
}

/* ============ LEDGER NUDGE (anonymous visitors) ============ */
.ledger-nudge {
  background: linear-gradient(160deg, rgba(225,29,46,0.06) 0%, rgba(245,240,230,0.025) 100%);
  border: 1px solid rgba(225,29,46,0.25);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  text-align: center;
}
.ledger-nudge-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
}
.ledger-nudge-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,240,230,0.55);
  margin-top: 4px;
}

/* ============ SHARE MODAL ============ */
.share-modal { max-width: 460px; }
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.share-tile {
  background: rgba(245,240,230,0.04);
  border: 1px solid rgba(245,240,230,0.1);
  color: var(--paper);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 96px;
}
.share-tile:hover {
  border-color: var(--red);
  background: rgba(225,29,46,0.05);
  transform: translateY(-1px);
}
.share-tile-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(245,240,230,0.06);
  border-radius: 8px;
}
.share-tile-icon.ig {
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
  color: #fff;
}
.share-tile-icon.x {
  background: #000;
  color: #fff;
  font-weight: 900;
  font-family: 'Fraunces', serif;
}
.share-tile-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.share-tile-meta {
  font-size: 10px;
  color: rgba(245,240,230,0.55);
  letter-spacing: 0.05em;
}
@media (max-width: 420px) {
  .share-grid { grid-template-columns: 1fr; }
  .share-tile { min-height: 0; flex-direction: row; align-items: center; }
  .share-tile-icon { margin-bottom: 0; margin-right: 12px; }
}

/* Off-screen export stage for canvas compositing */
#exportStage {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1080px;
  height: 1920px;
  pointer-events: none;
  opacity: 0;
}
