/* Family Calendar: an Outlook-like calendar, light and dark, phones and computers */
:root {
  --bg: #ffffff; --bg2: #f5f6f8; --bg3: #eceef2; --line: #e1e4ea; --line2: #c9ced8; --fg: #1f2329; --fg2: #5b6370; --fg3: #8a919c;
  --accent: #0f6cbd; --accent2: #115ea3; --accentBg: #ebf3fc; --today: #0f6cbd; --red: #c4314b; --work: #ffffff; --off: #fafbfc; --shadow: 0 8px 28px rgba(20, 30, 50, .18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1c1d21; --bg2: #24262b; --bg3: #2d3036; --line: #34373e; --line2: #474b54; --fg: #e8eaed; --fg2: #b1b6bf; --fg3: #858b95;
  --accent: #479ef5; --accent2: #62abf5; --accentBg: #1a2b40; --today: #479ef5; --red: #f1707b; --work: #1f2024; --off: #1a1b1e; --shadow: 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #1c1d21; --bg2: #24262b; --bg3: #2d3036; --line: #34373e; --line2: #474b54; --fg: #e8eaed; --fg2: #b1b6bf; --fg3: #858b95;
  --accent: #479ef5; --accent2: #62abf5; --accentBg: #1a2b40; --today: #479ef5; --red: #f1707b; --work: #1f2024; --off: #1a1b1e; --shadow: 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 "Segoe UI", "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line2); background: var(--bg); border-radius: 6px; padding: 5px 12px; }
button:hover { background: var(--bg2); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--accent2); }
button.danger { color: var(--red); }
button.ghost, button.icon, button.link { border-color: transparent; background: transparent; }
button.icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; font-size: 18px; display: inline-grid; place-items: center; position: relative; }
button.icon:hover, button.ghost:hover { background: var(--bg3); }
button.link { color: var(--accent); padding: 2px 0; }
input, select, textarea { border: 1px solid var(--line2); border-radius: 6px; padding: 6px 8px; background: var(--bg); min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
[hidden] { display: none !important; }
.sp { flex: 1; }
.dim { color: var(--fg2); }

/* ---------------------------------------------------------------- frame */
#app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 6px; font-size: 16px; margin-right: 10px; white-space: nowrap; }
.brand .logo { font-size: 20px; }
.pill { border-radius: 18px; padding: 5px 14px; font-weight: 600; white-space: nowrap; flex: none; }
.nav { display: inline-flex; }
.top h1 { font-size: 18px; font-weight: 600; margin: 0 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line2); border-radius: 18px; padding: 0 10px; background: var(--bg2); width: 240px; }
.search input { border: 0; background: transparent; padding: 6px 0; width: 100%; outline: none; }
#sync small { position: absolute; right: 1px; bottom: 1px; font-size: 10px; font-weight: 700; color: var(--accent); }
.views { display: flex; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; }
.views button { border: 0; background: transparent; border-radius: 6px; padding: 5px 12px; white-space: nowrap; color: var(--fg2); }
.views button.on { background: var(--accentBg); color: var(--accent); font-weight: 700; }
.body { flex: 1; display: flex; min-height: 0; position: relative; }
#side { width: 260px; flex: none; overflow-y: auto; padding: 12px; border-right: 1px solid var(--line); background: var(--bg); }
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.scrim { display: none; }
.fab { display: none; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--c, var(--fg3)) 22%, var(--bg)); box-shadow: inset 0 0 0 2px var(--c, var(--fg3)); font-size: 14px; flex: none; }
.av.sm { width: 22px; height: 22px; font-size: 12px; }

