:root {
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #17202b;
  --surface-3: #1d2733;
  --text: #f4f7fb;
  --muted: #9ca8b7;
  --line: rgba(255,255,255,.09);
  --green: #87f1b3;
  --green-deep: #0f2f21;
  --yellow: #f1d074;
  --red: #ff8b8b;
  --blue: #91c8ff;
  --shadow: 0 24px 80px rgba(0,0,0,.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(72, 136, 255, .16), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(89, 245, 164, .09), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 18px;
}
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green), #b3ffd0); color: #092016; font-weight: 900;
  box-shadow: 0 10px 28px rgba(135,241,179,.18);
}
.pilot-badge { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 12px; }

.hero { padding: 74px 0 42px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; color: var(--green); font-size: 12px; font-weight: 800; }
h1 { margin: 14px 0 18px; font-size: clamp(44px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 920px; }
h1 span { color: #aab5c2; }
.hero-copy { color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; max-width: 760px; margin-bottom: 32px; }

.search-panel {
  background: linear-gradient(180deg, rgba(24,32,43,.96), rgba(16,22,30,.98));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}
.mode-tabs, .time-tabs { display: inline-flex; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.mode-tab, .time-tab { border: 0; color: var(--muted); background: transparent; border-radius: 999px; padding: 10px 15px; }
.mode-tab.active, .time-tab.active { background: #eef4f8; color: #10151c; font-weight: 750; }
.location-row { margin-top: 14px; }
.location-button, .search-wrap input {
  width: 100%; min-height: 62px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface-3); color: var(--text); padding: 0 18px; text-align: left;
}
.location-button { display: flex; align-items: center; gap: 12px; }
.location-button:hover { border-color: rgba(135,241,179,.45); }
.location-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--green-deep); color: var(--green); }
.search-wrap { position: relative; }
.search-wrap input { outline: none; }
.search-wrap input:focus { border-color: rgba(145,200,255,.52); box-shadow: 0 0 0 4px rgba(145,200,255,.08); }
.suggestions { position: absolute; left: 0; right: 0; top: 68px; background: #10161e; border: 1px solid var(--line); border-radius: 16px; padding: 8px; z-index: 10; box-shadow: var(--shadow); }
.suggestion { width: 100%; border: 0; background: transparent; color: var(--text); padding: 12px; border-radius: 10px; text-align: left; }
.suggestion:hover { background: rgba(255,255,255,.05); }
.suggestion small { display: block; color: var(--muted); margin-top: 3px; }

.time-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.control-label { color: #c8d2dd; font-size: 13px; font-weight: 730; }
.future-time { color: var(--text); background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color-scheme: dark; }
.need-section { margin-top: 18px; }
.need-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.text-button { color: var(--muted); background: transparent; border: 0; padding: 4px 0; }
.need-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.need-chip { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #c8d2dd; border-radius: 999px; padding: 10px 13px; }
.need-chip.active { background: var(--green-deep); border-color: rgba(135,241,179,.35); color: var(--green); }
.primary-button { margin-top: 18px; width: 100%; border: 0; border-radius: 16px; min-height: 58px; font-weight: 850; background: linear-gradient(135deg, #9ff6bf, #70dea0); color: #072116; }
.primary-button:hover { transform: translateY(-1px); }

.honesty-strip { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 60px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.honesty-strip strong { color: #d9e3ec; margin-right: 6px; }
.honesty-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 5px rgba(241,208,116,.08); }

.results-section { padding: 10px 0 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h2 { font-size: clamp(30px, 4vw, 45px); letter-spacing: -.04em; margin: 8px 0 0; }
.result-count { color: var(--muted); font-size: 13px; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.place-card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(21,29,39,.98), rgba(15,21,29,.98)); border-radius: 22px; padding: 20px; transition: .18s ease; }
.place-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.15); }
.card-top { display: flex; justify-content: space-between; gap: 10px; }
.place-name { font-size: 22px; font-weight: 820; letter-spacing: -.03em; }
.place-type { color: var(--muted); margin-top: 5px; font-size: 13px; }
.distance-badge { height: fit-content; white-space: nowrap; background: rgba(145,200,255,.08); color: var(--blue); border: 1px solid rgba(145,200,255,.16); border-radius: 999px; padding: 7px 9px; font-size: 12px; }
.status-line { display: flex; align-items: center; gap: 7px; margin: 15px 0 12px; color: #cbd5df; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.good { background: var(--green); }
.status-dot.warn { background: var(--yellow); }
.status-dot.bad { background: var(--red); }
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-top: 12px; }
.capability { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.035); border-radius: 11px; padding: 9px 10px; min-width: 0; }
.capability .cap-icon { width: 20px; text-align: center; }
.capability .cap-text { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capability.yes { color: #d8fbe6; }
.capability.maybe { color: #f4dda0; }
.capability.no { color: #ffb6b6; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; }
.secondary-button, .map-link { flex: 1; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #d7e0e9; border-radius: 12px; padding: 11px 12px; text-decoration: none; text-align: center; font-size: 13px; }
.secondary-button:hover, .map-link:hover { border-color: rgba(255,255,255,.2); }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 22px; padding: 38px 22px; color: var(--muted); text-align: center; }

.how-it-works { padding: 66px 0 86px; border-top: 1px solid var(--line); }
.moment-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 22px; }
.moment-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.moment-number { color: var(--green); font-size: 12px; font-weight: 800; }
.moment-grid h3 { font-size: 25px; margin: 22px 0 9px; letter-spacing: -.03em; }
.moment-grid p { color: var(--muted); line-height: 1.6; margin: 0; }
footer { display: flex; justify-content: space-between; gap: 12px; color: #6e7987; border-top: 1px solid var(--line); padding: 22px 0 38px; font-size: 12px; }

.hidden { display: none !important; }
.detail-dialog { width: min(680px, calc(100% - 24px)); max-height: 86vh; overflow: auto; border: 1px solid var(--line); background: #10161e; color: var(--text); border-radius: 24px; padding: 0; box-shadow: var(--shadow); }
.detail-dialog::backdrop { background: rgba(2,5,8,.72); backdrop-filter: blur(6px); }
.dialog-close { position: sticky; float: right; top: 14px; margin: 14px 14px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #18212c; color: var(--text); font-size: 24px; z-index: 2; }
.detail-inner { padding: 28px; }
.detail-sub { color: var(--muted); margin-top: 7px; }
.evidence-list { margin-top: 24px; display: grid; gap: 10px; }
.evidence-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.evidence-top { display: flex; justify-content: space-between; gap: 10px; }
.evidence-title { font-weight: 760; }
.evidence-state { font-size: 12px; border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.05); }
.evidence-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 8px; }
.source-link { display: inline-block; color: var(--blue); font-size: 12px; margin-top: 8px; }
.warning-box { margin-top: 16px; border-left: 3px solid var(--yellow); background: rgba(241,208,116,.06); padding: 12px 14px; color: #e8dcc0; border-radius: 0 12px 12px 0; font-size: 13px; line-height: 1.55; }

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1180px); }
  .hero { padding-top: 44px; }
  .search-panel { padding: 13px; border-radius: 22px; }
  .results-grid, .moment-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; }
}
/* v0.2 unified location/search control */
.place-search-block { margin-top: 2px; }
.search-field-wrap { position: relative; margin-top: 8px; }
.search-field-wrap input {
  width: 100%; min-height: 62px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface-3); color: var(--text); padding: 0 52px 0 48px; outline: none;
}
.search-field-wrap input:focus { border-color: rgba(145,200,255,.52); box-shadow: 0 0 0 4px rgba(145,200,255,.08); }
.search-icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; pointer-events: none; }
.clear-search { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: #dbe5ef; font-size: 21px; line-height: 1; }
.anchor-status { display: flex; align-items: flex-start; gap: 9px; min-height: 22px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.anchor-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; background: var(--muted); }
.anchor-dot.ready { background: var(--green); box-shadow: 0 0 0 4px rgba(135,241,179,.08); }
.anchor-dot.search { background: var(--blue); box-shadow: 0 0 0 4px rgba(145,200,255,.08); }
.anchor-dot.loading { background: var(--yellow); box-shadow: 0 0 0 4px rgba(241,208,116,.08); animation: pulse 1.2s ease-in-out infinite; }
.anchor-dot.error { background: var(--red); box-shadow: 0 0 0 4px rgba(255,139,139,.08); }
.search-note { color: #718091; font-size: 11px; line-height: 1.45; margin: 9px 3px 0; }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
@keyframes pulse { 0%,100% { opacity:.45; } 50% { opacity:1; } }

@media (max-width: 760px) {
  .hero { padding-top: 34px; }
  h1 { font-size: clamp(42px, 12vw, 64px); }
  .hero-copy { margin-bottom: 24px; }
  .search-field-wrap input { min-height: 60px; }
  .how-it-works { padding-top: 50px; }
}
