/* ==========================================================================
   标本 03 — 导航与定位 / 日式车站导向标识
   体裁:站内案内サイン。字号先按视认距离定,再排内容 —— 吊挂式按 20 m 以上、
   见出标按 10 m 前后、壁付式按 4–5 m 以下,三档字号差 4 倍以上。
   当前位置用一条连续的色带 + 指向表达,不给当前项加背景色。
   字面:Yu Gothic(日文汉字与假名)、Noto Sans CJK SC(中文注记)、
   Bahnschrift(罗马字与术著)。外壳不注入;本文件只负责本标本内部。
   ========================================================================== */

html { background: #dedbd3; }   /* 落地色画在最外层,否则 iframe 露白底 */
/* 落地色随版本走:固定成修正版的地面色,会在病原版下方露出不属于它的色带 */
html[data-mode="slop"] { background: #f5f5f9; }
body { margin: 0; }                    /* 页边留白由外壳承担 */

.spn {
  margin: 0;
  font-family: 'Yu Gothic', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  color: #14171a;
  background: #dedbd3;
  -webkit-font-smoothing: antialiased;
}

/* 唯一一处全局重置:牌子与腕的 padding 都算在给定尺寸里 */
*, *::before, *::after { box-sizing: border-box; }

/* 模式切换:两版都在 DOM 里,靠属性显隐 */
[data-mode="slop"]  .v-fixed { display: none; }
[data-mode="fixed"] .v-slop  { display: none; }

:focus-visible { outline: 2px solid #14171a; outline-offset: 2px; }

.spn a, .spn button { font: inherit; }

/* ==========================================================================
   病原 —— AI 味版本
   左侧固定边栏 + 图标胶囊;当前项靠半透明背景模糊高亮;面包屑四层全可点;
   顶上一条带下划线的标签条;右下角一个悬浮按钮。字号按设计稿层级排。
   ========================================================================== */

.s-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.v-slop {
  padding: 2.2rem 1.6rem 3rem;
  background: #f5f5f9;
  font-family: 'Segoe UI', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
}

.s-app {
  position: relative;
  max-width: 52rem;
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding: 1.1rem;
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: 0 18px 44px -22px rgba(76, 58, 138, .34);
}

.s-side { position: sticky; top: 1rem; }

.s-brand {
  margin: 0 0 .8rem;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(92deg, #7c5cf0 0%, #2f74c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.s-menu { display: flex; flex-direction: column; gap: .35rem; }

.s-pill {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .7rem;
  border-radius: 999px;
  font-size: .875rem;
  color: #4b4266;
  text-decoration: none;
}
.s-pill:hover { background: #f4f2fb; }
/* 当前项:一层半透明背景「模糊高亮」—— 在灰度里几乎看不出区别 */
.s-pill.is-now {
  background: rgba(124, 92, 240, .16);
  backdrop-filter: blur(8px);
  color: #3b2f7a;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(124, 92, 240, .25);
}

.s-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: #f0eef8;
  color: #6b5cd6;
}
.s-ico--lg { width: 2.4rem; height: 2.4rem; border-radius: 14px; }
.s-ico svg {
  width: 1.05rem; height: 1.05rem;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.s-main { min-width: 0; }

/* 面包屑堆到四层,每层都能点 */
.s-trail { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .75rem; }
.s-trail a { color: #6a6698; text-decoration: none; }
.s-trail a:hover { text-decoration: underline; }
.s-trail span { color: #c9c6d8; }

.s-tabs { display: flex; gap: 1.1rem; margin: .9rem 0 1.1rem; border-bottom: 1px solid #eceaf4; }
.s-tab { padding: .4rem 0; font-size: .875rem; color: #6f6a85; text-decoration: none; border-bottom: 2px solid transparent; }
.s-tab.is-on { color: #4b3fd0; font-weight: 600; border-bottom-color: #7c5cf0; }

.s-h { margin: 0 0 .35rem; font-size: 1.35rem; }
.s-sub { margin: 0 0 1.1rem; font-size: .875rem; color: #6f6a85; }

.s-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .75rem; }
.s-card { padding: 1rem; border-radius: 1rem; background: #faf9ff; box-shadow: 0 8px 22px -16px rgba(76, 58, 138, .5); }
.s-card h3 { margin: .55rem 0 .2rem; font-size: .9375rem; }
.s-card p { margin: 0; font-size: .8125rem; color: #6f6a85; }

.s-fab {
  position: absolute;
  right: 1rem; bottom: 1rem;
  width: 3.1rem; height: 3.1rem;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: linear-gradient(140deg, #7c5cf0 0%, #2f74c8 100%);
  color: #fff;
  box-shadow: 0 14px 28px -12px rgba(90, 80, 220, .8);
  cursor: pointer;
}
.s-fab svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.s-fab:focus-visible { outline: 2px solid #4b4266; outline-offset: 2px; }

.s-foot { margin: 1rem 0 0; font-size: .75rem; color: #6f6a85; }

/* ==========================================================================
   修正 —— 日式车站导向标识
   色域五个值:标识底、墨、细线,加两条线路色(1号線の青 / 地下鉄の緑)。
   线路色只做一件事 —— 标出「这条路通向哪条线」。
   ========================================================================== */

.v-fixed {
  --paper: #f2f0ea;
  --ground:#dedbd3;
  --ink:   #14171a;
  --rule:  #b3b0a8;
  --band:  #0e6fb8;   /* 1号線 */
  --band2: #0f7a52;   /* 地下鉄 1号線 */

  --f-jp:  'Yu Gothic', 'Yu Gothic UI', 'Noto Sans CJK SC', 'MS Gothic', sans-serif;
  --f-lat: 'Bahnschrift', 'Bahnschrift SemiCondensed', 'Arial Narrow', sans-serif;
  --f-cjk: 'Noto Sans CJK SC', 'Microsoft YaHei UI', sans-serif;
  --f-num: Consolas, 'Cascadia Mono', 'Lucida Console', monospace;

  /* 三档字号 —— 由视认距离倒推,不由设计稿的层级决定 */
  --t-far:  clamp(2.4rem, 9vw, 4rem);     /* 吊掛式  ≥ 20 m */
  --t-head: clamp(1.5rem, 3.4vw, 1.9rem); /* 見出標  約 10 m */
  --t-near: clamp(.875rem, 1.5vw, 1rem);  /* 壁付式  4–5 m */

  padding: 2rem 1.6rem 3rem;
  background: var(--ground);
}

.p-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.p-board {
  max-width: 62rem;
  border: 1px solid #c3c0b8;
  background: var(--paper);
}

/* --------------------------------------------------------------------------
   見出標(約 10 m 視認):駅名帯と、二層だけの階層
   現在層はリンクではない —— 押せる階層が並んでいると、どこにいるか消える。
   -------------------------------------------------------------------------- */
.p-fascia {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  padding: .55rem .9rem .6rem;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 5px solid var(--band);   /* 色帯はここから始まる */
}
.p-fascia__sta { display: flex; align-items: baseline; gap: .55rem; min-width: 0; }
.p-fascia__sta b { font-family: var(--f-jp); font-size: var(--t-head); font-weight: 700; letter-spacing: .05em; line-height: 1.1; }
.p-fascia__sta i { font-family: var(--f-lat); font-style: normal; font-size: .6875rem; letter-spacing: .2em; color: #b9bdc0; }

.p-trail { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.p-trail__up {
  padding-bottom: 1px;
  font-family: var(--f-jp);
  font-size: .9375rem;
  color: #cfd3d6;
  text-decoration: none;
  border-bottom: 1px solid #6d7377;
}
.p-trail__up:hover { color: #fff; border-bottom-color: #fff; }
.p-trail__sep { width: 1.05rem; height: 1px; background: #6d7377; }
.p-trail__here { font-family: var(--f-jp); font-size: 1.0625rem; font-weight: 700; color: #fff; }
.p-fascia__code { font-family: var(--f-lat); font-size: .6875rem; letter-spacing: .22em; color: #b9bdc0; }

/* 视认距离注记:图上的一行边注,不是区块标题 */
.p-tier {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1.15rem .9rem .5rem;
  font-family: var(--f-cjk);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: #4a4f53;
}
.p-tier::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule); }
.p-tier b { font-family: var(--f-num); font-weight: 600; letter-spacing: .04em; color: var(--ink); }
.p-fascia + .p-tier { margin-top: .9rem; }

/* --------------------------------------------------------------------------
   吊掛式(遠距離 ≥ 20 m 視認)
   一条天花板线 + 每块牌子两根吊杆。字号大得夸张,是因为它要在 20 m 外读到。
   -------------------------------------------------------------------------- */
.p-far { position: relative; display: flex; flex-wrap: wrap; gap: 1.1rem; padding: 0 .9rem 1.2rem; }
.p-far::before { content: ""; position: absolute; left: .9rem; right: .9rem; top: 0; height: 1px; background: var(--rule); }

.p-hang {
  position: relative;
  flex: 1 1 16rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: .85rem;
  margin-top: 1.5rem;
  padding: .6rem .95rem .7rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.p-hang::before, .p-hang::after {
  content: "";
  position: absolute;
  top: -1.5rem;
  width: 3px; height: 1.5rem;
  background: var(--ink);
}
.p-hang::before { left: 2rem; }
.p-hang::after  { right: 2rem; }
.p-hang:hover { background: #ffffff; }
.p-hang__arw { grid-row: span 2; flex: 0 0 auto; width: clamp(1.9rem, 4.6vw, 2.9rem); height: clamp(1.9rem, 4.6vw, 2.9rem); color: var(--ink); }
.p-hang__jp { display: block; font-family: var(--f-jp); font-weight: 700; font-size: var(--t-far); line-height: 1.02; letter-spacing: .03em; }
.p-hang__ro { display: block; margin-top: .1rem; font-family: var(--f-lat); font-size: clamp(.75rem, 1.4vw, .9375rem); letter-spacing: .2em; color: #4a4f53; text-transform: uppercase; }

.p-hang__arw svg, .arm__arw svg {
  display: block; width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   色帯:現在地から目標まで、途切れずに一本で通す
   -------------------------------------------------------------------------- */
.p-band { display: flex; align-items: center; gap: .8rem; margin: .2rem .9rem 1.4rem; }
.p-band__now { display: flex; flex-direction: column; flex: 0 0 auto; }
.p-band__now b { font-family: var(--f-cjk); font-size: .625rem; letter-spacing: .2em; color: #3d4246; }
.p-band__now i { font-family: var(--f-jp); font-style: normal; font-size: .9375rem; font-weight: 600; }

.p-band__run { position: relative; flex: 1 1 auto; height: 6px; background: var(--band); }
.p-band__run::after {
  content: "";
  position: absolute;
  right: -1px; top: -4px;
  width: 0; height: 0;
  border-left: 10px solid var(--band);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.p-band__mark { position: absolute; left: 0; top: -3px; width: 4px; height: 12px; background: var(--ink); }

.p-band__goal { display: flex; flex-direction: column; flex: 0 0 auto; text-align: right; }
.p-band__name { font-family: var(--f-jp); font-size: 1.0625rem; font-weight: 700; }
.p-band__walk { font-family: var(--f-jp); font-style: normal; font-size: .75rem; color: #4a4f53; }

/* --------------------------------------------------------------------------
   米字:八方向の腕。中央が現在地、腕の先が行き先。
   細い線は行き先ごとの通路、目標までの一本だけが色帯になる。
   -------------------------------------------------------------------------- */
.p-area { position: relative; margin: 0 .9rem 1.3rem; }

.p-arms {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 行高下限取 max-content:格子里的字说不许溢出到下一段去(1fr 的 auto 下限只按 min-content 算) */
  grid-template-rows: repeat(3, minmax(max-content, 1fr));
  gap: 1.4rem;
  margin: 0; padding: 0;
  list-style: none;
}
.p-web { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.web { stroke: var(--rule); stroke-width: 1px; }
.web.is-band { stroke: var(--band); stroke-width: 6px; }

.arm { position: relative; min-width: 0; }
.arm__link {
  position: relative;
  display: block;
  height: 100%;
  padding: 1.35rem .55rem;
  background: var(--paper);
  border-top: 2px solid var(--rule);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}
.arm__link:hover { background: #fbfaf6; }
.arm__dir { display: block; font-family: var(--f-cjk); font-size: .625rem; letter-spacing: .18em; color: #5c6165; }
.arm__jp  { display: block; margin-top: .18rem; font-family: var(--f-jp); font-size: var(--t-near); font-weight: 600; line-height: 1.3; }
.arm__ro  { display: block; margin-top: .12rem; font-family: var(--f-lat); font-size: .625rem; letter-spacing: .14em; color: #5c6165; text-transform: uppercase; }
.arm__meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.arm__tag { padding: .05rem .3rem; border: 1px solid var(--rule); font-family: var(--f-jp); font-size: .6875rem; color: #3d4246; }
.arm__walk { font-family: var(--f-jp); font-size: .6875rem; color: #5c6165; }

/* 目標の腕:色帯が通り、名前が太くなる */
.arm__link.is-goal { box-shadow: inset 0 0 0 2px var(--band); }
.arm__link.is-goal .arm__jp { font-weight: 700; }
.arm__link.is-goal .arm__arw { color: var(--band); }

/* 八方向の矢印:外側を向く。位置も向きも、その腕の方向そのもの */
.arm__arw { position: absolute; width: 1.15rem; height: 1.15rem; color: var(--ink); }
.arm--nw .arm__arw { top: .35rem; left: .35rem; transform: rotate(-135deg); }
.arm--n  .arm__arw { top: .35rem; left: 50%; margin-left: -.575rem; transform: rotate(-90deg); }
.arm--ne .arm__arw { top: .35rem; right: .35rem; transform: rotate(-45deg); }
.arm--w  .arm__arw { top: 50%; left: .35rem; margin-top: -.575rem; transform: rotate(180deg); }
.arm--e  .arm__arw { top: 50%; right: .35rem; margin-top: -.575rem; }
.arm--sw .arm__arw { bottom: .35rem; left: .35rem; transform: rotate(135deg); }
.arm--s  .arm__arw { bottom: .35rem; left: 50%; margin-left: -.575rem; transform: rotate(90deg); }
.arm--se .arm__arw { bottom: .35rem; right: .35rem; transform: rotate(45deg); }

/* 現在地:中央の一枚だけが墨。ここが「今いるところ」 */
.arm--now .arm__here {
  display: block;
  height: 100%;
  padding: 1.35rem .55rem;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.arm--now .arm__dir { color: #b9bdc0; }
.arm--now .arm__jp { font-size: var(--t-head); font-weight: 700; }
.arm--now .arm__ro { color: #b9bdc0; }
.arm__tag--now { border-color: #6d7377; color: var(--paper); }

/* 乗り換え:线路色で、乗り換え先の線を示す */
.arm__link--xfer { border-top: 3px solid var(--band2); }
.arm__tag--xfer { border-color: var(--band2); color: var(--band2); }
.arm__link--xfer .arm__arw { color: var(--band2); }
.arm__link--xfer.is-goal { box-shadow: inset 0 0 0 2px var(--band2); }

/* 閉鎖:行けない、が消さない。斜線と「閉鎖中」と理由で示す */
.arm__link--shut {
  cursor: not-allowed;
  border-top-style: dashed;
  border-top-color: var(--ink);
  background:
    repeating-linear-gradient(45deg, rgba(20, 23, 26, .09) 0 1px, transparent 1px 6px),
    var(--paper);
}
.arm__tag--shut { border-color: var(--ink); color: var(--ink); }
.arm__arw--shut { color: #6f7377; }
.arm__arw--shut::after {
  content: "";
  position: absolute;
  left: -.15rem; right: -.15rem; top: 50%;
  height: 2px;
  background: var(--ink);
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   索引:行き先の説明。読み物なので近距の本文サイズでよい
   -------------------------------------------------------------------------- */
.p-index { margin: 0 .9rem 1.2rem; }
.p-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .2rem 1.8rem;
  margin: 0; padding: 0;
  list-style: none;
}
.p-list li { padding: .45rem 0 .35rem; border-top: 1px solid var(--rule); }
.p-list li:target { background: #e8eef4; }
.p-list b { font-family: var(--f-jp); font-size: .9375rem; font-weight: 600; }
.p-list i { margin-left: .5rem; font-family: var(--f-lat); font-style: normal; font-size: .625rem; letter-spacing: .16em; color: #5c6165; text-transform: uppercase; }
.p-list span { display: block; margin-top: .12rem; font-family: var(--f-jp); font-size: .8125rem; line-height: 1.65; color: #3d4246; }

.p-shut {
  margin: .8rem 0 0;
  padding: .5rem .6rem;
  border: 1px solid var(--ink);
  font-family: var(--f-jp);
  font-size: .8125rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   根拠:視認距離 → 文字寸法。この図が何から決まっているかを图里说清
   -------------------------------------------------------------------------- */
.p-legend { margin: 0 .9rem; padding: .85rem 0 1rem; border-top: 2px solid var(--ink); }
.p-legend__h { margin: 0 0 .55rem; font-family: var(--f-cjk); font-size: .8125rem; font-weight: 600; letter-spacing: .16em; }
.p-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--f-cjk); font-size: .75rem; }
.p-tbl caption { padding-bottom: .35rem; text-align: left; font-size: .6875rem; color: #5c6165; }
.p-tbl th { padding: .25rem .6rem .25rem 0; text-align: left; font-weight: 600; border-bottom: 1px solid var(--ink); }
.p-tbl td { padding: .32rem .6rem .32rem 0; vertical-align: top; line-height: 1.5; border-bottom: 1px solid var(--rule); }
.p-tbl th:nth-child(1), .p-tbl td:nth-child(1) { width: 21%; }
.p-tbl th:nth-child(2), .p-tbl td:nth-child(2) { width: 31%; }
.p-num { font-family: var(--f-num); font-size: .6875rem; line-height: 1.4; }

.p-src { margin: .7rem 0 0; font-family: var(--f-cjk); font-size: .75rem; line-height: 1.7; color: #3d4246; }
.p-foot { margin: .6rem 0 0; padding-top: .5rem; border-top: 1px solid var(--rule); font-family: var(--f-cjk); font-size: .6875rem; color: #5c6165; }

/* 焦点:悬吊牌与八根腕都要看得见;深色底上的链接用浅色环 */
.arm__link:focus-visible { outline: 3px solid var(--band); outline-offset: 2px; }
.p-hang:focus-visible { outline: 3px solid var(--band); outline-offset: 3px; }
.p-trail__up:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* 動效はここだけ:目標が変わると色帯がその腕へ移る */
.web { transition: stroke .16s linear, stroke-width .16s linear; }
[data-static] .web { transition: none; }
@media (prefers-reduced-motion: reduce) { .web { transition: none; } }

@media (max-width: 860px) {
  .p-hang { flex-basis: 100%; }
}

@media (max-width: 620px) {
  .v-slop { padding-left: 1rem; padding-right: 1rem; }
  .v-fixed { padding-left: 1rem; padding-right: 1rem; }
  .s-app { grid-template-columns: 9.5rem minmax(0, 1fr); gap: .8rem; padding: .8rem; }
  .s-brand { font-size: .9rem; }
  .s-pill { padding: .4rem .5rem; font-size: .75rem; gap: .4rem; }
  .s-ico { width: 1.5rem; height: 1.5rem; }
  .s-ico svg { width: .9rem; height: .9rem; }
  .s-ico--lg { width: 1.9rem; height: 1.9rem; border-radius: 10px; }
  .p-arms { gap: .7rem; }
  .arm__link, .arm--now .arm__here { padding: 1.15rem .4rem; }
  .p-fascia__code { display: none; }
}
