/* subscription page styles; original rule order is preserved. */
#cursor { position:fixed; pointer-events:none; z-index:999999; top:0; left:0; transform:translate(-50%,-50%); transition:transform 0.08s ease; }

@keyframes ringPulse { 0%,100%{box-shadow:0 0 0 0 rgba(249,168,201,0.3);} 50%{box-shadow:0 0 0 8px rgba(249,168,201,0);} }

body {
  min-height:100vh;
  background:#07040f;
  font-family:'Zen Maru Gothic', sans-serif;
  overflow-x:hidden;
  position:relative;
}

.page-header {
  position:relative; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 28px 0;
  max-width:980px; margin:0 auto;
  opacity:0;
  animation:headerReveal 0.7s 2.05s cubic-bezier(.16,1,.3,1) both;
}

@keyframes headerReveal {
  from { opacity:0; transform:translateY(-12px); }
  to   { opacity:1; transform:translateY(0); }
}

.page-header-brand {
  display:flex; align-items:center; gap:10px;
  font-family:'Pacifico', cursive;
  font-size:20px; color:#ede8ff;
  text-shadow:0 0 18px rgba(200,160,255,0.45);
  text-decoration:none;
}

.page-header-brand span { font-size:13px; font-weight:900; letter-spacing:3px; text-transform:uppercase; color:rgba(249,168,201,0.7); font-family:'Zen Maru Gothic',sans-serif; }

.page-header-back {
  display:flex; align-items:center; gap:6px;
  font-size:11px; font-weight:900; letter-spacing:2px; text-transform:uppercase;
  color:rgba(249,168,201,0.65);
  text-decoration:none;
  padding:7px 14px; border-radius:999px;
  border:1px solid rgba(249,168,201,0.18);
  background:rgba(249,168,201,0.06);
  transition:background 0.2s, color 0.2s, border-color 0.2s;
}

.back-coffee-icon { flex-shrink:0; }

.page-header-back:hover { background:rgba(249,168,201,0.13); color:#f9a8c9; border-color:rgba(249,168,201,0.35); }

.roulette-page {
  position:relative; z-index:1;
  max-width:980px; margin:0 auto;
  padding:22px 20px 40px;
}

.roulette-page-head {
  text-align:center;
  margin-bottom:22px;
  opacity:0;
  animation:headReveal 0.7s 2.15s cubic-bezier(.16,1,.3,1) both;
}

@keyframes headReveal {
  from { opacity:0; transform:translateY(14px); filter:blur(6px); }
  to   { opacity:1; transform:translateY(0); filter:blur(0); }
}

.roulette-page-title {
  font-family:'Pacifico', cursive;
  font-size:clamp(26px, 5vw, 38px);
  color:#f0ecff;
  text-shadow:0 0 28px rgba(200,160,255,0.4), 0 2px 4px rgba(0,0,0,0.4);
  letter-spacing:1px;
}

.roulette-page-sub {
  margin-top:8px;
  font-size:12px; font-weight:700; color:rgba(210,200,240,0.5);
  letter-spacing:0.5px;
}

#page-intro {
  display:none;
  position:fixed; inset:0; z-index:999990;
  align-items:center; justify-content:center;
  overflow:hidden; pointer-events:all;
  background:
    radial-gradient(circle at 50% 38%, rgba(249,168,201,0.20) 0%, rgba(249,168,201,0.07) 20%, transparent 46%),
    radial-gradient(circle at 28% 20%, rgba(170,140,255,0.25) 0%, transparent 36%),
    radial-gradient(circle at 74% 78%, rgba(120,210,255,0.16) 0%, transparent 38%),
    linear-gradient(145deg, #07040f 0%, #120a24 48%, #080411 100%);
  color:#f7f0ff; isolation:isolate;
}

.intro-orbit {
  position:absolute; width:clamp(230px,42vw,620px); aspect-ratio:1;
  border-radius:50%; border:1px solid rgba(249,168,201,0.20);
  box-shadow:0 0 60px rgba(201,184,240,0.12), inset 0 0 40px rgba(255,255,255,0.035);
  opacity:0.58; animation:introOrbitSpin 9s linear infinite;
}

.intro-card {
  position:relative; z-index:2;
  width:min(440px, calc(100vw - 42px));
  padding:38px 34px 32px; text-align:center; border-radius:30px;
  background:linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04)), rgba(18,10,36,0.72);
  border:1px solid rgba(255,255,255,0.16);
  box-shadow:0 36px 110px rgba(0,0,0,0.48), 0 0 0 1px rgba(249,168,201,0.08), inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter:blur(18px); transform-origin:center;
  animation:introCardIn 0.82s 0.12s cubic-bezier(.16,1,.3,1) both, introCardOut 0.62s 1.28s cubic-bezier(.64,0,.78,0) forwards;
}

