/* ============================================================
   Splixo — mobil-első UI
   Paletta: meleg krém + mélyzöld tenger + naplemente korall
   ============================================================ */

:root {
  --paper: #FBF2E4;
  --paper-deep: #F3E6D2;
  --card: #FFFFFF;
  --ink: #2A1B0E;
  --ink-soft: #8A7560;
  --line: #EADDC8;

  --sea: #16342E;
  --sea-mid: #1E5B4A;
  --mint: #D9EFE2;

  --coral: #FF5024;
  --coral-soft: #FFE3D8;
  --sun: #FFC53D;
  --rose: #E23D66;

  --pos: #12835E;
  --neg: #D63A1A;

  --grad-sunset: linear-gradient(135deg, #FFB03A 0%, #FF5024 55%, #E23D66 100%);
  --grad-sea: linear-gradient(160deg, #1E5B4A 0%, #16342E 70%);

  --radius: 20px;
  --shadow: 0 10px 30px rgba(42, 27, 14, 0.10);
  --font-ui: "Schibsted Grotesk", system-ui, sans-serif;
  --font-display: "Unbounded", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--sea);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- Telefonkeret ---------- */

.phone {
  position: relative;
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.desktop-stage { display: none; }

.desktop-side { display: none; }

/* Asztali nézet: a telefon mindig középen */
@media (min-width: 760px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(255, 176, 58, 0.18), transparent 60%),
      radial-gradient(900px 500px at 10% 110%, rgba(226, 61, 102, 0.14), transparent 60%),
      var(--grad-sea);
    min-height: 100vh;
    padding: 32px;
  }
  .stage-logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 56px;
    letter-spacing: -0.02em;
    background: var(--grad-sunset);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .stage-tag {
    margin-top: 14px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 26px;
    line-height: 1.35;
    color: #F7EEDC;
  }
  .stage-note { margin-top: 22px; color: rgba(247, 238, 220, 0.55); font-size: 15px; }
  .phone {
    width: 402px;
    height: min(94vh, 860px);
    border-radius: 42px;
    border: 6px solid #0C1F1B;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    flex: none;
  }
}

/* Széles képernyőn: szöveg balra, telefon középen, szöveg jobbra */
@media (min-width: 1080px) {
  body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 402px minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(40px, 5vw, 88px);
  }
  .desktop-stage, .desktop-side { display: block; max-width: 360px; }
  .desktop-stage { justify-self: end; }
  .desktop-side { justify-self: start; }
}
@media (min-width: 1080px) and (max-width: 1279px) {
  .stage-logo { font-size: 44px !important; }
  .stage-tag { font-size: 21px !important; }
}

/* Jobb oldali oszlop: hogyan működik */
.side-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sun);
}
.side-steps {
  list-style: none;
  margin-top: 16px;
  counter-reset: step;
}
.side-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
  color: #F7EEDC;
}
.side-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(247, 238, 220, 0.1);
  border: 1.5px solid rgba(247, 238, 220, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--sun);
}
.side-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 4px;
  width: 2px;
  background: rgba(247, 238, 220, 0.12);
}
.side-steps b { display: block; font-size: 17px; font-weight: 800; }
.side-steps span { display: block; font-size: 14.5px; color: rgba(247, 238, 220, 0.62); margin-top: 2px; line-height: 1.45; }
.side-example {
  margin-top: 4px;
  background: rgba(247, 238, 220, 0.07);
  border: 1.5px solid rgba(247, 238, 220, 0.14);
  border-radius: 18px;
  padding: 14px 16px;
  color: rgba(247, 238, 220, 0.8);
  font-size: 14.5px;
  line-height: 1.5;
}
.side-example b { color: #F7EEDC; }
.side-example .hl { color: var(--sun); font-weight: 800; }
.side-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.side-chips span {
  font-size: 13px;
  font-weight: 700;
  color: var(--sea);
  background: var(--mint);
  padding: 5px 12px;
  border-radius: 999px;
}

.app {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.app::-webkit-scrollbar { display: none; }

/* ---------- Gombok ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(255, 80, 36, 0.35); }
.btn-dark { background: var(--sea); color: #F7EEDC; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-small { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 14px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- Lebegő címkés mező (Revolut-stílus) ---------- */

.field { position: relative; display: block; }
.field + .field { margin-top: 12px; }

.field input, .field select {
  width: 100%;
  padding: 26px 18px 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.15s ease;
  appearance: none;
}
.field input:focus, .field select:focus { border-color: var(--coral); }

.field .field-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--ink-soft);
  pointer-events: none;
  transition: all 0.15s ease;
}

