/* schnickmich: hand-written, no framework. Mobile first, light and dark.
   Look: playful stickers. Ink outlines, hard offset shadows, a hot orange-pink-violet
   gradient, one colour per hand (Stein violett, Schere pink, Papier gelb). */

:root {
  --bg: #fff5ea;
  --card: #ffffff;
  --ink: #1d1410;
  --muted: #6c5a4d;
  --line: #f0dccb;
  --edge: #1d1410;          /* sticker outline */
  --drop: #1d1410;          /* hard shadow colour */
  --accent: #ff6a1a;
  --accent-deep: #d94e06;
  --accent-soft: #ffe5d1;
  --pink: #ff3d7f;
  --violet: #7c5cff;
  --yellow: #ffc531;
  --grad: linear-gradient(100deg, #ff6a1a 0%, #ff3d7f 55%, #7c5cff 100%);
  --rock: #7c5cff;      --rock-soft: #ece6ff;
  --scissors: #ff3d7f;  --scissors-soft: #ffe1ec;
  --paper: #f2a900;     --paper-soft: #fff0c4;
  --win: #12a150;
  --win-soft: #d8fbe4;
  --lose: #e0244d;
  --lose-soft: #ffe2e9;
  --draw: #b07508;
  --draw-soft: #fdf0d0;
  --whatsapp: #25d366;
  --blob-a: rgb(255 106 26 / 0.30);
  --blob-b: rgb(255 61 127 / 0.22);
  --blob-c: rgb(124 92 255 / 0.20);
  --dots: rgb(29 20 16 / 0.07);
  --shadow: 4px 4px 0 var(--drop);
  --shadow-sm: 3px 3px 0 var(--drop);
  --shadow-lift: 7px 7px 0 var(--drop);
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --spring: cubic-bezier(.3, 1.6, .5, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110c0a;
    --card: #221914;
    --ink: #fff3e8;
    --muted: #bea795;
    --line: #3a2b22;
    --edge: #4a372b;
    --drop: #000000;
    --accent: #ff8340;
    --accent-deep: #ff9a5c;
    --accent-soft: #3a2416;
    --pink: #ff5c93;
    --violet: #9b84ff;
    --grad: linear-gradient(100deg, #ff8340 0%, #ff5c93 55%, #9b84ff 100%);
    --rock: #a28dff;      --rock-soft: #2a2245;
    --scissors: #ff6b9c;  --scissors-soft: #3d1a29;
    --paper: #ffcf4a;     --paper-soft: #3a2e10;
    --win: #4ade80;
    --win-soft: #12301d;
    --lose: #ff6b8a;
    --lose-soft: #3d1621;
    --draw: #f2c14e;
    --draw-soft: #3a2d10;
    --blob-a: rgb(255 106 26 / 0.22);
    --blob-b: rgb(255 61 127 / 0.16);
    --blob-c: rgb(124 92 255 / 0.20);
    --dots: rgb(255 243 232 / 0.05);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* glowing blobs that drift slowly, plus a dot grid on top */
body::before, body::after {
  content: ""; position: fixed; pointer-events: none; z-index: -1;
}
body::before {
  inset: -20vmax;
  background:
    radial-gradient(34vmax 30vmax at 18% 12%, var(--blob-a), transparent 70%),
    radial-gradient(30vmax 28vmax at 88% 22%, var(--blob-b), transparent 70%),
    radial-gradient(36vmax 30vmax at 60% 92%, var(--blob-c), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}
body::after {
  inset: 0;
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.3px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0) }
  to   { transform: translate3d(3vmax, -2vmax, 0) rotate(8deg) }
}

::selection { background: var(--pink); color: #fff; }

a { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--pink); }

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; display: flex; flex-direction: column; gap: 20px; }

/* --- top bar --- */

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 20px; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 22px; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.logo b {
  font-weight: 900;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-hand {
  display: inline-grid; place-items: center; width: 36px; height: 36px; font-size: 20px;
  border-radius: 12px; background: var(--grad);
  border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  transform: rotate(-6deg);
  transition: transform .35s var(--spring);
}
.logo:hover { color: var(--ink); }
.logo:hover .logo-hand { transform: rotate(10deg) scale(1.1); }

.profile-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 14px; border-radius: 999px;
  background: var(--card); color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 14px;
  border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-chip:not(:has(.chip-score)) { padding-right: 14px; }
.profile-chip:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--drop); }
.chip-score {
  font-size: 12px; font-weight: 900; color: #fff;
  background: var(--grad); padding: 2px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* --- type --- */

h1, h2 { margin: 0; letter-spacing: -0.03em; line-height: 1.1; }
.accent {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .04em;
}
.lead { color: var(--muted); font-size: 17px; margin: 12px 0 0; font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.center { text-align: center; }
.eyebrow {
  align-self: flex-start;
  display: inline-block; margin: 0 0 2px; padding: 4px 11px;
  font-size: 11.5px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase;
  color: var(--card); background: var(--ink); border-radius: 999px;
  transform: rotate(-2deg);
}
.page-title { font-size: 34px; font-weight: 900; }
.section-title { font-size: 19px; font-weight: 900; margin-bottom: 12px; }

/* --- hero --- */

.hero { text-align: center; padding: 8px 0 4px; }
.hero h1 { font-size: clamp(36px, 10vw, 52px); font-weight: 900; letter-spacing: -0.045em; }
.hero-hands { font-size: 40px; display: flex; justify-content: center; gap: 14px; margin-bottom: 16px; }
.hh {
  display: inline-grid; place-items: center; width: 68px; height: 68px; line-height: 1;
  border-radius: 22px; border: 2px solid var(--edge); box-shadow: var(--shadow);
  animation: bob 2.6s ease-in-out infinite;
}
.hh-1 { background: var(--rock-soft); --tilt: -8deg; }
.hh-2 { background: var(--scissors-soft); --tilt: 4deg; animation-delay: .25s; }
.hh-3 { background: var(--paper-soft); --tilt: 9deg; animation-delay: .5s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)) }
  50% { transform: translateY(-8px) rotate(calc(var(--tilt, 0deg) * -1)) }
}

