:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --surface: #fffdf8;
  --ink: #18211e;
  --muted: #69716c;
  --line: #d7d7cd;
  --teal: #1f6f68;
  --teal-soft: #e7f3ef;
  --brick: #b65f38;
  --blue: #3659a8;
  --gold: #c28b24;
  --shadow: 0 18px 48px rgba(38, 52, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef5f0 0%, var(--paper) 38%, #f4f6f8 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar,
.room-header,
.section-head,
.panel-head,
.range-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brick);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
}

h2 {
  font-size: 28px;
  line-height: 1.15;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
}

.status-pill {
  min-width: 84px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.status-pill.ok {
  border-color: #96c9b5;
  color: var(--teal);
  background: var(--teal-soft);
}

.tool-grid,
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 22px;
  align-items: stretch;
}

.control-surface,
.room-main,
.map-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.control-surface,
.room-main {
  padding: 24px;
}

.surface-heading p,
.room-meta,
.panel-head p,
.section-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field-block {
  margin-top: 26px;
}

label {
  display: block;
  margin-bottom: 12px;
  color: #303935;
  font-size: 14px;
  font-weight: 800;
}

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

.category-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px 12px;
  width: 100%;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.category-option.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.category-mark {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #26342f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.category-option.is-active .category-mark {
  background: var(--teal);
}

.category-option strong,
.category-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-option small {
  color: var(--muted);
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

output {
  color: var(--teal);
  font-weight: 800;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  margin-top: 26px;
  border: 0;
  background: var(--teal);
  color: #fff;
}

.secondary-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost-btn {
  min-width: 92px;
}

.error-text {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #efb39d;
  border-radius: 8px;
  background: #fff4ef;
  color: #9a3d22;
  font-size: 14px;
  line-height: 1.45;
}

.map-visual,
.web-map {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.56) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.56) 1px, transparent 1px),
    #dfe8e2;
  background-size: 42px 42px;
}

.map-road {
  position: absolute;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: inset 0 0 0 1px rgba(54, 89, 168, 0.08);
}

.road-a {
  left: -8%;
  top: 24%;
  width: 118%;
  transform: rotate(-12deg);
}

.road-b {
  left: 18%;
  top: -4%;
  width: 32px;
  height: 118%;
  transform: rotate(24deg);
}

.road-c {
  right: -12%;
  bottom: 22%;
  width: 80%;
  transform: rotate(31deg);
}

.map-dot,
.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(24, 33, 30, 0.18);
}

.map-dot {
  width: 42px;
  height: 42px;
}

.map-pin {
  width: 34px;
  height: 34px;
  background: var(--blue);
}

.dot-a {
  left: 18%;
  top: 58%;
  background: var(--teal);
}

.dot-b {
  right: 18%;
  top: 18%;
  background: var(--brick);
}

.dot-mid {
  left: 48%;
  top: 38%;
  background: #26342f;
}

.pin-one {
  left: 54%;
  top: 31%;
}

.pin-two {
  left: 42%;
  top: 51%;
  background: var(--gold);
}

.pin-three {
  right: 32%;
  bottom: 28%;
}

.share-row,
.action-row,
.people-row {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.share-row {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.action-row {
  grid-template-columns: minmax(0, 1fr) 96px;
}

.share-row input {
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--muted);
}

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

.person-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.person-tile.is-ready {
  border-color: #96c9b5;
  background: var(--teal-soft);
}

.person-tile > span {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #26342f;
  color: #fff;
  font-weight: 900;
}

.person-tile.is-ready > span {
  background: var(--teal);
}

.person-tile strong,
.person-tile p {
  display: block;
  min-width: 0;
}

.person-tile p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.map-panel {
  padding: 18px;
}

.web-map {
  margin-top: 14px;
  min-height: 360px;
}

.web-map .map-dot,
.web-map .map-pin {
  transform: translate(-50%, -50%);
}

.recommend-section {
  margin-top: 28px;
}

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

.place-card {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.place-rank {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.place-body {
  min-width: 0;
  flex: 1;
}

.place-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.place-line h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.place-line span {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.place-address,
.place-reason {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.place-reason {
  color: #8d5a2f;
}

.place-card a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin-top: 12px;
  padding: 0 11px;
  border: 1px solid #ccd6e8;
  border-radius: 8px;
  background: #f3f6fc;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 24px, 680px);
    padding-top: 24px;
  }

  .topbar,
  .room-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .tool-grid,
  .room-layout,
  .place-list {
    grid-template-columns: 1fr;
  }

  .map-visual {
    min-height: 320px;
  }

  .category-list,
  .people-row {
    grid-template-columns: 1fr;
  }

  .share-row,
  .action-row {
    grid-template-columns: 1fr;
  }
}
