/* Family Net: white, calm, lots of air. Light theme only. */
:root {
  --bg: #ffffff; --soft: #f6f7f9; --line: #eceef2; --fg: #1a1d24; --muted: #8b919e;
  --accent: #2563eb; --accent-soft: #eef3fe; --danger: #dc3c3c; --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
[hidden] { display: none !important; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 20px; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
h3 small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* controls */
button, .button, input, select, textarea { font: inherit; color: inherit; }
.button { margin: 0; font-size: 15px; line-height: 1.45; }
.button:not(.primary) { color: var(--fg); }
button, .button { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; min-height: 40px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: var(--soft); }
button:focus-visible, .button:focus-visible, .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.danger { color: var(--danger); }
.icon { padding: 8px; min-width: 40px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #dfe3ea; border-radius: 10px; background: var(--bg); outline: none;
  transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #c9ced8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: #b0b5c0; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-repeat: no-repeat; background-position: right 14px center;
  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' stroke='%238b919e' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=time]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }

/* date picker */
.date-field { display: block; margin-top: 5px; }
.date-btn { width: 100%; justify-content: flex-start; border: 1px solid #dfe3ea; padding: 10px 12px; font-size: 15px; color: var(--fg); }
.date-btn:hover { background: var(--bg); border-color: #c9ced8; }
.dp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: -2px 0 16px; box-shadow: 0 8px 24px rgba(20, 30, 60, .08); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head b { font-size: 15px; }
.dp-head button { border: 0; min-height: 32px; width: 32px; padding: 0; font-size: 20px; color: var(--muted); border-radius: 50%; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-grid span { font-size: 11px; color: var(--muted); padding: 4px 0; }
.dp-grid button { border: 0; width: 36px; height: 36px; min-height: 0; padding: 0; margin: 0 auto; border-radius: 50%; font-size: 14px; }
.dp-grid .other { color: #c3c7cf; }
.dp-grid .today { color: var(--accent); font-weight: 700; }
.dp-grid .on, .dp-grid .on:hover { background: var(--accent); color: #fff; font-weight: 600; }
.dp-clear { width: 100%; margin-top: 8px; color: var(--muted); }
textarea { resize: vertical; }
label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 5px; font-size: 15px; color: var(--fg); }
label.check { display: flex; gap: 10px; align-items: center; color: var(--fg); font-size: 15px; }
label.check input { width: 18px; height: 18px; }
.row { display: flex; gap: 12px; } .row > label { flex: 1; min-width: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; margin: 0; }
.error { color: var(--danger); min-height: 1em; font-size: 14px; }
.spacer { flex: 1; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
code { font-family: ui-monospace, Consolas, monospace; }

/* auth */
#auth, #recovery-show { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--soft); }
.auth-card { width: 100%; max-width: 400px; box-shadow: 0 8px 30px rgba(20, 30, 60, .06); }
.auth-card .logo { width: 56px; height: 56px; display: block; margin-bottom: 14px; }
.auth-card .primary { width: 100%; min-height: 46px; margin-top: 4px; }
.tabs { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: none; font-size: 13px; padding: 6px; min-height: 34px; color: var(--muted); }
.tabs .active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: 600; }
.adv { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.adv summary { cursor: pointer; margin-bottom: 10px; }
.recovery { display: block; padding: 16px; margin: 16px 0; background: var(--soft); border-radius: 10px; font-size: 16px; text-align: center; line-height: 1.8; user-select: all; }

/* layout: sidebar on desktop, tab bar on phones */
#main { display: flex; height: 100vh; }
#nav { display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; border-right: 1px solid var(--line); width: 210px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 0 10px 20px; }
.brand img { width: 30px; height: 30px; }
#nav button { border: 0; justify-content: flex-start; gap: 12px; background: none; color: #4a5060; font-weight: 500; }
#nav button:hover { background: var(--soft); }
#nav .active { background: var(--accent-soft); color: var(--accent); }
main { flex: 1; overflow: auto; padding: 28px 32px 32px; }
.view { max-width: 1240px; margin: 0 auto; }
.bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.bar h2 { margin-right: 6px; }
.bar select { width: auto; min-width: 180px; }


#nav .spacer { flex: 1; }

/* calendar */
.cal-bar h2 { min-width: 190px; }
.nav-btns { display: flex; gap: 4px; }
.seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; min-height: 34px; padding: 4px 14px; color: var(--muted); }
.seg .active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { min-height: 32px; padding: 4px 12px; border-radius: 999px; font-size: 13px; gap: 8px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip.off { color: var(--muted); } .chip.off i { background: none; box-shadow: inset 0 0 0 2px var(--line); }

.cal-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.wd { text-align: left; font-size: 12px; color: var(--muted); padding: 8px 10px; font-weight: 500; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; outline: 0; }
.cell:hover { background: #fafbfc; }
.cell.other .num { color: #c3c7cf; }
.cell.sel { background: var(--accent-soft); }
.num { font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; }
.cell.today .num { background: var(--accent); color: #fff; font-weight: 700; }
.evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev { font-size: 12px; line-height: 1.35; border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 13%, white); color: color-mix(in srgb, var(--c) 70%, black); border-left: 3px solid var(--c); }
.ev:hover { background: color-mix(in srgb, var(--c) 22%, white); }
.ev b { font-weight: 600; }
.more { font-size: 11px; color: var(--muted); padding-left: 6px; }

.day-list { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; }
.ev-item { display: flex; align-items: flex-start; justify-content: flex-start; gap: 14px; text-align: left; padding: 12px 14px; border-radius: var(--radius); width: 100%; position: relative; }
.ev-item::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.ev-time { width: 78px; flex: none; font-size: 13px; color: var(--muted); padding-top: 1px; }
.ev-main { display: flex; flex-direction: column; min-width: 0; }
.ev-title { font-weight: 600; }
.rep { color: var(--muted); font-weight: 400; }
.ev-sub { color: var(--muted); font-size: 13px; }
.ev-notes { color: #5b6170; font-size: 13px; margin-top: 4px; white-space: pre-line; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.agenda { max-width: 720px; display: flex; flex-direction: column; gap: 22px; }
.agenda-day { display: flex; flex-direction: column; gap: 8px; }
.agenda-day h3 { margin-bottom: 2px; }

/* day / week time grid */
.tg { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tg-row { display: grid; }
.tg-sticky { position: sticky; top: 0; z-index: 3; background: var(--bg); }
.tg-head { border-bottom: 1px solid var(--line); }
.tg-dh { border: 0; border-left: 1px solid var(--line); border-radius: 0; flex-direction: column; gap: 0; padding: 6px 0; min-height: 0; }
.tg-dh span { font-size: 12px; color: var(--muted); }
.tg-dh b { font-size: 18px; font-weight: 600; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.tg-dh.today b { background: var(--accent); color: #fff; }
.tg-allday { border-bottom: 1px solid var(--line); }
.tg-label { font-size: 11px; color: var(--muted); padding: 6px 4px; text-align: right; }
.tg-ad { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-body { height: calc(100vh - 290px); min-height: 360px; overflow-y: auto; position: relative; }
.tg-hours { position: relative; }
.tg-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.tg-hours span:first-child { display: none; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); }
.tg-col:hover { background-color: #fafbfc; }
.tg-ev { position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; overflow: hidden;
  padding: 3px 6px; min-height: 0; border: 0; border-left: 3px solid var(--c); border-radius: 6px; text-align: left; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 70%, black); }
.tg-ev:hover { background: color-mix(in srgb, var(--c) 24%, white); }
.tg-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tg-ev span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: #e5484d; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }

.view-cal { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.view-cal i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.view-notes { white-space: pre-line; background: var(--soft); border-radius: 10px; padding: 10px 12px; }

/* status (dashboard) */
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.st-card p { margin: 6px 0; }
.st-ok { color: #16a34a; font-weight: 600; } .st-bad { color: var(--danger); font-weight: 600; }
.st-wide { grid-column: 1 / -1; }
.st-user { display: grid; grid-template-columns: 120px 90px 1fr 160px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.st-user .qbar { max-width: none; }
@media (max-width: 700px) { .st-user { grid-template-columns: 1fr auto; } }

/* settings */
.settings { margin-bottom: 16px; max-width: 720px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.sw:hover { background: var(--c); transform: scale(1.08); }
.sw.on { box-shadow: 0 0 0 2px var(--c); }
.sw-pick { position: relative; overflow: hidden; cursor: pointer; display: inline-block; }
.sw-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.settings .hint { overflow-wrap: anywhere; }  /* long URLs must not widen the page on phones */
.set-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row b { min-width: 110px; }
.set-row .swatches { flex-basis: 100%; }

/* files */
.quota { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.qbar { flex: 1; max-width: 260px; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.qbar > div { height: 100%; background: var(--accent); border-radius: 3px; }
.crumbs { margin: 10px 0 12px; font-size: 14px; color: var(--muted); }
.crumbs button { border: 0; background: none; padding: 2px 4px; min-height: 0; color: var(--fg); font-weight: 500; }
.crumbs button:hover { color: var(--accent); background: none; }
.progress { position: relative; height: 30px; background: var(--soft); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.progress > div { height: 100%; background: var(--accent-soft); transition: width .2s; }
.progress > span { position: absolute; inset: 0; padding: 5px 12px; font-size: 13px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
#files-list { border-top: 1px solid var(--line); }
#files-list li { border-bottom: 1px solid var(--line); }
.item { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 0; padding: 10px 8px; min-height: 56px; }
.item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.item .sub { color: var(--muted); font-size: 12px; }
.folder svg { width: 28px; height: 28px; color: #f0b429; fill: #fde8a8; }
.ftype { display: grid; place-items: center; width: 34px; height: 40px; border-radius: 6px; font-size: 9px; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
#preview img { max-width: 100%; max-height: 50vh; display: block; margin: 0 auto 14px; border-radius: 10px; }

/* spaces */
.cards { gap: 14px; }
.space { position: relative; overflow: hidden; }
.space::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.space-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tag { font-size: 12px; color: var(--muted); margin-left: auto; background: var(--soft); padding: 2px 10px; border-radius: 999px; }
.space .qbar { max-width: none; margin-bottom: 6px; }
.member { display: inline-flex; align-items: center; gap: 2px; background: var(--soft); border-radius: 999px; padding: 3px 12px; margin: 2px; font-size: 14px; }
.x { min-height: 0; min-width: 0; padding: 0 4px; border: 0; background: none; color: var(--muted); }
.x:hover { color: var(--danger); background: none; }
.space .row { flex-wrap: wrap; margin-top: 12px; }

/* dialog */
dialog { border: 0; border-radius: 16px; padding: 24px; width: min(500px, calc(100vw - 24px)); background: var(--bg); color: var(--fg);
  max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(20, 30, 60, .18); overflow-x: hidden; }
dialog input, dialog select { min-width: 0; }
dialog::backdrop { background: rgba(20, 25, 35, .35); }
dialog h3 { font-size: 18px; margin-bottom: 16px; }
.ask { width: min(380px, calc(100vw - 24px)); text-align: center; padding: 28px 24px 20px; }
.ask h3 { margin: 12px 0 6px; font-size: 18px; }
.ask .hint { margin: 0 0 20px; }
.ask-icon { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--danger) 12%, white); }
.ask-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--danger); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.danger-fill, .danger-fill:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.dlg-actions { display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.title-input { font-size: 18px; font-weight: 600; padding: 12px 14px; margin-bottom: 16px; }
.cal-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pick { margin: 0; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); font-size: 14px; cursor: pointer; }
.pick span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.pick input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); }
.switch { display: flex; align-items: center; gap: 10px; color: var(--fg); font-size: 15px; cursor: pointer; }
.switch { position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 0; top: 0; }  /* hidden checkbox: must not widen the page */
.switch span { width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices button { justify-content: flex-start; min-height: 48px; padding: 10px 16px; font-weight: 500; }

#update { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 11; display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; box-shadow: 0 10px 30px rgba(20, 30, 60, .15); max-width: calc(100vw - 24px); }
#update span { font-size: 14px; font-weight: 500; }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--fg); color: #fff; padding: 10px 18px; border-radius: 10px;
  max-width: calc(100vw - 32px); z-index: 10; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); font-size: 14px; }

/* desktop: the month fits the window (rows share the height), only settings, files and the list scroll */
@media (min-width: 1051px) {
  main:has(> #view-cal:not([hidden])) { overflow: hidden; display: flex; flex-direction: column; }
  #view-cal { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
  #cal-month { flex: 1; min-height: 0; align-items: stretch; }
  .cal-grid { grid-template-rows: auto; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
  .cell { min-height: 0; overflow: hidden; }
  .day-list { overflow-y: auto; min-height: 0; }
  #cal-time:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .tg-body { height: auto; flex: 1; min-height: 0; }
  #cal-agenda:not([hidden]) { flex: 1; min-height: 0; overflow-y: auto; }
}

/* tablets: day list moves below the grid */
@media (max-width: 1050px) {
  .cal-layout { grid-template-columns: 1fr; }
  .day-list { position: static; }
}

/* phones */
@media (max-width: 700px) {
  #main { flex-direction: column-reverse; }
  #nav { flex-direction: row; width: auto; border-right: 0; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); }
  .brand, #nav .spacer { display: none; }
  #nav button { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 4px; min-height: 52px; }
  #nav .active { background: none; }
  main { padding: 16px 14px 20px; }
  h2 { font-size: 20px; }
  .cal-bar h2 { min-width: 0; flex: 1 0 100%; }
  .cal-bar .spacer { display: none; }
  #cal-add .label { display: none; }
  #cal-add { margin-left: auto; width: 44px; padding: 0; font-size: 22px; }
  .cell { min-height: 52px; align-items: center; padding: 4px 2px; }
  .wd { text-align: center; padding: 6px 0; }
  .evs { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .ev { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--c); font-size: 0; }
  .more { display: none; }
  .bar select { flex: 1; min-width: 0; }
  .ev-time { width: 64px; }
  .seg button { padding: 4px 10px; }
  .tg-body { height: calc(100vh - 330px); }
  .tg-ev { padding: 2px 3px; font-size: 10px; }
  .tg-hours span { font-size: 10px; right: 4px; }
  dialog { padding: 20px 18px; }
}