/* --- cards --- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 2px solid var(--edge);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
  animation: rise .45s var(--spring) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }
.card-title { font-size: 22px; font-weight: 900; }
.card p { margin: 0; }

/* --- move buttons: a chunky key per hand, each in its own colour --- */

.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.move {
  --c: var(--accent); --c-soft: var(--accent-soft);
  position: relative;
  appearance: none; border: 2px solid var(--edge); background: var(--c-soft);
  border-radius: 20px; padding: 16px 4px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: inherit; color: var(--ink);
  box-shadow: 0 5px 0 var(--drop);
  transition: transform .18s var(--spring), box-shadow .18s ease, background .15s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.move-rock { --c: var(--rock); --c-soft: var(--rock-soft); }
.move-scissors { --c: var(--scissors); --c-soft: var(--scissors-soft); }
.move-paper { --c: var(--paper); --c-soft: var(--paper-soft); }
.move-emoji {
  font-size: 46px; line-height: 1;
  filter: drop-shadow(0 4px 0 rgb(0 0 0 / 0.12));
  transition: transform .3s var(--spring);
}
.move-name { font-weight: 900; font-size: 15px; letter-spacing: -0.01em; }
.move:hover { transform: translateY(-4px); box-shadow: 0 9px 0 var(--drop); }
.move:hover .move-emoji { transform: rotate(-14deg) scale(1.15); }
.move:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--drop); }
.move:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
form.sending .move { opacity: .4; pointer-events: none; }
form.sending .move.chosen { opacity: 1; background: var(--c); color: #fff; }
form.sending .move.chosen .move-emoji { animation: shake .3s ease-in-out infinite; }

/* --- inputs and buttons --- */

.name-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; }
.name-field small { font-weight: 600; color: var(--muted); }
.name-field input, .name-field textarea, .copy-row input {
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  background: var(--bg); border: 2px solid var(--edge); border-radius: 14px;
  padding: 11px 14px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.name-field input::placeholder, .name-field textarea::placeholder { color: var(--muted); opacity: .7; font-weight: 600; }
.name-field textarea { resize: vertical; }
.name-field input:focus, .name-field textarea:focus, .copy-row input:focus {
  outline: none; border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent);
  transform: translate(-1px, -1px);
}

