:root {
  color-scheme: light dark;
  --paper: #fbf8f0;
  --map: #e9e4d6;
  --ink: #302c27;
  --soft: #665f54;
  --line: #d9d2c3;
  --tint: #f3eee3;
  --accent: #bb4828;
  --bright: #d8512c;
  --pale: #f8e5d8;
  --glaze: rgb(255 252 243 / 0.9);
  --serif: ui-serif, 'New York', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24251f;
    --map: #302f27;
    --ink: #f2eddf;
    --soft: #bcb4a4;
    --line: #49483d;
    --tint: #302f27;
    --accent: #ffa17d;
    --bright: #c84823;
    --pale: #4c352b;
    --glaze: rgb(40 41 34 / 0.92);
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
svg.ico {
  display: block;
  width: 21px;
  height: 21px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
button {
  transition:
    background-color 0.14s ease,
    color 0.14s ease,
    transform 0.14s ease;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
#guide {
  display: grid;
  height: 100%;
  height: 100dvh;
  grid-template-columns: minmax(0, 1.12fr) minmax(395px, 0.88fr);
  overflow: hidden;
}
#map-stage {
  position: relative;
  isolation: isolate;
  min-height: 0;
  background: var(--map);
  overflow: hidden;
}
#ink-map,
#google-map,
#map-names {
  position: absolute;
  inset: 0;
}
#ink-map {
  background-image: linear-gradient(138deg, transparent, rgba(167, 135, 92, 0.09)),
    url('/landing/atlas/tex/paper.webp');
  background-size: auto, 470px;
}
@media (prefers-color-scheme: dark) {
  #ink-map {
    background-image: url('/landing/atlas/tex/paper-dark.webp');
  }
}
#ink-map canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.85;
}
#map-names {
  pointer-events: none;
}
.map-label {
  position: absolute;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  font: italic clamp(12px, 1.1vw, 17px) var(--serif);
  color: var(--soft);
  text-shadow:
    0 1px 3px var(--paper),
    0 0 6px var(--paper);
  letter-spacing: 0.02em;
}
#rome-mark {
  position: absolute;
  transform: translate(-50%, -100%);
  bottom: auto;
  display: grid;
  justify-items: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 4px rgba(59, 37, 20, 0.15));
}
#rome-mark img {
  width: clamp(105px, 11vw, 176px);
  height: auto;
  display: block;
}
#rome-mark span {
  width: max-content;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 6px 14px 7px;
  font: 600 14px var(--serif);
  color: var(--ink);
  font-style: italic;
}
#rome-mark span::after {
  content: '';
  display: inline-block;
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#brand {
  position: absolute;
  left: clamp(16px, 3vw, 44px);
  top: max(23px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 13px;
  pointer-events: none;
  text-shadow:
    0 1px 7px var(--paper),
    0 0 14px var(--paper);
}
.brand-mark {
  font: 700 38px/0.95 var(--serif);
  letter-spacing: -0.085em;
}
.brand-mark span {
  color: var(--accent);
  font-style: italic;
}
.identity {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 650;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bright);
}
#brand-tag {
  padding-left: 13px;
  border-left: 1px solid currentColor;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 520;
  color: var(--soft);
}
#locate {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
}
.icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.float,
#map-open {
  background: var(--glaze);
  box-shadow: 0 1px 9px #352d2226;
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(9px);
}
#map-action {
  position: absolute;
  bottom: max(32px, env(safe-area-inset-bottom));
  right: 24px;
}
#map-open {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
}
#map-open .ico {
  width: 17px;
}
#credit {
  position: absolute;
  left: 9px;
  bottom: 5px;
  background: var(--glaze);
  color: var(--soft);
  font-size: 10px;
  text-decoration: none;
  padding: 2px 4px;
}
#map-notice {
  position: absolute;
  bottom: 77px;
  right: 16px;
  max-width: 75%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
}
#paper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 30px #39311d0b;
}
#paper-top,
.sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
}
#paper-top {
  min-height: 80px;
  padding: 16px clamp(20px, 3.8vw, 65px);
  border-bottom: 1px solid var(--line);
}
.toolbar,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plain,
.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 4px 9px;
  font-size: 14px;
  color: var(--soft);
  border-radius: 8px;
}
.plain .ico,
.link-action .ico {
  width: 17px;
  height: 17px;
}
.plain:hover,
.flat:hover,
.link-action:hover {
  background: var(--tint);
  color: var(--ink);
}
#map-toggle {
  display: none;
}
#pages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  scroll-padding: 10px;
}
#conversation,
#story {
  max-width: 760px;
  margin: auto;
  padding: clamp(22px, 6vh, 69px) clamp(22px, 3.8vw, 65px) 26px;
}
#welcome {
  padding: min(4vh, 36px) 0 5px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