/* fókuszban vagy kitöltve: a címke felcsúszik… */
.field input:focus ~ .field-label,
.field input:not(:placeholder-shown) ~ .field-label,
.field select:focus ~ .field-label,
.field select.has-value ~ .field-label {
  top: 15px;
  transform: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--coral);
}

/* …és halványan megjelenik a súgószöveg */
.field input::placeholder { color: transparent; transition: color 0.15s ease; }
.field input:focus::placeholder { color: #C5B39E; }

/* ---------- Nyitóképernyő ---------- */

.welcome {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(100% 55% at 88% 0%, rgba(255, 176, 58, 0.30), transparent 60%),
    radial-gradient(80% 40% at 0% 100%, rgba(226, 61, 102, 0.22), transparent 60%),
    var(--grad-sea);
  color: #F7EEDC;
  padding: 0 26px calc(28px + env(safe-area-inset-bottom));
}

.w-sun {
  position: absolute;
  top: -74px;
  right: -58px;
  width: 215px;
  height: 215px;
  border-radius: 50%;
  background: var(--grad-sunset);
  box-shadow: 0 0 90px 34px rgba(255, 120, 40, 0.32);
}

.w-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* Csoportchat-részlet */
.w-chat {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.w-bubble {
  max-width: 82%;
  padding: 11px 15px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  animation: bubble-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
.w-bubble.left {
  align-self: flex-start;
  background: rgba(247, 238, 220, 0.14);
  color: #F7EEDC;
  border-radius: 18px 18px 18px 5px;
}
.w-bubble.right {
  align-self: flex-end;
  background: var(--coral);
  color: #fff;
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 8px 20px rgba(255, 80, 36, 0.3);
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Punchline */
.w-punch {
  margin-top: 34px;
  opacity: 0;
  animation: bubble-in 0.45s ease-out 1.4s forwards;
}
.w-nogond {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: rgba(247, 238, 220, 0.85);
}
.w-brand {
  display: block;
  margin: 2px 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: var(--grad-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 110, 40, 0.3));
}
.w-after {
  display: block;
  font-size: 15.5px;
  line-height: 1.45;
  color: rgba(247, 238, 220, 0.65);
  max-width: 300px;
}

.w-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-outline-light {
  background: transparent;
  color: #F7EEDC;
  border: 2px solid rgba(247, 238, 220, 0.38);
}

.w-install {
  margin-top: 4px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(247, 238, 220, 0.62);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(247, 238, 220, 0.3);
}
.w-install:active { color: rgba(247, 238, 220, 0.9); }

/* Auth űrlap (bottom sheetben nyílik) */

.auth-tabs {
  display: flex;
  background: var(--paper-deep);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
}
.auth-tabs button.active { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(42, 27, 14, 0.08); }

.form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #FFE1DA;
  color: var(--neg);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.form-error.visible { display: block; }

/* ---------- Fejléc / főoldal ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 6px;
}
.topbar .hello { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.topbar .hello-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-top: 2px; }

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  color: #fff;
  flex: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }

.home-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 4px;
}
.home-actions .btn { font-size: 15px; padding: 14px 10px; }

.section-title {
  padding: 22px 22px 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.group-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }

.group-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease;
}
.group-card:active { transform: scale(0.98); }
.group-emoji {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex: none;
}
.group-card .g-name { font-weight: 800; font-size: 16px; }
.group-card .g-meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.group-card .g-balance { margin-left: auto; text-align: right; }
.g-balance .amount { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.g-balance .label { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.amount.pos { color: var(--pos); }
.amount.neg { color: var(--neg); }
.amount.zero { color: var(--ink-soft); }

.empty {
  margin: 26px 22px;
  padding: 34px 24px;
  text-align: center;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: 24px;
}
.empty .big { font-size: 44px; }
.empty h3 { font-size: 17px; margin-top: 12px; }
.empty p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

/* ---------- Jelzések: új tételek, emlékeztetők ---------- */

.new-badge {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 2px;
}
.new-chip {
  display: inline-block;
  background: var(--sun);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 5px;
  vertical-align: 2px;
}

.nudge-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 13px 14px;
  background: #FFF3D1;
  border: 2px solid rgba(255, 197, 61, 0.7);
  border-radius: var(--radius);
  cursor: pointer;
}
.nudge-card .n-emoji { font-size: 24px; }
.nudge-card .n-text { font-size: 13.5px; line-height: 1.45; }
.nudge-card .n-close {
  flex: none;
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 13px;
}
.nudge-card .n-close:active { background: rgba(0, 0, 0, 0.08); }

.btn-nudge { background: rgba(255, 255, 255, 0.14); color: #F7EEDC; }

/* ---------- Egyéni elosztás ---------- */

.custom-panel { margin-top: 6px; }
.custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.custom-row .c-name { font-weight: 700; font-size: 14px; }
.custom-row .custom-amt {
  margin-left: auto;
  width: 96px;
  padding: 10px 12px;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
}
.custom-row .custom-amt:focus { border-color: var(--coral); }
.custom-row .c-cur { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.custom-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 2px;
}
.custom-sum { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.custom-sum.ok { color: var(--pos); }
.redistribute {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px;
}

/* ---------- Csoportbeállítások ---------- */

.hero-tools { display: flex; gap: 8px; }

.members-list { display: flex; flex-direction: column; gap: 4px; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
}
.member-row .m-name { font-weight: 700; font-size: 14.5px; }
.owner-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sea-mid);
  background: var(--mint);
  padding: 3px 9px;
  border-radius: 999px;
}
.chip[disabled] { opacity: 0.55; pointer-events: none; }

.vm-form { display: flex; gap: 8px; align-items: stretch; margin-top: 10px; }
.vm-form .field { flex: 1; }
.vm-form .btn { width: auto; padding: 10px 14px; font-size: 14px; margin: 0; flex: none; }
.member-row .vm-del {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 13px;
  flex: none;
}
.member-row .vm-del:active { background: var(--paper-deep); }
.member-row .owner-tag ~ .vm-del { margin-left: 8px; }
.member-row .owner-tag { margin-left: auto; }

/* ---------- Fun badge-ek ---------- */

.badge-chip {
  display: inline-block;
  font-size: 15px;
  margin-left: 5px;
  vertical-align: -1px;
  transition: transform 0.1s ease;
}
.badge-chip:active { transform: scale(1.3); }
.badge-big { font-size: 56px; text-align: center; padding: 8px 0 4px; }

/* ---------- Nézet pénznem ---------- */

.view-note {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- "Ki fizet?" játékok ---------- */

.whopays {
  padding: 10px 16px 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease;
}
.game-card:active { transform: scale(0.98); }
.game-emoji {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 27px;
  flex: none;
}
.game-title { font-weight: 800; font-size: 15.5px; }
.game-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; line-height: 1.4; }
.whopays-hint {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  padding: 8px 14px 0;
  line-height: 1.5;
}

/* Ujj-sorsoló */

.finger-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  background:
    radial-gradient(90% 50% at 85% 0%, rgba(255, 176, 58, 0.18), transparent 60%),
    var(--grad-sea);
  display: flex;
  flex-direction: column;
  touch-action: none;
  overscroll-behavior: contain;
}
.fp-text {
  text-align: center;
  color: #F7EEDC;
  font-weight: 700;
  font-size: 18px;
  padding: 64px 30px 0;
  line-height: 1.5;
  pointer-events: none;
}
.fp-text span { font-size: 13.5px; font-weight: 600; opacity: 0.6; }
.fp-text b { font-family: var(--font-display); font-size: 26px; color: var(--sun); }
.fp-stage { position: absolute; inset: 0; }
.fp-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #F7EEDC;
  font-size: 17px;
}
.fp-again {
  position: absolute;
  left: 24px; right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: auto;
  z-index: 2;
}
.fp-circle {
  position: absolute;
  width: 86px; height: 86px;
  border-radius: 50%;
  border: 6px solid var(--c);
  background: color-mix(in srgb, var(--c) 25%, transparent);
  transform: translate(-50%, -50%);
  animation: fp-pulse 1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); }
  50% { box-shadow: 0 0 0 16px transparent; }
}
.fp-circle.fp-winner {
  animation: fp-win 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
  background: var(--c);
  z-index: 2;
}
@keyframes fp-win {
  to { transform: translate(-50%, -50%) scale(1.7); box-shadow: 0 0 60px 10px color-mix(in srgb, var(--c) 60%, transparent); }
}
.fp-circle.fp-loser { opacity: 0; transition: opacity 0.5s ease; animation: none; }

