/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:          #04010a;
  --bg-2:        #090415;
  --bg-3:        #100820;
  --bg-4:        #1a0d2e;
  --bg-5:        #220f38;

  /* Glass layers — true depth, not opacity soup */
  --glass:       rgba(9, 4, 21, 0.88);
  --glass-2:     rgba(16, 8, 32, 0.72);
  --glass-3:     rgba(26, 13, 46, 0.6);

  /* Borders — hairline precision */
  --border:      rgba(140, 50, 120, 0.14);
  --border-2:    rgba(200, 80, 160, 0.22);
  --border-3:    rgba(240, 120, 190, 0.12);
  --border-gold: rgba(255, 210, 140, 0.12);

  /* Text — four distinct weights */
  --text:        #f5e8f0;
  --text-2:      #b87aa0;
  --text-3:      #6a3858;
  --text-4:      #3d1e35;

  /* Accent system */
  --accent:      #f05590;
  --accent-2:    #ffb3d4;
  --accent-dim:  #c0366a;
  --accent-glow: rgba(240, 85, 144, 0.18);
  --accent-deep: rgba(240, 85, 144, 0.06);

  /* Gold touch for warmth */
  --gold:        #e8b86d;
  --gold-glow:   rgba(232, 184, 109, 0.12);

  /* Petal colors */
  --petal-a:     rgba(255, 180, 210, 0.7);
  --petal-b:     rgba(255, 148, 188, 0.55);

  --warn:        #ff6b6b;

  --serif:       'Playfair Display', Georgia, serif;
  --mono:        'DM Mono', monospace;
  --sans:        'DM Sans', sans-serif;

  --radius:      10px;
  --radius-lg:   18px;
  --radius-xl:   26px;

  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows — layered for real depth */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:   0 24px 80px rgba(0,0,0,0.65), 0 8px 24px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 60px rgba(240,85,144,0.18), 0 0 120px rgba(240,85,144,0.08);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

/* ── Background layers ───────────────────────────────────────────────────────── */
.sakura-bg {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 55vh;
  background: url('/static/4078.gif') center bottom / cover no-repeat;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0,0,0,0.06) 20%,
    rgba(0,0,0,0.4) 55%,
    rgba(0,0,0,0.85) 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0,0,0,0.06) 20%,
    rgba(0,0,0,0.4) 55%,
    rgba(0,0,0,0.85) 100%);
  opacity: 0.55;
}

