:root {
  --indigo: #003399; --indigo-2: #2F5FB8; --indigo-soft: #EAF0FB; --blue: #0077C0; --blue-soft: #E6F2FA;
  --down: #E08A3C; --down-ink: #B4570C; --down-soft: #FBEFE4;
  --ink: #1A1D24; --body: #3D4452; --muted: #5B6270; --line: #E3E6EC; --line-2: #D5DAE3;
  --bg: #F5F6F8; --card: #FFFFFF; --soft: #F5F7FB;
  --r: 14px; --shadow: 0 2px 10px rgba(16, 24, 40, 0.10);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Noto Sans JP', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; }
button { font-family: inherit; }
.num { font-family: Inter, 'Noto Sans JP', sans-serif; font-feature-settings: "tnum"; }

/* ---- 上部バー ---- */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { display: block; width: 159px; height: 30px; }
.brand .div { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; align-self: center; }
.brand .title { font-size: 15px; font-weight: 700; }
.brand .sub { font-size: 12px; color: var(--muted); }
.modes { display: flex; gap: 4px; background: #EEF1F6; padding: 4px; border-radius: 10px; }
.modes button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 8px 16px; border-radius: 8px; font-size: 13px; color: var(--body); cursor: pointer; min-height: 36px; }
.modes button.on { background: var(--card); color: var(--indigo); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.grow { flex-grow: 1; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.chip { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink); }

/* ---- レイアウト ---- */
.layout { display: grid; gap: 16px; padding: 16px 24px 24px; height: calc(100vh - 62px); min-height: 640px; }
.layout[data-mode="area"] { grid-template-columns: minmax(0, 55fr) minmax(520px, 45fr); }
.layout[data-mode="persona"] { grid-template-columns: 280px minmax(0, 1fr) 380px; }
.layout[data-mode="profile"] { grid-template-columns: minmax(0, 1fr); }
.layout[data-mode="area"] .tree, .layout[data-mode="profile"] .tree,
.layout[data-mode="profile"] .mapwrap, .layout[data-mode="profile"] .panel { display: none; }
.layout[data-mode="profile"] .profile { display: flex !important; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
@media (max-width: 960px) {
  .layout, .layout[data-mode] { grid-template-columns: minmax(0, 1fr) !important; height: auto; }
  .mapwrap { min-height: 480px; }
}

/* ---- 地図 ---- */
.mapwrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #EEF0F3; min-height: 480px; }
#map { position: absolute; inset: 0; }
.tools { position: absolute; top: 16px; left: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--card); padding: 6px; border-radius: 12px; box-shadow: var(--shadow); z-index: 2; }
.tool { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--body); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tool.on { background: var(--indigo); color: #fff; }
.tool:hover:not(.on) { background: #F0F3F8; }
.presets { position: absolute; top: 16px; left: 84px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.presets button { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.96); font-size: 12px; color: var(--body); cursor: pointer; box-shadow: 0 1px 4px rgba(16,24,40,0.08); }
.presets button:hover { border-color: var(--indigo); color: var(--indigo); }
.hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; max-width: calc(100% - 140px); background: rgba(255,255,255,0.97); padding: 8px 14px; border-radius: 10px; font-size: 12px; line-height: 1.9; color: var(--body); font-weight: 500; z-index: 2; box-shadow: 0 1px 6px rgba(16,24,40,0.12); text-align: center; transition: background .15s, color .15s; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 16px; }
.hint .it { white-space: nowrap; }
.hint:empty { display: none; }
.hint.warn { background: #FDECEC; color: #9B1C1C; }
.hint kbd { display: inline-block; min-width: 20px; padding: 0 6px; margin: 0 4px 0 0; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 600 11px/18px Inter, sans-serif; color: var(--ink); text-align: center; }
.tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 8px rgba(16,24,40,.25); }
.tools .sep { height: 1px; margin: 2px 6px; background: var(--line); }
.tool.dim { opacity: .4; }
.tool:disabled { opacity: .35; cursor: default; }
.tool:disabled:hover { background: transparent; }
.loading { position: absolute; top: 16px; right: 16px; background: var(--indigo); color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 12px; z-index: 3; }
.legend { position: absolute; top: 16px; left: 16px; padding: 12px 14px; z-index: 2; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; max-width: 300px; }
.legend .name { font-weight: 700; font-size: 14px; }
.legend .ramp { display: flex; height: 10px; width: 200px; border-radius: 5px; overflow: hidden; }
.legend .ramp span { flex: 1 0 0; }
.legend .ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--body); width: 200px; }
.legend .note { font-size: 11px; color: var(--muted); }
.roi-label { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--indigo); color: #fff; padding: 5px 10px; border-radius: 8px; font: 700 12px 'Noto Sans JP', sans-serif; box-shadow: 0 2px 8px rgba(0,51,153,0.28); white-space: nowrap; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.roi-label .k { font-family: Inter, sans-serif; font-weight: 600; opacity: .8; }
.roi-label.b { background: var(--blue); box-shadow: 0 2px 8px rgba(0,119,192,0.28); }
.roi-label.sel { box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(16,24,40,.28); transform: translateY(-1px); }
.roi-label.passive { pointer-events: none; opacity: .75; }

/* ---- 右のパネル ---- */
.panel { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.panel .card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.empty { padding: 28px 24px; color: var(--muted); line-height: 1.8; font-size: 13px; }
.empty h2 { color: var(--ink); font-size: 16px; margin: 0 0 8px; }
.roi-head { display: flex; align-items: center; gap: 8px; }
.roi-head .sw { width: 10px; height: 10px; border-radius: 3px; }
.roi-head h2 { margin: 0; font-size: 17px; }
.roi-head .sub { font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; color: var(--indigo); }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.summary { margin: 0; padding: 12px 14px; background: var(--indigo-soft); border-radius: 10px; font-size: 14px; line-height: 1.7; color: #11234D; }
.summary.b { background: var(--blue-soft); color: #0B3550; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 34px; padding: 0 12px; border-radius: 17px; font-size: 12px; cursor: pointer; border: 1px solid var(--line-2); background: var(--card); color: var(--body); }
.pill.on { border-color: var(--indigo); background: var(--indigo); color: #fff; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { min-height: 40px; padding: 0 12px; border: 0; background: transparent; font-size: 13px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--indigo); font-weight: 700; border-bottom-color: var(--indigo); }
.rows { display: flex; flex-direction: column; }
.rowhead { display: flex; font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.row { display: flex; align-items: center; height: 28px; font-size: 12.5px; }
.row .n { flex: 0 0 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row .bar { flex: 1 1 auto; position: relative; height: 14px; }
.row .bar .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: #9AA1AE; }
.row .bar .b { position: absolute; border-radius: 3px; }
.row .v { flex: 0 0 64px; text-align: right; font-weight: 600; }
.row .v.b2 { flex-basis: 56px; color: var(--blue); }
.leaf { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: #F7F8FA; }
.leaf .r { font-size: 18px; font-weight: 700; color: var(--indigo); flex: 0 0 64px; }
.leaf .t { display: flex; flex-direction: column; }
.leaf .t b { font-size: 13.5px; }
.leaf .t span { font-size: 11px; color: var(--muted); }
.attr h3 { font-size: 12px; margin: 0 0 6px; }
.split { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 11px; color: #fff; }
.split span { display: flex; align-items: center; padding-left: 8px; white-space: nowrap; overflow: hidden; }
.hbar { display: flex; align-items: center; gap: 8px; height: 22px; font-size: 12px; }
.hbar .l { flex: 0 0 76px; }
.hbar .t { flex: 1 1 auto; height: 10px; background: #EEF1F6; border-radius: 5px; position: relative; }
.hbar .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--indigo); }
.hbar .p { flex: 0 0 44px; text-align: right; }
.foot { font-size: 11px; color: var(--muted); }
.warn { padding: 14px 16px; background: #FFF6E9; border-radius: 10px; color: #6B3306; font-size: 13px; line-height: 1.6; }

/* ---- 木 ---- */
.tree { padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tree .cap { font-size: 12px; color: var(--muted); padding: 2px 8px 8px; }
.tree .u { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.tree .u:hover { background: #F3F6FB; }
.tree .u.open { background: #EEF2FA; font-weight: 700; }
.tree .u.sel { background: var(--indigo); color: #fff; }
.tree .u .s { margin-left: auto; order: 3; font-size: 11px; color: var(--muted); }
.tree .u.sel .s { color: #DDE5F3; }
.tree .kids { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px 22px; }
.tree .mid { font-size: 11px; color: var(--muted); padding: 6px 10px 2px; }
.tree .k { min-height: 30px; text-align: left; padding: 4px 10px; border: 0; border-radius: 6px; font-size: 12.5px; cursor: pointer; background: transparent; color: var(--body); display: flex; }
.tree .k:hover { background: #F3F6FB; }
.tree .k.sel { background: var(--indigo); color: #fff; font-weight: 700; }
.tree .k .s { margin-left: auto; font-size: 11px; opacity: 0.75; }

/* ---- ペルソナの中身 ---- */
.crumb { font-size: 12px; color: var(--muted); }
.ptitle { margin: 0; font-size: 20px; }
.words { display: flex; flex-direction: column; gap: 4px; }
.curve svg { width: 100%; height: 110px; display: block; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.badge.up { background: var(--indigo-soft); color: #11234D; }
.badge.dn { background: var(--down-soft); color: #6B3306; }

/* ---- 人物像 ---- */
.profile { gap: 16px; flex-wrap: wrap; align-items: stretch; overflow-y: auto; }
.profile .form { flex: 1 1 300px; max-width: 340px; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.profile .form h2 { margin: 0; font-size: 17px; }
.profile .grp { display: flex; flex-direction: column; gap: 8px; }
.profile .grp .lab { font-size: 12px; font-weight: 700; }
.profile .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.profile .opts .pill { min-height: 40px; padding: 0 16px; border-radius: 20px; font-size: 13px; }
.profile .res { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.profile .res .card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.profile .big { margin: 0; font-size: 18px; line-height: 1.7; font-weight: 700; }

.roi-mini { padding: 14px 16px !important; gap: 8px !important; }
.roi-mini .line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.roi-mini .est { font-size: 20px; font-weight: 700; color: var(--indigo); }
.roi-mini .est small { font-size: 12px; color: var(--muted); font-weight: 400; }
.roi-mini .smp { font-size: 11px; color: var(--muted); }
.roi-mini .summary { font-size: 13px; padding: 10px 12px; }

.roi-head h2 { min-width: 0; }
.roi-head .nm { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 0; background: transparent; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; font: inherit; color: inherit; cursor: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roi-head .nm svg { color: var(--muted); opacity: 0; transition: opacity .12s; flex: none; }
.roi-head .nm:hover { background: #F0F3F8; }
.roi-head .nm:hover svg, .roi-head .nm:focus-visible svg { opacity: 1; }
.nm-input { font: 700 16px 'Noto Sans JP', sans-serif; color: var(--ink); border: 1px solid var(--indigo); border-radius: 6px; padding: 2px 6px; width: 12em; outline: 3px solid var(--indigo-soft); }
.roi-head .sub { white-space: nowrap; }
.roi-ic { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.roi-ic:first-of-type { margin-left: auto; }
.roi-ic:hover { background: #F0F3F8; color: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--indigo); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- アイコン（Lucide、文字色で塗る） ---- */
.ic { display: inline-block; flex: none; width: 16px; height: 16px; background: currentColor; vertical-align: -3px;
      -webkit-mask: var(--u) center / contain no-repeat; mask: var(--u) center / contain no-repeat; }
.ic.xs { width: 12px; height: 12px; vertical-align: -2px; }
.ic.lg { width: 22px; height: 22px; }
.tile { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--indigo-soft); color: var(--indigo); display: inline-flex; align-items: center; justify-content: center; }
.tile .ic { width: 15px; height: 15px; }
.tile.lg { width: 44px; height: 44px; border-radius: 12px; }
.tile.lg .ic { width: 22px; height: 22px; }
.tree .u.sel .tile { background: rgba(255,255,255,0.16); color: #fff; }
.tree .u .chev { order: 4; color: var(--muted); display: inline-flex; }
.tree .u.sel .chev { color: #DDE5F3; }
.row .n { display: inline-flex; align-items: center; gap: 8px; flex-basis: 172px; min-width: 0; }
.row .n .nt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row .n .ic { color: var(--muted); }
.leaf .t span .ic { margin-right: 4px; }
.phead { display: flex; align-items: center; gap: 12px; }
.empty .tile.lg { margin-bottom: 12px; }

/* ---- 背景の推計来訪者数 ---- */
.dlegend { position: absolute; left: 16px; bottom: 40px; padding: 10px 12px; z-index: 2; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; width: 228px; }
.dlegend .name { font-size: 12px; font-weight: 700; color: var(--ink); }
.dlegend .ramp { display: flex; height: 10px; border-radius: 3px; overflow: hidden; }
.dlegend .ramp i { flex: 1; }
.dlegend .ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--body); }
.dlegend .note { font-size: 10.5px; color: var(--muted); }
#htip { background: rgba(26,29,36,0.88); }

/* ---- ペルソナ一覧（ツリーマップ／表） ---- */
.panel .roi-mini { padding: 12px 16px !important; gap: 6px !important; }
.panel .roi-mini .summary { margin: 0; }
.listcard { gap: 10px !important; padding: 14px 16px !important; }
.lc-head { display: flex; align-items: baseline; gap: 10px; }
.lc-head h3 { margin: 0; font-size: 15px; }
.lc-ctl, .lc-ctl2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-ctl2 .grow { flex: 1; }
.seg { display: inline-flex; background: #EEF1F6; padding: 3px; border-radius: 9px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font: 500 12px 'Noto Sans JP', sans-serif; color: var(--body); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--indigo); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.lc-q { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 10px; height: 32px; color: var(--muted); }
.lc-q:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
.lc-q input { border: 0; outline: 0; font: 13px 'Noto Sans JP', sans-serif; width: 100%; background: transparent; color: var(--ink); }
.pill.sm { min-height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 14px; }

.tm { position: relative; height: 420px; border-radius: 10px; overflow: hidden; background: #fff; }
.tm-g { position: absolute; }
.tm-gh { position: absolute; left: 0; right: 0; top: 0; height: 18px; display: flex; align-items: center; gap: 4px; padding: 0 3px; font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; }
.tm-gh span { overflow: hidden; text-overflow: ellipsis; }
.tm-gh b { margin-left: auto; font-weight: 600; color: var(--muted); font-size: 10.5px; }
.tm-gh .ic { color: var(--muted); }
.tm-c { position: absolute; border: 0; padding: 3px 4px; margin: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; border-radius: 2px; transition: filter .12s, box-shadow .12s; }
.tm-c .n { font-size: 11px; font-weight: 500; line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: anywhere; }
.tm-c .v { font-size: 11px; font-weight: 600; opacity: .9; }
.tm-c.unsure { opacity: .42; }
.tm-c.dim { opacity: .12; }
.tm-c:hover { filter: brightness(0.94); box-shadow: inset 0 0 0 2px var(--ink); z-index: 2; }
.tm-c.hl { box-shadow: inset 0 0 0 2px var(--ink); z-index: 2; }
.tm-tip { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.tm-tip .p { font-size: 11px; color: var(--muted); }
.tm-tip .h { font-size: 14px; font-weight: 700; color: var(--ink); }
.tm-tip .r { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--body); }
.tm-tip .r b { font-size: 15px; }
.tm-tip .r small { color: var(--muted); font-size: 11px; }
.tm-tip .s { font-size: 11px; color: var(--muted); }
.tm-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted); }
.tm-legend .ramp { display: inline-flex; width: 150px; height: 9px; border-radius: 3px; overflow: hidden; }
.tm-legend .ramp i { flex: 1; }
.tm-legend .ticks { display: inline-flex; gap: 10px; color: var(--body); }
.tm-legend .u { display: inline-flex; align-items: center; gap: 5px; }
.tm-legend .u i { width: 14px; height: 9px; border-radius: 2px; background: #6F8CC7; opacity: .42; }

.lt { max-height: clamp(380px, calc(100vh - 430px), 720px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.lt-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 3px 6px; border: 0; background: transparent; font: inherit; text-align: left; border-radius: 6px; }
.lt-head { position: sticky; top: 0; z-index: 1; background: var(--card); font-size: 11px; color: var(--muted); min-height: 24px; border-bottom: 1px solid var(--line); border-radius: 0; }
.lt-n { flex: 0 0 196px; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.lt-n .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-n small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-bar { flex: 1; position: relative; height: 16px; text-align: center; }
.lt-head .lt-bar { height: auto; }
.lt-bar .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #9AA1AE; }
.lt-bar .b { position: absolute; border-radius: 3px; }
.lt-v { flex: 0 0 52px; text-align: right; font-size: 12px; font-weight: 600; }
.lt-v.lo { color: #B4570C; }
.lt-v.unsure { opacity: .5; }
.lt-u { cursor: pointer; font-weight: 700; margin-top: 2px; }
.lt-u:hover { background: #F3F6FB; }
.lt-u.open { background: #EEF2FA; }
.lt-u .lt-n { font-weight: 700; }
.lt-u .chev { display: inline-flex; color: var(--muted); }
.lt-u .lt-n .ic:not(.xs) { color: var(--muted); }
.lt-l .lt-n { padding-left: 34px; font-size: 12px; color: var(--body); flex-direction: column; align-items: flex-start; gap: 0; justify-content: center; }
.lt-l.hl { background: #FFF6D6; }
.lt-mid { font-size: 10.5px; color: var(--muted); padding: 6px 6px 0 40px; }
.attrcard { padding: 12px 16px !important; }
.attrcard summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 6px; }
.attrcard summary::before { content: '▸'; color: var(--muted); font-size: 11px; }
.attrcard[open] summary::before { content: '▾'; }

.topchips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.topchips .lab { font-size: 11px; color: var(--muted); margin-right: 2px; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; border: 1px solid var(--line-2); background: var(--card); border-radius: 13px; padding: 3px 9px; font: 12px 'Noto Sans JP', sans-serif; color: var(--ink); cursor: pointer; }
.chip b { font-size: 11.5px; font-weight: 700; }
.chip:hover { border-color: var(--indigo); }

/* 特徴的な小分類ペルソナ */
.tops { display: flex; flex-direction: column; gap: 6px; }
.tops.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tops-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tops-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 2px 2px 4px; }
.tops-h .sw { width: 10px; height: 10px; border-radius: 3px; }
.leaf.tl { border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 10px 12px; gap: 12px; }
.leaf.tl:hover { background: #EEF2FA; }
.leaf.tl .rk { flex: 0 0 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.leaf.tl .r { font-size: 22px; flex: 0 0 74px; }
.tops.two .leaf.tl .r { font-size: 19px; flex-basis: 62px; }
.leaf.tl .t { min-width: 0; }
.leaf.tl .t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.leaf.tl .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.leaf.tl .t span .ic { margin-right: 4px; }

.legend .note, .dlegend .note { white-space: nowrap; }
.profile-card .words .hbar .t, .panel .words .hbar .t { background: transparent; }
/* 範囲が2つのときの比較表 */
.cmpcard { padding: 10px 14px !important; }
table.cmpt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cmpt th { font-size: 11px; color: var(--muted); font-weight: 500; text-align: right; padding: 2px 8px; }
table.cmpt th.l, table.cmpt td.l { text-align: left; }
table.cmpt td { padding: 5px 8px; text-align: right; border-top: 1px solid #F1F3F6; white-space: nowrap; }
table.cmpt td.big { font: 700 16px Inter, 'Noto Sans JP', sans-serif; }
table.cmpt td.ops { width: 70px; }
table.cmpt .nm { border: 0; background: transparent; font: 700 14px 'Noto Sans JP', sans-serif; color: var(--ink); cursor: text; padding: 0; }
.badge-ab { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 5px; background: var(--indigo); color: #fff; font: 700 11px Inter, sans-serif; }
.badge-ab.b { background: #fff; color: var(--blue); border: 1.5px dashed var(--blue); }

/* 人物像の倍率の値（棒の先端） */
.row .bar { position: relative; }
.tipv { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tm-c .n { word-break: keep-all; overflow-wrap: normal; }
.tm-c .n.cut { white-space: nowrap; text-overflow: ellipsis; display: block; }
/* 空の状態: 東京圏全体の構成 */
.basebars { display: flex; flex-direction: column; gap: 4px; }
.bb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.bb .ic { color: var(--muted); }
.bb .n { flex: 0 0 170px; }
.bb .t { flex: 1; height: 10px; position: relative; }
.bb .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--indigo); }
.bb .p { flex: 0 0 48px; text-align: right; color: var(--body); }

.stats.one { grid-template-columns: minmax(0, 1fr); }
.hint1 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }

/* 年収・ライフステージの倍率 */
.lvl { margin-top: 10px; }
.lvl .row { height: 22px; font-size: 12px; }
.lvl .row .bar .ci { position: absolute; top: 6px; height: 2px; background: #0B2F86; opacity: .45; }
.lvl .row .v { flex: 0 0 48px; text-align: right; }
.lvl .row .v.up { color: #003399; } .lvl .row .v.dn { color: #B4570C; }
.lvl.sex .row { height: 26px; }
.lvl.sex .row .bar { height: 16px; }
.lvl.sex .row .v { flex-basis: 86px; font-size: 11.5px; }
#profcard .ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#profcard .seg { display: inline-flex; background: #EEF1F6; border-radius: 8px; padding: 2px; }
#profcard .seg button { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; color: var(--body); }
#profcard .seg button.on { background: #fff; color: #003399; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ログイン中の利用者（AWS で Auth0 を使うときだけ出る） */
.authuser { display: flex; align-items: center; gap: 8px; margin-left: 14px; font-size: 12px; color: var(--body); }
.authuser button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 9px; font: inherit; cursor: pointer; }
