/* HaFa Web, decision 200: the workspace tools. Meetings, Calendar, Tasks, Notes and Files, in the same
   glass as the inbox: floating panels over soft colour, system fonts, one bright colour (saffron) and
   navy for structure. Laid out the way the Mac's own Calendar, Reminders, Notes and Finder are. */
:root {
  --primary: #12275F; --primary-hover: #2A4A9E; --sheet: rgba(250, 251, 254, .9); --scrim: rgba(5, 10, 23, .26);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --primary: #2A4A9E; --primary-hover: #3A5CB4; --sheet: rgba(20, 30, 58, .93); --scrim: rgba(0, 0, 0, .45); }
}
:root[data-theme="dark"] { --primary: #2A4A9E; --primary-hover: #3A5CB4; --sheet: rgba(20, 30, 58, .93); --scrim: rgba(0, 0, 0, .45); }

/* ---- the frame ------------------------------------------------------------------------------- */
.tools { min-width: 0; min-height: 0; display: flex; border-radius: var(--r); overflow: hidden; position: relative; background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: inset 0 1px 0 var(--spec), 0 18px 40px -18px var(--shadow); }
.view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; padding: 22px 28px 14px; flex-wrap: wrap; }
.tool-titles { min-width: 0; }
.tool-h { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.tool-sub { margin: 3px 0 0; color: var(--faint); font-size: 13px; min-height: 1em; }
.tool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 28px 12px; }
.tool-foot { padding: 8px 28px 16px; }
.tool-banner { margin: 0 28px 12px; padding: 10px 14px; border-radius: 14px; background: rgba(245, 179, 1, .18); font-size: 13.5px; }
.privacy { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; color: var(--faint); }
.privacy .i { width: 14px; height: 14px; flex: none; }
.grow { flex: 1; }
.offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
.code { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--fill2); color: var(--muted); }
.i.sm { width: 16px; height: 16px; }
.i.xs { width: 13px; height: 13px; }

/* ---- controls -------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hair);
  background: var(--glass-strong); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--spec), 0 1px 2px rgba(0, 0, 0, .05); }
.btn .i { width: 16px; height: 16px; }
.btn:hover { background: var(--fill2); }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px -8px rgba(18, 39, 95, .8); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.danger-text { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; height: 38px; }
.btn:disabled, .icon-btn:disabled, .dropzone:disabled { opacity: .45; cursor: default; }
.btn.left { margin-right: auto; }
.btn-link { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 0; display: inline-flex; align-items: center; gap: 4px; }
.btn-link:hover { text-decoration: underline; }
.icon-btn.xs { width: 28px; height: 28px; }
.icon-btn.xs .i { width: 16px; height: 16px; }
.icon-btn.on { color: var(--saffron); }

.tseg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill); gap: 2px; }
.tseg-b { border: 0; background: none; padding: 4px 12px; min-height: 26px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tseg-b .i { width: 16px; height: 16px; }
.tseg-b:hover { color: var(--text); }
.tseg-b.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1), inset 0 1px 0 var(--spec); }

.inp { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--fill); color: var(--text); outline: none; min-width: 0; }
.inp:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(245, 179, 1, .3); }
.inp.big { height: auto; border: 0; background: none; padding: 4px 0 10px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; box-shadow: none; }
.inp.area { height: auto; padding: 9px 12px; resize: vertical; min-height: 72px; line-height: 1.45; }
.sel { appearance: none; -webkit-appearance: none; height: 30px; border-radius: 9px; border: 1px solid var(--hair); padding: 0 28px 0 10px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A93A8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 12px; }
.sel option { color: #0B1223; }
.field { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hair); }
.field-k { color: var(--muted); font-size: 13px; font-weight: 500; }
.row-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); cursor: pointer; }
.row-switch-t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.row-switch-t b { display: inline-flex; align-items: center; gap: 6px; }
.row-switch-t .fine { margin: 0; }
.dt-row { display: flex; gap: 8px; }
.dt-row .inp[type="time"] { flex: 0 0 120px; }
.form-err { color: var(--danger); font-size: 13px; margin: 10px 0 0; }

/* ---- layers ---------------------------------------------------------------------------------- */
.layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.layer > * { pointer-events: auto; }
.scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: 20px; }
.sheet { width: min(480px, 100%); max-height: min(88vh, 780px); display: flex; flex-direction: column; border-radius: 26px; background: var(--sheet); }
.sheet.wide { width: min(900px, 100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 4px 22px; }
.sheet-h { margin: 0; font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { padding: 6px 22px 10px; overflow: auto; }
.sheet-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 18px 18px; }
.sheet-foot:empty { display: none; }
.sheet-foot .left { margin-right: auto; }
.sheet.alert { width: min(340px, 100%); text-align: center; }
.alert .sheet-head { justify-content: center; padding: 22px 22px 4px; }
.alert .sheet-head .icon-btn { display: none; }
.alert .sheet-h { white-space: normal; }
.alert-text { margin: 4px 0 6px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.alert .sheet-foot .btn { flex: 1; }
.scrim.out { opacity: 0; transition: opacity .15s; }

.pop { position: fixed; z-index: 51; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; border-radius: 18px; padding: 14px; background: var(--sheet); }
.pop.menu { width: 210px; padding: 6px; }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; cursor: pointer; color: var(--text); text-align: left; }
.menu-item .i { width: 16px; height: 16px; color: var(--muted); }
.menu-item:hover { background: var(--fill2); }
.menu-item.bad, .menu-item.bad .i { color: var(--danger); }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; background: var(--sheet); }
.toast.bad::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast-act { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; font-size: 13.5px; }

