/* ============================================================
   Cable a Tierra — App
   Brand tokens inherited from 365-promesas-landing.liquid
   + Liquid Glass system
   ============================================================ */

:root {
  /* Brand palette (from landing) */
  --cat-ink: #292b33;
  --cat-ink-soft: #62677a;
  --cat-navy: #30384f;
  --cat-wine: #88444b;
  --cat-wine-deep: #70363d;
  --cat-terracotta: #c46f4e;
  --cat-terracotta-deep: #a9583c;
  --cat-gold: #b19467;
  --cat-gold-soft: #e7d4b8;
  --cat-sage: #78886a;
  --cat-sage-soft: #e8ede1;
  --cat-violet: #8a6bb1;
  --cat-cream: #f8f0e6;
  --cat-paper: #fffaf3;
  --cat-surface: #fffdf8;
  --cat-line: #e3d5c5;

  /* Emotion colors */
  --emo-anxious: var(--cat-sage);
  --emo-worried: var(--cat-terracotta);
  --emo-sad: var(--cat-navy);
  --emo-angry: var(--cat-wine);
  --emo-happy: var(--cat-gold);
  --emo-guilty: var(--cat-violet);

  /* Glass system */
  --glass-bg: rgba(255, 253, 248, 0.55);
  --glass-bg-strong: rgba(255, 253, 248, 0.74);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(129, 89, 62, 0.10);
  --glass-blur: 22px;
  --glass-shadow: 0 18px 50px rgba(61, 46, 36, 0.16);
  --glass-shadow-soft: 0 10px 30px rgba(61, 46, 36, 0.10);
  --glass-highlight: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.18);

  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --bg-1: #fffaf3;
  --bg-2: #f5e8d8;
  --text: var(--cat-ink);
  --text-soft: var(--cat-ink-soft);
  --title: var(--cat-navy);

  --ease: cubic-bezier(.22,.61,.36,1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark theme */
:root[data-theme="dark"] {
  --glass-bg: rgba(40, 44, 60, 0.52);
  --glass-bg-strong: rgba(44, 49, 66, 0.72);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-edge: rgba(0, 0, 0, 0.25);
  --glass-shadow: 0 18px 50px rgba(0,0,0,.45);
  --glass-shadow-soft: 0 10px 30px rgba(0,0,0,.35);
  --glass-highlight: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.20);
  --bg-1: #20243a;
  --bg-2: #161a2c;
  --text: #ece7df;
  --text-soft: #a9adbf;
  --title: #f3ede3;
  --cat-line: rgba(255,255,255,.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
.serif { font-family: "DM Serif Display", Georgia, serif; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ============ Ambient background ============ */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-1), var(--bg-2) 75%);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  animation: float 18s var(--ease) infinite alternate;
}
.orb-1 { width: 46vw; height: 46vw; left: -10vw; top: 2vh; background: radial-gradient(circle, var(--cat-terracotta), transparent 70%); }
.orb-2 { width: 50vw; height: 50vw; right: -14vw; top: 22vh; background: radial-gradient(circle, var(--cat-gold), transparent 70%); animation-delay: -6s; }
.orb-3 { width: 44vw; height: 44vw; left: 18vw; bottom: -12vh; background: radial-gradient(circle, var(--cat-sage), transparent 70%); animation-delay: -11s; }
.bg-grain {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(129,89,62,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129,89,62,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
          mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
:root[data-theme="dark"] .orb { opacity: .4; }
@keyframes float { to { transform: translate3d(4vw, 5vh, 0) scale(1.12); } }

/* ============ Glass primitives ============ */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
          backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  border-radius: var(--radius-lg);
}
.glass-inset {
  background: rgba(255,255,255,.30);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 2px 6px rgba(61,46,36,.08);
}
:root[data-theme="dark"] .glass-inset { background: rgba(255,255,255,.06); }

/* specular sheen on big glass cards */
.glass.sheen { position: relative; overflow: hidden; }
.glass.sheen::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(135deg, rgba(255,255,255,.45), transparent 38%);
  mix-blend-mode: screen; opacity:.6;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 26px; width: 100%;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
  color: #fff; background: var(--cat-terracotta);
  box-shadow: 0 10px 0 rgba(129,68,48,.13), 0 16px 26px rgba(196,111,78,.26), var(--glass-highlight);
  transition: transform .16s var(--ease), background .16s, box-shadow .16s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 6px 0 rgba(129,68,48,.13), 0 10px 18px rgba(196,111,78,.22); }