.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 16px;
  border: 2px solid var(--edge);
  font: inherit; font-weight: 900; font-size: 16px; letter-spacing: -0.01em; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--drop); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--drop); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--grad); background-size: 140% 100%; color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / 0.18); }
.btn-primary:hover { color: #fff; background-position: 100% 0; }
.btn-whatsapp { background: var(--whatsapp); color: #062e17; }
.btn-whatsapp:hover { color: #062e17; filter: brightness(1.05); }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--accent-soft); }
.btn-wide { width: 100%; }
.btn.done { background: var(--win); color: #fff; }

.share { display: flex; flex-direction: column; gap: 12px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: 14px; color: var(--muted); min-width: 0; }
.copy-row .btn { flex-shrink: 0; padding: 11px 16px; }

/* --- how it works --- */

.steps {
  list-style: none; margin: 4px 0 0; padding: 18px 18px;
  display: flex; flex-direction: column; gap: 14px;
  border: 2px dashed var(--edge); border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 55%, transparent);
}
.steps li { display: flex; gap: 14px; align-items: center; }
.steps strong { display: block; font-size: 15.5px; font-weight: 900; }
.steps li > span:last-child { color: var(--muted); font-size: 14px; line-height: 1.35; }
.steps li > span:last-child strong { color: var(--ink); }
.step-n {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 900; color: #fff;
  border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--drop);
}
.steps li:nth-child(1) .step-n { background: var(--rock); transform: rotate(-6deg); }
.steps li:nth-child(2) .step-n { background: var(--scissors); transform: rotate(4deg); }
.steps li:nth-child(3) .step-n { background: var(--paper); color: #1d1410; transform: rotate(-3deg); }

/* --- waiting --- */

.my-pick {
  display: flex; align-items: center; gap: 12px;
  background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 16px;
  padding: 10px 14px; font-size: 15px;
}
.my-pick-emoji { font-size: 34px; animation: peek 3s ease-in-out infinite; display: inline-block; }
@keyframes peek { 0%, 70%, 100% { transform: none } 80% { transform: rotate(-12deg) } 90% { transform: rotate(10deg) } }
.waiting-line { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(1) { background: var(--accent); }
.dots i:nth-child(2) { background: var(--pink); animation-delay: .15s; }
.dots i:nth-child(3) { background: var(--violet); animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0) scale(.6); opacity: .5 } 40% { transform: translateY(-5px) scale(1); opacity: 1 } }

/* --- challenge --- */

.challenge { text-align: center; padding: 6px 0; }
.challenge h1 { font-size: clamp(30px, 8.5vw, 42px); font-weight: 900; letter-spacing: -0.04em; }
.challenge-badge {
  display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 14px;
  font-size: 48px; line-height: 1;
  border-radius: 26px; background: var(--grad);
  border: 2px solid var(--edge); box-shadow: var(--shadow);
  animation: shake .5s ease-in-out 3;
}

/* --- result --- */

.result {
  --tone: var(--accent); --tone-soft: var(--accent-soft);
  position: relative; overflow: hidden; text-align: center; padding-top: 26px;
}
.result-win  { --tone: var(--win);  --tone-soft: var(--win-soft); }
.result-lose { --tone: var(--lose); --tone-soft: var(--lose-soft); }
.result-draw { --tone: var(--draw); --tone-soft: var(--draw-soft); }
.result {
  background:
    radial-gradient(120% 70% at 50% 0%, var(--tone-soft), transparent 70%),
    var(--card);
  border-color: var(--tone);
  box-shadow: 4px 4px 0 var(--drop);
}
/* sun rays behind the hands */
.result::before {
  content: ""; position: absolute; left: 50%; top: 80px; width: 520px; height: 520px;
  margin: -260px 0 0 -260px; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, var(--tone-soft) 0 10deg, transparent 10deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.result > * { position: relative; }
.result > .confetti { position: absolute; }

.arena { display: flex; align-items: center; justify-content: center; gap: 8px; }
.fighter { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.fighter-name { font-weight: 900; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fighter-move { color: var(--muted); font-size: 13px; font-weight: 800; }
.versus {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 900; font-size: 15px; font-style: italic; color: var(--card);
  background: var(--ink);
  transform: rotate(-8deg);
}

.hand-box { position: relative; width: 96px; height: 96px; }
.hand {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; line-height: 1;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / 0.15));
}
.fighter-left .hand { transform: scaleX(-1); }

/* the reveal: both fists shake three times, then the real hands pop out */
.hand-shake { animation: pump .3s ease-in-out 3, vanish 0s .9s forwards; }
.hand-real { opacity: 0; animation: pop .45s cubic-bezier(.3,1.8,.5,1) .9s forwards; }
.fighter-left .hand-shake { animation-name: pump-flip, vanish; }
.fighter-left .hand-real { animation-name: pop-flip; }
.verdict, .fighter-name, .fighter-move { animation: fade-in .3s ease 1.15s both; }

@keyframes pump { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-22px) } }
@keyframes pump-flip { 0%, 100% { transform: scaleX(-1) translateY(0) } 50% { transform: scaleX(-1) translateY(-22px) } }
@keyframes vanish { to { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: scale(.3) rotate(-20deg) } to { opacity: 1; transform: scale(1) } }
@keyframes pop-flip { from { opacity: 0; transform: scaleX(-1) scale(.3) rotate(-20deg) } to { opacity: 1; transform: scaleX(-1) scale(1) } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes shake { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-14deg) } 75% { transform: rotate(14deg) } }

