@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/iserif-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/iserif-latinext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/iserif-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/isans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/isans-latinext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

/* ------------------------------------------------------------- tokens -- */
:root {
  --bg: #f4f0e8; --bg2: #ece6da; --card: #fffdf8; --card2: #f8f4ec;
  --ink: #152033; --ink2: #3c475a; --muted: #77746c; --faint: #a7a296; --line: #e4ddcf; --line2: #d6cdbb;
  --navy: #13233a; --gold: #b08a47; --gold2: #c6a15b; --goldbg: #f3e9d4; --gold-ink: #7a5a1f;
  --red: #b4432f; --redbg: #f7e4df; --green: #2f7a57; --greenbg: #e1f0e7;
  --t-sede: #2f5d8c; --t-fuori: #b7802b; --t-video: #6b58c9; --t-tel: #2a8a80; --t-int: #6f7681; --t-pers: #b8547a;
  --bday: #c6a15b;
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 8px 26px rgba(40, 30, 10, .08);
  --shadow2: 0 18px 60px rgba(20, 25, 40, .25);
  --r: 18px; --r2: 12px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tab: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d131c; --bg2: #121a25; --card: #161f2b; --card2: #1b2533;
    --ink: #ece7dc; --ink2: #c9c4b8; --muted: #9a968c; --faint: #6c6f75; --line: #253041; --line2: #314056;
    --navy: #0a1220; --gold: #cfae6c; --gold2: #d8b977; --goldbg: #2c2617; --gold-ink: #e6cf98;
    --red: #e27a66; --redbg: #3a1f1b; --green: #6cc396; --greenbg: #16302a;
    --t-sede: #6f9bd0; --t-fuori: #dca452; --t-video: #9d8cf0; --t-tel: #4fc1b5; --t-int: #9aa2ae; --t-pers: #e083a5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d131c; --bg2: #121a25; --card: #161f2b; --card2: #1b2533;
  --ink: #ece7dc; --ink2: #c9c4b8; --muted: #9a968c; --faint: #6c6f75; --line: #253041; --line2: #314056;
  --navy: #0a1220; --gold: #cfae6c; --gold2: #d8b977; --goldbg: #2c2617; --gold-ink: #e6cf98;
  --red: #e27a66; --redbg: #3a1f1b; --green: #6cc396; --greenbg: #16302a;
  --t-sede: #6f9bd0; --t-fuori: #dca452; --t-video: #9d8cf0; --t-tel: #4fc1b5; --t-int: #9aa2ae; --t-pers: #e083a5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

/* --------------------------------------------------------------- base -- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.serif { font-family: var(--serif); font-weight: 400; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--goldbg); }

/* ------------------------------------------------------------- layout -- */
#app { min-height: 100%; }
.main { padding: calc(var(--safe-t) + 6px) 16px calc(var(--tab) + var(--safe-b) + 28px); max-width: 760px; margin: 0 auto; }
.top { display: flex; align-items: flex-end; gap: 8px; padding: 14px 0 10px; }
.top .titles { flex: 1; min-width: 0; }
.kicker { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; }
.h1 { font-family: var(--serif); font-size: 34px; line-height: 1.05; margin: 2px 0 0; font-weight: 400; letter-spacing: -.01em; }
.h1 em { font-style: italic; color: var(--gold); }
.ib { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); flex: none; }
.ib:active { background: var(--bg2); }
.ib.on { color: var(--gold); }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 8px 0; letter-spacing: .01em; }
.tab.on { color: var(--ink); }
.tab.on .ic { color: var(--gold); }
.fab { justify-self: center; width: 58px; height: 58px; border-radius: 20px; background: var(--navy); color: #f6f1e6; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(19, 35, 58, .35), inset 0 0 0 1px rgba(198, 161, 91, .5); transform: translateY(-14px); transition: transform .15s; }
:root[data-theme="dark"] .fab, :root:not([data-theme="light"]) .fab { }
.fab:active { transform: translateY(-14px) scale(.94); }
.fab .ic { stroke-width: 2.2; color: var(--gold2); }
.badge { min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 4px; }
.tab { position: relative; }
.tab .badge { position: absolute; top: 3px; left: calc(50% + 6px); }

@media (min-width: 960px) {
  .tabbar { top: 0; right: auto; width: 96px; height: 100%; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: start; padding-top: 24px; border-top: 0; border-right: 1px solid var(--line); }
  .fab { transform: none; margin: 10px 0; }
  .fab:active { transform: scale(.94); }
  .main { padding-left: 120px; padding-bottom: 48px; max-width: 980px; }
  #sheets .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 110%); }
  #sheets .sheet.on { transform: translate(-50%, 0); }
}

/* -------------------------------------------------------------- cards -- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; position: relative; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.ch { display: flex; align-items: center; gap: 8px; margin: -2px 0 10px; }
.ch h3 { margin: 0; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; flex: 1; }
.ch .more { font-size: 13px; color: var(--gold-ink); font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 4px 0; }
.empty .serif { font-size: 20px; color: var(--ink2); display: block; margin-bottom: 2px; }

/* next appointment hero */
.hero { background: linear-gradient(160deg, var(--navy), #1d3557 70%, #253f63); color: #f3eee3; padding: 18px 18px 14px; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(198, 161, 91, .35); }
.hero::before { content: ""; position: absolute; right: -10px; top: -10px; width: 100px; height: 100px; border-radius: 50%; border: 1px solid rgba(198, 161, 91, .2); }
.hero .kicker { color: var(--gold2); }
.hero .when { font-family: var(--serif); font-size: 38px; line-height: 1; margin: 8px 0 4px; letter-spacing: -.01em; }
.hero .when small { font-family: var(--sans); font-size: 15px; color: #c9c2b2; margin-left: 6px; letter-spacing: 0; }
.hero .what { font-size: 18px; font-weight: 600; margin: 0; }
.hero .who { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #dcd5c6; font-size: 14px; }
.hero .cd { position: absolute; right: 16px; top: 16px; z-index: 1; background: rgba(198, 161, 91, .18); color: #ecd9ae; border: 1px solid rgba(198, 161, 91, .45); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.hero .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .acts .btn { background: rgba(255, 255, 255, .1); color: #f3eee3; border: 1px solid rgba(255, 255, 255, .16); }
.hero .acts .btn.gold { background: var(--gold2); color: #1c1608; border: 0; }
.hero .leave { margin-top: 10px; font-size: 13.5px; color: #ecd9ae; display: flex; align-items: center; gap: 6px; }
.hero .typ { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }

/* --------------------------------------------------------- list rows -- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 52px; width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li .tx { flex: 1; min-width: 0; }
.li .t1 { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t2 { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .rt { text-align: right; font-size: 13px; color: var(--muted); flex: none; }
.li:active { background: var(--card2); }
.li.past { opacity: .5; }

/* event row (timeline) */
.ev { display: flex; gap: 12px; padding: 9px 0; align-items: stretch; width: 100%; text-align: left; }
.ev .tm { width: 48px; flex: none; text-align: right; font-size: 13.5px; font-weight: 600; line-height: 1.25; padding-top: 1px; }
.ev .tm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ev .bar { width: 4px; border-radius: 4px; background: var(--c, var(--t-sede)); flex: none; }
.ev .tx { flex: 1; min-width: 0; }
.ev .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .t2 { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.ev.past { opacity: .5; }
.ev.cancel .t1 { text-decoration: line-through; }
.ev.allday .tm { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ev.bday .bar { background: var(--bday); }
.ev .tbc { font-size: 11px; color: var(--gold-ink); background: var(--goldbg); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.nowline { display: flex; align-items: center; gap: 8px; color: var(--red); font-size: 12px; font-weight: 700; margin: 2px 0 2px 2px; }
.nowline::after { content: ""; flex: 1; height: 2px; background: var(--red); border-radius: 2px; opacity: .7; }
.nowline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 52px; order: 1; display: none; }

/* --------------------------------------------------------- avatars ---- */
.av { border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; letter-spacing: .02em; overflow: hidden;
  background: hsl(var(--h) 45% 88%); color: hsl(var(--h) 45% 28%); }
:root[data-theme="dark"] .av { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 84%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 84%); } }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--gold2); }
.avs { display: flex; }
.avs .av + .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }

/* ----------------------------------------------------------- buttons -- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  background: var(--card2); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--navy); color: #f6f1e6; border-color: var(--navy); }
:root[data-theme="dark"] .btn.primary { background: var(--gold2); color: #1c1608; border-color: var(--gold2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--gold2); color: #1c1608; border-color: var(--gold2); } }
.btn.gold { background: var(--gold2); color: #1c1608; border-color: var(--gold2); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.qa { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0 4px; }
.qa button, .qa a { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink2); padding: 8px 0; border-radius: 14px; }
.qa .qi { width: 46px; height: 46px; border-radius: 15px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); }
.qa button:active .qi, .qa a:active .qi { transform: scale(.94); }
.qa .off { opacity: .35; pointer-events: none; }

/* ------------------------------------------------------------- chips -- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink2); flex: none; }
.chip.on { background: var(--navy); color: #f6f1e6; border-color: var(--navy); }
:root[data-theme="dark"] .chip.on { background: var(--gold2); color: #1c1608; border-color: var(--gold2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: var(--gold2); color: #1c1608; border-color: var(--gold2); } }
.chip .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 2px 8px; background: var(--card2); color: var(--ink2); white-space: nowrap; }
.pill.gold { background: var(--goldbg); color: var(--gold-ink); }
.pill.red { background: var(--redbg); color: var(--red); }
.pill.green { background: var(--greenbg); color: var(--green); }
.tchip { display: inline-flex; align-items: center; gap: 5px; color: var(--c); font-weight: 600; font-size: 12.5px; }

/* segmented */
.seg { display: flex; background: var(--bg2); border-radius: 12px; padding: 3px; gap: 2px; }
.sg { flex: 1; height: 34px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.sg.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ------------------------------------------------------------- forms -- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.fl { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.fh { font-size: 12px; color: var(--faint); }
input.in, select.in, textarea.in { width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 46px; }
textarea.in { min-height: 92px; resize: vertical; line-height: 1.45; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.group { background: var(--card); border-radius: var(--r); padding: 14px 14px 2px; margin-bottom: 12px; border: 1px solid var(--line); }
.group > h4 { margin: 0 0 10px; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-ink); }
.tgrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tgrow:last-child { border-bottom: 0; }
.tgrow .sub { display: block; font-size: 12.5px; color: var(--muted); }
input.tg { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line2); position: relative; flex: none; transition: background .2s; cursor: pointer; margin: 0; }
input.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
input.tg:checked { background: var(--green); }
input.tg:checked::after { transform: translateX(18px); }
.typepick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.typepick button { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.typepick button .ic { color: var(--c); }
.typepick button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--c); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.picks button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.picks button.on { background: var(--navy); color: #f6f1e6; border-color: var(--navy); }
:root[data-theme="dark"] .picks button.on { background: var(--gold2); color: #1c1608; border-color: var(--gold2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .picks button.on { background: var(--gold2); color: #1c1608; border-color: var(--gold2); } }
.warn { display: flex; gap: 8px; align-items: flex-start; background: var(--redbg); color: var(--red); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.note-ok { display: flex; gap: 8px; align-items: flex-start; background: var(--greenbg); color: var(--green); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.goldbox { background: var(--goldbg); color: var(--gold-ink); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; display: flex; gap: 8px; align-items: flex-start; }

/* client picker */
.cpick { position: relative; }
.cpick .sel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cpick .sel .chip { padding-left: 4px; }
.cpick .res { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; overflow: hidden; }
.cpick .res button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.cpick .res button:last-child { border-bottom: 0; }

/* ------------------------------------------------------------ sheets -- */
#sheets { position: relative; z-index: 50; }
.scrim { position: fixed; inset: 0; background: rgba(8, 12, 20, .45); opacity: 0; transition: opacity .25s; z-index: 50; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; max-height: 92dvh; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow2);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; padding-bottom: var(--safe-b); }
.sheet.on { transform: translateY(0); }
.sheet.full { height: 92vh; height: 92dvh; }
.grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 2px; flex: none; }
.sh-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px 6px 18px; flex: none; }
.sh-head h2 { flex: 1; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.sh-body { overflow-y: auto; padding: 6px 16px 18px; flex: 1; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sh-foot { padding: 10px 16px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex: none; background: var(--bg); }
.confirm p { margin: 0 0 16px; }

/* toasts */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + var(--safe-b) + 14px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--navy); color: #f3eee3; border-radius: 14px; padding: 11px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow2); max-width: calc(100% - 32px);
  transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; }
.toast.on { transform: none; opacity: 1; }
.toast .ic { color: var(--gold2); }
.toast .tbtn { color: var(--gold2); font-weight: 700; padding: 0 2px 0 8px; }
.toast.err { background: var(--red); }

/* ------------------------------------------------------- calendar ---- */
.calhead { display: flex; align-items: center; gap: 4px; padding: 10px 0 8px; }
.calhead .h1 { flex: 1; font-size: 30px; }
.calhead .h1 small { font-family: var(--sans); font-size: 15px; color: var(--muted); margin-left: 6px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; touch-action: pan-y; user-select: none; }
.month .dn { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: .05em; text-transform: uppercase; padding: 4px 0 6px; }
.cell { aspect-ratio: 1 / 1.08; border-radius: 12px; display: flex; flex-direction: column; align-items: center; padding-top: 5px; gap: 3px; position: relative; background: color-mix(in srgb, var(--gold) calc(var(--heat, 0) * 26%), transparent); }
.cell .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell.out { opacity: .32; }
.cell.we .n { color: var(--muted); }
.cell.fest .n { color: var(--red); }
.cell.today .n { background: var(--gold2); color: #1c1608; }
.cell.sel { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cell .dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 34px; }
.cell .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cell .bd { position: absolute; top: 3px; right: 3px; color: var(--bday); }
.cell .bd .ic { stroke-width: 2; }
.dayhead { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 4px; }
.dayhead h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.dayhead .muted { font-size: 13px; }
.festa { color: var(--red); font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; margin: 2px 0 6px; }
.festa.mkt { color: var(--gold-ink); }

/* week */
.week { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); position: relative; touch-action: pan-y; }
.week .wh { position: sticky; top: 0; z-index: 3; background: var(--bg); text-align: center; padding: 4px 0 6px; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.week .wh b { display: block; font-size: 17px; color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.week .wh.today b { color: var(--gold); }
.week .wh.fest b { color: var(--red); }
.week .ad { min-height: 22px; border-bottom: 1px solid var(--line); padding: 2px 1px; display: flex; flex-direction: column; gap: 2px; }
.week .ad i { font-style: normal; font-size: 10px; font-weight: 600; background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--ink); border-radius: 4px; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week .hr { font-size: 10.5px; color: var(--faint); text-align: right; padding-right: 4px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.week .col { position: relative; border-left: 1px solid var(--line); }
.week .slot { height: 44px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.blk { position: absolute; left: 1px; right: 1px; border-radius: 6px; background: color-mix(in srgb, var(--c) 20%, var(--card)); border-left: 3px solid var(--c); padding: 2px 4px; font-size: 10.5px; line-height: 1.2; overflow: hidden; color: var(--ink); text-align: left; }
.blk b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.tbc { border-left-style: dashed; }
.blk.cancel { opacity: .5; text-decoration: line-through; }
.nowbar { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; }
.nowbar::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* day view */
.dayv { display: grid; grid-template-columns: 46px 1fr; position: relative; }
.dayv .hr { font-size: 11.5px; color: var(--faint); text-align: right; padding-right: 8px; transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.dayv .col { position: relative; border-left: 1px solid var(--line); }
.dayv .slot { height: 60px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.dayv .blk { font-size: 12.5px; padding: 4px 8px; left: 4px; right: 4px; }
.dayv .blk b { font-size: 13.5px; }

/* agenda */
.ag-day { margin: 18px 0 2px; display: flex; align-items: baseline; gap: 8px; position: sticky; top: 0; background: var(--bg); padding: 6px 0; z-index: 2; }
.ag-day b { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.ag-day.today b { color: var(--gold); }

/* --------------------------------------------------------- client page -- */
.chead { text-align: center; padding: 8px 0 4px; }
.chead .av { margin: 0 auto 10px; }
.chead h1 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; line-height: 1.05; }
.chead .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.chead .pills { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv > div { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.kv .k { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kv .v { font-size: 15px; font-weight: 600; margin-top: 2px; }
.kv .v.big { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
.tl { position: relative; padding-left: 20px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line2); }
.tl .it { position: relative; padding: 0 0 14px; }
.tl .it::before { content: ""; position: absolute; left: -18px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--c, var(--gold)); }
.tl .it .when { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tl .it .txt { white-space: pre-wrap; font-size: 14.5px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.alpha { position: sticky; top: 0; background: var(--bg); font-family: var(--serif); font-size: 20px; color: var(--gold); padding: 8px 0 2px; z-index: 1; }
.search { position: relative; margin: 2px 0 10px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 40px; }

/* ------------------------------------------------------------ memos --- */
.memos { columns: 2; column-gap: 10px; }
.memo { break-inside: avoid; background: var(--mc, var(--card)); border-radius: 16px; padding: 12px 13px; margin-bottom: 10px; box-shadow: var(--shadow); width: 100%; text-align: left; display: block; color: var(--ink); }
.memo h4 { margin: 0 0 4px; font-size: 15px; }
.memo p { margin: 0; font-size: 13.5px; color: var(--ink2); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.memo .ck { font-size: 13px; display: flex; gap: 6px; align-items: center; color: var(--ink2); }
.memo .ck.done { text-decoration: line-through; color: var(--faint); }
.memo .mf { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.mc-y { --mc: #fbf0cf; } .mc-g { --mc: #e3efe2; } .mc-b { --mc: #e1e9f4; } .mc-r { --mc: #f6e2e4; } .mc-v { --mc: #ebe4f5; }
:root[data-theme="dark"] .mc-y { --mc: #3a3220; } :root[data-theme="dark"] .mc-g { --mc: #1f3326; } :root[data-theme="dark"] .mc-b { --mc: #1d2a3d; } :root[data-theme="dark"] .mc-r { --mc: #3a2227; } :root[data-theme="dark"] .mc-v { --mc: #2b2440; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mc-y { --mc: #3a3220; } :root:not([data-theme="light"]) .mc-g { --mc: #1f3326; } :root:not([data-theme="light"]) .mc-b { --mc: #1d2a3d; } :root:not([data-theme="light"]) .mc-r { --mc: #3a2227; } :root:not([data-theme="light"]) .mc-v { --mc: #2b2440; } }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; background: var(--mc, var(--card)); border: 1px solid var(--line2); }
.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

/* tasks */
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.cb { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; margin-top: 1px; color: transparent; transition: background .15s, border-color .15s; }
.cb.on { background: var(--green); border-color: var(--green); color: #fff; }
.task .tx { flex: 1; min-width: 0; }
.task .t1 { font-size: 15px; }
.task.done .t1 { text-decoration: line-through; color: var(--faint); }
.task .t2 { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task .late { color: var(--red); font-weight: 600; }

/* --------------------------------------------------------- quick add -- */
.qbox { background: var(--card); border-radius: 18px; border: 1px solid var(--line); padding: 4px 6px 4px 14px; display: flex; align-items: flex-start; gap: 4px; }
.qbox textarea { flex: 1; border: 0; background: none; outline: none; resize: none; font-size: 18px; line-height: 1.4; padding: 10px 0; min-height: 56px; }
.qbox .ib.rec { color: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.preview { margin-top: 12px; background: var(--card); border-radius: 16px; padding: 14px; border-left: 4px solid var(--c); box-shadow: var(--shadow); }
.preview .pt { font-weight: 700; font-size: 17px; }
.preview .pp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.examples { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.examples button { text-align: left; font-size: 14px; color: var(--ink2); background: var(--card2); border-radius: 12px; padding: 9px 12px; border: 1px dashed var(--line2); }
.quickgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.quickgrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink2); }
.quickgrid .ic { color: var(--gold); }

/* ------------------------------------------------------------ widgets -- */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; }
.weekstrip .wd { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.weekstrip .stack { width: 100%; max-width: 30px; height: 64px; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 8px; overflow: hidden; background: var(--card2); }
.weekstrip .stack i { background: var(--c); display: block; }
.weekstrip .wd.today { color: var(--gold-ink); }
.weekstrip .wd b { font-size: 13px; color: var(--ink); }
.stats { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stats b { color: var(--ink); font-size: 16px; font-family: var(--serif); font-weight: 400; margin-right: 3px; }
.ring { position: relative; width: 54px; height: 54px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.bdcard { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.bdcard:last-child { border-bottom: 0; }
.bdcard .tx { flex: 1; min-width: 0; }
.bdcard .t1 { font-weight: 600; }
.bdcard .t2 { font-size: 13px; color: var(--muted); }
.bdcard.today .t2 { color: var(--gold-ink); font-weight: 600; }
.mile { background: linear-gradient(90deg, var(--gold2), #e6cf98); color: #1c1608; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 700; }
.discreto .dsc { filter: blur(6px); }
.esito { display: flex; gap: 10px; align-items: center; background: var(--goldbg); color: var(--gold-ink); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; width: 100%; text-align: left; }
.esito b { color: var(--ink); }
.customize { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.customize .grow { font-weight: 600; }

/* --------------------------------------------------------- lock / intro -- */
.lock { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 24px calc(24px + var(--safe-b)); text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, #1d3557 0%, var(--navy) 55%, #0a1220 100%); color: #f3eee3; }
.lock h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin: 14px 0 2px; }
.lock p { color: #b9b2a3; margin: 0 0 22px; }
.pins { display: flex; gap: 14px; margin: 6px 0 26px; }
.pins i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--gold2); }
.pins i.on { background: var(--gold2); }
.pins.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.keypad button { width: 76px; height: 76px; border-radius: 50%; font-size: 28px; font-family: var(--serif); color: #f3eee3; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.keypad button:active { background: rgba(198, 161, 91, .3); }
.keypad button.fn { background: none; border: 0; font-family: var(--sans); font-size: 14px; }
.lock .err { color: #f0a594; min-height: 20px; font-size: 14px; margin-top: 14px; }
.lock input.in { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #f3eee3; max-width: 320px; text-align: center; }
.intro { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 40px) 20px 40px; }
.intro h1 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; margin: 18px 0 8px; }
.intro h1 em { color: var(--gold); }
.intro .lead { font-size: 17px; color: var(--ink2); margin: 0 0 22px; }
.feat { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; }
.feat .fi { width: 40px; height: 40px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--gold); flex: none; }
.feat b { display: block; }
.feat span { color: var(--muted); font-size: 14px; }

/* briefing */
.brief .bl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.brief .bl:last-child { border-bottom: 0; }
.brief .bl .ic { color: var(--gold); margin-top: 2px; }

/* greetings */
.tone { margin: 4px 0 10px; }
textarea.msg { width: 100%; min-height: 210px; }
.chan { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 8px; margin-top: 10px; }
.chan a, .chan button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.chan .ic { color: var(--gold); }
.chan .wa .ic { color: #1f9d55; }
.gift { font-size: 13.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -20px; border-radius: 2px; animation: fall 2.2s cubic-bezier(.25, .6, .4, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); opacity: .9; } }

.qr { background: #fff; padding: 12px; border-radius: 14px; display: inline-block; }
.code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 17px; letter-spacing: .06em; background: var(--card2); border: 1px dashed var(--line2); border-radius: 12px; padding: 12px; text-align: center; word-break: break-all; user-select: all; }
.foot { text-align: center; color: var(--faint); font-size: 12.5px; margin: 24px 0 8px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.fade-in { animation: fadein .25s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* the PIN pad inside a light sheet */
.pinsheet .keypad button { color: var(--ink); background: var(--card); border-color: var(--line); }
.pinsheet .keypad button.fn { background: none; }
.pinsheet .pins i { border-color: var(--gold); }
.pinsheet .pins i.on { background: var(--gold); }
.pinsheet .sh-body { display: flex; flex-direction: column; align-items: center; }
.gold-ic { color: var(--gold); fill: var(--gold); }

.ev .tm .dd { color: var(--gold-ink); font-weight: 700; margin-bottom: 1px; }
.tophead { display: flex; align-items: center; gap: 2px; padding-top: 12px; }
.tophead .kicker { flex: 1; }
.oggi-h1 { padding: 0 0 12px; }
.esito .n { background: var(--gold2); color: #1c1608; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 1px 8px; }

/* ------------------------------------------------------------- account -- */
.auth { max-width: 460px; margin: 0 auto; padding: calc(var(--safe-t) + 26px) 20px calc(var(--safe-b) + 36px); }
.auth.insheet { padding: 0 0 12px; }
.auth > h1 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; margin: 18px 0 8px; }
.auth > h1 em { color: var(--gold); }
.auth .lead { font-size: 17px; color: var(--ink2); margin: 0 0 22px; }
.auth h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; margin: 8px 0 8px; letter-spacing: -.01em; }
.auth .lead2 { color: var(--ink2); margin: 0 0 18px; font-size: 15.5px; }
.auth .stack, .stack { display: grid; gap: 10px; }
.btn.big { height: 52px; font-size: 15.5px; border-radius: 14px; }
.backl { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 600; font-size: 14px; height: 40px; margin-left: -4px; }
.links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 14px; }
.linkb { color: var(--gold-ink); font-weight: 600; font-size: 14.5px; padding: 8px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.linkb:disabled { color: var(--faint); text-decoration: none; }
.linkb.inl { padding: 0; font-size: inherit; color: inherit; }
.pw { position: relative; }
.pw input.in { padding-right: 50px; }
.pw .eye { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.meterbox { margin: -6px 0 12px; display: grid; gap: 5px; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .25s, background .25s; }
.meter[data-s="0"] i { width: 12%; background: var(--red); }
.meter[data-s="1"] i { width: 32%; background: #d0782f; }
.meter[data-s="2"] i { width: 58%; background: var(--gold2); }
.meter[data-s="3"] i { width: 82%; background: var(--green); }
.meter[data-s="4"] i { width: 100%; background: var(--green); }
.fh { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.formerr { color: var(--red); font-size: 14px; min-height: 20px; margin: 2px 0 10px; }
.formerr:empty { min-height: 8px; margin: 0; }
input.in.codein { font: 600 30px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .38em; text-align: center; padding: 14px 0 14px .38em; height: 64px; margin-bottom: 10px; }
input.in.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .03em; text-transform: uppercase; font-size: 15px; }
.kitkey { font: 600 20px/1.4 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .05em; text-align: center; background: var(--goldbg); color: var(--ink);
  border: 1.5px dashed var(--gold); border-radius: 14px; padding: 16px 10px; margin: 4px 0 14px; user-select: all; -webkit-user-select: all; }
.kitkey span { display: inline-block; white-space: nowrap; }
.kitrow { display: flex; justify-content: center; margin: 0 0 14px; }
.kitrow canvas { display: block; width: 150px; height: 150px; image-rendering: pixelated; }
.check { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 4px 0 14px; font-size: 14.5px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--navy); flex: none; margin: 0; }
.bigic { width: 68px; height: 68px; border-radius: 22px; background: var(--navy); color: var(--gold2); display: grid; place-items: center; margin: 4px 0 6px; }
.bigic.red { color: #f0a594; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.dlcard { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 18px 0 0; color: var(--ink); }
.dlcard .ib2 { width: 44px; height: 44px; border-radius: 14px; background: var(--navy); color: #a4c639; display: grid; place-items: center; flex: none; }
.dlcard .tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dlcard .tx span { color: var(--muted); font-size: 13.5px; }
.dlcard > .ic { color: var(--muted); flex: none; }
.lock .who { color: #d9d2c3; margin: -2px 0 22px; font-size: 15px; }
.lock .note { color: #e6cf98; max-width: 320px; font-size: 14px; }
.lock .pwlock { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.lock .pwlock .pw input.in { max-width: none; }
.lock .pwlock input.in.mono { max-width: none; }
.lock .pw .eye { color: #b9b2a3; }
.lock .btn.bio { background: rgba(255, 255, 255, .08); color: #f3eee3; border-color: rgba(255, 255, 255, .16); }
.lock .linkb { color: #d8c38f; }
.lock .links { margin-top: 8px; }
.acct { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; }
.acct .acav { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--gold2); display: grid; place-items: center; flex: none; }
.acct .tx { min-width: 0; }
.acct .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .t2 { font-size: 13px; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.acct .t2.bad { color: var(--red); }
/* A toast never sits on a sheet's buttons: over an open sheet it goes to the top,
   and one without an action lets taps through. */
body:has(#sheets .sheet.on) #toasts { bottom: auto; top: calc(var(--safe-t) + 14px); }
.toast:not(:has(.tbtn)) { pointer-events: none; }

/* ------------------------------------------------------ download page -- */
.dlbody { background: var(--bg); }
.dlwrap { max-width: 560px; margin: 0 auto; padding: 0 18px; }
.dlhero { background: radial-gradient(120% 90% at 50% 0%, #1d3557 0%, var(--navy) 60%, #0a1220 100%); color: #f3eee3; padding: calc(var(--safe-t) + 14px) 0 30px; text-align: center; }
.dlback { display: inline-flex; align-items: center; gap: 4px; color: #c9c1b0; font-weight: 600; font-size: 14px; height: 40px; float: left; }
.dlicon { display: block; margin: 46px auto 10px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.dlhero h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.02; margin: 8px 0 10px; }
.dlhero h1 em { color: var(--gold2); }
.dllead { color: #cfc8b9; font-size: 16.5px; margin: 0 auto 22px; max-width: 420px; }
.dlbtn { width: 100%; max-width: 360px; height: 56px; font-size: 16.5px; }
.dlbtn.dim { opacity: .55; }
.dlmeta { color: #a9a294; font-size: 13px; margin: 12px 0 0; }
.dlmain { padding-top: 18px; padding-bottom: calc(var(--safe-b) + 24px); }
.dlqr { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.dlqr[hidden] { display: none; }
.dlqr canvas { display: block; width: 150px; height: 150px; image-rendering: pixelated; }
.dlqr p { margin: 0; color: var(--ink2); font-size: 14.5px; }
.dlfeats { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.dlfeats li { display: grid; gap: 2px; padding-left: 16px; border-left: 3px solid var(--gold2); }
.dlfeats span { color: var(--muted); font-size: 14px; }
.dlsteps { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink2); }
.dlsteps li::marker { color: var(--gold); font-weight: 700; }
.dlp { margin: 0 0 12px; font-size: 14.5px; color: var(--ink2); }
.dlp a, .foot a { text-decoration: underline; text-underline-offset: 3px; }
.dlhash { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.dlhash span { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; color: var(--ink2); word-break: break-all; }
@media (max-width: 420px) { .dlqr { flex-direction: column; text-align: center; } }
