/* LifeList szerződéskötő – közös megjelenés (LifeList arculat, Mérce szerkezet) */
:root {
  --bg: #F4EEE9; --surface: #FFFFFF; --ink: #1A1F2B; --muted: #5E6270; --frame: #E4DACE; --field: #D9CFC3;
  --line: #EFE8E0; --accent: #B58555; --on-accent: #1A1F2B; --soft: #E9E2D9; --now: #B3261E; --soon: #8A5A00;
  --selected: #F3E4D1; --track: #D3CCC3; --toast: #1A1F2B; --toast-ink: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418; --surface: #1E2128; --ink: #F2EEE9; --muted: #A9ADB8; --frame: #343843; --field: #4A4F5C;
    --line: #2C3038; --accent: #C49464; --on-accent: #1A1F2B; --soft: #2E323B; --now: #FF8A80; --soon: #E0B060;
    --selected: #3A3125; --track: #4A4F5C; --toast: #F2EEE9; --toast-ink: #1A1F2B;
    color-scheme: dark;
  }
  .logo-light { display: none !important; }
}
@media (prefers-color-scheme: light) { .logo-dark { display: none !important; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--ink); }
h1 { font-size: 30px; line-height: 1.15; font-weight: 800; font-style: italic; margin: 4px 0 0; }
h2 { font-size: 20px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border-radius: 14px; padding: 18px 16px 6px; }
.card.next { border: 2px solid var(--accent); }
.card.pad { padding-bottom: 16px; }
.field { margin-bottom: 16px; }
label, .label { display: block; font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 50px; border: 1px solid var(--field); border-radius: 10px; padding: 0 14px;
  font: 17px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--surface);
}
textarea { padding: 12px 14px; line-height: 1.4; resize: vertical; min-height: 110px; }
select { padding: 0 10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.err input, .err select, .err textarea { border: 2px solid var(--now); }
.errtext { color: var(--now); font-size: 13px; margin-top: 6px; }
button { font-family: inherit; cursor: pointer; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border: 0; border-radius: 12px;
  font: 600 17px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; text-decoration: none; padding: 0 16px; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-light { background: var(--soft); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-inline { width: auto; display: inline-flex; }
.btn-text { background: none; border: 0; padding: 0; min-height: 44px; font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: underline; }
.btn-text.small { font-size: 15px; font-weight: 400; }
.btn-danger { color: var(--now); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 360px) { .row { grid-template-columns: minmax(0, 1fr); } }
.known { display: flex; justify-content: space-between; gap: 12px; min-height: 52px; align-items: center; border-top: 1px solid var(--line); padding: 6px 0; }
.known:first-of-type { border-top: 0; }
.known + .field, .known + .row, .known + div > .field { margin-top: 14px; }
.known .k { font-size: 13px; color: var(--muted); }
.known .v { font-size: 17px; overflow-wrap: anywhere; white-space: pre-line; }
.steps { display: grid; gap: 6px; }
.steps div { height: 4px; border-radius: 2px; background: var(--frame); }
.steps div.on { background: var(--accent); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.state i { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); display: inline-block; flex: none; }
.state.now i { background: var(--now); } .state.soon i { background: var(--soon); } .state.ok i { background: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.thumb { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: none; padding: 8px; }
.thumb button span { display: block; width: 28px; height: 28px; border-radius: 14px; background: rgba(26,31,43,.75); color: #fff; font-size: 18px; line-height: 28px; text-align: center; }
.thumb .tag { position: absolute; left: 4px; bottom: 4px; background: rgba(26,31,43,.75); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.filerow { display: flex; align-items: center; gap: 12px; min-height: 56px; border: 1px solid var(--frame); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; }
.filerow .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.pkg { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.x { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.4; min-height: 44px; font-weight: 400; margin: 0 0 12px; }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--ink); }
.help { text-align: center; font-size: 13px; color: var(--muted); line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--frame); }
.help a { display: inline-block; min-height: 32px; line-height: 32px; }
.saved { text-align: center; font-size: 13px; color: var(--muted); min-height: 20px; }
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--toast); color: var(--toast-ink);
  padding: 12px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); z-index: 50; display: flex; gap: 12px; align-items: center; }
.toast.err { background: var(--now); color: #fff; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; font-size: 15px; min-height: 44px; }
.missing li { margin: 0 0 6px; }
.missing a { font-weight: 600; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.logo { height: auto; display: block; }
.bar { height: 2px; background: var(--accent); position: fixed; top: 0; left: 0; right: 0; z-index: 60; }

/* Kezelő (gépen) */
.k-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.k-nav { flex: 1 1 220px; max-width: 260px; padding: 28px 16px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--frame); }
.k-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 600; }
.k-nav a.on { background: var(--selected); }
.k-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1100px; }
.k-main h1 { font-size: 40px; }
.k-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.k-main .btn { min-height: 40px; font-size: 15px; width: auto; display: inline-flex; padding: 0 16px; max-width: 100%; white-space: normal; }
.k-main > * { min-width: 0; max-width: 100%; }
.k-main h1 { overflow-wrap: anywhere; }
.k-main .btn.big { min-height: 50px; font-size: 17px; }
.k-main input, .k-main select { min-height: 40px; font-size: 15px; }
.k-main textarea { font-size: 15px; min-height: 80px; }
.k-main label, .k-main .label { font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.grid2 .full { grid-column: 1 / -1; }
.tbl { background: var(--surface); border-radius: 12px; overflow-x: auto; }
.tbl table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; text-align: left; }
.tbl th { font-size: 13px; color: var(--muted); padding: 12px; font-weight: 600; }
.tbl td { padding: 0 12px; border-top: 1px solid var(--line); height: 52px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--selected); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); font: 600 14px inherit; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.blk { border-top: 1px solid var(--line); }
.blk-h { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.blk-h > button:not(.switch) { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 8px 0; text-align: left; color: var(--ink); }
.blk-h .t { font-size: 17px; font-weight: 600; }
.switch { flex: none; width: 51px; height: 31px; border-radius: 16px; border: 0; padding: 2px; background: var(--track); display: flex; justify-content: flex-start; }
.switch[aria-checked=true] { background: var(--ink); justify-content: flex-end; }
.switch span { width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.blk-b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; padding: 4px 0 18px; }
.blk-b .full { grid-column: 1 / -1; }
.diff td { vertical-align: top; padding: 8px 12px; height: auto; }
.diff .old { color: var(--muted); text-decoration: line-through; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .k-nav { max-width: none; flex-direction: row; flex-wrap: wrap; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--frame); align-items: center; }
  .k-nav img { margin: 0 12px 0 0 !important; width: 120px !important; }
  .k-main { padding: 20px 16px 40px; }
  .k-main h1 { font-size: 34px; }
  .grid2, .blk-b { grid-template-columns: minmax(0, 1fr); }
  .k-main .btn { min-height: 50px; font-size: 17px; }
  .k-main input, .k-main select { min-height: 50px; font-size: 17px; }
}
