/* Roast Me — Roast & Toast walls. A comedy club at night: ink, warm spotlight,
   red velvet edges, cue cards in marker, the toast in Keepsake handwriting.
   Loaded after kind.css; only applies under body.is-roast or .roast. */
:root { --club: #0d0a0a; --velvet: #8e1019; --velvet-d: #5c0a10; --card: #f7f1e6; --marker: "Mynerve", cursive; }

body.is-roast { background: radial-gradient(70% 40% at 50% 0%, rgba(255, 214, 150, .16), transparent 70%) fixed, var(--club); color: #f3ede4; }
/* thin velvet curtain edges, kept inside the side padding */
body.is-roast::before, body.is-roast::after { content: ""; position: fixed; z-index: 1; top: 0; bottom: 0; width: 10px; pointer-events: none; background: linear-gradient(90deg, var(--velvet-d), var(--velvet), var(--velvet-d)); }
body.is-roast::before { left: 0; } body.is-roast::after { right: 0; }
body.is-roast .btn { background: var(--red); color: #fff7f2; box-shadow: 0 4px 0 #6d0910; }
body.is-roast .btn:active { box-shadow: 0 1px 0 #6d0910; }
body.is-roast .btn--ink { background: #f3ede4; color: var(--club); box-shadow: 0 4px 0 #8f877b; }
body.is-roast .chip[aria-checked="true"], body.is-roast .chip:active { background: #f3ede4; color: var(--club); }
body.is-roast .actionbar { background: linear-gradient(to bottom, rgba(13,10,10,0), var(--club) 30%); }
body.is-roast .countdown div { background: rgba(255,255,255,.07); }
body.is-roast .share__link { background: rgba(255,255,255,.07); }
body.is-roast .share__link button { background: #f3ede4; color: var(--club); }
body.is-roast .owner-foot { border-color: rgba(243,237,228,.18); }

.roast .big .serif { color: var(--gold); }
.r-sub { margin: 6px 0 0; font-size: 16px; color: #c9c1b6; }
.r-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 14px; font-weight: 600; }
.r-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--red-bright); animation: blink 1.8s ease-in-out infinite; }

/* Cue card: index card with a red header rule and blue lines */
.cue {
  position: relative; background: var(--card); color: #1d1a16; border-radius: 6px; padding: 14px 16px 12px;
  transform: rotate(-1.2deg); box-shadow: 0 22px 36px -18px #000;
}
.cue::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 2px; background: var(--red-bright); opacity: .7; }
.cue__label, .toastcard__label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8a8279; }
.cue textarea, .cue__text {
  display: block; width: 100%; margin: 14px 0 0; padding: 0; border: 0; outline: 0; resize: none; background: transparent;
  font-family: var(--marker); font-size: 22px; line-height: 30px; color: #1d1a16; white-space: pre-wrap; overflow-wrap: anywhere;
  background-image: repeating-linear-gradient(to bottom, transparent 0 29px, #b9d0e6 29px 30px); background-attachment: local;
}
.cue textarea { min-height: 120px; }
.cue textarea::placeholder { color: rgba(29,26,22,.35); }
.cue__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: #8a8279; }
.cue__foot .is-low { color: var(--red); }

.toastcard { position: relative; margin-top: 12px; background: #fff4ea; color: #2a1416; border-radius: 6px; padding: 10px 14px 10px; transform: rotate(1deg); box-shadow: 0 16px 28px -18px #000; }
.toastcard textarea, .toastcard__text { display: block; width: 100%; margin: 4px 0 0; padding: 0; border: 0; outline: 0; resize: none; background: transparent; font-family: var(--hand); font-size: 20px; line-height: 1.3; color: #2a1416; white-space: pre-wrap; overflow-wrap: anywhere; }
.toastcard textarea { min-height: 54px; }
.toastcard textarea::placeholder { color: rgba(42,20,22,.38); }

.r-form { position: relative; }
.r-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.r-tools > div { min-width: 0; }

/* VIOLATION stamp + tip jar for the send animation */
.r-stamp { position: absolute; z-index: 5; left: 50%; top: 92px; padding: 6px 14px; border: 4px solid var(--red-bright); border-radius: 8px; color: var(--red-bright); font-family: var(--mono); font-weight: 500; font-size: 30px; letter-spacing: .12em; transform: translate(-50%, -50%) rotate(-14deg); opacity: 0; pointer-events: none; }
.r-jar { position: fixed; z-index: 15; left: 50%; bottom: -170px; width: 124px; margin-left: -62px; pointer-events: none; }

/* Owner's tip jar: cue cards pile up */
.tipjar-wrap { position: relative; width: min(230px, 62vw); margin: 16px auto 0; }
.tipjar-lid { height: 18px; margin: 0 12px -4px; border-radius: 6px 6px 3px 3px; background: #2a2524; position: relative; z-index: 2; }
.tipjar { position: relative; height: clamp(170px, 30dvh, 300px); border-radius: 8px 8px 26px 26px; border: 3px solid rgba(243,237,228,.5); border-top-width: 2px; background: linear-gradient(100deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 35%, rgba(255,255,255,.02) 70%, rgba(255,255,255,.1)); overflow: hidden; clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%); }
.tipjar::after { content: "TIPS"; position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .3em; color: var(--gold); opacity: .8; }
.tipjar__card { position: absolute; width: 36%; aspect-ratio: 1.55; border-radius: 3px; background: var(--card); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.tipjar__card::before { content: ""; position: absolute; left: 10%; right: 10%; top: 24%; height: 2px; background: var(--red-bright); opacity: .7; }
.tipjar__card::after { content: ""; position: absolute; left: 10%; right: 30%; top: 48%; height: 2px; background: #b9d0e6; box-shadow: 0 6px 0 #b9d0e6; }
.tipjar__more { position: absolute; z-index: 3; right: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: #000; font-family: var(--mono); font-size: 11px; }

/* ── The show: opening night ── */
.show { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-bottom)); background: var(--club); overflow: hidden; }
.show__spot { position: absolute; z-index: 0; top: -12%; left: 50%; width: 160%; height: 95%; margin-left: -80%; background: radial-gradient(closest-side, rgba(255,226,170,.26), transparent); transform-origin: 50% 0; transform: rotate(30deg); transition: transform 1.4s cubic-bezier(.3,.7,.2,1) .5s; pointer-events: none; }
.show.is-open .show__spot { transform: rotate(0); }
.curtain { position: absolute; z-index: 20; top: 0; bottom: 0; width: 52%; background: repeating-linear-gradient(90deg, #6d0b12 0 16px, #9b111b 16px 28px, #6d0b12 28px 40px); box-shadow: inset 0 -40px 50px rgba(0,0,0,.5); transition: transform 1.1s cubic-bezier(.7,0,.2,1); pointer-events: none; }
.curtain--l { left: 0; } .curtain--r { right: 0; }
.show.is-open .curtain--l { transform: translateX(-97%); }
.show.is-open .curtain--r { transform: translateX(97%); }
.show__top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.show__top .mono { color: var(--gold); opacity: 1; }
.show__body { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 460px; margin: 0 auto; }
.show .cue__text { min-height: 90px; }
.show .toastcard { opacity: 0; transform: translateY(16px) rotate(1deg); transition: opacity .5s, transform .5s var(--spring); }
.show .toastcard.is-in { opacity: 1; transform: rotate(1deg); }
.meter { margin-top: 16px; }
.meter__lbl { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #c9c1b6; }
.meter__bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 6px; }
.meter__bars i { height: 14px; border-radius: 3px; background: #2a2222; transition: background .15s; }
.meter__bars i.on { background: var(--gold); } .meter__bars i.on.hot { background: var(--red-bright); }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.rate button { min-height: 56px; border: 1.5px solid rgba(243,237,228,.3); background: rgba(0,0,0,.35); border-radius: 14px; padding: 6px 4px; font-size: 13px; font-weight: 700; display: grid; justify-items: center; gap: 3px; cursor: pointer; }
.rate button[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.rate button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.flames { display: flex; gap: 1px; height: 16px; }
.show__next { position: relative; z-index: 2; width: 100%; max-width: 460px; margin: 14px auto 0; }

/* ── Owner: all roasts ── */
.crown-card { margin-top: 16px; padding: 18px 16px 16px; border-radius: 18px; background: linear-gradient(160deg, rgba(201,168,76,.22), rgba(201,168,76,.04)); border: 1px solid rgba(201,168,76,.5); text-align: center; }
.crown-card svg { display: block; margin: 0 auto 6px; }
.crown-card .cue { text-align: left; margin-top: 12px; }
.roast-list { display: grid; gap: 14px; margin-top: 18px; }
.roast-item .cue { transform: rotate(var(--r, -.8deg)); }
.roast-item .toastcard { margin-top: -4px; margin-left: 18px; }
.roast-item__row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.roast-item__row button { min-height: 36px; padding: 0 8px; border: 0; background: none; color: #c9c1b6; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { .curtain, .show__spot { transition: none; } }