.noise {
  position: fixed;
  inset: 0; z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.ambient {
  position: fixed;
  inset: 0; z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute;
  width: 1000px; height: 800px;
  left: 50%; top: 35%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse,
    rgba(240,85,144,0.09) 0%,
    rgba(170,50,130,0.06) 40%,
    transparent 68%);
  filter: blur(100px);
  animation: ambA 28s ease-in-out infinite alternate;
}
.ambient::after {
  content: '';
  position: absolute;
  width: 700px; height: 500px;
  right: -8%; top: 5%;
  background: radial-gradient(ellipse,
    rgba(200,70,160,0.06) 0%,
    rgba(150,50,120,0.03) 55%,
    transparent 75%);
  filter: blur(110px);
  animation: ambB 36s ease-in-out infinite alternate-reverse;
}
@keyframes ambA {
  0%   { transform: translate(-50%,-50%) scale(1);    opacity: 0.65; }
  50%  { transform: translate(-50%,-54%) scale(1.14); opacity: 1; }
  100% { transform: translate(-50%,-46%) scale(0.88); opacity: 0.7; }
}
@keyframes ambB {
  0%   { transform: scale(1);    opacity: 0.55; }
  50%  { transform: scale(1.18); opacity: 0.95; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

/* ── Petals ──────────────────────────────────────────────────────────────────── */
.petals {
  position: fixed;
  inset: 0; z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -20px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
}
.petal:nth-child(1)  { left:3%;   width:7px;  height:7px;  animation-duration:13s; animation-delay:0s;   background:var(--petal-a); }
.petal:nth-child(2)  { left:9%;   width:9px;  height:7px;  animation-duration:17s; animation-delay:2s;   background:var(--petal-b); }
.petal:nth-child(3)  { left:17%;  width:6px;  height:8px;  animation-duration:14s; animation-delay:5s;   background:var(--petal-a); }
.petal:nth-child(4)  { left:25%;  width:5px;  height:5px;  animation-duration:19s; animation-delay:1s;   background:rgba(255,200,220,0.5); }
.petal:nth-child(5)  { left:33%;  width:8px;  height:6px;  animation-duration:12s; animation-delay:7s;   background:var(--petal-b); }
.petal:nth-child(6)  { left:41%;  width:10px; height:8px;  animation-duration:16s; animation-delay:3s;   background:var(--petal-a); }
.petal:nth-child(7)  { left:50%;  width:6px;  height:7px;  animation-duration:18s; animation-delay:9s;   background:rgba(255,160,200,0.55); }
.petal:nth-child(8)  { left:58%;  width:8px;  height:5px;  animation-duration:11s; animation-delay:4s;   background:var(--petal-b); }
.petal:nth-child(9)  { left:66%;  width:7px;  height:9px;  animation-duration:20s; animation-delay:6s;   background:var(--petal-a); }
.petal:nth-child(10) { left:74%;  width:5px;  height:6px;  animation-duration:14s; animation-delay:0s;   background:rgba(255,200,225,0.45); }
.petal:nth-child(11) { left:82%;  width:9px;  height:7px;  animation-duration:15s; animation-delay:8s;   background:var(--petal-b); }
.petal:nth-child(12) { left:90%;  width:6px;  height:8px;  animation-duration:13s; animation-delay:11s;  background:var(--petal-a); }
.petal:nth-child(13) { left:6%;   width:8px;  height:6px;  animation-duration:21s; animation-delay:13s;  background:var(--petal-b); }
.petal:nth-child(14) { left:22%;  width:5px;  height:5px;  animation-duration:16s; animation-delay:15s;  background:rgba(255,180,210,0.5); }
.petal:nth-child(15) { left:45%;  width:7px;  height:8px;  animation-duration:14s; animation-delay:17s;  background:var(--petal-a); }
.petal:nth-child(16) { left:61%;  width:9px;  height:7px;  animation-duration:19s; animation-delay:19s;  background:var(--petal-b); }
.petal:nth-child(17) { left:77%;  width:6px;  height:9px;  animation-duration:15s; animation-delay:21s;  background:rgba(255,200,220,0.45); }
.petal:nth-child(18) { left:95%;  width:8px;  height:6px;  animation-duration:17s; animation-delay:10s;  background:var(--petal-a); }
.petal:nth-child(19) { left:13%;  width:6px;  height:7px;  animation-duration:13s; animation-delay:23s;  background:var(--petal-b); }
.petal:nth-child(20) { left:37%;  width:8px;  height:5px;  animation-duration:18s; animation-delay:25s;  background:var(--petal-a); }
.petal:nth-child(21) { left:54%;  width:5px;  height:8px;  animation-duration:22s; animation-delay:14s;  background:rgba(255,160,200,0.5); }
.petal:nth-child(22) { left:70%;  width:7px;  height:6px;  animation-duration:16s; animation-delay:27s;  background:var(--petal-b); }
.petal:nth-child(23) { left:86%;  width:9px;  height:7px;  animation-duration:12s; animation-delay:29s;  background:var(--petal-a); }
.petal:nth-child(24) { left:98%;  width:6px;  height:6px;  animation-duration:20s; animation-delay:16s;  background:rgba(255,200,215,0.5); }

@keyframes petalFall {
  0%   { top:-20px; opacity:0;    transform: translateX(0)    rotate(0deg)   scale(0.8); }
  8%   {            opacity:0.85; }
  85%  {            opacity:0.6; }
  100% { top:105vh; opacity:0;    transform: translateX(130px) rotate(560deg) scale(1.1); }
}

/* ── Shared header ───────────────────────────────────────────────────────────── */
.site-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 44px;
  background: rgba(4, 1, 10, 0.75);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  animation: headerIn 0.8s var(--ease-expo) 0s both;
}
/* Subtle bottom gradient line */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(240,85,144,0.35) 30%,
    rgba(240,85,144,0.35) 70%,
    transparent);
  opacity: 0.6;
}
@keyframes headerIn {
  from { opacity:0; transform:translateY(-14px); }
  to   { opacity:1; transform:translateY(0); }
}

