/* Errandry app: a consumer marketplace. Top navigation, picture led listings and a booking panel. */
.app-body .demo-bar { position: sticky; top: 0; z-index: 15; height: var(--bar); flex-wrap: nowrap; white-space: nowrap; }
.noscript { padding: 40px; text-align: center; }
h1, h2, h3 { font-family: var(--head); }
.muted { color: var(--ink-2); }
.fine { font-size: 13px; }

/* Top header */
.top { position: sticky; top: var(--bar); z-index: 12; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; max-width: 1240px; min-height: 66px; margin: 0 auto; padding: 0 24px; }
.topnav { display: flex; flex: 1; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 13px; border-radius: 99px; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.topnav a:hover { background: var(--soft); color: var(--ink); }
.topnav a.is-active { background: var(--accent-tint); color: #4a2c02; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; line-height: 1; }
.usermenu { position: relative; flex: none; }
.userbtn { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 3px 12px 3px 4px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); cursor: pointer; text-align: left; }
.userbtn-text { display: grid; line-height: 1.2; }
.userbtn-text small { color: var(--ink-2); font-size: 12.5px; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 99px; background: var(--navy); color: #fff; font: 600 14px/1 var(--head); }
.avatar.big { width: 74px; height: 74px; font-size: 26px; }
.drop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 22px 44px -20px rgba(44, 36, 26, .45); }
.drop button, .drop a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none; color: var(--ink); font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.drop button:hover, .drop a:hover { background: var(--soft); }

.main { max-width: 1240px; margin: 0 auto; padding: 26px 24px 60px; }
.main > * + * { margin-top: 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head h1 { font-size: 30px; line-height: 1.15; font-weight: 700; }
.page-head p { margin-top: 4px; color: var(--ink-2); max-width: 70ch; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; font-weight: 700; text-decoration: none; }
.main > .crumb + * { margin-top: 6px; }
.section { font-size: 21px; margin-top: 22px; margin-bottom: 12px; }

.card { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.card > * + * { margin-top: 12px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.card-head h2 { font-size: 19px; line-height: 1.25; }
.card-head a { font-weight: 700; font-size: 14.5px; }
.card h3 { font-size: 15.5px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.two.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-block { width: 100%; min-height: 48px; }
.gap { height: 10px; }

.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 10px; border-radius: 99px; background: var(--soft); color: var(--ink-2); font-size: 12.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; vertical-align: middle; }
.pill.is-ok { background: var(--ok-tint); color: var(--ok); }
.pill.is-wait { background: var(--wait-tint); color: var(--wait); }
.pill.is-info { background: var(--info-tint); color: var(--info); }
.pill.is-danger { background: var(--danger-tint); color: var(--danger); }
.pill.is-done { background: var(--soft); color: var(--ink); }

/* Search and browse */
.searchhead { display: grid; grid-template-columns: auto minmax(260px, 520px); align-items: center; justify-content: space-between; gap: 14px 28px; }
.searchhead h1 { font-size: 34px; line-height: 1.1; }
.searchbar, .inline-search { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); }
.searchbar:focus-within, .inline-search:focus-within { outline: 3px solid #1f6fd6; outline-offset: 1px; }
.searchbar input, .inline-search input { flex: 1; min-width: 0; height: 50px; border: 0; background: none; outline: 0; }
.inline-search input { height: 40px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: var(--radius); background: var(--accent-tint); color: #4a2c02; text-decoration: none; }
.notice span { flex: 1; }
.cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cat { display: grid; align-content: start; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: left; cursor: pointer; }
.cat:hover { border-color: var(--line-2); }
.cat.is-active { border-color: var(--accent); background: var(--accent-tint); }
.cat img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cat span { display: grid; padding: 8px 12px 10px; line-height: 1.3; }
.cat b { font: 600 15.5px/1.25 var(--head); }
.cat small { color: var(--ink-2); font-size: 13px; }
.browse { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 26px; align-items: start; }
.filters { display: grid; gap: 12px; }
.filters h2 { font-size: 18px; }
.result-count { color: var(--ink-2); margin-bottom: 12px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.lcard { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.lcard:hover { border-color: var(--line-2); box-shadow: 0 16px 30px -20px rgba(44, 36, 26, .45); }
.lcard .art { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.lcard.is-paused .art { filter: grayscale(1); opacity: .65; }
.lcard-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.lcard-title { font: 600 18px/1.25 var(--head); }
.lcard-by { color: var(--ink-2); font-size: 14px; }
.lcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { display: grid; line-height: 1.2; }
.price b { font: 700 21px/1.15 var(--head); }
.price small { color: var(--ink-2); font-size: 12.5px; }
.next { color: var(--ok); font-size: 13px; font-weight: 700; white-space: nowrap; }
.rate { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.rate .icon { width: 15px; height: 15px; fill: var(--accent); stroke: var(--accent); }
.rate span { color: var(--ink-2); }
.rate.is-none { color: var(--ink-2); }
.starrow { display: inline-flex; gap: 1px; }
.starrow .icon { width: 15px; height: 15px; stroke: var(--accent); }
.starrow i.on .icon { fill: var(--accent); }

/* Listing page with the booking panel */
.listing { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr; gap: 18px 28px; align-items: start; }
.listing-main { min-width: 0; }
.listing-main > * + * { margin-top: 10px; }
.listing-more { grid-column: 1; min-width: 0; display: grid; gap: 14px; }
.banner { width: 100%; height: 230px; object-fit: cover; border-radius: var(--radius-lg); }
.banner.short { height: 170px; }
.lead { font-size: 17px; max-width: 60ch; }
.bookpanel { grid-column: 2; grid-row: 1 / span 2; min-width: 0; padding: 18px 20px 20px; border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 46px -30px rgba(44, 36, 26, .5); scroll-margin-top: 120px; }
.bookpanel > * + * { margin-top: 12px; }
.bookpanel h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 16px; }
.bookpanel h2 span { color: var(--ink-2); font: 600 14px var(--font); }
.bp-price { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bp-price b { font: 700 30px/1 var(--head); }
.bp-price span { color: var(--ink-2); }
.bp-sum { padding: 10px 12px; border-radius: var(--radius); background: var(--soft); font-size: 14.5px; }
.bp-fine { color: var(--ink-2); font-size: 13px; text-align: center; }
.days { display: flex; gap: 8px; min-width: 0; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.dayb { display: grid; justify-items: center; flex: none; width: 62px; padding: 8px 0 7px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); line-height: 1.2; cursor: pointer; }
.dayb small, .dayb em { font-size: 12px; font-style: normal; color: var(--ink-2); }
.dayb b { font: 700 20px/1.2 var(--head); }
.dayb:disabled { background: var(--soft); border-style: dashed; cursor: not-allowed; }
.dayb:disabled b { color: #8a8176; }
.dayb.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.dayb.is-active small, .dayb.is-active em { color: #fff; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { display: grid; place-content: center; justify-items: center; min-height: 46px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font-weight: 700; line-height: 1.2; cursor: pointer; }
@media (hover: hover) { .slot:hover:not(:disabled) { border-color: var(--accent); } }
.slot.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot:disabled { background: var(--soft); border-style: dashed; color: #6f675c; font-weight: 500; cursor: not-allowed; }
.slot small { font-size: 12px; font-weight: 500; }
.ticks { display: grid; gap: 8px; }
.ticks li { display: flex; gap: 9px; }
.ticks .icon { color: var(--ok); margin-top: 3px; }
.plain { display: grid; gap: 8px; }
ul.plain li { padding-left: 15px; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 0; top: .65em; width: 5px; height: 5px; border-radius: 9px; background: var(--ink-2); }
ul.rowsline li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
ul.rowsline li::before { display: none; }
.reviews { display: grid; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; padding-top: 0; }
.review > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; }
.review > div:first-child > span:last-child { color: var(--ink-2); font-size: 13px; }
.review p { margin-top: 5px; }
.review .reply { padding: 8px 12px; border-radius: var(--radius); background: var(--soft); font-size: 14.5px; }
.review > .btn { margin-top: 8px; }
.rev-admin { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.profile-head { display: flex; gap: 18px; align-items: center; }
.profile-head p { margin-top: 6px; max-width: 62ch; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 20px; }
.main > .facts { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.facts dt { color: var(--ink-2); font-size: 13px; }
.facts dd { font-weight: 600; overflow-wrap: anywhere; }

/* Rows of bookings, to do items and the agenda */
.blist, .todo { display: grid; gap: 10px; }
.blist a, .todo a { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; }
.blist a:hover, .todo a:hover { border-color: var(--accent); }
.thumb { flex: none; width: 92px; height: 62px; object-fit: cover; border-radius: var(--radius); }
.todo .thumb { width: 58px; height: 58px; }
.todo-ico { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: var(--radius); background: var(--accent-tint); color: var(--accent-dark); }
.blist-main { display: grid; flex: 1; min-width: 0; line-height: 1.38; }
.blist-main b { font: 600 16.5px/1.3 var(--head); }
.blist-main small { color: var(--ink-2); font-size: 13.5px; }
.blist-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.tight .blist a { flex-wrap: wrap; }
.tight .blist .thumb { display: none; }
.dayhead { font-size: 14.5px; color: var(--ink-2); }
.agenda { display: grid; }
.card .dayhead + .agenda { margin-top: 2px; }
.agenda a { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.agenda time { font-weight: 700; font-size: 14px; }
.agenda span:nth-child(2) { display: grid; line-height: 1.3; }
.agenda small { color: var(--ink-2); }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.toolbar select { min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); }
.tabs[role="group"].cats { padding: 0; }
.tabs:not(.cats):not(.days):not(.topnav) { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; min-height: 38px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-weight: 700; cursor: pointer; }
.tab b { margin-left: 3px; font-weight: 500; opacity: .75; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--soft); color: var(--ink-2); font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfbf7; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats > div { padding: 14px 18px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { color: var(--ink-2); font-size: 14px; }
.stats dd { font: 700 27px/1.25 var(--head); font-variant-numeric: tabular-nums; }
.stats small { color: var(--ink-2); font-size: 13px; }
.weekchart .xc { --xc-h: 200px; }

/* Booking detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.track li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.track li + li::before { content: ""; position: absolute; top: 15px; right: calc(50% + 20px); width: calc(100% - 40px); height: 3px; border-radius: 3px; background: var(--line); }
.track li.is-done + li::before { background: var(--accent); }
.track i { display: grid; place-items: center; width: 33px; height: 33px; border: 2px solid var(--line-2); border-radius: 99px; background: var(--surface); font-style: normal; font-weight: 700; }
.track li.is-done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.track li.is-now i { border-color: var(--accent); color: var(--accent-dark); box-shadow: 0 0 0 4px var(--accent-tint); }
.track li.is-now, .track li.is-done { color: var(--ink); }
.nextstep { padding: 14px 16px; border-radius: var(--radius); background: var(--soft); }
.nextstep .actions { margin-top: 12px; }
.closed-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-tint); color: #5c2500; }
.closed-note .icon { margin-top: 3px; }
.quote { padding: 10px 14px; border-radius: var(--radius); background: var(--soft); }
.history li { display: grid; padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; line-height: 1.35; }
.history li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 99px; background: var(--accent); }
.history b { font-weight: 600; }
.history span { color: var(--ink-2); font-size: 13px; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ledger dd { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger .total { border-bottom: 0; border-top: 2px solid var(--ink); font-size: 17px; }
.ledger.sum { max-width: 440px; margin-left: auto; }
.balance { display: flex; gap: 8px; padding: 9px 12px; border-radius: var(--radius); font-weight: 700; font-size: 14.5px; }
.balance.ok { background: var(--ok-tint); color: var(--ok); }
.balance.bad { background: var(--danger-tint); color: var(--danger); }

/* Messages */
.thread { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; }
.thread li { justify-self: start; max-width: 86%; }
.thread li p { padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--soft); overflow-wrap: anywhere; }
.thread li.is-mine { justify-self: end; text-align: right; }
.thread li.is-mine p { border-radius: 14px 14px 4px 14px; background: var(--accent-tint); text-align: left; }
.thread small { color: var(--ink-2); font-size: 12.5px; }
.composer { display: flex; flex-wrap: wrap; gap: 8px; }
.composer input { flex: 1; min-width: 0; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); }
.composer .error { flex-basis: 100%; }
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.threads { display: grid; gap: 6px; }
.threads a { display: flex; gap: 12px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; }
.threads a.is-active { border-color: var(--accent); background: var(--accent-tint); }
.threads .thumb { width: 52px; height: 52px; }
.threads span { display: grid; min-width: 0; line-height: 1.35; }
.threads small, .threads em { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--ink-2); }
.threads em { font-style: normal; color: var(--ink); }
.pane { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.pane > * + * { margin-top: 14px; }
.pane-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pane-head h2 { font-size: 19px; }
.pane-head p { color: var(--ink-2); font-size: 14px; }
.pane .thread { min-height: 220px; align-content: start; max-height: 52vh; }

/* Forms */
.field { display: grid; gap: 4px; min-width: 0; font-weight: 700; font-size: 14px; }
.field > span em, .field legend em { font-style: normal; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); font-weight: 500; font-size: 15px; }
.field textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { color: var(--danger); font-weight: 700; font-size: 13.5px; }
.error:empty { display: none; }
.form-error { padding: 10px 12px; border-radius: var(--radius); background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
form[data-hours] > * + *, .offform > * + * { margin-top: 12px; }
form[data-hours] legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.daychecks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.daychecks label, .starpick label { position: relative; cursor: pointer; }
.daychecks input, .starpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.daychecks span, .starpick span { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius); font-weight: 700; font-size: 13.5px; }
.daychecks input:checked + span, .starpick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.daychecks input:focus-visible + span, .starpick input:focus-visible + span { outline: 3px solid #1f6fd6; outline-offset: 2px; }
.starpick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.starpick .icon { width: 15px; height: 15px; }
.offlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.offlist span { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week7 li { display: grid; justify-items: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; line-height: 1.3; }
.week7 b { font: 700 24px/1.25 var(--head); }
.week7 small, .week7 span { color: var(--ink-2); font-size: 12.5px; }
.week7 .is-closed { background: var(--soft); border-style: dashed; }
.checks li { border-bottom: 1px solid var(--line); }
.checks label { display: flex; gap: 12px; align-items: center; min-height: 46px; cursor: pointer; }
.checks input { width: 20px; height: 20px; accent-color: var(--accent); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); text-align: center; }
.empty > .icon { width: 30px; height: 30px; color: var(--ink-2); }
.empty h1, .empty h3 { font-size: 21px; }
.empty p { color: var(--ink-2); max-width: 46ch; }

/* Popups */
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); cursor: pointer; flex: none; }
dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radius-lg); color: var(--ink); background: var(--surface); overflow: hidden; box-shadow: 0 30px 70px -20px rgba(44, 36, 26, .55); }
dialog::backdrop { background: rgba(34, 28, 20, .58); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 20px; line-height: 1.2; }
.modal-body { min-height: 0; padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body > * + * { margin-top: 12px; }
.modal-foot { display: flex; flex: none; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal-note { color: var(--ink-2); }
.modal-note b { color: var(--ink); }
.recap { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--soft); }
.recap p { display: grid; line-height: 1.35; }
.recap span { font-size: 14px; color: var(--ink-2); }

.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: var(--radius); background: var(--navy); color: #fff; box-shadow: 0 12px 28px -12px rgba(44, 36, 26, .6); }
.toast .icon { margin-top: 2px; color: #a5dcac; }
.toast.is-warn .icon { color: #ffc760; }

/* Role choice */
.signin { max-width: 1040px; margin: 0 auto; padding: 44px 20px 64px; text-align: center; }
.signin h1 { margin-top: 30px; font-size: clamp(28px, 4vw, 38px); line-height: 1.12; }
.signin-sub { max-width: 56ch; margin: 8px auto 0; color: var(--ink-2); }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; text-align: left; }
.role { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.role:hover { border-color: var(--accent); transform: translateY(-2px); }
.role-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius); background: var(--accent-tint); color: var(--accent-dark); }
.role-icon .icon { width: 24px; height: 24px; }
.role-title { margin-top: 10px; font: 700 22px/1.2 var(--head); }
.role-name { color: var(--accent-dark); font-weight: 700; }
.role-short { display: none; }
.role-points { display: grid; gap: 7px; margin-top: 12px; color: var(--ink-2); }
.role-points > span { display: flex; gap: 8px; }
.role-points .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }

@media (max-width: 1180px) {
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat { grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .cat img { height: 100%; min-height: 62px; aspect-ratio: auto; }
  .userbtn-text { display: none; }
  .userbtn { padding-right: 8px; gap: 4px; }
  .top-in { gap: 14px; }
  .topnav a { padding: 0 10px; font-size: 14.5px; }
  .listing { grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
}
@media (max-width: 1060px) {
  .top-in { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
  .usermenu { margin-left: auto; }
  .topnav { order: 3; flex-basis: 100%; }
  .detail, .two, .two.wide-left { grid-template-columns: minmax(0, 1fr); }
  .stats, .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { border-top: 1px solid var(--line); }
  .searchhead { grid-template-columns: minmax(0, 1fr); }
  .inbox { grid-template-columns: 260px minmax(0, 1fr); }
  .browse { grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 900px) {
  .listing { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .bookpanel { grid-column: 1; grid-row: auto; }
  .roles { grid-template-columns: minmax(0, 1fr); }
}
/* Loading placeholder shown while a screen opens */
.page-skel { display: grid; grid-column: 1 / -1; align-content: start; gap: 14px; width: 100%; min-width: 0; padding: 2px; }
.page-skel i { display: block; height: 96px; border-radius: var(--radius-lg, 8px); background: linear-gradient(90deg, rgba(100, 112, 128, .13) 25%, rgba(100, 112, 128, .05) 50%, rgba(100, 112, 128, .13) 75%); background-size: 200% 100%; animation: skel-shimmer 1s linear infinite; }
.page-skel .sk-title { width: min(280px, 70%); height: 30px; }
.page-skel .sk-line { width: min(420px, 90%); height: 14px; }
.page-skel > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-skel .sk-block { height: 280px; }
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) { .page-skel > div { grid-template-columns: minmax(0, 1fr); } .page-skel > div i { height: 68px; } }
.page-in > * { animation: page-in .3s ease-out both; }
@keyframes page-in { from { opacity: 0; } }
.page-skel.is-flush { box-sizing: border-box; padding: 22px 24px; }
.btn-primary:disabled { opacity: 1; background: var(--soft); border-color: var(--line-2); color: #6f675c; }
