  :root { color-scheme: dark;
  --night: #0f0920;
  --night-2: #1b1133;
  --plum: #3a1d4f;
  --magenta: #c2367a;
  --sunset: #ff7a3d;
  --cream: #f6ead2;
  --gold: #e8b04a;
  --gold-hi: #ffe7a1;
  --red: #e3262f;
  --red-deep: #8f0e1a;
  --bulb: #fff3c4;
  --ink: #1a1220;
  --muted: #b9a9c9;
  --stone-hi: #d9d2d9;
  --stone-lo: #847a89;
  --panel: rgba(22, 13, 38, .82);
  --line: rgba(232, 176, 74, .35);
  --radius: 18px;
  --f-script: "Lobster", cursive;
  --f-marquee: "Bungee", "Archivo Black", sans-serif;
  --f-hand: "Permanent Marker", cursive;
  --f-body: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  background-color: var(--night);
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 26%, #ffe7a1 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 32%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 40%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #0b0718 0%, #1b1133 34%, #3a1d4f 58%, #7a2a55 76%, #d4583a 92%, #ff8a3d 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: var(--gold-hi); }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
.ico { width: 1.1em; height: 1.1em; vertical-align: -.18em; }

.skyline { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; z-index: 0; pointer-events: none; opacity: .95; }
.flashes { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.flashes i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px 6px rgba(255,255,255,.8), 0 0 40px 18px rgba(255,231,161,.35);
  opacity: 0; animation: flash 7s infinite;
}
@keyframes flash { 0%, 96%, 100% { opacity: 0; transform: scale(.4); } 97.5% { opacity: 1; transform: scale(1.4); } }

/* ---------- shell ---------- */
.demo-bar { position: relative; z-index: 3; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; padding: 6px 16px; }
header.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 10px calc(16px + env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(11,7,24,.92), rgba(11,7,24,.7));
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
header.top .home { text-decoration: none; margin-right: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 5px 10px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.icon-btn { white-space: nowrap; background: none; border: 1px solid var(--line); color: var(--cream); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; text-decoration: none; }
main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding-block: 18px 28vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- logo ---------- */
.logo { margin: 0; display: inline-flex; align-items: flex-end; line-height: .9; white-space: nowrap; font-weight: 400; }
.logo .celeb, .logo .ty {
  font-family: var(--f-script); color: var(--cream);
  -webkit-text-stroke: 2px #2a1630; paint-order: stroke fill;
  text-shadow: 0 2px 0 #c99a3c, 0 4px 0 #8a5d17, 0 7px 0 #2a1630, 0 10px 18px rgba(0,0,0,.55);
}
.logo .rip {
  position: relative; font-family: var(--f-marquee); color: var(--red); letter-spacing: .02em;
  -webkit-text-stroke: 2px var(--gold); paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(255,59,59,.85), 0 0 26px rgba(227,38,47,.6), 0 6px 0 var(--red-deep);
  margin: 0 .02em;
}
.logo .rip::after {
  content: attr(data-text); position: absolute; inset: 0; color: transparent;
  -webkit-text-stroke: 0;
  background: radial-gradient(circle, var(--bulb) 0 1.6px, rgba(255,243,196,.35) 2.4px, transparent 3.2px) 0 0 / 9px 9px;
  -webkit-background-clip: text; background-clip: text;
  animation: bulbs 1.4s steps(2) infinite; text-shadow: none;
}
@keyframes bulbs { 50% { background-position: 4.5px 4.5px; } }
.logo .crown { position: absolute; width: .62em; left: 50%; top: -.48em; transform: translateX(-50%) rotate(-6deg); filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.logo-lg { font-size: clamp(54px, 15vw, 104px); }
.logo-lg .celeb, .logo-lg .ty { font-size: 1em; }
.logo-lg .rip { font-size: .92em; }
.logo-sm { font-size: 24px; }
.logo-sm .celeb, .logo-sm .ty { -webkit-text-stroke: 1px #2a1630; text-shadow: 0 2px 0 #8a5d17; }
.logo-sm .rip { font-size: .86em; -webkit-text-stroke: 1px var(--gold); text-shadow: 0 0 8px rgba(255,59,59,.8); }
.logo-sm .rip::after { background-size: 5px 5px; background-image: radial-gradient(circle, var(--bulb) 0 1px, transparent 1.6px); }
.logo-sm .crown { display: none; }

.ribbon {
  position: relative; display: inline-block; margin: 14px auto 0; padding: 9px 26px;
  background: linear-gradient(180deg, #fbf3e2, #e4d3b0); color: var(--ink);
  font-family: var(--f-hand); font-size: clamp(14px, 3.8vw, 19px); letter-spacing: .02em; text-transform: uppercase;
  box-shadow: 0 4px 0 #a88c5b, 0 10px 20px rgba(0,0,0,.45);
  transform: rotate(-1deg);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 8px; width: 22px; height: 100%; background: #cdb88f; z-index: -1;
}
.ribbon::before { left: -14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -14px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }

/* ---------- home hero ---------- */
.hero { text-align: center; padding-top: 14px; }
.hero .logo { margin-top: 30px; }
.side { font-family: var(--f-hand); text-transform: uppercase; color: #fff; font-size: 15px; line-height: 1.25; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.side::after { content: ""; display: block; width: 90px; height: 3px; margin: 6px auto 0; background: var(--red); border-radius: 3px; transform: rotate(-4deg); }
.side-l { max-width: 230px; margin: 0 auto; transform: rotate(-2deg); }
.side-r { max-width: 260px; margin: 18px auto 0; transform: rotate(2deg); }
.hearse-wrap { max-width: 420px; margin: 8px auto 0; }
.hearse { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
.hearse .tail { animation: tail 2.4s ease-in-out infinite; }
@keyframes tail { 50% { filter: brightness(1.5); } }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--cream);
  padding: 18px 12px 16px; border-radius: var(--radius); border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 10px 24px rgba(0,0,0,.45);
  transition: transform .15s ease;
}
.action:active { transform: scale(.98); }
.action b { font-family: var(--f-marquee); font-weight: 400; font-size: 18px; letter-spacing: .02em; }
.action small { color: var(--cream); opacity: .85; font-size: 13px; }
.action .big-ico { font-size: 30px; line-height: 1; }
.action.create { background: linear-gradient(180deg, #e3262f, #8f0e1a); }
.action.join { background: linear-gradient(180deg, #3a1d4f, #1b1133); }
.action .crown { width: 36px; }
.rope { display: block; width: 100%; max-width: 300px; height: 32px; margin: 16px auto 0; }

.badges { display: flex; justify-content: center; gap: 0; margin: 16px auto 0; width: fit-content; border: 2px solid #fff; border-radius: 12px; background: rgba(0,0,0,.55); overflow: hidden; }
.badges div { padding: 8px 14px; text-align: center; font-size: 11px; text-transform: uppercase; font-weight: 800; line-height: 1.15; }
.badges div + div { border-left: 1px solid rgba(255,255,255,.6); }
.badges .ico { display: block; margin: 0 auto 3px; width: 20px; height: 20px; }

/* ---------- panels & forms ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 20px; box-shadow: 0 14px 30px rgba(0,0,0,.35); backdrop-filter: blur(4px); }
.panel h2, .page-title { font-family: var(--f-marquee); font-weight: 400; margin: 0 0 6px; font-size: 22px; letter-spacing: .01em; color: var(--cream); }
.page-title { font-size: 28px; margin-top: 8px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
.field {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid rgba(246,234,210,.25);
  background: rgba(8,5,16,.7); color: var(--cream); font-size: 16px; outline: none;
}
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,176,74,.25); }
.field.code { font-family: "Courier New", monospace; font-size: 28px; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; text-align: center; color: var(--bulb); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid var(--gold);
  background: linear-gradient(180deg, #ef3a42, #b0141f); color: #fff; font-weight: 800; font-size: 16px;
  cursor: pointer; text-decoration: none; box-shadow: 0 4px 0 #5e0911, 0 10px 18px rgba(0,0,0,.35);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #5e0911; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); color: var(--cream); }
.btn.light { background: var(--cream); color: var(--ink); border-color: var(--cream); box-shadow: 0 4px 0 #a88c5b; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; }
.row .field { flex: 1; }
.stack > * + * { margin-top: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.linkish { background: none; border: 0; color: var(--gold-hi); text-decoration: underline; cursor: pointer; padding: 0; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; }

/* group list */
.glist { display: grid; gap: 10px; }
.gitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(246,234,210,.12); text-decoration: none; color: var(--cream); }
.gitem .mini-stone { flex: none; width: 36px; height: 44px; }
.gitem b { display: block; font-size: 17px; }
.gitem small { color: var(--muted); }
.gitem .chev { margin-left: auto; color: var(--gold); font-size: 22px; }

/* code chip */
.code-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 12px; background: rgba(8,5,16,.8); border: 1px dashed var(--gold); }
.code-chip span { font-family: "Courier New", monospace; font-size: 24px; font-weight: 800; letter-spacing: .3em; color: var(--bulb); }

/* chips input */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(246,234,210,.1); border: 1px solid rgba(246,234,210,.2); font-size: 14px; max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); cursor: pointer; flex: none; }
.chip.old { opacity: .55; }

/* ---------- tombstones ---------- */
.stone {
  position: relative; text-align: center; color: #2b2330;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.35), transparent 50%),
    linear-gradient(160deg, var(--stone-hi), var(--stone-lo));
  border-radius: 48% 48% 8px 8px / 34% 34% 8px 8px;
  border: 2px solid #5d5462; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), 0 10px 18px rgba(0,0,0,.4);
  padding: 16px 8px 12px;
}
.stone .portrait { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; margin: 0 auto 6px; border: 2px solid #5d5462; background: #2a1a36; }
.stone .portrait img, .stone .portrait svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.stone .nm { font-family: var(--f-body); font-weight: 800; font-size: 13px; line-height: 1.15; text-shadow: 0 1px 0 rgba(255,255,255,.4); word-break: break-word; }
.stone .st { font-size: 11px; margin-top: 4px; color: #3f3545; }
.stone.dead { background: linear-gradient(160deg, #6b6170, #3b333f); color: var(--cream); border-color: var(--red); }
.stone.dead .nm { text-shadow: none; }
.stone.dead .st { color: #ff8a8a; font-weight: 800; }
.stone.dead .portrait img { filter: grayscale(1) contrast(1.1); }
.stone.dead::after { content: "R.I.P."; position: absolute; top: -10px; right: -6px; background: var(--red); color: #fff; font: 400 11px var(--f-marquee); padding: 3px 7px; border-radius: 6px; transform: rotate(8deg); box-shadow: 0 0 10px rgba(255,59,59,.7); }
.stone.empty { background: transparent; border: 2px dashed rgba(246,234,210,.3); box-shadow: none; color: var(--muted); }
.stone.empty .nm { text-shadow: none; font-weight: 600; }
.stone a { color: inherit; text-decoration: none; }
.tag { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.25); }
.tag.warn { background: #f6c34a; color: var(--ink); }
.tag.gold { background: var(--gold); color: var(--ink); }
.tag.red { background: var(--red); color: #fff; }
.stones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.member { padding: 14px 0; border-top: 1px solid rgba(246,234,210,.12); }
.member:first-of-type { border-top: 0; }
.member-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.member-head b { font-size: 17px; }
.member-head .hits { margin-left: auto; font-family: var(--f-marquee); font-size: 14px; color: var(--gold); }

.cta-bar { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(227,38,47,.9), rgba(143,14,26,.9)); border: 2px solid var(--gold); margin-top: 16px; }
.cta-bar b { font-family: var(--f-marquee); font-weight: 400; }

/* ---------- picks ---------- */
.slots { position: sticky; top: 58px; z-index: 3; padding: 10px 0 12px; background: linear-gradient(180deg, rgba(15,9,32,.98) 88%, rgba(15,9,32,0)); }
.slots .stone.empty { background: rgba(15,9,32,.96); }
.slots .stone { min-height: 128px; }
.slots .stone .rm { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.search { position: relative; }
.search .field { padding-left: 42px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.results { display: grid; gap: 8px; margin-top: 12px; }
.person { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(246,234,210,.1); }
.person .ph { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #2a1a36; }
.person .ph img, .person .ph svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .info { min-width: 0; flex: 1; }
.person .info b { display: block; font-size: 15px; }
.person .info small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .langs { display: flex; gap: 4px; margin-top: 4px; }
.person .langs span { font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--gold-hi); }
.pick-btn { flex: none; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--gold); background: var(--red); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; }
.pick-btn.on { background: var(--gold); color: var(--ink); }
.pick-btn[disabled] { background: transparent; border-color: rgba(246,234,210,.2); color: var(--muted); cursor: not-allowed; }
.section-label { font-family: var(--f-hand); text-transform: uppercase; color: var(--gold-hi); margin: 18px 0 4px; font-size: 15px; }
.warn-box { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 10px 12px; border-radius: 12px; background: rgba(246,195,74,.12); border: 1px solid rgba(246,195,74,.4); color: #fbe3a6; margin-top: 10px; }
.lock-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(11,7,24,.98) 60%, rgba(11,7,24,0)); }
.lock-bar .btn { width: 100%; max-width: 728px; margin: 0 auto; display: flex; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 18px; text-align: center; color: var(--muted); font-style: italic; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 30; background: var(--cream); color: var(--ink); padding: 10px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }
.modal-bg { position: fixed; inset: 0; z-index: 25; background: rgba(5,3,10,.75); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 420px; background: var(--night-2); border: 2px solid var(--gold); border-radius: var(--radius); padding: 22px; text-align: center; }
.modal h3 { font-family: var(--f-marquee); font-weight: 400; font-size: 24px; margin: 0 0 8px; }
.modal p { color: var(--muted); }
.modal .row { justify-content: center; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

/* ---------- R.I.P. theme ---------- */
body.theme-rip {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(227,38,47,.35), transparent 60%),
    linear-gradient(180deg, #050208 0%, #1a0710 50%, #3b0a14 100%);
  background-attachment: fixed;
}
body.theme-rip .skyline, body.theme-rip .flashes { opacity: .35; }
.rip-page { text-align: center; padding-top: 10px; }
.rip-marquee {
  display: inline-block; font-family: var(--f-marquee); font-size: clamp(64px, 20vw, 130px); line-height: 1;
  color: var(--red); -webkit-text-stroke: 3px var(--gold); paint-order: stroke fill; position: relative;
  text-shadow: 0 0 20px rgba(255,59,59,.9), 0 0 60px rgba(227,38,47,.6), 0 8px 0 var(--red-deep);
  animation: throb 2.6s ease-in-out infinite;
}
.rip-marquee::after {
  content: attr(data-text); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 0; text-shadow: none;
  background: radial-gradient(circle, var(--bulb) 0 2.5px, rgba(255,243,196,.3) 3.5px, transparent 4.5px) 0 0 / 14px 14px;
  -webkit-background-clip: text; background-clip: text; animation: bulbs 1s steps(2) infinite;
}
@keyframes throb { 50% { filter: brightness(1.25); } }
.rip-lead { font-family: var(--f-hand); text-transform: uppercase; font-size: 22px; margin: 6px 0 18px; color: var(--cream); }
.big-stone { max-width: 300px; margin: 0 auto; padding: 34px 20px 26px; border-radius: 50% 50% 10px 10px / 32% 32% 10px 10px; }
.big-stone .portrait { width: 128px; height: 128px; border: 4px solid var(--gold); }
.big-stone .portrait img { filter: grayscale(1) sepia(.35) contrast(1.05); }
.big-stone .nm { font-size: 24px; font-family: var(--f-script); font-weight: 400; color: #241b28; }
.big-stone .yrs { font-family: var(--f-marquee); font-size: 18px; margin-top: 6px; color: #3f3545; }
.big-stone .date { font-size: 13px; color: #4f4554; }
.grave-base { max-width: 360px; height: 26px; margin: -4px auto 0; border-radius: 6px; background: linear-gradient(180deg, #2c3d22, #16200f); box-shadow: 0 10px 24px rgba(0,0,0,.6); position: relative; }
.grave-base::before { content: "🌹 🌹 🌹"; position: absolute; top: -16px; left: 0; right: 0; font-size: 20px; letter-spacing: 18px; }
.rip-sub { max-width: 420px; margin: 22px auto 0; font-size: 17px; }
.pickers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.sticker { display: inline-block; margin-top: 20px; background: var(--cream); color: var(--ink); font-weight: 900; font-size: 12px; padding: 8px 14px; border-radius: 4px; transform: rotate(-2deg); text-transform: uppercase; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.petals i {
  position: absolute; top: -40px; width: 14px; height: 18px; border-radius: 80% 0 80% 0; opacity: .9;
  background: linear-gradient(135deg, #ff4a5a, #8f0e1a); animation: fall linear infinite;
}
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }
.sound-btn { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 8; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); background: var(--red); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 0 20px rgba(227,38,47,.7); }
.enter-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(5,2,8,.88); cursor: pointer; text-align: center; padding: 24px; }
.enter-overlay div { font-family: var(--f-marquee); font-size: 24px; color: var(--cream); }
.enter-overlay small { display: block; margin-top: 10px; color: var(--muted); font-family: var(--f-body); font-size: 14px; }
.enter-overlay .rose { font-size: 54px; display: block; margin-bottom: 12px; animation: throb 1.6s infinite; }

@media (min-width: 720px) {
  .hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
  .hero > .center { grid-column: 2; }
  .side-l { grid-column: 1; grid-row: 1; margin: 30px 0 0; text-align: left; }
  .side-r { grid-column: 3; grid-row: 1; margin: 30px 0 0; text-align: right; }
  .side-l::after { margin-left: 0; } .side-r::after { margin-right: 0; }
  .stone .portrait { width: 68px; height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- manage tools ---------- */
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(8,5,16,.6); color: var(--cream);
  font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--gold); }
.mini-btn.danger { border-color: rgba(227,38,47,.6); color: #ff9a9a; }
.btn.danger { background: transparent; color: #ff9a9a; border-color: var(--red); box-shadow: none; }
.btn.danger:hover { background: rgba(227,38,47,.15); }
.danger-zone { border-color: rgba(227,38,47,.4); }
.danger-zone h2 { font-size: 18px; }
.notice { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: rgba(232,176,74,.12); border: 1px solid var(--gold); }
.notice p { margin: 0 0 12px; }
.notice .row { justify-content: flex-end; flex-wrap: wrap; }
.notice .btn { padding: 10px 18px; font-size: 15px; }
.mini-btn:focus-visible, .btn:focus-visible, .pick-btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

/* ---------- email verification ---------- */
.verify-bar {
  position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(232,176,74,.16); border-bottom: 1px solid var(--gold); font-size: 14px;
}
.verify-bar b { display: block; }
.verify-bar span { color: var(--muted); }
.verify-bar > div:first-child { min-width: 0; flex: 1 1 240px; }
code { background: rgba(8,5,16,.7); padding: 2px 6px; border-radius: 6px; font-size: .92em; word-break: break-all; }

/* notification settings */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--cream); cursor: pointer; font: inherit; }
.choice b { font-size: 15px; }
.choice small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.choice-ico { font-size: 22px; line-height: 1; }
.choice[aria-checked="true"] { border-color: var(--gold); background: rgba(232,176,74,.16); box-shadow: inset 0 0 0 1px var(--gold); }
.choice:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
@media (max-width: 420px) { .choice small { display: none; } }

/* install card */
.install-card { display: flex; gap: 14px; align-items: flex-start; }
.install-card img { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.install-card b { font-size: 16px; }
.install-card .hint { margin: 4px 0 10px; }
.install-card .row { flex-wrap: wrap; }

/* ---------- game modes ---------- */
.form-h { font-family: var(--f-marquee); font-weight: 400; font-size: 17px; color: var(--gold-hi); margin: 24px 0 4px; letter-spacing: .02em; }
.seg.big { display: flex; width: 100%; }
.seg.big button { flex: 1; padding: 10px 0; font-size: 16px; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.opts { display: grid; gap: 8px; margin-top: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; color: var(--cream); font-weight: 400; font-size: 15px; }
.opt input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.opt b { display: block; font-size: 15px; }
.opt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.opt:has(input:checked) { border-color: var(--gold); background: rgba(232,176,74,.12); }
.opt.off { opacity: .55; cursor: not-allowed; }
.score-box { display: flex; gap: 8px; margin-top: 18px; padding: 12px; border-radius: 12px; background: rgba(232,176,74,.1); border: 1px dashed var(--line); font-size: 13px; color: #fbe3a6; line-height: 1.4; }

.season-line { margin-top: 4px; color: var(--cream); font-size: 14px; }
.season-line b { color: var(--gold-hi); }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rchip { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold-hi); background: rgba(0,0,0,.25); }

.board { list-style: none; margin: 8px 0 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid rgba(246,234,210,.1); }
.board li:first-child { border-top: 0; }
.board li.me { background: rgba(232,176,74,.1); border-radius: 10px; }
.board .rank { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--f-marquee); font-size: 13px; background: rgba(255,255,255,.08); flex: none; }
.board li:first-child .rank { background: var(--gold); color: var(--ink); }
.board b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .deaths { color: var(--muted); font-size: 13px; }
.board .pts { font-family: var(--f-marquee); color: var(--gold-hi); min-width: 64px; text-align: right; }
.board .pts small { font-family: var(--f-body); font-size: 11px; color: var(--muted); }

.stone .badge { position: absolute; top: -8px; left: -6px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.stone .badge.joker { background: var(--gold); color: var(--ink); }
.stone .badge.sub { background: #5b8def; color: #fff; }
.stone .badge.joker + .badge.sub { left: 20px; }
.pts-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); font: 400 12px var(--f-marquee); }
.joker-btn { margin-top: 8px; border: 1px dashed #5d5462; background: rgba(255,255,255,.4); color: var(--ink); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 800; cursor: pointer; }
.stone .star { position: absolute; top: 4px; right: 4px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--gold); background: rgba(20,12,30,.85); color: rgba(246,234,210,.5); font-size: 15px; cursor: pointer; }
.stone .star.on { background: var(--gold); color: var(--ink); box-shadow: 0 0 12px rgba(232,176,74,.8); }
.stone.sealed .portrait { display: grid; place-items: center; font-size: 22px; opacity: .7; }
.stones.mine { margin-bottom: 14px; opacity: .85; }
.person .age { display: block; color: var(--gold-hi); font-size: 12px; margin-top: 2px; }

.notice.draft .order { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ochip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.ochip.now { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 800; }

.winner-card { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); border: 2px solid var(--gold); background: linear-gradient(135deg, rgba(232,176,74,.25), rgba(122,42,85,.35)); }
.winner-card .crown { font-size: 40px; line-height: 1; }
.winner-card small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.winner-card b { display: block; font-family: var(--f-marquee); font-weight: 400; font-size: 24px; color: var(--cream); }
.winner-card span { color: var(--gold-hi); font-size: 14px; }
.rank-num { font-family: var(--f-marquee); color: var(--gold); font-size: 18px; }

.slots.many { position: static; }
.stones.compact { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.stones.compact .stone { padding: 12px 4px 8px; }
.slots.many .stones.compact .stone { min-height: 104px; }
.stones.compact .stone .portrait { width: 40px; height: 40px; }
.stones.compact .stone .nm { font-size: 11px; }
.stones.compact .stone .st { font-size: 10px; }
.stones.compact .stone.dead::after { font-size: 9px; padding: 2px 5px; }
.cta-bar .btn { white-space: nowrap; flex: none; }

.choices.two { grid-template-columns: repeat(2, 1fr); }