/* Lufi-rulett */

.balloon-stage {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.balloon {
  font-size: 72px;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  will-change: transform;
}
.balloon.wobble { animation: balloon-wobble 0.35s ease; }
@keyframes balloon-wobble {
  0%, 100% { rotate: 0deg; }
  30% { rotate: -7deg; }
  65% { rotate: 6deg; }
}
.balloon.popped { animation: balloon-pop 0.4s ease; }
@keyframes balloon-pop {
  0% { filter: brightness(2); }
  100% { filter: none; }
}
.balloon-status {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 0 2px;
  min-height: 40px;
}

/* ---------- "Megérte?" értékelés ---------- */

.rate-pill {
  display: inline-block;
  background: var(--paper-deep);
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
}
.rate-row {
  display: flex;
  gap: 8px;
  padding: 6px 0 2px;
}
.rate-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px 9px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  transition: all 0.12s ease;
}
.rate-btn:active { transform: scale(0.94); }
.rate-btn.selected { border-color: var(--coral); background: var(--coral-soft); }
.rate-emoji { font-size: 24px; }
.rate-num { font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }

/* ---------- Nagy belépőkód ---------- */

.big-code {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  letter-spacing: 0.18em;
  color: var(--sea);
  background: var(--mint);
  border: 2.5px dashed var(--sea-mid);
  border-radius: 20px;
  padding: 20px 10px;
  margin: 6px 0 4px;
}

