:root {
  color: #173e37;
  background: #f4f7ed;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, #d9f0df 0, transparent 29rem),
    #f4f7ed;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #f2a65a;
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.shell {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  padding: 36px 0 72px;
  display: flex;
  flex-direction: column;
}

.hero {
  margin: 0 4px 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: #48746a;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
h1 {
  margin: 0;
  color: #164f45;
  font-size: clamp(2rem, 6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
h2 {
  margin: 0;
  font-size: 1.2rem;
}
.hero > p:last-child {
  max-width: 36rem;
  margin: 14px 0 0;
  color: #48615c;
  line-height: 1.6;
}

.status {
  min-height: 1.5em;
  margin: 0 4px 14px;
  color: #9a3d29;
  font-weight: 700;
}
.status:empty {
  display: none;
}

.card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #d4e4d8;
  border-radius: 22px;
  background: rgb(255 255 251 / 92%);
  box-shadow: 0 14px 34px rgb(34 83 68 / 9%);
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #dceee7;
  color: #246052;
  font-size: 0.8rem;
  font-weight: 800;
}

.nickname-form {
  margin-top: 22px;
}
label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}
.input-row {
  display: flex;
  gap: 8px;
}
input {
  min-width: 0;
  min-height: 44px;
  flex: 1;
  border: 1px solid #a9bfb6;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: inherit;
}
.input-row button,
.quiet {
  padding: 10px 14px;
  background: #dbece6;
  color: #185448;
}

.primary {
  width: 100%;
  padding: 10px 16px;
  background: #216b5d;
  color: white;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.danger {
  padding: 10px 14px;
  background: #fff0e9;
  color: #a03c28;
}

.helper {
  margin: 13px 0 0;
  color: #5a716a;
  line-height: 1.5;
}
.records {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}
.public-record {
  padding: 15px;
  border: 1px solid #dce5d6;
  border-radius: 14px;
  background: #fff;
}
.public-record h3 {
  margin: 0;
  font-size: 1rem;
}
.public-record p {
  margin: 8px 0 0;
  color: #526863;
  font-variant-numeric: tabular-nums;
}
.load-more {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: #edf0e6;
  color: #315a50;
}

.venue-card {
  margin-top: 0;
  background: #fffef8;
  overflow: hidden;
}

.records-card {
  order: 4;
}

.guide-pin,
.friend-pin {
  position: absolute;
  z-index: 2;
  min-height: 0;
  transform: translate(-50%, -100%);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 4px 7px;
  background: #164f45;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
  box-shadow: 0 2px 7px rgb(23 59 53 / 30%);
}

.place-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pin-role {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.pin-role button {
  flex: 1;
}

.facility-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 16px 0 0;
  padding: 9px 11px 11px;
  border: 1px solid #d7e5d9;
  border-radius: 12px;
  background: #f7fbf4;
}

.facility-filters legend {
  padding: 0 4px;
  font-weight: 800;
}

.facility-filters label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 0.82rem;
}

.facility-filters input {
  width: 16px;
  min-height: 0;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #a9bfb6;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  color: inherit;
}

.venue-selection {
  margin: 14px 0 0;
  color: #185448;
  font-weight: 800;
}

.floor-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.floor-tabs button,
.route-floor {
  min-height: 36px;
  padding: 7px 10px;
  background: #edf0e6;
  color: #315a50;
  white-space: nowrap;
}

.floor-tabs button[aria-selected="true"] {
  background: #216b5d;
  color: #fff;
}

.guide-map {
  position: relative;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #b7c9bf;
  border-radius: 16px;
  background: #eff4ea;
}

.guide-map {
  overflow: auto;
}

.guide-canvas {
  position: relative;
  min-width: 100%;
}

.guide-canvas > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.map-controls-row .floor-tabs {
  flex: 1;
}

.guide-zoom {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.guide-zoom button {
  min-height: 32px;
  padding: 5px 9px;
  background: #edf0e6;
  color: #315a50;
}

.guide-zoom button[aria-pressed="true"] {
  background: #216b5d;
  color: #fff;
}

.guide-pin {
  max-width: 6.4rem;
  padding: 3px 5px;
  background: #075d8e;
  font-size: 0.68rem;
}

.current-guide-pin {
  background: #216b5d;
}

.destination-guide-pin {
  background: #a03c28;
}

.friend-pin {
  z-index: 4;
  background: #a03c28;
  pointer-events: none;
}

.route-guide,
.place-detail {
  margin-top: 16px;
  padding: 15px;
  border-radius: 14px;
  background: #f5ead0;
  color: #5d4b2c;
  line-height: 1.55;
}

.route-guide h3,
.place-detail h3,
.place-detail h4 {
  margin: 0;
}

.route-guide p,
.place-detail p,
.place-detail ul {
  margin: 8px 0 0;
}

.route-guide ol {
  margin: 10px 0 0;
  padding-left: 1.35rem;
}

.route-guide li + li {
  margin-top: 8px;
}

.route-floor {
  display: inline-block;
  min-height: 30px;
  margin: 7px 0 0 8px;
  padding: 4px 8px;
  vertical-align: middle;
  font-size: 0.78rem;
}

.place-detail > img {
  display: block;
  width: min(100%, 420px);
  max-height: 250px;
  margin-top: 12px;
  border-radius: 10px;
  object-fit: cover;
}

.place-detail > a,
.place-detail li a,
.guide-source a {
  color: #075d8e;
  font-weight: 800;
}

.place-detail h4 {
  margin-top: 14px;
  font-size: 0.95rem;
}

.guide-source {
  margin: 12px 0 0;
  font-size: 0.86rem;
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 24px, 760px);
    padding-top: 30px;
  }
  .card {
    padding: 18px;
    border-radius: 16px;
  }
  .input-row {
    display: grid;
  }
  .input-row button {
    width: 100%;
  }
  .place-selectors {
    grid-template-columns: 1fr;
  }
  .map-controls-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .map-controls-row .floor-tabs {
    width: 100%;
  }
  .guide-zoom {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