.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
}
.logo:hover { text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.stork-mark {
  width: 24px; height: 24px;
  color: var(--accent);
  animation: storkGlow 8s ease-in-out infinite;
}
@keyframes storkGlow {
  0%,100% { filter: drop-shadow(0 0 4px rgba(240,85,144,0.4)); }
  50%      { filter: drop-shadow(0 0 16px rgba(240,85,144,1)); }
}
.logo-text { font-family: var(--serif); }

.header-nav { display: flex; align-items: center; gap: 16px; }
.nav-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
  border: 1px solid var(--border-2);
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(240,85,144,0.03);
}

/* ── Hub button ──────────────────────────────────────────────────────────────── */
.btn-hub {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(240,85,144,0.06);
  border: 1px solid rgba(240,85,144,0.22);
  padding: 7px 16px;
  border-radius: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.btn-hub:hover {
  background: rgba(240,85,144,0.14);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 24px rgba(240,85,144,0.15), inset 0 1px 0 rgba(240,85,144,0.1);
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; }
.sidebar-header .btn-hub { font-size: 0.65rem; padding: 5px 10px; }

/* ─────────────────────────────────────────────────────────────────────────────
   HOME PAGE
───────────────────────────────────────────────────────────────────────────── */
.home-main {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 61px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  align-items: center;
}

/* Left column */
.home-left {
  padding: 64px 72px 64px 0;
  animation: homeLeftIn 1.1s var(--ease-expo) 0.1s both;
}
@keyframes homeLeftIn {
  from { opacity:0; transform: translateX(-36px); }
  to   { opacity:1; transform: translateX(0); }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  margin-bottom: 28px;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Headline — big serif moment */
.headline {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 5.8vw, 5.8rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 30px;
}
.headline em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  background: linear-gradient(135deg, #f05590 0%, #ff88c4 55%, #f05590 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: accentSlide 4s ease-in-out infinite alternate;
  text-shadow: none;
  filter: drop-shadow(0 0 40px rgba(240,85,144,0.4));
}
@keyframes accentSlide {
  from { background-position: 0% center; filter: drop-shadow(0 0 30px rgba(240,85,144,0.3)); }
  to   { background-position: 100% center; filter: drop-shadow(0 0 60px rgba(240,85,144,0.6)); }
}

.headline-ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 85, 144, 0.28);
  font-style: italic;
  letter-spacing: 0.01em;
}

.tagline {
  font-size: 0.97rem;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 44px;
  max-width: 360px;
}
.tagline strong { color: var(--text); font-weight: 500; }

.steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.step-n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(240,85,144,0.1);
  border: 1px solid rgba(240,85,144,0.28);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-line {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-2), transparent);
  margin: 0 10px;
  flex-shrink: 0;
}

/* ── Right column — create panel ─────────────────────────────────────────────── */
.home-right {
  padding: 64px 0 64px 64px;
  animation: homeRightIn 1.1s var(--ease-expo) 0.25s both;
}
@keyframes homeRightIn {
  from { opacity:0; transform: translateX(36px); }
  to   { opacity:1; transform: translateX(0); }
}

