/* The public calendar: soft, light and translucent on its own; not the Substance look on purpose. */
:root {
  --fg: #1f2433; --muted: rgba(31, 36, 51, .55); --line: rgba(31, 36, 51, .07);
  --glass: rgba(255, 255, 255, .46); --glass-edge: rgba(255, 255, 255, .65); --shadow: 0 12px 40px rgba(70, 80, 120, .12);
  --busy: rgba(108, 116, 140, .26); --pub: rgba(255, 255, 255, .78); --pub-edge: rgba(98, 128, 214, .55);
  --open: rgba(64, 150, 118, .9); --open-bg: rgba(255, 255, 255, .22); --open-edge: rgba(64, 150, 118, .45);
  --accent: #5b6fd6; --now: rgba(226, 92, 92, .75); --pph: 48px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e9ebf4; --muted: rgba(233, 235, 244, .55); --line: rgba(233, 235, 244, .07);
    --glass: rgba(28, 32, 46, .5); --glass-edge: rgba(255, 255, 255, .08); --shadow: 0 12px 40px rgba(0, 0, 0, .35);
    --busy: rgba(150, 158, 185, .22); --pub: rgba(60, 68, 96, .8); --pub-edge: rgba(140, 160, 240, .6);
    --open: rgba(126, 214, 176, .95); --open-bg: rgba(255, 255, 255, .04); --open-edge: rgba(126, 214, 176, .4);
    --accent: #9aa8ff; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: #eef0f8; -webkit-font-smoothing: antialiased; }
@media (prefers-color-scheme: dark) { body { background: #12141d; } }
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .55; }
.bg i:nth-child(1) { background: #c9c2ff; left: -18vmax; top: -22vmax; }
.bg i:nth-child(2) { background: #ffd6c2; right: -20vmax; top: 10vmax; }
.bg i:nth-child(3) { background: #bfeedd; left: 10vmax; bottom: -30vmax; }
@media (prefers-color-scheme: dark) { .bg i { opacity: .18; } }
.glass { background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
main { max-width: 1120px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 40px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 1.55rem; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.sub { margin: 4px 0 0; color: var(--muted); max-width: 46ch; }
.nav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; }
.nav button { font: inherit; color: var(--fg); background: transparent; border: 0; border-radius: 999px; min-width: 38px; height: 36px; padding: 0 12px; cursor: pointer; font-size: 1rem; }
.nav button:hover { background: rgba(255, 255, 255, .45); }
@media (prefers-color-scheme: dark) { .nav button:hover { background: rgba(255, 255, 255, .08); } }
.nav .today { font-size: .9rem; font-weight: 600; }
.range { margin: 18px 2px 8px; color: var(--muted); font-size: .92rem; }
.hint { margin: 0 2px 10px; font-size: .88rem; color: var(--open); }
.board { border-radius: 24px; padding: 10px 12px 14px 4px; overflow: hidden; }
.grid { display: grid; grid-template-columns: 44px repeat(var(--cols, 7), minmax(0, 1fr)); }
.dh { position: sticky; top: 0; text-align: center; padding: 6px 2px 10px; font-size: .85rem; color: var(--muted); }
.dh b { display: block; font-size: 1.05rem; color: var(--fg); font-weight: 600; }
.dh.is-today b { color: var(--accent); }
.times { position: relative; }
.times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--pph); }
.b { position: absolute; left: 4px; right: 4px; border-radius: 10px; overflow: hidden; font-size: .78rem; line-height: 1.25; padding: 4px 7px; }
.b.busy { background: var(--busy); color: var(--muted); display: flex; flex-direction: column; justify-content: flex-start; }
.b.busy span { font-weight: 600; letter-spacing: .02em; font-size: .74rem; white-space: nowrap; }
.b.busy.short { padding: 0 7px; justify-content: center; } .b.busy.short span { font-size: .68rem; line-height: 1; }
.b.busy small { font-size: .7rem; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b.pub { background: var(--pub); border-left: 3px solid var(--pub-edge); cursor: pointer; text-align: left; font: inherit; font-size: .78rem; color: var(--fg); border-top: 0; border-right: 0; border-bottom: 0; }
.b.pub strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b.pub span, .b.open span { color: var(--muted); font-variant-numeric: tabular-nums; }
.b.open { background: var(--open-bg); border: 1.5px dashed var(--open-edge); color: var(--open); cursor: pointer; font: inherit; font-size: .76rem; text-align: left; display: flex; align-items: center; gap: 6px; transition: background .15s, transform .15s; }
.b.open:hover, .b.open:focus-visible { background: rgba(64, 150, 118, .14); outline: none; transform: scale(1.01); }
.b.open span { color: inherit; }
.now { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); border-radius: 2px; z-index: 3; }
.now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 18px; }
.chips { display: none; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 auto; min-width: 46px; font: inherit; color: var(--fg); background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 14px; padding: 6px 8px; text-align: center; cursor: pointer; font-size: .78rem; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); position: relative; }
.chip b { display: block; font-size: 1rem; }
.chip.on { background: var(--fg); color: var(--glass-edge); }
@media (prefers-color-scheme: dark) { .chip.on { background: var(--fg); color: #12141d; } }
.chip.has-open::after { content: ""; position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--open); }
@media (max-width: 700px) {
  :root { --pph: 54px; }
  .chips { display: flex; }
  .dh { display: none; }
  .b { font-size: .85rem; }
  h1 { font-size: 1.35rem; }
}
/* The sheet (details, reserving) */
.veil { position: fixed; inset: 0; z-index: 20; background: rgba(20, 24, 40, .18); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.veil[hidden] { display: none; }
.sheet { width: min(420px, 100%); border-radius: 24px; padding: 22px 20px 18px; background: rgba(255, 255, 255, .7); }
@media (prefers-color-scheme: dark) { .sheet { background: rgba(30, 34, 48, .82); } }
.sheet h2 { margin: 0; font-size: 1.15rem; font-weight: 650; }
.when { margin: 4px 0 14px; color: var(--muted); }
.sheet p.notes { white-space: pre-wrap; margin: 0 0 14px; }
.sheet label { display: block; font-size: .82rem; color: var(--muted); margin: 10px 0 4px; }
.sheet input, .sheet textarea { width: 100%; font: inherit; color: var(--fg); background: rgba(255, 255, 255, .6); border: 1px solid rgba(31, 36, 51, .1); border-radius: 12px; padding: 10px 12px; outline: none; }
@media (prefers-color-scheme: dark) { .sheet input, .sheet textarea { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); } }
.sheet input:focus, .sheet textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 111, 214, .15); }
.sheet textarea { min-height: 72px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 18px; border: 1px solid transparent; cursor: pointer; background: rgba(31, 36, 51, .06); color: var(--fg); }
@media (prefers-color-scheme: dark) { .btn { background: rgba(255, 255, 255, .08); } }
.btn.go { background: var(--fg); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.go { color: #12141d; } }
.btn:disabled { opacity: .5; cursor: default; }
.err { color: #c94848; font-size: .86rem; margin: 10px 0 0; }
.ok { font-size: 1rem; margin: 6px 0 0; }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .veil { animation: none; } .b.open { transition: none; } }