.btn-primary { background: linear-gradient(180deg, var(--cat-terracotta), var(--cat-terracotta-deep)); }
.btn-ghost {
  background: var(--glass-bg-strong); color: var(--title);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow-soft), var(--glass-highlight);
}
.btn-sm { min-height: 44px; font-size: 14px; padding: 0 18px; width: auto; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; color: var(--title);
  border: 1px solid var(--glass-border);
}
.icon-btn .ic { width: 20px; height: 20px; }

/* ---- Lucide icon sizing ---- */
.ic { width: 24px; height: 24px; flex: 0 0 auto; }
.ic-inline { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: 0 0 auto; }
.btn .ic-inline, .chip .ic-inline { width: 1.15em; height: 1.15em; }

/* ============ Access gate ============ */
.gate {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  padding-top: calc(24px + var(--safe-top));
}
.gate-card {
  width: min(100%, 420px); padding: 38px 28px 28px; text-align: center;
  border-radius: var(--radius-xl);
  animation: rise .6s var(--ease) both;
}
.gate-mark {
  width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--cat-terracotta), var(--cat-gold));
  box-shadow: 0 12px 26px rgba(196,111,78,.34), var(--glass-highlight);
  transform: rotate(-6deg);
}
.gate-title { font-size: 30px; color: var(--title); margin: 0 0 8px; }
.gate-sub { color: var(--text-soft); font-size: 15px; line-height: 1.55; margin: 0 0 22px; }
.gate-input {
  width: 100%; height: 56px; border-radius: var(--radius); margin-bottom: 12px;
  text-align: center; font-size: 18px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--title); outline: none;
}
.gate-input::placeholder { color: var(--text-soft); font-weight: 500; letter-spacing: .04em; text-transform: none; }
.gate-msg { min-height: 20px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.gate-msg.err { color: var(--cat-wine); }
.gate-msg.ok { color: var(--cat-sage); }
.gate-help { color: var(--text-soft); font-size: 13px; margin: 16px 0 0; }
.gate-lang { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.lang-pill {
  border: 1px solid var(--glass-edge); background: transparent; color: var(--text-soft);
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .1em;
}
.lang-pill.active { background: var(--cat-navy); color: #fff; border-color: transparent; }

/* ============ App shell ============ */
.app { min-height: 100dvh; padding-bottom: calc(112px + var(--safe-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(255,250,243,.7), rgba(255,250,243,0));
}
:root[data-theme="dark"] .topbar { background: linear-gradient(180deg, rgba(22,26,44,.7), transparent); }
.topbar-inner {
  max-width: 640px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(150deg, var(--cat-terracotta), var(--cat-gold));
  box-shadow: 0 2px 8px rgba(196,111,78,.5); }
.brand-name { font-weight: 800; color: var(--title); letter-spacing: -.01em; }

.screen { max-width: 640px; margin: 0 auto; padding: 8px 18px 20px; }
.screen-head { margin: 6px 2px 18px; }
.screen-title { font-size: 30px; color: var(--title); margin: 0; line-height: 1.1; }
.screen-sub { color: var(--text-soft); font-size: 15px; margin: 6px 0 0; line-height: 1.5; }
.view { animation: rise .45s var(--ease) both; }

/* ============ Tab bar (floating liquid glass) ============ */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--safe-bottom)); z-index: 40;
  width: min(100% - 20px, 480px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px; border-radius: 26px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 0; color: var(--text-soft);
  padding: 8px 2px 6px; border-radius: 18px; font-size: 10.5px; font-weight: 700;
  transition: color .2s, background .2s, transform .2s var(--ease);
}
.tab-ic { width: 22px; height: 22px; transition: transform .25s var(--ease); }
.tab.active { color: var(--cat-terracotta); background: rgba(196,111,78,.12); }
.tab.active .tab-ic { transform: translateY(-1px) scale(1.08); }
.tab:active { transform: scale(.92); }

/* ============ Verse card ============ */
.verse-card {
  padding: 26px 22px; border-radius: var(--radius-xl); position: relative;
  text-align: center; overflow: hidden;
}
.verse-quote { font-size: 13px; color: var(--cat-gold); }
.verse-text {
  font-family: "DM Serif Display", serif; color: var(--title);
  font-size: clamp(22px, 6vw, 30px); line-height: 1.32; margin: 14px 0 16px;
  text-wrap: balance;
}
.verse-text.sm { font-size: clamp(19px, 5vw, 24px); }
.verse-ref {
  display: inline-block; color: var(--cat-terracotta); font-weight: 700;
  font-size: 14px; letter-spacing: .04em;
}
.verse-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--title);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-soft), var(--glass-highlight);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .14s var(--ease), color .2s;
}
.chip:active { transform: scale(.94); }
.chip svg { width: 17px; height: 17px; }
.chip.is-saved { color: var(--cat-wine); }
.chip.is-saved svg { fill: var(--cat-wine); }

