/* ==========================================================
   Pe bune? — stiluri
   ========================================================== */

:root {
  --bg: #FBF3EC;
  --card: #FFFCF9;
  --ink: #2B1621;
  --ink-2: #725963;
  --ink-3: #A08890;
  --line: rgba(43, 22, 33, .08);

  --a1: #EE6A7C;
  --a2: #B8325A;
  --soft: #FCE3E6;
  --glow1: rgba(238, 106, 124, .20);
  --glow2: rgba(255, 179, 104, .18);
  --glow3: rgba(128, 92, 190, .12);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-sm: 0 1px 2px rgba(70, 20, 35, .05), 0 8px 24px -14px rgba(110, 40, 60, .28);
  --pad: 20px;
}

body[data-tema="cupluri"], .daily[data-tema="cupluri"] {
  --a1: #F07482; --a2: #BE3159; --soft: #FDE4E7;
  --glow1: rgba(240, 116, 130, .24); --glow2: rgba(255, 168, 140, .18); --glow3: rgba(190, 49, 89, .10);
}
body[data-tema="fara-filtru"], .daily[data-tema="fara-filtru"] {
  --bg: #F7F2F7;
  --a1: #9271CF; --a2: #4A2C80; --soft: #EEE6F8;
  --glow1: rgba(146, 113, 207, .22); --glow2: rgba(240, 140, 170, .14); --glow3: rgba(74, 44, 128, .14);
}
body[data-tema="joker"], .daily[data-tema="joker"] {
  --bg: #FCF4EA;
  --a1: #FFA94A; --a2: #E0543A; --soft: #FFEAD4;
  --glow1: rgba(255, 169, 74, .26); --glow2: rgba(240, 100, 110, .14); --glow3: rgba(255, 210, 120, .22);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .6s var(--ease);
}

/* fundal cald, cu lumini difuze */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at -5% -5%, var(--glow1), transparent 70%),
    radial-gradient(55% 40% at 105% 15%, var(--glow2), transparent 70%),
    radial-gradient(70% 45% at 50% 110%, var(--glow3), transparent 70%);
}

a { color: inherit; }
button { font: inherit; color: inherit; }
a, button { touch-action: manipulation; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--a2) 55%, transparent);
  outline-offset: 3px;
  border-radius: 12px;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.ic { width: 22px; height: 22px; flex: none; }

/* ---------- Tranziții între ecrane ---------- */

.view {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.view-fwd  { animation: in-fwd .5s var(--ease) both; }
.view-back { animation: in-back .5s var(--ease) both; }
.view-fade { animation: in-fade .5s var(--ease) both; }

@keyframes in-fwd  { from { opacity: 0; transform: translateX(28px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-28px); } }
@keyframes in-fade { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise    { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------- Bara de sus ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-bottom: 6px;
}

.icon-btn {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn.ghost { visibility: hidden; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -.01em;
}
.logo { width: 38px; height: 38px; filter: drop-shadow(0 6px 10px rgba(184, 50, 90, .25)); }

/* ---------- Acasă ---------- */

.hero { padding: 22px 0 22px; }

/* ---------- Întrebarea zilei ---------- */

.daily {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 20px 20px 16px;
  border-radius: 30px;
  background: var(--card);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--a1) 22%, transparent),
    0 24px 46px -24px color-mix(in srgb, var(--a2) 60%, transparent);
  animation: rise .7s var(--ease) both .08s;
}
.daily::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -45%;
  right: -30%;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soft), transparent 66%);
}
.daily::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
}

.daily-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.daily-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 99px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
}
.daily-label .ic { width: 15px; height: 15px; fill: currentColor; stroke-width: 1.5; }
.daily-date {
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

.daily-q {
  margin: 18px 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 7.2vw, 2.15rem);
  line-height: 1.17;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
.daily-q.mid  { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
.daily-q.long { font-size: clamp(1.3rem, 5.6vw, 1.7rem); }

.daily-foot {
  display: flex;
  align-items: center;
  gap: 4px;
}
.daily-go { flex: 1; height: 52px; margin-right: 6px; }
.daily-go .ic { width: 20px; height: 20px; }
.daily .card-btn { width: 48px; height: 48px; }

.daily-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 14px 2px 0;
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-3);
}
.daily-streak { font-weight: 700; color: var(--a2); }

.section-title {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--a2);
}

