:root {
  color-scheme: light;
  --ink: #1d2522;
  --muted: #66716c;
  --line: #d9dfd9;
  --paper: #f7f4ec;
  --panel: #fffdf8;
  --accent: #0e7c66;
  --accent-dark: #095545;
  --sun: #f0b84f;
  --berry: #9a3f5b;
  --blue: #366a9f;
  --shadow: 0 18px 50px rgba(31, 43, 37, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "hero map"
    "panel map";
  overflow: hidden;
}

.hero-panel {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(255, 253, 248, 0.92)),
    url("https://images.unsplash.com/photo-1538485399081-7191377e8241?auto=format&fit=crop&w=1000&q=80") center/cover;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topbar,
.status-grid,
.tabs,
.chip-row,
.place-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.trust-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 760;
}

.trust-links a {
  color: var(--accent-dark);
  text-decoration: none;
}

.trust-links a:hover {
  text-decoration: underline;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-dark);
  color: white;
  font-weight: 800;
}

.language-select,
.floating-search input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
}

.language-select {
  min-width: 132px;
  padding: 10px 12px;
}

.hero-copy {
  margin: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-weight: 760;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-panel h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.98;
}

.intro {
  max-width: 34rem;
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #42504a;
}

.status-grid {
  gap: 10px;
}

