/* Calm planner look: warm cream, soft blush and taupe, serif headings. */
:root {
  --bg: #f3ece6;
  --paper: #fbf8f4;
  --blush: #e6d3c8;
  --blush-soft: #efe3db;
  --taupe: #a88f80;
  --taupe-dark: #7d6558;
  --ink: #3d322c;
  --muted: #8f7f75;
  --line: #ddcfc5;
  --line-soft: #e9dfd7;
  --sage: #8ea38a;
  --sage-soft: #e3eadf;
  --honey: #c19a62;
  --honey-soft: #f3e7d3;
  --rose: #b97a72;
  --rose-soft: #f3e0dc;
  --shadow: 0 1px 2px rgba(80, 55, 40, .05), 0 8px 24px rgba(80, 55, 40, .06);
  --serif: 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Jost, system-ui, sans-serif; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--bg); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; }
h2 { font-size: 21px; }
h3 { font-size: 18px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.loading { padding: 60px; text-align: center; color: var(--muted); font-family: var(--serif); font-size: 20px; font-style: italic; }
.empty { color: var(--muted); font-style: italic; font-size: 14px; }
.sub { font-style: normal; font-size: 12px; color: var(--muted); }
.tag-soft { font-style: normal; font-size: 11px; letter-spacing: .03em; color: var(--taupe-dark); background: var(--blush-soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 16px; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--taupe); }
.btn.primary { background: var(--taupe-dark); color: #fff; border-color: var(--taupe-dark); }
.btn.primary:hover { background: var(--ink); }
.btn.small { padding: 4px 12px; font-size: 13px; }
.btn.tiny { padding: 2px 10px; font-size: 12px; border-color: var(--taupe); color: var(--taupe-dark); background: transparent; }
.btn.tiny:hover { background: var(--blush-soft); }
.btn.wide { width: 100%; padding: 12px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--taupe-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 13px; }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; opacity: 0; transition: opacity .15s; }
li:hover > .x, .x:focus { opacity: 1; }
.x:hover { color: var(--rose); }
.x.big { font-size: 28px; opacity: 1; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.chip.on { background: var(--taupe-dark); border-color: var(--taupe-dark); color: #fff; }
.chip.small { padding: 3px 10px; font-size: 13px; margin: 0 4px 5px 0; }
.chip.on.warn { background: var(--honey); border-color: var(--honey); }
.tag { display: inline-block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--blush-soft); color: var(--taupe-dark); }
.tag.red { background: var(--rose-soft); color: var(--rose); }
.badge { display: inline-block; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--blush-soft); font-weight: 500; }
.badge.warn { background: var(--honey-soft); color: #8a6a35; }

/* Round planner checkboxes */
input.circle { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; border: 1.5px solid var(--taupe); border-radius: 50%; margin: 2px 0 0; flex: none; cursor: pointer; display: grid; place-content: center; background: transparent; }
input.circle::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--taupe-dark); transform: scale(0); transition: transform .12s; }
input.circle:checked { border-color: var(--taupe-dark); }
input.circle:checked::after { transform: scale(1); }
input.circle:focus-visible { outline: 2px solid var(--taupe); outline-offset: 2px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin-card { background: var(--paper); border-radius: 18px; padding: 40px 36px; max-width: 420px; width: 100%; box-shadow: var(--shadow); text-align: center; }
.signin-logo { width: 96px; height: 96px; margin-bottom: 10px; }
.signin-card h1 { font-size: 34px; }
.signin-card p { margin: 16px 0; }

/* ---------- Header ---------- */
.sample-bar { background: var(--honey-soft); color: #7a5d30; text-align: center; font-size: 13px; padding: 5px; }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 28px; max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.brand img { width: 44px; height: 44px; }
.brand b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.icons { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid transparent; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--taupe-dark); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--blush-soft); }
.icon-btn.on { background: var(--paper); border-color: var(--line); box-shadow: var(--shadow); color: var(--ink); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 50px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 260px; z-index: 30; }
.menu-field { display: grid; gap: 4px; padding: 8px 10px 10px; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu-field select { text-transform: none; letter-spacing: 0; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--bg); color: var(--ink); }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.menu-item:hover { background: var(--blush-soft); }
.menu-item .small { display: block; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 4px 28px 60px; }
.alert { background: var(--rose-soft); color: #8d4f48; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }

/* ---------- Day title + strip ---------- */
.day-title { text-align: center; margin: 4px 0 14px; }
.day-title h1 { font-size: 44px; line-height: 1.1; }
.day-title h1 span { color: var(--taupe); font-weight: 500; }
.day-title p { margin: 4px 0 0; color: var(--muted); letter-spacing: .04em; }
.daystrip { display: flex; justify-content: center; gap: 0; margin: 0 auto 18px; width: fit-content; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.daystrip button { border: 0; background: transparent; padding: 8px 22px; cursor: pointer; display: grid; justify-items: center; gap: 0; border-left: 1px solid var(--line-soft); position: relative; }
.daystrip button:first-child { border-left: 0; }
.daystrip small { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.daystrip b { font-family: var(--serif); font-size: 26px; line-height: 1.1; font-weight: 600; }
.daystrip button:hover { background: var(--blush-soft); }
.daystrip button.on { background: var(--blush); }
.daystrip button.today::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--taupe-dark); }
.daystrip button { padding-bottom: 12px; }
.pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.pill { border: 1px solid var(--honey); background: var(--honey-soft); color: #7a5d30; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 14px; }

/* ---------- Boxes (planner sections) ---------- */
.board { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: start; }
.board-col { display: grid; gap: 18px; min-height: 120px; border-radius: 16px; transition: background .15s; align-content: start; }
.board-col.drop-here { background: rgba(230, 211, 200, .35); }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 16px; box-shadow: var(--shadow); }
.box.shaded { background: var(--blush); border-color: #dcc5b8; }
.box.shaded .checks li { border-bottom-color: rgba(125, 101, 88, .18); }
.box.moving { opacity: .45; outline: 2px dashed var(--taupe); }
.box-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; position: relative; cursor: grab; user-select: none; }
.box-head h2 { text-align: center; }
.box-head.static { cursor: default; justify-content: space-between; }
.head-actions { position: absolute; right: 0; display: flex; gap: 10px; }
.box-head.static .head-actions { position: static; }
.grip { position: absolute; left: -6px; width: 20px; height: 20px; color: var(--taupe); opacity: 0; transition: opacity .15s; }
.grip svg { width: 20px; height: 20px; fill: currentColor; }
.box:hover .grip { opacity: .7; }
.box-head:active { cursor: grabbing; }
.mini-head { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 10px 0 4px; display: flex; justify-content: space-between; align-items: baseline; }
.mini-head .count { font-family: Jost, sans-serif; font-size: 12px; color: var(--muted); font-weight: 400; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dotted var(--line); flex-wrap: wrap; }
.checks li:last-child { border-bottom: 0; }
.checks label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; flex: 1; min-width: 120px; }
.checks li.done label > span { color: var(--muted); }
/* Strike-through drawn as a thin line through the middle of the letters. */
.checks li.done .txt { background: linear-gradient(var(--taupe), var(--taupe)) 0 62% / 100% 1px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hide-done li.done { display: none; }
.who { color: var(--muted); font-size: 13px; }
.checks li[draggable="true"] { cursor: grab; }
.checks li.moving { opacity: .45; background: var(--blush-soft); border-radius: 6px; }
.drop-list { min-height: 26px; border-radius: 8px; transition: background .15s; }
.drop-list.drop-here { background: rgba(255, 255, 255, .45); }
.add-row { margin: 2px 0 6px; }
.add-row input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 6px 2px; outline: none; }
.add-row input:focus { border-bottom-color: var(--taupe-dark); }
.add-row input::placeholder { color: var(--muted); font-style: italic; }
.box.shaded .add-row input { border-bottom-color: rgba(125, 101, 88, .35); }
.box.shaded .add-row input::placeholder { color: var(--taupe-dark); }
textarea.lined { width: 100%; border: 0; resize: vertical; outline: none; padding: 2px; min-height: 140px;
  background: repeating-linear-gradient(transparent, transparent 27px, rgba(125, 101, 88, .22) 27px, rgba(125, 101, 88, .22) 28px);
  line-height: 28px; background-attachment: local; }