.no-anim .hand-shake { display: none; }
.no-anim .hand-real, .no-anim .verdict, .no-anim .fighter-name, .no-anim .fighter-move { animation: none; opacity: 1; }

.verdict h1 {
  font-size: 42px; font-weight: 900; letter-spacing: -0.045em; color: var(--tone);
}
.verdict p { color: var(--muted); margin-top: 6px; font-weight: 700; }

.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; top: 40%; left: 50%; width: 9px; height: 14px; border-radius: 3px;
  opacity: 0; animation: burst 1.2s cubic-bezier(.2,.7,.4,1) 1.1s forwards;
}
.confetti i:nth-child(4n+1) { background: var(--accent); }
.confetti i:nth-child(4n+2) { background: var(--pink); }
.confetti i:nth-child(4n+3) { background: var(--yellow); border-radius: 50%; width: 11px; height: 11px; }
.confetti i:nth-child(4n+4) { background: var(--violet); }
.confetti i:nth-child(1)  { --x: -150px; --y: -110px; --r: 200deg; }
.confetti i:nth-child(2)  { --x: 140px;  --y: -120px; --r: -160deg; }
.confetti i:nth-child(3)  { --x: -90px;  --y: -150px; --r: 300deg; }
.confetti i:nth-child(4)  { --x: 100px;  --y: -160px; --r: -250deg; }
.confetti i:nth-child(5)  { --x: -180px; --y: -40px;  --r: 120deg; }
.confetti i:nth-child(6)  { --x: 180px;  --y: -50px;  --r: -120deg; }
.confetti i:nth-child(7)  { --x: -40px;  --y: -170px; --r: 400deg; }
.confetti i:nth-child(8)  { --x: 40px;   --y: -175px; --r: -400deg; }
.confetti i:nth-child(9)  { --x: -130px; --y: 40px;   --r: 260deg; }
.confetti i:nth-child(10) { --x: 130px;  --y: 50px;   --r: -260deg; }
.confetti i:nth-child(11) { --x: -60px;  --y: 70px;   --r: 180deg; }
.confetti i:nth-child(12) { --x: 70px;   --y: 80px;   --r: -180deg; }
@keyframes burst {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0) }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) }
}

