:root {
  --bg: #05030f;
  --panel: rgba(18, 12, 40, 0.62);
  --line: rgba(140, 120, 255, 0.25);
  --text: #ece9ff;
  --muted: #a79fd0;
  --c1: #00f0ff;
  --c2: #ff2bd6;
  --c3: #ffe14d;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Exo 2", "Segoe UI", "Nirmala UI", system-ui, sans-serif;
}

body {
  overflow-x: hidden;
  /* keep content clear of phone notches and home indicators in the native apps */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 43, 214, 0.20), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(0, 240, 255, 0.16), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 225, 77, 0.10), transparent 45%);
  animation: drift 18s ease-in-out infinite alternate;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(120, 100, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 100, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

[hidden] { display: none !important; }

/* multicolour neon frame around the whole app, like a phone waking up: the rim and a soft light from the
   screen edges surge in when the app opens, then keep breathing in and out while the colours circle */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.app-frame, .app-glow > div {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: conic-gradient(from var(--spin), #ff2bd6, #ffe14d, #39ff88, #00f0ff, #7b2bff, #ff2bd6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.app-frame {
  z-index: 80;
  padding: 7px;
  filter: drop-shadow(0 0 8px rgba(255, 43, 214, 0.9)) drop-shadow(0 0 18px rgba(0, 240, 255, 0.7));
  animation: frame-spin 4s linear infinite, frame-wake 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) both, frame-breathe 2.8s ease-in-out 2.6s infinite;
}
.app-glow {
  position: fixed;
  inset: 0;
  z-index: 79;
  pointer-events: none;
  filter: blur(24px) saturate(1.4);
  animation: glow-wake 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) both, glow-breathe 2.8s ease-in-out 2.6s infinite;
}
.app-glow > div { padding: 34px; animation: frame-spin 4s linear infinite; }
@keyframes frame-spin { to { --spin: 360deg; } }
@keyframes frame-wake {
  0% { padding: 0; opacity: 0; }
  30% { padding: 26px; opacity: 1; }
  100% { padding: 7px; opacity: 1; }
}
@keyframes frame-breathe {
  0%, 100% { padding: 7px; opacity: 1; }
  50% { padding: 11px; opacity: 0.8; }
}
@keyframes glow-wake {
  0% { opacity: 0; transform: scale(1.12); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1); }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.35; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(16px, 3vw, 36px);
}

.logo {
  font-family: Orbitron, "Exo 2", sans-serif;
  font-weight: 900;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.14em;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flow 6s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255, 43, 214, 0.45));
}

.tagline { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

.lang {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}
.lang select { border: none; background: transparent; padding: 6px 8px; width: auto; box-shadow: none; }
.globe { font-size: 18px; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.top-icon {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  font-size: 20px; cursor: pointer; backdrop-filter: blur(10px); display: grid; place-items: center; padding: 0;
}
.top-icon:hover { border-color: var(--c1); }
.top-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #ff3b6b, #ff8a2a); color: #fff; font: 800 11px/20px system-ui, sans-serif;
  box-shadow: 0 0 0 2px #0b0820, 0 0 12px rgba(255,59,107,.9);
}
/* a powerful bell: when something is due it glows and rings a few times (then rests, to save battery) */
.bell.alert { border-color: #ff3b6b; box-shadow: 0 0 14px rgba(255,59,107,.65), inset 0 0 10px rgba(255,140,60,.25); animation: bellRing 1.2s ease-in-out 4; }
@keyframes bellRing { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .bell.alert { animation: none; } }
@media (max-width: 520px) { .tagline { display: none; } .top-icon { width: 40px; height: 40px; font-size: 18px; } .top-actions { gap: 6px; } }
/* small phones: the language picker gives up width first (it is also in ⚙️ Settings) */
@media (max-width: 400px) { .top-actions { min-width: 0; } .lang { min-width: 0; } .lang select { min-width: 0; max-width: 92px; padding-inline: 4px; } }
.bell-box { width: min(560px, 100%); max-height: 100%; overflow: auto; }
.bell-list { display: flex; flex-direction: column; gap: 8px; }
.bell-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bell-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); cursor: pointer; text-align: start; color: inherit; font: inherit; width: 100%; }
.bell-row.hot { border-color: rgba(255,59,107,.7); background: rgba(255,59,107,.12); }
.bell-row .up-ico { font-size: 22px; }
.bell-row .up-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-btn {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; backdrop-filter: blur(10px);
}
.home-btn:hover { border-color: var(--c1); }
.brand { margin-inline-end: auto; }
.arrow { display: inline-block; }
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------- home: ready-made templates ---------- */
.home { padding: 0 clamp(16px, 3vw, 36px) 48px; max-width: 1280px; margin: 0 auto; }
.hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 43, 214, 0.25), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0, 240, 255, 0.2), transparent 50%),
    var(--panel);
}
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4.4vw, 44px); line-height: 1.1; font-weight: 900; }
.hero p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 560px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.section-title { margin: 34px 0 14px; font-size: 18px; font-weight: 800; letter-spacing: 0.04em; }
.section-title.love { color: #ff8ac8; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tpl {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: start; cursor: pointer;
  border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tpl:hover, .tpl:focus-visible { transform: translateY(-4px); border-color: var(--c2); box-shadow: 0 12px 34px rgba(255, 43, 214, 0.35); outline: none; }
.tpl-thumb { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: #0c0820; }
.tpl-cap { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; }
.tpl-cap strong { font-size: 15px; line-height: 1.25; }
.tpl-cap small { font-size: 12px; color: var(--muted); }
#tplLove .tpl { border-color: rgba(255, 79, 184, 0.4); }

/* ---------- quick search ---------- */
.search-block { flex-basis: 100%; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.search-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(5, 3, 20, 0.7); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within { border-color: var(--c1); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 22px rgba(0, 240, 255, 0.25); }
.search-ico { font-size: 18px; }
.search-bar input { border: none; background: transparent; box-shadow: none; padding: 10px 4px; font-size: 16px; min-width: 0; flex: 1; }
.search-bar input:focus { box-shadow: none; }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-clear { border: none; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; padding: 8px; }
.mic-btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--c2), #7b2bff, var(--c1)); box-shadow: 0 0 18px rgba(255, 43, 214, 0.5);
}
.mic-btn.listening { animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 34px rgba(255, 43, 214, 0.9); } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.pic-chips { margin: 0 0 10px; }
.pic-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.pic-strip::-webkit-scrollbar { display: none; }
.pic-pick { position: relative; flex: none; width: 96px; aspect-ratio: 3 / 2; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(5, 3, 20, 0.6); cursor: pointer; }
.pic-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-pick.active { border-color: #ff2bd6; box-shadow: 0 0 12px rgba(255, 43, 214, 0.7); }
#picReset { margin-top: 6px; }
.pic-chips .chip { flex: none; width: auto; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.phrase-chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.2s;
}
.phrase-chip:hover { border-color: var(--c2); background: rgba(255, 43, 214, 0.12); }
#searchResults .section-title { margin-top: 28px; }

/* ---------- Let'sPlan up front ---------- */
.lp-spot + .hero { margin-top: 18px; }
.lp-spot {
  padding: clamp(16px, 3vw, 26px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: radial-gradient(circle at 100% 0%, rgba(0, 240, 255, 0.22), transparent 55%), radial-gradient(circle at 0% 100%, rgba(138, 92, 255, 0.3), transparent 55%), var(--panel);
  border-color: rgba(0, 240, 255, 0.45); box-shadow: 0 0 26px rgba(0, 240, 255, 0.18);
}
.lp-spot h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); font-weight: 900; display: flex; align-items: center; gap: 8px; }
.lp-spot p { margin: 0 0 10px; color: var(--muted); max-width: 620px; line-height: 1.45; }
.lp-spot-txt { flex: 1 1 320px; min-width: 0; }
.lp-badge { position: static; }
.lp-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-feats > span { padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.07); border: 1px solid var(--line); white-space: nowrap; }
.lp-spot-act { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 640px) { .lp-spot-act, .lp-spot-act .btn { width: 100%; justify-content: center; } }

