/* Library site. Palette: walnut shelves, desk-lamp amber, linen paper, olive for "free". One bold thing: the lit hall map. */

/* Vazirmatn is picked up automatically when its .woff2 file is placed in static/fonts/ (see README); otherwise system fonts are used. */

:root {
  --ink: #2a1c16; --ink-2: #5b4437; --ink-3: #765f4d;
  --paper: #f6eddf; --surface: #fffaf1; --line: #e2d1b8; --line-2: #eddfc9;
  --walnut: #4b2a20; --walnut-d: #2f1913; --walnut-m: #6b4030; --walnut-l: #ecdcc6; --walnut-xl: #f3e7d3;
  --copper: #8a4318;
  --amber: #e8a13a; --amber-h: #f1b24f; --amber-s: #b9741a; --amber-d: #7f4a05; --amber-l: #fbe6bd;
  --olive: #566f33; --olive-d: #3b5120; --olive-l: #e4ecd0; --olive-xl: #eff3df;
  --red: #a8322a; --red-l: #f8dfd9;
  --blue: #2b5c9e;
  --floor: #efe2cc; --floor-line: #e2d1b3;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--paper); color: var(--ink);
  background-image: radial-gradient(rgba(110, 70, 30, .06) 1px, transparent 1.2px); background-size: 22px 22px;
  font: 400 16px/1.8 "Vazirmatn", "Vazir", "Segoe UI", Tahoma, "Noto Naskh Arabic", system-ui, sans-serif;
}
h1, h2, h3 { line-height: 1.45; margin: 0 0 .5rem; font-weight: 800; text-wrap: balance; color: var(--walnut-d); }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
h1 small, h2 small { font-size: .8rem; font-weight: 500; color: var(--ink-3); margin-inline-start: .5rem; }
p { margin: 0 0 .8rem; }
a { color: var(--copper); text-underline-offset: 3px; }
a:hover { color: var(--walnut-d); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
bdi, .ltr input { unicode-bidi: isolate; }

.wrap { max-width: 1100px; margin-inline: auto; padding-inline: 16px; }
.main { padding-block: 28px 64px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: #fff; padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { top: 8px; }
.muted { color: var(--ink-3); }
.sub { color: var(--ink-2); margin-bottom: 1.2rem; }
.big { font-size: 1.15rem; }

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--walnut-d); font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.logo { width: 34px; height: 34px; color: var(--walnut); flex: none; }
.logo path { stroke: var(--amber); }
.nav { display: flex; gap: 4px; margin-inline-end: auto; }
.nav a, .acct a:not(.btn), .linkbtn {
  padding: 6px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600;
}
.nav a:hover, .acct a:not(.btn):hover, .linkbtn:hover { background: var(--walnut-xl); color: var(--walnut-d); }
.nav a[aria-current], .acct a[aria-current] { color: var(--walnut-d); box-shadow: inset 0 -3px 0 var(--amber); border-radius: 0; }
.acct { display: flex; align-items: center; gap: 4px; }
.linkbtn { background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.inline { display: inline; margin: 0; }
form.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
form.inline-form label { font-weight: 600; font-size: .92rem; }
.showpw { font-size: .85rem; padding: 2px 8px; margin-top: 2px; color: var(--copper); }

.adminbar { background: var(--walnut-d); border-bottom: 0; box-shadow: none; }
.adminbar .brand, .adminbar .acct a:not(.btn), .adminbar .linkbtn { color: #f3e3cb; }
.adminbar .logo { color: #6b4030; }
.adminbar .acct a:not(.btn):hover, .adminbar .linkbtn:hover { background: rgba(255, 235, 200, .12); color: #fff; }
.adminbar .wrap { min-height: 52px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; padding-block: 0 !important; min-height: 0 !important; }
.tabs a { color: #d6bf9f; padding: 10px 14px; text-decoration: none; white-space: nowrap; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.badge { background: var(--amber); color: var(--walnut-d); font-weight: 800; border-radius: 99px; font-size: .75rem; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding-inline: 6px; }

@media (max-width: 720px) {
  .top .wrap { gap: 2px 8px; }
  .brand { order: 1; margin-inline-end: auto; font-size: .95rem; gap: 8px; }
  .logo { width: 30px; height: 30px; }
  .acct { order: 2; gap: 0; }
  .nav a, .acct a:not(.btn), .linkbtn { padding: 6px 8px; }
  .acct .btn.small { padding: .2em .7em; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .5em 1.15em;
  border: 1.5px solid var(--walnut); background: transparent; color: var(--walnut); border-radius: var(--radius);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.4; transition: background .15s, color .15s, transform .08s;
}
.btn:hover { background: var(--walnut-l); color: var(--walnut-d); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--walnut-d); box-shadow: 0 2px 0 var(--amber-s); }
.btn.primary:hover { background: var(--amber-h); border-color: var(--amber-h); color: var(--walnut-d); }
.btn.primary:active { transform: translateY(2px); box-shadow: none; }
.btn.ghost { border-color: var(--line); color: var(--ink-2); background: rgba(255, 250, 241, .6); }
.btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.light { background: #fff4de; border-color: #fff4de; color: var(--walnut-d); }
.btn.light:hover { background: #fff; }
.btn.outline { border-color: rgba(255, 238, 208, .55); color: #fff1db; }
.btn.outline:hover { background: rgba(255, 238, 208, .14); color: #fff; }
.btn.small { min-height: 36px; padding: .25em .85em; font-size: .9rem; }
.btn.big { min-height: 52px; font-size: 1.05rem; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 1.2rem; }

/* ---------- alerts, chips ---------- */
.alert { padding: .75rem 1rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1rem; }
.alert.ok { background: var(--olive-xl); border-color: #c9d8a4; color: var(--olive-d); }
.alert.err { background: var(--red-l); border-color: #e7b8b2; color: #7d2820; }
.alert.warn { background: var(--amber-l); border-color: #efce86; color: var(--amber-d); }
.alert.info { background: var(--walnut-xl); border-color: #dcc8a8; color: #5b3b26; }

.chip { display: inline-flex; align-items: center; padding: .05em .7em; border-radius: 99px; font-size: .85rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--olive-l); color: var(--olive-d); }
.chip.bad { background: var(--red-l); color: var(--red); }
.chip.warn { background: var(--amber-l); color: var(--amber-d); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 4px 8px; align-items: center; }
a.chip.pick { background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); min-height: 38px; padding: .15em 1em; text-decoration: none; flex: none; }
a.chip.pick:hover { border-color: var(--walnut); color: var(--walnut-d); }
a.chip.pick[aria-current] { background: var(--walnut); border-color: var(--walnut); color: #fff4de; }
a.chip.pick.dim { opacity: .6; }
a.chip.pick small { font-weight: 400; opacity: .8; margin-inline-start: .5em; font-size: .78rem; }
.daylabel { font-weight: 700; padding-inline: 8px; white-space: nowrap; }
.pickers { margin-bottom: 8px; }

/* a shift chip shows how full the hall is */
a.chip.pick.shift { display: grid; justify-items: center; gap: 0; padding: .3em 1.1em .45em; border-radius: 14px; line-height: 1.55; min-width: 108px; --fill: 0%; }
a.chip.pick.shift small { margin: 0; }
a.chip.pick.shift .fr { opacity: 1; font-weight: 700; color: var(--olive-d); }
a.chip.pick.shift.full .fr { color: var(--red); }
a.chip.pick.shift::after { content: ""; display: block; width: 100%; height: 4px; margin-top: 4px; border-radius: 3px; background: linear-gradient(to left, var(--olive) var(--fill), var(--line) var(--fill)); }
a.chip.pick.shift[aria-current] .fr { color: #ffd88c; }
a.chip.pick.shift[aria-current]::after { background: linear-gradient(to left, var(--amber) var(--fill), rgba(255, 244, 222, .28) var(--fill)); }

/* ---------- forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .25rem; font-size: .95rem; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1.5px solid #a58d6b; border-radius: var(--radius);
  background: #fffdf8; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--amber-s); box-shadow: 0 0 0 3px rgba(232, 161, 58, .28); outline: none; }
textarea { min-height: 88px; resize: vertical; }
input[type=file] { padding: .55rem; background: var(--amber-l); border-style: dashed; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.inline-form input, .inline-form select { width: auto; min-width: 120px; }
.ltr input { direction: ltr; text-align: left; }
.has-error input, .has-error select { border-color: var(--red); }
.hint { color: var(--ink-3); font-size: .88rem; margin: .25rem 0 0; }
.err { color: var(--red); font-size: .9rem; margin: .25rem 0 0; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
legend { font-weight: 800; font-size: 1.05rem; padding: 0 0 .35rem; width: 100%; border-bottom: 1px solid var(--line); margin-bottom: .9rem; color: var(--walnut-d); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.stack { max-width: 640px; }
.narrow { max-width: 460px; }
.wrap-form { align-items: flex-end !important; }
.wrap-form .field { margin: 0; }
.searchbar { display: flex; gap: 8px; margin: 12px 0; max-width: 520px; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: minmax(0, 1fr); } }

.paybox { background: var(--amber-l); border: 1px solid #efce86; border-radius: 12px; padding: 14px 16px; margin-bottom: 1.2rem; }
.paybox p { margin-bottom: .4rem; }
.cardnum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 1.4rem; font-weight: 800; color: var(--amber-d); letter-spacing: .04em; }
.receipt-preview { display: block; max-width: 240px; max-height: 240px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--line); }
.receipt-img { max-height: 440px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* ---------- tables, lists ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .8rem; }
table { width: 100%; border-collapse: collapse; }
th { text-align: start; font-size: .85rem; color: var(--ink-3); font-weight: 700; padding: .6rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--walnut-xl); }
td { padding: .6rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 1.2rem; border: 1.5px dashed #cdb894; border-radius: 12px; color: var(--ink-2); background: rgba(255, 250, 241, .6); }
.empty p { margin-bottom: .5rem; }
.empty > :last-child { margin-bottom: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows li div { display: flex; flex-direction: column; }
.rows li span { color: var(--ink-3); font-size: .92rem; }
.kv { list-style: none; padding: 0; margin: 0 0 .6rem; }
.kv li { display: flex; gap: 8px; align-items: baseline; }
.kv li span { min-width: 4.5em; color: var(--ink-2); }
.kv strong { font-size: 1.3rem; }

@media (max-width: 640px) {
  .tablewrap { border: 0; background: none; overflow: visible; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 12px; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 6px 0; }
  td::before { content: attr(data-label); color: var(--ink-3); font-size: .85rem; flex: none; }
  td[data-label=""]::before { display: none; }
  td[data-label=""] { justify-content: flex-start; }
}

/* ---------- sections ---------- */
.block { margin-top: 2.2rem; }
.block > h2 { margin-bottom: .8rem; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; align-items: start; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.formcols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.cols > *, .cols3 > * { min-width: 0; }
.sideinfo { background: var(--walnut-xl); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; position: sticky; top: 16px; }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .4rem; }
.titlebar h1 { margin: 0; }
.stats > div { border-top: 3px solid var(--amber); padding-top: 12px; }
.stats h3 { color: var(--ink-2); font-size: .95rem; }
.stats .big strong { font-size: 1.6rem; }
@media (max-width: 860px) { .cols, .cols3, .formcols { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.todo { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 10px; }
.dashgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.statscol > div { border-top: 3px solid var(--amber); padding-top: 12px; margin-bottom: 22px; }
.statscol h3 { color: var(--ink-2); font-size: .95rem; }
.statscol .big strong { font-size: 1.6rem; }
@media (max-width: 860px) { .dashgrid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.todo a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.todo a:hover { border-color: var(--amber-s); }
.todo b { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--walnut-l); color: var(--walnut-d); font-size: 1.15rem; flex: none; }
.todo .hot b { background: var(--amber); color: var(--walnut-d); }

.request { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 8px 24px; align-items: start; }
@media (max-width: 720px) { .request { grid-template-columns: minmax(0, 1fr); } }
.reqhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reqhead h2 { margin: 0; font-size: 1.2rem; }
.receipt-link { display: block; }
.receipt-link .receipt-img { width: 100%; max-height: 340px; object-fit: contain; }
.actionrow { display: flex; gap: 14px 24px; flex-wrap: wrap; align-items: center; }

/* ---------- member area ---------- */
.hello { margin-bottom: 1.2rem; }
.hello h1 { margin: 0 0 .1rem; }
.hello p { margin: 0; color: var(--ink-2); }

.idcard { max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(75, 42, 32, .08); }
.idtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--walnut); color: #f6e6cc; padding: .6rem 1rem; font-weight: 700; border-bottom: 4px solid var(--amber); }
.idcard h2 { margin: 0; padding: .8rem 1rem .3rem; border-bottom: 1px solid var(--line-2); font-size: 1.5rem; }
.idcard p { margin: 0; padding: .3rem 1rem; border-bottom: 1px solid var(--line-2); }
.idcard p:last-child { border-bottom: 0; padding-bottom: .6rem; }
.idmeta { color: var(--ink-3); }
.idno { font-weight: 700; color: var(--amber-d); }
.dashlayout { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 36px; align-items: start; }
.dashside { position: sticky; top: 16px; display: grid; gap: 14px; }
.dashside .idcard { max-width: none; }
.dashactions { display: flex; flex-direction: column; gap: 10px; }
.dashmain > .block:first-child, .dashmain > .rebook + .block { margin-top: 0; }
.dashmain { min-width: 0; }
@media (max-width: 860px) {
  .dashlayout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dashside { position: static; }
  .dashactions { flex-direction: row; flex-wrap: wrap; }
  .dashactions .btn { flex: 1 1 auto; }
}
.rentalbox { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.rentalbox p:last-child { margin-bottom: 0; }
.policy { background: var(--amber-l); border-radius: 12px; padding: 12px 16px; margin-bottom: 1rem; max-width: 640px; }
.policy p { margin: 0; }
.policy p:empty { display: none; }

.rebook { background: var(--amber-l); border: 1px solid #efce86; border-radius: 14px; padding: 14px 16px; margin-bottom: 1.6rem; }
.rebook p { margin: 0 0 .6rem; color: var(--walnut-d); }
.rebook .btnrow form { margin: 0; }

.focus { max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; position: relative; overflow: hidden; }
.focus .clock { font-size: 2.3rem; font-weight: 800; color: var(--walnut-d); font-variant-numeric: tabular-nums; line-height: 1.2; min-width: 4.3ch; direction: ltr; text-align: center; }
.focus[data-running] .clock { color: var(--amber-d); }
.focus .modes { display: flex; gap: 6px; flex-wrap: wrap; }
.focus .mode { min-height: 34px; padding: .1em .85em; border: 1.5px solid var(--line); background: transparent; border-radius: 99px; font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.focus .mode[aria-pressed=true] { background: var(--walnut); border-color: var(--walnut); color: #fff4de; }
.focus .controls { display: flex; gap: 8px; margin-inline-start: auto; }
.focus .bar { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--line-2); }
.focus .bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width 1s linear; margin-inline-start: auto; }
.focus h2 { margin: 0; font-size: 1rem; flex-basis: 100%; }
.install { margin-top: .6rem; }

.confirmbar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 16px;
  box-shadow: 0 -4px 18px rgba(75, 42, 32, .1);
}
.confirmbar span { font-weight: 700; color: var(--ink-2); }
.confirmbar span.picked { color: var(--walnut-d); }

/* ---------- hero: the reading room with the lamp on ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #f8ecd9; background: linear-gradient(165deg, #3a1f18 0%, #4b2a20 52%, #35190f 100%); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 560px at 30% 42%, rgba(244, 176, 76, .34), transparent 66%), radial-gradient(420px 300px at 92% 0%, rgba(244, 176, 76, .12), transparent 70%);
}
.hero a { color: inherit; }
.herogrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 44px; padding-block: 44px 52px; align-items: center; }
.herotext h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); line-height: 1.45; letter-spacing: 0; margin-bottom: .8rem; text-wrap: balance; color: #fff4de; }
.lead { font-size: 1.1rem; color: #ecd9bd; max-width: 34em; }
.live { background: rgba(255, 236, 200, .1); border-inline-start: 3px solid var(--amber); border-radius: 4px 10px 10px 4px; padding: .7rem 1rem; margin-top: 1.2rem; max-width: 34em; }
.live strong { font-size: 1.5rem; color: #f7c968; padding-inline: .2em; }
.hall { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 16px; min-width: 0; box-shadow: 0 0 0 1px rgba(255, 220, 160, .3), 0 26px 60px rgba(0, 0, 0, .38), 0 0 90px rgba(240, 170, 70, .2); }
.hall-cta { margin: 14px 0 0; text-align: center; }
@media (max-width: 900px) { .herogrid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 30px 36px; } }

/* the notice pinned on the board */
.note { position: relative; max-width: 34em; margin-top: 1.4rem; padding: .85rem 1.1rem; background: #fff1c9; color: #3b2616; border-radius: 4px 4px 12px 4px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); transform: rotate(-.6deg); }
.note::before { content: ""; position: absolute; top: -7px; inset-inline-start: 20px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6a090, #b73a2c 72%); box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
.note p { margin: 0; font-weight: 600; white-space: pre-line; }
.note.flat { transform: none; box-shadow: none; border: 1px solid #ecd08e; margin: 0 0 1.4rem; max-width: none; }

/* ---------- the hall map ---------- */
.floorframe {
  background-color: var(--floor); border-radius: 14px; padding: 20px 14px 16px; overflow-x: auto; border: 1px solid var(--floor-line);
  background-image: linear-gradient(var(--floor-line) 1px, transparent 1px), linear-gradient(90deg, var(--floor-line) 1px, transparent 1px);
  background-size: 26px 26px;
}
.floor { display: flex; flex-wrap: wrap; gap: 24px 28px; justify-content: center; }
.tbl { display: flex; flex-direction: column; align-items: stretch; }
.tbl-row { display: grid; grid-template-columns: repeat(var(--cols), 44px); gap: 6px; justify-content: center; }
.tbl-desk { margin: 6px 0; height: 24px; border-radius: 6px; background: linear-gradient(#7a4a37, #5f3626); color: #f6e3c4; font-size: .72rem; line-height: 24px; text-align: center; box-shadow: 0 2px 0 rgba(40, 20, 10, .25), inset 0 1px 0 rgba(255, 255, 255, .16); }

.seat { position: relative; display: block; width: 44px; height: 44px; border: 2px solid var(--olive); border-radius: 10px 10px 6px 6px; background: #fffbef; color: var(--olive-d); font-weight: 800; font-size: .88rem; cursor: default; }
.tbl-row.top .seat { border-top-width: 6px; }
.tbl-row.bottom .seat { border-bottom-width: 6px; border-radius: 6px 6px 10px 10px; }
.seat > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; }
.seat input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
label.seat { cursor: pointer; }
label.seat:hover > span { background: var(--olive-l); }
.seat input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.seat input:checked + span { background: var(--olive); color: #fff; }
.seat.taken { border-color: #a38d72; color: #6b5844; background: repeating-linear-gradient(45deg, #dccbb0 0 4px, #eee2cd 4px 8px); }
.seat.mine { border-color: var(--amber-d); background: #f4c767; color: #3b2306; box-shadow: 0 0 0 3px rgba(232, 161, 58, .35); }
.seat.blocked { border-style: dashed; border-color: #b6a287; background: transparent; color: #9a8670; opacity: .8; }

/* little badges: outlet, window, quiet */
.tgs { position: absolute; top: -9px; inset-inline-end: -7px; display: flex; z-index: 2; pointer-events: none; }
.tg { width: 17px; height: 17px; margin-inline-start: -4px; border-radius: 50%; background: var(--amber); color: var(--walnut-d); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--floor); }
.tg svg { width: 11px; height: 11px; display: block; }
.tagfilter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; font-size: .9rem; color: var(--ink-2); }
.tagbtn { min-height: 34px; padding: .1em .9em; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tagbtn svg { width: 14px; height: 14px; }
.tagbtn[aria-pressed=true] { background: var(--amber); border-color: var(--amber-s); color: var(--walnut-d); }
.floor[data-filter] .seat { opacity: .3; }
.floor[data-filter=outlet] .seat[data-tags~=outlet], .floor[data-filter=window] .seat[data-tags~=window], .floor[data-filter=quiet] .seat[data-tags~=quiet] { opacity: 1; box-shadow: 0 0 0 3px rgba(232, 161, 58, .55); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 0 0; font-size: .88rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .tg { box-shadow: none; margin: 0; width: 18px; height: 18px; }
.legend.has-filter li[data-tag] { display: none; }
.sw { width: 16px; height: 16px; border: 2px solid var(--olive); border-radius: 5px; background: #fffbef; display: inline-block; }
.sw.taken { border-color: #a38d72; background: repeating-linear-gradient(45deg, #dccbb0 0 3px, #eee2cd 3px 6px); }
.sw.mine { border-color: var(--amber-d); background: #f4c767; }
.sw.blocked { border-style: dashed; border-color: #b6a287; background: transparent; }
.sw.lk { height: 20px; }
.sw.requested { border-color: #b4700f; background: var(--amber-l); }
.sw.lock { border-color: var(--red); background: repeating-linear-gradient(45deg, #f2c9c4 0 3px, #fbe9e7 3px 6px); }

@media (max-width: 480px) {
  .hall { padding: 12px; border-radius: 16px; }
  .floorframe { padding: 16px 8px 12px; }
  .floor { gap: 18px 14px; }
  .tbl-row { grid-template-columns: repeat(var(--cols), 40px); gap: 5px; }
  .seat { width: 40px; height: 40px; }
  .wall { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
  .locker { height: 64px; }
  a.chip.pick.shift { min-width: 96px; padding-inline: .8em; }
}

/* ---------- locker wall ---------- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; max-width: 560px; margin-inline: auto; }
.locker { position: relative; display: block; height: 72px; border: 2px solid var(--olive); border-radius: 6px; background: #fbf1da; color: var(--olive-d); font-weight: 800; font-size: .9rem; cursor: default; }
.locker::before { content: ""; position: absolute; top: 7px; inset-inline: 9px; height: 7px; background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 3px); opacity: .35; }
.locker::after { content: ""; position: absolute; bottom: 12px; inset-inline-start: 8px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.locker > span { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 6px; border-radius: inherit; }
.locker input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
label.locker { cursor: pointer; }
label.locker:hover > span { background: var(--olive-l); }
.locker input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.locker input:checked + span { background: var(--olive); color: #fff; }
.locker.taken { border-color: #a38d72; color: #6b5844; background: repeating-linear-gradient(45deg, #dccbb0 0 4px, #eee2cd 4px 8px); }
.locker.requested { border-color: #b4700f; background: var(--amber-l); color: var(--amber-d); }
.locker.lock { border-color: var(--red); color: var(--red); background: repeating-linear-gradient(45deg, #f2c9c4 0 4px, #fbe9e7 4px 8px); }
.locker.mine { border-color: var(--amber-d); background: #f4c767; color: #3b2306; box-shadow: 0 0 0 3px rgba(232, 161, 58, .35); }
.locker.blocked { border-style: dashed; border-color: #b6a287; background: transparent; color: #9a8670; opacity: .8; }

/* ---------- home sections ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps b { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-l); border: 2px solid var(--amber-s); color: var(--amber-d); font-size: 1.15rem; }
.steps h3 { margin-bottom: .2rem; }
.steps p { color: var(--ink-2); margin: 0; }
.lockers-block, .infoblock { border-top: 1px solid var(--line); padding-top: 2rem; }
.rules { margin: 0; padding-inline-start: 1.2rem; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* ---------- footer, bare pages ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 18px; color: var(--ink-2); font-size: .92rem; }
.foot .wrap { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: center; }
.adminlink { margin-inline-start: auto; color: var(--ink-3); }
.bare { display: grid; place-items: start center; padding: 40px 16px; }
.bare-box { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: 0 12px 32px rgba(75, 42, 32, .1); }
.bare-box > .brand { margin-bottom: 1.2rem; }
.bare-box .stack { max-width: none; }
.bare-box .stack + .sub, .bare-box .sub { margin-top: .8rem; }
.errorbox h1 { margin-top: 0; }

/* ---------- the one moment of motion: the lamp comes on, then the tables fill in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: lampon 1.6s ease-out both; }
  .hero .tbl { animation: tablein .6s ease-out both; }
  .hero .tbl:nth-child(1) { animation-delay: .25s; }
  .hero .tbl:nth-child(2) { animation-delay: .4s; }
  .hero .tbl:nth-child(3) { animation-delay: .55s; }
  .hero .tbl:nth-child(4) { animation-delay: .7s; }
  .hero .tbl:nth-child(n+5) { animation-delay: .85s; }
}
@keyframes lampon { 0% { opacity: 0; } 18% { opacity: .55; } 26% { opacity: .2; } 45% { opacity: .9; } 100% { opacity: 1; } }
@keyframes tablein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media print {
  .top, .foot, .no-print, .tabs, .confirmbar, .alert, .skip, .btn, .chips, .focus, .note, .rebook { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .block { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; animation: none !important; } }

/* ---------- check-in with the daily code ---------- */
.checkin { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.checkin label { display: block; font-weight: 700; margin-bottom: .5rem; color: var(--walnut-d); }
.checkin .inline-form input { width: 9.5em; min-width: 0; text-align: center; letter-spacing: .25em; font-size: 1.2rem; font-weight: 800; }
.checkin.done { display: flex; align-items: center; gap: 12px; background: var(--olive-xl); border-color: #c9d8a4; }
.checkin.done b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--olive); color: #fff; font-size: 1.2rem; flex: none; }
.checkin.done div { display: flex; flex-direction: column; line-height: 1.5; color: var(--olive-d); }
.checkin.done span { font-size: .9rem; }
.checkin-stat { margin: 0; color: var(--ink-2); font-size: .95rem; }
.codecard { text-align: center; max-width: 440px; margin: 0 0 2rem; padding: 22px 20px; background: var(--surface); border: 2px dashed var(--amber-s); border-radius: 16px; }
.codecard p { margin: 0 0 .4rem; }
.codecard .code { display: block; font-size: 4rem; line-height: 1.2; font-weight: 800; letter-spacing: .12em; color: var(--walnut-d); direction: ltr; margin: .2rem 0 .6rem; }
.codeinline { font-size: 1.5rem; letter-spacing: .1em; color: var(--amber-d); }
@media print { .codecard { border-color: #000; max-width: none; } .codecard .code { font-size: 9rem; } }
