@font-face {
  font-family: "DM Sans";
  src: url(fonts/dm-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url(fonts/instrument-serif.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f3ed;
  --paper-light: #fcfaf5;
  --ink: #1c2930;
  --muted: #565e5f;
  --line: #d6d0c4;
  --accent: #963b27;
  --accent-light: #f4e1d6;
  --blueprint: #172a35;
  --drawing-text: #f5ece1;
  --drawing-muted: #b8c6cb;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font: 15px/1.5 "DM Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #b95136; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p, dl, dd, ol { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.sheet { max-width: 1660px; margin: auto; padding-inline: clamp(22px, 4.25vw, 68px); }
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 73px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; letter-spacing: -.02em;
}
.project-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-head-text { min-width: 0; }
.project-title { font-family: inherit; font-size: 1rem; margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-details { font-size: .78rem; color: var(--muted); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-logo { height: 40px; max-width: 120px; width: auto; object-fit: contain; flex: none; }
.mark {
  display: block; width: 23px; height: 25px;
  background: var(--accent);
  clip-path: polygon(0 38%, 36% 38%, 36% 0, 100% 0, 100% 62%, 64% 62%, 64% 100%, 0 100%, 0 54%, 16% 54%, 16% 84%, 48% 84%, 48% 46%, 84% 46%, 84% 16%, 52% 16%, 52% 54%, 0 54%);
}
.navigation { display: flex; align-self: stretch; gap: 27px; }
.navigation button {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 2px 1px 0; font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.navigation button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.navigation button:hover { color: var(--accent); }
.present, .back {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid var(--line); border-radius: 5px;
  min-height: 42px; padding: 0 13px; font-size: 14px; font-weight: 700;
}
.present:hover, .back:hover { background: var(--paper-light); border-color: var(--accent); }
.fullscreen-icon {
  display: inline-block; flex: none;
  width: 14px; height: 14px;
  border: 1.5px solid currentColor;
  clip-path: polygon(0 0, 38% 0, 38% 30%, 62% 30%, 62% 0, 100% 0, 100% 38%, 72% 38%, 72% 62%, 100% 62%, 100% 100%, 62% 100%, 62% 72%, 38% 72%, 38% 100%, 0 100%, 0 62%, 30% 62%, 30% 38%, 0 38%);
}
.heading {
  display: flex; justify-content: space-between; align-items: end; gap: 22px;
  padding: clamp(27px, 4vw, 53px) 0 29px;
}
.eyebrow, .list-unit, .drawing-footer, th[scope="col"] {
  font-family: var(--mono); font-size: .73rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .095em;
}
.heading .eyebrow { color: var(--accent); }
.heading .eyebrow span { margin-inline: 4px; color: #887c70; }
h1 {
  font: 400 clamp(3.4rem, 6.2vw, 6.1rem)/.99 "Instrument Serif", Georgia, serif;
  letter-spacing: -.027em; margin: 9px 0 9px;
}
.subtitle { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.18rem); }
.issue { flex: none; text-align: right; padding-bottom: 2px; }
.issue-badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: #743522; background: var(--accent-light); border: 1px solid #e0c1b0;
  border-radius: 4px; padding: 5px 9px; font-weight: 700; font-size: .8rem;
}
.issue-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#issue-detail { font-size: .8rem; color: var(--muted); margin-top: 6px; }
body[data-section="import"] .present { display: none; }

.workspace {
  display: grid; grid-template-columns: minmax(184px, 232px) minmax(0, 1fr);
  gap: clamp(12px, 1.55vw, 24px);
  align-items: stretch;
}
.floor-panel, .metrics, .photo-panel { background: var(--paper-light); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.floor-panel { display: flex; flex-direction: column; min-height: 0; }
.panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  padding: 15px 14px; border-bottom: 1px solid var(--line);
}
.panel-heading h2 { font-size: .96rem; font-weight: 700; }
.list-unit { color: var(--muted); text-transform: none; }
.floor-list {
  list-style: none; padding: 5px 7px;
  overflow: auto; max-height: 450px;
  scrollbar-width: thin;
}
.floor-list li + li { border-top: 1px solid #eae5da; }
.floor-button {
  display: grid; grid-template-columns: 33px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 5px 6px;
  border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: left;
}
.floor-button:hover { background: #f1ede4; }
.floor-button[aria-current="true"] { background: var(--accent-light); border-color: #e0c1b0; color: #763824; }
.level-code {
  display: grid; place-items: center; min-height: 30px; padding: 2px;
  border: 1px solid #ded8cb; border-radius: 3px;
  color: var(--muted); font: 600 .76rem var(--mono);
}
.floor-button[aria-current="true"] .level-code { background: var(--accent); color: white; border-color: var(--accent); }
.level-name { font-size: .88rem; font-weight: 600; line-height: 1.2; }
.level-area { font: .73rem var(--mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.drawing {
  position: relative; display: flex; flex-direction: column;
  min-width: 0; min-height: max(491px, calc(100dvh - 250px));
  border: 1px solid #223e4c; border-radius: 6px;
  color: var(--drawing-text); background: var(--blueprint);
}
.drawing-header, .drawing-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 17px;
  background: #1c313d;
}
.drawing-header { border-bottom: 1px solid #3e535d; border-radius: 5px 5px 0 0; }
.drawing-header .eyebrow { color: var(--drawing-muted); }
.drawing-header h2 { font-size: 1.16rem; line-height: 1.2; margin-top: 3px; }
.view-switch {
  display: flex; gap: 3px; align-items: center;
  border: 1px solid #52646b; border-radius: 4px; padding: 3px;
}
.view-switch button {
  min-height: 34px; min-width: 53px; border-radius: 3px; border: 0;
  padding: 4px 8px; background: transparent; color: var(--drawing-muted); font-size: .85rem; white-space: nowrap;
}
.view-switch button[aria-pressed="true"] { color: #1e3139; background: #e4e4d9; font-weight: 700; }
.view-switch button:hover:not([aria-pressed="true"]) { color: white; background: #2a4350; }
.drawing-tools, .measure-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 5px 12px; padding: 6px 13px; background: #203642;
}
.drawing-tools { border-bottom: 1px solid #3e535d; }
.tool-group, .measure-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.tool-group button, .measure-actions button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 3px 7px; border: 1px solid transparent;
  border-radius: 3px; color: var(--drawing-muted); background: transparent; font-size: .79rem;
}
.tool-group button[aria-pressed="true"] {
  color: #e5efe7; border-color: #647a78; background: #304b50;
}
.tool-group button:hover, .measure-actions button:hover:not(:disabled) { color: #fff; background: #35525f; }
.tool-count {
  min-width: 16px; border-radius: 2px; padding-inline: 3px;
  color: #dce9e8; background: #102932; font: 10px/16px var(--mono); text-align: center;
}
.grid-icon {
  width: 12px; height: 12px; border: 1px solid currentColor;
  background: linear-gradient(90deg, transparent 45%, currentColor 45% 55%, transparent 55%),
    linear-gradient(transparent 45%, currentColor 45% 55%, transparent 55%);
}
.camera-icon {
  display: inline-grid; place-items: center; position: relative; width: 14px; height: 10px;
  border: 1px solid currentColor; border-radius: 2px;
}
.camera-icon::before { content: ""; position: absolute; width: 5px; height: 2px; background: currentColor; top: -3px; left: 2px; }
.camera-icon::after { content: ""; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
.drawing-stage {
  position: relative; flex: 1; min-height: 350px; isolation: isolate; overflow: hidden;
  background: #000;
}
.drawing-stage.is-stack {
  background-image:
    linear-gradient(to right, #a4c1ca10 1px, transparent 1px),
    linear-gradient(to bottom, #a4c1ca10 1px, transparent 1px),
    linear-gradient(to right, #a4c1ca0c 1px, transparent 1px),
    linear-gradient(to bottom, #a4c1ca0c 1px, transparent 1px),
    radial-gradient(ellipse at 48% 50%, #203947, #142630 80%);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px, 100% 100%;
  background-position: center;
}
.drawing-stage::before {
  content: ""; position: absolute; inset: 13px;
  border: 1px solid #849ea547; pointer-events: none;
}
#diagram { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#diagram.is-zoomed, #diagram.is-free { touch-action: none; }
#diagram.is-measuring { cursor: crosshair; }
#diagram.is-dragging { cursor: grabbing; }
#diagram.is-stack { cursor: pointer; }
.spot-layer { position: absolute; inset: 0; pointer-events: none; }
.spot-marker {
  display: grid; place-items: center; position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; padding: 0; min-width: 29px; height: 29px; border: 1px solid #b5e2e9;
  border-radius: 50%; color: #e4f7f9; background: #235569; font: 600 11px var(--mono);
  box-shadow: 0 0 0 2px #162b35;
}
.spot-marker:hover { background: #367287; }
.spot-marker[aria-pressed="true"] {
  z-index: 1; color: #0d3543; background: #b5e2e9; box-shadow: 0 0 0 2px #193c48, 0 0 0 4px #7bc0ce;
}
.spot-marker:focus-visible { outline-color: white; z-index: 2; }
.empty-drawing {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--drawing-muted); pointer-events: none; padding: 16px;
}
.zoom {
  display: flex; position: absolute; right: 18px; bottom: 18px;
  border: 1px solid #536a73; border-radius: 4px; background: #192e39;
}
.zoom button {
  display: grid; place-items: center; padding: 0;
  width: 39px; height: 39px; border: 0; background: transparent; font-size: 1.2rem;
}
.zoom button + button { border-left: 1px solid #536a73; }
.zoom button:hover:not(:disabled) { background: #304a56; }
.measure-bar { border-top: 1px solid #526a70; }
#measure-readout { color: #d1eee4; font-size: .79rem; font-weight: 600; }
.measure-actions button { border-color: #526a70; min-height: 28px; }
#measure-finish:not(:disabled) { color: #e5f8ef; border-color: #84b2a2; }
.drawing-footer { border-top: 1px solid #3e535d; border-radius: 0 0 5px 5px; color: var(--drawing-muted); }
.legend { display: flex; align-items: center; gap: 8px; color: var(--drawing-text); }
.legend > span:first-child { width: 17px; height: 10px; border: 1.5px solid #f0aa8d; background: #cb735f42; }
#drawing-note { text-align: right; }

.viewer-stash { display: none; }
.metrics { display: flex; flex-direction: column; }
.floor-metric, .building-metric { padding: clamp(14px, 1.65vw, 24px); }
.floor-metric .eyebrow { color: var(--accent); }
.metric-number, .total-number {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400; line-height: .98; letter-spacing: -.015em; font-variant-numeric: lining-nums tabular-nums;
}
.metric-number { margin: 13px 0 10px; font-size: clamp(2.7rem, 4.35vw, 4.5rem); }
.unit { font: 600 .9rem/1 "DM Sans", sans-serif; letter-spacing: 0; color: var(--muted); margin-left: 5px; white-space: nowrap; }
.metric-level { font-weight: 700; margin-bottom: 2px; }
.metric-detail { color: var(--muted); font-size: .88rem; }
.building-metric { border-top: 1px solid var(--line); margin-top: auto; }
.building-metric .eyebrow { color: var(--muted); }
.total-number { font-size: clamp(2rem, 2.8vw, 3rem); margin: 10px 0 7px; }
.schedule-link {
  border: 0; background: transparent; padding: 0; margin-top: 17px;
  color: var(--accent); font-size: .88rem; font-weight: 700; text-align: left;
}
.schedule-link:hover { text-decoration: underline; }
.schedule-link span { margin-left: 3px; }
.floor-total {
  position: sticky; bottom: 0; margin-top: auto;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px;
  padding: 10px 14px; border-top: 1px solid var(--line); background: var(--paper-light); border-radius: 0 0 6px 6px;
}
.floor-total-label { font-size: .88rem; font-weight: 700; }
.floor-total-area { font: 700 .88rem var(--mono); font-variant-numeric: tabular-nums; }
.floor-total .schedule-link { margin-top: 0; flex-basis: 100%; font-size: .8rem; }
.floor-stepper { display: flex; border-top: 1px solid var(--line); }
.floor-stepper button {
  flex: 1; border: 0; min-height: 47px; background: transparent; font-weight: 700; font-size: .86rem;
}
.floor-stepper button + button { border-left: 1px solid var(--line); }
.floor-stepper button:hover:not(:disabled) { background: var(--accent-light); }
.floor-stepper span { margin-inline: 3px; color: var(--accent); }

.photo-panel { display: flex; flex-direction: column; }
.photo-panel .panel-heading { padding-block: 9px; min-height: 52px; }
.panel-close {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px;
  background: transparent; font-size: 1.45rem; line-height: 1;
}
.panel-close:hover { background: var(--accent-light); }
.photo-panel-body { padding: 12px; }
#photo-spot-select {
  width: 100%; min-height: 37px; padding: 4px 6px; color: var(--ink);
  background: var(--paper-light); border: 1px solid var(--line); border-radius: 3px; font: 600 .83rem "DM Sans", sans-serif;
}
.photo-image-frame {
  aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; overflow: hidden;
  margin-top: 11px; background: #26363b; border-radius: 4px; color: white; font-size: .8rem;
}
#expand-photo { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; color: white; }
#expand-photo:focus-visible { outline-offset: -4px; outline-color: white; }
#spot-photo { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-expand { position: absolute; bottom: 8px; right: 8px; filter: drop-shadow(0 1px 2px #162326); }
.photo-sample {
  position: absolute; top: 7px; left: 7px; pointer-events: none; padding: 2px 5px; border-radius: 3px;
  background: #172a35ed; color: white; font-size: .68rem; font-weight: 700;
}
.photo-caption { padding-block: 10px; }
#photo-title { font-weight: 700; }
.photo-pager {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px;
  padding-top: 8px; border-top: 1px solid var(--line); text-align: center; font-size: .81rem;
}
.photo-pager button {
  width: 34px; min-height: 34px; background: transparent; border: 1px solid var(--line); border-radius: 3px;
}
.photo-pager button:hover:not(:disabled) { background: var(--accent-light); }
.photo-floor-gfa {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: auto; padding: 11px 13px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .82rem;
}
.photo-floor-gfa strong { color: var(--ink); }
.photo-floor-gfa .unit { font-size: .76rem; }
.photo-lightbox {
  width: min(92vw, 960px); max-height: 92dvh; padding: 12px; background: var(--paper-light);
  color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
}
.photo-lightbox::backdrop { background: #142630d9; }
.lightbox-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 9px; }
.lightbox-heading h2 { font-size: 1.05rem; }
#lightbox-image { display: block; width: 100%; max-height: 72dvh; object-fit: contain; background: #26363b; }
#lightbox-note { margin-top: 8px; font-size: .87rem; color: var(--muted); }

.schedule { padding: clamp(15px, 2.5vw, 31px); background: var(--paper-light); border: 1px solid var(--line); border-radius: 6px; }
.schedule-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.schedule-header h2 { font: 400 2.65rem/1.1 "Instrument Serif", Georgia, serif; }
.schedule-header p { font-size: .9rem; color: var(--muted); margin-top: 5px; }
.schedule table { border-collapse: collapse; width: 100%; }
.schedule td, .schedule th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.schedule thead, .schedule tfoot { background: #efeae0; }
.schedule td.numeric, .schedule th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.schedule tbody tr:has(button:hover) { background: #f5eee4; }
.schedule tbody button {
  display: inline-flex; align-items: center; gap: 11px; min-height: 36px;
  border: 0; background: transparent; padding: 0; font-weight: 600; text-align: left;
}
.schedule tbody button:hover { color: var(--accent); }
.schedule .level-code { min-width: 35px; }
.schedule tbody td:nth-child(2) { color: var(--muted); font-size: .9rem; }
.schedule tfoot { font-weight: 700; }

.page-footer {
  display: flex; justify-content: space-between; align-items: start; gap: 12px;
  padding: 15px 0 22px; color: var(--muted); font-size: .82rem;
}
.page-footer p { display: flex; align-items: center; gap: 7px; }
.info-icon {
  display: inline-grid; flex: none; place-items: center; width: 15px; height: 15px;
  border: 1px solid currentColor; border-radius: 50%; font: 700 10px/1 Georgia, serif;
}
kbd { padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-light); }
.keyboard-hint { white-space: nowrap; }
.sheet:has(#floor-viewer[hidden]) .keyboard-hint { display: none; }

.presenting .heading { padding-top: 20px; padding-bottom: 19px; }
.presenting .project-title { font-size: clamp(1.25rem, 2.2vw, 2rem); }
.presenting .subtitle { font-size: clamp(1.1rem, 1.8vw, 1.6rem); }
.presenting .drawing { min-height: max(491px, calc(100dvh - 280px)); }
.presenting .floor-list { max-height: max(450px, calc(100dvh - 348px)); }

@media (min-width: 841px) and (max-height: 800px) {
  .presenting .masthead { min-height: 56px; }
  .presenting .heading { padding: 8px 0 12px; }
  .presenting .page-footer { padding-block: 8px 9px; }
  .presenting .drawing-stage { min-height: 286px; }
  .presenting .floor-list { max-height: 436px; }
}

@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(165px, 200px) minmax(0, 1fr); }
  .floor-button { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 5px; }
}
@media (max-width: 840px) {
  .floor-total { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .floor-panel { grid-column: 1 / -1; }
  .panel-heading { padding: 8px 11px; }
  .floor-list { display: flex; gap: 5px; padding: 6px; }
  .floor-list li { flex: 1 0 auto; }
  .floor-list li + li { border: 0; }
  .floor-button { min-width: 122px; grid-template-columns: 28px 1fr; gap: 2px 6px; }
  .floor-button .level-code { grid-row: 1 / 3; }
  .level-area { text-align: left; }
  .drawing { min-height: 430px; }
  .drawing-stage { min-height: 320px; }
}
@media (max-width: 600px) {
  .sheet { padding-inline: 13px; }
  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo title account" "details details details" "tabs tabs present";
    min-height: 0; gap: 0 10px; padding-top: 9px; align-items: center;
  }
  .project-head, .project-head-text, .masthead .whoami { display: contents; }
  .project-logo { grid-area: logo; }
  .project-title { grid-area: title; font-size: clamp(16px, 4.5vw, 20px); line-height: 1.2; }
  .project-details { grid-area: details; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
  .account { grid-area: account; justify-self: end; }
  .navigation { grid-area: tabs; gap: 23px; min-height: 44px; }
  .present { grid-area: present; justify-self: end; width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .present-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body:not([data-section="viewer"]) .present { display: none; }
  .heading { align-items: start; flex-direction: column; gap: 12px; padding: 23px 0 17px; }
  .issue { text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  #issue-detail { margin: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .drawing, .presenting .drawing { min-height: 368px; }
  .drawing-stage { min-height: 259px; }
  .drawing-header, .drawing-footer { padding-inline: 11px; }
  .drawing-tools, .measure-bar { padding-inline: 8px; }
  .view-switch button { min-width: 39px; padding-inline: 5px; font-size: .78rem; }
  .spot-marker { min-width: 36px; height: 36px; }
  .photo-panel-body { width: 100%; max-width: 390px; margin-inline: auto; }
  .metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .building-metric { border: 0; border-left: 1px solid var(--line); margin: 0; }
  .floor-stepper { grid-column: 1 / -1; }
  .metric-number { font-size: 2.75rem; }
  .keyboard-hint { display: none !important; }
  .schedule-header { align-items: start; flex-direction: column; }
  .schedule td, .schedule th { padding-inline: 5px; }
  .schedule tbody button { gap: 5px; }
  .schedule .level-code { min-width: 26px; }
}

/* ---- W1a additions: sign-in pages, header user box, spot list, cell readout ---- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); background: var(--paper-light); border: 1px solid var(--line); padding: 28px 26px 24px; }
.auth-card h1 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
.auth-card p.lead { color: var(--muted); margin-bottom: 18px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.auth-card input { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.auth-card input:focus-visible { outline: 2px solid #b95136; outline-offset: 1px; }
.auth-card button.primary { margin-top: 18px; width: 100%; padding: 10px 12px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.auth-card .msg { margin-top: 12px; min-height: 1.4em; color: #8a2a18; font-size: 14px; }
.auth-card .alt { margin-top: 14px; font-size: 13px; }
.auth-card a { color: var(--accent); }
.auth-card .privacy { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.auth-card .code { font-family: var(--mono); font-size: 20px; letter-spacing: .06em; padding: 12px; margin: 14px 0; background: var(--accent-light); border: 1px dashed var(--accent); text-align: center; user-select: all; }
.whoami { display: flex; align-items: center; gap: 10px; justify-self: end; font-size: 13px; color: var(--muted); }
.account { position: relative; }
.account-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; max-width: 100%; }
.account-button:hover { background: var(--paper-light); border-color: var(--accent); }
.account-button #whoami-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); flex: none; }
.account-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 220px; background: var(--paper-light); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 8px 24px rgba(40, 30, 20, .14); padding: 6px; display: grid; }
.account-who { padding: 8px 10px 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.account-who strong { color: var(--ink); }
.account-menu button { min-height: 44px; text-align: left; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; font-size: 14px; color: var(--ink); }
.account-menu button:hover, .account-menu button:focus-visible { background: var(--accent-light); }
.account-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 4px; font-size: 14px; color: var(--ink); text-decoration: none; }
.account-menu a:hover, .account-menu a:focus-visible { background: var(--accent-light); }
.account-privacy { margin: 4px 0 0; padding: 8px 10px 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.4; }
.account-dialog { width: min(460px, calc(100vw - 26px)); border: 1px solid var(--line); background: var(--paper-light); color: var(--ink); padding: 18px 20px; }
.account-dialog::backdrop { background: rgba(30, 24, 18, .45); }
.account-dialog h2 { font-size: 1.1rem; margin-bottom: 8px; }
.account-dialog p { margin-bottom: 12px; }
.account-dialog .lightbox-heading { margin-bottom: 8px; }
.device-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.device-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.device-row div { display: grid; gap: 2px; min-width: 0; }
.device-row small { color: var(--muted); }
.device-row .btn, .dialog-actions .btn { min-height: 44px; padding-inline: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cell-readout { font-family: var(--mono); font-size: 12px; margin-left: 12px; }
.gfa-off .level-area { display: none; }

/* Spot upload (desktop) */
.upload-area { padding: 12px 16px; border-top: 1px solid var(--line, #2a3b44); display: grid; gap: 8px; }
.upload-drop { margin: 0; padding: 14px; border: 1px dashed var(--line, #2a3b44); border-radius: 6px; text-align: center; }
.photo-panel.drop-hot .upload-drop { border-color: #c2f5ff; background: rgba(194, 245, 255, 0.08); }
.spot-marker.drop-hot { outline: 2px solid #c2f5ff; }
.upload-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.upload-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.upload-card { display: grid; grid-template-columns: auto 48px 1fr auto; gap: 8px; align-items: center; padding: 4px; border-radius: 6px; }
.upload-card.selected { background: rgba(194, 245, 255, 0.1); }
.upload-card img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.upload-body { display: grid; gap: 2px; min-width: 0; font-size: 12px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-body progress { width: 100%; height: 6px; }
.upload-status.failed { color: #ff9b9b; }
.upload-actions { display: grid; gap: 4px; }

.btn { padding: 5px 11px; min-height: 30px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-light); font-size: .85rem; line-height: 1.2; }
.btn:hover:not(:disabled) { background: var(--accent-light); border-color: #e0c1b0; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: #7e2f1e; border-color: #7e2f1e; }
.upload-direction { display: grid; gap: 6px; padding-top: 4px; border-top: 1px solid var(--line); }
.dir-title { font-size: .82rem; font-weight: 700; }
.dir-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: nowrap; }
.compass { display: grid; grid-template-columns: repeat(3, 44px); grid-auto-rows: 32px; gap: 4px; flex: none; }
.compass-btn { padding: 0; min-height: 0; font-weight: 600; font-size: .8rem; }
.compass-clear { font-size: .66rem; font-weight: 500; color: var(--muted); }
.dir-side { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.dir-note { margin: 0; padding: 6px 9px; border-radius: 4px; background: #fbe6e1; border: 1px solid #e3b2a6; color: #7a2615; font-size: .82rem; }
.upload-status.paused { color: #8a5a00; }
.upload-status.dup { color: #1d5a73; }
.spot-marker[aria-pressed="true"] { cursor: crosshair; touch-action: none; }
.spot-marker.is-aiming { cursor: crosshair; }
