:root {
  --bg: #f7f3ea;
  --bg-2: #efe8d8;
  --surface: #fffdf8;
  --surface-2: #f6f0e3;
  --ink: #1d2626;
  --ink-2: #56605d;
  --ink-3: #8b928e;
  --line: #e6dfcf;
  --primary: #0f766e;
  --primary-ink: #ffffff;
  --gold: #b7862c;
  --gold-soft: #f6ead0;
  --danger: #c2410c;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 8px 24px rgba(60, 45, 20, .07);
  --shadow-lg: 0 -8px 40px rgba(30, 20, 0, .18);
  --radius: 20px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101816; --bg-2: #16211e; --surface: #18221f; --surface-2: #1f2b28;
    --ink: #eef2ee; --ink-2: #aab5b0; --ink-3: #72807a; --line: #2a3733;
    --primary: #2dd4bf; --primary-ink: #04201c; --gold: #e2b457; --gold-soft: #3a3020;
    --danger: #fb923c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 -8px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101816; --bg-2: #16211e; --surface: #18221f; --surface-2: #1f2b28;
  --ink: #eef2ee; --ink-2: #aab5b0; --ink-3: #72807a; --line: #2a3733;
  --primary: #2dd4bf; --primary-ink: #04201c; --gold: #e2b457; --gold-soft: #3a3020;
  --danger: #fb923c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 -8px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 110% -10%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at -20% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 110px);
}

/* Header */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.top .hello { flex: 1; min-width: 0; }
.top .hello small { display: block; color: var(--ink-3); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.top h1 { font-size: 26px; line-height: 1.15; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow); font-size: 19px; flex: none;
}
.chip-streak {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 14px; flex: none;
}

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 22px 4px 10px; }
.section-title h2 { font-size: 19px; flex: 1; }
.section-title .count { color: var(--ink-3); font-weight: 700; font-size: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* Avatar */
.avatar {
  --c: var(--primary);
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); border: 2px solid var(--c); font-size: 18px;
}
.avatar.lg { width: 56px; height: 56px; font-size: 28px; }

/* Week strip */
.week { display: grid; grid-template-columns: 32px repeat(7, 1fr) 32px; gap: 4px; align-items: center; margin-bottom: 14px; }
.week .nav { height: 56px; border-radius: 12px; color: var(--ink-3); font-size: 20px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 7px; border-radius: 14px;
  color: var(--ink-2); font-weight: 700; font-size: 12px; position: relative;
}
.day b { font-size: 17px; color: var(--ink); font-weight: 800; }
.day.today b { color: var(--primary); }
.day.sel { background: var(--ink); color: var(--bg); }
.day.sel b { color: var(--bg); }
.day.future { opacity: .45; }
.day .dots { display: flex; gap: 3px; height: 6px; }
.day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.day .dots i.full { background: var(--c); }
.day .dots i.part { background: color-mix(in srgb, var(--c) 40%, transparent); }

/* Couple card */
.couple { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.couple .person { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.couple .person b { font-size: 15px; }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .bar { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.3,1.4,.5,1); }
.ring .inner { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; }
.ring .pct { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; }
.couple .heart { font-size: 22px; opacity: .8; }
.couple .heart.beat { animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.couple-msg { margin-top: 14px; text-align: center; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.couple-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

.quote { text-align: center; font-family: var(--display); font-style: italic; color: var(--ink-2); padding: 4px 18px 0; font-size: 15px; }

/* Messages */
.inbox { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.msg {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(135deg, var(--gold-soft), var(--surface)); box-shadow: var(--shadow);
  animation: pop .4s cubic-bezier(.3,1.5,.5,1);
}
.msg .body { flex: 1; min-width: 0; font-weight: 600; }
.msg .body small { display: block; color: var(--ink-3); font-weight: 700; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* Task rows */
.tasks { display: flex; flex-direction: column; gap: 10px; }
.task {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s;
}
.task:active { transform: scale(.985); }
.task .emoji { font-size: 26px; width: 34px; text-align: center; flex: none; }
.task .info { flex: 1; min-width: 0; }
.task .title { font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.task.done .title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--c) 60%, transparent); }
.task .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink-3); font-size: 13px; font-weight: 700; margin-top: 2px; }
.task .meta .fire { color: var(--gold); }
.task .meta .late { color: var(--danger); }
.task .rx { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.rx span { background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-size: 14px; }
.task.done::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%); pointer-events: none; }
.check {
  --c: var(--primary);
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2.5px solid color-mix(in srgb, var(--c) 45%, var(--line)); color: transparent; font-size: 22px; font-weight: 900;
  transition: background .2s, border-color .2s, transform .2s;
}
.check.on { background: var(--c); border-color: var(--c); color: #fff; animation: tick .35s cubic-bezier(.3,1.6,.5,1); }
.check.ro { width: 34px; height: 34px; font-size: 17px; }
@keyframes tick { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.mini-btn {
  padding: 7px 11px; border-radius: 999px; background: var(--surface-2); font-weight: 800; font-size: 13px; color: var(--ink-2); flex: none;
}
.mini-btn.accent { background: color-mix(in srgb, var(--c, var(--primary)) 16%, var(--surface)); color: var(--c, var(--primary)); }
.empty { text-align: center; padding: 26px 16px; color: var(--ink-3); font-weight: 600; }
.empty .big { font-size: 38px; display: block; margin-bottom: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 14px; font-weight: 800; background: var(--surface-2); color: var(--ink);
}
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.fab {
  position: fixed; right: max(16px, calc(50% - 264px)); bottom: calc(env(safe-area-inset-bottom) + 84px); z-index: 20;
  width: 58px; height: 58px; border-radius: 20px; background: var(--primary); color: var(--primary-ink);
  font-size: 32px; line-height: 1; box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 45%, transparent);
  display: grid; place-items: center;
}

/* Bottom nav */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
}
.tabbar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; color: var(--ink-3); font-weight: 800; font-size: 12px; border-radius: 12px; }
.tabbar button span { font-size: 22px; filter: grayscale(1); opacity: .7; transition: .2s; }
.tabbar button.on { color: var(--ink); }
.tabbar button.on span { filter: none; opacity: 1; transform: translateY(-1px) scale(1.08); }