/* ---------- Szerencsekerék ---------- */

.wheel-wrap {
  position: relative;
  width: 240px;
  margin: 14px auto 6px;
}
.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  color: var(--ink);
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.wheel {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 6px solid var(--sea);
  box-shadow: 0 14px 34px rgba(42, 27, 14, 0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  position: relative;
  transition: transform 6s cubic-bezier(0.08, 0.8, 0.1, 1);
  will-change: transform;
}
.wheel-label {
  position: absolute;
  inset: 0;
  text-align: center;
  pointer-events: none;
}
.wheel-label i {
  display: inline-block;
  margin-top: 14px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wheel-result {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  padding: 14px 0 2px;
  min-height: 44px;
}
.wheel-result.pop { animation: result-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes result-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Telepítő kártya (PWA) ---------- */

.install-card {
  margin: 16px 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--mint);
  border: 2px solid rgba(30, 91, 74, 0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.install-card .install-icon { font-size: 28px; }
.install-card .i-title { font-weight: 800; font-size: 14.5px; color: var(--sea); }
.install-card .i-sub { font-size: 12.5px; color: var(--sea-mid); margin-top: 2px; }
.install-card .btn { flex: none; margin-left: auto; }

/* ---------- Hirdetés ---------- */

.ad-card {
  margin: 16px 16px 8px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.ad-kicker {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.28);
  padding: 3px 8px;
  border-radius: 999px;
}
.ad-banner {
  height: 84px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  color: #fff;
}
.ad-banner .ad-emoji { font-size: 32px; }
.ad-banner .ad-title { font-weight: 800; font-size: 15px; }
.ad-banner .ad-sub { font-size: 12.5px; opacity: 0.9; margin-top: 2px; }

/* ---------- Csoport képernyő ---------- */

.group-hero {
  background:
    radial-gradient(120% 90% at 90% -20%, rgba(255, 197, 61, 0.45), transparent 55%),
    var(--grad-sunset);
  color: #fff;
  padding: 16px 20px 22px;
  border-radius: 0 0 28px 28px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
}
.hero-title {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-title .emoji { font-size: 34px; }
.hero-title h1 { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; }
.hero-stats { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.88); font-weight: 600; }

.code-chip {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.code-chip .code { font-family: var(--font-display); letter-spacing: 0.15em; }

.tabs {
  display: flex;
  margin: 16px 16px 4px;
  background: var(--paper-deep);
  border-radius: 14px;
  padding: 4px;
}
.tabs button {
  flex: 1;
  padding: 10px 4px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--ink-soft);
}
.tabs button.active { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(42, 27, 14, 0.08); }

/* Feed */

.feed { padding: 8px 16px 110px; display: flex; flex-direction: column; gap: 8px; }

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: 0 4px 14px rgba(42, 27, 14, 0.06);
}
.feed-emoji {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex: none;
}
.feed-item .f-title { font-weight: 700; font-size: 15px; }
.feed-item .f-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.feed-item .f-amount {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.feed-item .f-del {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 13px;
}
.feed-item .f-del:active { background: var(--paper-deep); }

.feed-item.ratable { cursor: pointer; }
.feed-item.ratable:active { transform: scale(0.985); }
.feed-item.payment { background: var(--mint); box-shadow: none; }
.feed-item.payment .feed-emoji { background: rgba(255, 255, 255, 0.7); }

.day-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 6px 2px;
}

/* Egyenlegek */

.balances { padding: 8px 16px 110px; display: flex; flex-direction: column; gap: 10px; }

.balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: 0 4px 14px rgba(42, 27, 14, 0.06);
}
.balance-row .b-name { font-weight: 700; font-size: 15px; }
.balance-row .b-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.balance-row .b-amount {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.settle-card {
  background: var(--sea);
  color: #F7EEDC;
  border-radius: 20px;
  padding: 16px;
}
.settle-card .s-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.settle-card .s-amount {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--sun);
}
.settle-card .s-actions { display: flex; gap: 8px; margin-top: 14px; }
.settle-card .s-actions .btn { padding: 11px 14px; font-size: 14px; border-radius: 13px; }
.btn-revolut { background: #fff; color: #16342E; }
.btn-done { background: var(--coral); color: #fff; }

.all-settled {
  text-align: center;
  padding: 32px 20px;
  background: var(--mint);
  border-radius: 24px;
}
.all-settled .big { font-size: 42px; }
.all-settled h3 { margin-top: 10px; font-size: 17px; color: var(--sea); }
.all-settled p { margin-top: 4px; font-size: 14px; color: var(--sea-mid); }

/* FAB */

.fab {
  position: absolute;
  right: 20px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 60px; height: 60px;
  border-radius: 22px;
  background: var(--coral);
  color: #fff;
  font-size: 30px;
  font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(255, 80, 36, 0.45);
  z-index: 20;
  transition: transform 0.1s ease;
}
.fab:active { transform: scale(0.92); }

/* ---------- Bottom sheet ---------- */

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 52, 46, 0.5);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sheet-backdrop.open { opacity: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  transform: translateY(105%);
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  max-height: 88%;
  overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 42px; height: 5px;
  border-radius: 999px;
  background: var(--line);
  margin: 4px auto 14px;
}
.sheet h2 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 16px; }
.sheet .btn-primary { margin-top: 18px; }

.sheet-hint { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 10px; }

/* Összeg-mező a költés laphoz */
.amount-input {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 18px 0 8px;
}
.amount-input input {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  color: var(--ink);
  background: none;
  border: 0;
  outline: none;
  width: 200px;
  text-align: center;
}
.amount-input input::placeholder { color: var(--line); }
.amount-input .cur { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink-soft); }

.chip-row-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin: 16px 0 8px; }
.chip-row-label .label-soft { font-weight: 600; opacity: 0.75; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.12s ease;
}
.chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.chip.selected { border-color: var(--coral); background: var(--coral-soft); }
.chip.payer-selected { border-color: var(--sea); background: var(--mint); }

