@font-face{font-family:"Noto Sans SC";font-style:normal;font-weight:100 900;font-display:block;src:url("../fonts/noto-sans-sc/noto-sans-sc-diagram-v1.woff2") format("woff2")}
.railway-diagram-launch{white-space:nowrap}
#railwayDiagram{position:fixed;inset:0;z-index:2300;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#fafaf5;color:#202722;font:14px/1.4 'Noto Sans SC','Microsoft YaHei','Yu Gothic UI',sans-serif}
#railwayDiagram[hidden]{display:none!important}
#railwayDiagram *{box-sizing:border-box}
#railwayDiagram button,#railwayDiagram input{font:inherit}
#railwayDiagram button:focus-visible,#railwayDiagram input:focus-visible{outline:3px solid #296bcd;outline-offset:3px}
.diagram-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px;padding:12px 20px;border-bottom:1px solid #e0e4da;background:#fafaf5}
.diagram-heading{margin-right:auto}
.diagram-heading strong{display:block;font-size:21px;letter-spacing:.08em}
.diagram-heading small{font-size:12px;color:#626d60}
.diagram-actions{display:flex;gap:8px}
.diagram-actions button,.diagram-card button{min-height:40px;padding:8px 12px;border:1px solid #c7cfc2;border-radius:8px;background:#fff;color:#26312a;cursor:pointer}
.diagram-actions .diagram-back{background:#202c24;color:#fff;border-color:#202c24}
.diagram-search{position:relative;flex:0 1 270px;min-width:160px}
.diagram-search input{width:100%;height:40px;padding:8px 12px;border:1px solid #bac5b4;border-radius:8px;background:#fff;color:#26312a}
.diagram-search-results{position:absolute;top:44px;left:0;right:0;z-index:1200;max-height:260px;overflow:auto;background:#fff;border:1px solid #c7cfc2;border-radius:8px;box-shadow:0 4px 15px #24352322}
.diagram-search-results[hidden]{display:none}
.diagram-search-results button{display:block;width:100%;min-height:44px;padding:8px 12px;border:0;background:#fff;color:#253228;text-align:left;cursor:pointer}
.diagram-search-results button:hover{background:#eff4e9}
.diagram-lines{display:flex;flex-wrap:wrap;gap:7px;width:100%}
.diagram-lines button{display:flex;align-items:center;gap:7px;min-height:34px;padding:4px 9px;border:1px solid #d4dacd;border-radius:6px;background:#fff;color:#253027;font-size:12px!important;cursor:pointer}
.diagram-lines button[aria-pressed=false]{opacity:.45}
.diagram-lines i{display:inline-block;width:22px;height:6px;border-radius:9px;background:var(--line-color)}
.diagram-canvas-wrap{position:relative;min-height:0;overflow:hidden}
#railwayDiagramMap{width:100%;height:100%;background:radial-gradient(#d3dbcb 1px,transparent 1px);background-size:24px 24px}
#railwayDiagramMap .leaflet-control-attribution{font-size:10px!important;color:#52624d!important;background:#fafaf5d9!important;box-shadow:none!important;border:0!important}
#railwayDiagramMap .leaflet-control-attribution a{color:#52624d!important}
.diagram-node-icon{background:none;border:0}
.diagram-station{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:#222b23;cursor:pointer}
.diagram-station-dot{display:block;width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #394433}
.diagram-station-label{position:absolute;left:38px;top:10px;display:block;white-space:nowrap;text-align:left;font-size:15px;font-weight:700;line-height:1.15;text-shadow:0 1px 2px #fafaf5,1px 0 2px #fafaf5,-1px 0 2px #fafaf5}
.diagram-station-label small{display:block;margin-top:4px;color:#626d60;font-size:10px;font-weight:400}
.diagram-station[data-side=left] .diagram-station-label{left:auto;right:38px;text-align:right}
.diagram-station[data-hub=true] .diagram-station-dot{width:18px;height:18px;box-shadow:0 0 0 3px #202c24}
.diagram-station[data-hub=true] .diagram-station-label{top:4px}
.diagram-station[data-hub=true] .diagram-station-label b{display:inline-block;padding:4px 9px;border-radius:10px;background:#202c24;color:#fff;font-size:21px;text-shadow:none}
.diagram-station[aria-pressed=true] .diagram-station-dot{background:#ffdc61;box-shadow:0 0 0 3px #202c24,0 0 0 8px #e3aa2577}
.diagram-station-role{position:absolute;top:-5px;left:8px;display:none;min-width:28px;padding:2px 4px;border-radius:4px;background:#202c24;color:#fff;font-size:10px}
.diagram-station-role:not(:empty){display:block}
.diagram-station.label-hidden .diagram-station-label{visibility:hidden}
.diagram-station.minor-hidden{display:none}
.diagram-card{position:absolute;z-index:1000;left:18px;bottom:18px;width:310px;padding:14px 16px;border:1px solid #c7cfc2;border-radius:12px;background:#fffef7ed;box-shadow:0 5px 25px #25391c18;backdrop-filter:blur(8px)}
.diagram-card[hidden]{display:none}
.diagram-card-heading{display:flex;align-items:start;gap:10px;justify-content:space-between}
.diagram-card h2{margin:0;font-size:24px}
.diagram-card .diagram-card-close{min-height:30px;padding:2px 9px}
.diagram-card small{display:block;color:#62705e;font-size:11px}
.diagram-card p{margin:8px 0 12px;color:#48543f;font-size:12px}
.diagram-card-actions{display:flex;gap:6px;flex-wrap:wrap}
.diagram-card-actions button{flex:1;min-height:42px;padding:7px;font-size:12px!important}
.diagram-card-actions button:disabled{opacity:.4;cursor:default}
.diagram-card-actions .diagram-depart{border-color:#537d6b;background:#eaf2ed}
.diagram-card-actions .diagram-arrive{border-color:#b97563;background:#f8ece7}
.diagram-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;min-height:44px;padding:8px 18px;border-top:1px solid #e0e4da;background:#fafaf5}
.diagram-footer small{font-size:11px;color:#5e6a56}
.diagram-route-status{font-size:12px;color:#283823;overflow-wrap:anywhere}
.diagram-zoom{position:absolute;z-index:1000;right:18px;bottom:18px;display:grid;gap:6px}
.diagram-zoom button{width:44px;height:44px;border:1px solid #bcc8b5;border-radius:8px;background:#fff;color:#293c24;font-size:20px!important;cursor:pointer}
.diagram-zoom .diagram-fit{font-size:11px!important}
@media(max-width:680px){.diagram-header{padding:10px 12px;gap:8px}.diagram-heading strong{font-size:17px}.diagram-heading small{font-size:10px}.diagram-actions{gap:4px}.diagram-actions button{min-height:40px;padding:7px;font-size:11px!important}.diagram-search{flex:1 1 100%}.diagram-lines{gap:4px}.diagram-lines button{flex:1;justify-content:center;font-size:10px!important;padding:4px;min-height:36px}.diagram-lines i{width:14px}.diagram-card{left:10px;right:62px;bottom:10px;width:auto;padding:10px 12px}.diagram-card h2{font-size:20px}.diagram-card p{margin:5px 0 8px}.diagram-zoom{right:10px;bottom:10px}.diagram-footer{padding:7px 10px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.diagram-station-label{font-size:14px}.diagram-station[data-hub=true] .diagram-station-label b{font-size:19px}}
@media(max-height:500px){.diagram-heading small,.diagram-footer small{display:none}.diagram-header{padding:6px 12px;gap:5px 12px}.diagram-search{flex:0 1 190px}.diagram-lines{width:auto;flex:1}.diagram-card{bottom:8px;padding:8px 12px}.diagram-card p{display:none}.diagram-footer{min-height:28px;padding:4px 10px}}

.diagram-lines{width:auto;flex:1 1 360px}
.diagram-route-picker{display:flex;align-items:center;gap:8px;flex:0 1 300px;min-width:180px;font-size:12px}
.diagram-route-picker select,#diagramExportScope{min-width:0;min-height:38px;padding:6px 9px;border:1px solid #bac5b4;border-radius:8px;background:#fff;color:#26312a;font:inherit}
.diagram-route-picker select{flex:1;width:100%}
.diagram-card-actions[hidden],.diagram-cluster-options[hidden]{display:none!important}
.diagram-cluster-options{display:grid;gap:5px;max-height:200px;overflow:auto;margin-top:8px;overscroll-behavior:contain}
.diagram-cluster-options button{min-height:42px;text-align:left;font-size:12px!important;white-space:normal}
.diagram-cluster .diagram-station-dot{display:grid;place-items:center;width:27px;height:27px;background:#32432d;color:#fff;font:700 11px/1 sans-serif;box-shadow:0 0 0 2px #32432d}
.diagram-cluster[aria-pressed=true] .diagram-station-dot{color:#263225}
#railwayDiagram .leaflet-control-attribution{max-width:100%;white-space:normal}
#railwayDiagram .diagram-station-label small{max-width:170px;overflow:hidden;text-overflow:ellipsis}
@media(max-width:680px){.diagram-lines{flex:1 1 100%}.diagram-route-picker{flex:1 1 100%}.diagram-route-picker select{min-height:34px;font-size:12px}#diagramExportScope{min-height:40px;max-width:88px;font-size:11px}.diagram-heading strong{font-size:17px}.diagram-cluster-options{max-height:150px}}
@media(max-height:500px){.diagram-lines{flex:1 1 320px}.diagram-route-picker{flex:0 1 270px}.diagram-cluster-options{max-height:90px}}

#railwayDiagram,#railwayDiagramMap,.diagram-header,.diagram-footer{background-color:#fff}
#railwayDiagramMap{background-image:none}
.diagram-station-label{font-size:13px;font-weight:600;line-height:1.15;text-shadow:none;background:#ffffffed;border-radius:2px;padding:2px 4px}
.diagram-station-label small{display:none}
.diagram-station[data-hub=true] .diagram-station-label b{padding:0;background:none;border-radius:0;color:#26384b;font-size:16px;text-shadow:none}
.diagram-station-dot{width:8px;height:8px;border:1.5px solid #324452;box-shadow:0 0 0 2px #fff}
.diagram-station[data-hub=true] .diagram-station-dot{width:12px;height:12px;border:2px solid #324452;box-shadow:0 0 0 2px #fff}
.diagram-cluster .diagram-station-dot{width:16px;height:16px;position:relative;display:grid;place-items:center;background:#fff;color:#26384b;border:2px solid #324452;box-shadow:0 0 0 2px #fff}
.diagram-cluster .diagram-station-dot:after{content:'';width:6px;height:6px;border:1px solid #324452;border-radius:50%;background:#fff}
.diagram-station[aria-pressed=true] .diagram-station-dot{background:#ffdc61;box-shadow:0 0 0 2px #fff,0 0 0 5px #e3aa2533}
.diagram-card{background:#fffffff5}
@media(max-width:680px){.diagram-station-label{font-size:13px}.diagram-station[data-hub=true] .diagram-station-label b{font-size:16px}}

#railwayDiagram .leaflet-container,#railwayDiagram button,#railwayDiagram input,#railwayDiagram select{font-family:"Noto Sans SC","Microsoft YaHei","Yu Gothic UI",sans-serif}
.diagram-station-label,.diagram-station-label b{font-weight:500}
.diagram-station[data-hub=true] .diagram-station-label b{font-weight:600}
.diagram-card h2{font-weight:600}

/* Printed metro map: strong bands, white station rings and heavy labels. */
#railwayDiagram{color:#111}
.diagram-heading strong{font-weight:800;letter-spacing:0}
.diagram-station-label,.diagram-station-label b{font-size:16px;font-weight:700;line-height:1;color:#111}
.diagram-station-label{padding:4px;background:#fff;border-radius:0}
.diagram-station-label b{display:block}
.diagram-station-label[data-orientation=vertical]{writing-mode:vertical-rl;text-orientation:upright}
.diagram-station[data-hub=true] .diagram-station-label b{font-size:20px;font-weight:800;color:#111}
.diagram-station-dot{width:16px;height:16px;border:2.5px solid #171717;box-shadow:0 0 0 2px #fff}
.diagram-station[data-hub=true] .diagram-station-dot{width:22px;height:22px;border:2.5px solid #171717;box-shadow:0 0 0 2px #fff}
.diagram-cluster .diagram-station-dot{width:26px;height:26px;border:2.5px solid #171717;box-shadow:0 0 0 2px #fff}
.diagram-cluster .diagram-station-dot:after{width:11px;height:11px;border:1.5px solid #171717}
.diagram-card h2{font-weight:800;color:#111}
.diagram-lines i{height:9px;border-radius:0}

/* Tokyo printed diagram proportions. Actual source station references only. */
.diagram-print-legend{height:36px;display:flex;align-items:center;gap:26px;flex:1 1 100%;overflow:hidden}
#railwayDiagram .diagram-print-legend button{display:flex;align-items:center;gap:8px;min-width:0;max-width:430px;padding:0;border:0;background:transparent;text-align:left;font-size:16px;font-weight:800;cursor:pointer;color:#111}
.diagram-print-legend i{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;color:#fff;font-style:normal;font-size:10px;font-weight:700}
.diagram-print-legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.diagram-station-dot,.diagram-station[data-hub=true] .diagram-station-dot,.diagram-cluster .diagram-station-dot{display:flex;flex-direction:column;justify-content:center;gap:0;background:#fff;width:24px;height:24px;border:1.5px solid var(--station-color);box-shadow:0 0 0 1px #fff}
.diagram-station[data-hub=true] .diagram-station-dot,.diagram-cluster .diagram-station-dot{width:28px;height:28px}
.diagram-cluster .diagram-station-dot{outline:.6px solid var(--station-color);outline-offset:-4px}
.diagram-cluster .diagram-station-dot:after{display:none}
.diagram-code-prefix{display:block;color:#111;font:600 7.5px/8px "Noto Sans SC",sans-serif}
.diagram-code-value{display:block;color:#111;font:700 10px/11px "Noto Sans SC",sans-serif}
.diagram-code-character{font-size:14px;line-height:16px}
.diagram-station[aria-pressed=true] .diagram-station-dot{background:#fff;box-shadow:0 0 0 3px #e6b53c}
.diagram-station-label{padding:0;background:transparent;overflow:visible}
.diagram-station-label[data-orientation=vertical]{writing-mode:horizontal-tb}
.diagram-station-label b{display:block;font-size:18px;font-weight:800;line-height:1}
.diagram-station[data-hub=true] .diagram-station-label b{font-size:22px;font-weight:900}
.diagram-station-label svg{display:block;overflow:visible}
.diagram-card h2{font-weight:900}
@media(max-width:680px){#railwayDiagram .diagram-print-legend button:not(:first-child){display:none}.diagram-print-legend{gap:8px}.diagram-print-legend i{width:26px;height:26px;flex-basis:26px}#railwayDiagram .diagram-print-legend button{font-size:14px}}
@media(max-height:500px){.diagram-print-legend{height:30px;flex:1 1 280px}.diagram-print-legend i{height:24px;width:24px;flex-basis:24px}#railwayDiagram .diagram-print-legend button{font-size:12px}}

.diagram-print-legend b{display:block;font-weight:800;line-height:20px;overflow:hidden;text-overflow:ellipsis}
.diagram-print-legend small{display:block;font-size:8px;font-weight:400;line-height:10px;color:#4a4a4a}
@media(max-width:680px),(max-height:500px){
 .diagram-station-dot{width:20px;height:20px}
 .diagram-station[data-hub=true] .diagram-station-dot,.diagram-cluster .diagram-station-dot{width:24px;height:24px}
 .diagram-code-prefix{font-size:6.5px;line-height:7px}
 .diagram-code-value{font-size:9px;line-height:9px}
 .diagram-code-character{font-size:14px;line-height:16px}
}

/* Keep the drawing area usable beside the phone station sheet. */
@media(max-width:680px){
 .diagram-header{padding:8px 12px;gap:6px 8px}
 .diagram-heading strong{font-size:17px;line-height:24px}
 .diagram-heading small{font-size:10px;line-height:14px}
 .diagram-card{padding:9px 12px}
 .diagram-card h2{font-size:20px;line-height:26px}
 .diagram-card small{font-size:10px}
 .diagram-card p{margin:4px 0 6px;font-size:10px;max-height:28px;overflow:auto}
 .diagram-card-actions button{min-height:44px}
 .diagram-print-legend{height:30px}
 .diagram-footer{padding:5px 12px}
}

/* The national sheet uses Toei-style white interchange capsules. */
#railwayDiagram[data-level=overview] .diagram-station-dot,
#railwayDiagram[data-level=overview] .diagram-cluster .diagram-station-dot{width:14px;height:14px;border:0;background:#fff;box-shadow:none;outline:none}
#railwayDiagram[data-level=overview] .diagram-station-dot span{display:none}
#railwayDiagram[data-level=overview] .diagram-station[aria-pressed=true] .diagram-station-dot{box-shadow:0 0 0 3px #111}
@media(min-width:1100px){
 .diagram-header{gap:8px 18px;padding:9px 16px}
 .diagram-heading{flex:0 0 245px}
 .diagram-search{flex:0 1 270px}
 .diagram-actions{margin-left:auto}
 .diagram-lines{order:4;flex:0 1 390px}
 .diagram-route-picker{order:5;flex:0 1 270px}
 .diagram-print-legend{order:6;flex:1 1 300px;gap:20px;height:34px}
 #railwayDiagram .diagram-print-legend button{font-size:13px}
}

@media(min-width:680px){#railwayDiagram[data-level=overview] .diagram-station{width:32px;height:32px}}
#railwayDiagram[data-level=overview] .diagram-station-label svg{background:none}

#railwayDiagram[data-level=overview] .diagram-station-dot,#railwayDiagram[data-level=overview] .diagram-cluster .diagram-station-dot{width:10px;height:10px}
.diagram-map-legend{display:none;position:absolute;right:78px;bottom:18px;width:190px;z-index:800;padding:5px;background:#fff}
@media(min-width:1100px){#railwayDiagram[data-level=overview] .diagram-map-legend{display:block}}
.diagram-map-legend ul{margin:0 0 6px;padding:0;list-style:none}
.diagram-map-legend li{height:17px}
#railwayDiagram .diagram-map-legend button{display:flex;align-items:center;gap:7px;width:100%;height:17px;border:0;background:#fff;padding:0;color:#111;cursor:pointer;font-size:10px;font-weight:700}
.diagram-map-legend i{width:22px;flex:0 0 22px;height:7px}
.diagram-map-legend span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.diagram-map-legend>div{border:1.2px solid #555;border-radius:9px;text-align:center;padding:4px 0}
.diagram-map-legend strong{display:block;font-size:24px;line-height:28px;font-weight:900;color:#111}
.diagram-map-legend small{font-size:10px;line-height:13px;font-weight:800;color:#111}

/* Compact two-column key leaves room for the eastern branches. */
.diagram-map-legend{width:236px}
.diagram-map-legend ul{display:grid;grid-template-columns:1fr 1fr;gap:0 6px}
#railwayDiagram .diagram-map-legend button{font-size:9px;gap:5px}
.diagram-map-legend i{width:18px;flex-basis:18px}


#railwayDiagram[data-level=overview] .diagram-station-dot,#railwayDiagram[data-level=overview] .diagram-cluster .diagram-station-dot{width:var(--overview-dot,10px);height:var(--overview-dot,10px)}

.diagram-route-caption{pointer-events:none;background:none;border:0}
.diagram-route-caption svg{display:block;overflow:visible}
