/* ------------------------------------------------------------------
   Raffle page v2 — the same glass as the rest of the atelier skin.
   Tokens come from the app shell (material.css); fallbacks keep the page readable without it.
   Desktop: prizes on the left, a sticky column on the right with the ticket, your entry and the
   participants. Phone: ticket → entry → prizes → participants. One thing moves: the flap clock.
   ------------------------------------------------------------------ */

.momo-raffle2 {
  --r2-ink: var(--ink, #1c1519);
  --r2-ink-2: var(--ink-2, #544b50);
  --r2-ink-3: var(--ink-3, #7d7277);
  --r2-peach: var(--peach-500, #ff6ea3);
  --r2-peach-soft: var(--peach-100, #fff0f5);
  --r2-peach-ink: var(--peach-ink, #c93b74);
  --r2-mint: #1f9d78;
  --r2-glass: var(--gl-tint, rgba(255, 253, 251, 0.66));
  --r2-glass-2: var(--gl-tint-2, rgba(255, 253, 251, 0.84));
  --r2-edge: var(--gl-edge, rgba(255, 255, 255, 0.66));
  --r2-hair: rgba(28, 21, 25, 0.08);
  --r2-shade: var(--gl-shade, 0 24px 60px -28px rgba(46, 30, 40, 0.5), 0 3px 10px -4px rgba(46, 30, 40, 0.18));
  --r2-shade-sm: 0 12px 30px -18px rgba(46, 30, 40, 0.45);
  --r2-lip: var(--gl-lip, inset 0 1px 0 rgba(255, 255, 255, 0.8));
  --r2-display: var(--display, "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif);
  --r2-label: 800 0.68rem/1.2 Manrope, system-ui, sans-serif;

  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--r2-ink);
  text-align: left;
}
.momo-raffle2 * { box-sizing: border-box; }
.momo-raffle2 i { font-style: normal; }
.momo-raffle2 h1, .momo-raffle2 h2, .momo-raffle2 h3, .momo-raffle2 p { margin: 0; }
.momo-raffle2 a { color: var(--r2-ink); text-underline-offset: 3px; }
.r2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shared label voice: uppercase, tracked, kana in peach */
.r2-eyebrow, .momo-raffle2 h2, .r2-ticket-label { font: var(--r2-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--r2-ink-3); }
.r2-eyebrow > i, .momo-raffle2 h2 > i, .r2-ticket-label > i { font-family: var(--r2-display); font-weight: 700; letter-spacing: 0.14em; color: var(--r2-peach); margin-left: 0.4rem; }

/* ---------- head ---------- */
.r2-head { margin-bottom: 0.9rem; }
.r2-eyebrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0; }
.r2-kind {
  margin-left: 0.75rem;
  padding: 0.28rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--r2-ink);
  background: rgba(255, 253, 251, 0.9);
  border: 1px solid var(--r2-edge);
  box-shadow: var(--r2-lip);
}
.r2-kind.is-join { background: var(--r2-ink); color: #fff; border-color: transparent; }
.r2-head h1 {
  margin: 0.55rem 0 0.55rem;
  font-family: var(--r2-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.r2-head p { max-width: 38rem; font-size: 0.95rem; line-height: 1.55; color: var(--r2-ink-2); }

/* ---------- layout ---------- */
.r2-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem; gap: 1rem 1.25rem; align-items: start; }
.r2-main { grid-column: 1; grid-row: 1; display: grid; gap: 1rem; min-width: 0; }
.r2-side { grid-column: 2; grid-row: 1; display: grid; gap: 1rem; min-width: 0; }
.r2-status { display: grid; gap: 0.75rem; }

/* ---------- the draw ticket ---------- */
.r2-ticket-wrap { filter: drop-shadow(0 18px 28px rgba(46, 30, 40, 0.24)) drop-shadow(0 2px 5px rgba(46, 30, 40, 0.1)); }
.r2-ticket {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1.05rem 1.3rem 1rem;
  border-radius: 20px;
  /* Solid enough to read without blur: the shadow holder isolates the backdrop. */
  background: linear-gradient(180deg, #fffdfb, #fbf7f4);
  -webkit-mask-image: radial-gradient(circle 9px at 0 60%, transparent 98%, #000), radial-gradient(circle 9px at 100% 60%, transparent 98%, #000);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(circle 9px at 0 60%, transparent 98%, #000), radial-gradient(circle 9px at 100% 60%, transparent 98%, #000);
  mask-composite: intersect;
}
.r2-ticket { container-type: inline-size; }
.r2-ticket::after { content: ""; position: absolute; left: 14px; right: 14px; top: 60%; border-top: 1.5px dashed rgba(28, 21, 25, 0.14); }
.r2-ticket > strong { display: flex; align-items: baseline; gap: 0.5rem; min-height: 3.1rem; padding-bottom: 0.7rem; }
.r2-ticket > strong em { font-family: var(--r2-display); font-weight: 900; font-size: 1.4rem; color: var(--r2-peach-ink); }
.r2-ticket-word { font-family: var(--r2-display); font-weight: 900; font-size: 1.6rem; text-transform: uppercase; align-items: center !important; }
.r2-ticket-foot { padding-top: 0.55rem; font-size: 0.78rem; font-weight: 600; color: var(--r2-ink-2); font-variant-numeric: tabular-nums; }
.r2-ticket.is-drawn .r2-ticket-word { color: var(--r2-mint); }
.r2-ticket.is-muted { opacity: 0.8; }

.r2-flap { display: inline-flex; gap: 3px; font-family: var(--r2-display); font-weight: 900; font-size: min(2.1rem, 9.5cqi); line-height: 1; font-variant-numeric: tabular-nums; }
.r2-flap b {
  display: inline-grid;
  place-items: center;
  width: 1.35ch;
  padding: 0.18em 0 0.14em;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #2b2226 0 50%, #1c1519 50% 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 6px 14px -8px rgba(28, 21, 25, 0.8);
  animation: r2-flip 0.38s cubic-bezier(0.3, 0.7, 0.2, 1) both;
  transform-origin: 50% 0;
}
.r2-flap i { align-self: center; padding: 0 1px; color: var(--r2-ink-3); font-weight: 700; }
@keyframes r2-flip { from { transform: perspective(160px) rotateX(-80deg); filter: brightness(1.4); } to { transform: none; filter: none; } }

.r2-dots { display: flex; align-items: center; gap: 0.45rem; }
.r2-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--r2-peach); animation: r2-pulse 1.2s ease-in-out infinite; }
.r2-dots span:nth-child(2) { animation-delay: 0.15s; }
.r2-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes r2-pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: none; } }

/* ---------- your entry ---------- */
.r2-entry {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--r2-edge);
  border-radius: 18px;
  background: var(--r2-glass-2);
  box-shadow: var(--r2-shade-sm), var(--r2-lip);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}
.r2-entry-row { display: flex; align-items: flex-start; gap: 0.8rem; }
.r2-entry p { font-size: 0.88rem; line-height: 1.45; color: var(--r2-ink-2); }
.r2-entry p strong { color: var(--r2-ink); font-weight: 800; }
.r2-entry-mark { display: grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-weight: 900; background: rgba(28, 21, 25, 0.06); color: var(--r2-ink-2); }
.r2-entry.is-in .r2-entry-mark { background: #dff5ea; color: var(--r2-mint); }
.r2-entry.is-join { border-color: rgba(255, 139, 181, 0.55); }
.r2-entry.is-join .r2-entry-mark { background: var(--r2-peach-soft); color: var(--r2-peach-ink); }
.r2-entry.is-won { background: linear-gradient(110deg, #fff0f5, rgba(255, 253, 251, 0.92) 70%); border-color: rgba(255, 139, 181, 0.5); }
.r2-entry.is-won .r2-entry-mark { background: var(--r2-peach); color: #fff; }
.r2-entry .r2-btn { width: 100%; justify-content: center; }
.r2-entry-error { color: #b3261e !important; font-weight: 700; }

.r2-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: var(--r2-ink);
  color: #fff !important;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(28, 21, 25, 0.75);
}
.r2-btn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--r2-peach); }
.r2-btn:hover { background: #33282e; }
.r2-btn:disabled { opacity: 0.6; cursor: progress; }
.r2-btn.is-big { padding: 0.95rem 1.2rem; font-size: 0.98rem; }
.r2-btn.is-quiet { background: #fff; color: var(--r2-ink) !important; border-color: rgba(28, 21, 25, 0.14); box-shadow: none; }
.r2-btn.is-quiet::before { display: none; }

/* ---------- cards ---------- */
.r2-card {
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--r2-edge);
  border-radius: 20px;
  background: var(--r2-glass);
  box-shadow: var(--r2-shade), var(--r2-lip);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
}

/* ---------- prizes ---------- */
.r2-prizes-wrap h2 { margin-bottom: 0.65rem; }
/* The grid scales with the count: 1 → one hero card, 2 → two, 3 → three, 4+ → four across. */
.r2-prizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.r2-prizes[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.r2-prizes[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.r2-prizes[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.r2-prizes[data-count="2"] .r2-prize-body h3, .r2-prizes[data-count="3"] .r2-prize-body h3 { font-size: 1.02rem; }
.r2-prizes[data-count="2"] .r2-prize-body { padding: 0.85rem 1rem 1rem; }
/* One prize: photo and story side by side, the page's centrepiece. */
.r2-prizes[data-count="1"] .r2-prize { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.r2-prizes[data-count="1"] .r2-prize-art { margin: 0.6rem; }
.r2-prizes[data-count="1"] .r2-prize-body { padding: 1.2rem 1.6rem 1.2rem 0.6rem; }
.r2-prizes[data-count="1"] .r2-prize-body h3 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.05; }
.r2-prizes[data-count="1"] .r2-prize-body > p { white-space: normal; font-size: 0.86rem; margin-top: 0.45rem; }
.r2-prizes[data-count="1"] .r2-prize-link { margin-top: 1rem; font-size: 0.86rem; }
.r2-prize {
  overflow: hidden;
  border: 1px solid var(--r2-edge);
  border-radius: 18px;
  background: var(--r2-glass);
  box-shadow: var(--r2-shade-sm), var(--r2-lip);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.r2-prize:hover { transform: translateY(-2px); box-shadow: var(--r2-shade), var(--r2-lip); }
.r2-prize.is-mine { border-color: rgba(255, 139, 181, 0.75); box-shadow: 0 0 0 3px rgba(255, 139, 181, 0.2), var(--r2-shade-sm); }
.r2-prize-art { position: relative; aspect-ratio: 1; margin: 0.45rem 0.45rem 0; border-radius: 13px; overflow: hidden; background: #eef3f4; }
.r2-prize-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.r2-prize-fill { object-fit: cover; transform: scale(1.25); filter: blur(24px) saturate(1.1); opacity: 0.9; }
.r2-prize-photo { object-fit: contain; }
.r2-prize-no, .r2-prize-grade { position: absolute; top: 0.45rem; padding: 0.24rem 0.5rem; border-radius: 9999px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.r2-prize-no { left: 0.45rem; background: rgba(28, 21, 25, 0.82); color: #fff; }
.r2-prize-grade { right: 0.45rem; background: rgba(255, 253, 251, 0.94); color: var(--r2-ink); box-shadow: var(--r2-lip); }
.r2-prize-body { padding: 0.65rem 0.8rem 0.8rem; }
.r2-prize-body h3 { font-family: var(--r2-display); font-weight: 900; font-size: 0.9rem; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.01em; }
.r2-prize-body > p { margin-top: 0.2rem; font-size: 0.72rem; color: var(--r2-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r2-prize-link { display: inline-block; margin-top: 0.45rem; font-size: 0.76rem; font-weight: 700; }
.r2-prize-winner { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.55rem; padding: 0.4rem 0.55rem; border-radius: 10px; background: rgba(255, 255, 255, 0.75); font-size: 0.76rem; }
.r2-prize-winner a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.r2-prize-winner em { font-style: normal; font-size: 0.66rem; font-weight: 800; padding: 0.18rem 0.45rem; border-radius: 9999px; background: #fff3d6; color: #8a6508; }
.r2-prize-winner em.is-sent { background: #dff5ea; color: var(--r2-mint); }

/* ---------- participants ---------- */
.r2-people header { display: flex; align-items: baseline; justify-content: space-between; }
.r2-people header b { font-family: var(--r2-display); font-weight: 900; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.r2-people-odds { margin-top: 0.25rem !important; font-size: 0.78rem; font-weight: 600; color: var(--r2-ink-2); }
.r2-people-empty { margin-top: 0.6rem !important; font-size: 0.84rem; color: var(--r2-ink-2); }
.r2-search input {
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(28, 21, 25, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.82rem;
  color: var(--r2-ink);
}
.r2-search input:focus { outline: none; border-color: var(--r2-ink); background: #fff; }
.r2-search-result { margin-top: 0.45rem !important; font-size: 0.76rem; font-weight: 700; color: var(--r2-ink-2); }
.r2-wallets { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.r2-wallets li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.4rem; align-items: center; padding: 0.34rem 0.2rem; border-bottom: 1px solid var(--r2-hair); font-size: 0.76rem; }
.r2-wallets li span { color: var(--r2-ink-3); font-variant-numeric: tabular-nums; font-weight: 700; }
.r2-wallets li code { font-size: 0.76rem; color: var(--r2-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r2-wallets li.is-me { background: var(--r2-peach-soft); border-radius: 8px; }
.r2-wallets li.is-pinned { position: sticky; top: 0; z-index: 1; margin-bottom: 0.2rem; border-bottom: 0; box-shadow: 0 6px 12px -10px rgba(46, 30, 40, 0.5); }
.r2-wallets li em { font-style: normal; font-size: 0.64rem; font-weight: 800; text-transform: uppercase; color: var(--r2-peach-ink); }
.r2-wallets.is-full { max-height: min(52vh, 30rem); overflow: auto; }
.r2-link { display: inline-block; margin-top: 0.55rem; padding: 0; border: 0; background: none; font: inherit; font-size: 0.8rem; font-weight: 800; color: var(--r2-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- how it works / check the draw: two quiet buttons that open sheets ---------- */
.r2-more { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.r2-more-btn {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--r2-edge);
  border-radius: 18px;
  background: var(--r2-glass-2);
  box-shadow: var(--r2-shade-sm), var(--r2-lip);
  text-align: left;
  font: inherit;
  color: var(--r2-ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.r2-more-btn:hover { background: rgba(255, 255, 255, 0.95); }
.r2-more-btn b { font-size: 0.92rem; font-weight: 800; }
.r2-more-btn b::after { content: " →"; color: var(--r2-ink-3); }
.r2-more-btn small { font-size: 0.78rem; color: var(--r2-ink-3); }

.r2-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(28, 21, 25, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: r2-fade 0.18s ease both;
}
.r2-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 34rem);
  max-height: min(88vh, 46rem);
  border: 1px solid var(--r2-edge);
  border-radius: 26px;
  background: rgba(255, 253, 251, 0.97);
  box-shadow: 0 40px 90px -36px rgba(46, 30, 40, 0.6), 0 6px 18px -8px rgba(46, 30, 40, 0.22), var(--r2-lip);
  animation: r2-rise 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.r2-sheet.is-wide { width: min(100%, 46rem); }
.r2-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 0.8rem; border-bottom: 1px solid var(--r2-hair); }
.r2-sheet > header h2 { font-size: 0.74rem; }
.r2-close { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(28, 21, 25, 0.06); color: var(--r2-ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.r2-close:hover { background: rgba(28, 21, 25, 0.12); }
.r2-sheet-body { overflow: auto; padding: 1rem 1.25rem 1.3rem; }
@keyframes r2-fade { from { opacity: 0; } }
@keyframes r2-rise { from { opacity: 0; transform: translateY(12px) scale(0.985); } }

.r2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; counter-reset: r2; }
.r2-steps li { position: relative; padding-left: 2.5rem; counter-increment: r2; }
.r2-steps li::before { content: counter(r2); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-family: var(--r2-display); font-weight: 900; font-size: 0.82rem; background: var(--r2-ink); color: #fff; }
.r2-steps li b { display: block; font-weight: 800; font-size: 0.92rem; }
.r2-steps li p { margin-top: 0.2rem; font-size: 0.86rem; line-height: 1.5; color: var(--r2-ink-2); }

.r2-check { display: grid; gap: 1.3rem; }
.r2-check h3 { margin-bottom: 0.55rem !important; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r2-ink-3); }
.r2-check dl { display: grid; gap: 0.45rem; margin: 0; }
.r2-check dl > div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; font-size: 0.84rem; }
.r2-check dt { color: var(--r2-ink-3); font-weight: 700; }
.r2-check dd { margin: 0; min-width: 0; }
.r2-check dd code { font-size: 0.76rem; word-break: break-all; }
.r2-check-note { margin-top: 0.75rem !important; font-size: 0.8rem; line-height: 1.5; color: var(--r2-ink-2); }
.r2-check-note code { font-size: 0.76rem; }

/* ---------- past raffles: small cards, details in a sheet ---------- */
.r2-past { margin-top: 1.75rem; }
.r2-past h2 { margin-bottom: 0.65rem; }
.r2-past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem; }
.r2-past-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.45rem 0.7rem;
  border: 1px solid var(--r2-edge);
  border-radius: 16px;
  background: var(--r2-glass);
  box-shadow: var(--r2-shade-sm), var(--r2-lip);
  text-align: left;
  font: inherit;
  color: var(--r2-ink);
  cursor: pointer;
  transition: transform 0.18s ease;
}
.r2-past-card:hover { transform: translateY(-2px); }
.r2-past-art { display: grid; gap: 2px; aspect-ratio: 4 / 3; border-radius: 11px; overflow: hidden; background: linear-gradient(135deg, #eef3f4, #f7f4f0); }
.r2-past-art.n2 { grid-template-columns: 1fr 1fr; }
.r2-past-art.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.r2-past-art.n3 img:first-child { grid-row: span 2; }
.r2-past-art.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.r2-past-art img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.r2-past-meta { display: flex; align-items: baseline; justify-content: space-between; padding: 0.2rem 0.3rem 0; }
.r2-past-meta b { font-family: var(--r2-display); font-weight: 900; font-size: 0.95rem; }
.r2-past-meta small { font-size: 0.72rem; color: var(--r2-ink-3); font-weight: 600; }
.r2-past-line { padding: 0 0.3rem; font-size: 0.74rem; color: var(--r2-ink-2); }

.r2-past-sub { font-size: 0.82rem; color: var(--r2-ink-3); font-weight: 600; }
.r2-past-note { margin-top: 0.5rem !important; font-size: 0.84rem; color: var(--r2-ink-2); }
.r2-past-detail ul { list-style: none; margin: 0.9rem 0 0.4rem; padding: 0; display: grid; gap: 0.5rem; }
.r2-past-detail li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: 0.75rem; align-items: center; font-size: 0.84rem; }
.r2-past-thumb { width: 3rem; height: 3rem; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #eef3f4, #f7f4f0); }
.r2-past-thumb img { width: 100%; height: 100%; object-fit: cover; }
.r2-past-name { display: grid; min-width: 0; font-weight: 700; }
.r2-past-name small { font-size: 0.72rem; font-weight: 700; color: var(--r2-ink-3); }
.r2-past-detail li a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.r2-past-detail em { font-style: normal; font-size: 0.66rem; font-weight: 800; padding: 0.18rem 0.45rem; border-radius: 9999px; background: #fff3d6; color: #8a6508; }
.r2-past-detail em.is-sent { background: #dff5ea; color: var(--r2-mint); }

/* ---------- empty ---------- */
.r2-empty { max-width: 34rem; margin: 1.5rem 0 1rem; }
.r2-empty h1 { margin: 0.55rem 0 0.7rem; font-family: var(--r2-display); font-weight: 900; font-size: clamp(2rem, 4.4vw, 3rem); text-transform: uppercase; line-height: 1; }
.r2-empty p { margin-bottom: 1.2rem; color: var(--r2-ink-2); line-height: 1.55; }
.r2-loading { padding: 3rem 0; color: var(--r2-ink-3); }

/* ---------- wide: keep the status column in view while the prizes scroll ---------- */
@media (min-width: 981px) and (min-height: 860px) {
  .r2-side { position: sticky; top: 6.5rem; }
}

/* ---------- narrow: one column, in the order a holder asks the questions ---------- */
/* 3 or 4 prizes in the narrower main column of a mid-size screen: two by two reads better. */
@media (min-width: 641px) and (max-width: 1180px) {
  .r2-prizes[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .r2-layout { display: flex; flex-direction: column; }
  .r2-main, .r2-side { display: contents; }
  .r2-status { order: 1; }
  .r2-prizes-wrap { order: 2; }
  .r2-people { order: 3; }
  .r2-more { order: 4; }
  .r2-status { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 640px) {
  .r2-status { grid-template-columns: 1fr; }
  .r2-flap { font-size: min(1.9rem, 9.5cqi); }
  .r2-prizes, .r2-prizes[data-count="3"], .r2-prizes[data-count="2"] { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .r2-prizes[data-count="1"] { grid-template-columns: 1fr; }
  .r2-prizes[data-count="1"] .r2-prize { grid-template-columns: 1fr; }
  .r2-prizes[data-count="1"] .r2-prize-body { padding: 0.9rem 1rem 1rem; }
  .r2-prizes[data-count="3"] .r2-prize:first-child { grid-column: span 2; }
  .r2-more { grid-template-columns: 1fr; }
  .r2-check dl > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .r2-modal { place-items: end center; padding: 0; }
  .r2-sheet, .r2-sheet.is-wide { width: 100%; max-height: 90vh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .r2-past-grid { grid-template-columns: 1fr 1fr; }
  .r2-prize-body { padding: 0.55rem 0.65rem 0.7rem; }
  .r2-prize-body h3 { font-size: 0.8rem; }
  .r2-kind { margin-left: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .r2-flap b, .r2-dots span { animation: none; }
  .r2-prize:hover { transform: none; }
  .r2-past-card:hover { transform: none; }
  .r2-modal, .r2-sheet { animation: none; }
}

/* Ops → Raffle v2. Same shell as Reward Studio (plum ink on paper, lavender rail) so it sits
   beside Epochs without looking bolted on. */

.r2o {
  --o-border: rgba(57, 36, 63, 0.11);
  --o-border-strong: rgba(57, 36, 63, 0.2);
  --o-muted: rgba(57, 36, 63, 0.56);
  --o-faint: rgba(57, 36, 63, 0.38);
  --o-plum: #39243f;
  --o-pink: #b8467f;
  --o-mint: #1f7d62;
  --o-amber: #9a6412;
  --o-red: #b3261e;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-height: calc(100svh - 9.8rem);
  overflow: hidden;
  border: 1px solid var(--o-border);
  border-radius: 12px;
  color: var(--o-plum);
  background: rgba(255, 251, 248, 0.5);
  box-shadow: 0 18px 50px rgba(57, 36, 63, 0.05);
  font-size: 0.8rem;
  text-align: left;
}
.r2o * { box-sizing: border-box; }
.r2o h2, .r2o h3, .r2o p, .r2o ol, .r2o dl, .r2o dd { margin: 0; padding: 0; }
.r2o ol { list-style: none; }
.r2o a { color: var(--o-pink); text-underline-offset: 2px; }
.r2o code { font-size: 0.72rem; }
.r2o button, .r2o input, .r2o select { font: inherit; color: inherit; }
.r2o button:focus-visible, .r2o input:focus-visible { outline: 2px solid rgba(184, 70, 127, 0.5); outline-offset: 2px; }
.r2o button:disabled { cursor: not-allowed; opacity: 0.45; }
.r2o button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-height: 2rem; padding: 0 0.7rem;
  border: 1px solid var(--o-border-strong); border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem; font-weight: 850; cursor: pointer; white-space: nowrap;
}
.r2o button:not(:disabled):hover { border-color: var(--o-plum); }
.r2o .r2o-primary { background: var(--o-plum); border-color: var(--o-plum); color: #fff; }
.r2o .r2o-danger { color: var(--o-red); border-color: rgba(179, 38, 30, 0.35); }
.r2o .r2o-quiet { border-color: transparent; background: transparent; }
.r2o input {
  width: 100%; min-height: 2.1rem; padding: 0 0.6rem;
  border: 1px solid var(--o-border-strong); border-radius: 6px; background: #fff;
  font-size: 0.78rem;
}
.r2o label { display: grid; gap: 0.3rem; font-size: 0.6rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; color: var(--o-muted); }
.r2o label small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--o-faint); }
.r2o h3 { font-size: 0.66rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.r2o h3 small { margin-left: 0.4rem; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--o-faint); }

/* status chips, shared by rail and round header */
.r2o i[data-status] {
  font-style: normal; font-size: 0.58rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem; border-radius: 999px; background: rgba(57, 36, 63, 0.07); color: var(--o-muted);
}
.r2o i[data-status="open"], .r2o i[data-status="upcoming"] { background: rgba(31, 125, 98, 0.12); color: var(--o-mint); }
.r2o i[data-status="closing"], .r2o i[data-status="drawing"] { background: rgba(154, 100, 18, 0.13); color: var(--o-amber); }
.r2o i[data-status="drawn"] { background: rgba(184, 70, 127, 0.12); color: var(--o-pink); }
.r2o i[data-status="canceled"] { background: rgba(179, 38, 30, 0.1); color: var(--o-red); }

/* ---------- rail ---------- */
.r2o-rail { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--o-border); background: rgba(239, 230, 244, 0.58); }
.r2o-rail > header { display: grid; gap: 0.2rem; min-height: 3.8rem; align-content: center; padding: 0 0.85rem; border-bottom: 1px solid var(--o-border); }
.r2o-rail > header strong { font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.r2o-rail > header small { color: var(--o-muted); font-size: 0.66rem; }
.r2o .r2o-new { margin: 0.7rem 0.85rem; min-height: 2.3rem; border-style: dashed; background: transparent; }
.r2o .r2o-new.is-active { border-style: solid; background: #fff; }
.r2o-rail ol { flex: 1; overflow-y: auto; }
.r2o-rail li button {
  display: grid; gap: 0.25rem; width: 100%; min-height: 0; padding: 0.7rem 0.85rem;
  border: 0; border-bottom: 1px solid rgba(57, 36, 63, 0.07); border-radius: 0; background: transparent;
  text-align: left; white-space: normal; font-size: 0.72rem; font-weight: 600;
}
.r2o-rail li button.is-active { background: rgba(255, 255, 255, 0.75); box-shadow: inset 3px 0 0 var(--o-pink); }
.r2o-rail-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.r2o-rail-top b { font-size: 0.8rem; font-weight: 900; }
.r2o-rail li small { color: var(--o-faint); font-size: 0.64rem; }

.r2o-keeper { display: grid; gap: 0.2rem; margin: 0.85rem; padding: 0.65rem 0.75rem; border: 1px solid var(--o-border); border-radius: 8px; background: rgba(255, 255, 255, 0.6); font-size: 0.68rem; }
.r2o-keeper b { font-size: 0.6rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }
.r2o-keeper span { color: var(--o-muted); }
.r2o-keeper[data-state="watching"] b, .r2o-keeper[data-state="confirmed"] b { color: var(--o-mint); }
.r2o-keeper[data-state="attention"], .r2o-keeper[data-state="off"], .r2o-keeper[data-state="unconfigured"] { border-color: rgba(179, 38, 30, 0.3); }
.r2o-keeper[data-state="attention"] b, .r2o-keeper[data-state="off"] b, .r2o-keeper[data-state="unconfigured"] b { color: var(--o-red); }
.r2o-keeper[data-state="pending"] b, .r2o-keeper[data-state="retrying"] b { color: var(--o-amber); }
.r2o-round > .r2o-keeper { margin: 1.4rem 0 0; }

/* ---------- main ---------- */
.r2o-main { min-width: 0; padding: 1.2rem 1.4rem 2rem; overflow-y: auto; }
.r2o-warn, .r2o-error, .r2o-hint { margin-bottom: 0.9rem !important; padding: 0.6rem 0.75rem; border-radius: 8px; font-size: 0.74rem; }
.r2o-warn { background: rgba(154, 100, 18, 0.1); color: var(--o-amber); }
.r2o-error { background: rgba(179, 38, 30, 0.08); color: var(--o-red); }
.r2o-hint { background: rgba(57, 36, 63, 0.04); color: var(--o-muted); }
.r2o-empty { grid-column: 1 / -1; display: grid; gap: 0.7rem; max-width: 36rem; padding: 3rem 2rem; }
.r2o-empty h2 { font-size: 1.1rem; }
.r2o-empty p { color: var(--o-muted); line-height: 1.5; }

/* create */
.r2o-create { display: grid; gap: 1.1rem; max-width: 58rem; }
.r2o-create > h2, .r2o-round-head h2 { font-size: 1.15rem; font-weight: 900; }
.r2o-type { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0; padding: 0; border: 0; }
.r2o-type legend { margin-bottom: 0.45rem; padding: 0; font-size: 0.6rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; color: var(--o-muted); }
.r2o-type label {
  position: relative; display: grid; gap: 0.3rem; padding: 0.85rem 0.9rem 0.85rem 2.4rem;
  border: 1px solid var(--o-border-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.6);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.r2o-type label.is-on { border-color: var(--o-plum); background: #fff; box-shadow: 0 0 0 1px var(--o-plum); }
.r2o-type input { position: absolute; left: 0.9rem; top: 0.95rem; width: auto; min-height: 0; accent-color: var(--o-plum); }
.r2o-type b { font-size: 0.82rem; font-weight: 900; color: var(--o-plum); }
.r2o-type span { font-size: 0.7rem; font-weight: 500; line-height: 1.45; color: var(--o-muted); }
.r2o-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0.7rem; }

.r2o-prizes-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.r2o-prizes-head > div { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.r2o-inventory { display: grid; gap: 0.6rem; padding: 0.75rem; border: 1px solid var(--o-border); border-radius: 10px; background: rgba(255, 255, 255, 0.55); }
.r2o-inventory-bar { display: grid; grid-template-columns: 1fr 12rem auto; align-items: center; gap: 0.5rem; font-size: 0.7rem; color: var(--o-muted); }
.r2o-inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: 0.5rem; max-height: 22rem; overflow-y: auto; }
.r2o .r2o-inventory-grid button {
  display: grid; align-content: start; gap: 0.3rem; min-height: 0; padding: 0.3rem;
  border-radius: 8px; background: #fff; white-space: normal; text-align: left;
}
.r2o-inventory-grid img, .r2o-noimg { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 5px; background: rgba(57, 36, 63, 0.05); }
.r2o-noimg { display: grid; place-items: center; color: var(--o-faint); }
.r2o-inventory-grid small { font-size: 0.6rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r2o .r2o-inventory-grid button.is-picked { border-color: var(--o-pink); box-shadow: 0 0 0 2px var(--o-pink); }

.r2o-prize-edit { display: grid; gap: 0.6rem; }
.r2o-prize-edit > li, .r2o-prize-table li {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: start;
  padding: 0.75rem; border: 1px solid var(--o-border); border-radius: 10px; background: rgba(255, 255, 255, 0.7);
}
.r2o-thumb { position: relative; }
.r2o-thumb img, .r2o-thumb > span { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 6px; background: rgba(57, 36, 63, 0.05); font-size: 0.62rem; font-weight: 800; color: var(--o-faint); }
.r2o-thumb b { position: absolute; top: -0.4rem; left: -0.4rem; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--o-plum); color: #fff; font-size: 0.62rem; }
.r2o-prize-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.r2o-prize-fields .r2o-wide { grid-column: span 3; }
.r2o-prize-tools { display: grid; gap: 0.3rem; }
.r2o .r2o-prize-tools button { width: 2rem; padding: 0; }
.r2o-create-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--o-border); }
.r2o-create-foot p { max-width: 34rem; color: var(--o-muted); font-size: 0.72rem; line-height: 1.45; }
.r2o-create-foot button { min-height: 2.5rem; padding: 0 1.2rem; font-size: 0.72rem; }

/* round */
.r2o-round { display: grid; gap: 1.2rem; max-width: 58rem; }
.r2o-round-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.r2o-round-head small { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--o-muted); }
.r2o-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--o-border); border-radius: 10px; background: var(--o-border); }
.r2o-facts::after { content: ""; flex: 1; background: rgba(255, 255, 255, 0.85); }
.r2o-facts > div { display: grid; gap: 0.25rem; padding: 0.65rem 0.8rem; background: rgba(255, 255, 255, 0.85); }
.r2o-facts dt { font-size: 0.58rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; color: var(--o-faint); }
.r2o-facts dd { font-size: 0.8rem; font-weight: 750; }

.r2o-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.7rem 0.85rem; border: 1px solid rgba(154, 100, 18, 0.35); border-radius: 10px; background: rgba(154, 100, 18, 0.07); }
.r2o-pending > div { display: grid; gap: 0.15rem; flex: 1; font-size: 0.74rem; }

.r2o-steps, .r2o-prize-table { display: grid; gap: 0.55rem; }
.r2o-action {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.8rem;
  padding: 0.7rem 0.8rem; border: 1px solid var(--o-border); border-radius: 10px; background: rgba(255, 255, 255, 0.7);
}
.r2o-action > div { display: grid; gap: 0.15rem; flex: 1 1 16rem; min-width: 0; }
.r2o-action > div b { font-size: 0.78rem; }
.r2o-action > div span { font-size: 0.7rem; line-height: 1.4; color: var(--o-muted); }
.r2o-action > input { flex: 1 1 14rem; width: auto; }
.r2o-action > label { flex: 0 1 12rem; }
.r2o-steps-danger .r2o-action { border-color: rgba(179, 38, 30, 0.2); }

.r2o-prize-table ol { display: grid; gap: 0.55rem; }
.r2o-prize-table li { grid-template-columns: 3.4rem minmax(0, 1fr) minmax(0, 17rem); }
.r2o-prize-copy { display: grid; gap: 0.2rem; }
.r2o-prize-copy b { font-size: 0.8rem; }
.r2o-prize-copy small { font-size: 0.68rem; color: var(--o-muted); }
.r2o-prize-state { margin-top: 0.25rem; font-size: 0.7rem; font-weight: 700; }
.r2o-prize-actions { display: grid; gap: 0.4rem; }

@media (max-width: 900px) {
  .r2o { grid-template-columns: 1fr; }
  .r2o-rail { border-right: 0; border-bottom: 1px solid var(--o-border); }
  .r2o-rail ol { display: flex; overflow-x: auto; }
  .r2o-rail li { flex: 0 0 13rem; }
  .r2o-main { padding: 1rem; }
  .r2o-type, .r2o-grid { grid-template-columns: 1fr; }
  .r2o-prize-fields { grid-template-columns: 1fr 1fr; }
  .r2o-prize-fields .r2o-wide { grid-column: span 2; }
  .r2o-prize-table li { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .r2o-prize-actions { grid-column: 1 / -1; }
  .r2o-inventory-bar { grid-template-columns: 1fr auto; }
  .r2o-inventory-bar > span { grid-column: 1 / -1; }
}

/* per-prize tools: one compact column beside each prize */
.r2o-prize-actions { align-content: start; justify-items: stretch; }
.r2o-send { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem; }
.r2o-send input { min-height: 2rem; }