/* ============ Today ============ */
.today-greet { font-size: 15px; color: var(--text-soft); margin: 4px 2px 0; display: inline-flex; align-items: center; gap: 7px; }
.jar-hint { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.feel-back, #feel-another { display: inline-flex; align-items: center; gap: 6px; }
.today-date { font-size: 13px; color: var(--cat-gold); font-weight: 700; letter-spacing: .08em; text-transform: capitalize; margin: 2px 2px 16px; }
.today-label { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--cat-terracotta); margin-bottom: 4px; }
.devotional {
  padding: 24px 22px 26px; border-radius: var(--radius-xl); margin-bottom: 22px;
}
.dev-kicker {
  display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cat-gold); margin-bottom: 8px;
}
.dev-title {
  margin: 0 0 12px; color: var(--title); font-size: clamp(24px, 5.5vw, 30px); line-height: 1.14; text-wrap: balance;
}
.dev-body {
  color: var(--text); font-size: 16px; line-height: 1.78; white-space: pre-wrap;
}
.skel { display: block; height: 13px; border-radius: 6px; margin: 0 0 11px;
  background: linear-gradient(90deg, rgba(120,90,60,.07), rgba(120,90,60,.14), rgba(120,90,60,.07));
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel-title { height: 26px; width: 68%; margin-bottom: 16px; }
:root[data-theme="dark"] .skel { background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.13), rgba(255,255,255,.06)); background-size: 200% 100%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.coll-card.saved .coll-ic { background: linear-gradient(150deg, var(--cat-gold), var(--cat-terracotta)); }
.reflection {
  margin-top: 16px; padding: 18px 20px; border-radius: var(--radius-lg);
}
.reflection h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cat-sage); }
.reflection p { margin: 0; color: var(--text); line-height: 1.6; font-size: 15.5px; }
.streak {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  padding: 16px 18px; border-radius: var(--radius-lg);
}
.streak-num { font-family: "DM Serif Display", serif; font-size: 34px; color: var(--cat-terracotta); line-height: 1; }
.streak-txt { color: var(--text-soft); font-size: 14px; line-height: 1.35; }
.streak-flame { margin-left: auto; display: grid; place-items: center; }
.streak-flame .ic { width: 28px; height: 28px; color: var(--cat-terracotta); }