.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; color: var(--muted); max-width: 440px; margin: 0 auto; }
.state-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--fill2); color: var(--accent); }
.state-icon .i { width: 28px; height: 28px; }
.state-title { margin: 8px 0 0; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.state-text { margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--fill2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- the overview, in the inbox --------------------------------------------------------------- */
.pane > .empty { max-height: 100%; overflow: auto; max-width: 780px; }
.quick-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 12px; }
.qa { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; cursor: pointer; color: var(--text); font-weight: 600; font-size: 13.5px; text-align: left; }
.qa .i { color: var(--accent); }
.qa:hover { background: var(--glass-strong); }
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.card { border-radius: 20px; padding: 14px 16px 8px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 700; }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-width: 0; }
.ov-list li + li { border-top: 1px solid var(--hair); }
.ov-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.ov-text { flex: 1; min-width: 0; display: flex; flex-direction: column; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.ov-t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-s { font-size: 12px; color: var(--muted); }
.ov-s.late { color: var(--danger); font-weight: 600; }
.ov-list .ov-none { color: var(--faint); font-size: 13px; padding: 10px 0; }

/* ---- meetings -------------------------------------------------------------------------------- */
.meet-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 22px; }
.meet-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 18px; border-radius: 22px; text-align: left; cursor: pointer; color: var(--text); min-height: 156px; min-width: 0; }
.meet-card:disabled { opacity: .5; cursor: default; }
.meet-tile { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: auto; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px var(--shadow); }
.meet-tile .i { width: 24px; height: 24px; }
.c-new .meet-tile { background: linear-gradient(160deg, #FFCB45, #F5B301); color: #0A1737; }
.c-sched .meet-tile { background: linear-gradient(160deg, #3A5CB4, #12275F); }
.c-join .meet-tile { background: linear-gradient(160deg, #1597B8, #0E7490); }
.meet-card-t { font-size: 16px; font-weight: 700; margin-top: 14px; letter-spacing: -.01em; }
.meet-card-s { font-size: 13px; color: var(--muted); }
.meet-card-s.bad { color: var(--danger); }
.c-join { cursor: default; }
.join-row { display: flex; gap: 6px; width: 100%; margin: 6px 0 2px; }
.join-inp { height: 30px; font-family: var(--mono); font-size: 13px; }
.sec-h { font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 6px 8px; }
.meet-list { list-style: none; margin: 0; padding: 4px; border-radius: 18px; }
.meet-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; }
.meet-row + .meet-row { box-shadow: 0 -1px 0 var(--hair); }
.meet-row:hover { background: var(--fill); }
.meet-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fill2); color: var(--accent); flex: none; }
.meet-ic.live { background: var(--ok); color: #fff; box-shadow: 0 0 0 4px rgba(31, 157, 85, .18); }
.meet-ic.upcoming { background: rgba(42, 74, 158, .15); }
.meet-main { flex: 1; min-width: 0; }
.meet-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-sub { display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.meet-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.meet-acts .btn { margin-right: 4px; }
.meet-acts .icon-btn { width: 34px; height: 34px; }
.meet-acts .icon-btn .i { width: 18px; height: 18px; }
.invite-preview { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--fill); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 300px; overflow: auto; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px; border-radius: 12px; cursor: pointer; text-align: left; color: var(--text); }
.pick:hover { background: var(--fill2); }
.pick:disabled { opacity: .5; }
.pick .i { color: var(--faint); width: 18px; height: 18px; }
.pick-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.pick-none { padding: 16px 8px; color: var(--muted); font-size: 13.5px; text-align: center; }
.link-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fill); margin-top: 10px; }
.link-box .code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- calendar -------------------------------------------------------------------------------- */
.view.cal { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.cal-side { display: flex; flex-direction: column; gap: 18px; padding: 18px 16px 16px; border-right: 1px solid var(--hair); background: var(--fill); min-height: 0; overflow: auto; }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 6px 6px; }
.mini-t { font-weight: 700; font-size: 13.5px; }
.mini-nav { display: flex; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.mini-wd { font-size: 10.5px; font-weight: 600; color: var(--faint); padding: 2px 0 4px; }
.mini-d { position: relative; border: 0; background: none; width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text); padding: 0; font-variant-numeric: tabular-nums; }
.mini-d:hover { background: var(--fill2); }
.mini-d.out { color: var(--faint); }
.mini-d.in { background: var(--fill2); }
.mini-d.sel:not(.today) { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mini-d.today { background: var(--saffron); color: #0A1737; font-weight: 700; }
.mini-d.busy::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); transform: translateX(-50%); }
.mini-d.today.busy::after { background: #0A1737; }
.side-k { margin: 0 0 6px 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.up-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); }
.up-item:hover { background: var(--fill2); }
.up-item > .i { color: var(--faint); }
.up-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.up-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.up-t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-s { font-size: 11.5px; color: var(--muted); }
.cal-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 18px 22px 12px; flex-wrap: wrap; }
.cal-h { font-size: 26px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.stepper { display: flex; }
.stepper .icon-btn { width: 32px; height: 32px; }
.add-narrow { display: none; }
.cal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; border-top: 1px solid var(--hair); }

.tg { --gut: 58px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tg-head, .tg-allday { display: grid; grid-template-columns: var(--gut) repeat(var(--days), minmax(0, 1fr)); overflow-y: hidden; scrollbar-gutter: stable; }
.tg-head { border-bottom: 1px solid var(--hair); }
.tg-day { border: 0; background: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; cursor: pointer; color: var(--muted); min-width: 0; }
.tg-wd { font-size: 12px; font-weight: 600; }
.tg-num { font-size: 19px; font-weight: 600; color: var(--text); width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.tg-day:hover .tg-num { background: var(--fill2); }
.tg-day.today .tg-wd { color: var(--accent); }
.tg-day.today .tg-num { background: var(--saffron); color: #0A1737; }
.tg-allday { border-bottom: 1px solid var(--hair); min-height: 30px; }
.tg-allk { font-size: 10.5px; color: var(--faint); text-align: right; padding: 7px 8px 0 0; }
.tg-allarea { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); grid-auto-rows: 24px; row-gap: 2px; padding: 3px 0; max-height: 86px; overflow-y: auto; }
.tg-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
.tg-grid { position: relative; display: grid; grid-template-columns: var(--gut) repeat(var(--days), minmax(0, 1fr)); height: calc(var(--hour) * 24); }
.tg-hours { position: relative; }
.tg-hr { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-col { position: relative; border-left: 1px solid var(--hair); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background-image: linear-gradient(to bottom, var(--hair) 1px, transparent 1px); background-size: 100% var(--hour); }
.tg-col.today { background-color: rgba(245, 179, 1, .05); }
.tg-now { position: absolute; left: -1px; right: 0; height: 2px; margin-top: -1px; background: var(--danger); z-index: 3; pointer-events: none; }
.tg-now-dot { position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.ev { --c: #2A4A9E; position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; padding: 0; cursor: pointer; color: var(--text); min-width: 0; overflow: hidden; }
.ev-t { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-s { max-width: 100%; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.tm { position: absolute; z-index: 1; border-radius: 8px; padding: 3px 18px 3px 9px; background: var(--fill2); background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: inset 3px 0 0 var(--c); }
.ev.tm .ev-t { color: var(--text); color: color-mix(in srgb, var(--c) 50%, var(--text)); }
.ev.tm:hover, .ev.tm:focus-visible { z-index: 2; background: color-mix(in srgb, var(--c) 30%, transparent); }
.ev.tm.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.ev-ic { position: absolute; right: 4px; top: 4px; width: 13px; height: 13px; color: var(--c); }
.ev.ad { margin: 0 2px; height: 22px; justify-content: center; padding: 0 22px 0 8px; border-radius: 6px; background: var(--c); }
.ev.ad .ev-t { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .18); }
.ev.ad .ev-ic { color: #fff; top: 4px; }
.ev.ghost { background: color-mix(in srgb, var(--saffron) 28%, transparent); box-shadow: inset 3px 0 0 var(--saffron), 0 8px 20px -10px var(--shadow); pointer-events: none; z-index: 4; left: 2px; width: calc(100% - 4px); }

.mg { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mg-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--hair); }
.mg-wd { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; padding: 6px 12px; }
.mg-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(76px, 1fr)); overflow: auto; }
.mg-cell { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 3px 4px 2px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); overflow: hidden; }
.mg-cell:nth-child(7n) { border-right: 0; }
.mg-cell.out { background: var(--fill); }
.mg-num { align-self: flex-end; border: 0; background: none; width: 26px; height: 26px; flex: none; border-radius: 50%; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text); padding: 0; font-variant-numeric: tabular-nums; }
.mg-num:hover { background: var(--fill2); }
.mg-cell.out .mg-num { color: var(--faint); }
.mg-cell.today .mg-num { background: var(--saffron); color: #0A1737; }
.ev.mo { flex-direction: row; align-items: center; gap: 5px; width: 100%; padding: 1px 6px; border-radius: 6px; background: none; flex: none; }
.ev.mo:hover { background: var(--fill2); }
.ev.mo.ad { margin: 0; height: auto; background: var(--c); padding: 1px 6px; }
.ev.mo .ev-t { flex: 1; min-width: 0; font-weight: 500; }
.ev.mo.ad .ev-t { font-weight: 600; }
.ev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.ev-time { font-size: 11px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.ev.mo .ev-ic { position: static; width: 12px; height: 12px; flex: none; }
.mg-more { border: 0; background: none; padding: 0 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: left; cursor: pointer; }
.mg-more:hover { color: var(--text); }

.evp-top { display: flex; gap: 10px; }
.evp-sw { width: 4px; border-radius: 2px; flex: none; align-self: stretch; }
.evp-titles { min-width: 0; }
.evp-t { margin: 0; font-size: 16px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.evp-when { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.evp-line { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.evp-notes { margin: 10px 0 0; max-height: 120px; overflow: auto; white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; }
.evp-meet, .meet-box { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--fill); }
.evp-meet .fine, .meet-box .fine { margin: 8px 0 0; }
.evp-meet-t, .meet-box-t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; flex-wrap: wrap; }
.evp-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.evp-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hair); }
.meet-box .row-switch { border-top: 0; padding: 0; }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }

/* ---- tasks ----------------------------------------------------------------------------------- */
.quick { display: flex; align-items: center; gap: 8px; margin: 0 28px 14px; padding: 6px 6px 6px 12px; border-radius: 16px; }
.quick:focus-within { box-shadow: 0 0 0 3px rgba(245, 179, 1, .3), inset 0 1px 0 var(--spec); }
.quick-ic { display: grid; color: var(--accent); }
.quick-inp { flex: 1; min-width: 0; height: 32px; border: 0; background: none; outline: none; font-size: 15px; }
.quick-due { height: 30px; border: 0; border-radius: 8px; padding: 0 8px; background: var(--fill); color: var(--muted); font-size: 12.5px; width: 140px; outline: none; }
.tasks-body { flex: 1; min-height: 0; overflow: auto; padding: 0 28px 8px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.lane { display: flex; flex-direction: column; min-height: 220px; padding: 10px; border-radius: 20px; background: var(--fill); transition: background .15s, box-shadow .15s; }
.lane.over { background: var(--fill2); box-shadow: inset 0 0 0 2px rgba(245, 179, 1, .55); }
.lane-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.lane-dot { width: 9px; height: 9px; border-radius: 50%; }
.s-todo .lane-dot { background: var(--faint); }
.s-doing .lane-dot { background: var(--saffron); }
.s-done .lane-dot { background: var(--ok); }
.lane-t { flex: 1; margin: 0; font-size: 14px; font-weight: 700; }
.lane-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--fill2); padding: 1px 8px; border-radius: 999px; }
.lane-list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 80px; }
.lane-empty { margin: 0; padding: 18px 8px; font-size: 12.5px; color: var(--faint); text-align: center; }
.tcard { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--glass-edge); cursor: grab;
  box-shadow: inset 0 1px 0 var(--spec), 0 1px 2px rgba(0, 0, 0, .05), 0 8px 18px -14px var(--shadow); }
