:root {
  color-scheme: dark;
  --bg: #101019;
  --surface: #161621;
  --raised: #1a1a27;
  --line: #2b2a3b;
  --text: #f3f0f8;
  --subtle: #b6b1c6;
  --muted: #9791a9;
  --accent: #e4afd3;
  --button: #e6b1d5;
  --ink: #2a1727;
  --font: Inter, "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }

.topbar { border-bottom: 1px solid #262535; background: #13131e; }
.topbar-inner { width: min(1240px, calc(100% - 72px)); min-height: 72px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; gap: 12px; align-items: center; justify-self: start; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; color: #291a30; background: linear-gradient(145deg, #f0bedb, #c6a5ed); border: 1px solid #e2b4da; border-radius: 10px; }
.brand-mark .icon { width: 20px; height: 20px; }
.tabs { display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #10101a; }
.tabs a { min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; padding: 0 16px; color: var(--subtle); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tabs .icon { width: 15px; height: 15px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { border-color: #393047; background: #272135; color: #f1cae6; }
.connection { display: flex; align-items: center; justify-self: end; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.connection > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #b4a2c8; }
.connection[data-state="ready"] > span:first-child { background: #82c5ad; box-shadow: 0 0 10px #82c5ad40; }
.connection[data-state="error"] > span:first-child { background: #ea99a8; }

.shell { width: min(1240px, calc(100% - 72px)); margin: 32px auto 56px; }
.hero { min-height: 300px; position: relative; isolation: isolate; overflow: hidden; border: 1px solid #383047; border-radius: 17px; background: linear-gradient(112deg, #1e192c 3%, #1b1a2e 53%, #241a35 100%); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #221b2e00 34%, #1a172500 79%, #25203435); pointer-events: none; }
.hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; }
.hero-antibody {
  position: absolute;
  z-index: -1;
  top: 51%;
  left: 76.6%;
  width: min(41%, 340px);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 16px #a46dd633);
  pointer-events: none;
}
.hero-copy { padding: 36px 43px 31px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #e0acce; font: 600 10px/1.4 Inter, "Segoe UI", sans-serif; letter-spacing: .22em; }
.eyebrow span { width: 16px; height: 1px; background: currentColor; }
.hero h1 { margin: 10px 0 7px; font-size: clamp(41px, 5vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1.23; }
.hero h1 span { color: #edbcdb; background: linear-gradient(135deg, #f4c5dc, #c6a9f2); background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy > p { color: #ccc4d9; font-size: 14px; letter-spacing: .025em; }
.stats { display: flex; width: max-content; max-width: 100%; gap: 28px; margin-top: 26px; border-top: 1px solid #473753; padding-top: 13px; }
.stats div + div { border-left: 1px solid #43354f; padding-left: 27px; }
.stats dt { font: 650 26px/1.15 Inter, "Segoe UI", sans-serif; color: #f2e9f8; font-variant-numeric: tabular-nums; }
.stats dd { margin-top: 4px; color: #b6abc8; font-size: 11px; white-space: nowrap; }

.browser-layout { display: grid; grid-template-columns: 251px minmax(0, 1fr); align-items: start; gap: 24px; margin-top: 24px; }
.category-panel, .collection, .upload-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.category-panel { padding: 19px 13px 14px; }
.category-panel > h2 { color: var(--subtle); font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 0 10px 12px; }
.drag-hint { padding: 0 10px 9px; color: var(--muted); font-size: 11px; }
.category-group { display: flex; align-items: center; gap: 2px; }
.category-menu { display: grid; gap: 3px; }
.category, .subcategory, .expand { background: transparent; border: 1px solid transparent; border-radius: 8px; }
.category { min-width: 0; min-height: 41px; padding: 0 7px; width: 100%; display: flex; text-align: left; align-items: center; gap: 9px; color: #d1ccdf; font-size: 13px; }
.category .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category .count, .subcategory .count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.topic-icon { width: 24px; height: 25px; flex: 0 0 24px; background: color-mix(in srgb, var(--topic, #d6afee) 13%, transparent); border-radius: 6px; color: var(--topic, #d6afee); }
.topic-icon .icon { width: 15px; height: 15px; }
[data-color="mauve"] { --topic: #e6a9d2; }
[data-color="violet"] { --topic: #bda8ef; }
[data-color="blue"] { --topic: #9bb9f1; }
[data-color="teal"] { --topic: #8dcdbd; }
[data-color="orange"] { --topic: #e6b18c; }
[data-color="rose"] { --topic: #e8a4ab; }
.category:hover, .subcategory:hover, .expand:hover { background: #211f2d; color: var(--text); }
.category[aria-pressed="true"], .subcategory[aria-pressed="true"] { border-color: #493552; background: #2b2237; color: #f3cce9; font-weight: 650; }
.category[aria-pressed="true"] .count, .subcategory[aria-pressed="true"] .count { color: #e0b8d8; }
.expand { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 32px; padding: 0; color: var(--muted); }
.expand .icon { width: 13px; height: 13px; }
.expand[aria-expanded="true"] .icon { transform: rotate(90deg); }
.subcategory-menu { border-left: 1px solid #353045; margin: 2px 15px 6px 20px; padding-left: 8px; display: grid; gap: 2px; }
.subcategory { width: 100%; display: flex; align-items: center; gap: 5px; text-align: left; padding: 6px 7px; min-height: 30px; color: #bdb6cb; font-size: 11px; }
.subcategory.drop-target { border-style: dashed; border-color: #593d60; }
.subcategory.drop-over { border-color: var(--accent); background: #382945; color: var(--text); }

.collection { min-height: 424px; }
.collection-header { padding: 23px 25px 19px; border-bottom: 1px solid var(--line); }
.heading-line, .upload-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.heading-line h2, .upload-header h2 { font-size: 23px; font-weight: 750; letter-spacing: .025em; }
.heading-line p, .upload-header p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; font-size: 12px; font-weight: 700; white-space: nowrap; border-radius: 8px; border: 1px solid transparent; cursor: pointer; }
.button .icon { width: 16px; height: 16px; }
.primary { background: var(--button); color: var(--ink); border-color: #efbfde; }
.primary:hover { background: #f2cae4; }
.primary:disabled { opacity: .65; cursor: wait; }
.secondary { border-color: #3a324a; color: #e9c4e3; background: #231e30; }
.secondary:hover { background: #30243c; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 18px; }
.search, .sort { display: flex; align-items: center; gap: 8px; min-height: 39px; border: 1px solid var(--line); border-radius: 8px; background: #11111c; color: var(--muted); padding: 0 11px; }
.search:focus-within, .sort:focus-within { border-color: #be87b8; }
.search .icon, .sort .icon { width: 15px; height: 15px; }
.search input, .sort select { width: 100%; background: transparent; border: 0; min-height: 36px; color: var(--text); outline: 0; font-size: 12px; }
input::placeholder { color: var(--muted); opacity: 1; }
.sort select { min-width: 70px; padding-right: 17px; color: var(--subtle); }
.select-wrap { position: relative; display: flex; }
.select-wrap select { appearance: none; }
.select-wrap .chevron { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
option { background: #1d1b29; color: var(--text); }
.empty { min-height: 268px; padding: 31px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 56px; height: 56px; margin-bottom: 14px; border: 1px solid #42354f; border-radius: 15px; color: #cfabd9; background: radial-gradient(circle at 25% 10%, #372a46, #221e31 74%); box-shadow: 0 0 0 6px #242034, 0 12px 30px #100d19; }
.empty-icon .icon { width: 25px; height: 25px; }
.empty h3 { font-size: 16px; letter-spacing: .025em; }
.empty p { margin: 5px 0 15px; color: var(--muted); font-size: 12px; }
.empty .button { min-height: 34px; }
.notice { margin: 13px 25px 0; padding: 9px 12px; border: 1px solid #39564e; border-radius: 8px; color: #aee0cd; background: #20302d; font-size: 12px; }
.notice[data-error] { border-color: #694050; color: #f0a8b8; background: #33232f; }
.paper-list { margin: 0; padding: 0 25px; list-style: none; }
.paper { padding: 17px 0; display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; }
.paper + .paper { border-top: 1px solid var(--line); }
.paper-icon { width: 38px; height: 44px; border: 1px solid #3d324b; background: #272035; border-radius: 8px; color: #d5b2e1; }
.paper-icon { display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: grab; }
.paper-icon::before { content: "⠿"; position: absolute; left: -11px; color: var(--muted); }
.paper.is-dragging { opacity: .55; }
.paper-icon:active { cursor: grabbing; }
.paper-title { font-size: 15px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.paper-title a:hover { color: var(--accent); }
.paper-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; margin-top: 6px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.tag { font-weight: 600; color: var(--topic, var(--subtle)); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.paper-actions .button { min-height: 32px; padding: 0 8px; }

.upload-panel { margin: 24px auto 0; max-width: 874px; }
.upload-header { padding: 23px 27px; border-bottom: 1px solid var(--line); }
form { padding: 25px 27px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 16px; }
.field { font-size: 12px; font-weight: 650; }
.field input, .field select { display: block; width: 100%; min-height: 42px; border: 1px solid #343044; border-radius: 8px; margin-top: 6px; padding: 0 11px; background: #11111c; color: var(--text); font-weight: 400; }
.field select { padding-right: 28px; }
.field select:disabled { opacity: .65; cursor: default; }
.field .chevron { margin-top: 3px; }
.required { color: #ecabd1; }
.optional, .helper { color: var(--muted); font-size: 11px; font-weight: 400; }
.optional { margin-left: 3px; }
.source { margin: 23px 0 0; padding: 0; border: 0; min-width: 0; }
.source legend { font-size: 12px; font-weight: 650; padding: 0; margin-bottom: 8px; }
.source-options { display: flex; gap: 8px; margin-bottom: 12px; }
.source-options label { position: relative; }
.source-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.source-options label > span { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--subtle); }
.source-options .icon { width: 15px; height: 15px; }
.source-options input:checked + span { color: #f2c6e4; background: #2b2136; border-color: #593d60; }
.source-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 5px; min-height: 141px; border: 1px dashed #4e405b; border-radius: 10px; padding: 19px 10px; text-align: center; background: #171421; overflow-wrap: anywhere; }
.dropzone:is(:hover, :focus-within, .dragging) { border-color: #deaad6; background: #20192c; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone label { font-weight: 650; }
.dropzone p { color: var(--muted); font-size: 11px; }
.drop-icon { width: 33px; height: 33px; margin-bottom: 3px; background: #2f223a; color: #e2b4db; border-radius: 8px; }
.text-button { padding: 5px 0; margin-top: 3px; border: 0; background: none; color: var(--accent); font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.helper { margin-top: 6px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 17px; }
.form-message { color: var(--subtle); font-size: 12px; }
.form-message[data-error] { color: #f0a8b8; }
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 28%, #272038, var(--bg) 65%); }
.login-panel { width: min(100%, 420px); border: 1px solid #433751; border-radius: 14px; background: var(--surface); box-shadow: 0 16px 65px #0b091866; }
.login-panel h1 { font-size: 24px; font-weight: 750; }
#edit-dialog { width: min(580px, calc(100% - 28px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid #433751; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 16px 65px #0b0918bb; }
#edit-dialog::backdrop { background: #0b0917b8; }
.workstation-dialog { width: min(480px, calc(100% - 28px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid #433751; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 16px 65px #0b0918bb; }
.workstation-dialog::backdrop { background: #0b0917b8; }
#delete-description { margin-bottom: 14px; color: var(--subtle); overflow-wrap: anywhere; }
.danger { border-color: #62404d; background: #34212d; color: #f5bed0; }
.danger:hover { background: #4a2a39; }
.danger:disabled { opacity: .65; cursor: wait; }
.reimbursement-delete { justify-self: start; }
.wide-field { grid-column: 1 / -1; }
.journal-panel { margin-top: 24px; }
.journal-search { margin-top: 16px; max-width: 450px; }
.journal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 9px; margin: 0; padding: 20px 25px 25px; list-style: none; }
.journal-link { height: 100%; min-height: 65px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #191824; }
a.journal-link:hover { border-color: #5c466a; background: #241e32; color: var(--accent); }
.journal-pending { grid-template-columns: 1fr; gap: 0; }
.journal-name { display: block; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.journal-host { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.journal-link .icon { width: 15px; height: 15px; color: var(--accent); }
.journal-empty { color: var(--muted); padding: 0 25px 24px; }

.reimbursement-panel { max-width: 874px; margin-inline: auto; }
#toggle-reimbursement-form[aria-expanded="true"] .icon { transform: rotate(45deg); }
#reimbursement-form { border-bottom: 1px solid var(--line); }
.selected-invoices { margin: 9px 0 0; padding-left: 22px; color: var(--subtle); font-size: 12px; overflow-wrap: anywhere; }
.reimbursement-list { display: grid; gap: 10px; margin: 0; padding: 17px clamp(17px, 3vw, 25px) 23px; list-style: none; }
.reimbursement-list:empty { padding: 0; }
.completed-reimbursements { border-top: 1px solid var(--line); }
.completed-reimbursements > summary { display: flex; align-items: center; gap: 10px; padding: 15px clamp(17px, 3vw, 25px); cursor: pointer; list-style: none; }
.completed-reimbursements > summary::-webkit-details-marker { display: none; }
.completed-reimbursements > summary span { color: var(--muted); font-size: 12px; }
.completed-reimbursements > summary [data-icon] { margin-left: auto; }
.completed-reimbursements[open] > summary [data-icon] { transform: rotate(180deg); }
.completed-reimbursements .record-empty { padding: 0 clamp(17px, 3vw, 25px) 17px; }
.completed-reimbursements .reimbursement-list { padding-top: 0; }
.reimbursement-message:not(:empty) { margin: 14px clamp(17px, 3vw, 25px) 0; }
.reimbursement-retry { margin: 4px clamp(17px, 3vw, 25px); }
.reimbursement-empty { min-height: 244px; }
.reimbursement-item { border: 1px solid var(--line); border-radius: 9px; overflow: clip; background: var(--raised); }
.reimbursement-item summary { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 13px; cursor: pointer; list-style: none; }
.reimbursement-item summary::-webkit-details-marker { display: none; }
.reimbursement-item summary:hover { background: #231e30; }
.reimbursement-item summary:focus-visible { outline-offset: -3px; }
.reimbursement-item summary > [data-icon] { color: var(--accent); }
.reimbursement-item summary > .icon:last-child { width: 15px; height: 15px; color: var(--muted); }
.reimbursement-item[open] summary > .icon:last-child { transform: rotate(180deg); }
.reimbursement-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reimbursement-invoice-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.reimbursement-details { display: grid; gap: 14px; padding: 15px; border-top: 1px solid var(--line); background: var(--surface); }
.reimbursement-fields { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.reimbursement-fields dt { color: var(--muted); font-size: 12px; }
.reimbursement-fields dd { margin-top: 3px; overflow-wrap: anywhere; }
.invoice-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.invoice-row { display: flex; gap: 8px; align-items: center; min-height: 39px; }
.invoice-preview { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; color: var(--accent); overflow-wrap: anywhere; }
.invoice-preview:hover { text-decoration: underline; }
.reimbursement-complete { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--subtle); cursor: pointer; }
.reimbursement-complete input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: inherit; }
.reimbursement-complete:has(:disabled) { opacity: .6; cursor: wait; }

.announcement-board { margin-bottom: 16px; border: 1px solid #44334f; border-radius: 12px; background: #1b1726; }
.announcement-board summary { display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 10px 17px; list-style: none; cursor: pointer; }
.announcement-board summary::-webkit-details-marker { display: none; }
.announcement-board summary [data-icon] { color: var(--accent); }
.announcement-board summary [data-icon]:last-child { margin-left: auto; }
#announcement-board[open] summary [data-icon]:last-child { transform: rotate(180deg); }
#announcement-board[open] + #pinned-announcements { display: none; }
#announcement-count { color: var(--muted); font-size: 12px; }
.announcement-content, #pinned-announcements { padding: 0 17px 13px; }
.announcement-list, .record-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.announcement-content > a { margin-bottom: 10px; }
.announcement-item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border: 1px solid #3e304b; border-radius: 8px; background: #231c30; }
.announcement-copy { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.announcement-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.pinned-label { color: var(--accent); border: 1px solid #65486b; border-radius: 4px; padding: 0 5px; }
#announcement-form { display: grid; gap: 8px; justify-items: start; margin-bottom: 11px; padding: 0; }
#announcement-form .field { width: 100%; }
.field textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 11px; border: 1px solid #343044; border-radius: 8px; background: #11111c; color: var(--text); font: inherit; font-weight: 400; resize: vertical; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); gap: 14px; margin-top: 20px; }
.workspace-card { display: flex; align-items: center; gap: 13px; min-height: 99px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.workspace-card:hover { border-color: #775982; background: #231d2d; }
.workspace-card [data-icon]:last-child { margin-left: auto; color: var(--muted); }
.workspace-card h2 { font-size: 17px; }
.workspace-card p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.workspace-symbol { width: 41px; height: 41px; flex: 0 0 auto; border-radius: 10px; color: var(--accent); background: #30253a; }
.literature-tabs { width: fit-content; max-width: 100%; margin: 15px 0 0; }
.workspace-form { border-bottom: 1px solid var(--line); }
.workspace-list { padding: 16px clamp(16px, 3vw, 25px) 23px; }
.workspace-list h3 { margin-bottom: 7px; font-size: 15px; }
.workspace-list .form-message:not(:empty), #announcement-message:not(:empty) { margin-bottom: 8px; }
.record-card, .booking-row { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.record-summary { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 13px; cursor: pointer; overflow-wrap: anywhere; }
.record-summary .money { color: var(--accent); white-space: nowrap; }
.record-info { display: grid; gap: 12px; padding: 12px 13px; border-top: 1px solid var(--line); }
.record-info dd { white-space: pre-wrap; }
.record-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.record-actions .button { min-height: 32px; }
.record-actions a { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.record-empty { padding: 9px 4px; color: var(--muted); font-size: 13px; }
.booking-status { margin: 14px clamp(16px, 3vw, 25px) 0; }
.booking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 12px; padding: 12px clamp(16px, 3vw, 25px) 23px; }
.booking-group { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.booking-group h3 { margin-bottom: 8px; font-size: 15px; }
.booking-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px; padding: 9px; }
.booking-row-copy { min-width: 0; flex: 1 1 172px; overflow-wrap: anywhere; }
.booking-time, .booking-details { color: var(--subtle); font-size: 12px; }
.booking-details { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.booking-details > div { display: flex; flex-wrap: wrap; gap: 4px; }
.booking-details dt { color: var(--muted); }
.slot-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; padding: 0; margin: 0; border: 0; }
.slot-fields legend { font-size: 12px; font-weight: 650; }

@media (max-width: 625px) {
  #hero-heading { font-size: clamp(26px, 7.6vw, 39px); }
}

@media (hover: none) {
  .drag-hint, .paper-icon::before { display: none; }
}

@media (max-width: 850px) {
  .topbar-inner, .shell { width: calc(100% - 40px); }
  .browser-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 14px; }
  .collection-header { padding-inline: 17px; }
  .paper-list { padding-inline: 17px; }
  .paper { grid-template-columns: auto minmax(0, 1fr); }
  .paper-actions { grid-column: 2; }
}

@media (max-width: 625px) {
  .topbar-inner, .shell { width: calc(100% - 28px); }
  .topbar-inner { min-height: 63px; grid-template-columns: 1fr auto; gap: 8px; }
  .connection { display: none; }
  .brand { font-size: 12px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; border-radius: 7px; }
  .brand-mark .icon { width: 17px; height: 17px; }
  .tabs a { font-size: 11px; min-height: 30px; padding-inline: 7px; gap: 4px; }
  .tabs .icon { width: 13px; height: 13px; }
  .shell { margin-top: 17px; }
  .hero { min-height: 245px; }
  .hero-antibody { left: 80%; width: min(37%, 175px); opacity: .46; }
  .hero-copy { padding: 27px 18px 22px; }
  .hero h1 { font-size: 39px; }
  .hero-copy > p { font-size: 12px; }
  .stats { margin-top: 19px; gap: 15px; }
  .stats div + div { padding-left: 15px; }
  .stats dt { font-size: 23px; }
  .browser-layout { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .category-panel { padding: 11px; }
  .category-panel > h2 { padding-bottom: 6px; }
  .category-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .category-menu > .category { grid-column: 1 / -1; }
  .category { font-size: 12px; }
  .category .count { display: none; }
  .upload-panel { margin-top: 14px; }
  .journal-panel { margin-top: 14px; }
  .journal-list { padding: 14px 17px 17px; }
  .upload-header, form { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .empty { min-height: 235px; }
}

@media (max-width: 440px) {
  .topbar-inner { grid-template-columns: 1fr; gap: 9px; padding: 12px 0; }
  .tabs a { flex: 1; }
}

.site-icp { padding: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.site-icp a:hover { text-decoration: underline; }
.login-page .site-icp { position: absolute; bottom: 0; }