.rematch-banner, .schnickn-cta {
  flex-direction: row; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.rematch-banner:hover, .schnickn-cta:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow-lift); }
.rematch-banner > span:nth-child(2), .schnickn-cta > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.rematch-banner strong, .schnickn-cta strong { font-weight: 900; }
.rematch-banner > span:nth-child(2) > span, .schnickn-cta > span:nth-child(2) > span { color: var(--muted); font-size: 14px; }
.rematch-banner { background: var(--accent-soft); animation: rise .45s var(--spring) both, nudge 2s ease-in-out 1s infinite; }
.rematch-mine { animation: rise .45s var(--spring) both; }
@keyframes nudge { 0%, 90%, 100% { transform: none } 95% { transform: translateX(4px) } }
.rb-emoji, .cta-emoji {
  flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px;
  font-size: 26px; border-radius: 14px; background: var(--card); border: 2px solid var(--edge);
  transform: rotate(-5deg);
}
.cta-arrow {
  flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; font-weight: 900; color: var(--card); background: var(--ink);
  transition: transform .2s var(--spring);
}
.rematch-banner:hover .cta-arrow, .schnickn-cta:hover .cta-arrow { transform: translateX(4px) rotate(-8deg); }

.schnickn-cta {
  display: flex; border-radius: var(--radius); padding: 16px 16px; margin-top: 6px;
  color: #fff;
  background:
    radial-gradient(140px 90px at 100% 0%, rgb(255 255 255 / 0.25), transparent 70%),
    linear-gradient(120deg, #2a1640, #5b2a86 55%, #c2337a);
  border: 2px solid var(--edge); box-shadow: var(--shadow);
}
.schnickn-cta:hover { color: #fff; }
.schnickn-cta > span:nth-child(2) > span { color: rgb(255 255 255 / 0.78); }
.schnickn-cta .cta-emoji { background: rgb(255 255 255 / 0.14); border-color: rgb(255 255 255 / 0.35); }
.schnickn-cta .cta-arrow { background: #fff; color: #2a1640; }

/* --- profile --- */

.notice, .error { border-radius: 14px; padding: 12px 14px; font-weight: 800; margin: 0; border: 2px solid currentColor; }
.notice { background: var(--win-soft); color: var(--win); }
.error { background: var(--lose-soft); color: var(--lose); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  background: var(--card); border-radius: 20px; padding: 14px 6px 12px; text-align: center;
  border: 2px solid var(--edge); box-shadow: var(--shadow);
  display: flex; flex-direction: column; font-size: 13px; font-weight: 800; color: var(--muted);
  animation: rise .45s var(--spring) both;
}
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .1s; }
.stat-n { font-size: 34px; font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-win { background: var(--win-soft); }
.stat-lose { background: var(--lose-soft); }
.stat-draw { background: var(--draw-soft); }
.stat-win .stat-n { color: var(--win); }
.stat-lose .stat-n { color: var(--lose); }
.stat-draw .stat-n { color: var(--draw); }

.name-card { flex-direction: row; align-items: flex-end; gap: 10px; }
.name-card .name-field { flex: 1; min-width: 0; }
.name-card .btn { padding: 11px 16px; }
.words-card.secured { background: linear-gradient(160deg, var(--win-soft), var(--card) 60%); }
.words-card form { margin: 0; }

.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--card); border-radius: 16px;
  border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.history-item:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--drop); }