/* ============ Jar ============ */
.jar-wrap { text-align: center; padding: 14px 0 0; }
.jar {
  width: min(62vw, 250px); margin: 6px auto 10px; cursor: pointer;
  transition: transform .2s var(--ease);
  filter: drop-shadow(0 24px 34px rgba(61,46,36,.20));
}
.jar:active { transform: scale(.97); }
.jar.shake { animation: shake .55s var(--ease); transform-origin: 50% 90%; }
@keyframes shake {
  0%,100%{transform:rotate(0)} 18%{transform:rotate(-6deg)} 38%{transform:rotate(5deg)}
  58%{transform:rotate(-3.5deg)} 78%{transform:rotate(2.5deg)}
}
.jar-img { width: 100%; height: auto; display: block; -webkit-user-select: none; user-select: none; pointer-events: none; }
.jar-hint { color: var(--text-soft); font-size: 14px; font-weight: 600; margin-top: 6px; }
#jar-result { margin-top: 22px; min-height: 40px; }
#jar-result .verse-card { animation: pop .5s var(--ease) both; }
@keyframes pop { from { transform: scale(.9) translateY(14px); opacity: 0; } }

/* ============ Feelings ============ */
.emo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 6px; }
.emo {
  border: 1px solid color-mix(in srgb, var(--emo) 42%, var(--glass-border));
  border-radius: var(--radius-lg);
  padding: 24px 16px; text-align: center;
  color: color-mix(in srgb, var(--emo) 72%, var(--title));
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--emo) 30%, transparent), color-mix(in srgb, var(--emo) 12%, transparent)),
    var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--emo) 28%, transparent), var(--glass-highlight);
  transition: transform .16s var(--ease), box-shadow .2s; position: relative; overflow: hidden;
}
.emo:active { transform: scale(.95); }
.emo-face {
  width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--emo), color-mix(in srgb, var(--emo) 65%, #fff 0%));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--emo) 50%, transparent), var(--glass-highlight);
}
.emo-ic { width: 28px; height: 28px; }
.emo-name { font-weight: 700; font-size: 16px; color: var(--title); }

.feel-detail .verse-card::after { content:""; position:absolute; inset:0 0 auto 0; height:5px; background: var(--emo); }
.feel-back { margin-bottom: 14px; }
.prayer {
  margin-top: 14px; padding: 18px 20px; border-radius: var(--radius-lg);
  border-left: 4px solid var(--emo);
}
.prayer h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--emo); }
.prayer p { margin: 0; line-height: 1.6; font-size: 15px; color: var(--text); font-style: italic; }

/* ============ Collections ============ */
.coll-cards { display: grid; gap: 14px; margin-bottom: 22px; }
.coll-card {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  border-radius: var(--radius-lg); text-align: left; width: 100%;
  border: 1px solid var(--glass-border); color: var(--title);
  background: var(--glass-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow-soft), var(--glass-highlight);
  transition: transform .14s var(--ease);
}
.coll-card:active { transform: scale(.98); }
.coll-ic {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(150deg, var(--cat-terracotta), var(--cat-gold));
}
.coll-ic-svg { width: 24px; height: 24px; }
.coll-card.kids .coll-ic { background: linear-gradient(150deg, var(--cat-sage), var(--cat-gold-soft)); }
.coll-card.feel .coll-ic { background: linear-gradient(150deg, var(--cat-wine), var(--cat-violet)); }
.coll-meta h3 { margin: 0; font-size: 17px; }
.coll-meta p { margin: 3px 0 0; font-size: 13px; color: var(--text-soft); }
.coll-arrow { margin-left: auto; color: var(--text-soft); display: grid; place-items: center; }
.coll-arrow-svg { width: 20px; height: 20px; transform: rotate(180deg); }

.search-bar { position: relative; margin-bottom: 16px; }
.search-bar input {
  width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: var(--radius);
  font-size: 15px; color: var(--title); outline: none;
}
.search-bar input::placeholder { color: var(--text-soft); }
.search-bar svg { position: absolute; left: 14px; top: 15px; width: 20px; height: 20px; color: var(--text-soft); }

