@font-face {
  font-family: "Monoton";
  src: url("/assets/fonts/monoton.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lexend;
  src: url("/assets/fonts/lexend.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Lexend Exa";
  src: url("/assets/fonts/lexend-exa.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  --bg: var(--atlas-ui-canvas);
  --paper: var(--atlas-ui-surface);
  --raised: var(--atlas-ui-surface-raised);
  --ink: var(--atlas-ui-text);
  --muted: var(--atlas-ui-text-muted);
  --faint: #95a4b1;
  --edge: var(--atlas-ui-border);
  --line: var(--atlas-ui-divider);
  --signal: var(--atlas-ui-action);
  --amber: var(--atlas-map-signal-unattributed, var(--atlas-map-window));
  --display: var(--atlas-typography-display);
  --mono: var(--atlas-typography-mono);
  --rad: var(--atlas-shape-control);
  --mast: 76px;
  --glass: #1b2937;
  --glass-rim: rgb(202 218 234 / 34%);
  --glass-shine:
    inset 0 1px 0 rgb(229 244 255 / 27%),
    inset 0 -1px 0
      color-mix(in srgb, var(--atlas-ui-reflection) 24%, transparent),
    0 3px 12px rgb(2 8 16 / 19%);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.52 var(--atlas-typography-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--signal);
  text-underline-offset: 0.2em;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--atlas-icons-stroke-width);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only,
.city-sign > span,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  position: fixed;
  z-index: 10;
  padding: 12px;
  background: var(--paper);
}
:where(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
:where(button, .button, .primary, .editor-names a, .book-content .more summary,
    label > textarea, label > select, label > input:not([type="radio"], [type="checkbox"])):focus-visible {
  outline-offset: -2px;
}
/* Keep the indicator clear of adjoining controls and page edges. */
:where(.surface-nav a, .owner-link, .map-buttons button, .stop-line button,
    .drawer-pull, .rail-toggle, .map-info summary, .corner-navigation summary):focus-visible {
  outline-offset: -3px;
}
::selection {
  background: var(--signal);
  color: var(--bg);
}
button,
.button,
.primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  font: 500 0.9rem/1.3 var(--atlas-typography-body);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: var(--rad);
  background: var(--raised);
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  border-color: var(--signal);
  color: var(--signal);
}
.primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--bg);
  font-weight: 600;
}
.primary:hover {
  color: var(--bg);
  background: var(--atlas-ui-action-hover);
  box-shadow: 0 3px 18px #5ad7e827;
}
input,
textarea,
select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 14px;
  font: 400 1rem/1.4 var(--atlas-typography-body);
  caret-color: var(--signal);
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input[type="file"] {
  padding: 0;
}
input[type="file"]::file-selector-button {
  min-height: 44px;
  margin: 0 .6rem 0 0;
  padding: 0 .8rem;
  border: 0;
  border-inline-end: 1px solid var(--edge);
  border-radius: 13px 0 0 13px;
  background: var(--paper);
  color: var(--signal);
  font: inherit;
  cursor: pointer;
}
textarea {
  resize: vertical;
}
label {
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
  font-weight: 500;
}
summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
details:not(.map-info, .more) > summary {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: .24em;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400;
}
.check input, .existing-photo input {
  flex: 0 0 18px;
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--signal);
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 550;
  line-height: 1.14;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.055em;
  margin: 0 0 0.6em;
}
h2 {
  font-size: 1.3rem;
  letter-spacing: -0.035em;
  margin: 1.3em 0 0.4em;
}
h3 {
  font-size: 1rem;
}
.mast {
  position: relative;
  z-index: 3;
  align-items: center;
  background: #0b1017;
  border-bottom: 1px solid #31404c;
}
.brand,
.mast nav,
.mast nav a,
.city-clock {
  display: flex;
  align-items: center;
}
.brand {
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  flex: none;
}
.byline {
  display: inline-flex;
  align-items: center;
  gap: 0.23rem;
  margin: 0.36rem 0 0 -0.18rem;
  font:
    italic 0.93rem/1 Georgia,
    serif;
  color: #c9c3bf;
  white-space: nowrap;
}
.byline b {
  color: var(--atlas-ui-reflection);
  font: italic 400 clamp(1.08rem, 1.65vw, 1.55rem)/1.12 "Instrument Serif", Georgia, serif;
}
.byline small {
  font-size: .75em;
}
.editor-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1rem;
}
.editor-account form, .account-page form {
  margin: 0;
}
.account-page {
  width: min(100%, 28rem);
  margin-inline: auto;
}
.account-page > form, .account-page > a {
  margin-block: 1rem;
}
.editor-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-block: 1.5rem;
}
.editor-names a {
  display: grid;
  justify-items: start;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.editor-names a span {
  color: var(--signal);
  font: 400 2.3rem/1 'Instrument Serif', Georgia, serif;
}
.editor-names a:last-child span { color: #edb8ce; }
.editor-names a:is(:hover, :focus-visible) { border-color: currentColor; }
.account-page details { margin-block-start: 1.25rem; border-top: 1px solid var(--line); }
.account-page summary { padding-block: .85rem; cursor: pointer; }
.account-page details:target > summary { text-decoration-color: var(--signal); }
.mast nav a {
  gap: 8px;
  min-height: 44px;
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--ink);
}
.mast nav a:hover {
  color: var(--signal);
}
.owner-link .icon {
  width: 23px;
  height: 23px;
  color: #e6bdac;
}
.mast-tools .owner-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
}
.city-clock {
  align-items: baseline;
  gap: 0.45rem;
  white-space: nowrap;
  font: 400 .82rem/1 var(--atlas-typography-body);
  color: #ebc7bc;
}
.city-clock time {
  font: 400 0.95rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
  min-width: 5ch;
  letter-spacing: 0;
  color: var(--ink);
}
.search-box {
  display: flex;
  align-items: center;
  color: var(--signal);
  border: 1px solid var(--edge);
  background: var(--raised);
  padding-left: 12px;
  border-radius: var(--rad);
}
.search-box:has(input:focus-visible) {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}
.search-box:has(input:focus-visible) input {
  outline: none;
}
.search-box input {
  border: 0;
  background: none;
  padding-inline: 10px;
}
.search-box button {
  border: 0;
  background: none;
  min-width: 44px;
  padding: 0;
  color: var(--muted);
}
.search-box button:focus-visible {
  outline-offset: -4px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 13px 0 4px;
}
.tabs button {
  min-width: 0;
  flex: 1;
  padding: 7px 5px;
  border-color: #495561;
  background: transparent;
  font-size: 0.82rem;
}
.more {
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.more summary {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--muted);
}
.more summary:after {
  content: "+";
  margin-left: auto;
  font: 1.2rem var(--mono);
}
.more[open] summary:after {
  content: "−";
}
.more label {
  margin: 7px 0;
}
.more[open] {
  padding-bottom: 12px;
}
.map-area {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 220px;
  background: var(--atlas-map-land);
  overflow: hidden;
}
.overview,
.map-area > .map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.overview {
  background: url("/assets/overview-blue-night.svg") center/cover;
}
.skyline-proof {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: #d0e6e8;
  pointer-events: none;
}
.map-area[data-drawing]:not(.map-ready) { background: var(--bg); }
.map-area[data-drawing]:not(.map-ready) :is(.overview, .scene-shade, .scene-caption, .map-info) { visibility: hidden; }
.map-area[data-drawing="visible"]:not(.map-ready) .skyline-proof { display: grid; }
.skyline-proof svg {
  display: block;
  width: min(52%, 15rem);
  height: auto;
  stroke-width: 1.6px;
}
.skyline-proof span {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  color: var(--muted);
  font: 400 .87rem/1.5 var(--atlas-typography-body);
}
@media (prefers-reduced-motion: no-preference) {
  .sky-trace {
    stroke-dasharray: 1;
    animation: draw-skyline 1250ms ease-out both;
  }
  @keyframes draw-skyline {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }
}
.map-canvas {
  opacity: 0;
}
.map-ready .map-canvas {
  opacity: 1;
}
.map-area:not(.map-ready) .map-canvas {
  pointer-events: none;
}
.map-bar,
.map-bottom {
  position: absolute;
  z-index: 1;
  inset-inline: 18px;
  pointer-events: none;
}
.map-bar > *,
.map-bottom > * {
  pointer-events: auto;
}
.map-bar {
  top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.map-label,
.map-buttons,
.map-position,
.map-info-panel,
.place-preview {
  background: var(--glass);
  border: 1px solid var(--glass-rim);
  border-radius: var(--atlas-shape-card);
  box-shadow: var(--glass-shine);
}
.map-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--signal);
}
.map-label span {
  display: grid;
  gap: 1px;
  color: var(--ink);
  font: 500 0.81rem var(--display);
}
.map-label b {
  font: 400 0.63rem var(--mono);
  color: var(--muted);
}
.map-buttons {
  position: relative;
  user-select: none;
  -webkit-touch-callout: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 3px;
  padding: 4px;
  border-radius: 30px;
}
.map-buttons button {
  position: relative;
  border: 0;
  border-radius: 50%;
  width: 44px;
  min-height: 44px;
  background: transparent;
  padding: 0;
  color: var(--ink);
}
.map-buttons .icon {
  width: 21px;
  height: 21px;
}
.map-buttons button:is(:hover, :focus-visible) {
  color: white;
}
.map-buttons button.lit {
  background-color: color-mix(in srgb, var(--signal) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 26%, transparent);
}
.map-buttons [data-control="tilt"] {
  width: auto;
  gap: 5px;
  padding-inline: 12px;
  border-radius: 24px;
  font: 500 0.78rem var(--mono);
}
.map-buttons button[aria-pressed="true"] {
  color: var(--signal);
}
.map-buttons button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 34%;
  right: 34%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.control-tip {
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 5px);
  left: 0;
  transform: translateX(var(--tip-x, 0px));
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--glass-rim);
  border-radius: 1rem;
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 3px 9px rgb(2 8 16 / 24%);
  font: 500 .8rem/1.3 var(--atlas-typography-body);
  text-align: center;
}
.control-tip::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 6px;
}
@media (prefers-reduced-motion: no-preference) {
  .control-tip { transition: transform 140ms cubic-bezier(.2,.75,.25,1); }
}
.map-bottom {
  bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.map-position {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 0.69rem var(--mono);
  letter-spacing: 0.04em;
  color: #d5e3e7;
  padding: 7px 10px;
}
.map-position .icon {
  color: var(--signal);
  width: 15px;
  height: 15px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-rim);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.legend i {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}
.unknown-key {
  color: var(--amber);
}
.sj-key, .by-sj { color: var(--atlas-map-pin-visited); }
.mk-key, .by-mk { color: var(--atlas-ui-reflection); }
.legend .both-key { background: var(--atlas-ui-reflection); outline: 2px solid var(--atlas-map-pin-visited); }
.personal-ratings { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-block: .25rem; font-size: .84rem; }
.personal-score { display: inline-flex; align-items: baseline; gap: .35rem; }
.personal-score b { font: 600 .72rem var(--mono, monospace); }
.personal-score small, .visit-signature { color: var(--muted); }
.legend .future-key {
  color: var(--atlas-map-pin-want-to-go);
  background: transparent;
  border: 1px solid currentColor;
}
.favourite-key {
  color: var(--atlas-map-pin-favourite);
}
.map-status,
.map-help {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.82rem;
}
.place-preview {
  position: absolute;
  background: var(--raised);
  z-index: 3;
  width: max-content;
  max-width: min(18rem, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 13px 14px 5px 17px;
  border-radius: 15px;
  overflow-wrap: anywhere;
}
.place-preview:focus { outline: none; }
.place-preview[data-docked] {
  inset-inline: var(--map-left) var(--map-right);
  width: min(21rem, calc(100% - var(--map-left) - var(--map-right)));
  max-width: none;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.place-preview[data-docked] :is(.preview-card, .preview-choices) {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.place-preview[data-docked] :is(.preview-link, .preview-more) { align-self: start; }
.place-preview[data-docked] .preview-close { z-index: 1; }
.preview-close {
  position: absolute;
  inset: 2px 2px auto auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.preview-name {
  margin: 0;
  padding-inline-end: 32px;
  font: 400 1.6rem/1.05 "Instrument Serif", Georgia, serif;
}
.preview-detail {
  margin: 5px 0 0;
  color: var(--atlas-ui-reflection);
  font: 400 .72rem/1.5 var(--mono);
}
.preview-detail:empty, .preview-choices:empty { display: none; }
.preview-link, .preview-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--signal);
  font: 450 .8rem/1.3 var(--atlas-typography-body);
  text-decoration: underline;
  text-underline-offset: .23em;
}
.place-preview .icon { width: 15px; height: 15px; }
.preview-choices {
  display: grid;
  max-height: min(29svh, 13rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 10px;
}
.preview-choices button {
  justify-content: start;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: start;
  overflow-wrap: anywhere;
}
.place-preview button:focus-visible, .place-preview a:focus-visible {
  outline-offset: -2px;
}
.prose {
  white-space: pre-wrap;
  line-height: 1.65;
}
.entry {
  padding: 15px 0 15px 15px;
  border-left: 1px solid #38606d;
  border-top: 1px solid var(--line);
  position: relative;
}
.entry:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 22px;
  width: 6px;
  height: 6px;
  background: var(--signal);
  transform: rotate(45deg);
}
.visit-margin {
  display: grid;
  grid-template-columns: minmax(2.4rem, max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: .75rem;
  margin: .65rem 0;
}
.visit-margin figcaption {
  color: var(--atlas-ui-reflection);
  font: italic 1.4rem/1 "Instrument Serif", Georgia, serif;
}
.visit-margin figcaption small { font: .68rem var(--mono); }
.visit-margin blockquote {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.visit-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.2rem .85rem;
  margin-block: 1.25rem;
}
.visit-photos figure { margin: 0; min-width: 0; }
.visit-photos a, .visit-photos img { display: block; width: 100%; }
.visit-photos img { height: auto; border-radius: .3rem; }
.visit-photos figcaption { margin-top: .4rem; color: var(--atlas-ui-text-muted); font-size: .88rem; }
.visit-margins-editor { margin: 2rem 0; scroll-margin-top: 2rem; }
.entry strong {
  font: 400 0.9rem var(--mono);
  color: var(--ink);
}
.entry p {
  margin: 0.35em 0;
}
.entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.editor-layout {
  min-height: calc(100dvh - var(--mast));
  padding: 32px 16px 64px;
  background:
    linear-gradient(90deg, #0b1017eb, #0b1017f5),
    url("/assets/overview-blue-night.svg") center/cover fixed;
}
.editor {
  position: relative;
  max-width: 700px;
  margin: auto;
  padding: 24px clamp(18px, 4vw, 42px) 32px;
  border: 1px solid var(--line);
  border-radius: var(--atlas-shape-sheet);
  background: var(--paper);
}
.editor form {
  display: grid;
  gap: 16px;
}
.editor h1 {
  margin: 0.45em 0 0.65em;
}
.editor fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--atlas-shape-card);
  background: #101820;
}
legend {
  padding: 0 7px;
  color: var(--signal);
  font: 550 0.86rem var(--display);
}
fieldset p,
.help {
  color: var(--muted);
  margin: 0 0 0.7em;
  font-size: 0.9rem;
}
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.inline-map {
  margin-top: 12px;
}
.inline-map .map-area {
  height: 270px;
  container-type: size;
  border-radius: 12px;
}
.inline-map .maplibregl-cooperative-gesture-screen {
  background: transparent;
  color: var(--ink);
  font: 500 .875rem/1.4 var(--atlas-typography-body);
  text-align: center;
}
.inline-map .maplibregl-cooperative-gesture-screen > div {
  padding: .5rem .85rem;
  border: 1px solid var(--glass-rim);
  border-radius: var(--rad);
  background: var(--raised);
}
@media (prefers-reduced-motion: reduce) {
  .inline-map .maplibregl-cooperative-gesture-screen { transition: none; }
}
.inline-map .map-label,
.inline-map .map-position {
  display: none;
}
.inline-map .map-bar {
  justify-content: flex-end;
  inset: 8px 8px auto;
}
.inline-map .control-tip {
  bottom: auto;
  top: calc(100% + 6px);
}
.inline-map .control-tip::after {
  inset: auto 0 100%;
  height: 7px;
}
.inline-map .map-bottom {
  inset-inline: 6px;
  bottom: 4px;
  gap: 3px;
}
.editor details label {
  margin-bottom: 12px;
}
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  background: var(--paper);
  border-top: 1px solid var(--edge);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}
.save-bar button {
  flex: 1;
}
:root:has(.save-bar) {
  scroll-padding-block-end: calc(5rem + env(safe-area-inset-bottom));
}
.secondary-form {
  margin-top: 24px;
}
.error,
[role="alert"] {
  background: #23161d;
  border: 1px solid var(--atlas-ui-danger);
  padding: 12px;
  margin: 12px 0;
}
.error p {
  margin: 0.4em 0;
}
/* The field a rejected save names: a danger edge in addition to the summary's words. */
[aria-invalid="true"] {
  border-color: var(--atlas-ui-danger);
  box-shadow: inset 4px 0 0 var(--atlas-ui-danger);
}
dt {
  font-weight: 550;
}
dd {
  margin: 0 0 0.5em;
  overflow-wrap: anywhere;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}
th,
td {
  text-align: left;
  padding: 0.35em;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .editor-layout {
    padding: 0;
  }
  .editor {
    border: 0;
    border-radius: 0;
    padding: 16px 14px 28px;
  }
  .editor h1 {
    font-size: 1.8rem;
  }
  .editor details {
    min-width: 0;
  }
  .inline-map .map-buttons {
    gap: 1px;
  }
  .inline-map .map-buttons [data-control="tilt"] {
    padding-inline: 7px;
    gap: 3px;
  }
  .inline-map [data-control="tilt"] .icon {
    width: 17px;
    height: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* The map, place book and reading page are separate destinations. */
:root {
  --gutter: clamp(18px, 4vw, 76px);
  --measure: 78rem;
}
.mast {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  gap: 14px;
  padding: 14px var(--gutter);
  min-height: var(--mast);
}
.mast .brand {
  justify-self: start;
  gap: 0;
}
.mast .city-lettering {
  display: block;
  width: clamp(148px, 14vw, 195px);
  height: auto;
}
.mast nav.surface-nav {
  position: relative;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 10.8rem;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: var(--glass);
  border: 1px solid var(--glass-rim);
  border-bottom-color: transparent;
  border-radius: 16px 13px 4px 4px / 7px 7px 4px 4px;
  justify-self: center;
}
.surface-nav .page-edges {
  position: absolute;
  inset: auto 0 -4px;
  width: 100%;
  height: 9px;
  fill: none;
  stroke: color-mix(in srgb, var(--atlas-ui-reflection) 55%, var(--muted));
  stroke-width: 0.8px;
  pointer-events: none;
}
.turn-leaf { display: none; }
@media (prefers-reduced-motion: no-preference) {
  [data-turn] .surface-nav { perspective: 450px; }
  [data-turn] .turn-leaf {
    display: block;
    position: absolute;
    inset: 0 0 0 50%;
    z-index: 2;
    pointer-events: none;
    transform-origin: left center;
    transform-style: preserve-3d;
    opacity: 0;
    animation: turn-page 460ms cubic-bezier(.32,.05,.23,1);
  }
  [data-turn="map"] .turn-leaf { animation-direction: reverse; }
  .turn-leaf::before, .turn-leaf::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #84969d;
    border-radius: 0 10px 3px 0;
    backface-visibility: hidden;
    background: repeating-linear-gradient(0deg, transparent 0 7px, #677782 8px, transparent 9px) #34404d;
  }
  .turn-leaf::after {
    transform: rotateY(180deg);
    border-radius: 10px 0 0 3px;
    background: repeating-linear-gradient(65deg, transparent 0 12px, #658188 13px, transparent 14px) #30434d;
  }
  @keyframes turn-page {
    0% { transform: rotateY(0); opacity: 0; }
    14%, 86% { opacity: 1; }
    100% { transform: rotateY(-180deg); opacity: 0; }
  }
  [data-turn="book"] .book-cover-inner, [data-turn="map"] .scene-identity {
    transform-origin: left center;
    animation: settle-page 350ms ease-out;
  }
  @keyframes settle-page {
    from { transform: perspective(850px) rotateY(-7deg); opacity: .65; }
    to { transform: none; opacity: 1; }
  }
}
.mast .surface-nav a {
  position: relative;
  white-space: nowrap;
  justify-content: center;
  padding: 3px 12px 6px;
  min-height: 44px;
  font: italic 400 1.7rem/1.12 "Instrument Serif", Georgia, serif;
  letter-spacing: 0.015em;
  border-radius: 15px 0 0 3px / 6px 0 0 3px;
  --page-ink: var(--signal);
  color: #e0e8ed;
}
.mast .surface-nav a + a {
  border-inline-start: 1px solid var(--glass-rim);
  border-radius: 0 12px 3px 0 / 0 6px 3px 0;
  --page-ink: var(--atlas-ui-reflection);
}
.surface-nav a::after {
  content: "";
  position: absolute;
  inset: -1px 10px auto auto;
  width: 5px;
  height: 10px;
  background: var(--page-ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
  opacity: 0;
}
.mast .surface-nav a[aria-current] {
  color: var(--page-ink);
  background-color: color-mix(in srgb, var(--page-ink) 8%, transparent);
}
.mast .surface-nav a:is(.lit, :focus-visible) {
  background-color: color-mix(in srgb, var(--page-ink) 21%, transparent);
  color: white;
}
@media (hover: hover) {
  .mast .surface-nav a:hover {
    background-color: color-mix(in srgb, var(--page-ink) 21%, transparent);
    color: white;
  }
}
.surface-nav a[aria-current]::after {
  opacity: 1;
}
.surface-nav,
.map-buttons {
  touch-action: pan-y pinch-zoom;
  isolation: isolate;
}
@supports (backdrop-filter: blur(1px)) {
  .mast nav.surface-nav {
    background: linear-gradient(
      140deg,
      rgb(149 189 209 / 15%),
      rgb(14 28 43 / 26%) 46%,
      color-mix(in srgb, var(--atlas-ui-reflection) 14%, transparent)
    );
    backdrop-filter: blur(8px) brightness(0.64);
    text-shadow: 0 1px 3px rgb(4 9 17 / 86%);
  }
  .map-buttons {
    background: rgb(16 26 36 / 82%);
    backdrop-filter: blur(4px);
  }
  .map-info-panel .legend span {
    color: var(--ink);
  }
}
@media (prefers-reduced-transparency: reduce),
  (prefers-contrast: more),
  (forced-colors: active) {
  :is(.surface-nav, .map-buttons) .lit {
    outline: 1px solid currentColor;
    outline-offset: -3px;
  }
  .mast nav.surface-nav,
  .map-buttons {
    background: var(--glass);
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  .map-buttons button,
  .mast .surface-nav a {
    border: 1px solid ButtonText;
  }
  .map-buttons [aria-pressed="true"],
  .mast .surface-nav a[aria-current] {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}
.mast-tools {
  justify-self: end;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  line-height: 1;
}
.surface-city .mast-tools {
  background: rgb(8 17 26 / 66%);
  border-radius: 28px;
}
.mast .mast-tools:has(.owner-link) {
  gap: 0;
  padding: 0;
  color: #e7d5c6;
  border: 1px solid #857d72;
  border-radius: 3px 13px 3px 3px;
  background: #18202a;
}
.mast-tools:has(.owner-link) .city-clock {
  padding: 0 0.7rem;
  border: 0;
  line-height: 1;
}
.mast-tools .owner-link {
  position: relative;
  border-radius: 0 12px 2px 0;
}
.city-clock:not([hidden]) + .owner-link::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 1px;
  background: #686562;
}
.mast-tools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  text-decoration: none;
}
.mast-tools a:hover,
.mast-tools a:focus-visible {
  color: var(--signal);
}
.mast-tools .city-clock {
  padding-inline-end: 12px;
  border-inline-end: 1px solid var(--glass-rim);
  line-height: 18px;
}
.sign-tubes {
  display: block;
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  .arrival .sign-tubes img {
    animation: tube-warmup 800ms ease-out;
  }
  .arrival .sign-tubes::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: url("/assets/toronto.svg") center / contain no-repeat;
    animation: tube-current 800ms ease-out;
  }
  .arrival .byline {
    animation: sign-byline 450ms 440ms ease-out both;
  }
  .map-canvas {
    transition: opacity 400ms ease-out;
  }
  .map-buttons button,
  .mast .surface-nav a {
    transition:
      background-color 160ms ease-out,
      color 160ms ease-out;
  }
  .map-buttons button .icon {
    transition:
      scale 170ms cubic-bezier(0.2, 0.85, 0.25, 1.3),
      translate 170ms ease-out;
  }
  .map-buttons .lit .icon {
    scale: 1.22;
    translate: 0 -1px;
  }
  .map-ready .map-buttons {
    animation: open-panel 210ms ease-out;
  }
  .map-info[open] .map-info-panel {
    animation: open-panel 180ms ease-out;
  }
  @keyframes tube-warmup {
    from {
      opacity: 0.3;
    }
    65% {
      opacity: 0.66;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes tube-current {
    from {
      clip-path: inset(0 100% 0 0);
      opacity: 1;
    }
    76% {
      clip-path: inset(0 0 0 0);
      opacity: 1;
    }
    to {
      clip-path: inset(0 0 0 0);
      opacity: 0;
    }
  }
  @keyframes sign-byline {
    from {
      opacity: 0.35;
      clip-path: inset(0 82% 0 0);
    }
    to {
      opacity: 1;
      clip-path: inset(0);
    }
  }
  @keyframes open-panel {
    from {
      opacity: 0.6;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.surface-city .mast {
  position: absolute;
  top: 0;
  inset-inline: 0;
  border: 0;
  background: linear-gradient(#070e16bc, #0a10164d 64%, transparent);
  pointer-events: none;
}
.surface-city {
  --map-left: max(var(--gutter), env(safe-area-inset-left));
  --map-right: max(var(--gutter), env(safe-area-inset-right));
}
.surface-city .mast {
  padding-inline: var(--map-left) var(--map-right);
  padding-top: max(14px, env(safe-area-inset-top));
}
.surface-city .mast > * {
  pointer-events: auto;
}
.city-theatre {
  display: grid;
  overflow: clip;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  height: 100svh;
  background: #0a1119;
}
.city-theatre > .map-area {
  min-height: 0;
}
.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      0deg,
      #060d15ed 0%,
      #08121b93 9%,
      #08131e24 25%,
      transparent 40%
    ),
    linear-gradient(94deg, color-mix(in srgb, var(--district-ink, #425970) 10%, transparent), transparent 48%);
}
.scene-caption {
  position: absolute;
  bottom: clamp(30px, 5vh, 70px);
  left: var(--map-left);
  right: calc(var(--map-right) + 18rem);
  pointer-events: none;
  color: var(--ink);
}
.scene-caption h1 {
  margin: 0.1em 0 0;
  max-width: 22ch;
  font: 400 clamp(2.25rem, 4.8vw, 4.75rem) / 1.05 "Instrument Serif", Georgia, serif;
  letter-spacing: -0.016em;
  padding-inline-end: 0.12em;
  color: var(--district-ink, var(--ink));
  text-wrap: balance;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.scene-caption h1 img {
  display: none;
}
.scene-caption h1.city-sign {
  font-size: clamp(2.6rem, 6.25vw, 6rem);
  flex: 0 1 3.6em;
  min-width: 0;
  padding: 0;
}
.scene-caption h1.city-sign img {
  display: block;
  width: 100%;
  height: auto;
}
.scene-identity {
  display: flex;
  align-items: baseline;
}
.scene-identity:has(.city-sign) {
  align-items: center;
}
.scene-byline {
  display: none;
}
.city-sign + .scene-byline {
  display: inline-flex;
  flex: none;
  margin-top: 1.1em;
  margin-inline-start: clamp(-0.7rem, -0.65vw, -0.28rem);
}
.surface-city:has(#scene-title.city-sign) .mast .brand {
  visibility: hidden;
}
.mast-tools {
  position: relative;
}
/* The map centre sits just under the clock and key, clear of the city sign. */
.mast-coords {
  position: absolute;
  top: calc(100% + 7px);
  right: 2px;
  white-space: nowrap;
  pointer-events: none;
  color: var(--muted);
  font: 400 0.7rem/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px #050a10, 0 0 8px #050a10;
}
.mast-coords:empty {
  display: none;
}
.scene-record {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
}
.city-theatre .map-bar {
  inset: auto var(--map-right) 54px auto;
}
.city-theatre .map-bottom {
  display: contents;
}
.map-info {
  position: relative;
  grid-column: 1/-1;
  justify-self: end;
  z-index: 2;
}
.city-theatre .map-info {
  position: absolute;
  inset: auto var(--map-right) 6px auto;
}
.map-info summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
  color: #e1e9ed;
  font: 400 0.75rem/1.2 var(--atlas-typography-body);
  text-shadow: 0 1px 3px #050a10;
  list-style: none;
}
.map-info summary span {
  color: #c4d1d9;
}
.map-info summary b {
  border-inline-start: 1px solid var(--glass-rim);
  padding-inline-start: 10px;
  font-weight: 500;
}
.rail-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(-45deg);
}
.credit-fold, .fold-arrow {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.credit-fold {
  margin-inline-start: -5px;
  /* Centre the chevron on the lettering, not on the line box with its descenders. */
  translate: 0 0.75px;
}
.map-info[open] .credit-fold {
  transform: rotate(180deg);
}
.rail-toggle[aria-expanded="true"]::after {
  transform: rotate(135deg);
}
.inline-map .map-info summary {
  padding-inline: 9px;
  border-radius: var(--rad);
  background: rgb(8 17 26 / 88%);
}
.map-info-panel {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: min(21rem, calc(100vw - 3rem));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
  color: var(--ink);
}
.map-info:not([open]) .map-info-panel {
  display: none;
}
.map-info .map-info-panel {
  background: var(--raised);
  text-shadow: none;
}
.inline-map .map-info {
  position: static;
}
.inline-map .map-info-panel {
  width: min(21rem, calc(100cqw - 12px));
  max-height: var(--credits-room, max(44px, calc(100cqh - 3.5rem)));
}
.map-guide {
  font-size: .875rem;
  line-height: 1.5;
}
.map-guide p { margin: 0 0 .5rem; }
.map-guide strong { font-weight: 550; }
.map-guide .touch-guide { display: none; color: var(--muted); }
.map-area:not(.map-ready) .map-guide { display: none; }
@media (any-pointer: coarse) {
  .map-guide .touch-guide { display: block; }
}
.city-theatre .map-info-panel {
  width: min(21rem, calc(100vw - var(--map-left) - var(--map-right)));
  max-height: var(--credits-room, max(44px, calc(100svh - 13rem - env(safe-area-inset-bottom))));
}
.map-info-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 15px;
  align-items: baseline;
  font-size: 0.78rem;
}
.map-info-panel .legend + dl {
  margin-top: 8px;
}
.map-info-panel dt {
  color: var(--muted);
}
.map-info-panel dd {
  margin: 0;
}
.map-info-panel a {
  overflow-wrap: anywhere;
  text-underline-offset: 0.16em;
}
.photo-credit {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}
.photo-credit p {
  margin: 0;
}
.photo-credit p:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.7em;
  color: var(--ink);
  margin-bottom: 4px;
}
.viewpoints {
  --rail-foot: max(4px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 2;
  background: var(--paper);
}
.viewpoint-strip {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(16px, 1.6vw, 28px);
  padding: 4px var(--map-right) var(--rail-foot) var(--map-left);
  border-top: 1px solid var(--line);
  min-width: 0;
}
.rail-label, .pull-word {
  font: 400 .8rem/1.3 var(--atlas-typography-body);
  color: var(--muted);
}
.drawer-pull {
  position: absolute;
  bottom: 100%;
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: end center;
  width: 52px;
  height: 44px;
  padding: 0 0 4px;
  border: 0;
  background: transparent;
  touch-action: none;
}
.drawer-pull::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--paper);
}
.drawer-pull .fold-arrow {
  position: relative;
  width: 18px;
  height: 18px;
  color: var(--atlas-ui-reflection);
}
.pull-word {
  display: none;
  position: absolute;
  bottom: 28px;
  left: 50%;
  translate: -50% 0;
  padding: 3px 9px 4px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  pointer-events: none;
}
.viewpoints:has(.viewpoint-strip[hidden]) {
  height: env(safe-area-inset-bottom, 0px);
}
.drawer-pull[aria-expanded="false"] .fold-arrow {
  transform: rotate(180deg);
}
.drawer-pull[aria-expanded="false"] .pull-word {
  display: block;
  opacity: 0;
  transform: translateY(3px);
}
.drawer-pull[aria-expanded="false"]:focus-visible .pull-word {
  opacity: 1;
  transform: none;
}
@media (hover: hover) {
  .drawer-pull[aria-expanded="false"]:hover .pull-word {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer-pull .fold-arrow { transition: transform 220ms ease-out; }
  .pull-word { transition: transform 180ms ease-out, opacity 160ms ease-out; }
}
[data-viewpoint="financial-district"], [data-district="financial-district"] { --district-ink: #b7d8e4; }
[data-viewpoint="st-george"], [data-district="st-george"] { --district-ink: #a6cfb7; }
[data-viewpoint="the-annex"], [data-district="the-annex"] { --district-ink: #cdc0e6; }
[data-viewpoint="yorkville"], [data-district="yorkville"] { --district-ink: #ead6ae; }
[data-viewpoint="kensington-market"], [data-district="kensington-market"] { --district-ink: #dfc39e; }
[data-viewpoint="chinatown"], [data-district="chinatown"] { --district-ink: #e5a6b5; }
[data-viewpoint="little-italy"], [data-district="little-italy"] { --district-ink: #deb2a1; }
[data-viewpoint="st-lawrence"], [data-district="st-lawrence"] { --district-ink: #9ed5cb; }
.rail-toggle { display: none; }
.stop-line {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(4px, 0.55vw, 10px);
}
.stop-line button {
  display: grid;
  grid-template: minmax(44px, auto) / minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  isolation: isolate;
  position: relative;
  background: var(--raised);
  color: #fbf7f1;
  text-align: left;
  font: 500 0.78rem/1.16 var(--atlas-typography-body);
}
.aerial-print {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: saturate(0.65);
}
.stop-line button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(to top, rgb(7 15 22 / 92%), rgb(7 15 22 / 63%) 45%, transparent);
}
.stop-line button span {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 9px 7px 5px;
  overflow-wrap: anywhere;
}
.stop-line button:is(:hover, :focus-visible, [aria-pressed="true"]) {
  color: var(--district-ink);
}
.stop-line button[aria-pressed="true"]::before {
  border-bottom: 2px solid var(--district-ink);
}
@media (prefers-reduced-motion: no-preference) {
  .credit-fold, .rail-toggle::after { transition: transform 180ms ease-out; }
  .stop-line button { transition: color 150ms ease; }
}
@media (max-width: 64rem) {
  .rail-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 44px;
    gap: 8px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: start;
    touch-action: manipulation;
  }
  .current-print {
    width: 40px;
    height: 25px;
    object-fit: cover;
  }
  .rail-toggle strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--district-ink, var(--ink));
    font: 500 .95rem/1.2 var(--atlas-typography-body);
  }
  .rail-toggle::after {
    flex: none;
    margin-inline: 2px 4px;
    color: var(--signal);
  }
  .stop-line { display: none; }
  .rail-toggle[aria-expanded="true"] + .stop-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: absolute;
    inset: auto var(--map-right) calc(100% + 44px) var(--map-left);
    max-height: min(58svh, 31rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    gap: 5px;
    border: 1px solid var(--glass-rim);
    border-radius: 8px;
    background: var(--paper);
  }
  .stop-line button { grid-template-rows: minmax(52px, auto); }
}
@media (max-width: 64rem) and (prefers-reduced-motion: no-preference) {
  .rail-toggle[aria-expanded="true"] + .stop-line {
    animation: open-panel 180ms ease-out;
  }
}
.book-page {
  min-height: calc(100svh - var(--mast));
  background: var(--paper);
}
.book-cover-inner,
.book-content,
.reading-width,
.reading-body {
  width: min(calc(100% - 2 * var(--gutter)), var(--measure));
  margin-inline: auto;
}
.ledger-summary,
.ledger-labels,
.ledger-area,
.ledger-state,
.ledger-name small,
.book-foot,
.reading-locator,
.visit-log h2 small {
  font-family: var(--mono);
}
.ledger-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 60px;
}
.ledger-summary b {
  color: var(--ink);
  font-weight: 400;
}
.ledger-summary a,
.book-foot a,
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}
.ledger-summary a:hover,
.book-foot a:hover,
.back:hover {
  text-decoration: underline;
}
.book-empty {
  border-block: 1px solid var(--line);
  padding: clamp(26px, 5vw, 65px) clamp(0px, 3vw, 45px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: radial-gradient(40rem 12rem at 0 50%, color-mix(in srgb, var(--atlas-ui-reflection) 7%, transparent), transparent 70%);
}
.book-empty h2 {
  margin: 0 0 7px;
  color: var(--paper-ink, var(--ink));
  font: 300 clamp(1.5rem, 3vw, 2.3rem)/1.1 "Newsreader", Georgia, serif;
  font-variation-settings: "opsz" 48;
}
.book-empty p {
  margin: 0;
  color: var(--muted);
}
.book-foot {
  padding-block: 18px;
  color: var(--muted);
  font-size: 0.75rem;
}
.book-foot a {
  color: inherit;
}
.reading-page {
  min-height: calc(100svh - var(--mast));
  background: var(--paper);
}
.reading-hero {
  background: linear-gradient(110deg, #112630, #0c151c 64%);
  border-bottom: 1px solid #3c525d;
}
.reading-width {
  padding-block: 16px 24px;
}
.reading-width h1 {
  font-size: clamp(2.3rem, 7.5vw, 6.3rem);
  line-height: 1.02;
  letter-spacing: -0.075em;
  margin: 0.14em 0 0.3em;
  max-width: 20ch;
  overflow-wrap: anywhere;
}
.reading-width .category {
  margin: clamp(20px, 4vw, 56px) 0 0;
}
.reading-locator,
.relationship {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 26px;
  color: var(--muted);
  font-size: 0.85rem;
}
.reading-locator span,
.relationship {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.reading-locator span {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.reading-body {
  max-width: 65ch;
  margin-inline-start: max(var(--gutter), calc((100% - var(--measure)) / 2));
  padding-block: 22px 80px;
}
.place-notes {
  margin-bottom: 34px;
  overflow-wrap: anywhere;
}
.place-notes .prose {
  font-size: 1.08rem;
}
.visit-log {
  border-top: 1px solid #3c525d;
}
.visit-log h2 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 22px 0 18px;
}
.visit-log h2 small {
  font-size: 0.8rem;
  color: var(--signal);
}
@media (max-width: 68rem) {
  .mast-tools:has(.public-link) .city-clock {
    display: none;
  }
}
@media (max-width: 870px) {
  .mast .brand {
    flex-direction: column;
    align-items: flex-start;
  }
  .mast .byline {
    margin: -.35rem 0 .15rem .45rem;
    font-size: .76rem;
  }
  .mast-tools:has(.public-link) .city-clock {
    display: none;
  }
  .mast-tools .backup-label,
  .mast-tools .public-link span {
    display: none;
  }
  .mast-tools a {
    min-width: 44px;
  }
  .mast-tools {
    gap: 6px;
  }
  .surface-city .mast-tools {
    padding-inline: 4px;
  }
}
@media (max-width: 650px) {
  .city-theatre:has(.viewpoints:not([hidden])) .map-info {
    margin-block-end: 44px;
  }
  :root {
    --gutter: 16px;
  }
  .mast {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
    padding: 8px var(--gutter) 10px;
  }
  .mast .city-lettering {
    width: 141px;
  }
  .mast .brand {
    gap: 0;
    min-width: 0;
    max-width: 100%;
  }
  .mast .sign-tubes {
    min-width: 0;
  }
  .mast .sign-tubes img {
    max-width: 100%;
  }
  .mast-tools {
    grid-column: 2;
    grid-row: 1;
    gap: 10px;
  }
  .surface-city .mast-tools {
    padding-inline: 2px;
  }
  .mast nav.surface-nav {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: center;
    max-width: 100%;
  }
  .mast .surface-nav a {
    min-height: 44px;
    padding: 7px clamp(8px, 3vw, 16px);
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }
  .surface-city .mast {
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .city-theatre > .map-area {
    display: grid;
    /* Keep focus and scroll anchoring inside a card from scrolling the map frame. */
    overflow: clip;
    grid-template-rows: minmax(0, 1fr) auto auto auto;
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--map-left) var(--map-right);
  }
  .scene-caption {
    position: relative;
    inset: auto;
    grid-row: 2;
    margin-block-end: 12px;
  }
  .scene-caption h1 {
    font-size: clamp(2.3rem, 8.5vw, 3.5rem);
  }
  /* The tabs take the row under the clock, so the readout drops below the header. */
  .surface-city .mast-tools {
    position: static;
  }
  .mast-coords {
    top: 100%;
    right: var(--map-right);
    font-size: 0.66rem;
  }
  .city-theatre .map-bar {
    position: relative;
    inset: auto;
    grid-row: 3;
    justify-self: start;
    width: min(100%, 24rem);
  }
  .city-theatre .map-buttons {
    width: 100%;
    justify-content: space-between;
    padding-inline: 6px;
  }
  .city-theatre .map-info {
    position: relative;
    inset: auto;
    grid-row: 4;
    justify-self: end;
    max-width: 100%;
  }
  .city-theatre .map-info summary {
    overflow-wrap: anywhere;
  }
  .city-theatre .map-info-panel dl {
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    overflow-wrap: anywhere;
  }
  .city-theatre .map-area:not(.map-ready) .map-info {
    margin-block-end: env(safe-area-inset-bottom);
  }
  .book-empty {
    align-items: start;
    flex-direction: column;
    padding-inline: 14px;
  }
  .reading-body {
    width: calc(100% - var(--gutter) * 2);
    margin-inline: auto;
  }
  .reading-width {
    padding-top: 6px;
  }
  .reading-locator {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 650px) and (orientation: portrait) {
  .scene-caption h1.city-sign {
    flex-basis: min(58vw, 15rem);
  }
}
/* Share the space between the mast and the map. When the reader enlarges
   text, the notice, caption and controls can grow in their own rows. */
@media (max-width: 650px) and (orientation: portrait),
  (max-width: 479px),
  (max-width: 650px) and (min-height: 591px) {
  @supports (grid-template-rows: subgrid) {
    .surface-city {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: auto minmax(min-content, 1fr) repeat(4, auto);
      min-height: 100svh;
    }
    .surface-city .mast {
      position: relative;
      grid-area: 1 / 1;
    }
    .city-theatre {
      grid-area: 1 / 1 / 7 / 2;
      grid-template-rows: subgrid;
      height: auto;
    }
    .city-theatre > .map-area {
      grid-row: 1 / 6;
      grid-template-rows: subgrid;
    }
    .scene-caption {
      grid-row: 3;
    }
    .city-theatre .map-bar {
      grid-row: 4;
    }
    .city-theatre .map-info {
      grid-row: 5;
    }
    .viewpoints {
      grid-row: 6;
    }
  }
}
@media (max-height: 590px) and (min-width: 480px) and (orientation: landscape) {
  .surface-city .mast {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    padding-block: max(4px, env(safe-area-inset-top)) 4px;
  }
  .surface-city .mast .city-lettering {
    width: clamp(68px, 12vw, 140px);
  }
  .surface-city .mast nav.surface-nav {
    grid-area: 1 / 2;
    justify-self: center;
  }
  .surface-city .mast .surface-nav a {
    padding-inline: clamp(6px, 1.5vw, 17px);
  }
  .surface-city .mast-tools {
    grid-area: 1 / 3;
  }
  .city-theatre > .map-area {
    display: block;
  }
  .scene-caption h1 {
    font-size: clamp(1.8rem, 5.5vw, 3.25rem);
  }
  .scene-caption {
    position: absolute;
    inset: auto calc(var(--map-right) + 17.5rem) 18px var(--map-left);
    margin: 0;
  }
  .city-theatre .map-bar {
    position: absolute;
    inset: auto var(--map-right) 46px auto;
    width: auto;
  }
  .city-theatre .map-info {
    position: absolute;
    inset: auto var(--map-right) 0 auto;
  }
  .city-theatre:has(.viewpoints:not([hidden])) .map-info {
    max-width: calc(50% - var(--map-right) - 30px);
    margin-block-end: 0;
  }
}
@media (min-width: 480px) and (max-width: 600px) and (max-height: 590px) and (orientation: landscape) {
  .city-theatre .map-info summary {
    display: grid;
    grid-template-columns: auto 16px;
    align-content: center;
    justify-items: end;
    gap: 1px 4px;
  }
  .city-theatre .map-info summary > span { grid-column: 1 / -1; }
  .city-theatre .map-info summary b { border: 0; padding: 0; }
}
.place-sheet {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 3.5rem) max(1.25rem, env(safe-area-inset-left)) 5rem;
}
.place-sheet > .back { margin-bottom: 1.75rem; }
.place-sheet h1 { font: 400 clamp(2.6rem, 7vw, 4.5rem)/1.04 "Instrument Serif", Georgia, serif; margin: 0; overflow-wrap: anywhere; }
.place-sheet article > header { padding-block: .25rem 1rem; }
.card-address, .book-address { display: block; color: var(--muted); line-height: 1.5; margin: .25rem 0; }
.book-address { font-size: .84rem; }
.card-stars { color: #e2bc92; display: inline-block; letter-spacing: .13em; white-space: nowrap; }
.card-stars i { font-style: normal; }
.card-meta { display: flex; gap: .85em; align-items: baseline; flex-wrap: wrap; color: var(--muted); font-size: .86rem; margin-block: .5rem; }
.card-note { line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.place-sheet .entry { border: 0; padding-block: .5rem; }
.place-sheet .entry::before, .place-sheet .entry:empty { display: none; }
.place-sheet .entry strong { font: 500 .92rem/1.4 var(--atlas-typography-body); color: var(--muted); }
.place-sheet-foot { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; padding-top: 1.25rem; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.place-sheet-foot a { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font-size: .85rem; }
.place-sheet-foot .icon { width: 1rem; }
.card-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(7rem, 100%),1fr)); gap: .4rem; }
.card-photo { display: block; position: relative; background: var(--paper); overflow: hidden; border-radius: 5px; }
.card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-strip .card-photo { aspect-ratio: 4/3; }
.card-cover { aspect-ratio: 16/9; margin-bottom: 1rem; }
.place-preview .card-cover { margin-right: 2rem; margin-bottom: .6rem; }
.place-preview .card-meta, .place-preview .card-address, .place-preview .card-note { font-size: .8rem; }
.place-preview .card-strip { display: flex; }
.place-preview .card-strip a { width: 3.2rem; }
.preview-card[aria-busy=true] {
  width: min(13rem, 50vw); height: 2.5rem; margin-block: .65rem .15rem;
  mask: linear-gradient(#000 0 0) left top / 88% .55rem no-repeat,
        linear-gradient(#000 0 0) left center / 54% .42rem no-repeat,
        linear-gradient(#000 0 0) left bottom / 72% .42rem no-repeat;
}
.preview-card[aria-busy=true], .card-photo:has(img:not([data-loaded])) {
  background: linear-gradient(105deg,var(--paper) 25%,var(--line) 48%,var(--paper) 70%) 0 0 / 220% 100%;
  animation: card-loading 1.5s ease-in-out infinite;
}
@keyframes card-loading { to { background-position: -180% 0; } }
@media (prefers-reduced-motion: reduce) { .preview-card[aria-busy=true], .card-photo:has(img:not([data-loaded])) { animation: none; } }
.rating-picker small,.photo-editor small,.visit-date small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.star-options { display: flex; align-items: center; flex-wrap: wrap; }
.star-options label { margin: 0; position: relative; cursor: pointer; }
.star-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.star-options label span { min-width: 44px; min-height: 44px; display: grid; place-items: center; font-size: 1.7rem; color: var(--muted); border-radius: 5px; }
.star-options label:has(~ label:not(.unrated) input:checked) span,.star-options label:not(.unrated):has(:checked) span { color: #e2bc92; }
.star-options .unrated span { font-size: .85rem; margin-inline-start: .5rem; }
.star-options .unrated:has(:checked) span { text-decoration: underline; text-underline-offset: .25rem; }
.star-options input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: -3px; }
.date-values { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.date-values label { flex: 1 1 9rem; min-width: 0; }
.photo-editor .existing-photo { display: inline-flex; align-items: center; gap: .4rem; margin-right: .8rem; }
.visit-photo-edit { display: grid; grid-template-columns: 5rem minmax(0,1fr); gap: 1rem; align-items: start; margin-block: .75rem; }
.visit-photo-edit img { object-fit: cover; border-radius: 4px; }
.sheet-index { margin-top: 1rem; font-size: .8rem; color: var(--muted); }

/* Place book: one sheet of places and stations under a wet-street night. */
.book-page {
  --sheet-line: #232b37;
  --sheet-rule: #1a212c;
  --sheet-head: #121822;
  --sheet-hover: #131a25;
  --sodium: #e8b86b;
  --paper-ink: #ebe5da;
  background:
    radial-gradient(70rem 26rem at 8% -6rem, color-mix(in srgb, var(--atlas-ui-reflection) 9%, transparent), transparent 70%),
    var(--paper);
}
.book-cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(46vw, 580px));
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  border-bottom: 1px solid var(--sheet-line);
  background: radial-gradient(60rem 30rem at 85% 40%, #17233a, transparent 70%);
}
.book-cover-inner {
  grid-area: 1 / 1;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  width: auto;
  margin: 0;
  padding: clamp(28px, 5vw, 64px) 0 clamp(26px, 4vw, 48px) max(var(--gutter), calc((100% - var(--measure)) / 2));
}
.book-title {
  flex-basis: 100%;
  margin: 0;
  font: 400 clamp(2.5rem, 6.6vw, 5.6rem)/1.05 "Monoton", "Lexend Exa", sans-serif;
  letter-spacing: 0.01em;
  word-spacing: 0.25em;
  color: #ff8aa8;
  text-shadow:
    0 0 0.04em #fff3,
    0 0 0.22em color-mix(in srgb, var(--atlas-ui-reflection) 70%, transparent),
    0 0 0.6em color-mix(in srgb, var(--atlas-ui-reflection) 35%, transparent);
}
.book-tally {
  margin: 0;
  color: var(--muted);
  font: 400 0.8rem/1.4 var(--mono);
  letter-spacing: 0.03em;
}
.book-tally b {
  color: var(--ink);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.tally-note {
  color: var(--faint);
}
.book-add {
  min-height: 36px;
  padding-block: 0.35rem;
}
.book-art {
  grid-area: 1 / 2;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.04);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%), linear-gradient(0deg, transparent, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 32%), linear-gradient(0deg, transparent, #000 10%);
  mask-composite: intersect;
}
@media (prefers-reduced-motion: no-preference) {
  .book-title {
    animation: tube-flicker 1.1s ease-out both;
  }
  @keyframes tube-flicker {
    0% { opacity: 0.15; }
    12% { opacity: 0.8; }
    16% { opacity: 0.3; }
    24% { opacity: 0.95; }
    30% { opacity: 0.55; }
    100% { opacity: 1; }
  }
}
.book-content {
  padding-block: 22px 30px;
}
.book-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--sheet-line);
}
.book-tools .search-box {
  flex: 1 1 18rem;
  min-height: 50px;
  border-radius: 999px;
  border-color: var(--sheet-line);
  background: #0c1017;
}
.book-tools .search-box input {
  width: 100%;
  min-height: 48px;
}
.book-tools .tabs {
  flex: none;
  margin: 0;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--sheet-line);
  border-radius: 999px;
  background: #0c1017;
}
.book-tools .tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 0.84rem;
}
.book-tools .tabs button:hover {
  color: var(--ink);
}
.book-tools .tabs button[aria-pressed="true"] {
  color: var(--paper-ink);
  background: #1c2431;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--atlas-ui-reflection) 80%, transparent);
}
.tool-select,
.tool-check {
  margin: 0;
}
.tool-select select {
  min-height: 50px;
  padding-inline: 1rem 2.2rem;
  border-radius: 999px;
  border-color: var(--sheet-line);
  background-color: #0c1017;
  color: var(--ink);
  font-size: 0.84rem;
}
.tool-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 50px;
  padding: 0 0.95rem;
  border: 1px solid var(--sheet-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  cursor: pointer;
}
.tool-check .icon {
  width: 15px;
  color: var(--atlas-status-favourite);
}
.tool-check:has(input:checked) {
  color: var(--paper-ink);
  border-color: color-mix(in srgb, var(--atlas-ui-reflection) 60%, var(--sheet-line));
}
.tool-check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--atlas-ui-reflection);
}
.tool-apply {
  min-height: 44px;
  border-radius: 999px;
  padding-inline: 1.1rem;
}
.tool-apply[hidden] {
  display: none;
}
.book-page .ledger-summary {
  flex-wrap: wrap;
  font-family: var(--mono);
}
.sheet-hint {
  color: var(--faint);
  font-size: 0.74rem;
  margin-inline-end: auto;
}
.sheet-wrap {
  overflow-x: auto;
  border: 1px solid var(--sheet-line);
  border-radius: 10px;
  background: #0c1017;
  scrollbar-color: #36404e transparent;
}
.sheet-wrap:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.sheet {
  width: 100%;
  min-width: 62rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  color: var(--ink);
}
.sheet thead th {
  padding: 0.7rem 0.8rem;
  background: var(--sheet-head);
  border-bottom: 1px solid var(--sheet-line);
  color: var(--faint);
  font: 400 0.72rem/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.sheet th,
.sheet td {
  border-inline-end: 1px solid var(--sheet-rule);
  vertical-align: top;
}
.sheet th:last-child,
.sheet td:last-child {
  border-inline-end: 0;
}
.sheet tbody td,
.sheet tbody th {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--sheet-rule);
  text-align: left;
  font-weight: 400;
}
.sheet tbody tr:last-child > * {
  border-bottom: 0;
}
.sheet tbody tr:hover > *,
.sheet tbody tr:target > * {
  background-color: var(--sheet-hover);
}
.sheet tbody tr:target > .c-name {
  box-shadow: inset 2px 0 0 var(--atlas-ui-reflection);
}
.sheet .c-name {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 17rem;
  min-width: 13rem;
  background: #0c1017;
  border-inline-end-color: var(--sheet-line);
}
.sheet thead .c-name,
.sheet thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}
.c-name-in {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.c-name-in > div {
  min-width: 0;
}
.c-thumb {
  flex: none;
  width: 2.75rem;
  aspect-ratio: 1;
  border-radius: 5px;
  overflow: hidden;
  background: #161d28;
}
.c-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sheet .c-name a {
  display: block;
  color: var(--paper-ink);
  font: 300 1.22rem/1.25 "Newsreader", Georgia, serif;
  font-variation-settings: "opsz" 36;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.sheet .c-name a:hover {
  color: #ff8aa8;
}
.c-sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--faint);
  font: 400 0.76rem/1.4 var(--mono);
}
.c-date {
  color: color-mix(in srgb, var(--sodium) 70%, var(--faint));
}
.sheet .c-category {
  width: 9.5rem;
}
.sheet .c-area {
  min-width: 9.5rem;
  width: 9.5rem;
}
.sheet .c-score {
  width: 8.5rem;
  white-space: nowrap;
}
.sheet thead .by-sj { color: var(--atlas-map-pin-visited); }
.sheet thead .by-mk { color: var(--atlas-ui-reflection); }
.sheet .c-status {
  width: 9rem;
}
.sheet .c-note {
  min-width: 15rem;
  color: var(--muted);
}
.sheet .c-fav {
  width: 3rem;
  text-align: center;
}
.sheet .c-vis {
  width: 7rem;
}
.sheet .c-fav > .icon,
.sheet thead .c-fav .icon {
  width: 15px;
  color: var(--atlas-status-favourite);
}
.line-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
}
.line-chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #0c1017, 0 0 0 3px #ffffff22;
}
/* Monoton sets a wide left bearing on K; pull it in so BOOK reads as one word. */
.title-k {
  margin-inline-start: -0.14em;
}
.sheet-unrated {
  color: #3b4554;
}
.sheet-stars,
.star-picker {
  display: inline-flex;
  gap: 2px;
}
.sheet-stars svg,
.star-picker svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #3b4554;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.sheet-stars svg.on,
.star-picker svg.on {
  fill: var(--sodium);
  stroke: var(--sodium);
}
.star-picker button {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: none;
}
.star-picker button:disabled {
  cursor: default;
}
.star-picker:hover svg:not(.on) {
  stroke: #5b6677;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
}
.state.is-visited {
  color: var(--ink);
}
.state .icon {
  width: 15px;
  color: var(--signal);
}
.note-clip,
.cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.sheet select {
  width: 100%;
  min-height: 32px;
  margin: -0.3rem 0;
  padding: 0.2rem 1.6rem 0.2rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: transparent;
  color: inherit;
  font: inherit;
}
.state:empty {
  display: none;
}
.sheet .c-status select {
  margin-block: -0.3rem 0;
  color: var(--muted);
}
.sheet .c-status .state:not(:empty) + select {
  margin-top: 0.3rem;
}
.sheet select:not(:disabled):hover,
.cell-text:not(:disabled):hover {
  border-color: #3a4554;
  background-color: #121a26;
}
.sheet select:disabled {
  opacity: 1;
  color: inherit;
}
.cell-text {
  width: 100%;
  min-height: 32px;
  margin: -0.3rem 0;
  padding: 0.3rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1.45;
  text-align: left;
  cursor: text;
  white-space: pre-line;
}
.cell-text:empty::before {
  content: "Add";
  color: #566170;
}
.cell-input {
  width: 100%;
  margin: -0.3rem 0;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--signal);
  border-radius: 6px;
  background: #0f1622;
  color: var(--paper-ink);
  font: inherit;
  line-height: 1.45;
}
textarea.cell-input {
  min-height: 6.5rem;
  resize: vertical;
}
.fav-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #4a5463;
}
.fav-toggle .icon {
  width: 16px;
}
.fav-toggle[aria-pressed="true"] {
  color: var(--atlas-status-favourite);
}
.fav-toggle[aria-pressed="true"] .icon {
  fill: currentColor;
}
.sheet [data-state="saving"] {
  opacity: 0.6;
}
.sheet td[data-state="saved"] {
  animation: cell-saved 1.2s ease-out;
}
.sheet td[data-state="error"] {
  box-shadow: inset 0 0 0 1px var(--atlas-ui-danger);
}
@keyframes cell-saved {
  from { background-color: color-mix(in srgb, var(--signal) 18%, transparent); }
  to { background-color: transparent; }
}
.sheet-status {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  color: var(--faint);
  font: 400 0.74rem var(--mono);
}
.sheet-status.is-error {
  color: var(--atlas-ui-danger);
}
.book-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--sheet-line);
}
.book-foot a .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.book-foot .editor-account {
  flex-basis: 100%;
}
@media (max-width: 760px) {
  .book-cover {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .book-art {
    grid-area: 1 / 1;
    aspect-ratio: 16 / 10;
    object-position: 78% 60%;
    -webkit-mask-image: linear-gradient(0deg, transparent 4%, #000 55%);
    mask-image: linear-gradient(0deg, transparent 4%, #000 55%);
  }
  .book-cover-inner {
    grid-area: 2 / 1;
    margin-top: -3.2rem;
    padding: 0 var(--gutter) 22px;
  }
  .book-title {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }
  .book-tools .tabs {
    flex: 1 1 100%;
    display: flex;
  }
  .book-tools .tabs button {
    flex: 1 1 0;
    padding-inline: 0.5rem;
  }
  .tool-select {
    flex: 1 1 10rem;
  }
  .tool-select select {
    width: 100%;
  }
  .sheet .c-name {
    width: 11rem;
    min-width: 11rem;
  }
  .sheet .c-name a {
    font-size: 1.08rem;
  }
  .sheet-hint {
    flex-basis: 100%;
    order: 3;
  }
}
