/* AUREA Portal — Rewards page (points / XP / levels / gacha / social).
   Page-specific styles only; the shell (header, drawer, footer, buttons,
   cards) comes from styles.css. Classes are rw- prefixed. */

.rw-hero { padding: clamp(40px, 6vw, 72px) 0 8px; }
.rw-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 5.4vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.rw-hero .lead { color: var(--muted); max-width: 680px; font-size: 1.05rem; margin: 0 0 22px; }
.rw-rate { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid rgba(255, 215, 0, 0.35); border-radius: 999px; background: rgba(255, 215, 0, 0.07); font-weight: 700; color: var(--gold); margin-bottom: 18px; }

.rw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .rw-grid, .rw-grid-3 { grid-template-columns: 1fr; } }

.rw-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px; padding: 20px; }
.rw-card h3 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 800; }
.rw-card .rw-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }
.rw-reward { display: inline-block; font-weight: 800; color: var(--gold); background: rgba(255, 215, 0, 0.1); border: 1px solid rgba(255, 215, 0, 0.3); padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; margin-bottom: 12px; }
.rw-state { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.rw-state.done { color: #7ee2a0; font-weight: 700; }

.rw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
@media (max-width: 860px) { .rw-stats { grid-template-columns: repeat(2, 1fr); } }
.rw-stat { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 14px; }
.rw-stat .k { color: var(--muted); font-size: 0.8rem; margin-bottom: 4px; }
.rw-stat .v { font-size: 1.45rem; font-weight: 800; }
.rw-stat .v small { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

.rw-progress { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 8px 0 6px; }
.rw-progress > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8A2BE2, #FFD700); width: 0%; transition: width 0.5s ease; }

.rw-form label { display: block; font-size: 0.85rem; color: var(--muted); margin: 12px 0 5px; }
.rw-form input[type="text"], .rw-form input[type="email"], .rw-form input[type="number"], .rw-form input[type="url"], .rw-form textarea {
  width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; color: #fff;
  padding: 11px 12px; font: inherit; font-size: 0.95rem;
}
.rw-form textarea { resize: vertical; min-height: 64px; }
.rw-form input:focus, .rw-form textarea:focus { outline: 2px solid rgba(255, 215, 0, 0.5); border-color: transparent; }
.rw-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.rw-error { color: #ff9c9c; font-size: 0.9rem; margin-top: 10px; }
.rw-hint { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; }
.rw-guide { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.55), rgba(138,43,226,.55) 52%, rgba(255,215,0,.30)) border-box;
  box-shadow: 0 0 16px rgba(138,43,226,.16), 0 0 8px rgba(255,215,0,.08), inset 0 0 24px rgba(138,43,226,.05); }
.rw-guide-text { color: var(--text, #e8eaf2); font-size: 0.92rem; line-height: 1.55; margin: 0 0 12px; }
.rw-guide-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-guide-btns .btn { flex: 1 1 auto; text-align: center; white-space: nowrap; }
.rw-guide-btns .mm-logo { width: 22px; height: 22px; flex: 0 0 auto; margin-right: 8px; }
@media (max-width: 560px) { .rw-guide-btns .btn { flex: 1 1 100%; } }
.rw-ok { color: #7ee2a0; font-size: 0.9rem; margin-top: 10px; }

.rw-badge { display: inline-block; vertical-align: middle; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); border-radius: 6px; padding: 2px 7px; margin-left: 7px; }
/* Identity-verified badge: quiet, trustworthy teal — deliberately NOT
   the gold reward palette, so it reads as a trust mark, not a prize.
   Neon-frame standard kept via the gradient border + soft glow. */
.rw-badge.rw-verified { color: #c9fff2; background: linear-gradient(#0d2b2e, #0d2b2e) padding-box, linear-gradient(135deg, rgba(64,224,190,.9), rgba(56,150,255,.9)) border-box; border: 1px solid transparent; box-shadow: 0 0 10px rgba(64,224,190,.28); }
/* Ambassador badge (patch #52): purple→gold neon frame — the program
   colours, deliberately distinct from the teal verified trust mark
   and the gold TOP 10 / level pills. */
.rw-badge.rw-ambassador { color: #e9dcff; background: linear-gradient(#1d1033, #1d1033) padding-box, linear-gradient(135deg, rgba(167,139,250,.95), rgba(240,185,11,.9)) border-box; border: 1px solid transparent; box-shadow: 0 0 10px rgba(138,43,226,.35); }
.rw-lv { display: inline-block; font-size: 0.72rem; font-weight: 800; color: #d9c6ff; background: rgba(138, 43, 226, 0.25); border: 1px solid rgba(138, 43, 226, 0.55); border-radius: 6px; padding: 2px 7px; margin-left: 7px; vertical-align: middle; }

.rw-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.rw-table th, .rw-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-align: left; }
.rw-table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.rw-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rw-table tr.me td { background: rgba(255, 215, 0, 0.06); }

.rw-list { list-style: none; margin: 0; padding: 0; }
.rw-list li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 0.93rem; }
.rw-list li:last-child { border-bottom: none; }
.rw-list .when { color: var(--muted); font-size: 0.8rem; }
.rw-pts { font-weight: 800; color: var(--gold); white-space: nowrap; }

.rw-proposal { border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.02); }
.rw-proposal .tone { font-size: 0.75rem; font-weight: 800; color: #d9c6ff; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.rw-proposal .text { white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; margin: 0 0 12px; }
.rw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-actions .btn { min-height: 38px; padding: 7px 14px; font-size: 0.88rem; }

.rw-post { border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.02); }
.rw-post .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rw-post .who { font-weight: 800; color: #fff; text-decoration: none; }
.rw-post .who:hover { color: var(--gold); }
.rw-post .meta { color: var(--muted); font-size: 0.8rem; }
.rw-post .body { white-space: pre-wrap; word-break: break-word; margin: 0 0 10px; }
.rw-post .body a.tag-link, .tag-link { color: #B18CFF; text-decoration: none; font-weight: 700; }
.rw-post .body a.tag-link:hover, .tag-link:hover { color: var(--gold); }
.rw-post .meta a.time-link { color: var(--muted); text-decoration: none; }
.rw-post .meta a.time-link:hover { color: var(--gold); }
.rw-share { color: var(--muted); font-size: 0.85rem; text-decoration: none; padding: 4px 6px; }
.rw-share:hover { color: var(--gold); }
.tag-filter-banner { display: flex; gap: 10px; align-items: center; border: 1px solid rgba(177, 140, 255, 0.45); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.9rem; }
.tag-filter-banner a { color: var(--gold); font-weight: 700; text-decoration: none; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.tag-chips .tag-chips-label { color: var(--muted); font-size: 0.8rem; }
.tag-chips button { background: rgba(138, 43, 226, 0.10); border: 1px solid rgba(177, 140, 255, 0.45); color: #B18CFF; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.tag-chips button:hover { border-color: var(--gold); color: var(--gold); }
.rw-post .foot { display: flex; gap: 14px; align-items: center; }
.rw-like { background: none; border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 0.85rem; }
.rw-like.liked { border-color: rgba(255, 215, 0, 0.6); color: var(--gold); }
.rw-mini { background: none; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 0.82rem; padding: 4px 2px; }
.rw-mini:hover { color: #fff; }

.rw-avatar { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); }
.rw-userline { display: flex; align-items: center; gap: 12px; }
.rw-userline .nm { font-size: 1.15rem; font-weight: 800; }
.rw-userline .wl { color: var(--muted); font-size: 0.85rem; }

.rw-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rw-tab { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; font: inherit; font-size: 0.9rem; font-weight: 700; }
.rw-tab.active { background: rgba(255, 215, 0, 0.14); border-color: rgba(255, 215, 0, 0.55); color: var(--gold); }

.rw-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255, 215, 0, 0.09); border: 1px dashed rgba(255, 215, 0, 0.4); border-radius: 8px; padding: 3px 9px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.rw-hidden { display: none !important; }
.rw-banner { border: 1px solid rgba(255, 215, 0, 0.4); background: rgba(255, 215, 0, 0.07); border-radius: 14px; padding: 16px 18px; margin: 18px 0; font-size: 0.95rem; }
.rw-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #141b31; color: #fff; border: 1px solid rgba(255, 215, 0, 0.5); border-radius: 12px; padding: 12px 18px; font-size: 0.92rem; font-weight: 700; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 120; max-width: min(92vw, 520px); text-align: center; }
.rw-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.rw-threads li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rw-unread { background: var(--gold); color: #0A0F1E; border-radius: 999px; font-size: 0.72rem; font-weight: 800; padding: 1px 8px; }
.rw-msgs { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.rw-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); white-space: pre-wrap; word-break: break-word; font-size: 0.93rem; }
.rw-msg.mine { align-self: flex-end; background: rgba(255, 215, 0, 0.1); border-color: rgba(255, 215, 0, 0.35); }
.rw-msg .when { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 5px; }

/* ---------- NEON FRAME STANDARD v1 (2026-11-29): gradient gold->purple frame + outer glow ----------
   Appended last; wins over the readability pass. Fill = the site's own card
   colour, so surfaces never change — only the frame goes neon. See
   ~/workspace/aurea-design/shell-spec.md section 10. */
.rw-card, .rw-stat, .rw-post {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.55), rgba(138,43,226,.55) 52%, rgba(255,215,0,.30)) border-box;
  box-shadow: 0 0 16px rgba(138,43,226,.16), 0 0 8px rgba(255,215,0,.08), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(138,43,226,.05);
}
@media (hover: hover) {
  .rw-card, .rw-stat, .rw-post:hover {
    background:
      linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
      linear-gradient(135deg, rgba(255,215,0,.9), rgba(138,43,226,.85) 52%, rgba(255,215,0,.55)) border-box;
    box-shadow: 0 0 22px rgba(255,215,0,.22), 0 0 34px rgba(138,43,226,.28), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.07);
  }
}
.rw-banner, .rw-toast {
  border: 1px solid rgba(255,215,0,.45);
  box-shadow: 0 0 18px rgba(138,43,226,.20), 0 0 10px rgba(255,215,0,.10), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(138,43,226,.05);
}
@media (hover: hover) {
  .rw-banner, .rw-toast:hover {
    border-color: rgba(255,215,0,.75);
    box-shadow: 0 0 24px rgba(255,215,0,.24), 0 0 38px rgba(138,43,226,.30), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.07);
  }
}

/* Hero band image (2026-11-29): official emblem band, neon-framed. */
.rw-band {
  display: block; width: 100%; height: auto; margin-top: 28px;
  border-radius: 16px; border: 1px solid rgba(255,215,0,.45);
  box-shadow: 0 0 18px rgba(138,43,226,.20), 0 0 10px rgba(255,215,0,.10), 0 10px 28px rgba(0,0,0,.36);
}

/* ================= GAME UI v2 (2026-11-29) =================
   Game-style layer over the Rewards page: quest cards with state
   colours, a status HUD with a progress ring, a 7-day check-in
   streak strip, a gacha capsule and reward FX (coin burst + pop).
   State colours: claimable = gold, in progress = purple,
   complete = green, locked/todo = neutral. The readability floor
   (--muted #A7ACC2 / --faint #8B90A5) is untouched; state colour is
   carried by frames, chips and icons, never by body text alone. */

/* --- quest card header: icon medallion + state chip --- */
.rw-qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rw-qhead h3 { margin: 0; flex: 1 1 auto; }
.rw-qicon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
  border: 1px solid transparent;
  background:
    linear-gradient(#1a1030, #1a1030) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.8), rgba(138,43,226,.8)) border-box;
  box-shadow: 0 0 10px rgba(138,43,226,.35), inset 0 0 10px rgba(255,215,0,.12);
}
.rw-qicon svg { width: 22px; height: 22px; }
.rw-qchip {
  flex: 0 0 auto; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
  border-radius: 999px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.18);
  color: var(--muted); background: rgba(255,255,255,.04); white-space: nowrap;
}
.rw-qchip:empty { display: none; }
.rw-quest.is-claimable .rw-qchip { color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); border-color: rgba(255,215,0,.8); }
.rw-quest.is-progress .rw-qchip { color: #d9c6ff; background: rgba(138,43,226,.28); border-color: rgba(177,140,255,.6); }
.rw-quest.is-done .rw-qchip { color: #0A0F1E; background: linear-gradient(135deg, #9df0bb, #4ecf7d); border-color: rgba(126,226,160,.8); }

/* --- quest card states (frame glow only; fill stays the card colour) --- */
.rw-card.rw-quest.is-claimable {
  box-shadow: 0 0 0 1px rgba(255,215,0,.35), 0 0 26px rgba(255,215,0,.28), 0 0 40px rgba(138,43,226,.30), 0 12px 30px rgba(0,0,0,.42), inset 0 0 24px rgba(255,215,0,.06);
  animation: rwQuestPulse 2.2s ease-in-out infinite;
}
.rw-card.rw-quest.is-done { box-shadow: 0 0 18px rgba(78,207,125,.18), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(78,207,125,.05); }
.rw-card.rw-quest.is-done .rw-qicon { color: #7ee2a0; box-shadow: 0 0 10px rgba(78,207,125,.30), inset 0 0 10px rgba(126,226,160,.10); }
.rw-card.rw-quest.is-progress { box-shadow: 0 0 22px rgba(138,43,226,.34), 0 10px 28px rgba(0,0,0,.38), inset 0 0 24px rgba(138,43,226,.08); }
@keyframes rwQuestPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,215,0,.30), 0 0 20px rgba(255,215,0,.20), 0 0 34px rgba(138,43,226,.24), 0 12px 30px rgba(0,0,0,.42), inset 0 0 24px rgba(255,215,0,.05); }
  50% { box-shadow: 0 0 0 1px rgba(255,215,0,.55), 0 0 34px rgba(255,215,0,.38), 0 0 52px rgba(138,43,226,.38), 0 12px 30px rgba(0,0,0,.42), inset 0 0 24px rgba(255,215,0,.09); }
}

/* --- tactile buttons inside quest cards --- */
.rw-quest .btn { transition: transform .08s ease, box-shadow .2s ease, filter .2s ease; }
.rw-quest .btn:active { transform: scale(.965); }
.rw-quest.is-claimable .btn.btn-primary { box-shadow: 0 0 18px rgba(255,215,0,.45); }

/* --- status HUD --- */
.rw-hud {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  border-radius: 18px; padding: 20px 22px; margin: 26px 0 4px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.65), rgba(138,43,226,.65) 52%, rgba(255,215,0,.35)) border-box;
  box-shadow: 0 0 22px rgba(138,43,226,.22), 0 0 12px rgba(255,215,0,.10), 0 12px 30px rgba(0,0,0,.40);
}
.rw-hud-ring { position: relative; width: 118px; height: 118px; flex: 0 0 auto; }
.rw-hud-ring svg { width: 118px; height: 118px; transform: rotate(-90deg); }
.rw-hud-ring .ring-bg { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 10; }
.rw-hud-ring .ring-fg { fill: none; stroke: url(#rwRingGrad); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.rw-hud-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.rw-hud-center img { width: 34px; height: 34px; }
.rw-hud-center .n { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.rw-hud-center .cap { font-size: 0.66rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.rw-hud-main { flex: 1 1 260px; min-width: 240px; }
.rw-hud-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.rw-hud-title .lv { color: var(--gold); }
.rw-hud-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }
.rw-pillars { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-pillar {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; font-weight: 700;
  border-radius: 999px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.16);
  color: var(--muted); background: rgba(255,255,255,.03);
}
.rw-pillar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); flex: 0 0 auto; }
.rw-pillar.done { color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); border-color: rgba(255,215,0,.8); }
.rw-pillar.done .dot { background: #0A0F1E; }
.rw-hud-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.rw-hud-stat { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.02rem; }
.rw-hud-stat img { width: 24px; height: 24px; }
.rw-hud-stat .k { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.rw-hud-stat .ticket-ic { color: #d9c6ff; display: inline-flex; }
.rw-hud-stat .ticket-ic svg { width: 22px; height: 22px; }
@media (max-width: 640px) { .rw-hud { justify-content: center; text-align: center; } .rw-pillars { justify-content: center; } .rw-hud-side { flex-direction: row; } }

/* --- 7-day check-in streak strip --- */
.rw-streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 2px; }
.rw-streak:empty { display: none; }
.rw-scell {
  border-radius: 12px; padding: 7px 2px 6px; text-align: center;
  border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03);
}
.rw-scell .d { display: block; font-size: 0.66rem; font-weight: 800; letter-spacing: .03em; color: var(--faint); text-transform: uppercase; }
.rw-scell .num { display: block; font-size: 0.8rem; font-weight: 800; margin: 1px 0 3px; }
.rw-scell img { width: 22px; height: 22px; display: block; margin: 0 auto; opacity: .22; filter: grayscale(.6); }
.rw-scell .ck { display: block; font-size: 0.68rem; font-weight: 800; color: transparent; height: 0.85rem; }
.rw-scell.done { border-color: rgba(255,215,0,.55); background: rgba(255,215,0,.10); }
.rw-scell.done img { opacity: 1; filter: none; }
.rw-scell.done .ck { color: #7ee2a0; }
.rw-scell.done .d { color: var(--gold); }
.rw-scell.today { border-color: rgba(255,215,0,.85); background: rgba(255,215,0,.07); animation: rwCellPulse 1.8s ease-in-out infinite; }
.rw-scell.today img { opacity: .85; filter: none; }
.rw-scell.today .d { color: var(--gold); }
.rw-scell.today.done { animation: none; }
@keyframes rwCellPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,.0), 0 0 8px rgba(255,215,0,.15); }
  50% { box-shadow: 0 0 0 2px rgba(255,215,0,.35), 0 0 16px rgba(255,215,0,.35); }
}
.rw-streak-label { font-size: 0.88rem; font-weight: 700; color: var(--muted); margin: 6px 0 12px; }
.rw-streak-label:empty { display: none; }
.rw-streak-label strong { color: var(--gold); }

