/* Tandemly – Vica & Kristóf */
:root {
  --bg: #F7F3EE;
  --surface: #FFFFFF;
  --surface-2: #F1EBE4;
  --ink: #261F1C;
  --ink-2: #6E625B;
  --ink-3: #9A8D84;
  --line: #E7DFD6;
  --vica: #D2506F;
  --vica-soft: #FBE3E9;
  --kristof: #1F7F86;
  --kristof-soft: #DAF0EF;
  --kozos: #7656C2;
  --kozos-soft: #ECE5FA;
  --primary: #261F1C;
  --on-primary: #FFFFFF;
  --warn: #B85B1E;
  --warn-soft: #FBE9D9;
  --danger: #B93A33;
  --ok: #2F7D4F;
  --shadow: 0 1px 2px rgba(38, 31, 28, .06), 0 6px 20px rgba(38, 31, 28, .06);
  --shadow-lg: 0 -8px 40px rgba(38, 31, 28, .18);
  --seg-on: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-round: ui-rounded, 'SF Pro Rounded', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161312; --surface: #211C1A; --surface-2: #2B2522; --ink: #F3ECE6; --ink-2: #B0A399; --ink-3: #7F736B;
    --line: #362F2B; --vica: #F27D9A; --vica-soft: #3B2229; --kristof: #52B9BE; --kristof-soft: #17302F;
    --kozos: #A68EEC; --kozos-soft: #2A2440; --primary: #F3ECE6; --on-primary: #1A1514; --warn: #E9965C;
    --warn-soft: #3A2818; --danger: #F07068; --ok: #6CC490; --seg-on: #403733;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 -8px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161312; --surface: #211C1A; --surface-2: #2B2522; --ink: #F3ECE6; --ink-2: #B0A399; --ink-3: #7F736B;
  --line: #362F2B; --vica: #F27D9A; --vica-soft: #3B2229; --kristof: #52B9BE; --kristof-soft: #17302F;
  --kozos: #A68EEC; --kozos-soft: #2A2440; --primary: #F3ECE6; --on-primary: #1A1514; --warn: #E9965C;
  --warn-soft: #3A2818; --danger: #F07068; --ok: #6CC490; --seg-on: #403733;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-lg: 0 -8px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--bg);
}
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 500 15px/1.45 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button, a, [role="button"], .tab, .chip, label.seg { touch-action: manipulation; }
button, [role="button"], .tab, .chip, .seg { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
input, textarea, select { font: inherit; font-size: 16px; color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--kozos); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--ink-2); }
.display { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.025em; line-height: 1.08; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.stack { display: grid; gap: 14px; }

/* ---------- Belépés ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.login-card { width: min(400px, 100%); display: grid; gap: 22px; text-align: center; }
.login-card form { text-align: left; margin-top: 6px; }
.brand-logo { width: 88px; height: 88px; margin: 0 auto -2px; display: block; border-radius: 22.5%; box-shadow: 0 14px 34px -10px rgba(74, 51, 166, .55); }
.tagline { font-weight: 800; color: var(--kozos); letter-spacing: -0.01em; margin-top: -12px; }
.brand-mark { display: flex; justify-content: center; margin-bottom: -4px; }
.brand-mark .dot { width: 46px; height: 46px; border-radius: 50%; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .brand-mark .dot { mix-blend-mode: screen; } }
.dot-vica { background: var(--vica); }
.dot-kristof { background: var(--kristof); margin-left: -16px; }
.who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.who-card {
  display: grid; justify-items: center; gap: 12px; padding: 26px 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 17px;
  border: 2px solid transparent; transition: transform 120ms var(--ease-out), border-color 120ms;
}
.who-card:active { transform: scale(.97); }
.who-vica:active, .who-vica.sel { border-color: var(--vica); }
.who-kristof:active, .who-kristof.sel { border-color: var(--kristof); }

/* ---------- Avatar ---------- */
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-weight: 800; font-size: 13px; color: #fff; flex: none;
}
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-sm { width: 22px; height: 22px; font-size: 10.5px; }
.avatar-vica { background: var(--vica); }
.avatar-kristof { background: var(--kristof); }
.avatar-kozos { background: var(--kozos); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: #161312; } }
:root[data-theme="dark"] .avatar { color: #161312; }

/* ---------- Váz ---------- */
#main { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.title { font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -0.025em; line-height: 1.08; }
.avatar-btn { border-radius: 50%; transition: transform 120ms var(--ease-out); }
.avatar-btn:active { transform: scale(.92); }
.avatar-btn .avatar { width: 40px; height: 40px; font-size: 15px; }
.view {
  max-width: 720px; margin: 0 auto; outline: none;
  padding: 4px 16px calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom, 0px));
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; color: var(--ink-3);
  font-size: 11.5px; font-weight: 700; border-radius: 14px; transition: color 150ms, transform 120ms var(--ease-out);
}
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:active { transform: scale(.94); }
.tab.active { color: var(--ink); }
.tab.active svg { stroke-width: 2.2; }

