:root {
  --red: #e0283c;
  --red-d: #b81d2f;
  --navy: #1d2b64;
  --ink: #18213d;
  --muted: #5b6785;
  --line: #e3e8f2;
  --soft: #f3f6fb;
  --card: #ffffff;
  --bg: #d9eef9;
  --shadow: 0 12px 32px rgba(20, 40, 90, .16), 0 2px 6px rgba(20, 40, 90, .08);
  --radius: 16px;
  --font: 'Plus Jakarta Sans', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --hand: 'Caveat', cursive;
  --header: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--header); z-index: 40;
  display: flex; align-items: center; gap: 20px; padding: 0 24px;
  background: #fff; box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 24px; font-weight: 800; letter-spacing: .02em; }
.brand-sub {
  margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--ink);
  text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nav a:hover { background: var(--soft); }
.nav a.cta { background: var(--red); color: #fff; margin-left: 6px; }
.nav a.cta:hover { background: var(--red-d); }
.cta-short { display: none; }

/* language switch */
.lang { display: flex; padding: 3px; margin-left: 4px; border-radius: 999px; background: var(--soft); flex: none; }
.lang button {
  border: 0; background: none; cursor: pointer; padding: 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(20, 40, 90, .15); }

/* ---------- stage ---------- */
.stage { position: fixed; inset: var(--header) 0 0 0; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#scene:active { cursor: grabbing; }

.hero {
  position: absolute; left: 36px; top: 34px; pointer-events: none; color: #fff;
  text-shadow: 0 2px 14px rgba(10, 50, 110, .45);
  transform: rotate(-9deg); transform-origin: right top;   /* tilt down from the right, so "Japan" never rises out of the map */
  transition: opacity .4s;
}
.hero h1 { font-family: var(--hand); font-weight: 700; font-size: 68px; margin: 0; line-height: .95; }
.hero-line { width: 260px; height: 18px; margin: 2px 0 0 10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.hero p { font-family: var(--hand); font-weight: 600; font-size: 30px; margin: 4px 0 0 16px; line-height: 1.05; }
/* Caveat has no Japanese glyphs: use a handwritten Japanese face */
html[lang="ja"] .hero h1, html[lang="ja"] .hero p { font-family: 'Klee One', var(--hand); }
html[lang="ja"] .hero h1 { font-size: 52px; }
html[lang="ja"] .hero p { font-size: 24px; line-height: 1.35; }
/* Japanese titles only break at the <wbr> points set in data.js */
html[lang="ja"] .isl-label b, html[lang="ja"] .panel h2, html[lang="ja"] .card h3, html[lang="ja"] .path .step {
  word-break: keep-all; overflow-wrap: anywhere;
}
.stage.panel-open .hero, .stage.view-list .hero { opacity: 0; }

/* ---------- island labels ---------- */
.labels { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.isl-label {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: 270px; padding: 10px 16px 10px 10px;
  background: rgba(255, 255, 255, .96); border: 0; border-radius: 14px;
  box-shadow: var(--shadow); text-align: left; cursor: pointer;
  transition: opacity .35s, box-shadow .2s, outline-color .2s;
  outline: 2px solid transparent; outline-offset: 2px;
  will-change: transform;
}
.isl-label .ico { width: 36px; height: 36px; flex: none; color: var(--navy); display: grid; place-items: center; }
.isl-label .ico svg { width: 30px; height: 30px; }
.isl-label b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.isl-label small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.isl-label:hover, .isl-label.hover { box-shadow: 0 16px 40px rgba(20, 40, 90, .25); outline-color: rgba(224, 40, 60, .5); }
.isl-label.selected { outline-color: var(--red); }
.isl-label.dim { opacity: .38; }
.isl-label:focus-visible { outline-color: var(--navy); }
.isl-label.compact { padding: 6px 12px 6px 6px; gap: 7px; border-radius: 12px; }
.isl-label.compact .ico { width: 26px; height: 26px; }
.isl-label.compact .ico svg { width: 22px; height: 22px; }
.isl-label.compact b { font-size: 14px; }
.isl-label.compact small { display: none; }
.hub-label.compact { padding: 7px 16px 7px 7px; }
.hub-label.compact .ico { width: 30px; height: 30px; }
.hub-label.compact b { font-size: 15px; }
.isl-label .step {
  position: absolute; top: -10px; left: -10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 800;
  display: none; place-items: center; box-shadow: 0 4px 10px rgba(224, 40, 60, .4);
}
.isl-label.has-step .step { display: grid; }

.hub-label {
  padding: 12px 26px 12px 12px; border-radius: 999px;
  background: linear-gradient(180deg, #ef3b4f, #c91f33); color: #fff;
  box-shadow: 0 0 0 6px rgba(224, 40, 60, .2), 0 14px 34px rgba(160, 20, 40, .4);
}
.hub-label .ico { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.hub-label .ico svg { width: 30px; height: 30px; }
.hub-label b { color: #fff; font-size: 19px; font-weight: 700; max-width: 190px; }
.hub-label small { display: none; }
.hub-label:hover, .hub-label.hover { box-shadow: 0 0 0 8px rgba(224, 40, 60, .28), 0 16px 40px rgba(160, 20, 40, .5); }
.hub-label.selected { outline-color: #fff; }

/* island details: the panel's links shown on the island (spots) or on islets (satellites) */
.sub-label {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  display: flex; align-items: center; gap: 7px; width: max-content; max-width: 280px; white-space: nowrap;
  padding: 6px 12px 6px 6px; border: 2px solid var(--red); border-radius: 999px;
  background: #fff; color: var(--ink); font: 700 13px/1.25 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(160, 20, 40, .25);
  opacity: 0; transition: opacity .3s, transform .05s, box-shadow .2s;
}
.sub-label.on { opacity: 1; }
.sub-label .ico { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.sub-label .ico svg { width: 15px; height: 15px; }
.sub-label .ext { color: var(--muted); font-size: 12px; }
.sub-label.sub-satellites { border-color: var(--navy); }
.sub-label.sub-satellites .ico { background: var(--navy); }
.sub-label:hover, .sub-label.hl { box-shadow: 0 0 0 4px rgba(224, 40, 60, .25), 0 10px 26px rgba(160, 20, 40, .3); }
.sub-label:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.links .btn.hl { box-shadow: 0 0 0 4px rgba(224, 40, 60, .25); border-color: var(--red); }
/* opens the chat: navy with a sparkle, like the chatbot's buttons */
.sub-label[data-opens-chat] { border-color: #1d2b64; box-shadow: 0 8px 22px rgba(29, 43, 100, .25); }
.sub-label[data-opens-chat] .ico { background: #1d2b64; }
.sub-label[data-opens-chat]::after { content: '✦'; color: #1d2b64; font-size: 12px; }
.sub-label[data-opens-chat]:hover, .sub-label[data-opens-chat].hl { border-color: #2c3f8a; box-shadow: 0 0 0 4px rgba(29, 43, 100, .25), 0 10px 26px rgba(29, 43, 100, .3); }

/* ---------- toolbar ---------- */
.toolbar { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; z-index: 16; }
.seg { display: flex; padding: 4px; background: #fff; border-radius: 999px; box-shadow: var(--shadow); }
.seg button { border: 0; background: none; white-space: nowrap; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--navy); color: #fff; }
.stage.panel-open .toolbar { right: 436px; }

/* ---------- map controls ---------- */
.mapctl { position: absolute; left: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 12; }
.round {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; box-shadow: var(--shadow); display: grid; place-items: center;
  font-size: 22px; font-weight: 600; color: var(--navy);
}
.round:hover { background: var(--soft); }
#compassNeedle { width: 24px; height: 24px; }

/* ---------- persona ---------- */
.persona {
  /* --chat-inset: px of the right side covered by the chat, set by main.js when the chat is open */
  position: absolute; bottom: 16px; left: 88px; right: max(88px, calc(var(--chat-inset, 0px) + 16px)); margin: 0 auto; width: max-content;
  max-width: calc(100% - 88px - max(88px, calc(var(--chat-inset, 0px) + 16px))); z-index: 12;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  padding: 10px 12px 10px 18px; background: rgba(255, 255, 255, .94); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
  transition: right .35s, opacity .3s;
}
.persona-q { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
}
.chip svg { width: 20px; height: 20px; color: var(--navy); }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[aria-pressed="true"] svg { color: #fff; }
.path { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.path[hidden] { display: none; }
.path-lead { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.path .step {
  display: flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--soft);
  font-size: 13px; font-weight: 700;
}
.path .step b { width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }
.path .step:hover { background: #e7ecf6; }
.path .arrow { color: var(--muted); font-size: 13px; }
.stage.panel-open #persona { opacity: 0; pointer-events: none; }

.hint {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 11;
  padding: 8px 14px; border-radius: 999px; background: rgba(24, 33, 61, .72); color: #fff;
  font-size: 13px; font-weight: 600; pointer-events: none; transition: opacity .6s;
  white-space: nowrap;
}
.hint.gone { opacity: 0; }

/* ---------- panel ---------- */
.panel {
  position: absolute; top: 16px; right: 16px; bottom: 16px; width: 404px; z-index: 20;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 40, 90, .28);
  transform: translateX(calc(100% + 32px)); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.panel.open { transform: none; }
.panel-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.panel-ico { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--soft); color: var(--navy); display: grid; place-items: center; }
.panel-ico svg { width: 30px; height: 30px; }
.panel-head.is-hub .panel-ico { background: var(--red); color: #fff; }
.eyebrow { margin: 2px 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.panel h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; }
.icon-btn {
  display: grid; place-items: center; padding: 0; margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--soft); font-size: 22px; line-height: 1; color: var(--muted);
}
.icon-btn:hover { background: #e7ecf6; color: var(--ink); }
.panel-body { flex: 1; overflow-y: auto; padding: 18px 22px 22px; }
.intro { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: #34405f; }
.panel h3 { margin: 18px 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.benefits li {
  position: relative; padding: 10px 12px 10px 38px; border-radius: 12px; background: var(--soft);
  font-size: 14.5px; line-height: 1.45; font-weight: 600;
}
.benefits li::before {
  content: ''; position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: #34405f; }
.links { display: grid; gap: 8px; margin-top: 22px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--red);
  background: var(--red); color: #fff; font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--red-d); border-color: var(--red-d); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--navy); background: #fff; }
.btn.sm { padding: 9px 12px; font-size: 13px; }
/* office island: plan finder, business centers, meeting rooms (office.js) */
.office { margin-bottom: 4px; }
.office h3:first-child { margin-top: 0; }
.of-q { margin-bottom: 10px; }
.of-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.of-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.of-seg button {
  padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font: inherit; font-size: 13.5px; font-weight: 600; color: #34405f; cursor: pointer;
}
.of-seg button:hover { border-color: var(--navy); }
.of-seg button[aria-checked="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.of-seg button:focus-visible, .of-col:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.of-extras { display: grid; gap: 6px; margin: 4px 0 10px; }
.of-extras:empty { display: none; }
.of-extra { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.of-extra input { margin-top: 3px; accent-color: var(--navy); }
.of-extra small { display: block; color: var(--muted); font-size: 12px; }
.of-result { margin-top: 4px; }
.of-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.of-col {
  position: relative; display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 10px 9px;
  border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); cursor: pointer;
}
.of-col:hover { border-color: var(--navy); }
.of-col.low { border-color: var(--navy); background: var(--soft); }
.of-col b { font-size: 14px; }
.of-col small { font-size: 11.5px; color: var(--muted); }
.of-col em { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--navy); padding: 1px 7px; border-radius: 999px; margin-top: 2px; }
.of-col .of-first { margin-top: 4px; line-height: 1.3; }
.of-price { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.of-plan-name { margin: 12px 0 8px; font-weight: 800; font-size: 14px; }
.of-quote { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; }
.of-quote-head { font-size: 15px; margin-bottom: 8px; }
.of-lines { list-style: none; margin: 0 0 6px; padding: 0; font-size: 13.5px; }
.of-lines li, .of-total { display: flex; justify-content: space-between; gap: 10px; }
.of-lines li { padding: 3px 0; color: #34405f; }
.of-total { align-items: baseline; padding: 8px 0 12px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 13.5px; font-weight: 700; }
.of-total small { color: var(--muted); font-weight: 600; }
.of-includes li { font-size: 13.5px; padding: 8px 10px 8px 34px; }
.of-includes li::before { left: 10px; top: 10px; }
.of-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.of-note.of-error { color: var(--red-d); font-weight: 600; }
.of-ask { margin-top: 12px; }
.of-contact { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.of-contact a, .of-more a, .of-source a { color: var(--navy); font-weight: 600; }
.of-space { margin: 4px 0 6px; font-size: 13.5px; font-weight: 600; }
.of-access { margin: 0; padding-left: 18px; font-size: 13px; color: #34405f; }
.of-addr { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.of-more { display: flex; gap: 14px; margin: 6px 0 0; font-size: 13px; }
.of-rooms-wrap { overflow-x: auto; }
.of-rooms { width: 100%; border-collapse: collapse; font-size: 13px; }
.of-rooms th, .of-rooms td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.of-rooms thead th { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.of-rooms tbody th { text-align: left; font-weight: 700; }
.of-rooms tbody th small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.of-source { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 12px; line-height: 1.5; color: var(--muted); }

/* two panes (office island): the second opens beside the first, like the events page */
.panel-split { flex: 1; display: flex; min-height: 0; }
.panel-split > .panel-body { min-width: 0; }
.panel-pane2 { display: none; flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 22px; border-left: 1px solid var(--line); }
.panel { transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1); }
.panel.expanded { width: min(808px, calc(100vw - 32px)); }
.panel.expanded .panel-split > .panel-body { flex: none; width: 404px; }
.panel.expanded .panel-pane2 { display: block; }
.panel.expanded [data-pane-open], .panel:not(.expanded) [data-pane-close] { display: none; }
.stage.panel-open.panel-expanded .mapctl { left: 840px; }
html body.map-panel-expanded .embed-dock.chat-dock { width: max(320px, min(380px, calc(100vw - 856px))); }
/* office finder: reference price, folded details, what to confirm, and the two calls to action */
.of-ref { margin: 4px 0 8px; font-size: 12px; color: var(--muted); }
.of-plan-desc { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; color: #34405f; }
.of-city-note { margin-top: 6px; }
.of-fold { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.of-fold summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.of-fold .of-rooms { margin: 8px 0; }
.of-tbc { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 700; color: #8a5a00; background: #fff4d6; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.of-price-text { font-size: 17px; }
.of-more-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; }
.of-more-links a { color: var(--navy); font-weight: 600; }
.of-cta { display: grid; gap: 8px; margin-top: 12px; }
.of-cta .of-ask { margin-top: 0; }
.of-official { justify-self: start; font-size: 13.5px; font-weight: 600; color: var(--navy); }
/* the members-only request form (not connected yet: nothing is sent) */
.of-req-box { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.of-req-box h4 { margin: 0; font-size: 15px; color: var(--navy); outline: none; }
.of-req-box .of-note, .of-req-box .of-label { margin: 0; }
.of-req-box .of-ask { justify-self: start; margin-top: 2px; }
.of-req-sum { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.of-req-sum dt { color: var(--muted); }
.of-req-sum dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.of-field { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.of-field input, .of-field textarea, .of-field select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.of-field input:focus-visible, .of-field textarea:focus-visible, .of-field select:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.of-field select { min-height: 38px; }
.of-field small { font-weight: 400; color: var(--muted); }
.of-visit { font-size: 13.5px; }
.of-req-box .of-ask:disabled { opacity: .5; cursor: not-allowed; }
.of-not-connected { padding: 6px 10px; border-radius: 8px; background: #fff8e6; color: #5c4300 !important; }
.of-link-btn { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--navy); text-decoration: underline; cursor: pointer; }
.of-prompt { margin: 0; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; }
.of-slot-narrow:not(:empty) { margin-top: 14px; }
.of-advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.of-advanced > summary { cursor: pointer; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.of-advanced[open] > summary { color: var(--navy); }
.of-back { display: none; }

/* the honeycomb: the center in the middle, six facts around it */
.of-tabs { margin-bottom: 4px; }
.of-tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.of-hex { display: block; width: 100%; max-width: 380px; margin: 0 auto; font-family: var(--font); }
.of-hex .hx path { stroke-width: 2; transition: transform .15s, filter .15s; }
.of-hex .hx.ccifj path { fill: #eef2fb; stroke: var(--navy); }
.of-hex .hx.public path { fill: #eaf6f0; stroke: #1e8e5a; stroke-dasharray: 5 3; }
.of-hex .hx.centre path { fill: var(--navy); stroke: var(--navy); }
.of-hex .hx[role="button"] { cursor: pointer; outline: none; }
.of-hex .hx[role="button"]:hover path, .of-hex .hx[role="button"]:focus-visible path { filter: drop-shadow(0 3px 6px rgba(20, 40, 90, .25)); stroke-width: 3; }
.of-hex .hx[role="button"]:focus-visible path { stroke: var(--red); }
.of-hex text { text-anchor: middle; fill: var(--ink); }
.of-hex .hx-label { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; fill: var(--muted); }
.of-hex .hx-value { font-size: 15px; font-weight: 800; fill: var(--navy); }
.of-hex .hx-value.long { font-size: 12.5px; }
.of-hex .hx-value.xlong { font-size: 11px; }
.of-hex .public .hx-value { fill: #146c43; }
.of-hex .hx-sub { font-size: 10.5px; fill: var(--muted); }
.of-hex .hx-city { font-size: 19px; font-weight: 800; fill: #fff; }
.of-hex .hx-sub.dark { fill: #c9d3f0; }
html[lang="ja"] .of-hex .hx-label { letter-spacing: 0; }
.of-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; justify-content: center; margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.of-legend .k { width: 14px; height: 14px; border-radius: 3px; border: 2px solid var(--navy); background: #eef2fb; }
.of-legend .k.public { border: 2px dashed #1e8e5a; background: #eaf6f0; margin-left: 8px; }
.of-detail { display: grid; gap: 10px; }
.of-block { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; scroll-margin-top: 12px; }
.of-block.public { border-color: #bfe3cf; }
.of-block h4 { margin: 0 0 6px; font-size: 14px; }
.of-block h4 small { font-weight: 600; color: var(--muted); }
.of-plans { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.of-plans li { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 8px; }
.of-plans li.on { background: var(--soft); font-weight: 700; }
.of-industries { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.of-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.of-figs div { background: #f4faf7; border-radius: 8px; padding: 6px 9px; }
.of-figs dt { font-size: 11.5px; color: var(--muted); }
.of-figs dd { margin: 0; font-weight: 800; font-size: 14px; color: #146c43; }
.of-rooms tr.on th, .of-rooms tr.on td { background: var(--soft); }
#of-rooms { scroll-margin-top: 12px; }
@keyframes ofFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(224, 40, 60, .3); } }
.of-block.flash, .of-rooms.flash { animation: ofFlash 1.2s ease; }


/* ---------- list view ---------- */
.listview {
  position: absolute; inset: 0; z-index: 15; overflow-y: auto; display: none;
  background: linear-gradient(180deg, #e9f6fd 0%, #f6fafe 60%);
  padding: 80px 24px 60px;
}
.stage.view-list .listview { display: block; }
.stage.view-list #persona, .stage.view-list .mapctl, .stage.view-list .hint, .stage.view-list .labels { display: none; }
.list-inner { max-width: 1120px; margin: 0 auto; }
.listview h2 { margin: 0 0 8px; font-size: 32px; font-weight: 800; }
.listview .lead { margin: 0 0 28px; color: var(--muted); font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.persona.persona-inline {
  position: static; width: auto; max-width: none; margin: 0 0 24px;
  box-shadow: 0 4px 16px rgba(20, 40, 90, .08); backdrop-filter: none;
}
.card { position: relative; outline: 2px solid transparent; transition: opacity .3s, box-shadow .3s, outline-color .3s; }
.card { display: flex; flex-direction: column; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(20, 40, 90, .08); }
.card.hub { background: linear-gradient(160deg, #fff 60%, #ffeef0); outline: 2px solid rgba(224, 40, 60, .25); }
.card-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--soft); color: var(--navy); display: grid; place-items: center; margin-bottom: 12px; }
.card-ico svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.card > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.card ul { margin: 0 0 16px; padding-left: 18px; font-size: 14px; line-height: 1.55; color: #34405f; flex: 1; }
.card.lit { outline-color: var(--red); box-shadow: 0 0 0 6px rgba(224, 40, 60, .12), 0 12px 30px rgba(224, 40, 60, .18); }
.card.dim { opacity: .4; }
.card-step {
  position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 14px; font-weight: 800;
  display: none; place-items: center; box-shadow: 0 4px 10px rgba(224, 40, 60, .4);
}
.card.lit .card-step { display: grid; }
.card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { transform: none; } 30% { transform: scale(1.03); } }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; padding: 10px 12px; font-size: 13px; }

/* ---------- loader ---------- */
.loader {
  position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: linear-gradient(180deg, #7fc1ef, #d9eef9); color: #fff; font-weight: 700; font-size: 16px;
  transition: opacity .8s;
}
.loader p { margin: 0; text-shadow: 0 1px 6px rgba(0, 40, 100, .3); }
.loader.done { opacity: 0; pointer-events: none; }
.loader-dot { width: 48px; height: 48px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .4); border-top-color: var(--red); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.no-webgl #scene, .no-webgl #viewMap, .no-webgl .toolbar { display: none; }
.notice { display: none; margin: -12px 0 24px; padding: 12px 16px; border-radius: 12px; background: #fff4e5; color: #7a4b00; font-size: 14px; font-weight: 600; }
.no-webgl .notice { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand-sub { display: none; }
}
@media (max-width: 900px) {
  .nav a:not(.cta) { display: none; }
}
@media (max-width: 760px) {
  :root { --header: 56px; }
  .topbar { padding: 0 16px; }
  .brand b { font-size: 20px; }
  .topbar { gap: 8px; }
  .brand b { font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; }
  .nav a.cta { padding: 8px 14px; font-size: 13px; margin-left: 0; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .lang button { padding: 6px 8px; font-size: 12px; }
  .hero { left: 18px; top: 74px; transform: rotate(-9deg) scale(.68); transform-origin: left top; }   /* the desktop title, scaled to fit; tilting from the left keeps it clear of the islands */
  .hero h1 { white-space: nowrap; }   /* scaling happens after layout, so this width is the desktop one */
  /* The 3D map / List toggle is removed from phones for now (see README). Hidden rather than
     display: none, because the map's framing measures this bar's position. */
  .toolbar { top: 12px; right: 12px; left: 12px; visibility: hidden; }
  .stage.panel-open .toolbar { right: 12px; }
  .hint { display: none; }

  .sub-label { font-size: 11.5px; padding: 4px 9px 4px 4px; max-width: 190px; }
  .sub-label .ico { width: 20px; height: 20px; }
  .isl-label { padding: 7px 10px 7px 7px; gap: 7px; max-width: 170px; border-radius: 12px; }
  .isl-label .ico { width: 26px; height: 26px; }
  .isl-label .ico svg { width: 22px; height: 22px; }
  .isl-label b { font-size: 12.5px; }
  .isl-label small { display: none; }
  .hub-label { padding: 7px 14px 7px 7px; }
  .hub-label b { font-size: 14px; max-width: 130px; }
  .hub-label .ico { width: 30px; height: 30px; }

  .mapctl { left: auto; right: 12px; bottom: auto; top: 64px; }
  /* with the persona bar on screen, the compass sits just above its left corner (--persona-top from main.js) */
  html.persona-shown .mapctl { left: 12px; right: auto; top: auto; bottom: calc(100% - var(--persona-top) + var(--header) + 8px); }
  .persona { left: 12px; right: 12px; bottom: 12px; padding: 12px; width: auto; max-width: none; display: block; }
  .persona-q { margin-bottom: 8px; }
  /* all four choices visible at once: 2 × 2 grid, labels may wrap */
  .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .chip { min-height: 44px; padding: 6px 10px 6px 8px; font-size: 12.5px; line-height: 1.25; text-align: left; border-radius: 14px; }
  .chip svg { width: 18px; height: 18px; flex: none; }
  /* route steps in a 2-column grid instead of a sideways-scrolling row, so every step is
     visible; the numbers show the order, so the arrows are dropped */
  .path { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .path[hidden] { display: none; }
  .path-lead { grid-column: 1 / -1; }
  .path .arrow { display: none; }
  .path .step { padding: 5px 8px 5px 5px; font-size: 12.5px; line-height: 1.25; text-align: left; border-radius: 12px; }
  .path .step b { flex: none; }
  /* once a route is chosen: just the chosen persona (tap it to change) and the route in one row */
  #persona.collapsed { padding: 8px; }
  #persona.collapsed .persona-q, #persona.collapsed .path-lead { display: none; }
  #persona.collapsed .chips { grid-template-columns: 1fr; }
  #persona.collapsed .chip[aria-pressed="false"] { display: none; }
  #persona.collapsed .chip[aria-pressed="true"] { min-height: 38px; }
  #persona.collapsed .chip[aria-pressed="true"]::after { content: '✕'; margin-left: auto; padding-left: 8px; font-size: 13px; opacity: .8; }
  #persona.collapsed .path { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 8px; padding-top: 8px; }
  #persona.collapsed .path .step { flex-direction: column; justify-content: flex-start; gap: 3px; padding: 4px 2px; font-size: 10.5px; line-height: 1.2; text-align: center; }
  #persona.collapsed .path .step span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 56%; border-radius: 22px 22px 0 0; transform: translateY(105%); }
  .panel.open { transform: none; }
  .panel-head { padding: 18px 18px 14px; }
  .panel h2 { font-size: 19px; }
  .panel-body { padding: 16px 18px 18px; }
  .panel.expanded { width: auto; height: 78%; }
  .panel.expanded .panel-split > .panel-body { display: none; }
  .panel-pane2 { padding: 14px 18px 18px; border-left: 0; }
  .of-back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 4px; padding: 6px 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }

  .listview { padding: 72px 16px 40px; }
  .listview h2 { font-size: 24px; }
}

/* small phones (iPhone SE and narrower) */
@media (max-width: 380px) {
  .hero { transform: rotate(-9deg) scale(.58); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* The quote form stays inside Mark's existing office panes. */
.of-req fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.of-demo { padding: 10px; border-radius: 8px; background: #fff5df; }