/* --- profile stat coin --- */
.rw-stat-coin .v { display: flex; align-items: center; gap: 8px; }
.rw-coin-ic { width: 26px; height: 26px; flex: 0 0 auto; filter: drop-shadow(0 0 6px rgba(255,215,0,.45)); }

/* --- weekly / monthly quest rows --- */
.rw-prow { padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.rw-prow:last-child { border-bottom: none; }
.rw-prow-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rw-prow-name { font-weight: 700; flex: 1 1 auto; }
.rw-prow-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.rw-prow-bonus { color: var(--gold); font-size: 0.85rem; font-weight: 700; margin-top: 5px; }
.rw-prow .rw-progress { margin: 8px 0 2px; }
.rw-progress.sm { height: 8px; }
.rw-prow.done .rw-prow-name { color: #9df0bb; }
.rw-prow .rw-qchip[data-state="done"] { color: #0A0F1E; background: linear-gradient(135deg, #9df0bb, #4ecf7d); border-color: rgba(126,226,160,.8); }
.rw-prow .rw-qchip[data-state="progress"] { color: #d9c6ff; background: rgba(138,43,226,.28); border-color: rgba(177,140,255,.6); }
.rw-prow.allrow { border: 1px solid rgba(255,215,0,.35); border-radius: 12px; padding: 12px 12px; margin-top: 10px; background: rgba(255,215,0,.05); }
.rw-prow.allrow.granted { border-color: rgba(126,226,160,.6); background: rgba(78,207,125,.07); }

/* --- gacha capsule --- */
.rw-gacha-stage { display: flex; justify-content: center; margin: 2px 0 12px; }
.rw-gacha-cap {
  width: min(250px, 72vw); aspect-ratio: 1 / 1; border-radius: 26px; padding: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent;
  background:
    linear-gradient(#1a1030, #1a1030) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.85), rgba(138,43,226,.85)) border-box;
  box-shadow: 0 0 22px rgba(138,43,226,.40), 0 0 12px rgba(255,215,0,.18), inset 0 0 18px rgba(255,215,0,.12);
}
.rw-gacha-cap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rw-gacha-cap.shake { animation: rwShake .5s ease-in-out 2; }
.rw-gacha-cap.pop { animation: rwPop .55s cubic-bezier(.2, 2.2, .4, 1); }
@keyframes rwShake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-9deg) scale(1.03); }
  45% { transform: rotate(8deg); }
  70% { transform: rotate(-6deg) scale(1.02); }
}
@keyframes rwPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
#gachaResult.pop { animation: rwPop .55s cubic-bezier(.2, 2.2, .4, 1); display: inline-block; }

/* --- reward FX: coin burst + GET popup --- */
.rw-fx { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.rw-fx-pop {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(16, 20, 38, .94); border: 1px solid rgba(255,215,0,.65); border-radius: 18px;
  padding: 18px 30px 15px; box-shadow: 0 0 34px rgba(255,215,0,.30), 0 0 54px rgba(138,43,226,.35), 0 18px 44px rgba(0,0,0,.5);
  animation: rwFxPop 2.6s cubic-bezier(.2, 1.4, .4, 1) forwards; text-align: center;
}
.rw-fx-pop img { width: 54px; height: 54px; filter: drop-shadow(0 0 10px rgba(255,215,0,.55)); }
.rw-fx-pop .rw-fx-amt { font-size: 1.45rem; font-weight: 800; color: var(--gold); white-space: nowrap; }
.rw-fx-pop .rw-fx-lv { font-size: 1.05rem; font-weight: 800; letter-spacing: .12em; color: #d9c6ff; }
.rw-fx-pop.levelup { border-color: rgba(177,140,255,.8); }
@keyframes rwFxPop {
  0% { opacity: 0; transform: translate(-50%, -38%) scale(.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  20% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; transform: translate(-50%, -52%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(.96); }
}
.rw-fx-coin {
  position: absolute; left: 50%; top: 36%; width: 30px; height: 30px;
  animation: rwCoinBurst 1.15s cubic-bezier(.15, .7, .4, 1) forwards;
  filter: drop-shadow(0 0 6px rgba(255,215,0,.5));
}
@keyframes rwCoinBurst {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}

/* ================= GAME UI v3 — GACHA EXPANSION (2026-11-29) =================
   Rarity-coloured prize table, big ticket balance, earn-ways panel,
   staged draw FX (flash / stars / confetti) and the full-screen
   celebration overlay (level-up + legendary). Rarity colours:
   common = grey-lavender, rare = blue-violet, epic = purple,
   legendary = gold with an animated rainbow glow. Text contrast
   floor is unchanged; rarity is carried by frames, chips and
   headings, never by body text alone. */

/* --- big ticket balance on the draw card --- */
.rw-gacha-tickets { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 10px; }
.rw-gacha-tickets .tk-ic { color: #d9c6ff; display: inline-flex; filter: drop-shadow(0 0 8px rgba(138,43,226,.5)); }
.rw-gacha-tickets .tk-ic svg { width: 34px; height: 34px; }
.rw-gacha-tickets .tk-body { display: inline-flex; align-items: baseline; gap: 9px; }
.rw-gacha-tickets .tk-label { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.rw-gacha-tickets .tk-num { font-size: 2.3rem; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 0 18px rgba(255,215,0,.35); }

/* --- rarity chips under the capsule --- */
.rw-rarity-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.rw-rarity-chips:empty { display: none; }
.rw-rar-chip { font-size: 0.72rem; font-weight: 800; letter-spacing: .03em; border-radius: 999px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.16); color: var(--muted); background: rgba(255,255,255,.03); white-space: nowrap; }
.rw-rar-chip.rw-rar-rare { color: #b9c8ff; border-color: rgba(122,140,255,.55); background: rgba(90,110,255,.12); }
.rw-rar-chip.rw-rar-epic { color: #e3c8ff; border-color: rgba(177,140,255,.6); background: rgba(138,43,226,.16); }
.rw-rar-chip.rw-rar-legendary { color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); border-color: rgba(255,215,0,.85); }

/* --- prize table grouped by rarity --- */
.rw-odds-group { margin-bottom: 16px; border-left: 3px solid rgba(255,255,255,.14); padding-left: 12px; }
.rw-odds-group:last-child { margin-bottom: 2px; }
.rw-odds-ghead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.rw-rar-name { font-weight: 800; font-size: 0.95rem; letter-spacing: .04em; text-transform: uppercase; }
.rw-rar-total { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.rw-odds-table td { padding: 6px 10px; }
.rw-odds-group.rw-rar-common .rw-rar-name { color: #C6CADB; }
.rw-odds-group.rw-rar-rare { border-left-color: rgba(122,140,255,.7); }
.rw-odds-group.rw-rar-rare .rw-rar-name { color: #9db1ff; }
.rw-odds-group.rw-rar-epic { border-left-color: rgba(177,140,255,.8); }
.rw-odds-group.rw-rar-epic .rw-rar-name { color: #cf9dff; }
.rw-odds-group.rw-rar-legendary { border-left-color: #FFD700; }
.rw-odds-group.rw-rar-legendary .rw-rar-name {
  background: linear-gradient(90deg, #FFD700, #ff9de2, #8A2BE2, #FFD700);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rwRainbowText 3.2s linear infinite;
}
@keyframes rwRainbowText { 0% { background-position: 0% 0; } 100% { background-position: 220% 0; } }

/* --- draw result line, coloured by rarity --- */
#gachaResult.rw-rar-text-rare { color: #9db1ff; }
#gachaResult.rw-rar-text-epic { color: #cf9dff; }
#gachaResult.rw-rar-text-legendary { color: var(--gold); text-shadow: 0 0 16px rgba(255,215,0,.5); }

/* --- capsule glow states during the staged reveal --- */
.rw-gacha-cap.glow-rare { box-shadow: 0 0 30px rgba(110,130,255,.75), 0 0 16px rgba(138,43,226,.5), inset 0 0 20px rgba(140,160,255,.25); }
.rw-gacha-cap.glow-epic { box-shadow: 0 0 34px rgba(255,215,0,.55), 0 0 44px rgba(138,43,226,.6), inset 0 0 22px rgba(255,215,0,.25); }
.rw-gacha-cap.glow-legendary { animation: rwLegendaryGlow 1s ease-in-out infinite; }
.rw-gacha-cap.charge { animation: rwCharge .32s ease-in-out infinite; }
@keyframes rwCharge { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.07) rotate(3deg); } }
@keyframes rwLegendaryGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(255,215,0,.7), 0 0 50px rgba(255,120,220,.45), inset 0 0 22px rgba(255,215,0,.3); }
  50% { box-shadow: 0 0 44px rgba(138,43,226,.75), 0 0 60px rgba(255,215,0,.5), inset 0 0 26px rgba(177,140,255,.35); }
}

/* --- earn-ways panel --- */
.rw-earn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin-top: 6px; }
.rw-earn-item { display: flex; gap: 11px; align-items: flex-start; padding: 11px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.02); }
.rw-earn-item.highlight { border-color: rgba(255,215,0,.55); background: rgba(255,215,0,.05); box-shadow: 0 0 16px rgba(255,215,0,.14); }
.rw-earn-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gold); border: 1px solid transparent; background: linear-gradient(#1a1030, #1a1030) padding-box, linear-gradient(135deg, rgba(255,215,0,.8), rgba(138,43,226,.8)) border-box; }
.rw-earn-ic svg { width: 20px; height: 20px; }
.rw-earn-body { flex: 1 1 auto; min-width: 0; }
.rw-earn-t { display: block; font-weight: 800; font-size: 0.96rem; }
.rw-earn-d { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.rw-earn-extra { display: block; color: #d9c6ff; font-size: 0.82rem; font-weight: 700; margin-top: 5px; }
.rw-earn-count { flex: 0 0 auto; font-weight: 800; color: var(--gold); background: rgba(255,215,0,.1); border: 1px solid rgba(255,215,0,.35); border-radius: 999px; padding: 2px 9px; font-size: 0.8rem; }
.rw-earn-invite { grid-column: 1 / -1; border: 1px solid rgba(255,215,0,.5); border-radius: 13px; padding: 13px 14px; background: linear-gradient(135deg, rgba(255,215,0,.09), rgba(138,43,226,.10)); }
.rw-earn-invite-note { font-weight: 800; font-size: 1rem; color: var(--gold); margin-bottom: 9px; }
.rw-earn-invite-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rw-earn-invite-label { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.rw-earn-invite .rw-code { white-space: normal; word-break: break-all; }
.rw-earn-invite .btn { min-height: 38px; padding: 7px 14px; font-size: 0.88rem; }
@media (max-width: 700px) { .rw-earn-grid { grid-template-columns: 1fr; } }

/* --- staged draw FX: screen flash, star burst, confetti --- */
.rw-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 38%, rgba(255,244,200,.9), rgba(255,215,0,.28) 42%, rgba(255,215,0,0) 68%); animation: rwFlashAnim .68s ease-out forwards; }
@keyframes rwFlashAnim { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.rw-fx-star { position: absolute; left: 50%; top: 36%; width: 17px; height: 17px; pointer-events: none; background: linear-gradient(135deg, #FFE97A, #B18CFF); clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%); animation: rwStarBurst 1.05s cubic-bezier(.15, .7, .4, 1) forwards; filter: drop-shadow(0 0 6px rgba(177,140,255,.7)); }
@keyframes rwStarBurst { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.05); } }
.rw-confetti { position: absolute; top: -14px; width: 9px; height: 14px; pointer-events: none; opacity: 0; animation-name: rwConfettiFall; animation-timing-function: linear; animation-fill-mode: forwards; z-index: 3; }
@keyframes rwConfettiFall { 0% { opacity: 0; transform: translate(0, -10px) rotate(0deg); } 8% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), 102vh) rotate(var(--rot)); } }

/* --- full-screen celebration overlay (level-up / legendary) --- */
.rw-celeb { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; overflow: hidden; background: rgba(6, 8, 18, .78); }
.rw-celeb.on { display: flex; }
.rw-celeb-rays { position: absolute; left: 50%; top: 44%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255,215,0,.10) 0deg 7deg, rgba(255,215,0,0) 7deg 15deg); animation: rwRaysSpin 26s linear infinite; pointer-events: none; }
@keyframes rwRaysSpin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
.rw-celeb-box { position: relative; z-index: 2; text-align: center; padding: 30px 26px; max-width: min(92vw, 560px); animation: rwCelebIn .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rwCelebIn { 0% { opacity: 0; transform: scale(.7) translateY(26px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.rw-celeb-emblem { width: 118px; height: 118px; filter: drop-shadow(0 0 26px rgba(255,215,0,.65)); animation: rwEmblemPulse 1.6s ease-in-out infinite; }
@keyframes rwEmblemPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.rw-celeb-title { font-size: clamp(2.1rem, 8.5vw, 3.4rem); font-weight: 800; letter-spacing: .06em; line-height: 1.1; margin-top: 14px; color: #fff; text-shadow: 0 0 26px rgba(138,43,226,.8); }
.rw-celeb.levelup .rw-celeb-title { color: var(--gold); }
.rw-celeb.legendary .rw-celeb-title { background: linear-gradient(90deg, #FFD700, #ff9de2, #8A2BE2, #7ee2a0, #FFD700); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rwRainbowText 2.4s linear infinite; filter: drop-shadow(0 0 18px rgba(255,215,0,.45)); }
.rw-celeb-sub { font-size: clamp(1.05rem, 4.6vw, 1.5rem); font-weight: 800; color: #fff; margin-top: 10px; }
.rw-celeb-line { font-size: clamp(1rem, 4.2vw, 1.3rem); font-weight: 800; color: #d9c6ff; margin-top: 8px; }
.rw-celeb .rw-confetti { z-index: 1; }

/* --- reduced motion: all game FX off --- */
@media (prefers-reduced-motion: reduce) {
  .rw-card.rw-quest.is-claimable, .rw-scell.today, .rw-gacha-cap.shake, .rw-gacha-cap.pop,
  #gachaResult.pop, .rw-fx-pop, .rw-fx-coin { animation: none !important; }
  .rw-fx-coin { display: none; }
  .rw-quest .btn, .rw-hud-ring .ring-fg, .rw-progress > div { transition: none !important; }
  .rw-quest .btn:active { transform: none; }
  /* GAME UI v3 additions: no staged FX, no confetti, static overlay. */
  .rw-odds-group.rw-rar-legendary .rw-rar-name, .rw-celeb.legendary .rw-celeb-title,
  .rw-gacha-cap.glow-legendary, .rw-gacha-cap.charge, .rw-celeb-box, .rw-celeb-emblem,
  .rw-celeb-rays { animation: none !important; }
  .rw-flash, .rw-fx-star, .rw-confetti { display: none !important; }
}

/* --- MOBILE UNIFY v1 (2026-11-29): match the portal-wide mobile scale --- */
@media (max-width: 560px) {
  .rw-hero h1 { font-size: 1.7rem; }
  .rw-card { padding: 18px 16px; }
  .rw-hud { padding: 18px 16px; gap: 14px; }
  .rw-hud-main { min-width: 0; }
}

/* --- QUEST v3 (2026-11-29): at-a-glance task cards -------------------
   Image icon + separate pt/XP reward chips + display-only difficulty
   chip on every quest card, a per-card progress bar with an
   "Progress x / y" line, and a daily summary bar at the top of the
   tasks section. All values come from reward_me() data already on the
   page — presentation only, no economy change. Difficulty is a
   display-only hint and never affects rewards or judgement. */
.rw-qhead .rw-qmain { flex: 1 1 auto; min-width: 0; }
.rw-qmain h3 { margin: 0; }
.rw-qimg {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; object-fit: cover;
  border: 1px solid transparent;
  background:
    linear-gradient(#141b31, #141b31) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.85), rgba(138,43,226,.85)) border-box;
  box-shadow: 0 0 12px rgba(138,43,226,.35), inset 0 0 8px rgba(255,215,0,.10);
}
.rw-quest.is-done .rw-qimg { box-shadow: 0 0 12px rgba(78,207,125,.45), inset 0 0 8px rgba(126,226,160,.12); }
.rw-quest.is-claimable .rw-qimg { box-shadow: 0 0 16px rgba(255,215,0,.5), inset 0 0 8px rgba(255,215,0,.14); }
.rw-qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.rw-chip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 0.78rem; font-weight: 800; line-height: 1.25;
  padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16);
}
.rw-chip-pt { color: #FFD700; background: rgba(255,215,0,.12); border-color: rgba(255,215,0,.45); }
.rw-chip-xp { color: #d9c6ff; background: rgba(138,43,226,.25); border-color: rgba(177,140,255,.55); }
.rw-chip-diff { color: var(--muted); background: rgba(255,255,255,.05); }
.rw-chip-ticket { color: #ffb3e2; background: rgba(255,110,199,.10); border-color: rgba(255,110,199,.40); }
.rw-chip-ticket.is-live { color: #1a0b16; background: linear-gradient(90deg, #ff6ec7, #ffd700); border-color: #ffd700; font-weight: 700; box-shadow: 0 0 10px rgba(255,110,199,.55); }
.rw-chip-diff .rw-stars { color: #FFD700; letter-spacing: .08em; }
.rw-qprog { margin-top: 14px; border-top: 1px dashed rgba(255,255,255,.10); padding-top: 10px; }
.rw-qprog-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; }
.rw-qprog-label { font-size: 0.84rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-qprog-line { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rw-qprog-line:first-child { margin-top: 0; }
.rw-qprog-name { flex: 0 0 64px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.rw-qprog-line .rw-progress { flex: 1 1 auto; margin: 0; }
.rw-qprog-num { flex: 0 0 auto; font-size: 0.84rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-progress-lg { height: 14px; margin: 10px 0 2px; }
.rw-summary { margin-bottom: 16px; }
.rw-summary-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rw-summary-label { font-weight: 800; font-size: 1.02rem; }
.rw-summary-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-summary-count strong { color: var(--gold); font-size: 1.25rem; }
.rw-summary-pct { margin-left: auto; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
/* period (weekly / monthly) rows: icon + chips join the existing bar */
.rw-picon {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; object-fit: cover;
  border: 1px solid rgba(255,215,0,.35); box-shadow: 0 0 8px rgba(138,43,226,.30);
}
.rw-prow-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; }
.rw-prow-chips .rw-qprog-label { margin-left: auto; }
/* profile task rows in the same card language */
.rw-ptask {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.rw-ptask:last-child { border-bottom: none; }
.rw-ptask-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.rw-ptask-name { font-weight: 700; }
.rw-ptask .rw-qchip { position: static; }
.rw-ptask .rw-qchip[data-state="done"] { color: #0A0F1E; background: linear-gradient(135deg, #9df0bb, #4ecf7d); border-color: rgba(126,226,160,.8); }
@media (max-width: 560px) {
  .rw-qimg { width: 46px; height: 46px; border-radius: 12px; }
  .rw-qprog-name { flex-basis: 52px; }
  .rw-summary-pct { margin-left: 0; }
}

/* --- WM v1: WorkMarket-style status card + streak (display only) --- */
.rw-status {
  border-radius: 18px; padding: 20px 22px; margin: 26px 0 4px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.65), rgba(138,43,226,.65) 52%, rgba(255,215,0,.35)) border-box;
  box-shadow: 0 0 22px rgba(138,43,226,.22), 0 0 12px rgba(255,215,0,.10), 0 12px 30px rgba(0,0,0,.40);
}
.rw-status-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rw-lvbig {
  font-size: 1.45rem; font-weight: 800; line-height: 1; color: #0A0F1E;
  background: linear-gradient(135deg, #FFE97A, #FFD700 55%, #b18cff);
  border-radius: 12px; padding: 10px 16px; box-shadow: 0 0 16px rgba(255,215,0,.35);
  white-space: nowrap;
}
.rw-status-xp .k { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.rw-status-xp .v { font-size: 2rem; font-weight: 800; color: var(--gold, #FFD700); line-height: 1.15; }
.rw-status-xp .v small { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.rw-status-today { margin-left: auto; text-align: right; }
.rw-status-today .k { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.rw-status-today .n { font-size: 1.35rem; font-weight: 800; }
.rw-status-hint { font-size: 1rem; font-weight: 700; margin: 14px 0 0; }
.rw-status .rw-progress { margin-top: 8px; }
.rw-status .rw-pillars { margin-top: 10px; }
.rw-status-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.rw-status-stats .rw-stat { margin: 0; min-width: 0; }
.rw-status-stats .rw-stat .v { overflow-wrap: break-word; }
.rw-status-stats .v.acc-gold { color: var(--gold, #FFD700); }
.rw-status-stats .v.acc-purple { color: #d9c6ff; }
.rw-status-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .rw-status { padding: 16px; }
  .rw-status-stats { gap: 8px; }
  .rw-status-stats .rw-stat { padding: 10px; }
  .rw-status-stats .rw-stat .v { font-size: 1.15rem; }
  .rw-lvbig { font-size: 1.2rem; padding: 8px 13px; }
  .rw-status-xp .v { font-size: 1.55rem; }
  .rw-status-today { margin-left: 0; text-align: left; }
}
/* streak: big day count + remaining-days chip */
.rw-streak-k { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.rw-streak-big { font-size: 1.9rem; font-weight: 800; color: var(--gold, #FFD700); line-height: 1.2; margin-right: 10px; }
.rw-streak-big small { font-size: 0.95rem; color: var(--muted); font-weight: 700; }
.rw-streak-chip {
  display: inline-block; vertical-align: middle; font-size: 0.8rem; font-weight: 800;
  color: #d9c6ff; background: rgba(138,43,226,.25); border: 1px solid rgba(138,43,226,.55);
  border-radius: 999px; padding: 4px 11px;
}
.rw-streak-chip.done { color: #0A0F1E; background: linear-gradient(135deg, #9df0bb, #4ecf7d); border-color: rgba(126,226,160,.8); }

/* --- SNS link chips on the public profile --- */
.rw-sns-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rw-sns-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 700; color: var(--text, #fff); text-decoration: none;
  background: rgba(138,43,226,.16); border: 1px solid rgba(138,43,226,.5);
  border-radius: 999px; padding: 6px 12px;
}
.rw-sns-chip:hover { border-color: rgba(255,215,0,.7); color: var(--gold, #FFD700); }
.rw-sns-chip svg { width: 14px; height: 14px; flex: none; }

/* --- COUPON USE v1 (patch #23): state chips, Use button, confirm modal --- */
.rw-cstate {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
  border-radius: 999px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.16);
  color: var(--muted); background: rgba(255,255,255,.03); white-space: nowrap;
}
.rw-cstate.st-unused { color: #d9c6ff; background: rgba(138,43,226,.25); border-color: rgba(177,140,255,.6); }
.rw-cstate.st-applied { color: #0A0F1E; background: linear-gradient(135deg, #FFE97A, #FFD700); border-color: rgba(255,215,0,.85); }
.rw-cstate.st-used { color: #0A0F1E; background: linear-gradient(135deg, #9df0bb, #4ecf7d); border-color: rgba(126,226,160,.8); }
.rw-cstate.st-expired { color: var(--faint, #8B90A5); background: rgba(255,255,255,.02); }
.rw-use-btn { padding: 7px 14px; font-size: 0.85rem; white-space: nowrap; }
.rw-modal {
  position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 8, 18, .78); padding: 18px;
}
.rw-modal-box {
  width: min(92vw, 480px); max-height: 88vh; overflow: auto; padding: 24px 22px;
  border-radius: 16px; border: 1px solid transparent;
  background: linear-gradient(#12162a, #12162a) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.65), rgba(138,43,226,.65) 55%, rgba(255,215,0,.35)) border-box;
  box-shadow: 0 0 28px rgba(138,43,226,.28), 0 0 14px rgba(255,215,0,.12);
}
.rw-modal-box h3 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 800; }
.rw-modal-body { color: var(--muted); font-size: 0.95rem; line-height: 1.6; white-space: pre-line; margin: 0; }
.rw-modal-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.rw-modal-actions .btn { flex: 1 1 auto; text-align: center; white-space: nowrap; }
@media (max-width: 560px) { .rw-modal-actions .btn { flex: 1 1 100%; } }

/* --- GACHA CAMPAIGN BANNER v1 (patch #24) ------------------------------
   Filled by loadCampaignBanner() in gacha.js / rewards.js from the
   reward_gacha_campaign RPC; stays hidden until the RPC answers. */
.gacha-campaign-banner {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 14px;
  font-weight: 800; font-size: .98rem; line-height: 1.55; text-align: center;
  color: var(--text);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.65), rgba(138,43,226,.65) 52%, rgba(255,215,0,.4)) border-box;
  box-shadow: 0 0 16px rgba(138,43,226,.22), 0 0 10px rgba(255,215,0,.12);
}
.gacha-campaign-banner.gcb-live { color: #FFE97A; }
.gacha-campaign-banner.gcb-soon { color: var(--gold); }

/* --- SPEND IMAGES v1: catalog card images + coupon thumbnails --- */
.rw-spend-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin: 0 0 14px; border: 1px solid rgba(255, 215, 0, 0.28); box-shadow: 0 0 14px rgba(138, 43, 226, 0.22); background: #0A0F1E; }
.rw-cp-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; vertical-align: middle; margin-right: 9px; border: 1px solid rgba(255, 215, 0, 0.28); background: #0A0F1E; }

/* ---------- NEON FRAME v2 — QUEST PREMIUM (2026-11-30) ----------
   User request: cooler, stronger frames on the Cumulative Tasks page
   (Token Pad featured card is the benchmark). Quest cards get a 2px
   gold->purple gradient frame and a deeper rest glow; the icon tiles
   carry their own 2px neon frame; quest primary buttons glow gold at
   rest. State colours (claimable / progress / done) keep their more
   specific rules above — only the frame and the rest glow change.
   No text colours change: the readability floor is untouched. */
.rw-card.rw-quest {
  border-width: 2px;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.78), rgba(138,43,226,.72) 52%, rgba(255,215,0,.42)) border-box;
  box-shadow: 0 0 22px rgba(138,43,226,.24), 0 0 12px rgba(255,215,0,.12), 0 12px 30px rgba(0,0,0,.40), inset 0 0 24px rgba(138,43,226,.06);
}
@media (hover: hover) {
  .rw-card.rw-quest:hover {
    background:
      linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
      linear-gradient(135deg, rgba(255,215,0,.95), rgba(138,43,226,.90) 52%, rgba(255,215,0,.60)) border-box;
    box-shadow: 0 0 26px rgba(255,215,0,.24), 0 0 38px rgba(138,43,226,.32), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.08);
  }
}
.rw-qimg {
  border-width: 2px;
  box-shadow: 0 0 16px rgba(138,43,226,.45), 0 0 8px rgba(255,215,0,.14), inset 0 0 8px rgba(255,215,0,.12);
}
.rw-qicon {
  border-width: 1.5px;
  box-shadow: 0 0 13px rgba(138,43,226,.45), 0 0 7px rgba(255,215,0,.12), inset 0 0 10px rgba(255,215,0,.12);
}
.rw-picon {
  border: 1px solid transparent;
  background:
    linear-gradient(#141b31, #141b31) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.70), rgba(138,43,226,.70)) border-box;
  box-shadow: 0 0 10px rgba(138,43,226,.38);
}
.rw-quest .btn.btn-primary {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 16px rgba(255,215,0,.38), 0 6px 18px rgba(255,215,0,.20);
}
.rw-quest .btn.btn-primary:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 24px rgba(255,215,0,.52), 0 8px 22px rgba(255,215,0,.26);
}

/* LP participation tiers (lp-perk.js) */
.lp-tiers { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.lp-tiers-title { font-weight: 700; }
.lp-tier { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: rgba(255, 255, 255, 0.03); }
.lp-tier.is-reached { border-color: rgba(255, 215, 0, 0.55); box-shadow: 0 0 14px rgba(255, 215, 0, 0.10); }
.lp-tier-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-tier-name { font-weight: 700; }
.lp-chip { font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.lp-chip-ok { color: #FFD700; border-color: rgba(255, 215, 0, 0.5); background: rgba(255, 215, 0, 0.08); }
.lp-chip-claimed { color: #3ddc84; border-color: rgba(61, 220, 132, 0.5); background: rgba(61, 220, 132, 0.08); }
.lp-tier-perks { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.lp-tier-btn { margin-top: 10px; }

/* Cumulative progress (patch #53) */
.rw-prog-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rw-prog-pct { font-size: 2.9rem; font-weight: 900; line-height: 1;
  background: linear-gradient(90deg, #FFD700, #B388FF);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.rw-prog-meta { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