.create-panel {
  background: var(--glass);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 38px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(240,85,144,0.04) inset,
    0 1px 0 rgba(240,85,144,0.12) inset,
    0 80px 120px rgba(0,0,0,0.6);
}

/* Aurora sweep */
.create-panel::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(240,85,144,0.06) 12%,
    rgba(240,85,144,1) 48%,
    rgba(255,180,218,0.7) 72%,
    transparent 100%);
  animation: auroraSwipe 7s ease-in-out infinite;
}
@keyframes auroraSwipe {
  0%  { left:-100%; opacity:1; }
  52% { left:100%;  opacity:1; }
  53% { left:100%;  opacity:0; }
  54% { left:-100%; opacity:0; }
  55% { left:-100%; opacity:1; }
  100%{ left:-100%; opacity:1; }
}

/* Inner radial glow from top */
.create-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(240,85,144,0.09) 0%, transparent 70%);
  pointer-events: none;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.panel-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--text-3);
  text-transform: uppercase;
}
.btn-random {
  background: var(--glass-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 7px 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
}
.btn-random svg { width: 14px; height: 14px; }
.btn-random:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240,85,144,0.06);
  box-shadow: 0 0 18px rgba(240,85,144,0.1);
}

/* Address composer */
.address-composer {
  display: flex;
  align-items: stretch;
  background: rgba(4, 1, 10, 0.85);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.address-composer:focus-within {
  border-color: rgba(240,85,144,0.55);
  box-shadow: 0 0 0 3px rgba(240,85,144,0.07), 0 0 40px rgba(240,85,144,0.07);
}

.composer-input-wrap { flex: 1; }
.composer-input {
  width: 100%;
  background: transparent;
  border: none; outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 16px 18px;
  caret-color: var(--accent);
  letter-spacing: 0.03em;
}
.composer-input::placeholder { color: var(--text-4); }

.composer-domain {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--accent);
  padding: 0 18px;
  border-left: 1px solid var(--border-2);
  display: flex; align-items: center;
  background: rgba(240,85,144,0.04);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Address preview */
.address-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 1, 10, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  margin-bottom: 20px;
  gap: 12px;
  min-height: 46px;
}
.preview-addr {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  word-break: break-all;
  flex: 1;
  text-shadow: 0 0 24px rgba(240,85,144,0.25);
}
.btn-copy-preview {
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 7px;
  color: var(--text-2);
  cursor: pointer;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 0.7rem;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.25s ease;
  white-space: nowrap; flex-shrink: 0;
}
.btn-copy-preview svg { width: 12px; height: 12px; }
.btn-copy-preview:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(240,85,144,0.1);
}
.btn-copy-preview.copied { border-color: var(--accent); color: var(--accent); }

/* Open inbox button — the hero CTA */
.btn-open-inbox {
  width: 100%;
  background: linear-gradient(135deg, #f05590 0%, #d63474 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 17px 22px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  transition: transform 0.3s var(--ease-expo), box-shadow 0.3s ease, background 0.25s ease;
  letter-spacing: 0.07em;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 0.82rem;
  box-shadow: 0 8px 32px rgba(240,85,144,0.3), 0 2px 8px rgba(240,85,144,0.25), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-open-inbox::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn-open-inbox:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(240,85,144,0.45), 0 4px 16px rgba(240,85,144,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  background: linear-gradient(135deg, #ff6ba3 0%, #e83d7f 100%);
}
.btn-open-inbox:hover::before { left: 130%; }
.btn-open-inbox:active { transform: translateY(0); }
.btn-open-inbox:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-open-text { flex: 1; text-align: left; font-weight: 500; }
.btn-open-arrow {
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.18);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-expo);
}
.btn-open-inbox:hover .btn-open-arrow { transform: translateX(4px); }
.btn-open-arrow svg { width: 15px; height: 15px; }

.create-error {
  margin-top: -12px;
  margin-bottom: 16px;
  font-size: 0.76rem;
  color: var(--warn);
  font-family: var(--mono);
  text-align: center;
}

/* Panel footer */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.pf-sep { color: var(--border-2); opacity: 0.6; }

/* ─────────────────────────────────────────────────────────────────────────────
   INBOX PAGE — full-height split layout
───────────────────────────────────────────────────────────────────────────── */
.inbox-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inbox-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 3;
  animation: shellIn 0.8s var(--ease-expo) 0s both;
}
@keyframes shellIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.inbox-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(4, 1, 10, 0.9);
  backdrop-filter: blur(32px) saturate(1.3);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
  overflow: hidden;
}