.verse-list { display: grid; gap: 12px; }
.vrow {
  padding: 16px 18px; border-radius: var(--radius-lg); position: relative;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow-soft), var(--glass-highlight);
  animation: rise .4s var(--ease) both;
}
.vrow p { margin: 0; font-family: "DM Serif Display", serif; color: var(--title); font-size: 18px; line-height: 1.35; }
.vrow .vrow-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.vrow .vrow-ref { color: var(--cat-terracotta); font-weight: 700; font-size: 13px; }
.vrow-acts { display: flex; gap: 8px; }
.iconmini {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--glass-edge); background: rgba(255,255,255,.4); color: var(--text-soft);
  transition: transform .12s var(--ease), color .2s;
}
:root[data-theme="dark"] .iconmini { background: rgba(255,255,255,.06); }
.iconmini:active { transform: scale(.9); }
.iconmini svg { width: 17px; height: 17px; }
.iconmini.on { color: var(--cat-wine); }
.iconmini.on svg { fill: var(--cat-wine); }

/* ============ Kids ============ */
.kid-list { display: grid; gap: 14px; }
.kid-card {
  padding: 18px 20px; border-radius: var(--radius-lg); position: relative;
  border: 1px solid color-mix(in srgb, var(--cat-sage) 26%, var(--glass-border));
  background: linear-gradient(160deg, color-mix(in srgb, var(--cat-sage) 12%, transparent), color-mix(in srgb, var(--cat-gold) 8%, transparent)), var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow-soft), var(--glass-highlight);
  animation: rise .4s var(--ease) both;
}
.kid-text { margin: 0; font-family: "DM Serif Display", serif; color: var(--title); font-size: 20px; line-height: 1.3; }
.kid-ref { display: inline-block; margin-top: 8px; color: var(--cat-sage); font-weight: 700; font-size: 13px; }
.kid-act {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--glass-edge); color: var(--text-soft); font-size: 14px; line-height: 1.5;
}
.kid-act-ic { width: 18px; height: 18px; flex: 0 0 auto; color: var(--cat-gold); margin-top: 2px; }

/* ============ Games ============ */
body.game-focus .tabbar { display: none; }
body.game-focus .app { padding-bottom: 20px; }
.soon-badge { margin-left:auto; font-size:11px; font-weight:800; color:var(--cat-gold); background:rgba(177,148,103,.14); padding:6px 11px; border-radius:999px; letter-spacing:.03em; }
.coll-card.soon { opacity:.74; cursor:default; }
.coll-card.g-word .coll-ic { background:linear-gradient(150deg, var(--cat-terracotta), var(--cat-gold)); }
.coll-card.g-sopa .coll-ic { background:linear-gradient(150deg, var(--cat-sage), var(--cat-gold-soft)); }
.coll-card.g-conex .coll-ic { background:linear-gradient(150deg, var(--cat-wine), var(--cat-violet)); }

.word-hint { padding:16px 18px; border-radius:var(--radius-lg); margin-bottom:18px; }
.word-hint .wh-label { display:block; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--cat-gold); margin-bottom:6px; }
.word-hint p { margin:0; font-family:"DM Serif Display",serif; color:var(--title); font-size:19px; line-height:1.35; }

.word-board { display:grid; gap:8px; width:min(100%,400px); margin:0 auto 14px; }
.wrow { display:grid; gap:8px; }
.wt { aspect-ratio:1/1; display:grid; place-items:center; border-radius:12px; font-weight:800; font-size:clamp(18px,5.5vw,28px); text-transform:uppercase;
  background:var(--glass-bg-strong); border:1px solid var(--glass-edge); color:var(--title); box-shadow:var(--glass-highlight); }