.intro-logo { font-family:'Pacifico',cursive; font-size:clamp(32px,7vw,50px); line-height:1.05; color:#fff7ff; text-shadow:0 0 26px rgba(249,168,201,0.42), 0 0 48px rgba(201,184,240,0.26); }

.intro-sub { font-size:13px; font-weight:700; color:rgba(210,200,240,0.6); margin-top:6px; }

.intro-kicker { font-size:9px; font-weight:900; letter-spacing:5px; text-transform:uppercase; color:rgba(249,168,201,0.78); margin-bottom:6px; }

html.has-intro body:not(.page-ready) #starfield,
html.has-intro body:not(.page-ready) .glow,
html.has-intro body:not(.page-ready) .roulette-page,
html.has-intro body:not(.page-ready) .page-header { opacity:0; }

@keyframes introAuroraSpin { from{transform:rotate(0deg) scale(1);} 50%{transform:rotate(180deg) scale(1.07);} to{transform:rotate(360deg) scale(1);} }

@keyframes introGridDrift  { from{transform:translate3d(-10px,-8px,0); opacity:0.48;} to{transform:translate3d(10px,8px,0); opacity:0.80;} }

@keyframes introOrbitSpin  { to{transform:rotate(360deg);} }

@keyframes introCardIn     { 0%{opacity:0;transform:translateY(22px) scale(0.92);filter:blur(12px);} 62%{opacity:1;transform:translateY(-5px) scale(1.018);filter:blur(0);} 100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0);} }

@keyframes introCardOut    { 0%,64%{opacity:1;transform:translateY(0) scale(1);filter:blur(0);} 100%{opacity:0;transform:translateY(-24px) scale(0.94);filter:blur(10px);} }

@keyframes introLoad       { 0%{transform:scaleX(0);} 72%{transform:scaleX(0.82);} 100%{transform:scaleX(1);} }

@keyframes introSparkFloat { 0%,100%{opacity:0.35;transform:translateY(0) scale(0.92) rotate(-6deg);} 50%{opacity:1;transform:translateY(-16px) scale(1.18) rotate(8deg);} }

@keyframes introVanish     { 0%,38%{opacity:1;clip-path:circle(155% at 50% 50%);filter:blur(0) saturate(1);} 100%{opacity:0;clip-path:circle(0% at 50% 50%);filter:blur(22px) saturate(1.45);} }

@keyframes skyReveal       { from{opacity:0;filter:blur(12px) brightness(0.7);transform:scale(1.035);} to{opacity:1;filter:blur(0) brightness(1);transform:scale(1);} }

@keyframes glowWake        { from{opacity:0;transform:translateY(18px) scale(0.86);filter:blur(120px);} to{opacity:1;transform:translateY(0) scale(1);filter:blur(90px);} }

@media (max-width:760px) {
.roulette-page { padding:16px 14px 32px; }

.page-header { padding:14px 16px 0; }
}

@media (max-width:500px) {
#cursor, #cursor-trail, #cursor-ring { display:none !important; }

* { cursor:auto !important; }
}