/* Sidebar header */
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(9, 4, 21, 0.5);
}

/* Inbox info section */
.inbox-info {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(16, 8, 32, 0.35) 0%, transparent 100%);
}
.inbox-info-label {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  color: var(--text-3);
  margin-bottom: 7px;
  text-transform: uppercase;
}
.inbox-address-display {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--accent);
  word-break: break-all;
  margin-bottom: 14px;
  text-shadow: 0 0 24px rgba(240,85,144,0.22);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

/* Action buttons — equal weight row */
.inbox-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 0;
}
.iaction-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 5px;
  background: rgba(16, 8, 32, 0.7);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 7px 4px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.2s ease;
}
.iaction-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.iaction-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240,85,144,0.06);
  box-shadow: 0 0 16px rgba(240,85,144,0.08);
  text-decoration: none;
}
.iaction-new {
  background: rgba(240,85,144,0.07);
  border-color: rgba(240,85,144,0.28);
  color: var(--accent);
}
.iaction-new:hover {
  background: rgba(240,85,144,0.14);
  box-shadow: 0 0 20px rgba(240,85,144,0.14);
}
.iaction-btn:disabled { opacity: 0.35; cursor: not-allowed; }
@keyframes spin360 { to { transform: rotate(360deg); } }

/* Permanent toggle */
.permanent-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  gap: 12px;
  background: rgba(9, 4, 21, 0.4);
}
.permanent-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.permanent-toggle-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.permanent-toggle-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
  transition: color 0.3s ease;
}
.permanent-toggle-sub.is-permanent { color: var(--accent); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: rgba(26, 13, 46, 0.8);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 0;
}
.toggle-switch.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(240,85,144,0.45);
}
.toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.3s var(--ease-spring), background 0.3s ease;
  display: block;
}
.toggle-switch.on .toggle-knob {
  transform: translateX(18px);
  background: #fff;
}
.toggle-switch:disabled { opacity: 0.4; cursor: not-allowed; }

/* Status bar */
.inbox-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(4, 1, 10, 0.6);
}

.timer-block {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem;
}
.timer-icon { width: 12px; height: 12px; color: var(--text-3); flex-shrink: 0; }
.timer-display { font-weight: 500; color: var(--accent); letter-spacing: 0.04em; }
.timer-display.urgent { color: var(--warn); animation: urgentPulse 1.8s ease infinite; }
@keyframes urgentPulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.6rem;
  font-weight: 500; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
}
.live-dot {
  position: relative;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.live-dot::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(240,85,144,0.7);
  opacity: 0;
  animation: sonarRing 2.8s ease-out infinite;
}
.live-dot::after {
  content: '';
  position: absolute; inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(240,85,144,0.28);
  opacity: 0;
  animation: sonarRing 2.8s ease-out 0.45s infinite;
}
@keyframes sonarRing {
  0%   { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(2.5); opacity: 0; }
}
.live-indicator.disconnected { color: var(--text-3); }
.live-indicator.disconnected .live-dot { background: var(--text-3); }
.live-indicator.disconnected .live-dot::before,
.live-indicator.disconnected .live-dot::after { display: none; }

