/* パーナビ β — 白地に駐車場標識の青を1色だけ使う、落ち着いたデザイン */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;

  --brand: #1a4fd6;
  --brand-ink: #ffffff;
  --brand-soft: #eaf0fd;
  --brand-line: #c7d6f8;

  --low: #16a34a;
  --low-soft: #e9f7ee;
  --mid: #d97706;
  --mid-soft: #fdf3e2;
  --high: #dc2626;
  --high-soft: #fdecec;

  --ax-near: #1a4fd6;
  --ax-wait: #0f8a72;
  --ax-exit: #7c4ddb;

  --map-ground: #eef1f5;
  --map-road: #ffffff;
  --map-bldg: #dfe4ec;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(17 24 39 / 0.04), 0 4px 16px rgb(17 24 39 / 0.05);
  --focus: 0 0 0 3px rgb(26 79 214 / 0.35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --ink: #f3f4f6;
    --ink-2: #d1d5db;
    --muted: #9ca3af;
    --line: #262c36;
    --line-2: #343b47;
    --brand: #5b8cff;
    --brand-ink: #0b1020;
    --brand-soft: #18233d;
    --brand-line: #2b3d69;
    --low: #34c46d;
    --low-soft: #13281c;
    --mid: #f0a33a;
    --mid-soft: #2c2213;
    --high: #f26464;
    --high-soft: #2e1717;
    --ax-near: #5b8cff;
    --ax-wait: #34c2a5;
    --ax-exit: #a88bff;
    --map-ground: #1a1f27;
    --map-road: #252b35;
    --map-bldg: #2a313c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --ink: #f3f4f6; --ink-2: #d1d5db; --muted: #9ca3af;
  --line: #262c36; --line-2: #343b47; --brand: #5b8cff; --brand-ink: #0b1020; --brand-soft: #18233d; --brand-line: #2b3d69;
  --low: #34c46d; --low-soft: #13281c; --mid: #f0a33a; --mid-soft: #2c2213; --high: #f26464; --high-soft: #2e1717;
  --ax-near: #5b8cff; --ax-wait: #34c2a5; --ax-exit: #a88bff; --map-ground: #1a1f27; --map-road: #252b35; --map-bldg: #2a313c;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans JP', system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3 { margin: 0; line-height: 1.35; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.num { font-variant-numeric: tabular-nums; }
.sp { display: none; }
@media (max-width: 480px) { .sp { display: inline; } }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
main.wrap { display: grid; gap: 16px; padding-top: 8px; padding-bottom: 40px; }

/* ---------- top ---------- */
.notice {
  font-size: 12.5px; color: var(--muted); text-align: center;
  padding: 6px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.plogo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; flex: none; }
.plogo svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linejoin: round; }
.wordmark { font-weight: 900; font-size: 19px; letter-spacing: 0.02em; }
.beta { font-size: 11px; font-weight: 700; color: var(--brand); border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.brand-text { display: grid; line-height: 1.2; }
.brand-name { display: flex; align-items: center; gap: 6px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.mypage-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; min-height: 40px; }
.mypage-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.mypage-btn .dot { position: absolute; top: 5px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
@media (max-width: 380px) { .mypage-btn span { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: 8px;
  background: #1a4fd6; color: #fff; border-radius: 20px; padding: 26px 22px 22px;
}
.hero-text { position: relative; z-index: 1; }
.eyebrow { font-size: 12.5px; font-weight: 700; color: rgb(255 255 255 / 0.8); margin-bottom: 10px; }
.eyebrow .sep { margin: 0 6px; opacity: 0.6; }
.hero h1 { font-size: clamp(27px, 7.4vw, 40px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.3; }
.lead { margin-top: 12px; color: rgb(255 255 255 / 0.9); font-size: 14.5px; max-width: 34em; }
.axes-intro { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .ax { background: rgb(255 255 255 / 0.14); border-color: rgb(255 255 255 / 0.28); color: #fff; }
.hero .ax-near::before { background: #9dc0ff; }
.hero .ax-wait::before { background: #6ee7c8; }
.hero .ax-exit::before { background: #d3bfff; }
.hero-lines { position: absolute; right: -30px; bottom: -40px; width: 260px; opacity: 0.16; }
.hero-lines path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .hero { background: #1b3f9e; } }
:root[data-theme='dark'] .hero { background: #1b3f9e; }

.ax { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ax::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ax-near { color: var(--ax-near); }
.ax-wait { color: var(--ax-wait); }
.ax-exit { color: var(--ax-exit); }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 17px; font-weight: 700; }
.stamp { font-size: 13px; color: var(--muted); }
.stamp b { color: var(--ink); font-size: 15px; }

.map { width: 100%; height: auto; display: block; border-radius: 12px; }
.facility { margin: 0 auto 14px; position: relative; max-width: 560px; }
.facility img { width: 100%; height: auto; display: block; border-radius: 12px; }
.facility figcaption { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: rgb(255 255 255 / 0.85); color: #374151; border-radius: 6px; padding: 1px 7px; }
.map text { font-family: inherit; }

.lot-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.lot-list li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 4px; }
.lot-list .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.lot-list .row b { font-size: 15px; }
.meter { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 5px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.low { background: var(--low); } .sw.mid { background: var(--mid); } .sw.high { background: var(--high); }

.safety { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--mid-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.safety svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--mid); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.events { display: grid; gap: 8px; }
.event { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.event .when { grid-row: span 2; font-weight: 700; color: var(--brand); font-size: 15px; }
.event b { font-weight: 700; }
.event span:last-child { color: var(--muted); font-size: 12.5px; }

/* ---------- form ---------- */
.form { display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
legend { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; }
.step { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 13px; display: grid; place-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.field { display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.field.inline { display: flex; align-items: center; gap: 12px; }
.field input, .field select { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 15px; min-height: 44px; }
.field.inline input { max-width: 150px; }

.dests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .dests { grid-template-columns: repeat(2, 1fr); } }
.dest { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius-sm); padding: 11px 12px; min-height: 60px; }
.dest svg { grid-row: span 2; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dest b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.dest span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.dest[aria-checked='true'] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.dest[aria-checked='true'] svg { stroke: var(--brand); }

.more { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.more summary { cursor: pointer; list-style: none; padding: 12px 14px; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
.more[open] summary::after { transform: rotate(-135deg); }
.opt-tag { font-size: 11.5px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.more-sum { font-size: 12.5px; font-weight: 500; color: var(--brand); }
.more-body { padding: 4px 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .more-body { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.hint { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

.profile-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 13.5px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- my page (dialog) ---------- */
.sheet { border: 0; padding: 0; border-radius: 20px; width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / 0.25); }
.sheet::backdrop { background: rgb(15 23 42 / 0.45); }
.sheet form { padding: 20px; display: grid; gap: 16px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 19px; font-weight: 900; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; }
.sheet-lead { font-size: 13px; color: var(--muted); }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .mp-grid { grid-template-columns: 1fr; } }
.mp-checks { display: grid; gap: 2px; }
.sheet-actions { display: flex; justify-content: space-between; gap: 10px; }
.sheet-actions .btn.primary { flex: 1; }

.btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 15px; min-height: 48px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.block { width: 100%; font-size: 16px; min-height: 54px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.form-error { color: var(--high); font-size: 13.5px; }

/* ---------- result ---------- */
.result { display: grid; gap: 14px; scroll-margin-top: 72px; }
.result-head h2 { font-size: 20px; font-weight: 900; }
.result-head .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.shift { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.shift svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.shift button { margin-left: auto; flex: none; border: 0; background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.note { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.map-card { padding: 10px; }

.cards { display: grid; gap: 12px; }
.cand { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-top: 4px solid var(--axc); }
.cand.axis-near { --axc: var(--ax-near); }
.cand.axis-wait { --axc: var(--ax-wait); }
.cand.axis-exit { --axc: var(--ax-exit); }
.cand-top { padding: 14px 16px 0; display: grid; gap: 6px; }
.cand-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.cand-label .no { width: 22px; height: 22px; border-radius: 50%; background: var(--axc); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 12.5px; }
.cand-label .lead-txt { font-weight: 700; color: var(--axc); }
.also { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.cand h3 { font-size: 19px; font-weight: 900; display: flex; align-items: baseline; gap: 8px; }
.cand h3 .pid { font-size: 13px; font-weight: 700; color: var(--muted); }
.reason { font-size: 14px; color: var(--ink-2); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.metric { padding: 10px 10px 9px; display: grid; gap: 2px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric span { font-size: 11.5px; color: var(--muted); }
.metric b { font-size: 20px; font-weight: 900; line-height: 1.2; }
.metric b small { font-size: 12px; font-weight: 700; margin-left: 1px; }
.metric.best b { color: var(--axc); }
.cand-meta { padding: 10px 16px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.lvl { font-weight: 700; font-size: 12px; padding: 1px 9px; border-radius: 999px; }
.lvl.low { color: var(--low); background: var(--low-soft); }
.lvl.mid { color: var(--mid); background: var(--mid-soft); }
.lvl.high { color: var(--high); background: var(--high-soft); }
.cand details { margin: 10px 16px 0; font-size: 13px; }
.cand summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.detail-body { display: grid; gap: 10px; padding: 10px 0 2px; }
.feats { display: flex; gap: 6px; flex-wrap: wrap; }
.feat { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--ink-2); }
.trend-cap { font-size: 12px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; align-items: end; height: 44px; margin-top: 4px; }
.bars i { display: block; border-radius: 3px 3px 1px 1px; background: var(--bc); opacity: 0.5; }
.bars i.now { opacity: 1; outline: 2px solid var(--ink); outline-offset: 1px; }
.bars-x { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; font-size: 10.5px; color: var(--muted); text-align: center; }
.cand .pick { margin: 14px 16px 16px; width: calc(100% - 32px); }
.cand.chosen { box-shadow: 0 0 0 2px var(--axc), var(--shadow); }

.excluded { font-size: 13.5px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.excluded summary { cursor: pointer; }
.excluded ul { margin: 8px 0 0; padding-left: 1.2em; }
.fine { font-size: 12px; color: var(--muted); }

/* ---------- after pick / survey ---------- */
.after { display: grid; gap: 16px; scroll-margin-top: 72px; }
.after h2 { font-size: 18px; font-weight: 900; }
.route { margin: 0; padding-left: 1.3em; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
.survey { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 18px; }
.survey-head h3 { font-size: 16px; font-weight: 700; }
.survey-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.q { display: grid; gap: 8px; }
.q h4 { margin: 0; font-size: 14.5px; font-weight: 700; }
.q .chips .chip { font-size: 13.5px; }
.status { font-size: 12.5px; color: var(--muted); }
.thanks { background: var(--low-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.receipt { font-size: 12px; color: var(--muted); }

/* ---------- footer & demo bar ---------- */
.foot { border-top: 1px solid var(--line); padding: 18px 0 24px; font-size: 12.5px; color: var(--muted); }
.foot .wrap { display: grid; gap: 6px; }

.demo-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.demo-inner { display: grid; gap: 6px; }
.demo-row { display: flex; align-items: center; gap: 10px; }
.demo-row.small { justify-content: space-between; }
.demo-label { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-right: auto; }
.icon-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; fill: var(--ink); }
.clock-out { font-weight: 900; font-size: 18px; min-width: 3.1em; }
#clock { flex: 1; min-width: 60px; accent-color: var(--brand); }
.now-btn { flex: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; }
.now-btn[aria-pressed='true'] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; flex: none; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--muted); }
.seg button[aria-checked='true'] { background: var(--ink); color: var(--surface); font-weight: 700; }
.speed { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 3px 8px; font-size: 12.5px; }

@media (prefers-reduced-motion: no-preference) {
  .cand, .shift, .after { animation: rise 0.25s ease-out both; }
  .cand:nth-child(2) { animation-delay: 0.05s; }
  .cand:nth-child(3) { animation-delay: 0.1s; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