.hero h1, .page-hero h1, .cat-hero h1 {
  margin: .28em 0 .32em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 11.5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(120deg, #F07482, #B8325A 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

.lead {
  margin: 0;
  max-width: 36ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.cats { display: grid; gap: 14px; }

.cat-card {
  --c1: #F27C8A; --c2: #BE3159; --cs: rgba(190, 49, 89, .55);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 136px;
  padding: 22px 18px 22px 20px;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 20px 40px -20px var(--cs), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 80ms + 120ms);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cat-card[data-tema="fara-filtru"] { --c1: #9877D6; --c2: #45297A; --cs: rgba(69, 41, 122, .55); }
.cat-card[data-tema="joker"]       { --c1: #FFB04F; --c2: #E5583B; --cs: rgba(229, 88, 59, .55); }

.cat-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -60px;
  top: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .30), transparent 68%);
}
.cat-card:active { transform: scale(.975); }
@media (hover: hover) {
  .cat-card:hover { transform: translateY(-3px); box-shadow: 0 26px 46px -20px var(--cs), inset 0 1px 0 rgba(255,255,255,.25); }
  .deck-card:hover { transform: translateY(-2px); }
  .icon-btn:hover { background: #fff; }
}

.cat-icon {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, .2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.cat-icon svg { width: 28px; height: 28px; }

.cat-body { min-width: 0; }
.cat-body h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  letter-spacing: -.015em;
  line-height: 1.1;
}
.cat-body p {
  margin: 0 0 12px;
  font-size: .95rem;
  line-height: 1.4;
  opacity: .93;
}
.meta {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  background: rgba(255, 255, 255, .22);
}
.cat-arrow { margin-left: auto; opacity: .85; flex: none; }

/* card „Favoritele mele” pe pagina de start */
.fav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 16px 16px 16px 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 80ms + 120ms);
  transition: transform .3s var(--ease);
}
.fav-card:active { transform: scale(.98); }
.fav-ic {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #E0566E;
  background: #FDE4E7;
}
.fav-ic svg { width: 24px; height: 24px; }
.fav-card .chev { color: var(--ink-3); }

/* stare goală (fără favorite) */
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-bottom: 60px;
  text-align: center;
}
.empty h1 {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.2rem;
  letter-spacing: -.02em;
}
.empty .lead { margin-bottom: 20px; }
.empty .btn { min-width: 220px; }

.foot {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-3);
}

/* ---------- Categorie ---------- */

.cat-hero { padding: 10px 0 24px; }
.cat-badge {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 16px 30px -14px var(--a2);
  animation: rise .6s var(--ease) both;
}
.cat-badge svg { width: 30px; height: 30px; }
.cat-hero h1 { margin-top: .4em; }

.decks { display: grid; gap: 12px; }

.deck-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 16px 20px 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  animation: rise .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
  transition: transform .3s var(--ease);
}
.deck-card:active { transform: scale(.98); }

.deck-num {
  flex: none;
  width: 2.1ch;
  padding-top: 1px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--a2);
}
.deck-body { flex: 1; min-width: 0; }
.deck-body h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.deck-body p {
  margin: 0 0 12px;
  font-size: .95rem;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.deck-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: .76rem;
  font-weight: 700;
  background: rgba(43, 22, 33, .05);
  color: var(--ink-2);
}
.chip.accent { background: var(--soft); color: var(--a2); }
.deck-chev { align-self: center; color: var(--ink-3); }

/* ---------- Ecranul cu cărți ---------- */

.view-deck {
  height: 100dvh;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.deck-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  line-height: 1.2;
}
.deck-title small {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a2);
}
.deck-title strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
}

.progress { padding: 8px 2px 0; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
}
.progress-meta b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.bar {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(43, 22, 33, .08);
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  transition: width .55s var(--ease);
}

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 8px 22px;
}

.stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 560px;
}
.stack::before, .stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background: linear-gradient(150deg, var(--a1), var(--a2));
}
.stack::before { transform: rotate(-4.5deg) translate(-4px, 10px) scale(.96); opacity: .28; }
.stack::after  { transform: rotate(3deg) translate(3px, 5px) scale(.98); opacity: .55; }

.qcard {
  position: absolute;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 26px 22px;
  border-radius: 34px;
  background: var(--card);
  box-shadow:
    0 2px 6px rgba(80, 20, 40, .06),
    0 34px 60px -30px rgba(80, 20, 40, .5);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  will-change: transform;
}
.qcard:active { cursor: grabbing; }
.qcard::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -35%;
  right: -35%;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soft), transparent 66%);
}
.qcard::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -30%;
  left: -30%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--soft) 70%, transparent), transparent 66%);
}

.q-top, .q-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.pill {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--a2);
  background: var(--soft);
}
.q-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.q-text {
  flex: 1;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 14px 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 8.4vw, 2.55rem);
  line-height: 1.16;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
  color: var(--ink);
}
.q-text.mid  { font-size: clamp(1.55rem, 6.8vw, 2.15rem); }
.q-text.long { font-size: clamp(1.38rem, 6vw, 1.9rem); line-height: 1.2; }

.q-bottom {
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-3);
}
.q-deck {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* butoanele de pe card: distribuie + favorite */
.q-actions {
  flex: none;
  display: flex;
  margin: -12px -14px -12px 0;
}
.card-btn {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .25s, transform .25s var(--ease);
}
.card-btn svg { width: 24px; height: 24px; }
.fav-btn svg { width: 25px; height: 25px; }
.fav-btn.on { color: var(--a1); }
.card-btn:active { transform: scale(.85); }
.fav-btn.pop svg { animation: heart-pop .5s var(--ease); }
@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.top-actions { display: flex; gap: 8px; flex: none; }
.icon-btn.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 10px 20px -10px var(--a2);
}

.hint {
  min-height: 1.3em;
  margin: 0 0 14px;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-2);
  text-wrap: balance;
}