/* ---------- My cards ---------- */
.mycards { margin-top: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.mycards .up-head { flex-wrap: wrap; }
.mc-tabs { display: flex; gap: 6px; }
.mc-tabs button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mc-tabs button.active { border-color: var(--c2); background: rgba(255,43,214,.18); box-shadow: 0 0 12px rgba(255,43,214,.35); }
.mc-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.mc-strip:empty { display: none; }
.mc-card {
  flex: 0 0 170px; display: flex; flex-direction: column; gap: 3px; padding: 0 0 8px; overflow: hidden; text-align: start; cursor: pointer;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; scroll-snap-align: start;
  transition: transform .2s, border-color .2s;
}
.mc-card:hover { transform: translateY(-3px); border-color: var(--c2); }
.mc-card img { width: 100%; aspect-ratio: 3 / 2; display: block; background: #0c0820; }
.mc-card strong, .mc-card small { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-card small { color: var(--muted); font-size: 12px; }
.mc-add { display: flex; gap: 8px; }
.mc-add input { flex: 1; min-width: 0; }

/* ---------- backup & restore ---------- */
.backup-box { width: min(560px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.bk-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-stats span { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.bk-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.bk-box .hint { margin: 0; }
.bk-progress { position: relative; height: 30px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.08); }
.bk-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--c2), var(--c1)); transition: width .2s; }
.bk-progress span { position: relative; display: block; text-align: center; line-height: 30px; font-size: 13px; font-weight: 800; }
.bk-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(0,240,255,.08); border: 1px solid rgba(0,240,255,.35); font-size: 14px; font-weight: 700; }
.bk-banner span { flex: 1 1 200px; }
.bk-open { align-self: flex-start; }
.bk-android { color: var(--c3); }

/* ---------- a received card, open ---------- */
/* .editor.… so these win over .editor { display: flex } further down */
.editor.view-panel { display: none; flex-direction: column; gap: 12px; }
body.viewing-card #editor { display: none; }
body.viewing-card .editor.view-panel { display: flex; }
.view-panel .step-title { margin: 0; }
.view-panel #viewWhen { margin: -6px 0 0; }
.view-kept { margin: 0; font-size: 14px; color: var(--c3); font-weight: 700; }
.view-actions, .view-fwd { display: flex; flex-wrap: wrap; gap: 10px; }
.view-fwd { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
#viewDel.armed { border-color: #ff3b6b; color: #ff8aa5; }
.ai-song-row { margin-top: 8px; }
.ai-song-btn { border-color: rgba(255, 79, 216, 0.7); background: linear-gradient(135deg, rgba(255,79,216,.22), rgba(138,92,255,.22)); box-shadow: 0 0 14px rgba(255,79,216,.3); font-weight: 800; }
#readRow { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
#readRow[hidden] { display: none; }
.plan-send-btn { border-color: rgba(0, 240, 255, 0.6); box-shadow: 0 0 16px rgba(0, 240, 255, 0.25); }

/* ---------- group cards ---------- */
.editor.group-panel { display: none; }
body.group-mode #editor, body.group-mode #replayBtn { display: none; }
body.group-mode .editor.group-panel { display: flex; }
/* a card opened from a link in the browser: the card and the language, not the app's own buttons */
body.group-mode #planBtn, body.group-mode #bellBtn, body.group-mode #settingsBtn, body.group-mode #assistBtn { display: none; }
.group-new, .group-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.group-new label { flex: 1; min-width: 160px; }
.group-code { font-size: 15px; color: var(--muted); }
.group-code strong { font-family: Orbitron, "Exo 2", sans-serif; font-size: 22px; letter-spacing: 0.12em; color: var(--c3); margin-inline-start: 6px; }
.group-notes { display: flex; flex-direction: column; gap: 8px; }
.group-notes.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.group-note {
  position: relative; padding: 14px 16px 12px; border-radius: 16px; text-align: start;
  background: linear-gradient(145deg, rgba(255, 43, 214, 0.14), rgba(0, 240, 255, 0.1)); border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); animation: note-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.group-note p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.group-note strong { color: var(--c3); font-size: 14px; }
.note-x { position: absolute; top: 6px; inset-inline-end: 6px; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
@keyframes note-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
.group-form { display: flex; flex-direction: column; gap: 12px; }
.get-app { color: var(--c1); font-weight: 700; text-decoration: none; margin-top: 8px; }
/* under a card opened from a link in the browser: get NeoGreet from the store */
.get-app-box { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border-radius: 16px; text-align: center;
  background: linear-gradient(135deg, rgba(123, 43, 255, .22), rgba(0, 200, 255, .14)); border: 1px solid var(--line); }
.store-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; padding: 9px 16px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .35); text-align: start; }
.store-btn small { display: block; font-size: 10px; opacity: .85; }
.store-btn b { display: block; font-size: 17px; line-height: 1.1; }
.store-ic { font-size: 22px; }

/* ---------- coming up & reminders ---------- */
.upcoming { margin-top: 24px; padding: 16px 18px; }
.up-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.up-head .section-title { margin: 0; }
.up-list, .rem-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
/* on narrow phones the countdown and buttons move under the name instead of squeezing it away */
.up-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(5, 3, 20, 0.45);
}
.up-row .btn { white-space: nowrap; }
.up-ico { font-size: 26px; flex: none; }
.up-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; }
/* a long holiday name (Telugu, Tamil…) goes on two lines rather than being cut */
.up-txt strong { font-size: 15px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.up-txt small { color: var(--muted); font-size: 12px; }
.up-when { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.up-when.soon { color: var(--c3); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.rem-box { max-height: min(92vh, 900px); overflow-y: auto; gap: 18px; }
.rem-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rem-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 8px; }
.rem-alerts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rem-alerts select { width: auto; }
.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; cursor: pointer; }
input.toggle {
  appearance: none; -webkit-appearance: none; width: 46px; height: 26px; padding: 0; border-radius: 999px; flex: none;
  background: rgba(255, 255, 255, 0.15); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background 0.2s;
}
input.toggle::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
input.toggle:checked { background: linear-gradient(90deg, var(--c2), #7b2bff); border-color: transparent; }
input.toggle:checked::after { transform: translateX(20px); }
[dir="rtl"] input.toggle:checked::after { transform: translateX(-20px); }

/* ---------- studio layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(340px, 460px) 1fr;
  gap: 24px;
  padding: 0 clamp(16px, 3vw, 36px) 40px;
  align-items: start;
}
.layout .editor { grid-column: 1; grid-row: 1; }
.layout .stage { grid-column: 2; grid-row: 1; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- editor ---------- */
.editor { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 18px; }

label, .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lbl.sub { margin-top: 6px; }

input, select, textarea {
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: rgba(5, 3, 20, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus {
  border-color: var(--c1);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 18px rgba(0, 240, 255, 0.25);
}
select option, select optgroup { background: #120c2a; color: var(--text); }

.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- step tabs: one step on screen at a time ---------- */
.tabs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px;
  border-radius: 14px; background: rgba(5, 3, 20, 0.55); border: 1px solid var(--line);
}
.tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; min-width: 0;
  border: none; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; transition: background 0.2s, color 0.2s;
}
.tabs button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs .num {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-family: Orbitron, "Exo 2", sans-serif; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); transition: 0.2s;
}
.tabs button:hover { color: var(--text); }
.tabs button.done .num { color: #fff; border-color: transparent; background: rgba(123, 43, 255, 0.55); }
.tabs button.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.tabs button.active .num {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--c2), #7b2bff, var(--c1));
  box-shadow: 0 0 12px rgba(255, 43, 214, 0.55);
}
.tabs .send-tab:not(.active) { color: var(--c3); }

.panel { display: flex; flex-direction: column; gap: 16px; animation: panel-in 0.25s ease-out; }
.step-title { margin: 2px 0 0; font-size: 20px; font-weight: 800; color: var(--text); }
.group-title { margin: 4px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c1); }
.panel-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.panel-nav .btn { min-width: 110px; justify-content: center; }

/* advanced controls stay folded away until asked for */
.more { border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 3, 20, 0.35); }
.more summary {
  padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "⌄"; color: var(--muted); transition: transform 0.2s; }
.more[open] summary::after { transform: rotate(180deg); }
.more-body { display: flex; flex-direction: column; gap: 14px; padding: 0 14px 14px; }

.send-panel { align-items: stretch; text-align: center; }
.send-btn { justify-content: center; font-size: 20px; padding: 18px; }
.hint { margin: -6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.send-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.send-apps .btn { justify-content: center; padding-left: 4px; padding-right: 4px; white-space: normal; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.more-body.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* long words (Tamil, German...) wrap inside the button instead of pushing it off the screen */
.ways .btn { justify-content: center; min-width: 0; padding-inline: 10px; overflow-wrap: anywhere; text-align: center; }

/* as many lettering styles per line as fit (they wrap on small phones) */
/* ---------- Settings, Help, plans, Neo and the tour ---------- */
.helper-box { width: min(560px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.helper-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
.set-row:hover { background: rgba(255,255,255,.08); }
.set-ico { font-size: 22px; flex: none; }
.set-lbl { flex: 1; min-width: 0; }
.set-go { opacity: .6; font-size: 20px; }
.set-lang select { flex: 0 1 150px; min-width: 0; }
.set-version { text-align: center; margin-top: 4px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.plan-card.pro { border-color: rgba(255,79,216,.5); background: linear-gradient(135deg, rgba(255,43,214,.10), rgba(54,226,255,.06)); }
.plan-card .hint { margin: 0; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 17px; }
.plan-badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); }
.plan-list { margin: 0; padding-inline-start: 4px; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; }
/* the Pro paywall: one button per plan with its store price */
.pro-plans { display: flex; flex-direction: column; gap: 8px; }
.pro-plan { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,79,216,.55); background: rgba(255,43,214,.10); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pro-plan:hover { background: rgba(255,43,214,.18); }
.pro-plan:disabled { opacity: .6; cursor: progress; }
.pro-plan-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pro-plan-txt small { opacity: .75; font-size: 12px; }
.pro-price { flex: none; font-weight: 900; white-space: nowrap; }
.pro-msg:empty { display: none; }
.pro-msg, .pro-legal { margin: 0; }
.pro-legal { opacity: .7; font-size: 11px; }
.pro-legal a { color: inherit; text-decoration: underline; }
.pro-on { margin: 0; font-weight: 800; color: #7dffb0; }
.set-row.active { border-color: var(--neon, #ff4fd8); }
/* a PRO mark on the extras until Pro is on */
.pro-x { position: relative; }
.pro-x::after { content: 'PRO'; position: absolute; top: -6px; inset-inline-end: -6px; padding: 1px 4px; border-radius: 6px; font: 800 8px/1.3 system-ui, sans-serif; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, #ff2bd6, #7b2bff); pointer-events: none; }
body.pro-on .pro-x::after { display: none; }
/* picture tiles clip their corners: the badge sits inside */
.tpl.pro-x::after, .pic-pick.pro-x::after { top: 8px; inset-inline-end: 8px; font-size: 10px; padding: 2px 6px; z-index: 1; }
#voiceMore { margin-top: 8px; }
.help-search { width: 100%; }
.help-list { display: flex; flex-direction: column; gap: 6px; }
.help-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.03); }
.help-item summary { font-weight: 800; cursor: pointer; }
.help-item p { margin: 8px 0; }
.assist-btn { position: fixed; z-index: 30; inset-inline-end: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border: 0; border-radius: 999px; color: #fff; font: inherit; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, #ff4fd8, #8a5cff 60%, #36e2ff); box-shadow: 0 6px 24px rgba(138,92,255,.55); }
.assist-spark { font-size: 20px; }
body:not(.on-home) .assist-btn { display: none; }
#home { padding-bottom: 84px; } /* the last row stays clear of Neo's button */
.neo-log { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding: 4px; }
.neo-msg { align-self: flex-start; max-width: 88%; padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.neo-msg.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, rgba(255,79,216,.35), rgba(138,92,255,.35)); }
.neo-msg p { margin: 6px 0; }
.neo-msg .btn { margin-top: 4px; }
.neo-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.neo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.neo-row { display: flex; gap: 6px; align-items: center; }
.neo-talk { width: 100%; justify-content: center; font-weight: 800; }
.neo-talk.on { background: linear-gradient(135deg, #3ddc84, #36e2ff); color: #05030f; animation: pulse 1.6s ease-in-out infinite; }
.neo-in { flex: 1; min-width: 0; }
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-hole { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(5,3,15,.72), 0 0 0 3px #ff4fd8, 0 0 30px #ff4fd8; transition: all .35s ease; pointer-events: none; }
.tour-bubble { position: fixed; inset-inline: 16px; max-width: 460px; margin-inline: auto; padding: 14px 16px; border-radius: 18px; background: #160d33; border: 1px solid rgba(255,79,216,.6);
  box-shadow: 0 10px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 8px; }
.tour-bubble p { margin: 0; font-size: 17px; font-weight: 700; }
.tour-friend { font-size: 34px; line-height: 1; }
.tour-acts { display: flex; justify-content: flex-end; gap: 8px; }
.rem-list .up-row.off { opacity: .55; }
.pl-weekly { cursor: pointer; font-weight: 700; }
.pl-weekly input { width: 20px; height: 20px; accent-color: #ff4fd8; }
.pl-next { display: block; margin: -2px 0 4px; color: var(--muted); font-weight: 700; }
.pl-bday-ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-bday-ask span { flex: 1 1 180px; }
.pl-safe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.pl-safe span { flex: 1 1 200px; }
.pl-help { max-height: 85%; overflow-y: auto; z-index: 20; background: #100c2c; }
.pl-help .pl-rules { margin: 0; }
.card-lang { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; }
.card-lang select { flex: 1 1 160px; max-width: 260px; }
.card-lang + .hint { margin-top: -6px; }
.title-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.title-styles button {
  flex: 1 1 52px; padding: 0 8px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 3, 20, 0.6);
  color: #fff; font-size: 24px; cursor: pointer; transition: 0.2s;
}
.title-styles button:hover, .title-styles button.active {
  border-color: var(--c2); box-shadow: 0 0 14px rgba(255, 43, 214, 0.45); background: rgba(255, 43, 214, 0.12);
}
.occ-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
#friends .scene-btn .ico { font-size: 26px; }
.occ-list { display: flex; flex-direction: column; gap: 6px; }
.occ-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; text-align: start;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(5, 3, 20, 0.6); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.occ-btn .ico { font-size: 18px; }

.inspire { display: flex; flex-direction: column; gap: 6px; }
.inspire-btn {
  padding: 9px 12px; border-radius: 10px; text-align: start; cursor: pointer;
  border: 1px dashed var(--line); background: rgba(5, 3, 20, 0.5); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 400; line-height: 1.4; transition: 0.2s;
}
.inspire-btn::before { content: "✨ "; }
.inspire-btn:hover, .inspire-btn.active { border-style: solid; border-color: var(--c3); background: rgba(255, 225, 77, 0.08); box-shadow: 0 0 12px rgba(255, 225, 77, 0.3); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer; padding: 0;
  transition: transform 0.15s, box-shadow 0.2s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px var(--c2), 0 0 16px var(--c2); }
.themes .swatch { width: 40px; height: 40px; border-radius: 12px; }
.swatch.original { background: #1a1238; color: #fff; font-size: 16px; }
.swatch.holo { background: conic-gradient(from 30deg, #ff2bd6, #00f0ff, #39ff88, #ffcc33, #ff2bd6); }
.swatch.rainbow { background: conic-gradient(#ff3b3b, #ffe14d, #4dff88, #29f0ff, #6a5bff, #ff4fb8, #ff3b3b); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(from 90deg, #fff, #888, #fff); }
.swatch.custom input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer; }
input[type="range"].hue {
  height: 10px; border-radius: 6px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, #ff3b3b, #ffe14d, #4dff88, #29f0ff, #6a5bff, #ff4fb8, #ff3b3b);
}

.scenes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scene-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 3px;
  min-height: 66px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 3, 20, 0.6);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.2s;
}
.scene-btn .ico { font-size: 22px; }
.scene-btn:hover { transform: translateY(-2px); }
.scene-btn:hover, .scene-btn.active, .chip.active, .chip:hover, .seg button.active, .occ-btn:hover, .occ-btn.active {
  border-color: var(--c2);
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.45);
  background: rgba(255, 43, 214, 0.12);
}

.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slider span { font-weight: 600; }
input[type="range"] { padding: 0; border: none; box-shadow: none; background: transparent; accent-color: var(--c2); }

.particles { display: flex; gap: 6px; flex-wrap: wrap; }
.chip, .seg button {
  width: 44px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 3, 20, 0.6);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s;
}

.photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg.wide button { width: auto; flex: 1; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 700; }
.style-seg button { height: 48px; font-size: 15px; }
.seg { display: flex; gap: 6px; }
/* wide choices wrap onto a second line on small phones instead of running off the side */
.seg.wide { flex-wrap: wrap; }
.seg.wide button { min-width: max-content; }
.btn.file { flex-direction: row; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 8, 32, 0.75);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--c1); box-shadow: 0 0 18px rgba(0, 240, 255, 0.35); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn.ghost { background: transparent; }
.btn.primary {
  border: none;
  color: #fff;
  background: linear-gradient(90deg, var(--c2), #7b2bff, var(--c1));
  background-size: 200% 100%;
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.45);
  animation: flow 5s linear infinite;
}
.btn.big { font-size: 18px; padding: 14px 28px; border-radius: 16px; }

/* ---------- stage ---------- */
.stage { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }

.card-wrap { perspective: 1400px; }
.card3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  border-radius: 22px;
}
.card3d canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  cursor: crosshair;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 43, 214, 0.25),
    0 0 120px rgba(0, 240, 255, 0.15);
}
/* glowing back plate: when the card tilts it shows as the card's thickness */
.card3d::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, #00f0ff, #7b2bff 45%, #ff2bd6);
  transform: translateZ(-14px);
  filter: brightness(0.55);
  box-shadow: 0 0 40px rgba(123, 43, 255, 0.6);
}
.card3d canvas { position: relative; transform: translateZ(0); }
.shine {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.16), transparent 45%);
  mix-blend-mode: screen;
}
.card-tools { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; display: flex; gap: 8px; transform: translateZ(1px); }
.replay {
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(5, 3, 20, 0.6); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(6px);
}
.replay:hover { border-color: var(--c2); box-shadow: 0 0 14px rgba(255, 43, 214, 0.5); }
.card3d canvas { touch-action: none; } /* lets the "From" scroll be dragged on phones */
.hint.small { margin: 0; font-size: 12px; text-align: start; }

.note { padding: 14px 18px; font-size: 15px; }
.note b { color: var(--c3); letter-spacing: 0.04em; }
.note p { margin: 6px 0 0; line-height: 1.55; }
.note .phrase { color: var(--c1); font-weight: 800; }


/* ---------- handwriting pad ---------- */
.modal {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 2, 12, 0.8); backdrop-filter: blur(6px);
}
.modal-box { width: min(980px, 100%); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
#pad {
  width: 100%; height: auto; aspect-ratio: 1000 / 480; border-radius: 14px; touch-action: none; cursor: crosshair;
  background: #fff8e7 repeating-linear-gradient(transparent 0 46px, rgba(80, 120, 200, 0.25) 46px 48px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 10px 30px rgba(0, 0, 0, 0.4);
}
.pad-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pad-tools input[type="range"] { width: 120px; }
.pad-tools .btn.primary { margin-inline-start: auto; }

/* ---------- Print at Walgreens ---------- */
.pw-entry { border: 1px solid rgba(255, 79, 216, .35); }
.pw-modal { z-index: 59; }
.pw-box { width: min(560px, 100%); max-height: 100%; overflow: auto; gap: 10px; }
.pw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pw-top .step-title { margin: 0; }
.pw-body { display: flex; flex-direction: column; gap: 10px; }
.pw-body input[type=text], .pw-body input[type=tel], .pw-body input[type=email] { width: 100%; box-sizing: border-box; }
.pw-body input.bad { outline: 2px solid #E8505B; }
.pw-lead { margin: 0; font-weight: 600; }
.pw-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pw-opt, .pw-store { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border-radius: 16px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pw-opt.on { border-color: #FF4FD8; background: rgba(255, 79, 216, .14); }
.pw-qty { display: flex; gap: 8px; flex-wrap: wrap; }
.pw-q { min-width: 56px; min-height: 48px; border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.pw-q.on { border-color: #FF4FD8; background: rgba(255, 79, 216, .2); }
.pw-ready { color: #7BDC8B; font-weight: 700; }
.pw-terms { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.pw-terms a { color: #36E2FF; }
.pw-prev img { width: 100%; border-radius: 12px; display: block; }
.pw-total { margin: 4px 0 0; font-size: 1.5rem; font-weight: 900; }
.pw-warn { margin: 0; color: #FFB020; font-weight: 700; }
.pw-done { margin: 0; font-size: 1.4rem; font-weight: 900; }
.pw-order { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); }
.pw-status { color: #7BDC8B; font-weight: 700; }

/* ---------- the card tune maker: a little music box (pearl and gold) to put a short tune on a card ---------- */
.piano-modal { z-index: 58; }
.pk-tools { display: flex; gap: 8px; }
/* turned sideways: the keys fill the screen */
.piano-modal.land { padding: 4px; }
.piano-modal.land .piano-box { width: 100%; height: 100%; padding: 8px 10px; gap: 6px; }
.pk-w.ghost { transform: translateY(2px); }
body.living-card #groupWall, body.living-card #groupPanel > .lbl { display: none; }
.piano-box { width: min(1000px, 100%); max-height: 100%; overflow: auto; gap: 10px; }
.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pk-top .step-title { margin: 0; }
.pk-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1.1rem; cursor: pointer; }
.pk-stage {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px;
  background: linear-gradient(150deg, #FFF8EC 0%, #F6E7CF 55%, #EBD3AE 100%);
  box-shadow: inset 0 0 0 1px rgba(201,150,62,.55), 0 6px 16px rgba(60,35,8,.25);
}
.pk-big {
  flex: none; display: grid; place-items: center; width: 84px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #FBE7B8 60%, #E2B861 100%); border: 3px solid #fff;
  box-shadow: 0 0 0 3px #C9963E, 0 4px 12px rgba(120,80,20,.35);
  font-weight: 800; font-size: 1.8rem; color: #5A3B0E;
}
.pk-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pk-hint { margin: 0; color: #5A3B0E; font-weight: 700; }
.pk-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-btn {
  min-height: 46px; min-width: 46px; padding: 6px 14px; border-radius: 23px; border: 2px solid #C9963E; cursor: pointer;
  background: #FFFDF8; color: #5A3B0E; font: inherit; font-weight: 800; display: inline-flex; align-items: center; gap: 6px;
}
.pk-btn[disabled] { opacity: .45; cursor: default; }
.pk-btn.rec { background: #E8505B; border-color: #E8505B; color: #fff; }
.pk-oct { display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; font-weight: 800; }
.pk-oct button { min-width: 52px; min-height: 42px; border-radius: 21px; border: 2px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem; cursor: pointer; }
/* the music-box case: warm wood with a gold rim */
.pk-panel {
  position: relative; padding: 14px 10px 12px; border-radius: 26px; border: 3px solid #D9AE5C;
  background: linear-gradient(180deg, #8A5A2B 0%, #6B4320 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 10px 22px rgba(40,22,6,.45);
}
.pk-kb { position: relative; width: 100%; height: clamp(150px, 30vh, 250px); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* pearl keys, rounded like music-box tines */
.pk-w {
  position: absolute; top: 0; bottom: 0; box-sizing: border-box; border: 2px solid #E9DCC3; border-radius: 14px; margin: 0 2px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBF5EA 70%, #EFE3CC 100%);
  box-shadow: inset 0 -5px 0 #E2D2B2, 0 3px 6px rgba(30,16,4,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 14px; cursor: pointer; transition: transform 80ms, background 80ms;
}
.pk-b {
  position: absolute; top: 0; height: 56%; z-index: 2; box-sizing: border-box; border: 2px solid #8C6418; border-radius: 12px;
  background: linear-gradient(180deg, #F2CF7A 0%, #D9A441 70%, #B9852A 100%);
  box-shadow: inset 0 -4px 0 #9C7020, 0 4px 6px rgba(30,16,4,.45); cursor: pointer; transition: transform 80ms;
}
.pk-lab { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 5px; border-radius: 12px; background: #F6E7CF; font-weight: 800; font-size: clamp(.7rem, 2.4vw, .9rem); color: #5A3B0E; pointer-events: none; }
.pk-w.on { transform: translateY(2px); background: linear-gradient(180deg, #FFF3D6 0%, #F8E2B0 100%); box-shadow: inset 0 -2px 0 #E2D2B2, 0 1px 3px rgba(30,16,4,.4); }
.pk-b.on { transform: translateY(2px); background: linear-gradient(180deg, #FFE39A 0%, #E8B652 100%); }
.pk-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
@media (max-width: 520px) {
  .pk-big { width: 60px; font-size: 1.3rem; }
  .pk-ctl .pk-btn span { display: none; }
  /* Cancel and Use & share side by side, the main button full width below (no words broken over lines) */
  .pk-foot .btn { flex: 1 1 auto; white-space: nowrap; }
  .pk-foot #pkUse { flex-basis: 100%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pk-stage { padding: 6px 10px; } .pk-big { width: 52px; font-size: 1.2rem; }
  .pk-kb { height: calc(100dvh - 210px); min-height: 110px; }
}
/* the melody line in the Words step and on group notes */
.melody-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.melody-row .hint { margin: 0; }
label.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 600; }
label.check input { width: 20px; height: 20px; margin: 0; accent-color: #8A5CFF; }
.btn.rec { background: #E8505B; border-color: #E8505B; color: #fff; }
.note-play { margin-top: 6px; border: 1px solid rgba(138,92,255,.6); background: rgba(54,226,255,.12); color: inherit; border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Let'sPlan ---------- */
.plan-modal { z-index: 57; padding: 0; }
.plan-box { width: min(760px, 100%); height: 100%; max-height: 100dvh; padding: 10px 12px; gap: 8px; display: flex; flex-direction: column; border-radius: 0;
  background: linear-gradient(170deg, rgba(14,10,40,.97), rgba(30,12,60,.97)); }
@media (min-width: 780px) { .plan-modal { padding: 16px; } .plan-box { height: min(860px, 100%); border-radius: 22px; } }
.pl-top { display: flex; align-items: center; gap: 8px; }
.pl-head { flex: 1; min-width: 0; }
.pl-head .step-title { margin: 0; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-head small { opacity: .75; cursor: pointer; }
.pl-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font-size: 18px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pl-ic.on { border-color: #36e2ff; box-shadow: 0 0 12px rgba(54,226,255,.6); }
.pl-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.pl-lead { font-size: 1.05rem; margin: 0; }
.pl-rules { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.pl-field { display: flex; flex-direction: column; gap: 6px; }
.pl-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: rgba(255,255,255,.08); border: 2px solid #8a5cff; }
.pl-avatar.big { width: 84px; height: 84px; font-size: 46px; align-self: center; border-width: 3px; box-shadow: 0 0 18px rgba(138,92,255,.5); }
/* a profile photo fills the circle; a green dot while the person has the chat open */
.pl-avatar { position: relative; background-size: cover; background-position: center; }
.pl-avatar.here::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; border: 2px solid #0b0620; box-shadow: 0 0 8px #3ddc84; }
.pl-avatar.big.here::after { width: 18px; height: 18px; }
.pl-photo-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pl-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pl-react { border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: inherit; border-radius: 999px; padding: 2px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.pl-react.on { border-color: #ff4fd8; background: rgba(255,79,216,.18); }
.pl-react-pick { display: flex; gap: 2px; justify-content: space-between; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.pl-react-opt { border: 0; background: none; font-size: 24px; cursor: pointer; padding: 2px 4px; border-radius: 10px; }
.pl-react-opt:hover { background: rgba(255,255,255,.1); transform: scale(1.15); }
.pl-livebar { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; z-index: 2; }
.pl-live { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 14px; background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.45); font-weight: 700; font-size: 14px; }
.pl-live-txt { flex: 1 1 160px; min-width: 0; }
.pl-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pl-vanish-note { align-self: center; margin: 4px 0; padding: 4px 12px; border-radius: 999px; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.4); font-size: 13px; font-weight: 700; text-align: center; }
.pl-vanish { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.pl-bubble.kept { box-shadow: 0 0 0 2px rgba(255,210,31,.55); }
.pl-bubble.kept::before { content: '📌'; position: absolute; top: -10px; inset-inline-end: -6px; font-size: 16px; }
.pl-nb-open { align-self: flex-start; }
.pl-nb-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); }
.pl-nb-item img, .pl-nb-item video { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: #000; }
.pl-nb-item p { margin: 0; }
.pl-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.pl-av { height: 44px; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.07); font-size: 24px; cursor: pointer; }
.pl-av.on { border-color: #36e2ff; box-shadow: 0 0 10px rgba(54,226,255,.6); }
.pl-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-col { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.pl-col.on { border-color: #fff; box-shadow: 0 0 10px #fff; }
.pl-bday { display: flex; gap: 8px; }
.pl-bday select { flex: 1; }
.pl-danger { color: #ff8a9a !important; border-color: rgba(255,90,110,.5) !important; }
.pl-banner { margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(54,226,255,.12); border: 1px solid rgba(54,226,255,.5); font-weight: 700; }
.pl-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .pl-cards { grid-template-columns: 1fr 1fr; } }
.pl-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.pl-inline { display: flex; gap: 8px; }
.pl-inline input { flex: 1; min-width: 0; }
.pl-code { text-transform: uppercase; letter-spacing: .2em; font-weight: 800; }
.pl-list { display: flex; flex-direction: column; gap: 8px; }
.pl-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: inherit; font: inherit; cursor: pointer; text-align: start; }
.pl-item strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item small { opacity: .7; }
.pl-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; flex: none; }
.pl-dot.on { background: #ff3b6b; box-shadow: 0 0 8px #ff3b6b; }
.pl-day { align-self: center; font-size: .8rem; opacity: .7; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.06); }
.pl-empty { text-align: center; margin: auto 0; }
.pl-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.pl-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.pl-msg .pl-avatar { width: 32px; height: 32px; font-size: 18px; }
.pl-bubble { position: relative; padding: 8px 12px 10px; border-radius: 18px 18px 18px 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); min-width: 120px; }
.pl-msg.mine .pl-bubble { border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, rgba(138,92,255,.55), rgba(54,226,255,.35)); border-color: rgba(54,226,255,.4); }
.pl-bubble p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.pl-bubble.plan { border: 1px solid rgba(255,176,32,.7); box-shadow: 0 0 14px rgba(255,176,32,.25); background: linear-gradient(160deg, rgba(255,176,32,.16), rgba(255,79,216,.12)); }
.pl-bubble.stk { background: transparent; border-color: transparent; min-width: 0; padding: 0 4px; }
/* a card sent into the chat: an envelope to open */
.pl-cardmsg {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 220px; max-width: 100%; margin-top: 4px; padding: 14px 12px;
  border-radius: 16px; border: 1px solid rgba(255,79,216,.55); cursor: pointer; color: #fff; font: inherit; text-align: center;
  background: linear-gradient(160deg, rgba(255,79,216,.28), rgba(138,92,255,.28)); box-shadow: 0 0 18px rgba(255,79,216,.3);
}
.pl-cardmsg .pl-env { font-size: 44px; line-height: 1; animation: stkPop .5s cubic-bezier(.2,1.6,.4,1) 1; }
.pl-cardmsg .pl-open { font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.16); }
/* a small golden envelope with a red heart seal (chat cards and the waiting card on the home screen) */
.env-mini { position: relative; display: inline-block; flex: none; width: 58px; height: 40px; border-radius: 6px; background: linear-gradient(180deg, #ffe39a, #d9a332); box-shadow: 0 2px 8px rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(255,255,255,.55); overflow: hidden; animation: stkPop .5s cubic-bezier(.2,1.6,.4,1) 1; }
.env-mini::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 62%; background: linear-gradient(180deg, #f6cf6a, #c08a22); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.env-mini::after { content: '♥'; position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); color: #e0245e; font-size: 15px; line-height: 1; text-shadow: 0 0 6px rgba(255,80,130,.8); }
.env-mini.big { width: 78px; height: 54px; }
.env-mini.big::after { font-size: 20px; }
/* not opened yet: the envelope glows and flashes gold */
.pl-cardmsg.fresh .env-mini, .card-waiting .env-mini { animation: envFlash 1.6s ease-in-out infinite; }
@keyframes envFlash {
  0%, 100% { box-shadow: 0 0 6px rgba(255,210,74,.5), inset 0 0 0 1.5px rgba(255,255,255,.55); filter: brightness(1); transform: rotate(-3deg) scale(1); }
  50% { box-shadow: 0 0 26px 6px rgba(255,210,74,.95), inset 0 0 0 1.5px #fff; filter: brightness(1.25); transform: rotate(3deg) scale(1.08); }
}
.card-waiting { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid rgba(255,210,74,.75); background: linear-gradient(135deg, rgba(255,210,74,.22), rgba(255,79,216,.14)); color: inherit; font: inherit; text-align: start; cursor: pointer; animation: cwGlow 1.6s ease-in-out infinite; }
.card-waiting[hidden] { display: none; }
.cw-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cw-txt strong { font-size: 18px; overflow-wrap: anywhere; }
.cw-txt small { opacity: .85; }
@keyframes cwGlow { 50% { box-shadow: 0 0 28px rgba(255,210,74,.55); } }
@media (prefers-reduced-motion: reduce) { .pl-cardmsg.fresh .env-mini, .card-waiting .env-mini, .card-waiting { animation: none; } }
.env-colors .swatch { border-radius: 8px; }
.view-read { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.view-read[hidden] { display: none; }
.view-read .btn { flex: 1 1 200px; }
.view-voice { flex: 0 1 auto; }
.pl-compose.muted .pl-row, .pl-compose.muted .pl-stickers, .pl-compose.muted .pl-event { display: none; }
.pl-muted-note { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; color: #ffd0da; background: rgba(255,59,107,.14); border: 1px solid rgba(255,59,107,.45); }
.pl-muted-tag { color: #ff8aa5; }
.pl-link { color: #9ff0ff; text-decoration: underline; overflow-wrap: anywhere; }
.pl-who { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.pl-who small { opacity: .65; }
.pl-more { margin-inline-start: auto; border: 0; background: transparent; color: inherit; font-size: 1rem; cursor: pointer; padding: 0 4px; opacity: .7; }
.pl-when { font-weight: 800; color: #ffd27a; margin-top: 4px; }
.pl-rsvp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-ans { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: inherit; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.pl-ans.on { border-color: #3ddc84; background: rgba(61,220,132,.2); box-shadow: 0 0 8px rgba(61,220,132,.5); }
.pl-menu { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 6px; }
.pl-mi { border: 0; background: transparent; color: inherit; font: inherit; text-align: start; padding: 6px 4px; cursor: pointer; }
.pl-compose { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
/* on narrow phones the buttons take their own line and the typing box gets the full width below */
.pl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; }
.pl-row textarea { flex: 1 1 170px; min-width: 0; resize: none; min-height: 42px; max-height: 120px; border-radius: 20px; padding: 10px 14px; }
.pl-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 20px; background: linear-gradient(135deg, #ff4fd8, #8a5cff 60%, #36e2ff); box-shadow: 0 0 14px rgba(138,92,255,.6); }
.pl-event { display: flex; flex-direction: column; gap: 6px; }
.pl-erow { display: flex; align-items: center; gap: 8px; }
.pl-erow input { flex: 1; min-width: 0; }
.pl-place { display: block; margin-top: 6px; border: 1px solid rgba(54,226,255,.5); background: rgba(54,226,255,.12); color: #bff4ff; border-radius: 12px; padding: 6px 10px; font: inherit; font-weight: 700; cursor: pointer; text-align: start; max-width: 100%; overflow-wrap: anywhere; }
.pl-love { margin: 0; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,79,216,.18), rgba(138,92,255,.18)); border: 1px solid rgba(255,79,216,.5); font-weight: 800; }
.pl-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; padding: 6px; border-radius: 16px; background: rgba(0,0,0,.25); }
.pl-stk { height: 52px; border: 0; border-radius: 12px; background: rgba(255,255,255,.05); cursor: pointer; padding: 4px; }
.pl-stk:active { transform: scale(.92); }
.nsticker { width: 100%; height: 100%; filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 1px #fff); }
.pl-sticker { width: 86px; height: 86px; animation: stkPop .5s cubic-bezier(.2,1.6,.4,1) 1; }
@keyframes stkPop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } }
.plan-box { position: relative; }
.pl-sheet { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px;
  background: rgba(16,12,44,.98); border: 1px solid rgba(54,226,255,.5); box-shadow: 0 -6px 30px rgba(0,0,0,.5), 0 0 18px rgba(54,226,255,.25); }
.pl-sheet > .btn { align-self: center; }
.pl-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pl-share { min-height: 52px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.pl-share.wa { background: linear-gradient(135deg, #25d366, #128c7e); border-color: transparent; }
.pl-share.more { background: linear-gradient(135deg, #ff4fd8, #8a5cff); border-color: transparent; }
/* photos and videos: a 3D frame that tilts under the finger, with a glossy shine */
.pl-bubble.media { padding: 6px 6px 8px; }
.pl-media { position: relative; width: min(260px, 62vw); border-radius: 14px; overflow: hidden; transform-style: preserve-3d; transition: transform .25s ease-out;
  box-shadow: 0 10px 22px rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.18), 0 0 16px rgba(54,226,255,.25); transform: perspective(700px); }
.pl-media img, .pl-media video { display: block; width: 100%; max-height: 340px; object-fit: cover; background: #0b1030; min-height: 120px; }
.pl-media img { cursor: zoom-in; }
.pl-shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--sx, 30%) var(--sy, 20%), rgba(255,255,255,.28), transparent 45%); mix-blend-mode: screen; }
.pl-viewer { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(0,0,0,.92); border-radius: inherit; }
.pl-viewer img { max-width: 96%; max-height: 90%; border-radius: 12px; box-shadow: 0 0 30px rgba(54,226,255,.35); }
.pl-viewer .pl-ic { position: absolute; top: 12px; right: 12px; }
.pl-progress { position: relative; overflow: hidden; border-radius: 10px; padding: 6px 10px; background: rgba(54,226,255,.12); font-size: .85rem; font-weight: 700; }
.pl-progress i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, #36e2ff, #ff4fd8); transition: width .2s; }
.pl-person { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); }
.pl-ptxt { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.pl-ptxt small { opacity: .75; }
.pl-codebox { margin: 0; align-self: center; font-size: 1.4rem; font-weight: 800; letter-spacing: .25em; padding: 8px 16px; border-radius: 14px; border: 1px dashed rgba(54,226,255,.6); }

/* ---------- Draw my own card ---------- */
.draw-btn { background: linear-gradient(135deg, #36e2ff, #3ddc84); color: #06202a; font-weight: 800; border: 0; box-shadow: 0 0 18px rgba(54,226,255,.45); }
.art-free-btn { align-self: stretch; }
/* art lessons */
.art-modal { z-index: 58; }
.art-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.art-list .hint { margin: 0; }
.art-cat { margin: 10px 0 2px; font-size: 17px; }
.art-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.art-card { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.art-card:hover { background: rgba(255,255,255,.1); }
.art-card canvas { width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; }
.art-name { font-size: 13px; line-height: 1.2; }
.art-stars, .art-big-stars { color: #ffd34d; letter-spacing: 2px; }
.art-stars { font-size: 12px; min-height: 14px; }
.art-big-stars { font-size: 34px; text-align: center; }
.art-work { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.art-tip { display: flex; gap: 8px; align-items: baseline; font-weight: 700; line-height: 1.3; }
.art-step { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); }
.art-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.art-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #36e2ff, #8a5cff); transition: width .2s; }
.art-bar i.ok { background: linear-gradient(90deg, #3ddc84, #b8ff6a); }
.art-stage { position: relative; }
.art-ref { position: absolute; top: 8px; inset-inline-end: 8px; width: min(28%, 180px); height: auto; aspect-ratio: 3 / 2; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.4); pointer-events: none; touch-action: auto; cursor: default; }
/* copy from the example: the example and the blank page side by side (stacked on an upright phone) */
.art-stage.side { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.art-stage.side .art-ref { position: static; order: -1; width: auto; max-width: 100%; max-height: 38%; flex: 0 1 auto; }
.art-stage.side #arView { min-height: 0; max-height: 60%; }
@media (orientation: landscape) and (min-width: 640px) {
  .art-stage.side { flex-direction: row; }
  .art-stage.side .art-ref { max-width: 42%; max-height: 100%; }
  .art-stage.side #arView { max-width: 56%; max-height: 100%; }
}
.art-mode { margin: 4px 0; }
.art-actions { justify-content: flex-end; }
.art-actions #arSkip { margin-inline-end: auto; }
.art-tools { justify-content: center; }
.art-tools input[type=range] { flex: 0 1 160px; }
.art-tools { flex-wrap: wrap; }
.art-grades { justify-content: center; gap: 6px; }
.art-grade { min-width: 44px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(5, 3, 20, 0.6); color: var(--text); font: 700 13px/1 system-ui, sans-serif; cursor: pointer; }
.art-grade.on { border-color: #ff2bd6; box-shadow: 0 0 10px rgba(255, 43, 214, 0.6); }
.art-end { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.art-done-pic { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 10px; }
.draw-modal { z-index: 59; padding: 0; grid-template-columns: minmax(0, 1fr); }
.draw-box { width: 100%; height: 100%; max-height: 100dvh; padding: 8px 10px; gap: 8px; display: flex; flex-direction: column; border-radius: 0; background: #1a1430; }
@media (min-width: 900px) { .draw-modal { padding: 14px; } .draw-box { width: min(1180px, 100%); height: min(940px, 100%); border-radius: 20px; } }
.draw-top { display: flex; align-items: center; gap: 8px; }
.draw-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the lessons bar has five buttons: let a long lesson name use two lines instead of "Aufwärmli…" */
#arTitle { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .9rem; line-height: 1.15; }
.draw-top .pl-ic[disabled] { opacity: .35; }
.draw-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.draw-stage canvas { max-width: 100%; max-height: 100%; aspect-ratio: 3 / 2; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.5); touch-action: none; background: #fffdf8; cursor: crosshair; }
.draw-tools, .draw-text, .draw-stamps { display: flex; flex-direction: column; gap: 6px; }
.draw-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.draw-row input[type=range] { flex: 1; min-width: 120px; }
.draw-row .big-dot { font-size: 1.6rem; }
.draw-tool { width: 48px; height: 48px; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.08); color: #fff; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.draw-tool.on { border-color: #36e2ff; box-shadow: 0 0 12px rgba(54,226,255,.6); background: rgba(54,226,255,.15); }
.draw-colors { gap: 5px; }
.draw-color { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); cursor: pointer; }
.draw-color.on { border: 3px solid #fff; box-shadow: 0 0 10px #fff; transform: scale(1.1); }
.draw-custom { width: 38px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.draw-text input:not([type]) , #dwTextIn { flex: 1; min-width: 0; }
.draw-font { min-width: 52px; height: 44px; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.9); color: #2a1a40; font-size: 1.3rem; cursor: pointer; }
.draw-font.on { border-color: #ff4fd8; box-shadow: 0 0 10px rgba(255,79,216,.6); }
#dwMic.on { border-color: #ff3b6b; box-shadow: 0 0 12px #ff3b6b; }
.draw-stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; max-height: 120px; overflow-y: auto; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); }
.draw-stamp { height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 1.6rem; cursor: pointer; padding: 3px; }
.draw-stamp svg { width: 100%; height: 100%; }
.draw-stamp.draw-art { background: #fffdf8; }
.draw-box > * { min-width: 0; }
.dress-rows { min-width: 0; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); }
.dress-row { display: flex; align-items: center; gap: 6px; }
.dress-ico { font-size: 1.3rem; flex: 0 0 auto; }
.dress-strip { display: flex; gap: 4px; overflow-x: auto; padding: 3px; flex: 1; min-width: 0; }
.dress-row { min-width: 0; }
.dress-opt { flex: 0 0 52px; height: 52px; background: #fffdf8; }
.dress-opt.on, #dwBehind.on { outline: 3px solid #8a5cff; outline-offset: 1px; }
.draw-stamp canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.draw-stamps .hint { margin: 0; flex: 1; }

/* ---------- NeoGreet on a computer (link.js): the QR screen, the status bar, the phone's list ---------- */
.link-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 0%, #fff, #f2ecff 60%, #e9e2fb); color: #2a1d45; }
.link-card { width: min(460px, 100%); background: #fff; border-radius: 22px; padding: 24px; text-align: center; box-shadow: 0 14px 40px rgba(60, 40, 120, 0.18), 0 0 0 1px rgba(138, 92, 255, 0.2); }
.link-card h1 { margin: 6px 0 10px; font-size: 1.4rem; color: #2a1d45; }
.link-logo { width: 64px; height: 64px; border-radius: 16px; }
.link-steps { text-align: start; margin: 0 0 12px; padding-inline-start: 22px; line-height: 1.5; }
.link-qr { width: min(240px, 70vw); margin: 0 auto; padding: 8px; border-radius: 14px; box-shadow: 0 0 0 2px rgba(138, 92, 255, 0.35), 0 0 22px rgba(255, 79, 216, 0.25); }
.link-qr svg { width: 100%; height: auto; display: block; }
.link-code b { letter-spacing: 3px; font-size: 1.2rem; color: #8a5cff; }
.link-screen .hint { color: #5d5178; }
body.link-waiting > :not(.link-screen) { visibility: hidden; }
.link-bar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 0 0 14px 14px; background: rgba(61, 220, 132, 0.95); color: #062b14; font: 700 13px/1.2 system-ui, sans-serif; }
.link-bar.off { background: rgba(255, 176, 32, 0.95); color: #3a2400; }
.link-out { border: 0; border-radius: 8px; padding: 4px 8px; background: rgba(255, 255, 255, 0.75); font-weight: 700; cursor: pointer; }
.invite-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.invite-qr { background: #fff; }
.invite-url { margin: 0; font-weight: 800; letter-spacing: .5px; }
.link-box { width: min(480px, 100%); display: flex; flex-direction: column; gap: 10px; }
.link-type { display: flex; gap: 8px; }
.link-type input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; }
.link-cam video { width: 100%; border-radius: 12px; background: #000; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.link-row small { display: block; opacity: .7; font-weight: 400; }

/* the drawing studios are light, like an artist's bright studio: pearl white glass with neon edges */
.draw-modal { background: rgba(240, 236, 255, 0.6); }
.draw-box { background: radial-gradient(circle at 15% 0%, #ffffff 0%, #f4f0ff 45%, #ece6fb 100%); color: #2a1d45; box-shadow: inset 0 0 0 1px rgba(138, 92, 255, 0.25); }
.draw-box h3, .draw-box .art-cat, .draw-box .draw-title, .draw-box #arTitle, .draw-box .art-tip { color: #2a1d45; text-shadow: none; }
.draw-box .hint { color: #5d5178; }
.draw-box .pl-ic { background: #fff; color: #3a2a63; border: 1px solid rgba(138, 92, 255, 0.35); box-shadow: 0 2px 10px rgba(138, 92, 255, 0.18); }
.draw-box .btn.ghost { background: #fff; color: #3a2a63; border: 1px solid rgba(138, 92, 255, 0.35); }
.draw-box .seg button { background: #fff; color: #3a2a63; border-color: rgba(138, 92, 255, 0.3); }
.draw-box .seg button.active { background: linear-gradient(135deg, #ff4fd8, #8a5cff); color: #fff; border-color: transparent; }
.draw-box .draw-tool { background: #fff; color: #3a2a63; border-color: rgba(138, 92, 255, 0.18); box-shadow: 0 2px 8px rgba(60, 40, 120, 0.1); }
.draw-box .draw-tool.on { border-color: #36c8ff; box-shadow: 0 0 14px rgba(54, 200, 255, 0.55); background: #effbff; }
.draw-box .art-card { background: #fff; border-color: rgba(138, 92, 255, 0.2); box-shadow: 0 4px 14px rgba(60, 40, 120, 0.1); color: #2a1d45; }
.draw-box .art-card:hover { background: #faf7ff; }
.draw-box .art-step, .draw-box .art-bar { background: rgba(138, 92, 255, 0.14); color: #4a3780; }
.draw-box .art-grade { background: #fff; color: #3a2a63; border-color: rgba(138, 92, 255, 0.3); }
.draw-box .art-grade.on { background: linear-gradient(135deg, #ff4fd8, #8a5cff); color: #fff; border-color: transparent; }
.draw-box .draw-stage canvas { box-shadow: 0 10px 30px rgba(60, 40, 120, 0.18), 0 0 0 1px rgba(138, 92, 255, 0.15); }
.draw-box .draw-color { border-color: rgba(60, 40, 120, 0.25); }
.draw-box .draw-color.on { border-color: #8a5cff; box-shadow: 0 0 10px rgba(138, 92, 255, 0.6); }
.draw-box .draw-stamp-grid, .draw-box .dress-rows { background: rgba(138, 92, 255, 0.08); }
.draw-box .draw-stamp { background: #fff; }
.draw-box input:not([type]), .draw-box #dwTextIn { background: #fff; color: #2a1d45; border: 1px solid rgba(138, 92, 255, 0.3); }

/* ---------- the holiday spotlight: the next holiday, up front on home ---------- */
.holiday-spot { margin: 14px 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border: 1px solid rgba(255, 196, 0, 0.45); box-shadow: 0 0 26px rgba(255, 140, 0, 0.25); }
.hs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hs-head h2 { margin: 0; font-size: 22px; }
.hs-when { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; background: rgba(255, 196, 0, 0.18); color: #ffd36e; }
.hs-when.now { background: linear-gradient(135deg, #ff4fd8, #ffb020); color: #fff; animation: hsPulse 1.6s ease-in-out infinite; }
@keyframes hsPulse { 50% { box-shadow: 0 0 18px rgba(255, 79, 216, 0.8); } }
.hs-cards { grid-template-columns: repeat(3, 1fr); }
#remFriends { margin-top: 6px; }

/* ---------- the Art Academy: levels, today's practice, my art journey ---------- */
.ac-top { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #ffeefa, #efe8ff 60%, #e6f7ff); box-shadow: 0 6px 20px rgba(138, 92, 255, 0.18), inset 0 0 0 1px rgba(138, 92, 255, 0.25); }
.ac-top-title { font-size: 19px; }
.ac-top-stats { font-weight: 700; color: #4a3780; }
.ac-top-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-top-row .btn { flex: 1 1 140px; }
.ac-level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.ac-chip { font: 800 10px/1.4 system-ui, sans-serif; letter-spacing: .04em; padding: 2px 7px; border-radius: 8px; color: #fff; }
.ac-chip.free { background: linear-gradient(135deg, #22c58b, #36c8ff); }
.ac-chip.pro { background: linear-gradient(135deg, #ff2bd6, #7b2bff); }
.ac-count { font-size: 12px; font-weight: 700; color: #7a6aa0; }
.ac-lock { margin: 0; }
.art-card.locked { opacity: .45; filter: grayscale(.6); }
.art-card.locked .art-name::before { content: '🔒 '; }
.ac-more { margin-top: 22px; }
.ac-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ac-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(60, 40, 120, 0.1); text-align: center; }
.ac-stat b { font-size: 18px; }
.ac-stat span { font-size: 11px; color: #6a5d8a; }
.ac-bar-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ac-bar { height: 10px; border-radius: 6px; background: rgba(138, 92, 255, 0.14); overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: linear-gradient(90deg, #36c8ff, #8a5cff, #ff4fd8); border-radius: 6px; }
.ac-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ac-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px dashed rgba(138, 92, 255, 0.3); background: transparent; color: #8b80a6; font: inherit; font-size: 11px; font-weight: 700; text-align: center; filter: grayscale(1); opacity: .55; }
.ac-badge.got { border: 1px solid rgba(255, 211, 77, 0.8); background: #fffbea; color: #2a1d45; filter: none; opacity: 1; cursor: pointer; box-shadow: 0 0 14px rgba(255, 196, 0, 0.35); }
.ac-badge-ico { font-size: 28px; }
.ac-new-badge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fffbea; box-shadow: 0 0 18px rgba(255, 196, 0, 0.45); font-weight: 800; }
.ac-new-badge .btn { margin-inline-start: auto; }
.ac-done { font-weight: 800; font-size: 17px; text-align: center; color: #c2410c; }
.ac-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ac-ba { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: #fbf8f1; }
.ac-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ac-pic { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #fbf8f1; box-shadow: 0 4px 12px rgba(60, 40, 120, 0.12); }
.ac-pic img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ac-name { padding: 10px 12px; border-radius: 12px; font: inherit; font-size: 16px; }
.ac-remind { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; font-weight: 700; }
.ac-remind input { width: 20px; height: 20px; }

/* ---------- the card finder ---------- */
.finder-btn { background: linear-gradient(135deg, #ffb020, #ff4fd8 55%, #8a5cff); box-shadow: 0 0 22px rgba(255,79,216,.55); }
.finder-box { width: min(760px, 100%); max-height: 100%; overflow: auto; gap: 10px; }
.finder-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finder-steps { display: flex; gap: 8px; }
.finder-steps i { width: 34px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
.finder-steps i.on { background: linear-gradient(90deg, #36e2ff, #ff4fd8); box-shadow: 0 0 8px rgba(255,79,216,.6); }
.finder-q { margin: 0; text-align: center; font-size: 1.5rem; }
.finder-picked { margin: 0; text-align: center; min-height: 1.2em; }
.finder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.finder-opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 104px; padding: 12px 8px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: inherit; font: inherit; font-weight: 800; cursor: pointer; text-align: center; transition: transform .12s, border-color .12s; }
.finder-opt:hover, .finder-opt:focus-visible { border-color: #36e2ff; transform: translateY(-2px); box-shadow: 0 0 14px rgba(54,226,255,.35); }
.finder-opt .ico { font-size: 2.2rem; line-height: 1; }
.finder-opt .badge { position: absolute; top: 6px; right: 6px; font-size: .65rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: linear-gradient(135deg, #ff3b6b, #ff8a2a); }
.finder-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.finder-name .btn { flex: none; }
.finder-name input { flex: 1; min-width: 0; }
.finder-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- printed folded cards ---------- */
.print-box { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); }
.print-box .hint { margin: 0; }
.print-box select { flex: 1; min-width: 0; }

/* ---------- print shops ---------- */
.print-shops { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(54,226,255,.08); border: 1px solid rgba(54,226,255,.35); }
.print-shops .hint { margin: 0; }
.print-shop-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- send later ---------- */
.sched-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sched-row input { flex: 1; min-width: 0; min-height: 46px; }
.sched-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sched-item { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 44px 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); cursor: pointer; }
.sched-item .note-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.send-now-box { width: min(460px, 100%); text-align: center; }
.send-now-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- toast ---------- */
/* the plans can be asked for from any screen (piano, lessons, drawing), so they open above all of them */
#plansModal { z-index: 61; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 62;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(20, 12, 45, 0.95);
  border: 1px solid var(--c1);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
  font-weight: 700;
  transform: translate(-50%, 160%);
  transition: transform 0.35s ease;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- animations ---------- */
@keyframes flow { to { background-position: 300% 0; } }
@keyframes drift { to { transform: translate(4%, -3%) rotate(6deg); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes reveal {
  0% { transform: rotateY(-110deg) scale(0.55); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; }
}

/* ---------- print: the card alone, full page, landscape ---------- */
#printArea { display: none; }
@media print {
  @page { size: landscape; margin: 8mm; }
  html, body { background: #fff; }
  body::before, body > *:not(#printArea) { display: none !important; }
  #printArea { display: flex; align-items: center; justify-content: center; height: 100vh; }
  #printArea img { max-width: 100%; max-height: 100%; border-radius: 12px; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  /* minmax(0, 1fr): a long word or a wide control can't push the page wider than a small phone */
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .layout .editor, .layout .stage { grid-column: 1; grid-row: auto; }
  /* the live card stays in view at the top while the steps scroll underneath */
  .stage { top: 0; z-index: 5; padding: 6px 0 10px; background: linear-gradient(var(--bg) 85%, transparent); }
  .card-wrap { max-width: min(100%, 52vh * 1.5); margin: 0 auto; }
  .note { display: none; }
  .panel-nav {
    position: sticky; bottom: 0; z-index: 4; margin: 0 -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: rgba(10, 6, 28, 0.94); backdrop-filter: blur(10px); border-radius: 0 0 var(--radius) var(--radius);
  }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .tagline { display: none; }
  .logo { font-size: 22px; }
  /* in the studio the header keeps just Home and the language so it stays on one line */
  body:not(.on-home) .brand { display: none; }
  body:not(.on-home) .topbar { justify-content: space-between; }
  .card-wrap { max-width: min(100%, 34vh * 1.5); }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tpl-cap { padding: 8px 10px 10px; }
  .tpl-cap strong { font-size: 13px; }
  .hero-actions, .hero-actions .btn { width: 100%; justify-content: center; }
  .tabs button { font-size: 10.5px; }
  /* long words (Tamil, German…) take the room the short ones don't need */
  .tabs { display: flex; gap: 2px; }
  .tabs button { flex: 1 1 auto; padding-left: 1px; padding-right: 1px; }
}
@media (max-width: 440px) {
  .rem-add { grid-template-columns: 1fr; }
  .up-row .btn.small { padding: 7px 9px; }
  .row.two, .sliders, .occ-groups { grid-template-columns: 1fr; }
  .scenes { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, .logo, .btn.primary, .app-frame, .app-glow, .app-glow > div, .panel { animation: none; }
}