.fab {
  position: fixed; z-index: 31; right: max(18px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform 140ms var(--ease-out);
}
.fab:active { transform: scale(.92); }
@media (min-width: 760px) { .fab { right: calc(50% - 360px + 8px); } }

/* ---------- Kártyák, listák ---------- */
.section { margin-top: 22px; }
.section:first-child { margin-top: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 10px; }
.section-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.link-btn { color: var(--ink-2); font-weight: 700; font-size: 14px; padding: 6px 4px; }
.link-btn:active { opacity: .6; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { display: grid; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }

.empty { padding: 22px 18px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* Esemény sor */
.ev {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; width: 100%;
  padding: 13px 14px 13px 12px; text-align: left; transition: background 120ms;
}
.ev:active { background: var(--surface-2); }
.ev-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; line-height: 1.2; }
.ev-time small { display: block; font-weight: 600; color: var(--ink-3); font-size: 12px; }
.ev-main { min-width: 0; display: flex; gap: 10px; align-items: center; }
.ev-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.ev-bar.vica { background: var(--vica); } .ev-bar.kristof { background: var(--kristof); } .ev-bar.kozos { background: var(--kozos); }
.ev-title { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-emoji { font-size: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.pill.vica { background: var(--vica-soft); color: var(--vica); }
.pill.kristof { background: var(--kristof-soft); color: var(--kristof); }
.pill.kozos { background: var(--kozos-soft); color: var(--kozos); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); }

/* Nap-csoport fejléc */
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 6px 8px; }
.day-head b { font-size: 15px; font-weight: 800; }
.day-head span { color: var(--ink-3); font-size: 13px; font-weight: 600; }

/* ---------- Mérleg ---------- */
.score { padding: 16px; display: grid; gap: 14px; }
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.score-person { display: flex; align-items: center; gap: 10px; }
.score-person.right { flex-direction: row-reverse; text-align: right; }
.score-num { font-family: var(--font-round); font-size: 32px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.score-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.score-bar i { display: block; height: 100%; transition: flex-grow 400ms var(--ease-out); min-width: 0; }
.score-bar .v { background: var(--vica); border-radius: 99px 0 0 99px; }
.score-bar .k { background: var(--kristof); border-radius: 0 99px 99px 0; }
.score-note { text-align: center; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }

.breakdown { display: grid; gap: 12px; padding: 16px; }
.bd-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.bd-name { font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.bd-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-count { font-size: 13px; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.bd-bar { grid-column: 1 / -1; display: flex; height: 8px; gap: 2px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.bd-bar i { height: 100%; }
.bd-bar .v { background: var(--vica); } .bd-bar .k { background: var(--kristof); }

/* ---------- Háztartási feladat kártyák ---------- */
.chores { display: grid; gap: 10px; }
.chore { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 14px; align-items: center; }
.chore-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 23px; background: var(--surface-2); }
.chore-title { font-weight: 800; font-size: 15.5px; }
.chore-meta { color: var(--ink-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 2px; }
.chore-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chore.due .chore-icon { background: var(--warn-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; font-weight: 800; font-size: 15px; transition: transform 110ms var(--ease-out), opacity 110ms, background 110ms;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-vica { background: var(--vica-soft); color: var(--vica); }
.btn-kristof { background: var(--kristof-soft); color: var(--kristof); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; font-size: 14px; padding: 0 12px; border-radius: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:active { background: var(--surface-2); }

/* Szegmentált választó */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; }
.segmented button { min-height: 38px; border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--ink-2); transition: background 150ms, color 150ms; }
.segmented button.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.segmented.who button.on[data-v="vica"] { color: var(--vica); }
.segmented.who button.on[data-v="kristof"] { color: var(--kristof); }
.segmented.who button.on[data-v="kozos"] { color: var(--kozos); }

/* Napló */
.log { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 8px 11px 14px; }
.log-icon { font-size: 20px; text-align: center; }
.log-title { font-weight: 700; font-size: 15px; }
.log-meta { color: var(--ink-2); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Naptár ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; }
.cal-month { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; text-transform: capitalize; }
.cal-nav { display: flex; gap: 4px; align-items: center; }
.cal { padding: 10px 8px 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--ink-3); padding: 4px 0 8px; letter-spacing: .03em; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1.05; display: grid; place-items: center; align-content: center; gap: 3px;
  border-radius: 14px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; transition: background 120ms;
}
.cal-day:active { background: var(--surface-2); }
.cal-day.out { color: var(--ink-3); opacity: .5; }
.cal-day.weekend { color: var(--ink-2); }
.cal-day .n { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .n { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-day.sel .n { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal-dots .vica { background: var(--vica); } .cal-dots .kristof { background: var(--kristof); } .cal-dots .kozos { background: var(--kozos); }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(20, 14, 12, .4); opacity: 0; transition: opacity 360ms var(--ease-sheet); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(640px, 100%);
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform 460ms var(--ease-sheet);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 4px 20px; flex: none; }
.sheet-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; border-radius: 26px; transform: translateY(-40%) scale(.98); opacity: 0; transition: transform 240ms var(--ease-out), opacity 200ms; }
  .sheet.open { transform: translateY(-50%) scale(1); opacity: 1; }
  .sheet-grip { display: none; }
}

/* Űrlap */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span, .field-label { font-size: 13px; font-weight: 800; color: var(--ink-2); letter-spacing: .01em; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); outline: none; transition: border-color 150ms; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink-2); }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239A8D84' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); font-weight: 700; font-size: 14px; }
.form-actions { display: grid; gap: 8px; margin-top: 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-weight: 700; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background 180ms; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 200ms var(--ease-out); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; border-radius: 99px;
  background: var(--surface-2); font-weight: 700; font-size: 14px; color: var(--ink-2); border: 1.5px solid transparent; transition: transform 110ms var(--ease-out);
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 12px; font-size: 21px; background: var(--surface-2); border: 1.5px solid transparent; }
.emoji-grid button.on { border-color: var(--ink); background: var(--surface); }

.settings-list .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; font-weight: 700; }
.settings-list .set-row:active { background: var(--surface-2); }
.settings-list .set-row small { color: var(--ink-2); font-weight: 600; }
.chore-edit-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px 10px 14px; width: 100%; text-align: left; }
.chore-edit-row:active { background: var(--surface-2); }
.chore-edit-row .ic { font-size: 22px; text-align: center; }

/* ---------- Ki hol lesz ma ---------- */
.where { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.where-col { padding: 14px 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.where-col + .where-col { border-left: 1px solid var(--line); }
.where-who { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.where-who b { font-size: 15px; }
.where-main { font-size: 14.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.where-main b { font-weight: 800; }
.where-sub { font-size: 12.5px; color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.where-col.free .where-main { color: var(--ink-2); }
.where-col.busy { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.live { font-size: 11px; font-weight: 800; color: var(--warn); background: var(--surface); padding: 2px 7px; border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; }
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.goers { display: inline-flex; margin-right: 6px; vertical-align: -3px; }
.goers .avatar + .avatar { margin-left: -5px; box-shadow: 0 0 0 1.5px var(--surface); }
.avatar-xs { width: 17px; height: 17px; font-size: 8.5px; }
.ev-meta { display: flex; align-items: center; min-width: 0; }
.ev-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Kutya ---------- */
.dog-card { padding: 6px 0 4px; }
.dog-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px 6px; }
.dog-progress {
  --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 360deg), var(--surface-2) 0);
}
.dog-progress span { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dog-slot { padding: 4px 0; }
.dog-slot + .dog-slot { border-top: 1px solid var(--line); }
.dog-slot-head { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 16px 2px; }
.dog-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px 8px 14px; }
.dog-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); }
.dog-row.due .dog-ic { background: var(--warn-soft); }
.dog-row.late .dog-ic { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.dog-row.done .dog-ic { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.dog-row.done .dog-title { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.dog-txt { min-width: 0; }
.dog-title { font-weight: 800; font-size: 15px; }
.dog-sub { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.dog-sub.due { color: var(--warn); font-weight: 800; }
.dog-sub.late { color: var(--danger); font-weight: 800; }
.dog-note { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; padding: 4px 8px; background: var(--surface-2); border-radius: 8px; display: inline-block; }
.dog-who { display: flex; gap: 8px; }
.who-btn {
  width: 44px; height: 44px; border-radius: 50%; font-weight: 800; font-size: 15px;
  transition: transform 110ms var(--ease-out), background 110ms;
}
.who-btn:active { transform: scale(.9); }
.who-btn:disabled { opacity: .45; }
.who-btn.vica { background: var(--vica-soft); color: var(--vica); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--vica) 35%, transparent); }
.who-btn.kristof { background: var(--kristof-soft); color: var(--kristof); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--kristof) 35%, transparent); }
.dog-week { padding: 8px 6px; overflow-x: auto; }
.dog-week table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dog-week th, .dog-week td { text-align: center; padding: 7px 2px; }
.dog-week thead th { font-size: 19px; font-weight: 600; }
.dog-week thead th small, .dog-week tbody th small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.dog-week tbody th { text-align: left; padding-left: 10px; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.dog-week tbody tr + tr { border-top: 1px solid var(--line); }
.dog-week .miss { color: var(--danger); font-weight: 800; }
.dog-week .empty-dot { color: var(--ink-3); font-weight: 800; }
@media (hover: hover) and (pointer: fine) {
  .who-btn.vica:hover { background: var(--vica); color: #fff; }
  .who-btn.kristof:hover { background: var(--kristof); color: #fff; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; transition: transform 220ms var(--ease-out), opacity 200ms;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); width: max-content;
  padding: 12px 12px 12px 18px; border-radius: 16px; background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast button { color: var(--bg); opacity: .85; font-weight: 800; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 16%, transparent); }
.toast.error { background: var(--danger); color: #fff; }

/* Betöltés */
.skeleton { height: 64px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; margin-bottom: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.offline-banner { margin: 6px 4px 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 13.5px; }

/* ---------- Oszlopok: telefonon egy sor, a sorrendet az order adja ---------- */
.cols { display: flex; flex-direction: column; }
.cols > .col { display: contents; }
.cols { gap: 22px; padding-top: 6px; }
.cols .section { margin-top: 0; }
.side-brand { display: none; }
.cal-evs { display: none; }
.week-head { margin-top: 22px; }

/* ---------- Tablet ---------- */
@media (min-width: 760px) {
  .view { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
}

/* ---------- Asztali gép ---------- */
@media (min-width: 1024px) {
  :root { --side-w: 232px; }
  #main { padding-left: var(--side-w); }
  .topbar { max-width: calc(1180px + 64px); margin: 0 auto; padding-top: 28px; padding-bottom: 14px; }
  .title { font-size: 36px; }
  .view { max-width: calc(1180px + 64px); padding: 4px 32px 64px; }

  .tabbar {
    top: 0; bottom: 0; right: auto; width: var(--side-w); display: flex; flex-direction: column; gap: 4px;
    padding: 28px 14px; border-top: 0; border-right: 1px solid var(--line);
    background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; }
  .side-brand img { width: 32px; height: 32px; border-radius: 22.5%; box-shadow: 0 4px 10px -4px rgba(74, 51, 166, .5); }
  .side-brand .dot { width: 24px; height: 24px; }
  .side-brand .dot-kristof { margin-left: -9px; }
  .side-brand b { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
  .tab { display: flex; align-items: center; gap: 12px; padding: 11px 14px; font-size: 15px; border-radius: 12px; justify-items: start; }
  .tab svg { width: 22px; height: 22px; }
  .tab.active { background: var(--surface-2); }

  .fab { right: 36px; bottom: 36px; }
  .toast { bottom: 36px; margin-left: calc(var(--side-w) / 2); }

  /* két oszlop */
  .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
  .cols > .col { display: block; min-width: 0; }
  .cols > .col > .section + .section { margin-top: 26px; }
  .week-head { margin-top: 6px; }
  .cal-layout { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
  .col-side { position: sticky; top: 110px; }

  /* naptár: eseménycímek a cellákban */
  .cal { padding: 12px; }
  .cal-day { aspect-ratio: auto; min-height: 104px; align-content: start; justify-items: stretch; place-items: start stretch; padding: 6px; gap: 4px; border-radius: 12px; text-align: left; }
  .cal-day .n { width: 28px; height: 28px; font-size: 14px; }
  .cal-day .cal-dots { display: none; }
  .cal-evs { display: grid; gap: 3px; min-width: 0; }
  .cal-ev { display: block; font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-ev.vica { background: var(--vica-soft); color: var(--vica); }
  .cal-ev.kristof { background: var(--kristof-soft); color: var(--kristof); }
  .cal-ev.kozos { background: var(--kozos-soft); color: var(--kozos); }
  .cal-more { font-size: 11px; font-weight: 800; color: var(--ink-3); padding-left: 6px; }
  .cal-grid { gap: 4px; }

  .home-chores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented[data-homeseg] { max-width: 560px; }
}
@media (min-width: 1400px) {
  .home-chores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Medálok ---------- */
.medal {
  --size: 64px; --p: 1;
  position: relative; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; isolation: isolate;
  background: var(--ring); box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 8px 18px -6px var(--glow, rgba(0,0,0,.2));
}
.medal::after { /* fény a peremen */
  content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 2; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 62%, rgba(255,255,255,.18) 100%);
  mix-blend-mode: soft-light;
}
.medal-face {
  width: calc(var(--size) * .76); height: calc(var(--size) * .76); border-radius: 50%; z-index: 1;
  display: grid; place-items: center; font-size: calc(var(--size) * .38); line-height: 1;
  background: radial-gradient(circle at 35% 30%, var(--face-hi) 0%, var(--face) 70%);
  box-shadow: inset 0 1.5px 2px rgba(255,255,255,.6), inset 0 -2px 4px rgba(0,0,0,.12);
}
.medal.t1 { --ring: conic-gradient(from 210deg, #F4C9A0, #B56E3C, #E9A876, #8E4E24, #F4C9A0); --face: #F6DCC4; --face-hi: #FFF1E4; --glow: rgba(181,110,60,.45); }
.medal.t2 { --ring: conic-gradient(from 210deg, #FFFFFF, #A9B3BF, #E9EDF2, #7F8A97, #FFFFFF); --face: #E6EAEF; --face-hi: #FFFFFF; --glow: rgba(127,138,151,.45); }
.medal.t3 { --ring: conic-gradient(from 210deg, #FFF0B8, #D9A21B, #FFE27A, #A87408, #FFF0B8); --face: #FFEBA8; --face-hi: #FFF8DC; --glow: rgba(217,162,27,.5); }
.medal.locked {
  --ring: conic-gradient(var(--ink-3) calc(var(--p) * 360deg), var(--line) 0); --face: var(--surface-2); --face-hi: var(--surface-2);
  box-shadow: none;
}
.medal.locked::after { display: none; }
.medal.locked .medal-face { filter: grayscale(1); opacity: .5; box-shadow: none; width: calc(var(--size) - 8px); height: calc(var(--size) - 8px); }
.medal-sm { --size: 40px; }
.medal-xl { --size: 128px; }

.medal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.medal-tile {
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 6px; padding: 16px 8px 14px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); text-align: center; min-width: 0;
  transition: transform 120ms var(--ease-out);
}
.medal-tile:active { transform: scale(.96); }
.medal-tile .medal { margin-bottom: 4px; }
.mt-name { font-weight: 800; font-size: 13.5px; line-height: 1.2; letter-spacing: -0.01em; hyphens: manual; max-width: 100%; overflow-wrap: anywhere; }
.mt-sub { font-size: 11.5px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-who { font-size: 11.5px; font-weight: 800; color: var(--ink-2); }
.medal-tile.is-locked .mt-name { color: var(--ink-2); }
.pips { display: flex; gap: 4px; height: 6px; }
.pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.pips i.on.t1 { background: #B56E3C; } .pips i.on.t2 { background: #9AA4B0; } .pips i.on.t3 { background: #D9A21B; }
.medal-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto;
  margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.medal-strip::-webkit-scrollbar { display: none; }
.medal-strip .medal-tile { scroll-snap-align: start; }
.medal-strip .medal { --size: 56px; }

.aw-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 6px; }
.aw-sum-person { display: grid; justify-items: center; gap: 6px; text-align: center; }
.aw-sum-person + .aw-sum-person { border-left: 1px solid var(--line); }
.aw-sum-person b { font-size: 14px; }
.aw-sum-person .avatar { width: 36px; height: 36px; font-size: 14px; }
.aw-counts { display: flex; gap: 8px; justify-content: center; margin-top: 2px; font-family: var(--font-round); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.aw-counts span { display: inline-flex; align-items: center; gap: 3px; }
.aw-counts span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; }
.aw-counts .c3::before { background: linear-gradient(135deg, #FFE27A, #D9A21B); }
.aw-counts .c2::before { background: linear-gradient(135deg, #FFFFFF, #9AA4B0); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.aw-counts .c1::before { background: linear-gradient(135deg, #F4C9A0, #B56E3C); }

.aw-detail { display: grid; justify-items: center; padding-top: 6px; }
.aw-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.025em; margin: 2px 0 4px; text-align: center; }
.aw-value { margin: 12px 0 16px; font-weight: 700; color: var(--ink-2); }
.aw-value b { font-family: var(--font-round); font-size: 34px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; margin-right: 4px; }
.aw-tiers { width: 100%; display: grid; gap: 2px; background: var(--surface-2); border-radius: var(--radius); padding: 6px; }
.aw-tier { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; }
.aw-tier.done { background: var(--surface); }
.aw-tier-name { font-weight: 800; font-size: 15px; }
.aw-tier-sub { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.aw-bar { height: 6px; border-radius: 9px; background: var(--line); margin-top: 6px; overflow: hidden; }
.aw-bar i { display: block; height: 100%; border-radius: 9px; background: var(--ink-2); }

/* Platina */
.medal.t4 { --ring: conic-gradient(from 210deg, #F4F1FF, #9C8CF0, #DDF3FF, #6F86D6, #F7E9FF, #F4F1FF); --face: #ECEBFF; --face-hi: #FFFFFF; --glow: rgba(124,110,230,.55); }
.medal.t4 .medal-face { background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #E9E7FF 55%, #DCEFFF 100%); }
.medal-md { --size: 52px; }
.medal-tile.r4 { background: linear-gradient(180deg, color-mix(in srgb, #9C8CF0 10%, var(--surface)) 0%, var(--surface) 60%); }
.medal-tile.r3 { background: linear-gradient(180deg, color-mix(in srgb, #D9A21B 8%, var(--surface)) 0%, var(--surface) 60%); }
.rarity-pill { display: inline-block; margin: 2px 0 10px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.rarity-pill.r1 { background: #F6DCC4; color: #8E4E24; }
.rarity-pill.r2 { background: #E6EAEF; color: #5E6977; }
.rarity-pill.r3 { background: #FFEBA8; color: #8A6205; }
.rarity-pill.r4 { background: linear-gradient(90deg, #ECEBFF, #DCEFFF); color: #5847C2; }
.aw-desc { text-align: center; max-width: 340px; }
.aw-status { width: 100%; max-width: 360px; margin: 16px 0 6px; text-align: center; font-weight: 800; }
.aw-status.done { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.aw-prog { margin-top: 8px; color: var(--ink-2); font-weight: 700; }
.aw-prog b { font-family: var(--font-round); font-size: 24px; color: var(--ink); }
.aw-other { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.aw-section { margin-top: 24px; }
.aw-count { font-size: 13px; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.aw-controls { display: grid; gap: 12px; margin-top: 16px; }
.aw-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.aw-filter::-webkit-scrollbar { display: none; }
.aw-filter .chip { white-space: nowrap; }

/* Rangok */
.rank-row { display: grid; gap: 10px; }
.rank-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; transition: transform 120ms var(--ease-out); }
.rank-card:active { transform: scale(.98); }
.rank-txt { flex: 1; min-width: 0; }
.rank-who { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.rank-name { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin: 1px 0 8px; }
.rank-bar { height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--vica), var(--kozos), var(--kristof)); }
.rank-sub { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 6px; }
.rank-badge {
  --s: 44px; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; font-size: calc(var(--s) * .5);
  border-radius: 32%; background: var(--rk); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), inset 0 -2px 4px rgba(0,0,0,.12), 0 6px 14px -6px var(--rkg, rgba(0,0,0,.3));
  transform: rotate(-4deg);
}
.rank-lg { --s: 62px; }
.rank-sm { --s: 38px; transform: none; }
.rank-xl { --s: 124px; border-radius: 30%; }
.rk0, .rk1 { --rk: linear-gradient(140deg, #E5F5DA, #9ED07F); --rkg: rgba(110,170,80,.5); }
.rk2, .rk3 { --rk: linear-gradient(140deg, #DDF0FF, #7DB6EA); --rkg: rgba(80,140,210,.5); }
.rk4, .rk5 { --rk: linear-gradient(140deg, #F6DCC4, #C98149); --rkg: rgba(181,110,60,.5); }
.rk6, .rk7 { --rk: linear-gradient(140deg, #EEF0F4, #9AA4B0); --rkg: rgba(127,138,151,.5); }
.rk8, .rk9 { --rk: linear-gradient(140deg, #FFF3C4, #E0AA22); --rkg: rgba(217,162,27,.55); }
.rk10, .rk11 { --rk: linear-gradient(140deg, #FBE3E9, #D2506F 60%, #7656C2); --rkg: rgba(210,80,111,.5); }
.rk12 { --rk: conic-gradient(from 200deg, #F4F1FF, #9C8CF0, #DDF3FF, #6F86D6, #F7E9FF, #F4F1FF); --rkg: rgba(124,110,230,.6); }
.ladder-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 14px; }
.ladder-row + .ladder-row { margin-top: 2px; }
.ladder-row.now { background: var(--surface-2); }
.ladder-row.future .rank-badge { filter: grayscale(1); opacity: .45; }
.ladder-row.future .ladder-name { color: var(--ink-2); }
.ladder-name { font-weight: 800; font-size: 15px; }
.ladder-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ladder-need { font-size: 12.5px; font-weight: 800; color: var(--ink-3); white-space: nowrap; }
.ladder-row .ok { color: var(--ok); font-weight: 800; }
.cel-multi { display: flex; justify-content: center; }
.cel-multi .medal + .medal { margin-left: -12px; }
.celebrate.show .cel-medal .rank-badge { animation: medal-pop 900ms cubic-bezier(.34, 1.56, .64, 1) 120ms both; }

/* ---------- Ünneplés ---------- */
.celebrate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: rgba(15, 10, 8, .5); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  opacity: 0; transition: opacity 260ms ease;
}
.celebrate.show { opacity: 1; }
.cel-card {
  position: relative; z-index: 1; width: min(360px, 100%); display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 28px 22px 22px; border-radius: 30px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.35);
  transform: scale(.9) translateY(12px); opacity: 0;
}
.celebrate.show .cel-card { animation: cel-in 620ms var(--ease-sheet) forwards; }
.cel-medal { margin: 14px 0 10px; }
.celebrate.show .cel-medal .medal { animation: medal-pop 900ms cubic-bezier(.34, 1.56, .64, 1) 120ms both; }
.celebrate.show .cel-medal .medal::after { animation: shine 1.4s ease 600ms both; }
.cel-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.025em; }
.cel-sub { font-weight: 800; color: var(--ink-2); }
.cel-desc { color: var(--ink-2); font-size: 14.5px; margin: 4px 0 14px; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: 0;
  animation: fall var(--dur) cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes cel-in { to { transform: none; opacity: 1; } }
@keyframes medal-pop { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes shine { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 1; } }
@keyframes fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), 105vh) rotate(var(--r)); }
}

@media (min-width: 760px) {
  .medal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .medal-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .medal-tile .medal { --size: 76px; }
  .mt-name { font-size: 14px; }
  .medal-strip { margin: 0; padding: 2px 2px 8px; }
  .rank-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .aw-controls { grid-template-columns: minmax(0, 420px) 1fr; align-items: center; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .tabbar, .celebrate { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .topbar { background: var(--bg); } .tabbar { background: var(--surface); }
}

/* ---------- Kényelmi funkciók (2.0) ---------- */
.hint { font-size: 13px; }
.chip-sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.tab-badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums;
}
.segmented.who button.on[data-v="both"] { color: var(--kozos); }
.section-title.late { color: var(--danger); }

/* belépés: jelszó mutatása */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 86px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 8px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.pw-toggle:active { background: var(--surface-2); }

/* listák */
.lists-seg { margin: 6px 0 14px; }
.lists-seg .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--surface-2); font-size: 12px; }
.lists-seg button.on .count { background: var(--primary); color: var(--on-primary); }
.add-bar { display: flex; gap: 8px; }
.add-bar input {
  flex: 1; min-width: 0; min-height: 50px; padding: 12px 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); outline: none;
}
.add-bar input:focus { border-color: var(--ink-2); }
.add-btn { width: 50px; min-height: 50px; padding: 0; font-size: 26px; font-weight: 500; border-radius: 16px; }
.freq { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.freq::-webkit-scrollbar { display: none; }
.freq .chip { white-space: nowrap; min-height: 34px; font-size: 13.5px; }
.items-list { margin-top: 12px; }
.item { display: grid; grid-template-columns: 44px 1fr 40px; align-items: center; min-height: 54px; padding: 4px 4px 4px 6px; }
.item.is-pending { opacity: .6; }
.check {
  width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); color: transparent; transition: background 150ms, border-color 150ms, transform 120ms var(--ease-out);
}
.check:active { transform: scale(.88); }
.item.is-done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.item-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.item-title { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.item.is-done .item-title { color: var(--ink-3); text-decoration: line-through; }
.item-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.item-meta .qty { padding: 1px 8px; border-radius: 99px; background: var(--surface-2); font-weight: 800; color: var(--ink); }
.item-meta .due.today { color: var(--warn); font-weight: 800; }
.item-meta .due.late { color: var(--danger); font-weight: 800; }
.item-del { width: 36px; height: 36px; color: var(--ink-3); }
.todo-opts { display: grid; gap: 8px; margin-top: 10px; }
.todo-opts .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.todo-opts .chips::-webkit-scrollbar { display: none; }
.todo-opts .chip { white-space: nowrap; }
.todo-opts label.chip { position: relative; }
.todo-opts label.chip input { width: 118px; border: 0; background: transparent; font-size: 13px; color: inherit; padding: 0; min-height: 0; }
.done-box { margin-top: 18px; }
.done-box summary { cursor: pointer; font-weight: 800; color: var(--ink-2); padding: 8px 4px; list-style: none; }
.done-box summary::before { content: '▸ '; }
.done-box[open] summary::before { content: '▾ '; }
.lists-sum { overflow: hidden; }
.ls-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; }
.ls-row + .ls-row, .ls-todo { border-top: 1px solid var(--line); }
.ls-row:active { background: var(--surface-2); }
.ls-ic { font-size: 22px; width: 32px; text-align: center; }
.ls-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ls-txt small { color: var(--ink-2); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-n { font-family: var(--font-round); font-weight: 800; font-size: 18px; color: var(--ink-2); }
.ls-n.warn { color: var(--warn); }

/* naptár: nézetváltó, keresés */
.cal-switch { margin: 6px 0 12px; max-width: 320px; }
.search-bar {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 46px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink-3); margin-bottom: 6px;
}
.search-bar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; min-height: 44px; }

/* esemény űrlap */
.quick { padding: 12px; border-radius: 16px; background: linear-gradient(135deg, var(--kozos-soft), var(--surface-2)); }
.quick .field input { background: var(--surface); }
.quick-hint { font-size: 13px; color: var(--ink-2); margin-top: 8px; font-weight: 600; }
.quick-hint b { color: var(--kozos); }
.dur-chips { margin-top: -4px; }
.dur-chips .chip.on { border-color: var(--ink); }
.conflict { padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.conflict b { font-weight: 800; }
.ev-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-tools .btn { text-decoration: none; color: var(--ink); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; min-width: 0; font-size: 13px; }
.steps { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }

/* háztartás: kártyafej, ki jön, halasztás, részletek */
.chore { grid-template-columns: 1fr; }
.chore-head { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; text-align: left; width: 100%; border-radius: 12px; }
.chore-head > span:last-child { display: flex; flex-direction: column; }
.chore-head:active { opacity: .75; }
.chore-actions { grid-column: auto; }
.chore .last { display: inline-flex; gap: 5px; align-items: center; }
.chore.snoozed { opacity: .72; }
.turn { padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.turn.vica { background: var(--vica-soft); color: var(--vica); }
.turn.kristof { background: var(--kristof-soft); color: var(--kristof); }
.chore-detail { display: grid; gap: 14px; }
.cd-head { display: flex; gap: 14px; align-items: center; }
.chore-icon.big { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.cd-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.cd-stats { padding: 14px; display: grid; gap: 10px; }
.cd-split { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
.cd-split > span { display: inline-flex; gap: 6px; align-items: center; }
.cd-split .muted { font-size: 12px; }
.cd-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); }

/* mérleg: 8 hetes trend */
.trend { padding: 14px 14px 10px; }
.trend svg { width: 100%; height: 120px; display: block; }
.trend .tv { fill: var(--vica); } .trend .tk { fill: var(--kristof); }
.trend-x { position: relative; height: 18px; margin-top: 4px; }
.trend-x span { position: absolute; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.trend-x span:nth-child(odd):not(:last-child) { visibility: hidden; }
@media (min-width: 600px) { .trend-x span:nth-child(odd) { visibility: visible; } }

/* Ma: visszaszámláló, heti összefoglaló, telepítés */
.countdowns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.countdowns::-webkit-scrollbar { display: none; }
.countdown { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; }
.countdown:active { transform: scale(.98); }
.cd-emoji { font-size: 26px; }
.cd-days { display: grid; justify-items: center; line-height: 1; padding-right: 12px; border-right: 1px solid var(--line); }
.cd-days b { font-family: var(--font-round); font-size: 26px; font-weight: 800; }
.cd-days small { font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; }
.cd-txt { min-width: 0; display: flex; flex-direction: column; }
.cd-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-txt small { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.wsum { padding: 14px 16px 16px; display: grid; gap: 10px; background: linear-gradient(150deg, var(--kozos-soft), var(--surface) 70%); }
.wsum-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -8px -4px 0; }
.wsum-head b { font-size: 16px; }
.wsum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.wsum-grid span { display: grid; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.wsum-grid b { font-family: var(--font-round); font-size: 20px; font-weight: 800; }
.wsum-grid small { font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
.install-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 8px 14px 16px; }
.install-ic { font-size: 26px; }
.install-card p { font-size: 13.5px; margin: 2px 0 8px; }

/* billentyűparancsok */
.kbd-row { display: flex; align-items: center; gap: 14px; padding: 11px 14px; }
kbd {
  min-width: 52px; text-align: center; padding: 4px 8px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 2px; font: 800 13px var(--font);
}

@media (min-width: 1024px) {
  .lists-body, .lists-seg { max-width: 760px; }
  .freq { margin: 12px 0 4px; padding: 0 0 4px; flex-wrap: wrap; }
  .countdowns { margin: 0; padding: 2px 0 6px; }
  .tab-badge { left: auto; right: 12px; top: 50%; transform: translateY(-50%); box-shadow: none; }
}

/* ---------- Értesítések, telepítési útmutató, megosztás (2.1) ---------- */
.notice { padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--ink); font-size: 14px; line-height: 1.45; }
.notice.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); font-weight: 700; }
.pref-list { overflow: hidden; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; }
.pref-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.pref-row b { font-size: 14.5px; }
.pref-row small { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide li { display: flex; gap: 12px; align-items: flex-start; }
.guide b { font-size: 15px; }
.guide p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.g-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, #8A6CF0, #4A33A6); color: #fff; }
.kbd-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.shared-box { max-height: 180px; overflow: auto; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Hover csak egérrel */
@media (hover: hover) and (pointer: fine) {
  .ev:hover, .chore-edit-row:hover, .settings-list .set-row:hover, .cal-day:hover { background: var(--surface-2); }
  .btn-primary:hover { opacity: .9; }
  .btn-soft:hover { background: var(--line); }
  .item:hover .item-del { color: var(--danger); }
  .ls-row:hover, .chore-head:hover { background: var(--surface-2); }
  .check:hover { border-color: var(--ok); }
  .medal-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 10px 24px -12px rgba(0,0,0,.25); }
  .tab:hover { color: var(--ink-2); }
  .link-btn:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .confetti { display: none; }
}