.controls {
  display: flex;
  gap: 12px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.ctrl {
  height: 62px;
  border: 0;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .25s var(--ease), opacity .25s, box-shadow .25s;
}
.ctrl:active:not(:disabled) { transform: scale(.95); }
.ctrl:disabled { opacity: .38; cursor: default; }
.ctrl.prev {
  width: 62px;
  flex: none;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.ctrl.next {
  flex: 1;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 16px 30px -14px var(--a2), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* final de pachet */
.end {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.end-badge {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 18px 30px -14px var(--a2);
  animation: pop .7s var(--ease) both .1s;
}
.end-badge svg { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } }
.end h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.1rem;
  letter-spacing: -.02em;
}
.end p {
  margin: 0 0 14px;
  max-width: 28ch;
  line-height: 1.5;
  color: var(--ink-2);
}
.end-actions { display: grid; gap: 10px; width: 100%; max-width: 280px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 14px 26px -14px var(--a2);
}
.btn.ghost { background: rgba(43, 22, 33, .06); color: var(--ink); }

/* ---------- Setări ---------- */

.page-hero { padding: 10px 0 18px; }

.list {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  animation: rise .6s var(--ease) both .1s;
}
.list + .list { animation-delay: .18s; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s;
}
.row + .row { border-top: 1px solid var(--line); }
.row:active { background: rgba(43, 22, 33, .04); }
.row-ic {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--a2);
  background: var(--soft);
}
.row-txt { flex: 1; min-width: 0; }
.row-txt strong { display: block; font-weight: 700; font-size: 1rem; }
.row-txt span { display: block; margin-top: 2px; font-size: .86rem; line-height: 1.35; color: var(--ink-2); }
.row .chev { color: var(--ink-3); }
.row.muted .row-ic { color: var(--ink-2); background: rgba(43, 22, 33, .06); }

.about {
  margin-top: auto;
  padding-top: 34px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.about .logo { width: 44px; height: 44px; }
.about strong { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); font-weight: 600; }

/* ---------- Fereastra „Distribuie întrebarea” ---------- */

dialog.sheet {
  width: min(100%, 520px);
  max-width: 100%;
  max-height: calc(100dvh - 16px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 30px 30px 0 0;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 -20px 60px -20px rgba(43, 22, 33, .35);
}
dialog.sheet:modal { overscroll-behavior: contain; }
dialog.sheet::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(43, 22, 33, .45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
dialog.sheet[open] { animation: sheet-up .45s var(--ease); }
dialog.sheet[open]::backdrop { animation: in-fade .3s ease; }
@keyframes sheet-up { from { transform: translateY(100%); } }

.sheet-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -.01em;
}
.sheet-head .icon-btn { width: 42px; height: 42px; box-shadow: none; background: rgba(43, 22, 33, .05); }
.sheet-sub { margin: -6px 0 2px; font-size: .92rem; color: var(--ink-2); }

.sheet-preview {
  position: relative;
  align-self: center;
  height: min(50dvh, 460px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 18px;
  background: var(--soft);
  box-shadow: 0 18px 40px -20px rgba(80, 20, 40, .5);
}
.sheet-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--a2);
}
.sheet-loading[hidden] { display: none; }
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--a2) 20%, transparent);
  border-top-color: var(--a2);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sheet-actions { display: grid; gap: 10px; }
.sheet-actions .btn { height: 54px; font-size: 1rem; }
.sheet-actions .btn[hidden] { display: none; }
.sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-row .btn { padding: 0 12px; font-size: .95rem; }
.sheet-row .ic { width: 20px; height: 20px; }
.btn:disabled { opacity: .5; cursor: default; }

@media (min-width: 600px) {
  dialog.sheet { margin: auto; border-radius: 30px; }
  dialog.sheet[open] { animation: in-fade .35s var(--ease); }
}

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

.toast {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 0;
  overflow: visible;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 40px);
  text-align: center;
  padding: 13px 20px;
  border-radius: 99px;
  font-size: .92rem;
  font-weight: 600;
  color: #fff;
  background: rgba(43, 22, 33, .92);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Ecrane mici / mari ---------- */

@media (max-height: 700px) {
  .topbar { min-height: 56px; }
  .stage { padding: 16px 6px 14px; }
  .qcard { padding: 20px 22px 18px; }
  .q-text { font-size: clamp(1.5rem, 6.8vw, 2.1rem); }
  .q-text.mid { font-size: clamp(1.38rem, 6.2vw, 1.9rem); }
  .q-text.long { font-size: clamp(1.25rem, 5.6vw, 1.7rem); }
  .ctrl { height: 56px; }
  .ctrl.prev { width: 56px; }
  .hint { margin-bottom: 10px; }
}

@media (max-width: 360px) {
  :root { --pad: 16px; }
  .cat-card { padding: 18px 14px 18px 16px; gap: 12px; }
  .cat-icon { width: 50px; height: 50px; border-radius: 17px; }
  .qcard { padding: 20px 20px 18px; }
}

@media (min-width: 700px) {
  .hero { padding-top: 48px; }
  .stage { padding-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}