.hi-hands { font-size: 24px; white-space: nowrap; }
.hi-hands small { font-size: 11px; color: var(--muted); font-weight: 900; margin: 0 4px; vertical-align: middle; font-style: italic; }
.hi-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hi-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.hi-text small { color: var(--muted); font-weight: 600; }
.hi-badge { font-size: 12px; font-weight: 900; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 2px solid currentColor; }
.history-win .hi-badge { background: var(--win-soft); color: var(--win); }
.history-lose .hi-badge { background: var(--lose-soft); color: var(--lose); }
.history-draw .hi-badge { background: var(--draw-soft); color: var(--draw); }

.empty { text-align: center; align-items: center; }
.empty-emoji {
  display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto;
  font-size: 44px; line-height: 1; border-radius: 24px;
  background: var(--accent-soft); border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  transform: rotate(-6deg);
}

.word-grid {
  list-style: none; margin: 0; padding: 0; counter-reset: w;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.word {
  counter-increment: w; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px;
  border: 2px solid var(--edge); box-shadow: 2px 2px 0 var(--drop);
  font-weight: 900; font-size: 18px; letter-spacing: .01em;
}
.word:nth-child(3n+2) { background: var(--scissors-soft); }
.word:nth-child(3n+3) { background: var(--rock-soft); }
.word::before { content: counter(w); color: var(--accent-deep); font-size: 12px; margin-right: 10px; opacity: .9; }

/* --- legal --- */

.legal h2 { font-size: 19px; font-weight: 900; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--ink); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal mark { background: #ffe066; color: #000; padding: 0 4px; border-radius: 4px; }
code { font-size: .9em; background: var(--accent-soft); padding: 1px 5px; border-radius: 6px; }

/* --- footer --- */

.footer { margin-top: 48px; text-align: center; font-size: 13px; color: var(--muted); }
.footer p { margin: 0; font-weight: 600; }
/* legally required, but kept quiet: small, light, no bold */
.legal-links { display: flex; justify-content: center; gap: 8px; margin-top: 8px; font-size: 11px; opacity: .7; }
.legal-links a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color .15s ease; }
.legal-links a:hover { color: var(--pink); opacity: 1; }

@media (min-width: 560px) {
  .shell { padding-top: 26px; }
  .card { padding: 26px 26px; }
}

/* --- game wrapper --- */

.game { display: flex; flex-direction: column; gap: 20px; }

/* --- start page: pick a hand, then whom to challenge --- */

.move-pick { position: relative; }
.move-pick input { position: absolute; opacity: 0; pointer-events: none; }
.move-pick:has(input:checked) {
  background: var(--c); color: #fff;
  transform: translateY(-5px) rotate(-2deg); box-shadow: 0 9px 0 var(--drop);
}
.move-pick:has(input:checked)::after {
  content: "✓"; position: absolute; top: -10px; right: -8px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 900; color: var(--card); background: var(--ink);
  border: 2px solid var(--card);
  animation: pop .3s var(--spring) both;
}
.move-pick:has(input:checked) .move-emoji { transform: rotate(-14deg) scale(1.18); }
.move-pick:has(input:focus-visible) { outline: 3px solid var(--c); outline-offset: 3px; }
.pick-card:has(input:checked) .move-pick:not(:has(input:checked)) { opacity: .5; transform: scale(.96); }

.start { display: flex; flex-direction: column; gap: 14px; animation: rise .4s var(--spring) both; }
/* The rest only shows up once a hand is picked. Browsers without :has see it right away. */
@supports selector(:has(*)) {
  .pick-card:not(:has(.move-pick input:checked)) .start { display: none; }
}
.playing-as { color: var(--muted); font-size: 14px; font-weight: 600; }
.playing-as b { color: var(--ink); font-weight: 900; }

.start-buttons { display: grid; gap: 12px; }
.start-btn {
  appearance: none; cursor: pointer; font: inherit; text-align: left;
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px; border: 2px solid var(--edge);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.start-btn > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.start-btn b { font-size: 16.5px; font-weight: 900; }
.start-btn small { font-size: 12.5px; line-height: 1.3; opacity: .85; font-weight: 600; }
.start-emoji {
  flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px;
  font-size: 24px; line-height: 1; border-radius: 12px; background: rgb(255 255 255 / 0.22);
}
.start-duel { background: var(--grad); color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / 0.15); }
.start-group { background: var(--card); color: var(--ink); }
.start-group .start-emoji { background: var(--rock-soft); }
.start-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--drop); }
.start-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--drop); }
.start-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
form.sending .start-btn { opacity: .45; pointer-events: none; }
form.sending .start-btn.chosen { opacity: 1; }
form.sending .start-btn.chosen .start-emoji { animation: shake .3s ease-in-out infinite; }