.wt.filled { border-color:color-mix(in srgb, var(--cat-navy) 40%, var(--glass-border)); }
.wt.correct { background:var(--cat-sage); color:#fff; border-color:transparent; }
.wt.present { background:var(--cat-gold); color:#fff; border-color:transparent; }
.wt.absent { background:color-mix(in srgb, var(--cat-ink) 24%, transparent); color:#fff; border-color:transparent; }

.word-kb { display:grid; gap:7px; width:min(100%,520px); margin:10px auto 0; }
.kbrow { display:flex; gap:5px; justify-content:center; }
.kb { flex:1 1 0; min-width:0; min-height:52px; border-radius:10px; border:1px solid var(--glass-border); background:var(--glass-bg-strong);
  color:var(--title); font-weight:800; font-size:15px; box-shadow:var(--glass-highlight); transition:transform .1s var(--ease); }
.kb:active { transform:scale(.92); }
.kb-wide { flex:1.7 1 0; font-size:12px; display:grid; place-items:center; }
.kb-wide svg { width:22px; height:22px; }
.kb.correct { background:var(--cat-sage); color:#fff; border-color:transparent; }
.kb.present { background:var(--cat-gold); color:#fff; border-color:transparent; }
.kb.absent { background:color-mix(in srgb, var(--cat-ink) 32%, var(--glass-bg-strong)); color:#fff; opacity:.7; border-color:transparent; }

.word-result { text-align:center; padding:22px 20px; border-radius:var(--radius-xl); margin:8px auto 0; width:min(100%,400px); }
.wr-label { margin:0; font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--cat-terracotta); }
.wr-word { margin:6px 0 12px; font-size:clamp(28px,8vw,36px); color:var(--title); letter-spacing:.02em; }
.wr-msg { margin:0 0 12px; color:var(--text); line-height:1.6; font-size:15.5px; }
.wr-again { margin:0 0 16px; color:var(--text-soft); font-size:13px; }
.word-result .btn { width:auto; display:inline-flex; }

/* ============ Empty states ============ */
.empty { text-align: center; padding: 60px 24px; color: var(--text-soft); }
.empty-ic { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--cat-gold); display: block; }
.empty h3 { margin: 0 0 6px; color: var(--title); font-size: 18px; }
.empty p { margin: 0; font-size: 14px; line-height: 1.5; }

/* ============ Modal / bottom sheet ============ */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.modal-scrim { position: absolute; inset: 0; background: rgba(30,24,18,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .3s ease both; }
.modal-sheet {
  position: relative; width: min(100%, 560px); margin: 0 auto;
  max-height: 92dvh; overflow-y: auto; padding: 24px 22px calc(26px + var(--safe-bottom));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  animation: sheet-up .42s var(--ease) both;
}
.modal-sheet::before { content:""; display:block; width:42px; height:5px; border-radius:999px; background: var(--glass-edge); margin: -6px auto 16px; }
.sheet-title { font-size: 22px; color: var(--title); margin: 0 0 18px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--glass-edge);
}
.set-row:last-child { border-bottom: 0; }
.set-row .set-label { font-weight: 600; color: var(--text); }
.set-row .set-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.seg { display: inline-flex; background: var(--glass-inset); border-radius: 12px; padding: 3px; gap: 2px;
  background: rgba(255,255,255,.3); border: 1px solid var(--glass-edge); }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--text-soft); }
.seg button.on { background: var(--cat-navy); color: #fff; }
.switch { width: 52px; height: 30px; border-radius: 999px; border: 0; position: relative; background: var(--cat-line); transition: background .2s; }
.switch.on { background: var(--cat-sage); }
.switch::after { content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch.on::after { transform: translateX(22px); }
input[type="time"] { border: 1px solid var(--glass-edge); background: rgba(255,255,255,.4); border-radius: 10px; padding: 8px 10px; font-family: inherit; color: var(--title); font-weight: 600; }

/* Share card preview */
.share-preview { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--glass-shadow); margin: 0 auto 18px; max-height: 56vh; width: fit-content; }
.share-preview canvas, .share-preview img { display: block; max-height: 56vh; width: auto; max-width: 100%; height: auto; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btns .btn { width: 100%; }
@media (min-width: 720px) {
  .modal { align-items: center; }
  .modal-sheet { width: min(100%, 470px); max-height: 90dvh; border-radius: var(--radius-xl); animation: pop .34s var(--ease) both; }
  .modal-sheet::before { display: none; }
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 80; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(48,56,79,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--glass-shadow); animation: toast-in .3s var(--ease) both;
}

/* ============ animations ============ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  * { animation-duration: .01ms !important; }
}

/* tablet/desktop niceties */
@media (min-width: 720px) {
  .emo-grid { grid-template-columns: repeat(3, 1fr); }
  .screen { padding-top: 14px; }
}
