:root {
  --ink: #2b2b2b;
  --ink-2: #8d8d88;
  --ink-3: #c6c6c0;
  --line: #e6e6e1;
  --board: #fcfcfa;
  --hover: #00000008;
  --red: #d6453d;
  --blue: #2f6fd0;
  --side-w: 320px;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--board);
  color: var(--ink);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.link { color: var(--ink-2); cursor: pointer; font-size: 14px; white-space: nowrap; }
.link:hover { color: var(--ink); }
.link.strong { color: var(--ink); font-weight: 700; }
.link.danger:hover { color: var(--red); }
.muted { color: var(--ink-3); font-weight: 400; }

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.nav { display: flex; gap: 2px; }
.nav button { width: 32px; height: 32px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--ink-2); }
.nav button:hover { background: var(--hover); color: var(--ink); }
.title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* full-size window: year / month / week sit on the left, right after the month/year label */
.views { display: flex; gap: 14px; padding-left: 18px; border-left: 1px solid var(--line); }
#add { margin-left: auto; }
.views button { color: var(--ink-2); font-size: 14px; padding: 2px 0; border-bottom: 2px solid transparent; }
.views button:hover { color: var(--ink); }
.views button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- layout ---------- */
.main { flex: 1; display: flex; min-height: 0; }
.board { flex: 1; min-width: 0; overflow: auto; padding: 20px 24px 28px; user-select: none; -webkit-user-select: none; }