/* --- closed banner: the link reached someone who cannot play any more --- */

.closed-banner {
  display: flex; flex-direction: column; gap: 16px;
  background:
    radial-gradient(200px 120px at 100% 0%, rgb(255 255 255 / 0.18), transparent 70%),
    linear-gradient(130deg, #ff6a1a, #ff3d7f);
  color: #fff; border-radius: var(--radius); padding: 22px 20px;
  border: 2px solid var(--edge); box-shadow: var(--shadow);
  animation: rise .45s var(--spring) both, wobble .6s ease .45s both;
}
.cb-top { display: flex; gap: 14px; align-items: flex-start; }
.cb-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 28px;
  background: rgb(255 255 255 / 0.2); border: 2px solid rgb(255 255 255 / 0.4);
  transform: rotate(-6deg);
}
.closed-banner h1 { font-size: 24px; font-weight: 900; color: #fff; }
.closed-banner p { margin: 6px 0 0; color: rgb(255 255 255 / 0.9); font-size: 15px; font-weight: 600; }
.btn-light { background: #fff; color: #1d1410; }
.btn-light:hover { color: #1d1410; background: #fff3ea; }
@keyframes wobble { 0%, 100% { transform: none } 30% { transform: rotate(-1deg) } 60% { transform: rotate(.7deg) } }

/* --- group: invitation and board --- */

.joined {
  display: inline-flex; gap: 8px; align-items: center; margin: 14px auto 0;
  padding: 6px 14px; border-radius: 999px; background: var(--card);
  border: 2px solid var(--edge); box-shadow: var(--shadow-sm);
  font-weight: 800; font-size: 14px;
}
.board-head { display: flex; flex-direction: column; gap: 8px; }
.scoreline {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; background: #1d1410; color: #fff;
}
.scoreline b {
  font-size: 32px; font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sl-side { font-weight: 900; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.sl-side span { font-size: 22px; }

.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border-radius: 14px; background: var(--bg); border: 2px solid var(--line);
}
.row-move { font-size: 24px; }
.row-name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name small { color: var(--muted); font-weight: 600; }
.row-badge { font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; }
.row-win .row-badge { background: var(--win-soft); color: var(--win); }
.row-lose .row-badge { background: var(--lose-soft); color: var(--lose); }
.row-draw .row-badge { background: var(--draw-soft); color: var(--draw); }
.row-me { border-color: var(--edge); box-shadow: 2px 2px 0 var(--drop); }
.row-new { animation: flash 1.6s ease; }
@keyframes flash { 0% { background: var(--accent-soft); transform: scale(1.03) } 100% { background: var(--bg); transform: none } }

.round-over .card-title { font-size: 25px; }
.close-form { margin: 0; }

.report-line { text-align: center; margin: 4px 0 0; font-size: 13px; }
.report-line a { color: var(--muted); }
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.report-row { display: flex; align-items: center; gap: 10px; margin: 0; }
.report-row .btn { padding: 9px 14px; }
.delete-form { margin: 0; }
.delete-form .btn { color: var(--lose); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .hand-shake, .confetti { display: none; }
  .hand-real, .verdict, .fighter-name, .fighter-move { animation: none !important; opacity: 1; }
}