.status-grid article {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(9, 85, 69, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
}

.status-grid strong,
.status-grid span {
  display: block;
}

.status-grid strong {
  font-size: 1.35rem;
  line-height: 1;
}

.status-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.map-stage {
  grid-area: map;
  position: relative;
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(14, 124, 102, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(14, 124, 102, 0.12) 1px, transparent 1px),
    #eef3ed;
  background-size: 52px 52px;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.map-fallback {
  position: absolute;
  inset: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  color: var(--accent-dark);
  border: 1px dashed rgba(9, 85, 69, 0.35);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.66);
}

.map-fallback span {
  color: var(--muted);
}

.floating-search {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.floating-search input {
  width: 100%;
  padding: 15px 16px;
  box-shadow: var(--shadow);
}

.locate-button {
  position: absolute;
  top: 76px;
  left: 18px;
  z-index: 2;
  max-width: min(260px, calc(100% - 36px));
  padding: 11px 14px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  color: #1d4ed8;
  box-shadow: var(--shadow);
  font-weight: 820;
}

.locate-button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.locate-button.error {
  background: #fff1f2;
  border-color: rgba(190, 18, 60, 0.28);
  color: #be123c;
}

.locate-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.control-panel {
  grid-area: panel;
  min-height: 0;
  padding: 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  gap: 6px;
  padding-bottom: 12px;
  background: var(--panel);
}

@media (min-width: 901px) {
  body {
    overflow: hidden;
  }

  main {
    height: 100vh;
    overflow: hidden;
  }

  .seo-guide {
    display: none;
  }

  .card-list,
  .quest-list,
  .history-list {
    padding-bottom: 20px;
  }

  .place-card {
    grid-template-columns: 1fr;
  }

  .place-actions {
    flex-direction: row;
    justify-content: stretch;
    padding: 10px 12px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .place-actions > * {
    flex: 1;
  }

  .icon-button,
  .icon-link {
    width: 100%;
    height: 36px;
  }
}

.tab,
.chip,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.tab {
  flex: 1;
  padding: 11px 8px;
  font-weight: 740;
}

.tab.active,
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.chip-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  padding: 9px 12px;
}

.card-list,
.quest-list,
.history-list {
  display: grid;
  gap: 12px;
}

.place-card,
.quest-card,
.history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 26px rgba(31, 43, 37, 0.06);
}

.place-card {
  display: grid;
  grid-template-columns: 1fr auto;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.place-card.selected {
  border-color: var(--accent-dark);
  box-shadow: 0 14px 34px rgba(9, 85, 69, 0.16);
}

.place-card.visited {
  background: linear-gradient(90deg, rgba(240, 184, 79, 0.14), white 42%);
}

.place-main {
  min-width: 0;
  padding: 14px;
  border: 0;
  text-align: left;
  background: transparent;
  color: inherit;
}

.category-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
}

.category-pill.food {
  background: var(--berry);
}

.category-pill.walk {
  background: var(--accent);
}

.category-pill.history {
  background: var(--blue);
}

.place-main h2,
.quest-card h2,
.history-card h2 {
  margin: 9px 0 6px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.place-main p,
.quest-card p,
.history-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3ed;
  color: #41514b;
  font-size: 0.72rem;
  font-weight: 760;
}

.place-main small {
  display: block;
  margin-top: 9px;
  color: #7d877f;
}

.visit-time {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(240, 184, 79, 0.18);
  color: #6b4b0e;
  font-weight: 760;
}

.place-actions {
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border-left: 1px solid var(--line);
}

.icon-button,
.icon-link {
  min-width: 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 820;
}

.like-button {
  min-width: 54px;
  padding: 0 8px;
  white-space: nowrap;
}

.like-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button.active {
  background: var(--sun);
  border-color: var(--sun);
  color: #2f2107;
}

.stamp-button.active {
  box-shadow: inset 0 0 0 2px rgba(47, 33, 7, 0.14);
}

.directions-link {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.website-link {
  background: #fff7df;
  border-color: rgba(240, 184, 79, 0.45);
  color: #6b4b0e;
}

.hidden {
  display: none !important;
}

.quest-card,
.history-card {
  padding: 16px;
}

.quest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.quest-meta span {
  padding: 6px 8px;
  border-radius: 8px;
  background: #f0f4ef;
  color: #41514b;
  font-size: 0.78rem;
}

.quest-card button,
.secondary-button {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.quest-card button {
  border: 0;
  border-radius: 8px;
  background: var(--accent-dark);
  color: white;
}

.history-list {
  margin-top: 14px;
}

.history-item {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.history-item span {
  display: block;
  margin-top: 4px;
  color: #6b4b0e;
  font-size: 0.82rem;
}

.place-info-window {
  max-width: 250px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.place-info-window strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.place-info-window p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.4;
}

.place-info-window .info-checked {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(240, 184, 79, 0.22);
  color: #6b4b0e;
  font-weight: 760;
}

.place-info-window .info-tags {
  margin: 8px 0;
}

.info-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 10px;
}

.info-actions button,
.info-actions a {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 0;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.info-actions button {
  background: var(--sun);
  color: #2f2107;
}

.info-actions a {
  background: var(--accent-dark);
  color: white;
}

[dir="rtl"] .hero-panel,
[dir="rtl"] .place-main {
  text-align: right;
}

[dir="rtl"] .control-panel {
  border-left: 0;
  border-right: 1px solid var(--line);
}

.seo-guide {
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.seo-guide.alt {
  background: #eef3ed;
}

.guide-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.seo-guide h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

.seo-guide p {
  max-width: 860px;
  margin: 16px 0 0;
  color: #42504a;
  line-height: 1.72;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.guide-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.guide-grid h3,
.faq-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.guide-grid p {
  margin: 0;
  font-size: 0.94rem;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.fact-list div,
.faq-block details {
  padding: 16px;
  border: 1px solid rgba(9, 85, 69, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
}

.fact-list dt {
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-weight: 820;
}

.fact-list dd {
  margin: 0;
  color: #42504a;
  line-height: 1.58;
}

.faq-block {
  margin-top: 30px;
}

.faq-block details {
  margin-top: 10px;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 820;
}

.faq-block p {
  margin: 10px 0 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.policy-page {
  min-height: 100vh;
  background: var(--paper);
}

.policy-header,
.policy-content {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
}

.policy-header {
  padding: 34px 0 18px;
}

.policy-header a {
  color: var(--accent-dark);
  font-weight: 820;
  text-decoration: none;
}

.policy-content {
  padding: 28px 0 64px;
}

.policy-content h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.policy-content h2 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
}

.policy-content p,
.policy-content li {
  color: #42504a;
  line-height: 1.72;
}

.policy-content ul {
  padding-left: 20px;
}

@media (max-width: 900px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "hero map"
      "panel panel";
    overflow: visible;
  }

  .control-panel {
    grid-column: 1 / -1;
    min-height: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .hero-panel,
  .map-stage {
    min-height: 520px;
  }

  .map-canvas {
    min-height: 520px;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .hero-panel {
    min-height: auto;
    padding: 16px;
    border-right: 0;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .trust-links {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero-copy {
    margin: 36px 0 24px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .status-grid {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .status-grid article {
    min-width: 112px;
  }

  .map-stage,
  .map-canvas {
    min-height: 58vh;
  }

  .control-panel {
    min-height: auto;
    padding: 14px;
  }

  .tabs {
    top: 0;
  }

  .place-card {
    grid-template-columns: 1fr;
  }

  .place-actions {
    flex-direction: row;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .place-actions > * {
    flex: 1;
  }

  .icon-button,
  .icon-link {
    width: 100%;
  }

  .guide-inner {
    padding: 40px 0;
  }

  .guide-grid,
  .fact-list {
    grid-template-columns: 1fr;
  }
}