/* Segmented */
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 9px 8px; border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Manage list */
.mrow { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .emoji { font-size: 24px; width: 32px; text-align: center; }
.mrow .info { flex: 1; min-width: 0; }
.mrow .info b { display: block; overflow-wrap: anywhere; }
.mrow.paused { opacity: .55; }
.mrow .acts { display: flex; gap: 2px; }
.mrow .acts button { width: 34px; height: 34px; border-radius: 10px; color: var(--ink-3); font-size: 16px; }
.mrow .acts button:active { background: var(--surface-2); }

/* Heatmap & grids */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 100%; min-width: 14px; aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); display: block; }
.heat i.l1 { background: color-mix(in srgb, var(--c) 30%, var(--surface-2)); }
.heat i.l2 { background: color-mix(in srgb, var(--c) 60%, var(--surface-2)); }
.heat i.l3 { background: var(--c); }
.heat i.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat i.none { background: transparent; }
.legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 12px; color: var(--ink-3); margin-top: 8px; font-weight: 700; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.grid-wrap { overflow-x: auto; margin: 0 -4px; }
table.grid { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
table.grid th { font-weight: 800; color: var(--ink-3); padding: 2px; }
table.grid th.name { text-align: left; font-size: 14px; color: var(--ink); white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--surface); padding-right: 6px; }
table.grid td { width: 24px; height: 24px; min-width: 24px; border-radius: 6px; text-align: center; background: var(--surface-2); font-size: 11px; font-weight: 800; }
table.grid td.ok { background: var(--c); color: #fff; }
table.grid td.miss { background: color-mix(in srgb, var(--danger) 16%, var(--surface-2)); }
table.grid td.na { background: transparent; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface-2); border-radius: 16px; padding: 12px; }
.stat b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.stat span { color: var(--ink-3); font-weight: 700; font-size: 13px; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vs:last-child { border-bottom: 0; }
.vs .l, .vs .r { font-family: var(--display); font-size: 22px; font-weight: 700; }
.vs .l { text-align: right; } .vs .r { text-align: left; }
.vs .k { color: var(--ink-3); font-weight: 800; font-size: 12px; text-align: center; text-transform: uppercase; letter-spacing: .04em; max-width: 120px; }
.vs .win { color: var(--c); }
.bar-row { margin: 10px 0; }
.bar-row .lbl { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 4px; gap: 8px; }
.bar-row .lbl span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--c); transition: width .6s; }

/* Sheet */
.sheet-bg {
  position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 12, .45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px);
  animation: up .28s cubic-bezier(.2,.9,.3,1);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { font-size: 22px; margin-bottom: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }

/* Forms */
.field { margin-bottom: 14px; }
.field > label, .label { display: block; font-weight: 800; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg);
  outline: none; font-size: 16px; transition: border-color .15s;
}
.input:focus { border-color: var(--primary); }
textarea.input { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  padding: 8px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; color: var(--ink-2);
  border: 1.5px solid transparent;
}
.chips button.on { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); border-color: var(--primary); color: var(--ink); }
.emoji-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-pick button { font-size: 22px; aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; }
.emoji-pick button.on { border-color: var(--primary); background: var(--surface-2); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 2px transparent; }
.colors button.on { box-shadow: 0 0 0 2px var(--c); }
.templates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 -18px 14px; padding: 0 18px 4px; scrollbar-width: none; }
.templates button { flex: none; padding: 9px 12px; border-radius: 12px; background: var(--gold-soft); font-weight: 700; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); font-size: 22px; font-weight: 800; }
.stepper input { text-align: center; font-size: 22px; font-weight: 800; flex: 1; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }
.rx-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.rx-pick button { font-size: 24px; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); border: 2px solid transparent; }
.rx-pick button.on { border-color: var(--gold); background: var(--gold-soft); }

