/* ==========================================================================
   Regift — styles. Theme tokens and shared components come from
   shared/style.css. The game screen has its own winter look (evergreen,
   kraft paper, gold) in light and dark themes alike.

   Wrapped gifts are drawn in CSS (.rg-box); open gifts are kraft-paper cards.
   ========================================================================== */

.rg {
  --rg-ink: #2a1c12;
  --rg-paper: #f3ead7;
  --rg-gold: #e9c46a;
  --rg-red: #8c2f28;
  --rg-green: #1f4e3d;
  display: grid;
  gap: .8rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem;
  color: var(--rg-paper);
  background: radial-gradient(ellipse at 50% 0%, #24453a 0%, #13241f 60%, #0c1714 100%);
  border-radius: 22px;
}
.rg .muted { color: #cfc3a8; }
.rg-note { text-align: center; }
.rg-center-btn { justify-self: center; }
.rg-title { font-size: clamp(1.4rem, 6vw, 2rem); text-align: center; }
.rg-title.is-you { color: var(--rg-gold); }
.rg-label { font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--rg-gold); }
.rg-label--big { font-size: 1.05rem; letter-spacing: .04em; text-transform: none; }
.rg-ready, .rg-next { display: flex; justify-content: center; align-items: center; gap: .4rem; font-weight: 900; text-align: center; }
.rg-flash { justify-self: center; padding: .3rem .9rem; font-weight: 900; color: var(--rg-ink); background: var(--rg-gold); border-radius: 999px; transform: rotate(-2deg); animation: rg-pop .35s ease-out; }
@keyframes rg-pop { from { transform: scale(.6) rotate(-2deg); opacity: 0; } }

/* ---------- Menu ---------- */

.rg-menu { display: grid; gap: .7rem; }
.rg-art { display: flex; justify-content: center; gap: 1.4rem; padding: 1.2rem 0 .6rem; }
.rg-art .rg-box { --s: 4rem; }
.rg-tagline { font-size: 1.05rem; font-weight: 700; text-align: center; }
.rg-settings { display: grid; gap: .45rem; }
.choices { display: grid; gap: .5rem; }
.choices--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .3rem .5rem; font-weight: 800; text-align: center; background: var(--surface); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }
.choice input:checked + span { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.howto { max-width: 30rem; margin: 1.5rem auto 0; padding: .25rem 1rem; }
.howto summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.howto ol { display: grid; gap: .5rem; padding: 0 0 1rem; padding-inline-start: 1.4rem; list-style: decimal; }

/* ---------- A wrapped gift ---------- */

.rg-box { --s: 3.4rem; position: relative; display: inline-block; flex: none; width: var(--s); height: calc(var(--s) * .86); margin-top: calc(var(--s) * .3); background: var(--p); border-radius: 6px; box-shadow: inset -6px -6px 0 #0000002a, 0 5px 0 #00000055; }
.rg-box i { position: absolute; display: block; }
.rg-box__lid { left: -6%; right: -6%; top: -12%; height: 24%; background: var(--p); border-radius: 5px; filter: brightness(1.12); box-shadow: 0 3px 0 #00000033; }
.rg-box__v { left: 43%; width: 14%; top: -12%; bottom: 0; background: var(--r); }
.rg-box__h { top: 45%; height: 12%; left: 0; right: 0; background: var(--r); opacity: .85; }
.rg-box__bow { left: 50%; top: -32%; width: 44%; height: 26%; transform: translateX(-50%); border: calc(var(--s) * .07) solid var(--r); border-bottom: 0; border-radius: 50% 50% 40% 40%; }
.rg-box__tag { position: absolute; inset-inline-end: -.7rem; bottom: -.6rem; padding: .1rem .45rem; font-size: .75rem; font-weight: 900; white-space: nowrap; color: var(--rg-ink); background: var(--rg-paper); border-radius: 5px; transform: rotate(-6deg); }

.rg-wrapped { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.rg-wrap { display: grid; justify-items: center; gap: .35rem; min-width: 5rem; padding: .5rem .4rem .45rem; color: inherit; font: inherit; background: #0b1512aa; border: 2px solid #ffffff1a; border-radius: 16px; }
.rg-wrap__clue { font-size: .85rem; font-weight: 900; }
.rg-wrap.is-pick { cursor: pointer; border-color: var(--rg-gold); transition: transform .12s; }
.rg-wrap.is-pick:hover, .rg-wrap.is-pick:focus-visible { transform: translateY(-3px) rotate(-2deg); }
.rg-wrap.is-pick:focus-visible { outline: 3px solid var(--rg-gold); outline-offset: 2px; }

/* ---------- Open gifts ---------- */

.rg-gifts { display: grid; gap: .55rem; }
@media (min-width: 40rem) { .rg-gifts { grid-template-columns: 1fr 1fr; } }
.rg-gift { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .65rem .8rem; font: inherit; text-align: start; color: var(--rg-ink); background: var(--rg-paper); border: 3px solid #0b1512; border-radius: 16px; box-shadow: 4px 4px 0 #0b1512; }
.rg-gift.is-pick { cursor: pointer; }
.rg-gift.is-pick:hover, .rg-gift.is-pick:focus-visible { outline: 4px solid var(--rg-gold); outline-offset: 2px; }
.rg-gift.is-yours { background: #e6f0d8; }
.rg-gift.is-locked { opacity: .7; }
.rg-gift.is-hot { outline: 4px solid var(--rg-gold); outline-offset: 2px; }
.rg-gift.is-voted { outline: 4px solid var(--rg-red); outline-offset: 2px; }
.rg-gift__emoji { flex: none; font-size: 2rem; line-height: 1; }
.rg-gift__body { display: grid; gap: .25rem; min-width: 0; }
.rg-gift__name { line-height: 1.2; }
.rg-gift__meta { display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .78rem; font-weight: 800; color: #6a5847; }
.rg-kind.is-mine b { color: var(--rg-green); }
.rg-holder { padding: 0 .45rem; color: #fff; background: var(--rg-green); border-radius: 999px; }
.rg-steals { color: var(--rg-red); }
.rg-steals.is-locked { color: var(--rg-ink); }
.rg-holding { padding: .55rem .8rem; text-align: center; font-weight: 700; background: #0b1512aa; border-radius: 14px; }
.rg-holding__taste { color: var(--rg-gold); }

/* ---------- Your secret taste, a gift opened ---------- */

.rg-taste, .rg-unwrap { display: grid; justify-items: center; gap: .5rem; padding: 1.2rem 1rem; text-align: center; color: var(--rg-ink); background: var(--rg-paper); border: 3px dashed var(--rg-red); }
.rg-taste .muted { color: #6a5847; }
.rg-taste .rg-label { color: var(--rg-red); }
.rg-taste__icon { font-size: 3.6rem; line-height: 1; }
.rg-taste__line { font-size: 1.35rem; line-height: 1.2; }
.rg-unwrap { border-style: solid; border-color: var(--rg-gold); animation: rg-pop .4s ease-out; }
.rg-unwrap__emoji { font-size: 4.5rem; line-height: 1; }
.rg-unwrap__name { font-family: Georgia, serif; font-size: 1.5rem; font-style: italic; line-height: 1.2; }
.rg-unwrap .rg-kind { font-weight: 800; color: #6a5847; }

/* ---------- Reveal and final ---------- */

.rg-result { display: grid; gap: .4rem; padding: .8rem 1rem; color: var(--rg-ink); background: var(--rg-paper); }
.rg-result.is-you { border-color: var(--rg-gold); box-shadow: 0 0 0 3px var(--rg-gold); }
.rg-result__head { display: flex; justify-content: space-between; gap: .5rem; font-size: 1.1rem; }
.rg-result__pts { color: var(--rg-green); }
.rg-result__gift { font-weight: 700; }
.rg-result__extra { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .85rem; font-weight: 800; color: #6a5847; }
.rg-badge { display: inline-block; padding: .05rem .5rem; font-size: .78rem; font-weight: 900; border-radius: 999px; color: #fff; }
.rg-badge.is-nice { background: var(--rg-green); }
.rg-badge.is-dud { background: #7a6a58; }
.rg-badge.is-worst { background: var(--rg-red); }
.rg-board { display: grid; gap: .4rem; }
.rg-board__row { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; color: var(--rg-ink); background: var(--rg-paper); border-radius: 14px; }
.rg-board__row.is-you { box-shadow: 0 0 0 3px var(--rg-gold); }
.rg-board__place { width: 1.5rem; text-align: center; }
.rg-board__who { flex: 1; font-weight: 800; }
.rg-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 900; }
.rg-top__left { color: var(--rg-gold); }
.rg .host .bubble { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .rg-flash, .rg-unwrap { animation: none; }
  .rg-wrap.is-pick { transition: none; }
}