.story-title {
  font: 500 clamp(40px, 4.25vw, 76px) / 0.99 var(--serif);
  letter-spacing: -0.057em;
  text-wrap: balance;
}
#intro {
  font: 400 clamp(17px, 1.35vw, 22px) / 1.5 var(--serif);
  color: var(--soft);
  margin: 20px 0 0;
  max-width: 36em;
}
#first-questions {
  margin-top: clamp(26px, 5vh, 62px);
}
.eyebrow {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
  color: var(--soft);
  margin: 0 0 8px;
}
.question,
.menu-row,
.product-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
  padding: 13px 0;
}
.question {
  font: 400 clamp(17px, 1.35vw, 21px) / 1.32 var(--serif);
  letter-spacing: -0.018em;
}
.question .ico,
.menu-row > .ico:last-child,
.product-row > .ico:last-child {
  margin-inline-start: auto;
  width: 17px;
  color: var(--accent);
}
.question span,
.menu-row span:first-child {
  flex: 1;
}
.question:first-of-type,
.product-row:first-of-type {
  border-top: 1px solid var(--line);
}
.question:hover,
.menu-row:hover,
.product-row:hover {
  color: var(--accent);
}
#composer {
  padding: 12px clamp(14px, 2vw, 34px) max(18px, env(safe-area-inset-bottom));
  background: var(--paper);
  margin: 0;
  border-top: 1px solid var(--line);
}
#compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 760px;
  margin: auto;
}
#field,
#voice-status {
  display: flex;
  flex: 1;
  align-items: flex-end;
  min-height: 48px;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--tint);
  border-radius: 26px;
  padding: 2px;
}
#field:focus-within {
  border-color: var(--soft);
}
#draft {
  flex: 1;
  min-width: 0;
  height: 42px;
  resize: none;
  line-height: 1.4;
  max-height: 144px;
  outline: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 4px 9px 0;
}
#draft::placeholder {
  color: var(--soft);
}
#send {
  width: 38px;
  height: 38px;
  margin: 2px;
  background: var(--bright);
  color: white;
}
.dock {
  height: 48px;
  width: 48px;
  background: var(--tint);
  border: 1px solid var(--line);
}
#voice {
  background: var(--bright);
  border-color: var(--bright);
  color: white;
}
.compact-send #voice {
  background: var(--tint);
  color: var(--ink);
  border-color: var(--line);
}
#voice.record-send {
  background: var(--bright);
  color: white;
}
#voice-status {
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 7px 13px;
  color: var(--accent);
  font-size: 14px;
}
#voice-level {
  height: 14px;
  width: 14px;
  background: var(--bright);
  border-radius: 50%;
  transform: scale(var(--level, 0.65));
}
#notice {
  font-size: 14px;
  padding: 10px 18px;
  color: var(--accent);
  background: var(--pale);
}
#attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
#attachment img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}
.message {
  margin: 0 0 26px;
  overflow-wrap: anywhere;
}
.message.traveler {
  margin: 6px 0 20px;
  padding: 1px 0 1px 13px;
  border-left: 2px solid var(--bright);
  color: var(--soft);
  font: italic 20px/1.45 var(--serif);
  white-space: pre-wrap;
}
.message.traveler img {
  display: block;
  width: 90px;
  max-height: 110px;
  object-fit: contain;
  margin: 8px 0;
}
.reading,
.story-text {
  font: 400 clamp(18px, 1.35vw, 21px) / 1.55 var(--serif);
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}
.reading p,
.story-text p {
  white-space: pre-line;
  margin: 0 0 0.9em;
}
.answer-title,
.place-title {
  font: 500 clamp(25px, 2vw, 36px) / 1.08 var(--serif);
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin: 0 0 0.45em;
}
.reading-photo {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 14px;
}
.reading-photo img {
  width: 100%;
  height: auto;
  max-height: 54vh;
  object-fit: contain;
  display: block;
}
.place-card {
  padding: 18px 0;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.place-card:hover .place-title {
  color: var(--accent);
}
.place-sub,
.quiet {
  font: 400 14px/1.5 var(--sans);
  color: var(--soft);
}
.place-sub {
  margin-bottom: 5px;
}
.place-copy {
  font: 400 17px/1.45 var(--serif);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overview {
  display: flex;
  gap: 9px;
  overflow: auto;
  margin: 10px 0 15px;
}
.overview button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 5em;
  max-width: 10em;
  font: 500 13px/1.25 var(--sans);
  background: var(--tint);
}
.overview img {
  width: 54px;
  height: 42px;
  object-fit: cover;
  display: block;
  margin: auto auto 4px;
}
.read-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.read-actions button,
.read-actions a {
  color: var(--accent);
  text-decoration: none;
}
.status {
  font-size: 14px;
  color: var(--soft);
  margin: 14px 0;
}
.story-tools {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 6px 0;
  background: var(--paper);
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
#story {
  padding-top: 0;
}
.story-title {
  font-size: clamp(32px, 3.1vw, 50px);
  margin: 10px 0 17px;
}
.sources {
  padding: 6px 0;
  font-size: 14px;
}
.sources summary {
  color: var(--accent);
  cursor: pointer;
  min-height: 38px;
  align-content: center;
}
.sources a,
.credits a {
  display: block;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.sources ul {
  padding-left: 18px;
}
.commit-status {
  color: var(--soft);
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  width: min(500px, calc(100vw - 32px));
  max-height: min(83dvh, 850px);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #29271f60;
  backdrop-filter: blur(3px);
}
.sheet-bar {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 13px 16px 13px 25px;
}
.sheet-bar h2 {
  flex: 1;
  font: 500 28px/1.15 var(--serif);
  letter-spacing: -0.045em;
}
#sheet-body {
  padding: 22px 25px 25px;
}
#sheet-body p {
  line-height: 1.5;
  margin: 0 0 14px;
}
#sheet-body details {
  margin: 12px 0;
  font-size: 14px;
}
#sheet-body summary {
  color: var(--accent);
  cursor: pointer;
}
.primary,
.secondary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-height: 44px;
  color: white;
  background: var(--bright);
  font-weight: 600;
  border-radius: 13px;
}
.secondary {
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--line);
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.menu-row {
  font-size: 15px;
  justify-content: space-between;
  text-decoration: none;
  color: var(--ink);
}
.menu-row .ico {
  flex: none;
}
.menu-row select {
  max-width: 52%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  padding: 6px;
}
.menu-row input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.entry {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--tint);
  color: var(--ink);
  font: inherit;
}
.section {
  margin-top: 22px;
}
.pass-heading {
  font: 500 30px/1.08 var(--serif);
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}
.product-row .duration {
  font: 500 21px var(--serif);
  flex: 1;
}
.price {
  font-size: 15px;
  font-weight: 600;
}
.feedback {
  font-size: 14px;
  color: var(--accent);
  white-space: pre-line;
}
.product-row > .ico:last-child {
  margin: 0;
  width: 16px;
}
.form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.form-inline input {
  min-width: 0;
}
.history-row {
  width: 100%;
  text-align: left;
  white-space: pre-line;
}
.result-summary {
  font: 500 20px var(--serif);
}
.conversation-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#viewer {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: #111;
  color: white;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  margin: 0;
}
.viewer-nav,
#photo-nav {
  position: absolute;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  inset: env(safe-area-inset-top) 0 auto;
  padding: 10px 16px;
}
.viewer-nav button,
#photo-nav button {
  background: #252525ed;
  color: white;
}
#full-photo {
  position: absolute;
  inset: 60px 0;
  display: grid;
  place-items: center;
}
#full-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#photo-nav {
  inset: auto 0 env(safe-area-inset-bottom);
}
#photo-credit {
  position: absolute;
  z-index: 2;
  bottom: 65px;
  right: 20px;
  left: 20px;
  max-width: 400px;
  margin-left: auto;
  max-height: 55%;
  overflow: auto;
  padding: 16px;
  background: #272722;
  border-radius: 12px;
  color: #eee;
}
#photo-credit a {
  color: #ffc1a5;
}
@media (max-width: 760px) {
  #guide {
    display: flex;
    flex-direction: column;
  }
  #map-stage {
    height: 31%;
    height: clamp(170px, 30dvh, 330px);
    flex: none;
  }
  #paper {
    flex: 1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  #brand {
    left: 15px;
    top: max(14px, env(safe-area-inset-top));
    gap: 9px;
  }
  .brand-mark {
    font-size: 32px;
  }
  #brand-tag {
    font-size: 12px;
    padding-left: 9px;
  }
  #locate {
    right: 14px;
    top: max(11px, env(safe-area-inset-top));
  }
  #rome-mark img {
    width: 80px;
  }
  #rome-mark span {
    font-size: 12px;
    padding: 3px 9px;
  }
  #map-action {
    bottom: 10px;
    right: 12px;
  }
  #map-open {
    min-height: 36px;
    font-size: 12px;
    padding: 0 11px;
  }
  #paper-top {
    min-height: 48px;
    padding: 2px 14px 2px 19px;
  }
  .toolbar {
    gap: 0;
  }
  #map-toggle {
    display: grid;
  }
  .toolbar .plain {
    padding-inline: 8px;
  }
  #conversation,
  #story {
    padding: 18px 21px;
  }
  #story {
    padding-top: 0;
  }
  #welcome {
    padding: 0;
  }
  h1 {
    font-size: clamp(34px, 7.65vw, 47px);
    line-height: 1.04;
  }
  #intro {
    font-size: 17px;
    line-height: 1.35;
    margin-top: 9px;
  }
  #first-questions {
    margin-top: 22px;
  }
  .question {
    padding: 11px 0;
    font-size: 17px;
  }
  .eyebrow {
    font-size: 12px;
  }
  .message.traveler {
    font-size: 18px;
  }
  .reading {
    font-size: 18px;
  }
  #composer {
    padding: 9px 11px max(9px, env(safe-area-inset-bottom));
  }
  #compose-row {
    gap: 6px;
  }
  .dock {
    width: 44px;
    height: 44px;
  }
  #field {
    min-height: 44px;
  }
  #draft {
    height: 38px;
    padding-top: 8px;
  }
  #photo {
    width: 38px;
    height: 38px;
  }
  #send {
    width: 34px;
    height: 34px;
  }
  #guide.map-full #map-stage {
    flex: 1;
    height: auto;
  }
  #guide.map-full #paper {
    flex: none;
  }
  #guide.map-full #pages {
    display: none;
  }
  #guide.compact:not(.map-full) #map-stage {
    height: clamp(110px, 22dvh, 240px);
  }
  dialog {
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    width: min(100%, 520px);
    max-width: 100%;
    margin: auto auto 0;
  }
  .map-label {
    font-size: 12px;
  }
  #viewer {
    margin: 0;
  }
  #sheet-body {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}
@media (max-height: 560px) and (max-width: 760px) {
  #map-stage,
  #guide.compact:not(.map-full) #map-stage {
    height: 72px;
  }
  #guide.map-full #map-stage {
    height: auto;
  }
  #rome-mark,
  #map-action {
    display: none;
  }
  #paper-top {
    min-height: 40px;
  }
  .float {
    height: 38px;
    width: 38px;
  }
  #composer {
    padding-block: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.card-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 38vh;
  object-fit: contain;
  margin: 0 0 11px;
}
.credits {
  margin: 10px 0;
}
.credits .quiet {
  margin: 4px 0 !important;
}
.reading .place-card .place-copy {
  white-space: normal;
}
.reading a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.receipt-address {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0;
}
#welcome-language {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}
#welcome-language select {
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px 1px;
  max-width: 13em;
}
::highlight(piko-reading) {
  background: var(--pale);
  color: var(--ink);
}
.reading-now {
  background: var(--pale);
  border-radius: 3px;
}
.selection-listen {
  position: fixed;
  z-index: 8;
  max-width: 80vw;
  box-shadow: 0 4px 22px #0002;
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 12px;
}
