@font-face { font-family: "Instrument Serif"; src: url(fonts/InstrumentSerif-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/InstrumentSans-VF.woff2) format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
:root {
  --bg: #f6f2ec; --card: #fff; --tint: #f3ece3; --line: #e7ded2; --line2: #d9cdbd;
  --ink: #1f2a24; --ink2: #4d5a52; --mu: #80867d;
  --jun: #2f4b3c; --jun2: #3f6350; --jun-t: #e6eee8; --clay: #bf6b4a; --clay-t: #f7e6dc; --sand-t: #fbefd9;
  --serif: "Instrument Serif", Georgia, serif; --ui: "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); overflow-x: hidden; }
body { font: 14px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; min-height: 100vh; }
.side { background: var(--jun); color: #d5e2d9; padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.org { display: flex; align-items: center; gap: 10px; color: #fff; padding: 0 6px; }
.org b { display: block; font: 400 24px/1 var(--serif); }
.org span { font-size: 12px; color: #a9c0b2; }
.side-x, .burger { display: none; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-weight: 500; color: #d5e2d9; }
.menu a:hover { background: rgba(255,255,255,.06); }
.menu a.on { background: rgba(255,255,255,.12); color: #fff; }
.ct { margin-left: auto; background: var(--clay); color: #fff; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.ct:empty { display: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.1); }
.me img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.me b { display: block; color: #fff; font-size: 13.5px; }
.me span { font-size: 12px; color: #a9c0b2; }

.main { padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.top h1 { font: 400 32px/1 var(--serif); letter-spacing: -.01em; margin-right: 6px; }
.dp { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; height: 40px; }
.dp button { width: 40px; height: 38px; border: 0; background: none; display: grid; place-items: center; color: var(--ink2); }
.dp button:disabled { opacity: .35; cursor: default; }
.dp span { min-width: 110px; text-align: center; font-weight: 600; }
.today { height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; font-weight: 600; }
.today[hidden] { display: none; }
.now { margin-left: auto; font-size: 13px; color: var(--clay); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12px; color: var(--mu); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kpi b { font: 400 30px/1.1 var(--serif); }
.kpi small { color: var(--ink2); font-size: 12.5px; }

.who { display: flex; flex-wrap: wrap; gap: 6px; }
.who button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; color: var(--ink2); }
.who button[aria-pressed="true"] { background: var(--jun); color: #fff; border-color: var(--jun); }

.book { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 12px; align-items: start; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.col-h { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); }
.col-h img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.col-h b { display: block; font-size: 14.5px; }
.col-h small { color: var(--mu); font-size: 12px; }
.ap { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 4px 10px; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid transparent; }
.ap-t b { display: block; font-size: 13.5px; }
.ap-t small { color: var(--mu); font-size: 11.5px; }
.ap-m { min-width: 0; }
.ap-m b { display: block; font-size: 14px; }
.ap-m span { display: block; font-size: 12.5px; color: var(--ink2); }
.ap-m .note { color: var(--mu); font-style: italic; }
.ap-s { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.ap.done { opacity: .62; }
.ap.chair { background: var(--jun-t); }
.ap.in { background: #eef6f0; }
.ap.no { background: #fbeee9; }
.ap.fresh { background: #fdeee3; }
.ap.hl { background: #fbe4d5; }
.nw, .mv { font-style: normal; font-size: 11px; font-weight: 700; color: var(--clay); background: var(--clay-t); padding: 1px 6px; border-radius: 6px; }
.mv { color: #7a5a10; background: var(--sand-t); }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.p-done { background: #ece9e4; color: var(--mu); }
.p-chair { background: var(--jun); color: #fff; }
.p-in { background: #d7ecdc; color: #1f5c38; }
.p-no { background: #f5d6cb; color: #8a3d22; }
.p-up { background: var(--tint); color: var(--ink2); }
.b { height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--jun); color: #fff; font-weight: 600; font-size: 12.5px; }
.b.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.empty { color: var(--mu); padding: 10px 4px; }

.rail { border-left: 1px solid var(--line); background: #fbf8f4; padding: 18px 16px 100px; display: flex; flex-direction: column; gap: 16px; }
.feedbox { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.feedbox:empty { display: none; }
.addv { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.addv h2 { font: 400 22px/1.1 var(--serif); margin-bottom: 10px; }
.addv label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 10px; }
.addv input, .addv select { height: 42px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 10px; font-weight: 400; color: var(--ink); background: #fff; font-size: 15px; }
.w-next { font-size: 12.5px; color: var(--jun2); margin-bottom: 8px; }
.err { color: #a2401f; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.err:empty { display: none; }
.btn { height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--jun); color: #fff; font-weight: 600; width: 100%; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); opacity: 0; background: var(--jun); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 500; transition: .25s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim[hidden] { display: none; }

@media (max-width: 1280px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
  .rail { grid-column: 2; border-left: 0; background: none; padding: 0 24px 100px; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: 272px; height: auto; z-index: 64; transform: translateX(-104%); visibility: hidden; transition: transform .25s ease, visibility .25s; box-shadow: 20px 0 40px -20px rgba(0,0,0,.4); }
  .side.open { transform: none; visibility: visible; }
  .side-x { display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; }
  .menu a { height: 48px; font-size: 15px; }
  .scrim { position: fixed; inset: 0; background: rgba(20,30,25,.42); z-index: 60; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  .main { padding: 12px 16px 24px; }
  .top h1 { font-size: 26px; }
  .now { width: 100%; margin-left: 0; order: 5; }
  .dp { height: 44px; } .dp button { height: 42px; width: 44px; } .today { height: 44px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .book { grid-auto-flow: row; grid-template-columns: 1fr; }
  .rail { display: flex; padding: 0 16px 96px; }
  .who button { height: 44px; }
  .b { height: 44px; padding: 0 16px; }
}
.nw, .mv { white-space: nowrap; display: inline-block; }