/* Onboarding */
.hero { text-align: center; padding: 30px 8px 10px; }
.hero .logo { font-size: 58px; }
.hero h1 { font-size: 34px; margin: 6px 0; }
.hero p { color: var(--ink-2); margin: 0 auto 18px; max-width: 360px; }
.pick-user { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 10px; font-weight: 800; font-size: 18px; text-align: left; }

/* Toasts */
#toast-root { position: fixed; top: calc(env(safe-area-inset-top) + 12px); left: 0; right: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.3,1.5,.5,1); max-width: 520px; text-align: center; }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .3s; }

.offline { position: fixed; bottom: calc(env(safe-area-inset-bottom) + 76px); left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; z-index: 30; }

/* 14-day task grid */
.days-head, .cells { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.days-head span { text-align: center; font-size: 10px; font-weight: 800; color: var(--ink-3); line-height: 1.2; }
.trow { margin-top: 10px; }
.tname { font-weight: 700; font-size: 14px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cells i { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; }
.cells i.ok { background: var(--c); color: #fff; }
.cells i.miss { background: color-mix(in srgb, var(--danger) 16%, var(--surface-2)); }
.cells i.na { background: transparent; border: 1.5px dashed var(--line); }

/* --- unified app additions --- */
.tabbar button span { position: relative; }
.badge { position: absolute; top: -4px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font: 800 11px/17px var(--font); font-style: normal; filter: none; }
.list-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.list-chips button { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; color: var(--ink-2); }
.list-chips button.on { background: var(--ink); color: var(--bg); }
.day-ring { display: flex; align-items: center; gap: 18px; }
.day-ring .ring .inner { font-size: 20px; font-weight: 800; }
.task.sub { margin-left: calc(var(--depth) * 22px); padding-top: 9px; padding-bottom: 9px; box-shadow: none; background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.task.sub .emoji { font-size: 20px; width: 26px; }
.task.sub .check { width: 36px; height: 36px; font-size: 18px; }
.star { color: var(--gold); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 12px; text-align: left; }
.toggle-row small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.toggle-row i { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; transition: .2s; }
.toggle-row i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: .2s; }
.toggle-row.on i { background: var(--primary); }
.toggle-row.on i::after { left: 21px; }
.colors button.none { background: var(--surface-2); color: var(--ink-3); font-weight: 800; box-shadow: 0 0 0 2px transparent; }
.colors button.none.on { box-shadow: 0 0 0 2px var(--ink-3); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.code { font: 800 34px/1 var(--display); letter-spacing: .18em; text-align: center; padding: 16px; margin: 6px 0 12px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); user-select: all; }
@media (max-width: 380px) { .tabbar button { font-size: 11px; } }
body.embed .wrap { padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom) + 90px); }
body.embed .fab { bottom: calc(env(safe-area-inset-bottom) + 18px); }
body.embed .offline { bottom: calc(env(safe-area-inset-bottom) + 16px); }

/* Birlikte groups */
.gbar { display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 12px; padding: 2px 4px 4px; scrollbar-width: none; }
.gbar::-webkit-scrollbar { display: none; }
.gbar button { position: relative; flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.gbar button.on { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--ink); outline: 1.5px solid var(--primary); }
.gbar .badge { top: -3px; right: -3px; }
.rings { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.rings .person { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; }
.rings .person b { font-size: 14px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rings:has(.person:nth-child(4)) .ring { width: 72px; height: 72px; }
.rings:has(.person:nth-child(4)) .ring .inner { font-size: 24px; }
.pending-req { display: flex; align-items: center; gap: 12px; }
.pending-req .big-emoji { font-size: 28px; }
.pending-req .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pending-list .mrow .mini-btn { flex: none; }
.board { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 10px 4px; align-items: center; font-size: 14px; }
.board > span:not(.who) { color: var(--ink-3); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.board > b { text-align: center; font-family: var(--display); font-size: 17px; }
.board .who { display: flex; align-items: center; gap: 6px; font-weight: 800; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.settings .set-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.settings .set-row span { flex: 1; font-weight: 700; }
.settings .set-row .input { width: 76px; flex: none; padding: 8px 10px; }
.settings .set-label { font-weight: 700; margin: 12px 0 6px; }
