@font-face { font-family: Aladin; src: url('Aladin-Regular.ttf'); font-display: swap; }
:root {
  --bg: #faf9f7; --card: #fff; --ink: #1c1917; --muted: #78716c; --line: #e7e5e4;
  --p: #ea580c; --p-dark: #c2410c; --p-soft: #fff7ed; --p-line: #fed7aa;
  --ok: #166534; --ok-bg: #f0fdf4; --err: #9f1239; --err-bg: #fff1f2;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: 5rem; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
h1, h2, .brand { font-family: Aladin, Georgia, serif; font-weight: normal; letter-spacing: .01em; }
h1 { font-size: 2rem; line-height: 1.15; margin: 1rem 0 .6rem; }
h2 { font-size: 1.45rem; margin: 1.4rem 0 .5rem; }
a { color: var(--p-dark); }
.testbanner { background: #1c1917; color: #fed7aa; text-align: center; font-size: .85rem; padding: .35rem 1rem; }
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 1rem; }
.brand { text-decoration: none; color: var(--ink); font-size: 1.5rem; }
.brand-name { color: var(--p); }
.brand-sub { color: var(--muted); font-size: 1.1rem; }
nav a { margin-left: 1rem; text-decoration: none; color: var(--ink); font-size: .95rem; }
nav a:hover { color: var(--p-dark); }
.intro p { max-width: 60ch; }
.hello { background: var(--p-soft); border: 1px solid var(--p-line); border-radius: 10px; padding: .6rem .8rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin: 1rem 0; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.08rem; }
.hint, small { color: var(--muted); font-size: .88rem; }
.day h2 { position: sticky; top: 56px; background: var(--bg); padding: .35rem 0; margin: 1.2rem 0 .4rem; z-index: 1; border-bottom: 2px solid var(--p-line); }
.shifts { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.shift label { display: flex; align-items: center; gap: .8rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; cursor: pointer; min-height: 56px; }
.shift label:hover { border-color: var(--p); }
.shift input[type=checkbox] { width: 1.35rem; height: 1.35rem; accent-color: var(--p); flex: none; }
.shift.is-selected label { border-color: var(--p); background: var(--p-soft); box-shadow: 0 0 0 2px var(--p-line); }
.shift.is-full label, .shift.is-mine label { opacity: .65; cursor: default; }
.shift-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.shift-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.shift-area { color: var(--ink); }
.shift-note { color: var(--muted); font-size: .85rem; }
.shift-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; font-size: .85rem; color: var(--muted); }
.pill { display: inline-block; background: #f5f5f4; border: 1px solid var(--line); border-radius: 999px; padding: .08rem .6rem; font-size: .8rem; color: var(--ink); white-space: nowrap; }
.pill-few { background: var(--p-soft); border-color: var(--p-line); color: var(--p-dark); }
.pill-full { background: #f5f5f4; color: var(--muted); }
.pill-mine { background: var(--ok-bg); border-color: #bbf7d0; color: var(--ok); }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); z-index: 10; }
.actionbar.is-active { box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.btn, button.btn { display: inline-block; background: var(--p); color: #fff; border: 0; border-radius: 999px; padding: .65rem 1.3rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--p-dark); }
.btn[disabled] { background: #d6d3d1; cursor: not-allowed; }
.btn-big { width: 100%; padding: .9rem 1.3rem; font-size: 1.05rem; }
.btn-small { padding: .3rem .8rem; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--p-dark); border: 1px solid var(--p-line); }
.btn-ghost:hover { background: var(--p-soft); }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; padding: .3rem 0; }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .25rem; font-weight: 600; font-size: .92rem; }
.form label small { font-weight: 400; }
input:not([type=checkbox]), textarea, select { font: inherit; padding: .65rem .75rem; border: 1px solid #d6d3d1; border-radius: 10px; background: #fff; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--p); outline-offset: 1px; border-color: var(--p); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form .check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--p); flex: none; }
.form.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.form.row .btn { align-self: end; }
fieldset { border: 1px solid var(--line); border-radius: 10px; }
.inlinecheck { display: inline-flex !important; gap: .25rem; align-items: center; font-weight: 400 !important; margin-right: .5rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.summary { padding-left: 1.1rem; }
.booked { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; margin: .6rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem .8rem; align-items: center; }
.booked.is-pending { border-style: dashed; }
.calbtns { display: flex; flex-wrap: wrap; gap: .35rem; }
.flash { border-radius: 10px; padding: .6rem .85rem; margin: .8rem 0; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bbf7d0; }
.flash-err { background: var(--err-bg); color: var(--err); border: 1px solid #fecdd3; }
.testbox { background: #fefce8; border: 1px dashed #ca8a04; border-radius: 10px; padding: .6rem .8rem; word-break: break-all; font-size: .85rem; }
.adminbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
form.inline { display: inline; }
code { background: #f5f5f4; padding: .05rem .3rem; border-radius: 4px; font-size: .85em; }
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; }
.foot { color: var(--muted); font-size: .85rem; padding: 1.5rem 16px 3rem; }
.foot a { color: var(--muted); }
@media (max-width: 480px) { h1 { font-size: 1.7rem; } .shift-meta { font-size: .78rem; } }
@media (prefers-reduced-motion: no-preference) { .shift label, .btn { transition: background .12s, border-color .12s, box-shadow .12s; } }
.center { text-align: center; }
.help h2 { margin-top: 1.6rem; }
.help .toc { padding-left: 1.2rem; }
.help ul { padding-left: 1.2rem; }