.tcard:active { cursor: grabbing; }
.tcard.dragging { opacity: .35; }
.tcard.pending { opacity: .6; }
.tcard.done .ttitle { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.tcheck { flex: none; width: 20px; height: 20px; margin-top: 1px; padding: 0; border-radius: 50%; border: 1.5px solid var(--faint); background: none; display: grid; place-items: center; color: transparent; cursor: pointer; }
.tcheck .i { width: 13px; height: 13px; stroke-width: 2.8; }
.tcheck:hover { border-color: var(--accent); color: var(--faint); }
.tcheck.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.tmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ttitle { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.tmeta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-due { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--fill2); color: var(--muted); }
.chip-due.overdue { background: rgba(217, 58, 43, .14); color: var(--danger); }
.chip-due.today { background: rgba(245, 179, 1, .22); color: var(--text); }
.chip-pri { font-weight: 800; font-size: 12.5px; color: var(--saffron); letter-spacing: .02em; }
.chip-pri.p1 { color: var(--faint); }
.chip-pri.p3 { color: var(--danger); }
.chip-notes { display: inline-grid; color: var(--faint); }
.chip-status { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--fill2); color: var(--muted); }
.chip-status.s-doing { background: rgba(245, 179, 1, .22); color: var(--text); }
.chip-status.s-done { background: rgba(31, 157, 85, .15); color: var(--ok); }
.drop-mark { flex: none; height: 3px; margin: -2px 4px; border-radius: 2px; background: var(--saffron); box-shadow: 0 0 0 3px rgba(245, 179, 1, .2); }
.tlist { display: flex; flex-direction: column; max-width: 780px; padding: 6px; border-radius: 18px; }
.tlist .tcard { background: none; border: 0; box-shadow: none; border-radius: 12px; cursor: pointer; }
.tlist .tcard + .tcard { box-shadow: 0 -1px 0 var(--hair); }
.tlist .tcard:hover { background: var(--fill); }
.tlist .btn-link { align-self: flex-start; padding: 10px 12px; }