.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick {
  width: 44px; height: 44px;
  border-radius: 14px;
  font-size: 22px;
  background: var(--card);
  border: 2px solid var(--line);
}
.emoji-pick.selected { border-color: var(--coral); background: var(--coral-soft); }

/* Profil lap */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head .p-name { font-weight: 800; font-size: 17px; }
.profile-head .p-mail { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.sheet .btn-ghost { margin-top: 10px; }

/* ---------- Toast ---------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--sea);
  color: #F7EEDC;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.has-action {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast-action {
  background: var(--sun);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Betöltés */
.loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  animation: bob 1s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- SEO-kiegészítések ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* a nyitó alján: halk útmutató-linkek */
.w-links {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 12px;
}
.w-links a {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(247, 238, 220, 0.45);
  text-decoration: none;
}
.w-links a:active { color: rgba(247, 238, 220, 0.85); }
.w-actions a.btn { text-decoration: none; }

/* asztali díszlet: leírás + útmutatók */
.stage-desc {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(247, 238, 220, 0.75);
}
.stage-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stage-links a {
  font-size: 13.5px;
  font-weight: 700;
  color: #F7EEDC;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(247, 238, 220, 0.25);
  transition: background 0.15s ease;
}
.stage-links a:hover { background: rgba(247, 238, 220, 0.1); }

/* valódi AdSense-hely */
.ad-card.ad-real { padding: 8px 10px 10px; min-height: 100px; }
.ad-card.ad-real .ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