/* Expired banner */
.expired-banner {
  background: rgba(255,107,107,0.07);
  border-bottom: 1px solid rgba(255,107,107,0.18);
  padding: 9px 20px;
  font-size: 0.74rem;
  color: var(--warn);
  font-family: var(--mono);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.expired-banner a { color: var(--warn); text-decoration: underline; text-underline-offset: 3px; }

/* ── Email list ───────────────────────────────────────────────────────────── */
.email-list {
  flex: 1;
  overflow-y: auto;
}

.email-item {
  padding: 14px 20px 14px 22px;
  border-bottom: 1px solid rgba(120, 40, 100, 0.1);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  overflow: hidden;
  animation: transmit 0.45s var(--ease-expo) both;
}
@keyframes transmit {
  from { opacity:0; transform:translateX(12px); filter:blur(1px); }
  to   { opacity:1; transform:translateX(0);    filter:blur(0); }
}
.email-item:last-child { border-bottom: none; }

/* Left accent bar */
.email-item::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-expo);
}
.email-item:hover::before { opacity: 0.45; transform: scaleY(1); }
.email-item.active::before { opacity: 1; transform: scaleY(1); }

.email-item:hover { background: rgba(16, 8, 32, 0.7); }
.email-item.active {
  background: linear-gradient(90deg, rgba(240,85,144,0.07) 0%, rgba(240,85,144,0.03) 100%);
}

.email-item.new::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px rgba(240,85,144,0.8);
  animation: signalFade 5s ease forwards;
}
@keyframes signalFade { 0%{opacity:1;} 60%{opacity:0.5;} 100%{opacity:0;} }

.email-item-sender {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.email-item-time {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.email-item-subject {
  font-size: 0.77rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}
.email-item:hover .email-item-subject,
.email-item.active .email-item-subject { color: var(--text-2); }

.email-attach-badge {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-left: 6px;
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.empty-state.hidden { display: none; }

.empty-svg {
  width: 70px; height: 56px;
  color: var(--text-3);
  margin-bottom: 18px;
  animation: emptyFloat 6s ease-in-out infinite;
  opacity: 0.5;
}
@keyframes emptyFloat {
  0%,100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-10px) rotate(1.5deg); }
}
.empty-svg rect, .empty-svg path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawStroke 2.2s var(--ease-expo) 0.3s forwards;
}
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

.dot-1,.dot-2,.dot-3 { opacity: 0; }
.dot-1 { animation: dotDrift 2.2s ease 0s infinite; }
.dot-2 { animation: dotDrift 2.2s ease 0.38s infinite; }
.dot-3 { animation: dotDrift 2.2s ease 0.75s infinite; }
@keyframes dotDrift {
  0%,100% { opacity:0; transform:translateY(0); }
  45%     { opacity:0.6; transform:translateY(-4px); }
}

.empty-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text-3);
  margin-bottom: 5px;
}
.empty-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
  line-height: 1.7;
  opacity: 0.65;
}

/* ── Reading pane ─────────────────────────────────────────────────────────── */
.reading-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(6, 2, 12, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Empty reading state */
.reading-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  animation: fadeIn 0.5s ease both;
}
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.reading-empty-svg {
  width: 100px; height: 75px;
  color: rgba(240,85,144,0.1);
  margin-bottom: 22px;
}
.reading-empty-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text-3);
  margin-bottom: 8px;
  opacity: 0.6;
}
.reading-empty-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  opacity: 0.4;
  letter-spacing: 0.04em;
}

/* Email content */
.reading-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: readingIn 0.4s var(--ease-expo) both;
}
@keyframes readingIn {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: translateX(0); }
}

.reading-header {
  padding: 28px 40px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(9, 4, 21, 0.6) 0%, transparent 100%);
}

.reading-meta-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.reading-from-wrap {
  display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0;
}
.reading-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(240,85,144,0.18) 0%, rgba(160,50,130,0.12) 100%);
  border: 1px solid rgba(240,85,144,0.28);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(240,85,144,0.12);
}
.reading-from-info { flex: 1; min-width: 0; }
.reading-from {
  font-size: 0.82rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.reading-time {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  letter-spacing: 0.03em;
}

.reading-close-btn {
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-3);
  cursor: pointer;
  padding: 7px;
  display: flex;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.reading-close-btn svg { width: 13px; height: 13px; }
.reading-close-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
  background: rgba(240,85,144,0.06);
}