/* ---- notes ----------------------------------------------------------------------------------- */
.view.notes-view { display: grid; grid-template-columns: 212px 300px minmax(0, 1fr); }
.nf { display: flex; flex-direction: column; gap: 2px; min-height: 0; padding: 20px 10px 14px; background: var(--fill); border-right: 1px solid var(--hair); }
.nf-h { padding: 0 8px 14px; font-size: 24px; }
.nf-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--text); font-size: 13.5px; font-weight: 500; }
.nf-item .i { width: 17px; height: 17px; color: var(--accent); }
.nf-item:hover { background: var(--fill2); }
.nf-item.on { background: var(--fill2); font-weight: 600; }
.nf-l { flex: 1; text-align: left; }
.nf-n { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nf .privacy { padding: 0 6px; }
.nl { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--hair); }
.nl-top { display: flex; align-items: center; gap: 6px; padding: 14px 8px 10px 12px; }
.search.nl-search { flex: 1; margin: 0; }
.nl-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 12px; }
.nl-sec { margin: 10px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.nl-row { position: relative; display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--text); text-align: left; }
.nl-row + .nl-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--hair); }
.nl-row:hover { background: var(--fill); }
.nl-row.on { background: rgba(245, 179, 1, .3); }
.nl-row.on::before, .nl-row.on + .nl-row::before { display: none; }
.nl-t { padding-right: 18px; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-l2 { display: flex; gap: 8px; min-width: 0; font-size: 12.5px; }
.nl-d { flex: none; color: var(--text); opacity: .8; }
.nl-s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-pin { position: absolute; right: 10px; top: 12px; color: var(--saffron); }
.nl-none { padding: 20px; color: var(--faint); text-align: center; font-size: 13px; }
.ne { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ne-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 10px 14px; }
.ne-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ne-status, .ne-words { margin-right: 8px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ne-status.bad { color: var(--danger); }
.ne-back { display: none; }
.ne-paper { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 clamp(20px, 5vw, 72px) 24px; overflow: auto; }
.ne-date { margin: 0 0 14px; text-align: center; font-size: 12px; color: var(--faint); }
.ne-title { width: 100%; padding: 0; margin: 0 0 8px; border: 0; background: none; outline: none; color: var(--text); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.ne-body { flex: 1; width: 100%; min-height: 320px; padding: 0; border: 0; background: none; outline: none; resize: none; color: var(--text); font-size: 15.5px; line-height: 1.6; }
.ne-title:disabled, .ne-body:disabled { opacity: .5; }
.ne-empty { flex: 1; display: grid; place-items: center; }

/* ---- files ----------------------------------------------------------------------------------- */
.sort-box { display: flex; align-items: center; gap: 2px; }
.sort-box .icon-btn { width: 32px; height: 32px; }
.storage { display: flex; align-items: center; gap: 10px; margin: 0 28px 12px; padding: 10px 14px; border-radius: 14px; font-size: 13px; }
.storage > .i { width: 18px; height: 18px; color: var(--accent); }
.sk { font-weight: 600; }
.sbar { flex: 1; max-width: 380px; height: 6px; border-radius: 3px; background: var(--fill2); overflow: hidden; }
.sfill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2A4A9E, #F5B301); }
.sbar.high .sfill { background: var(--danger); }
.stext { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.uploads { list-style: none; margin: 0 28px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.uploads:not(:empty) { margin-bottom: 12px; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.up-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: center; }
.up-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { grid-column: 2; grid-row: 1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pbar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--fill2); overflow: hidden; }
.pfill { display: block; width: 0; height: 100%; background: var(--accent); }
.up-row.ok .pfill { background: var(--ok); }
.up-row.failed .pbar { display: none; }
.up-row.failed .up-pct { grid-column: 1 / -1; grid-row: 2; color: var(--danger); }
.files-body { flex: 1; min-height: 0; overflow: auto; padding: 0 28px 8px; }
.ftile { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #7A849B; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -6px var(--shadow); }
.ftile.sm { width: 30px; height: 30px; border-radius: 8px; }
.ftile.sm .i { width: 17px; height: 17px; }
.ftile.lg { width: 64px; height: 64px; border-radius: 18px; }
.ftile.lg .i { width: 32px; height: 32px; stroke-width: 1.6; }
.k-image { background: linear-gradient(160deg, #19B394, #0E7490); }
.k-video { background: linear-gradient(160deg, #9461F5, #6D28D9); }
.k-audio { background: linear-gradient(160deg, #E0457B, #B0215A); }
.k-pdf { background: linear-gradient(160deg, #EF5A4A, #C42E20); }
.k-archive { background: linear-gradient(160deg, #A68B5B, #7A6440); }
.k-sheet { background: linear-gradient(160deg, #2DB56A, #198A48); }
.k-slides { background: linear-gradient(160deg, #F07A2E, #CC5208); }
.k-doc { background: linear-gradient(160deg, #3A5CB4, #22408A); }
.k-text { background: linear-gradient(160deg, #6B7488, #4C5468); }
.k-code { background: linear-gradient(160deg, #23377A, #12275F); }
.flist { padding: 4px 6px; border-radius: 18px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 84px 104px 116px; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 12px; font-size: 13.5px; }
.frow:not(.fhead):hover { background: var(--fill); }
.frow:focus-visible { outline-offset: -2px; }
.fhead { padding-top: 10px; padding-bottom: 6px; border-radius: 0; border-bottom: 1px solid var(--hair); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.fc-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fc-kind, .fc-size, .fc-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fhead .fc-kind, .fhead .fc-size, .fhead .fc-date { font-size: 11.5px; }
.fc-act { display: flex; justify-content: flex-end; }
.fc-act .icon-btn { width: 32px; height: 32px; }
.fc-act .icon-btn .i { width: 17px; height: 17px; }
.frow .fc-act, .fcard .fc-act { opacity: 0; transition: opacity .15s; }
.frow:hover .fc-act, .frow:focus-within .fc-act, .fcard:hover .fc-act, .fcard:focus-within .fc-act { opacity: 1; }
@media (hover: none) { .frow .fc-act, .fcard .fc-act { opacity: 1; } }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.fcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px 10px; border-radius: 20px; text-align: center; min-width: 0; }
.fcard-n { max-width: 100%; margin-top: 8px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard-s { font-size: 11.5px; color: var(--muted); }
.dropzone { width: 100%; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed rgba(122, 132, 155, .45); border-radius: 24px; background: none; color: var(--muted); cursor: pointer; }
.dropzone b { color: var(--text); font-size: 16px; }
.dropzone:hover:not(:disabled) { background: var(--fill); border-color: var(--saffron); }
.drop-over { position: absolute; inset: 8px; z-index: 5; display: none; place-items: center; border: 2px dashed var(--saffron); border-radius: calc(var(--r) - 6px); background: rgba(245, 179, 1, .08); pointer-events: none; }
.files-view.dropping .drop-over { display: grid; }
.drop-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 32px; border-radius: 22px; color: var(--muted); }
.drop-card b { color: var(--text); font-size: 16px; }
.drop-card .i { width: 30px; height: 30px; color: var(--accent); }
.look .sheet-body { padding: 0 12px; }
.look-stage { display: grid; place-items: center; min-height: 320px; border-radius: 16px; background: var(--fill); overflow: hidden; }
.look-media { display: block; max-width: 100%; max-height: 70vh; }
audio.look-media { width: 90%; }
.look .fine.left { margin: 0 auto 0 0; }

/* ---- narrower windows -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .view.notes-view { grid-template-columns: 260px minmax(0, 1fr); }
  .nf { display: none; }
  .view.cal { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .view.cal { grid-template-columns: minmax(0, 1fr); }
  .cal-side { display: none; }
  .add-narrow { display: inline-grid; }
  .meet-hero { grid-template-columns: 1fr 1fr; }
  .c-join { grid-column: 1 / -1; min-height: 0; }
  .frow { grid-template-columns: minmax(0, 1fr) 84px 104px 116px; }
  .frow .fc-kind { display: none; }
  .quick-acts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tools { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tool-head { padding: max(16px, env(safe-area-inset-top)) 16px 12px; }
  .tool-h { font-size: 26px; }
  .tool-scroll, .tasks-body, .files-body { padding-left: 16px; padding-right: 16px; }
  .tool-foot { padding: 8px 16px 12px; }
  .tool-banner, .quick, .storage, .uploads { margin-left: 16px; margin-right: 16px; }
  .meet-hero { grid-template-columns: 1fr; gap: 10px; }
  .meet-card { min-height: 0; display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; align-items: center; }
  .meet-tile { grid-row: 1 / 3; margin: 0; }
  .meet-card-t { margin: 0; }
  .c-join .join-row { grid-column: 1 / -1; }
  .c-join .meet-card-s { grid-column: 1 / -1; }
  .meet-acts .icon-btn:not(.more) { display: none; }
  .cal-bar { padding: max(14px, env(safe-area-inset-top)) 16px 10px; }
  .cal-h { font-size: 22px; }
  .tg { --gut: 44px; }
  .tg-day { flex-direction: column; gap: 0; }
  .tg-num { font-size: 16px; width: 28px; height: 28px; }
  .mg-grid { grid-template-rows: repeat(6, minmax(64px, 1fr)); }
  .mg-wd { text-align: center; padding: 6px 2px; }
  .ev.mo .ev-time { display: none; }
  .board { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .lane { scroll-snap-align: start; }
  .tool-actions .tseg:first-child { order: 2; }
  .quick-due { width: 118px; }
  .view.notes-view { grid-template-columns: minmax(0, 1fr); }
  .notes-view .ne { display: none; }
  .notes-view.show-ed .nl { display: none; }
  .notes-view.show-ed .ne { display: flex; }
  .ne-back { display: inline-flex; }
  .nl-top { padding-top: max(14px, env(safe-area-inset-top)); }
  .ne-bar { padding-top: max(10px, env(safe-area-inset-top)); }
  .frow { grid-template-columns: minmax(0, 1fr) 70px auto; }
  .frow .fc-date { display: none; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scrim { place-items: end center; padding: 0; }
  .sheet, .sheet.wide { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet.alert { width: calc(100% - 24px); border-radius: 26px; margin-bottom: max(12px, env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: no-preference) {
  .scrim { animation: fade .18s ease-out; }
  .sheet { animation: rise .26s cubic-bezier(.2, .8, .2, 1); }
  .pop { animation: pop .16s ease-out; }
  .toast { animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
  .meet-card, .qa, .tcard, .fcard { transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s, background .18s; }
  .meet-card:not(:disabled):not(.c-join):hover, .qa:hover, .fcard:hover { transform: translateY(-2px); }
  .btn, .tseg-b, .nl-row, .nf-item, .menu-item, .pick, .mini-d, .up-item, .ev, .frow { transition: background .15s, color .15s, box-shadow .15s; }
  .meet-ic.live { animation: live 2s ease-in-out infinite; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes live { 50% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tools { background: var(--glass-strong); }
  .sheet, .pop, .toast { background: var(--glass-strong); }
}