textarea.lined::placeholder { color: var(--taupe-dark); font-style: italic; opacity: .8; }

/* ---------- Week ---------- */
.week { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.week-col { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 0 12px 12px; font-size: 14px; }
.week-col.today { border-color: var(--taupe); }
.week-head { display: grid; justify-items: center; width: calc(100% + 24px); margin: 0 -12px 6px; padding: 10px 6px; background: var(--blush); border: 0; border-radius: 13px 13px 0 0; cursor: pointer; }
.week-head:hover { background: #dcc5b8; }
.week-head b { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.week-head small { font-size: 11px; color: var(--taupe-dark); letter-spacing: .06em; text-transform: uppercase; }
.week-part { border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.week-part:last-child { border-bottom: 0; }
.week-part.shaded { background: var(--blush-soft); margin: 6px -12px 0; padding: 2px 12px 8px; }
.week-part:last-child.shaded { border-radius: 0 0 13px 13px; margin-bottom: -12px; }
.week .checks li { padding: 5px 0; }
.week .checks label { gap: 8px; }
.week textarea.lined { min-height: 84px; }
.week .add-row input { font-size: 13px; }

/* ---------- Bag check ---------- */
.overlay { position: fixed; inset: 0; background: rgba(61, 50, 44, .35); display: grid; place-items: center; padding: 20px; z-index: 40; }
.modal { background: var(--paper); border-radius: 18px; width: min(880px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(61, 50, 44, .25); }
.modal-head, .drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2, .drawer-head h2 { font-size: 26px; }
.bags-in-use { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 12px 22px; font-size: 14px; }
.bags-in-use span { margin-right: 4px; color: var(--muted); }
.bag-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line-soft); }
.bag-tab { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.bag-tab.on { color: var(--ink); border-bottom-color: var(--taupe-dark); }
.modal-body { overflow: auto; padding: 0 22px 16px; }
.pad { padding: 22px; }
.bag-items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.bag-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 8px; }
.bag-item.low { background: var(--honey-soft); }
.bag-item.missing { background: var(--rose-soft); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; background: var(--paper); }
.seg button { border: 0; background: transparent; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--muted); border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on.ok, .seg button.on.done { background: var(--sage); color: #fff; }
.seg button.on.low, .seg button.on.behind { background: var(--honey); color: #fff; }
.seg button.on.missing { background: var(--rose); color: #fff; }
.seg button.on.on { background: var(--taupe-dark); color: #fff; }
.seg.wide { display: flex; margin-bottom: 10px; }
.seg.wide button { flex: 1; padding: 8px; font-size: 14px; }
.modal-foot { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-soft); }
.modal-foot .btn.primary { margin-left: auto; }

/* ---------- Students ---------- */
.students-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; min-width: 220px; background: var(--paper); outline: none; }
.behind-card { margin-bottom: 18px; }
.behind-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.behind-list > div { padding: 4px 0; }
.behind-list .n { background: var(--paper); color: var(--taupe-dark); border-radius: 999px; padding: 0 8px; font-size: 13px; margin: 0 4px; }
.table-box { padding: 0; overflow: auto; }
.roster { width: 100%; border-collapse: collapse; }
.roster th { text-align: left; font-family: var(--serif); font-size: 17px; font-weight: 600; background: var(--blush); padding: 10px 14px; position: sticky; top: 0; }
.roster td { padding: 9px 14px; border-bottom: 1px dotted var(--line); vertical-align: middle; }
.roster td b { font-weight: 500; }
.roster tbody tr { cursor: pointer; }
.roster tbody tr:hover { background: var(--blush-soft); }
.roster .c { text-align: center; }
.status { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.status.on { background: var(--blush-soft); color: var(--taupe-dark); }
.status.behind { background: var(--honey-soft); color: #8a6a35; }
.status.done { background: var(--sage-soft); color: #56704f; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.stepper button { border: 0; background: none; width: 30px; height: 28px; cursor: pointer; font-size: 17px; color: var(--taupe-dark); border-radius: 50%; }
.stepper button:hover { background: var(--blush-soft); }
.stepper b { min-width: 28px; text-align: center; font-weight: 500; }
.stepper.busy { opacity: .55; pointer-events: none; }

.overlay.side { place-items: stretch end; padding: 0; }
.drawer { background: var(--paper); width: min(560px, 100vw); height: 100vh; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(61, 50, 44, .18); }
.drawer-body { overflow: auto; padding: 0 22px 30px; }
.drawer section { border-bottom: 1px solid var(--line-soft); padding-bottom: 16px; }
.drawer section:last-child { border-bottom: 0; }
.drawer textarea, .log-form input, .log-form select, .field textarea, .field input, #set-bag { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--paper); outline: none; }
.drawer textarea:focus, .log-form input:focus, .field textarea:focus, .field input:focus, #set-bag:focus { border-color: var(--taupe); }
.skill-group { display: flex; gap: 10px; margin-bottom: 4px; }
.skill-group > span { width: 110px; flex: none; font-size: 12px; color: var(--muted); padding-top: 4px; }
.pc-big { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pc-big .stepper b { font-size: 20px; min-width: 40px; }
.pc-big .stepper button { width: 38px; height: 36px; }
.log-form { background: var(--blush-soft); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.log-form .btn { justify-self: start; }
.row2 { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row2 label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.row2 label input[type=number] { width: 90px; }
.row2 .grow { flex: 1; }
.check-inline { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; padding-bottom: 8px; cursor: pointer; }
.log { list-style: none; padding: 0; margin: 10px 0 0; }
.log li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dotted var(--line); }
.log li > div { flex: 1; }
.log li p { margin: 3px 0 0; }
.log li.done p { text-decoration: line-through; color: var(--muted); }
.log .fixed { display: flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; cursor: pointer; }
.log .x { opacity: .6; }

/* ---------- Settings ---------- */
.settings { max-width: 980px; margin: 0 auto; display: grid; gap: 18px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.day-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 14px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; margin-bottom: 10px; }
.grid-table { border-collapse: collapse; }
.grid-table th, .grid-table td { padding: 6px 12px; border-bottom: 1px dotted var(--line); text-align: center; font-weight: 400; }
.grid-table td:first-child { text-align: left; }
.grid-table input.circle { margin: 0 auto; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top, .wrap { padding-left: 16px; padding-right: 16px; }
  .brand b { font-size: 20px; }
  .day-title h1 { font-size: 34px; }
  .daystrip button { padding: 6px 12px; }
  .board { grid-template-columns: 1fr; }
  .bag-items { grid-template-columns: 1fr; }
  .modal-foot { flex-wrap: wrap; }
}