.reading-subject {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.reading-attachments {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(4,1,10,0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 13px;
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
  flex-wrap: wrap;
}
.attach-icon { width: 12px; height: 12px; color: var(--text-3); flex-shrink: 0; }
.attach-chip {
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 2px 8px;
  color: var(--text-2);
  font-size: 0.68rem;
}

.reading-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
}
.rtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  cursor: pointer;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: -1px;
}
.rtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.rtab:hover:not(.active) { color: var(--text-2); }

.reading-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px 40px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-2);
}

/* Updated for secure iFrame rendering */
.email-html-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
}

.email-text-pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.75;
}

/* ── Scrollbars ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── SEO content section ─────────────────────────────────────────────────── */
.seo-section {
  position: relative; z-index: 3;
  background: rgba(4, 1, 10, 0.75);
  border-top: 1px solid var(--border);
  padding: 64px 48px;
  backdrop-filter: blur(20px);
}
.seo-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 56px;
}
.seo-block h2 {
  font-family: var(--serif); font-size: 0.95rem; font-weight: 700;
  font-style: italic;
  color: var(--text-2); margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.seo-block p { font-size: 0.8rem; color: var(--text-3); line-height: 1.85; }
.seo-block strong { color: var(--text-2); font-weight: 500; }
.seo-block em { color: var(--accent); font-style: normal; }

.seo-faq { border-bottom: 1px solid var(--border); padding: 10px 0; }
.seo-faq:first-of-type { border-top: 1px solid var(--border); }
.seo-faq summary {
  font-size: 0.78rem; color: var(--text-2); cursor: pointer;
  list-style: none; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  letter-spacing: 0.01em;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::after {
  content: '+'; color: var(--accent); font-size: 0.95rem;
  flex-shrink: 0; transition: transform 0.25s ease;
  font-family: var(--mono);
}
.seo-faq[open] summary::after { transform: rotate(45deg); }
.seo-faq p { font-size: 0.76rem; color: var(--text-3); line-height: 1.75; padding: 8px 0 4px; margin: 0; }

/* ── Scramble animation states ───────────────────────────────────────────── */
.composer-input.scrambling {
  cursor: default;
  user-select: none;
}
.address-composer.scrambling {
  border-color: rgba(240,85,144,0.55) !important;
  box-shadow: 0 0 0 3px rgba(240,85,144,0.08),
              0 0 32px rgba(240,85,144,0.1) !important;
  transition: none;
}
.address-composer.settled {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(240,85,144,0.12),
              0 0 48px rgba(240,85,144,0.18) !important;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.composer-input.settled {
  color: var(--accent) !important;
  transition: color 0.4s ease;
}

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

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-main {
    grid-template-columns: 1fr;
    padding: 0 28px;
    min-height: auto;
  }
  .home-left {
    padding: 52px 0 24px;
    text-align: center;
  }
  .steps { justify-content: center; }
  .tagline { margin: 0 auto 32px; }
  .home-right { padding: 0 0 52px; }
  .headline { font-size: clamp(2.6rem, 9vw, 3.8rem); }
}

@media (max-width: 768px) {
  .inbox-shell { grid-template-columns: 1fr; }
  .reading-pane { display: none; }
  .reading-pane.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--bg);
  }
  .inbox-page { height: 100dvh; }
  .sakura-bg { height: 30vh; }
}

@media (max-width: 480px) {
  .site-header { padding: 14px 20px; }
  .home-left { padding: 40px 0 20px; }
  .create-panel { padding: 26px 22px; }
  .seo-section { padding: 44px 22px; }
  .seo-inner { grid-template-columns: 1fr; gap: 32px; }
}