@media (prefers-reduced-motion:reduce) {
html.has-intro #page-intro { display:none !important; }

html.has-intro body { overflow:auto; }
}

html { background:#07040f; }

@media (prefers-reduced-motion:reduce) {
html::after { transition:none; }
}

.subscription-page { color:#ede8ff; padding-bottom:60px; }

.sub-hero { text-align:center; padding:34px 10px 32px; }

.sub-hero h1 { font-family:Pacifico,cursive; font-size:clamp(26px,5vw,38px); font-weight:400; margin:0 0 16px; }

.sub-hero p { max-width:480px; margin:0 auto 24px; color:#bcb0d0; line-height:1.8; font-size:14px; }

.subscribe-button { display:inline-flex; align-items:center; justify-content:center; gap:12px; background:linear-gradient(120deg,#c7a7ee,#efaecb); color:#32233e; text-decoration:none; border-radius:999px; padding:15px 30px; font:900 14px 'Zen Maru Gothic',sans-serif; box-shadow:0 5px 28px #c594df26; transition:transform .3s,box-shadow .3s; }

.subscribe-button:hover { transform:scale(1.055); box-shadow:0 8px 32px #c594df50; }

.sub-section { border:1px solid #bda3e335; border-radius:24px; background:linear-gradient(135deg,#302441e8,#181226ef); padding:26px; margin:18px 0; }

.sub-section h2 { font-family:Pacifico,cursive; font-size:26px; font-weight:400; }

.sub-section p { color:#bcb0d0; font-size:13px; line-height:1.7; margin:8px 0 20px; }

.sub-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(112px,1fr)); gap:12px; }

.sub-card { margin:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:142px; padding:18px 8px; border-radius:16px; border:1px solid #c8b2ec23; background:#c6a9f00b; transition:background .3s,border-color .3s; }

.sub-card:hover { background:#c6a9f01c; border-color:#c8b2ec66; }

.sub-card img { width:56px; height:56px; object-fit:contain; transition:transform .35s cubic-bezier(.2,.8,.2,1); }

.sub-card:hover img { transform:scale(1.2) rotate(-4deg); }

.sub-card figcaption { font-size:11px; text-align:center; color:#d3c4e7; overflow-wrap:anywhere; max-width:100%; }

.sub-group h3 { font-size:12px; letter-spacing:1px; margin:22px 0 12px; color:#edbdd9; }

.badge-grid .sub-card { min-height:115px; }

.badge-grid img { width:36px; height:36px; image-rendering:pixelated; }

.sub-status { text-align:center; color:#b9a7ca; font-size:12px; line-height:1.7; padding:10px; }

.sub-empty { color:#a99abb; font-size:13px; padding:24px 0; }

.sub-retry { border:1px solid #c7a7ee60; background:#c7a7ee15; color:#e8daf8; font:inherit; border-radius:20px; padding:7px 16px; margin:8px; }

.sub-retry[hidden] { display:none; }

a:focus-visible,button:focus-visible { outline:2px solid #f9a8c9; outline-offset:4px; }

@media(max-width:560px) {
.sub-section { padding:20px 15px; }

.sub-grid { grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:8px; }

.page-header-back { letter-spacing:.5px; font-size:9px; padding:8px; }
}

@media(prefers-reduced-motion:reduce) {
.subscription-page *, .subscribe-button { animation:none!important; transition:none!important; }
}

.sub-status-dot { position:relative; top:2px; display:block; flex:0 0 7px; width:7px; height:7px; border-radius:50%; background:#b9a7ca;  transition:background .3s,box-shadow .3s; }

.sub-status[data-state="ready"] .sub-status-dot { background:#9cd9b5; animation:collectionBlink 1.8s ease-in-out infinite; }

.sub-status[data-state="loading"] .sub-status-dot { background:#cbb5ee; animation:collectionPulse 1.4s ease-in-out infinite; }

.sub-status[data-state="stale"] .sub-status-dot { background:#e8bd7f; }

.sub-status[data-state="error"] .sub-status-dot { background:#e89aa7; }

@keyframes collectionPulse { 50% { opacity:.35; } }

.sub-status-line { display:inline-flex; align-items:center; justify-content:center; gap:9px; max-width:100%; }

.sub-hero { position:relative; isolation:isolate; max-width:720px; margin:0 auto 8px; padding:8px 16px 12px; }

.sub-hero::before { content:''; position:absolute; z-index:-1; inset:10% 5% 0; background:radial-gradient(ellipse at center,#b38bd518,transparent 70%); pointer-events:none; }

.sub-hero::after { content:''; display:block; width:180px; height:1px; margin:18px auto 0; background:linear-gradient(90deg,transparent,#d7aed866,transparent); }

.sub-hero-ornament { display:flex; align-items:center; justify-content:center; gap:18px; color:#d8b0cf; margin:0 auto 6px; }

.sub-hero-ornament span { width:64px; height:1px; background:linear-gradient(90deg,transparent,#d8b0cf70); }

.sub-hero-ornament span:last-child { transform:rotate(180deg); }

.subscribe-button { position:relative; border:1px solid #f7d4ec88; min-width:172px; box-shadow:0 5px 28px #c594df26,inset 0 1px 0 #ffffff4d; }

.subscribe-button:focus-visible { transform:scale(1.055); }

.subscribe-button:active { transform:scale(1.02); }

@keyframes collectionBlink { 0%,100% { opacity:1; box-shadow:0 0 10px #9cd9b58c; } 50% { opacity:.12; box-shadow:0 0 2px #9cd9b51a; } }

@media(max-width:640px) {
.sub-hero { margin:0 auto 8px; padding:4px 4px 8px; }

.sub-hero h1 { font-size:clamp(25px,6.5vw,32px); line-height:1.5; margin-bottom:14px; }

.sub-hero-ornament { gap:12px; }

.sub-hero-ornament svg { width:32px; height:32px; }

.subscribe-button { min-height:48px; min-width:180px; padding:12px 24px; }

.sub-section { margin:14px 0; padding:20px 14px; border-radius:20px; }

.sub-section h2 { font-size:clamp(21px,5.5vw,26px); line-height:1.5; overflow-wrap:break-word; }

.sub-section p { font-size:13px; margin:8px 0 16px; }

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

.sub-card { min-width:0; min-height:122px; padding:14px 6px; gap:10px; }

.sub-card img { width:48px; height:48px; }

.sub-card figcaption { font-size:10px; }

.badge-grid .sub-card { min-height:100px; }

.badge-grid img { width:36px; height:36px; }

.sub-status { font-size:11px; padding:10px 4px; }

.sub-retry { min-height:44px; }
}

@media(hover:none) and (pointer:coarse) {
.subscribe-button:hover,.subscribe-button:focus-visible { transform:none; }

.subscribe-button:active { transform:scale(.97); }

.sub-card:hover img { transform:none; }
}

.badge-tier + .badge-tier { margin-top:24px; padding-top:4px; border-top:1px solid #c8b2ec23; }

.badge-tier .badge-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }

@media(max-width:760px) {
.badge-tier .badge-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (hover:none) and (pointer:coarse) {
* { cursor:auto !important; }

#cursor,#cursor-ring,#cursor-trail { display:none !important; }
}

@media(max-width:640px) {
body { min-height:100svh; }

.page-header { gap:12px; padding:14px 14px 0; align-items:center; }

.page-header-brand { gap:6px; font-size:18px; flex-shrink:0; }

.page-header-brand span { font-size:10px; letter-spacing:2px; }

.page-header-back { min-height:44px; padding:8px 11px; gap:6px; font-size:9px; letter-spacing:.5px; text-align:center; }

.page-header-back span { max-width:125px; }

.roulette-page { padding:16px 12px max(28px,env(safe-area-inset-bottom)); }

.roulette-page-head { padding:4px 4px 8px; margin-bottom:16px; }

.roulette-page-title { font-size:clamp(25px,6.5vw,32px); line-height:1.5; }

.roulette-hero-ornament { gap:12px; }

.roulette-hero-ornament svg { width:32px; height:32px; }
}

@media(max-width:640px) {
.page-header .page-header-back {
    min-height:44px; padding:8px 10px; gap:7px;
    font-size:12px; font-weight:700; letter-spacing:0; text-transform:none;
    color:#d9b6ce; border:1px solid #d9b6ce26; border-radius:12px;
    background:#d9b6ce08; box-shadow:none; line-height:1.3;
  }

.page-header .page-header-back span { max-width:none; }

.page-header .back-coffee-icon { width:16px; height:16px; }

.page-header .page-header-back:active { background:#d9b6ce20; }
}

@media(max-width:350px) {
.page-header { gap:8px; }

.page-header .page-header-back { padding:8px; font-size:11px; }
}

.sub-bottom-action { display:flex; justify-content:center; padding:18px 0 14px; }

.intro-card { backdrop-filter:none; -webkit-backdrop-filter:none; }

@keyframes introVanish { 0%,38% { opacity:1; } 100% { opacity:0; } }

@keyframes skyReveal { from { opacity:0; } to { opacity:1; } }

@keyframes glowWake { from { opacity:0; transform:translateY(18px) scale(.86); } to { opacity:1; transform:translateY(0) scale(1); } }

@keyframes cafeCardReveal {
  0% { opacity:0; transform:translateY(40px) scale(.94); }
  60% { opacity:1; transform:translateY(-4px) scale(1.01); }
  100% { opacity:1; transform:translateY(0) scale(1); }
}

#cursor { transition:none; }

#page-intro { contain:layout paint style; }

html { min-height:100%; height:auto; }

body { height:auto; min-height:100vh; min-height:100svh; }

.page-header,.roulette-page { width:100%; max-width:1120px; min-width:0; }

.page-header { gap:16px; padding-left:clamp(12px,3vw,28px); padding-right:clamp(12px,3vw,28px); }

.page-header-brand { min-width:0; }

.page-header-back { flex-shrink:0; max-width:100%; }

.page-header-back span { overflow-wrap:anywhere; }

.roulette-page { padding-left:clamp(12px,2.5vw,24px); padding-right:clamp(12px,2.5vw,24px); }

.roulette-page-head,.sub-hero { min-width:0; max-width:100%; }

.roulette-page-title,.sub-hero h1 { overflow-wrap:break-word; text-wrap:balance; }

.roulette-price { max-width:100%; text-wrap:balance; }

.sub-section,.sub-group,.sub-grid,.sub-card { min-width:0; }

.sub-card figcaption { max-width:100%; overflow-wrap:anywhere; }

.sub-grid:not(.badge-grid) { grid-template-columns:repeat(auto-fill,minmax(min(112px,100%),1fr)); }

.sub-status-line { min-width:0; }

.sub-status-line > :not(.sub-status-dot) { min-width:0; overflow-wrap:anywhere; }

@media(max-width:640px) {
.page-header { gap:10px; padding-top:max(14px,env(safe-area-inset-top)); }

.page-header-brand { gap:6px; }

.page-header .page-header-back { min-height:44px; max-width:calc(100% - 135px); }

.page-header .page-header-back span { white-space:normal; }

.roulette-page { padding-bottom:max(28px,env(safe-area-inset-bottom)); }

.sub-grid:not(.badge-grid) { grid-template-columns:repeat(3,minmax(0,1fr)); }

.subscribe-button { max-width:100%; min-width:min(180px,100%); }
}

@media(max-width:359px) {
.page-header { gap:8px; flex-wrap:wrap; }

.page-header-brand { flex:0 0 auto; }

.page-header .page-header-back { margin-left:auto; font-size:10px; padding:7px 8px; max-width:100%; }

.sub-grid:not(.badge-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }

.sub-section { padding:18px 12px; }
}
