:root {
  color-scheme: light;
  --ink: #142e45;
  --muted: #667785;
  --blue: #2162db;
  --line: #e0e7ed;
  --amber: #ffbd59;
  --surface: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: #edf2f5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #7eaafa;
  outline-offset: 3px;
}
button {
  color: inherit;
}
button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
a {
  color: var(--blue);
}
[hidden] {
  display: none !important;
}
.app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -0.6px;
}
.brand b {
  font-weight: 750;
}
.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--amber);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 700;
}
.edition {
  font-size: 12px;
  letter-spacing: 2.2px;
  font-weight: 700;
  color: #718290;
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 21px;
}
main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#map {
  position: absolute;
  inset: 0;
}
.workspace {
  position: absolute;
  z-index: 2;
  top: 24px;
  bottom: 36px;
  left: 24px;
  width: 350px;
  background: var(--surface);
  border: 1px solid #dde5ed;
  border-radius: 22px;
  box-shadow: 0 10px 40px #16395015;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.region-row {
  padding: 24px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.region-row label,
.eyebrow,
.list-title {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1.5px;
  color: var(--muted);
}
select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #142e45 50%) calc(100% - 17px)
      50%/6px 6px no-repeat,
    linear-gradient(135deg, #142e45 50%, transparent 50%) calc(100% - 11px)
      50%/6px 6px no-repeat,
    #fff;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 26px 10px 0;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.6px;
  min-height: 46px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.tabs {
  display: flex;
  background: #edf2f7;
  border-radius: 12px;
  padding: 4px;
  margin: 0 20px 18px;
}
.tabs button {
  border: 0;
  background: none;
  flex: 1;
  padding: 11px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 650;
}
.tabs button[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 2px 6px #142e4510;
}
.tabs span {
  margin-left: 5px;
  color: #c98a19;
}
#explore-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.search-wrap {
  position: relative;
  margin: 0 20px 20px;
}
.search-wrap svg {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 14px;
  left: 13px;
  fill: none;
  stroke: #72818f;
  stroke-width: 1.8;
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px 12px 12px 40px;
  border-radius: 11px;
  font-size: 16px;
  min-height: 46px;
}
.list-title {
  display: flex;
  justify-content: space-between;
  padding: 0 24px 10px;
  font-size: 11px;
}
.street-list {
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  padding: 0 12px 12px;
}
.street-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  width: 100%;
  background: white;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: 15px;
  line-height: 1.3;
  min-height: 52px;
  border-radius: 8px;
}
.street-row:hover,
.street-row.active {
  background: #edf3ff;
}
.street-row.active {
  color: var(--blue);
}
.street-mark {
  width: 20px;
  height: 3px;
  background: #a7b8c5;
  border-radius: 2px;
  flex-shrink: 0;
  transform: rotate(-38deg);
}
.street-row.active .street-mark {
  background: var(--blue);
}
.street-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.panel-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.tiny-compass {
  font-weight: 800;
  color: #8395a7;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.map-tools {
  position: absolute;
  right: 24px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-button {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 3px 12px #142e4510;
}
.map-button.active {
  color: var(--blue);
  background: #edf3ff;
}
.labels-button {
  font-weight: 700;
  font-size: 17px;
}
.map-hint {
  position: absolute;
  bottom: 36px;
  left: calc(50% + 130px);
  transform: translateX(-50%);
  background: #fffffff0;
  padding: 10px 16px;
  border-radius: 30px;
  white-space: nowrap;
  font-size: 12px;
  box-shadow: 0 3px 20px #142e450a;
  color: #526676;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hint-line {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}
.loading {
  position: absolute;
  inset: 0;
  background: #edf2f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 5;
  font-size: 16px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #c8d5e3;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.empty-state {
  padding: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.street-card {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 38px;
  width: 360px;
  max-height: 65%;
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  padding: 25px;
  box-shadow: 0 14px 55px #142e4525;
  border: 1px solid var(--line);
}
.close-button {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 40px;
  height: 40px;
  font-size: 27px;
  font-weight: 300;
  border: 0;
  background: #f1f4f7;
  border-radius: 50%;
}
.street-card h2 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.7px;
  margin: 14px 30px 8px 0;
}
.street-card p {
  font-size: 15px;
  line-height: 1.6;
}
.street-card .armenian {
  font-size: 15px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  margin: 20px 0;
}
.fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.fact b {
  font-size: 16px;
  font-weight: 650;
}
.source-link {
  font-size: 13px;
  display: inline-block;
  margin: 6px 14px 0 0;
}
.chip {
  display: inline-block;
  color: #467061;
  background: #e8f3ee;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12px;
}
.primary,
.secondary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 48px;
  font-size: 16px;
  font-weight: 650;
}
.primary {
  background: var(--blue);
  color: white;
}
.secondary {
  background: #edf2f7;
  color: var(--ink);
}
#quiz-panel {
  overflow: auto;
  padding: 0 24px 24px;
  flex: 1;
  min-height: 0;
}
#quiz-panel h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 7px 0 12px;
}
#quiz-panel p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.quiz-mode {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  margin-bottom: 10px;
  min-height: 84px;
}
.quiz-mode.selected {
  border-color: var(--blue);
  background: #f2f6ff;
}
.mode-icon {
  color: var(--blue);
  font-size: 23px;
  width: 26px;
  flex-shrink: 0;
}
.quiz-mode b {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}
.quiz-mode small {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.quiz-settings {
  margin: 20px 0;
}
.quiz-settings label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
}
.quiz-settings input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.text-button {
  border: 0;
  background: none;
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}
.progress {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.progress span {
  height: 4px;
  flex: 1;
  background: #e7edf3;
  border-radius: 4px;
}
.progress .current {
  background: var(--blue);
}
.progress .correct {
  background: #258b64;
}
.progress .wrong {
  background: #df8b64;
}
.answer-option {
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  padding: 14px;
  margin: 0 0 8px;
  border-radius: 11px;
  min-height: 48px;
  font-size: 15px;
  line-height: 1.35;
}
.answer-option:not(:disabled):hover {
  background: #f1f6ff;
  border-color: #9bbbf3;
}
.answer-option.correct {
  background: #e8f6ee;
  border-color: #5fa883;
  color: #216543;
  opacity: 1;
}
.answer-option.wrong {
  background: #fff0ea;
  border-color: #dc9c7f;
  color: #974b2b;
  opacity: 1;
}
.feedback {
  background: #eff5fc;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
  line-height: 1.5;
  font-size: 15px;
}
.feedback.good {
  background: #e8f6ee;
}
.feedback b {
  display: block;
  margin-bottom: 5px;
}
.score-big {
  font-size: 66px;
  font-weight: 750;
  letter-spacing: -4px;
  color: var(--blue);
  margin: 16px 0;
}
.review-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 14px;
  display: flex;
  gap: 10px;
}
.review-row span {
  color: #bf6b42;
}
.review-row.ok span {
  color: #258b64;
}
.quiz-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}
#toast {
  position: absolute;
  z-index: 10;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: var(--ink);
  color: #fff;
  padding: 13px 19px;
  border-radius: 12px;
  box-shadow: 0 5px 25px #142e4530;
  font-size: 14px;
  line-height: 1.5;
  pointer-events: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  max-width: 470px;
  width: calc(100% - 36px);
  padding: 30px;
  color: var(--ink);
  max-height: 85dvh;
}
dialog::backdrop {
  background: #142e4566;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
}
dialog p {
  font-size: 15px;
  line-height: 1.6;
}
dialog a {
  font-size: 13px;
}
.no-js {
  position: fixed;
  inset: 0;
  background: white;
  padding: 40px;
}
.maplibregl-ctrl-attrib {
  font-size: 11px !important;
}
.maplibregl-ctrl-bottom-right {
  max-width: 100%;
}
.maplibregl-canvas:focus-visible {
  outline: none;
}
@media (max-width: 700px) {
  .topbar {
    height: 60px;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
  .brand {
    font-size: 19px;
    gap: 9px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 23px;
  }
  .edition {
    display: none;
  }
  .icon-button {
    width: 36px;
    height: 36px;
  }
  .workspace {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 39%;
    min-height: 230px;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    box-shadow: 0 -5px 30px #142e4510;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .region-row {
    padding: 16px 20px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    align-items: center;
  }
  .region-row label {
    font-size: 10px;
    grid-column: 1/-1;
  }
  .region-row select {
    font-size: 21px;
    min-height: 36px;
    padding: 0 26px 4px 0;
    border: 0;
  }
  .region-row .muted {
    font-size: 12px;
    max-width: 145px;
    text-align: right;
  }
  .tabs {
    position: absolute;
    right: 17px;
    top: 48px;
    margin: 0;
    padding: 3px;
    width: 150px;
    display: none;
  }
  .region-row select {
    width: 60%;
  }
  .workspace .tabs {
    display: flex;
    top: 15px;
    width: 135px;
  }
  .tabs button {
    font-size: 13px;
    padding: 9px 8px;
  }
  .tabs span {
    display: none;
  }
  .region-row label {
    max-width: 50%;
  }
  .region-row .muted {
    grid-column: 1/-1;
    text-align: left;
    max-width: none;
    margin-top: 0;
  }
  .region-row select {
    grid-column: 1/-1;
  }
  .search-wrap {
    margin: 0 16px 8px;
  }
  .search-wrap input {
    padding-block: 10px;
    min-height: 42px;
  }
  .search-wrap svg {
    top: 12px;
  }
  .list-title {
    padding: 0 20px 6px;
    font-size: 10px;
  }
  .street-list {
    padding: 0 8px 8px;
  }
  .street-row {
    padding: 11px 12px;
    min-height: 47px;
    font-size: 15px;
  }
  .panel-footer {
    display: none;
  }
  .map-tools {
    top: 16px;
    right: 14px;
    gap: 8px;
  }
  .map-button {
    width: 43px;
    height: 43px;
    border-radius: 12px;
  }
  .map-hint {
    bottom: calc(39% + 20px);
    left: 50%;
    font-size: 11px;
    padding: 8px 12px;
  }
  .street-card {
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 56%;
    padding: 22px 22px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .street-card h2 {
    font-size: 24px;
  }
  .facts {
    margin: 14px 0;
    padding: 13px 0;
  }
  .street-card p {
    font-size: 14px;
  }
  .maplibregl-ctrl-bottom-right {
    bottom: 39%;
  }
  .maplibregl-ctrl-bottom-left {
    bottom: 39%;
  }
  .workspace.quiz-active {
    height: 48%;
    min-height: 310px;
  }
  .quiz-active ~ .map-hint {
    bottom: calc(48% + 18px);
  }
  body.in-quiz .maplibregl-ctrl-bottom-right,
  body.in-quiz .maplibregl-ctrl-bottom-left {
    bottom: 48%;
  }
  #quiz-panel {
    padding: 0 20px 18px;
  }
  #quiz-panel h2 {
    font-size: 22px;
    margin: 6px 0 10px;
  }
  #quiz-panel p {
    margin: 8px 0;
    font-size: 13px;
  }
  .quiz-mode {
    min-height: 62px;
    padding: 12px;
    margin-bottom: 8px;
  }
  .quiz-mode b {
    font-size: 15px;
    margin-bottom: 3px;
  }
  .quiz-mode small {
    font-size: 12px;
  }
  .quiz-settings {
    margin: 12px 0;
  }
  .quiz-settings label {
    font-size: 13px;
  }
  .quiz-meta {
    margin-bottom: 8px;
    font-size: 12px;
  }
  .progress {
    margin-bottom: 12px;
  }
  .answer-option {
    padding: 11px 12px;
    font-size: 14px;
    min-height: 44px;
    margin-bottom: 6px;
  }
  .quiz-actions {
    margin-top: 12px;
  }
  .feedback {
    margin: 10px 0;
    padding: 12px;
    font-size: 14px;
  }
  #toast {
    bottom: calc(48% + 15px);
    width: max-content;
    max-width: calc(100% - 32px);
  }
  .score-big {
    font-size: 48px;
    margin: 8px 0;
  }
  .loading {
    flex-direction: column;
  }
}
@media (max-height: 700px) and (max-width: 700px) {
  .workspace {
    height: 43%;
    min-height: 220px;
  }
  .workspace.quiz-active {
    height: 52%;
    min-height: 270px;
  }
  .map-hint {
    bottom: calc(43% + 14px);
  }
  .quiz-active ~ .map-hint {
    bottom: calc(52% + 14px);
  }
  .maplibregl-ctrl-bottom-right,
  .maplibregl-ctrl-bottom-left {
    bottom: 43%;
  }
  body.in-quiz .maplibregl-ctrl-bottom-right,
  body.in-quiz .maplibregl-ctrl-bottom-left {
    bottom: 52%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) {
  .map-hint {
    bottom: calc(39% + 44px);
  }
  .quiz-active ~ .map-hint {
    bottom: calc(48% + 44px);
  }
  body.quiz-running .workspace {
    height: 54%;
    min-height: 335px;
  }
  body.quiz-running .region-row {
    padding: 12px 20px 8px;
  }
  body.quiz-running .region-row label,
  body.quiz-running #street-count {
    display: none;
  }
  body.quiz-running .region-row select {
    min-height: 36px;
  }
  body.quiz-running .workspace .tabs {
    top: 12px;
  }
  body.quiz-running .quiz-meta .text-button {
    padding: 6px 0;
  }
  body.quiz-running #quiz-panel h2 {
    font-size: 20px;
  }
  body.quiz-running .map-hint {
    bottom: calc(54% + 44px);
  }
  body.quiz-running .maplibregl-ctrl-bottom-right,
  body.quiz-running .maplibregl-ctrl-bottom-left {
    bottom: 54%;
  }
  body.quiz-finding .workspace {
    height: 40%;
    min-height: 300px;
  }
  body.quiz-finding .map-hint {
    bottom: calc(40% + 44px);
  }
  body.quiz-finding .maplibregl-ctrl-bottom-right,
  body.quiz-finding .maplibregl-ctrl-bottom-left {
    bottom: 40%;
  }
}
.label-settings {
  position: absolute;
  z-index: 6;
  right: 80px;
  top: 24px;
  width: 265px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 35px #142e4520;
}
.label-settings > b {
  display: block;
  margin-bottom: 18px;
}
.label-settings label {
  display: block;
  font-size: 14px;
  color: var(--muted);
}
.label-settings select {
  width: 100%;
  font-size: 16px;
  min-height: 44px;
  margin: 5px 0 16px;
  letter-spacing: 0;
}
.label-settings .check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
}
.check-label input {
  width: 21px;
  height: 21px;
  accent-color: var(--blue);
}
.label-settings p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 0;
}
.origin-text {
  border-left: 3px solid #ffbd59;
  padding-left: 12px;
}
@media (max-width: 700px) {
  .label-settings {
    top: 14px;
    right: 66px;
    width: min(265px, calc(100% - 80px));
  }
}
/* Multi-district picker and locally authored street stories. */
.region-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0 10px;
  text-align: left;
  min-height: 46px;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.6px;
}
.region-button #region-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.region-button > span:last-child {
  color: var(--muted);
  font-size: 20px;
}
.region-label {
  line-height: 1.4;
}
#region-dialog {
  padding: 28px 24px 18px;
  max-width: 490px;
  overflow: auto;
}
#region-dialog h2 {
  margin: 14px 26px 8px 0;
}
#region-dialog form > p {
  margin: 8px 0 16px;
}
.district-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 55px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  cursor: pointer;
}
.district-choice input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.district-choice small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.all-regions {
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}
.region-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.region-actions {
  position: sticky;
  bottom: -18px;
  background: #fff;
  padding: 16px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.region-actions .muted {
  font-size: 13px;
}
#region-error {
  color: #ad3a30;
}
.street-story {
  margin-top: 24px;
}
.street-story > p {
  font-size: 16px;
  line-height: 1.65;
  margin: 10px 0;
}
.story-sources,
.wiki-fallback {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}
.story-sources summary,
.wiki-fallback summary {
  cursor: pointer;
  padding: 8px 0;
  min-height: 38px;
}
.story-sources .source-link {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.curation-note {
  display: block;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .region-row .region-label {
    font-size: 10px;
    grid-column: 1/-1;
    max-width: 50%;
  }
  .region-row .region-button {
    grid-column: 1/-1;
    width: calc(100% - 142px);
    font-size: 20px;
    min-height: 36px;
    padding: 0;
    border: 0;
  }
  body.quiz-running .region-label {
    display: none;
  }
  body.quiz-running .region-button {
    font-size: 17px;
  }
  .street-story > p {
    font-size: 15px;
  }
  #region-dialog {
    max-height: 90dvh;
    padding: 24px 20px 16px;
  }
  .region-options {
    gap: 0 12px;
  }
  .district-choice {
    font-size: 14px;
    gap: 9px;
    line-height: 1.3;
  }
  .district-choice small {
    font-size: 11px;
  }
  .region-actions {
    bottom: -16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .curation-note {
    margin: 8px 0;
    font-size: 11px;
  }
}
@media (max-width: 350px) {
  .region-options {
    grid-template-columns: 1fr;
  }
  .region-row .region-button {
    font-size: 17px;
  }
}

/* Long-form street reading: a map sheet can expand into a comfortable article. */
.street-card {
  width: 440px;
  max-height: 76%;
  padding: 24px;
  scroll-padding-top: 165px;
  overscroll-behavior: contain;
}
.street-card.expanded {
  width: min(660px, calc(100% - 48px));
  max-height: calc(100% - 36px);
  bottom: 18px;
}
.street-card-header {
  position: sticky;
  top: -24px;
  z-index: 2;
  background: #fff;
  margin: -24px -24px 0;
  padding: 12px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-actions {
  display: flex;
  gap: 6px;
}
.card-control {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f4f7;
  font-size: 24px;
}
.street-card-header h2 {
  margin: 4px 0 8px !important;
}
.street-story {
  margin-top: 20px;
}
.street-story .story-lead {
  color: #4d6475;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 18px;
}
.story-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 15px;
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 24px;
}
.story-contents a {
  font-size: 13px;
  text-decoration: none;
  padding: 8px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.story-section {
  margin: 28px 0;
  scroll-margin-top: 5px;
}
.story-section h3 {
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
}
.story-section p {
  font-size: 15px;
  line-height: 1.75;
  margin: 10px 0;
}
.person-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 8px 0 12px;
}
.person-heading b {
  font-size: 18px;
}
.person-heading span {
  font-size: 14px;
  color: #6b7884;
  font-variant-numeric: tabular-nums;
}
.citation {
  font-size: 11px;
  vertical-align: super;
  white-space: nowrap;
  text-decoration: none;
  padding: 1px 2px;
}
.story-facts {
  padding-left: 19px;
  margin: 10px 0;
}
.story-facts li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
  padding-left: 3px;
}
.street-landmarks {
  list-style: none;
  padding: 0;
}
.street-landmarks li {
  border-left: 3px solid #ffbd59;
  padding: 1px 0 3px 14px;
  margin: 18px 0;
}
.street-landmarks h4 {
  font-size: 16px;
  margin: 0 0 6px;
}
.landmark-address {
  font-size: 13px;
  color: #6b7884;
  line-height: 1.4;
}
.street-landmarks p {
  margin: 8px 0;
  font-size: 14px;
}
.coverage-note {
  padding: 13px 15px;
  background: #f4f7fa;
  border-radius: 10px;
  color: #647789;
  font-size: 13px;
  line-height: 1.55;
  margin: 20px 0;
}
.story-sources ol {
  padding-left: 22px;
}
.story-sources li {
  margin: 12px 0;
  line-height: 1.5;
}
.story-sources a {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.map-facts {
  margin: 16px 0;
  color: var(--ink);
}
.map-facts > summary {
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.map-facts .facts {
  margin: 0 0 15px;
  border-top: 0;
}
@media (max-width: 700px) {
  .street-card {
    width: auto;
    max-height: 56%;
    padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
    scroll-padding-top: 155px;
  }
  .street-card.expanded {
    width: auto;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 94%;
    height: 94%;
    border-radius: 20px 20px 0 0;
  }
  .street-card-header {
    top: -22px;
    margin: -22px -22px 0;
    padding: 10px 22px 14px;
  }
  .street-card-header h2 {
    font-size: 23px;
  }
  .card-control {
    width: 44px;
    height: 44px;
  }
  .street-card .armenian {
    font-size: 13px;
  }
  .story-section p,
  .story-facts li {
    font-size: 16px;
  }
  .story-section h3 {
    font-size: 18px;
  }
  .street-story .story-lead {
    font-size: 14px;
  }
  .story-contents {
    gap: 6px 14px;
  }
  .street-card.expanded .street-story {
    padding-bottom: 12px;
  }
}

.card-control.expand-control {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.related-street {
  margin: 12px 0 24px;
  padding: 14px 16px;
  min-height: 44px;
  width: 100%;
  text-align: left;
  border: 1px solid #dde5e9;
  border-radius: 12px;
  background: #f5f8fa;
  color: #263d4d;
  line-height: 1.5;
}

.quiz-scope {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.quiz-scope legend {
  font-weight: 650;
  margin-bottom: 6px;
  font-size: 14px;
}
.quiz-scope label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
}
.quiz-scope input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}
.quiz-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 0 0 18px;
  border: 0;
  border-radius: 8px;
  appearance: none;
  background: #e7edf3;
}
.quiz-progress::-webkit-progress-bar {
  background: #e7edf3;
  border-radius: 8px;
}
.quiz-progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 8px;
}
.quiz-progress::-moz-progress-bar {
  background: var(--blue);
  border-radius: 8px;
}
#typed-answer-form > label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 12px 0 8px;
}
#typed-answer {
  width: 100%;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  border: 1px solid #b5c7d8;
  border-radius: 10px;
  padding: 12px;
  background: white;
  color: var(--ink);
}
#typed-answer:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
#answer-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 12px;
}
#answer-suggestions {
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 12px;
  overscroll-behavior: contain;
}
#answer-suggestions button {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}
#answer-suggestions button[aria-selected="true"],
#answer-suggestions button:hover {
  background: #eaf1ff;
  color: #174bad;
}
#quiz-panel #answer-error {
  color: #a64126;
}
.quiz-learning {
  border: 1px solid #dce5ed;
  background: #f5f8fb;
  border-radius: 12px;
  padding: 15px;
  margin: 16px 0;
}
.quiz-learning h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.quiz-learning ul {
  padding-left: 18px;
  margin: 0;
}
.quiz-learning li {
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0;
}
.quiz-learning li a {
  font-size: 12px;
  white-space: nowrap;
}
.quiz-learning .text-button {
  color: var(--blue);
  min-height: 44px;
  text-align: left;
}
@media (max-width: 700px) {
  .quiz-mode {
    min-height: 68px;
    padding: 12px;
  }
}