/* ---------- stickies ---------- */
.sticky {
  background: var(--c, #fff1a8);
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 1px #0000000c, 0 7px 10px -7px #00000045;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.sticky:hover { transform: rotate(0deg) translateY(-1px); box-shadow: 0 1px 1px #0000000c, 0 10px 14px -8px #00000050; }
.sticky.mini, .sticky.full { touch-action: none; }
.dragging { opacity: .3; }
.ghost {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; margin: 0;
  --r: 3deg; transform: rotate(3deg);
  box-shadow: 0 2px 3px #00000018, 0 18px 28px -12px #00000070;
}
body.dragging-note, body.dragging-note * { cursor: grabbing !important; }
/* where a dragged note will land within a day */
.insert-line { position: fixed; z-index: 35; height: 2px; border-radius: 1px; background: var(--blue); pointer-events: none; box-shadow: 0 0 0 1px #ffffffcc; }
.insert-line[hidden] { display: none; }
/* Month-view notes: full height (21px) when there's room; with more notes on a day they all
   shrink evenly so every note stays visible. Text scales with the note's height and hides
   once the note is just a thin strip (hover still shows the name). */
.sticky.mini:hover { transform: translateY(-1px); }
.sticky.mini {
  transform: none; /* straight, like the week view */
  flex: 0 1 21px; min-height: 12px; /* never shorter than a readable title */
  padding: 0 7px; margin: 0 2px;
  display: flex; align-items: center;
  overflow: hidden;
  container-type: size;
}
.sticky.mini .t {
  font-size: clamp(10px, 70cqh, 12px); line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.sticky.mini.ghost { flex: none; height: 22px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* week view: roomy stickies showing just the title */
/* every note the same size (room for 2 lines), straight, text in the top-left corner */
.sticky.full {
  flex: none; height: 58px; padding: 10px 12px;
  display: flex; align-items: flex-start; justify-content: flex-start; gap: 6px;
  text-align: left; font-size: 14px; font-weight: 600; line-height: 1.3;
  transform: none;
}
.sticky.full:hover { transform: translateY(-1px); }
.sticky.full .t {
  flex: 1; min-width: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sticky.full .att { font-size: 12px; font-weight: 400; opacity: .6; flex-shrink: 0; }

/* ---------- today marker (hand-drawn circle) ---------- */
.today .num span, .yd.today .n {
  border: 2px solid var(--red);
  border-radius: 52% 46% 55% 44% / 48% 55% 45% 52%;
  color: var(--red);
  font-weight: 700;
}

/* multi-day notes: one bar laid over the day boxes it covers */
.bars {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  align-self: start; position: relative; z-index: 2;
  pointer-events: none; /* clicks between bars fall through to the days */
}
.sticky.bar {
  pointer-events: auto;
  height: calc(var(--lane) - 5px); margin: 0 3px;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 12px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: none; border-radius: 3px;
}
.sticky.bar:hover { transform: translateY(-1px); }
.sticky.bar.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sticky.bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
body.dragging-note .bars .bar { pointer-events: none; }
.month { --lane: 24px; }
.month .bars { margin-top: 30px; }
.week { --lane: 32px; --head: 58px; }
.week .bars { margin-top: var(--head); }
.week .sticky.bar { font-size: 13px; font-weight: 700; padding: 0 10px; }

/* weekends (Sat/Sun) are shaded grey */
.day.weekend { background: #f0f0ed; }
.day.weekend:hover { background: #ebebe7; }

/* drop target */
.day.drop { background: #2f6fd00c; outline: 2px dashed #2f6fd066; outline-offset: -4px; }

/* ---------- year ---------- */
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 40px; }
.ym-title { font-size: 17px; margin: 0 0 6px; cursor: pointer; display: inline-block; }
.ym-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.ym.cur .ym-title { color: var(--red); }
.ym-grid { display: grid; grid-template-columns: 20px repeat(7, 1fr); gap: 1px; }
.ym-grid .dow { font-size: 11px; color: var(--ink-3); text-align: center; }
.wk { font-size: 10px; color: var(--ink-3); cursor: pointer; display: flex; align-items: flex-start; justify-content: center; padding-top: 5px; }
.wk:hover { color: var(--ink); }
.yd {
  aspect-ratio: 1 / 1.05;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 2px; border-radius: 6px; font-size: 12px; min-width: 0;
}
.yd:hover { background: var(--hover); }
.yd .n { width: 22px; height: 22px; display: grid; place-items: center; line-height: 1; border: 2px solid transparent; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; }
.dots i { width: 7px; height: 7px; border-radius: 1.5px; background: var(--c); box-shadow: 0 0 0 .5px #00000030; cursor: pointer; }
.dots i:hover { transform: scale(1.5); }

/* ---------- month ---------- */
.month { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); height: 100%; min-height: 560px; }
.mdow { font-size: 12px; color: var(--ink-2); padding: 0 8px 6px; text-transform: uppercase; letter-spacing: .06em; }
.month .wk { padding-top: 10px; font-size: 11px; }
.cell {
  /* every real day draws its own box; neighbours overlap by 1px so lines stay single */
  border: 1px solid var(--line);
  margin: 0 -1px -1px 0;
  padding: 4px 4px 2px;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden;
}
.cell:hover { background: #00000004; }
.cell.blank { border: 0; background: none; }
.cell .num { font-size: 14px; padding: 0 4px 2px; flex-shrink: 0; }
.cell .num span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border: 2px solid transparent; margin: 0 0 0 -4px; }
/* Notes stack from the top. They shrink to fit (never below a readable height); if they
   still don't fit — or there are 7+ — the day scrolls (scrollbar hidden). */
.cell .stack {
  flex: 1; min-height: 0; padding-top: 1px; padding-bottom: 2px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 5px;
  overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
}
.cell .stack::-webkit-scrollbar { display: none; }
.cell .stack.dense { gap: 1px; }
.cell.has-more { padding-bottom: 9px; } /* a strip below the notes for the blue bar */
/* 7+ notes: each keeps the 6-note size */
.cell .stack.more { container-type: size; }
.cell .stack.more .sticky.mini { flex: none; height: max(12px, calc((100cqh - 5 * 1px) / 6)); }
/* …and a blue bar at the bottom of the day while more notes are hidden below */
.cell { position: relative; }
.cell.has-more::after {
  content: ''; position: absolute; left: 5px; right: 5px; bottom: 3px; height: 3px;
  border-radius: 2px; background: var(--blue); pointer-events: none;
}
/* ---------- week (always 7 columns side by side; scrolls sideways on narrow screens) ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(70px, 1fr)); height: 100%; min-height: 420px; }
.wcol { border-right: 1px solid var(--line); padding: 4px 10px 16px; display: flex; flex-direction: column; min-height: 0; }
.wcol:last-child { border-right: 0; }
.wcol:hover { background: #00000004; }
.wh { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; height: calc(var(--head) - 4px); overflow: hidden; flex-shrink: 0; }
.wh .wd { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.wh .num { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.wh .num span { display: inline-grid; place-items: center; min-width: 42px; height: 42px; border: 2px solid transparent; margin-left: -6px; }
.wh .wm { font-size: 12px; color: var(--ink-3); }
.wcol .stack { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; flex: 1; padding: 2px 2px 8px; }
.hint { font-size: 13px; color: var(--ink-3); opacity: 0; transition: opacity .15s; text-align: center; margin-top: 24px; }
.wcol:hover .hint { opacity: 1; }

/* ---------- sidebar ---------- */
.side {
  width: var(--side-w);
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  overflow: hidden;
  transition: width .2s ease, border-color .2s;
  background: var(--board);
}
.side.collapsed { width: 0; border-left-color: transparent; }
.side-inner { width: var(--side-w); height: 100%; display: flex; flex-direction: column; padding: 16px 16px 10px; }
.side-head { display: flex; align-items: center; gap: 8px; }
.close { width: 28px; height: 28px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--ink-2); flex-shrink: 0; }
.close:hover { background: var(--hover); color: var(--ink); }
#search {
  font: inherit; font-size: 15px; color: var(--ink);
  flex: 1; min-width: 0; border: 0; border-bottom: 1.5px solid var(--ink);
  background: none; padding: 6px 2px; outline: none; border-radius: 0;
}
#search::placeholder { color: var(--ink-3); }
.scope { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); padding: 8px 2px 4px; gap: 8px; }
.scope label { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.scope input { accent-color: var(--ink); margin: 0; }
.list { list-style: none; margin: 6px -6px 0; padding: 0; overflow-y: auto; flex: 1; }
.list li { position: relative; padding: 8px 8px 9px 22px; border-radius: 6px; cursor: pointer; }
.list li:hover { background: var(--hover); }
.list li::before {
  content: ''; position: absolute; left: 7px; top: 12px; width: 9px; height: 9px;
  background: var(--c); box-shadow: 0 0 0 .5px #00000035; transform: rotate(-4deg);
}
.list li.empty { color: var(--ink-3); cursor: default; padding-left: 8px; }
.list li.empty::before { display: none; }
.list li.empty:hover { background: none; }
.li-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.li-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.li-date { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.li-snip { font-size: 13px; color: #555; line-height: 1.35; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
mark { background: #ffe066; color: inherit; padding: 0 1px; border-radius: 2px; }
.side-foot { display: flex; gap: 6px; align-items: center; padding-top: 8px; font-size: 13px; color: var(--ink-3); }
.side-foot .link { font-size: 13px; }

.mode-label { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* sign-in screen */
.login { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--board); }
.login[hidden] { display: none; }
/* plain form on the whiteboard — no card */
.login-card { width: min(320px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }
.login-card input {
  font: inherit; font-size: 15px; color: var(--ink); padding: 9px 11px;
  border: 0; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); outline: none;
}
.login-card input:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.login-error { margin: 0; min-height: 18px; font-size: 13px; color: var(--red); }
.login-btn { align-self: flex-start; padding: 8px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.login-btn:disabled { opacity: .5; cursor: default; }
.offline { max-width: 360px; margin: 80px auto; text-align: center; font-size: 15px; }
.offline p { margin: 0 0 8px; }

/* bin */
.list li.binned { cursor: default; }
.list li.binned:hover { background: none; }
.list li.binned::before { opacity: .5; }
.bin-actions { display: flex; gap: 14px; margin-top: 4px; }
.bin-actions .link { font-size: 13px; }
.bin-actions .link.strong { color: var(--blue); font-weight: 700; }
.side.bin #search { border-bottom-color: var(--ink-2); }

/* right-click delete confirmation */
.pop {
  position: fixed; z-index: 50; min-width: 220px; max-width: 280px;
  background: #fff; border-radius: 8px; padding: 12px 14px 10px;
  box-shadow: 0 0 0 1px #0000000f, 0 12px 28px -10px #00000055;
  font-size: 14px;
}
.pop[hidden] { display: none; }
.pop-msg { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-sub { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 10px; }
.link.danger-strong { color: var(--red); }
.link.danger-strong:hover { color: #a8302a; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 18px;
  display: flex; gap: 16px; align-items: center; font-size: 14px;
  box-shadow: 0 10px 24px -10px #00000080; max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }
.toast .link.strong { color: #ffe066; }

/* ---------- editor ---------- */
.modal { position: fixed; inset: 0; background: #2b2b2b2e; display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal[hidden] { display: none; }
.editor {
  width: min(580px, 100%);
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  padding: 22px 26px 14px;
  cursor: default;
  --r: -0.6deg;
  box-shadow: 0 2px 2px #00000010, 0 30px 50px -20px #00000060;
}
.editor.sticky:hover { transform: rotate(var(--r)); box-shadow: 0 2px 2px #00000010, 0 30px 50px -20px #00000060; }
/* "done" checkbox in the editor's top-right corner */
.editor { position: relative; }
.ed-head { display: flex; padding-right: 14px; } /* keeps long titles clear of the corner box */
.ed-head .ed-title { flex: 1; min-width: 0; }
.ed-check { position: absolute; top: 10px; right: 10px; cursor: pointer; }
.ed-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ed-check span {
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px #00000059; background: #ffffff66; transition: background .12s;
}
/* thin drawn checkmark (an L rotated 45°), matching the light sans-serif style */
.ed-check span::after {
  content: ''; width: 4px; height: 8px; margin-top: -2px;
  border: solid transparent; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.ed-check:hover span { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ed-check input:checked + span { background: var(--ink); box-shadow: none; }
.ed-check input:checked + span::after { border-color: #fff; }
.ed-check input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.editor.dark .ed-check span { box-shadow: inset 0 0 0 1.5px #ffffff80; background: #ffffff14; }
.editor.dark .ed-check input:checked + span { background: #fff; }
.editor.dark .ed-check input:checked + span::after { border-color: var(--ink); }

/* ✓ on done notes in the calendar, at the right-hand side */
.sticky .chk {
  margin-left: auto; flex-shrink: 0; align-self: center;
  width: 4px; height: 8px; margin-right: 2px; margin-bottom: 2px;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.sticky.mini .chk { width: 3.5px; height: 7px; border-width: 0 1.25px 1.25px 0; }
.sticky.full .chk { align-self: flex-start; margin-top: 2px; width: 4.5px; height: 9px; }
.sticky.mini:has(.chk) .t, .sticky.bar:has(.chk) .bt { margin-right: 8px; }
.sticky.bar .bt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.ed-title { font: inherit; font-size: 22px; letter-spacing: -0.01em; font-weight: 700; color: var(--ink); background: none; border: 0; outline: none; width: 100%; padding: 0; }
.ed-title::placeholder, .ed-body::placeholder { color: #00000040; }
.ed-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; flex-wrap: wrap; }
.ed-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-end { font-size: 13px; color: #00000090; }
.span-wrap { position: relative; }
.span-btn {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; line-height: 1; color: #00000080; box-shadow: inset 0 0 0 1px #00000030;
}
.span-btn:hover, .span-btn.on { background: #00000012; color: var(--ink); }
.span-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 5;
  display: flex; flex-direction: column; min-width: 140px; padding: 4px;
  background: #fff; border-radius: 8px;
  box-shadow: 0 0 0 1px #0000000f, 0 12px 28px -10px #00000055;
}
.span-menu[hidden] { display: none; }
.span-menu button { text-align: left; padding: 6px 10px; border-radius: 5px; font-size: 13px; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.span-menu button:hover { background: #00000008; }
.span-menu button.on { font-weight: 700; }
.span-menu button.on::after { content: '✓'; }
.editor.dark .ed-end { color: #ffffffb0; }
.editor.dark .span-btn { color: #ffffffb0; box-shadow: inset 0 0 0 1px #ffffff45; }
.editor.dark .span-btn:hover, .editor.dark .span-btn.on { background: #ffffff1f; color: #fff; }
#ed-date { font: inherit; font-size: 14px; color: #00000090; background: none; border: 0; padding: 0; outline: none; }
.swatches { display: flex; gap: 7px; }
.sw { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px #00000030; }
.sw.on { box-shadow: 0 0 0 1.5px #00000030, 0 0 0 3px var(--c), 0 0 0 4.5px var(--ink); }
.swatch-presets { display: flex; gap: 7px; }
.sw.custom {
  position: relative; overflow: hidden; cursor: pointer;
  background: conic-gradient(#ff5e5e, #ffd84d, #6fdc6f, #5ec8ff, #7a6cff, #ff6ad5, #ff5e5e);
}
.sw.custom input { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); opacity: 0; cursor: pointer; border: 0; padding: 0; }
.sw.custom.on { overflow: visible; }

/* dark note colours get white text */
.sticky.dark { color: #fff; }
.sticky.dark .att { color: #ffffffb0; }
.editor.dark { color: #fff; color-scheme: dark; }
.editor.dark .ed-title, .editor.dark .ed-body { color: #fff; }
.editor.dark .ed-title::placeholder { color: #ffffff59; }
.editor.dark #ed-date { color: #ffffffb0; }
.editor.dark .sw.on { box-shadow: 0 0 0 1.5px #ffffff40, 0 0 0 3px var(--c), 0 0 0 4.5px #fff; }
.editor.dark .ed-actions .link { color: #ffffffa0; }
.editor.dark .ed-actions .link:hover, .editor.dark .ed-actions .link.strong { color: #fff; }
.editor.dark .files { border-top-color: #ffffff40; }
.editor.dark .file { background: #ffffff1f; }
.editor.dark .file a { color: #fff; }
.editor.dark .file small { color: #ffffff99; }
.ed-body {
  font: inherit; font-size: 15px; line-height: 1.55; color: var(--ink);
  background: none; border: 0; outline: none; resize: none;
  width: 100%; min-height: 220px; flex: 1; padding: 0;
}
.files { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 4px; border-top: 1px dashed #00000025; max-height: 200px; overflow-y: auto; }
.files[hidden] { display: none; }
.file { position: relative; background: #ffffff8c; border-radius: 3px; font-size: 14px; display: flex; align-items: center; max-width: 100%; }
.file a { color: var(--ink); text-decoration: none; padding: 5px 26px 5px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file a:hover { text-decoration: underline; }
.file small { color: #00000070; margin-left: 4px; }
.file.img a { padding: 0; display: block; }
.file.img img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 3px; }
.file .x { position: absolute; top: 2px; right: 3px; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; color: #00000080; background: #ffffffb0; }
.file .x:hover { color: var(--red); }
.ed-actions { display: flex; align-items: center; gap: 18px; padding-top: 10px; }
.ed-actions .link { color: #00000080; }
.ed-actions .link:hover { color: var(--ink); }
.ed-actions .link.strong { color: var(--ink); }
.spacer { flex: 1; }
.icon-btn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #00000059; }
.icon-btn[hidden] { display: none; }
.icon-btn:hover { color: var(--red); background: #0000000d; }
.editor.dark .icon-btn { color: #ffffff73; }
.editor.dark .icon-btn:hover { color: #ff8a84; background: #ffffff1a; }
.editor.drop { outline: 2px dashed #00000040; outline-offset: -8px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .top { gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
  .title { font-size: 22px; flex: 1; }
  .views { order: 5; padding-left: 0; border-left: 0; width: 100%; justify-content: flex-start; gap: 18px; }
  .board { padding: 14px 16px 24px; }
  /* overlay the calendar, but sit below the header so its buttons stay reachable */
  .main { position: relative; }
  .side { position: absolute; right: 0; top: 0; bottom: 0; z-index: 15; box-shadow: -10px 0 30px -15px #00000040; max-width: 88vw; }
  .side-inner { width: min(var(--side-w), 88vw); }
  .month { grid-template-columns: 22px repeat(7, minmax(0, 1fr)); min-height: 480px; }
  .month .wk { font-size: 10px; }
  .mdow { padding: 0 2px 6px; font-size: 12px; }
  .cell { padding: 4px 1px 0; }
  .cell .num { font-size: 13px; padding: 0 2px 2px; }
  .sticky.mini { padding: 0 4px; margin: 0; }
  .sticky.mini .t { font-size: clamp(10px, 60cqh, 11px); }
  .wcol { padding: 4px 5px 16px; }
  .week { --head: 66px; --lane: 28px; }
  .week .sticky.bar { font-size: 11px; padding: 0 6px; }
  .wh { flex-wrap: wrap; gap: 0 6px; align-content: flex-start; }
  .wh .num { font-size: 20px; }
  .wh .num span { min-width: 32px; height: 32px; margin-left: -4px; }
  .sticky.full { height: 48px; padding: 8px 8px; font-size: 12px; }
  .wcol .stack { gap: 12px; }
}