/* ---------------------------------------------------------------- sidebar */
#side h4 { margin: 18px 0 6px; font-size: 13px; color: var(--fg2); display: flex; justify-content: space-between; }
#side .new { width: 100%; padding: 9px; border-radius: 8px; font-size: 15px; margin-bottom: 10px; }
.mm-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.mm-h button { border: 0; background: transparent; font-size: 18px; padding: 0 8px; }
.mm-g { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mm-g i { font-style: normal; font-size: 11px; color: var(--fg3); padding: 2px 0; }
.mm-g button { border: 0; background: transparent; padding: 0; height: 28px; font-size: 12px; border-radius: 50%; position: relative; font-variant-numeric: tabular-nums; }
.mm-g button.out { color: var(--fg3); }
.mm-g button.hol { color: var(--red); }
.mm-g button.sel { background: var(--accentBg); border-radius: 0; }
.mm-g button.td { background: var(--today); color: #fff; border-radius: 50%; font-weight: 700; }
.mm-g button.dot::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.mm-g button.td.dot::after { background: #fff; }
.calrow { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; border-radius: 6px; }
.calrow:hover { background: var(--bg2); }
.calrow input { accent-color: var(--c, var(--accent)); width: 16px; height: 16px; margin: 0; }
.cats { display: flex; flex-wrap: wrap; gap: 4px; }
.cat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px 1px 6px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, var(--bg)); }
.cat::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.todo { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.todo input { margin: 0; accent-color: var(--accent); }
.todo button { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 3px 4px; display: flex; gap: 6px; align-items: baseline; }
.todo button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.todo small { color: var(--fg2); font-size: 11px; } .todo small.late { color: var(--red); font-weight: 700; }
.todo i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.todo.done span { text-decoration: line-through; color: var(--fg3); }
.addtodo { width: 100%; margin-top: 4px; border-style: dashed; background: transparent; }

/* ---------------------------------------------------------------- events */
.ev { --c: var(--accent); border: 0; text-align: left; border-radius: 4px; padding: 2px 6px; cursor: pointer; color: var(--fg); overflow: hidden; background: color-mix(in srgb, var(--c) 20%, var(--bg)); border-left: 3px solid var(--c); font-size: 12px; line-height: 1.3; }
.ev:hover { background: color-mix(in srgb, var(--c) 30%, var(--bg)); }
.ev b { font-weight: 600; }
.ev.b-free { background: var(--bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, var(--bg)); }
.ev.b-tent { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--bg)) 0 6px, var(--bg) 6px 10px); }
.ev.b-oof { background: color-mix(in srgb, #8764b8 22%, var(--bg)); border-left-color: #8764b8; }
.ev.priv { font-style: italic; }
.ev.dragging { opacity: .4; }

/* ---------------------------------------------------------------- day / week grid */
.tg { flex: 1; display: flex; flex-direction: column; min-height: 0; user-select: none; -webkit-user-select: none; }
.tg-head, .tg-all { display: grid; grid-template-columns: 56px 1fr; border-bottom: 1px solid var(--line); }
.tg-head { grid-template-columns: 56px repeat(var(--n), 1fr); }
.gut { display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 6px 4px; color: var(--fg3); font-size: 11px; }
.dh { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; padding: 6px 8px; text-align: left; display: flex; flex-direction: column; min-width: 0; }
.dh small { color: var(--fg2); font-size: 12px; } .dh b { font-size: 22px; font-weight: 400; line-height: 1.1; }
.dh em { font-style: normal; font-size: 11px; color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh.off b { color: var(--red); }
.dh.td small, .dh.td b { color: var(--today); font-weight: 700; }
.dh.td b { color: #fff; background: var(--today); border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; }
.lanes { display: grid; grid-template-columns: repeat(var(--n), 1fr); min-height: 26px; padding: 1px 0 2px; position: relative; }
.lcell { border-left: 1px solid var(--line); }
.bar { margin: 1px 2px; z-index: 1; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; } .bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tg-body { flex: 1; overflow-y: auto; position: relative; }
.tg-in { position: relative; display: grid; grid-template-columns: 56px 1fr; }
.hours { position: relative; }
.hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--fg3); white-space: nowrap; }
.cols { display: grid; grid-template-columns: repeat(var(--n), 1fr); position: relative; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--hh) / 2), color-mix(in srgb, var(--line) 50%, transparent) calc(var(--hh) / 2) calc(var(--hh) / 2 + 1px), transparent calc(var(--hh) / 2 + 1px) var(--hh)); }
.col { position: relative; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--off) 70%, transparent); }
.col .work { position: absolute; left: 0; right: 0; background: var(--work); opacity: .75; pointer-events: none; }
.col.td { background: color-mix(in srgb, var(--accentBg) 55%, transparent); }
.col.td .work { background: color-mix(in srgb, var(--accentBg) 55%, var(--work)); }
.blk { position: absolute; display: flex; flex-direction: column; gap: 1px; z-index: 2; box-shadow: 0 0 0 1px var(--bg); }
.blk small { color: var(--fg2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk b { overflow: hidden; text-overflow: ellipsis; }
.blk.short { flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.blk .rep { position: absolute; right: 4px; top: 1px; font-style: normal; color: var(--fg2); font-size: 11px; }
.blk .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
#ghost { z-index: 5; opacity: .9; box-shadow: var(--shadow); pointer-events: none; }
#sel { position: absolute; left: 2px; right: 2px; z-index: 3; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid var(--accent); border-radius: 4px; font-size: 11px; padding: 2px 6px; color: var(--accent); pointer-events: none; }
.now { position: absolute; height: 2px; background: var(--red); z-index: 4; pointer-events: none; }
.now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* ---------------------------------------------------------------- month */
.mon { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mon-h, .mon-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mon.wkn .mon-h, .mon.wkn .mon-g { grid-template-columns: 28px repeat(7, minmax(0, 1fr)); }
.mon-h span { padding: 6px 8px; font-size: 12px; color: var(--fg2); border-bottom: 1px solid var(--line); }
.mon-h b { font-weight: 400; } .mon-h .sh { display: none; }
.mon-g { flex: 1; grid-template-rows: repeat(var(--w), minmax(0, 1fr)); }
.wkno { font-style: normal; font-size: 11px; color: var(--fg3); padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.mc { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.mc.out { background: var(--off); } .mc.out .dn { color: var(--fg3); }
.mc.over { background: var(--accentBg); }
.mc .dn { border: 0; background: transparent; padding: 1px 5px; align-self: flex-start; font-size: 13px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.mc.off .dn { color: var(--red); }
.mc.td .dn { background: var(--today); color: #fff; font-weight: 700; }
.mc em { font-style: normal; font-size: 11px; color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.chip { white-space: nowrap; text-overflow: ellipsis; padding: 1px 5px; border-left-width: 0; background: transparent; display: block; width: 100%; }
.chip::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: 1px; }
.chip small { color: var(--fg2); }
.chip.long { background: color-mix(in srgb, var(--c) 22%, var(--bg)); border-left: 3px solid var(--c); font-weight: 600; }
.chip.long::before { display: none; }
.more { border: 0; background: transparent; color: var(--fg2); font-size: 12px; text-align: left; padding: 0 5px; }
.more:hover { color: var(--accent); background: transparent; }

/* ---------------------------------------------------------------- agenda, search, year */
.agenda { flex: 1; overflow-y: auto; padding: 8px 20px 40px; max-width: 900px; width: 100%; }
.agenda section { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.agenda h3 b { font-size: 26px; font-weight: 400; width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.agenda h3 span { display: flex; flex-direction: column; font-size: 14px; line-height: 1.2; } .agenda h3 small { color: var(--fg2); font-size: 12px; font-weight: 400; }
.agenda section.td h3 b { color: var(--today); font-weight: 700; }
.ag { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-left: 4px solid var(--c, var(--line2)); border-radius: 6px; background: var(--bg2); padding: 8px 12px; margin-left: 50px; }
.ag:hover { background: var(--bg3); }
.ag .tm { width: 64px; flex: none; font-size: 13px; font-variant-numeric: tabular-nums; } .ag .tm small { color: var(--fg2); }
.ag .bd { flex: 1; display: flex; flex-direction: column; min-width: 0; } .ag .bd small { color: var(--fg2); }
.ag.hol { color: var(--red); font-size: 13px; cursor: default; }
.empty { color: var(--fg2); text-align: center; padding: 40px 0; }
.more-ag { margin: 16px 0 0 50px; }
.year { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 28px; align-content: start; }

/* ---------------------------------------------------------------- peek, dialogs, toasts, reminders */
#peek { position: fixed; z-index: 30; width: min(360px, calc(100vw - 16px)); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 0 0 12px; }
.pk-h { display: flex; align-items: flex-start; gap: 8px; padding: 12px 10px 8px 16px; border-top: 5px solid var(--c); border-radius: 10px 10px 0 0; }
.pk-h b { flex: 1; font-size: 17px; line-height: 1.3; word-break: break-word; }
#peek p { margin: 4px 16px; } #peek .notes { white-space: pre-wrap; color: var(--fg2); max-height: 160px; overflow: auto; background: var(--bg2); padding: 8px; border-radius: 6px; }
#peek .who { display: flex; align-items: center; gap: 4px; }
.acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 16px 0; }
.acts.col { flex-direction: column; align-items: stretch; padding: 10px 0 0; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 2px 8px; color: var(--fg2); }
dialog { border: 0; border-radius: 12px; padding: 0; background: var(--bg); color: var(--fg); box-shadow: var(--shadow); max-width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(10, 16, 28, .38); }
.ask form { padding: 18px 20px; width: min(340px, 90vw); } .ask p { margin: 0; font-weight: 600; }
.ed { width: min(640px, 100vw - 16px); padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.ed.small { width: min(440px, 100vw - 16px); }
.ed-h { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; background: var(--bg); padding-top: 14px; z-index: 1; }
.ed-h h2 { flex: 1; margin: 0; font-size: 20px; }
.ed .big { flex: 1; font-size: 20px; border: 0; border-bottom: 2px solid var(--line2); border-radius: 0; padding: 6px 2px; }
.ed .big:focus { outline: 0; border-bottom-color: var(--accent); }
.ed label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fg2); }
.ed label > input, .ed label > select, .ed label > textarea { color: var(--fg); font-size: 14px; }
.ed .lbl { font-size: 12px; color: var(--fg2); margin-bottom: -4px; }
.row2, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.dt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt > span:first-child { width: 64px; font-size: 13px; color: var(--fg2); }
.dt input[type=date] { flex: 1; min-width: 140px; } .dt input[type=number] { width: 70px; }
.when { display: flex; flex-direction: column; gap: 8px; background: var(--bg2); padding: 10px 12px; border-radius: 8px; }
.sw { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--fg) !important; font-size: 14px !important; }
.sw input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.pv { align-self: end; padding-bottom: 6px; font-size: 13px !important; }
.whos { display: flex; flex-wrap: wrap; gap: 6px; }
.who input { display: none; }
.who span { display: inline-block; padding: 4px 10px; border-radius: 16px; border: 1px solid var(--line2); color: var(--fg); font-size: 13px; cursor: pointer; }
.who input:checked + span { background: color-mix(in srgb, var(--c) 22%, var(--bg)); border-color: var(--c); font-weight: 600; }
.scope { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: var(--accentBg); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.scope label { flex-direction: row; align-items: center; color: var(--fg); font-size: 13px; }
.custom { display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--line2); padding-left: 10px; }
.by { display: flex; gap: 4px; flex-wrap: wrap; }
.by input { display: none; }
.by span { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 16px; border: 1px solid var(--line2); font-size: 12px; cursor: pointer; color: var(--fg); }
.by input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.set section { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.set h3 { margin: 0; font-size: 15px; }
.set p { margin: 0; }
#sLink { flex: 1; min-width: 180px; font-size: 12px; }
.mrow { display: flex; gap: 6px; align-items: center; }
.mrow .emo { width: 46px; text-align: center; } .mrow .nm { flex: 1; }
.mrow input[type=color] { width: 40px; height: 34px; padding: 2px; }
.btn { display: inline-flex !important; flex-direction: row !important; align-items: center; border: 1px solid var(--line2); border-radius: 6px; padding: 5px 12px; cursor: pointer; color: var(--fg) !important; font-size: 14px !important; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pick button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border-color: var(--c); font-weight: 600; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: #2b2f36; color: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; pointer-events: auto; }
.toast button { background: transparent; border: 0; color: #8cc8ff; font-weight: 700; padding: 0; }
#rem { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(340px, calc(100vw - 32px)); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 14px; max-height: 60vh; overflow: auto; }
#rem h3 { margin: 0 0 6px; font-size: 15px; }
.ri { border-left: 4px solid var(--c); padding: 4px 0 8px 10px; display: flex; flex-direction: column; }
.ri small { color: var(--fg2); } .ri .acts { padding: 6px 0 0; gap: 6px; } .ri .acts button { padding: 3px 8px; font-size: 12px; }

/* ---------------------------------------------------------------- welcome */
#welcome { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, var(--accentBg), transparent 50%), var(--bg); }
.wl { max-width: 820px; width: 100%; text-align: center; }
.wl .logo { font-size: 54px; } .wl h1 { margin: 4px 0; font-size: 32px; } .wl .lead { font-size: 18px; margin: 4px 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; text-align: left; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 2px 10px rgba(20, 30, 50, .06); }
.card.hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentBg); }
.card h2 { margin: 0; font-size: 18px; }
.card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg2); }
.card input { font-size: 15px; padding: 9px 10px; color: var(--fg); }
.card button { padding: 9px; margin-top: auto; }
.err { color: var(--red); margin: 0; font-size: 13px; }
.langs { justify-content: center; margin-top: 18px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 760px) {
  .brand, .search { display: none; }
  .pill { padding: 4px 10px; }
  .top { padding: 6px 8px; gap: 2px; } .top h1 { font-size: 16px; }
  #side { position: absolute; left: 0; top: 0; bottom: 0; z-index: 20; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); width: 280px; }
  body.drawer #side { transform: none; }
  body.drawer .scrim { display: block; position: absolute; inset: 0; z-index: 15; background: rgba(0, 0, 0, .3); }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; border: 0; font-size: 28px; box-shadow: var(--shadow); z-index: 10; }
  .tg-head, .tg-all, .tg-in { grid-template-columns: 40px 1fr; } .tg-head { grid-template-columns: 40px repeat(var(--n), 1fr); }
  .hours span { right: 4px; font-size: 10px; }
  .dh b { font-size: 18px; } .dh { padding: 4px; }
  .mon-h .lg { display: none; } .mon-h .sh { display: inline; }
  .chip small { display: none; }
  .agenda { padding: 4px 10px 80px; } .ag { margin-left: 0; }
  .cards, .row2, .grid2 { grid-template-columns: 1fr; }
  .ed { padding: 0 14px 16px; }
  #rem { right: 8px; left: 8px; width: auto; bottom: 84px; }
}
@media print {
  .top button, .search, .views, #side, .fab, #peek, #rem, #toasts { display: none !important; }
  #app, .body, #main, .tg-body { height: auto !important; overflow: visible !important; }
  body { background: #fff; color: #000; }
}
