/* 海上瓷路 */
:root {
	--paper: #f1ece0; --paper-2: #e8e0cd; --paper-3: #f7f3ea;
	--ink: #1d2b53; --ink-2: #44507a; --mute: #7c8299;
	--cobalt: #2545c2; --iron: #e0533a; --celadon: #2f8a72; --amber: #c7861a; --tang: #b4532a;
	--deep: #0a1840; --line: rgba(29, 43, 83, .16);
	--serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
	--sans: "Space Grotesk", system-ui, -apple-system, "PingFang SC", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: var(--serif); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.nojs { padding: 2em; }

.app { position: fixed; inset: 0; overflow: hidden; }

/* ———— 海图 ———— */
.chart { position: absolute; inset: 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.chart:active { cursor: grabbing; }
.chart canvas { position: absolute; left: 0; top: 0; display: block; }
#seaUI:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(37, 69, 194, .45); }
.chart.nogl #seaGL { display: none; }
.labels, .marks { position: absolute; inset: 0; pointer-events: none; }

.pl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; line-height: 1; color: var(--ink); }
.pl.off { display: none; }
.pl b { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.pl i { position: absolute; left: 6px; top: -6px; font-style: normal; font-weight: 600; letter-spacing: .04em; text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper), 0 0 6px var(--paper); }
.pl small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; color: var(--mute); letter-spacing: .06em; }
.pl-kiln b { border-radius: 0; transform: rotate(45deg); background: var(--iron); border-color: var(--paper); width: 7px; height: 7px; }
.pl-kiln i { color: #8a3a22; }
.pl-city b { background: var(--ink); }
.pl-sea i { left: 0; transform: translateX(-50%); font-weight: 500; font-size: 15px; letter-spacing: .55em; color: rgba(29, 43, 83, .55); text-shadow: none; }
.pl-big i { font-size: 22px; letter-spacing: .9em; color: rgba(29, 43, 83, .42); }
.pl-grat i { left: 2px; top: 3px; font-size: 10px; font-weight: 500; letter-spacing: .2em; color: rgba(29, 43, 83, .55); text-shadow: none; }

/* 沉船标记：海图符号里的沉船（横线穿三竖，外加虚线圈） */
.wk { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; --c: var(--ink); }
.wk.off { visibility: hidden; }
.wk.era-tang { --c: var(--tang); } .wk.era-song { --c: var(--celadon); } .wk.era-ming { --c: var(--cobalt); } .wk.era-qing { --c: var(--amber); }
.wk-sym { position: absolute; left: -15px; top: -10px; width: 30px; height: 20px; overflow: visible; }
.wk-sym .o { fill: rgba(241, 236, 224, .92); stroke: var(--c); stroke-width: 1.4; stroke-dasharray: 2.4 2.2; }
.wk-sym path { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; }
.wk-ring { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: ping 2.6s ease-out infinite; }
.wk:nth-child(2n) .wk-ring { animation-delay: .9s; } .wk:nth-child(3n) .wk-ring { animation-delay: 1.7s; }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.wk-t { position: absolute; left: 17px; top: -13px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; text-align: left; padding: 3px 7px 4px; background: rgba(241, 236, 224, .9); border-left: 2px solid var(--c); }
.wk-t b { font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--ink); line-height: 1.1; }
.wk-t em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--c); letter-spacing: .02em; }
.wk.left .wk-t { left: auto; right: 17px; border-left: 0; border-right: 2px solid var(--c); align-items: flex-end; }
.wk:hover .wk-t, .wk:focus-visible .wk-t, .wk.on .wk-t { background: var(--ink); }
.wk:hover .wk-t b, .wk:focus-visible .wk-t b, .wk.on .wk-t b { color: var(--paper); }
.wk:focus-visible { outline: none; }
.wk:focus-visible .wk-sym .o, .wk.on .wk-sym .o { fill: var(--c); }
.wk.done .wk-sym .o { stroke-dasharray: none; stroke-width: 2; }

/* ———— 刊头 ———— */
.mast { position: absolute; left: clamp(16px, 2.4vw, 36px); top: clamp(14px, 2.4vh, 30px); pointer-events: none; max-width: 22em; }
.mast-t { margin: 0; font-weight: 900; font-size: clamp(38px, 4.6vw, 70px); line-height: 1; letter-spacing: .08em; color: var(--ink); text-shadow: 3px 3px 0 rgba(224, 83, 58, .28); }
.mast-s { margin: 10px 0 0; font-size: clamp(13px, 1.1vw, 15px); font-weight: 600; letter-spacing: .12em; color: var(--ink-2); }
.mast-k { margin: 8px 0 0; font: 500 10.5px/1 var(--sans); letter-spacing: .26em; color: var(--mute); }
.mast::before { content: ""; position: absolute; left: -40px; top: -30px; right: -50px; bottom: -26px; z-index: -1; background: radial-gradient(closest-side, rgba(241, 236, 224, .9), rgba(241, 236, 224, .75) 60%, rgba(241, 236, 224, 0)); }

/* ———— 工具 ———— */
.tools { position: absolute; right: clamp(12px, 2vw, 28px); top: clamp(12px, 2vh, 24px); display: flex; gap: 8px; align-items: center; }
.season { display: flex; border: 1.5px solid var(--ink); background: var(--paper); }
.season button { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 15px; letter-spacing: .06em; }
.season button small { font-size: 11px; font-weight: 500; color: var(--mute); margin-left: 2px; }
.season button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.season button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.season button[aria-checked="true"] small { color: rgba(241, 236, 224, .7); }
.season button:focus-visible, .tb:focus-visible { outline: 3px solid rgba(37, 69, 194, .5); outline-offset: 2px; }
.tb { display: grid; place-items: center; width: 42px; height: 42px; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; padding: 0; }
.tb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tb:hover, .season button:hover { background: var(--paper-2); }
.season button[aria-checked="true"]:hover { background: var(--ink); }
#bSound .x { display: none; } #bSound[aria-pressed="false"] .w { display: none; } #bSound[aria-pressed="false"] .x { display: inline; }
#bSound path:first-child { fill: currentColor; stroke: none; }

.season-q { position: absolute; right: clamp(12px, 2vw, 28px); top: calc(clamp(12px, 2vh, 24px) + 52px); margin: 0; max-width: 17em; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); text-align: right; letter-spacing: .04em; pointer-events: none; text-shadow: 0 0 4px var(--paper), 0 0 8px var(--paper); }
.season-q cite { display: block; font-style: normal; color: var(--mute); font-size: 11px; }

/* ———— 沉船坞 ———— */
.dock { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(980px, calc(100% - 24px)); pointer-events: none; }
.dock-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; font: 600 11px/1 var(--sans); letter-spacing: .24em; color: var(--ink-2); }
.dock-h span { text-shadow: 0 0 4px var(--paper); }
.dock-h em { font-style: normal; font-family: var(--mono); letter-spacing: .04em; font-weight: 500; }
.chips { display: flex; gap: 6px; pointer-events: auto; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 0; min-width: 132px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px 9px; border: 1.5px solid var(--ink); background: rgba(241, 236, 224, .94); cursor: pointer; text-align: left; scroll-snap-align: start; position: relative; --c: var(--ink); }
.chip.era-tang { --c: var(--tang); } .chip.era-song { --c: var(--celadon); } .chip.era-ming { --c: var(--cobalt); } .chip.era-qing { --c: var(--amber); }
.chip::before { content: ""; position: absolute; left: -1.5px; top: -1.5px; bottom: -1.5px; width: 5px; background: var(--c); }
.chip b { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.chip em { font: 500 11px/1 var(--mono); font-style: normal; color: var(--c); }
.chip i { position: absolute; right: 8px; top: 8px; font-style: normal; font-size: 11px; color: var(--mute); }
.chip.done i { color: var(--celadon); }
.chip:hover, .chip.on { background: var(--ink); color: var(--paper); }
.chip:hover em, .chip.on em { color: var(--paper); }
.chip:focus-visible { outline: 3px solid rgba(37, 69, 194, .5); outline-offset: 2px; }

/* ———— 沉船小卡 ———— */
.tip { position: absolute; left: 0; top: 0; z-index: 20; width: 300px; padding: 16px 18px 16px; background: var(--paper-3); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 rgba(29, 43, 83, .14); --c: var(--ink); }
.tip.era-tang { --c: var(--tang); } .tip.era-song { --c: var(--celadon); } .tip.era-ming { --c: var(--cobalt); } .tip.era-qing { --c: var(--amber); }
.tip-k { font: 500 11px/1 var(--mono); color: var(--c); letter-spacing: .04em; }
.tip h2 { margin: 6px 0 2px; font-size: 24px; font-weight: 900; letter-spacing: .06em; }
.tip-l { font: 500 11px/1.3 var(--sans); letter-spacing: .14em; color: var(--mute); text-transform: uppercase; }
.tip p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.tip-n { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tip-n b { font: 600 22px/1 var(--sans); color: var(--ink); letter-spacing: -.01em; }
.tip-n span { font-size: 12.5px; color: var(--ink-2); }
.tip-go { margin-top: 14px; display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; letter-spacing: .1em; cursor: pointer; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--c, var(--cobalt)); border-color: var(--c, var(--cobalt)); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn:focus-visible { outline: 3px solid rgba(37, 69, 194, .5); outline-offset: 2px; }
.btn[disabled] { opacity: .4; cursor: default; }

/* ———— 加载 ———— */
.loading { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); font-size: 15px; letter-spacing: .4em; color: var(--ink-2); z-index: 90; transition: opacity .6s; }
.loading.gone { opacity: 0; pointer-events: none; }

/* ———— 潜水 ———— */
.dive { position: absolute; inset: 0; z-index: 30; background: #0d2a52; color: var(--paper); }
#diveCv { position: absolute; left: 0; top: 0; display: block; }
#diveCv:focus-visible { outline: none; }
.dv-hud { position: absolute; left: clamp(48px, 4.4vw, 70px); top: 70px; pointer-events: none; }
.dv-depth { display: flex; align-items: baseline; gap: 6px; font: 600 clamp(40px, 5vw, 64px)/1 var(--sans); letter-spacing: -.02em; color: var(--paper); }
.dv-depth i { font: 600 16px/1 var(--serif); font-style: normal; letter-spacing: .1em; opacity: .75; }
.dv-name { margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: .14em; opacity: .9; }
.dv-name small { display: block; margin-top: 4px; font: 500 11px/1 var(--sans); letter-spacing: .2em; opacity: .7; }
.dv-back { position: absolute; left: clamp(12px, 2vw, 28px); top: clamp(12px, 2vh, 20px); display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 8px; border: 1.5px solid rgba(241, 236, 224, .7); background: rgba(10, 24, 64, .4); color: var(--paper); cursor: pointer; font-weight: 700; letter-spacing: .1em; }
.dv-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dv-back:hover { background: var(--paper); color: var(--deep); }
.dv-back:focus-visible { outline: 3px solid rgba(241, 236, 224, .6); outline-offset: 2px; }
.dv-hint { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); margin: 0; padding: 8px 16px; font-size: 14px; letter-spacing: .1em; color: var(--paper); background: rgba(10, 24, 64, .55); border: 1px solid rgba(241, 236, 224, .3); white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.dive.has-mf .dv-hint { left: calc((100% - 400px) / 2); }

/* 船货清单 */
.mf { position: absolute; right: 0; top: 0; bottom: 0; width: 400px; overflow-y: auto; padding: 22px 24px calc(24px + var(--safe-b)); background: var(--paper); color: var(--ink); border-left: 1.5px solid var(--ink); transform: translateX(100%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); scrollbar-width: thin; --c: var(--ink); }
.dive.has-mf .mf { transform: none; }
.mf.era-tang { --c: var(--tang); } .mf.era-song { --c: var(--celadon); } .mf.era-ming { --c: var(--cobalt); } .mf.era-qing { --c: var(--amber); }
.mf-k { font: 500 11px/1 var(--mono); color: var(--c); letter-spacing: .04em; }
.mf h2 { margin: 6px 0 0; font-size: 28px; font-weight: 900; letter-spacing: .06em; }
.mf-l { font: 500 11px/1.3 var(--sans); letter-spacing: .16em; color: var(--mute); text-transform: uppercase; margin-top: 4px; }
.mf dl { margin: 14px 0 0; display: grid; grid-template-columns: 3.2em 1fr; gap: 8px 10px; font-size: 13px; line-height: 1.7; }
.mf dt { color: var(--mute); font-size: 12px; padding-top: 1px; }
.mf dd { margin: 0; color: var(--ink-2); }
.mf-sec { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.mf-sec h3 { margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; letter-spacing: .2em; }
.mf-sec h3 small { font: 500 11px/1 var(--mono); letter-spacing: 0; color: var(--mute); }
.mf-dots { display: block; width: 100%; height: auto; }
.mf-leg { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.mf-leg li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; color: var(--ink-2); }
.mf-leg li i { width: 10px; height: 10px; border: 1px solid rgba(29, 43, 83, .4); }
.mf-leg li b { font: 500 12px/1 var(--mono); color: var(--ink); }
.mf-leg li small { display: block; font-size: 11px; color: var(--mute); }
.mf-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mf-items button { width: 100%; display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); background: var(--paper-3); text-align: left; cursor: pointer; font-size: 14px; }
.mf-items button:hover { border-color: var(--ink); }
.mf-items button:focus-visible { outline: 3px solid rgba(37, 69, 194, .45); outline-offset: 1px; }
.mf-items button i { width: 18px; height: 18px; border: 1.5px dashed var(--mute); border-radius: 50%; }
.mf-items button.got i { border: 0; background: var(--c); box-shadow: inset 0 0 0 4px var(--paper-3); }
.mf-items button small { font: 500 11px/1 var(--mono); color: var(--mute); }
.mf-q { margin: 0; font-size: 14px; line-height: 1.9; letter-spacing: .04em; color: var(--ink); }
.mf-q cite { display: block; margin-top: 6px; font-style: normal; font-size: 11.5px; color: var(--mute); line-height: 1.6; }
.mf-src { font-size: 11px; line-height: 1.7; color: var(--mute); }
.mf-twin { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.mf-act { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ———— 捞上来的器物 ———— */
.card { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(10, 24, 64, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.card-in { position: relative; width: min(940px, 100%); max-height: calc(100% - 10px); display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 rgba(10, 24, 64, .35); overflow: hidden; animation: up .5s cubic-bezier(.2, .8, .2, 1); --c: var(--ink); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.card-stage { position: relative; min-height: 420px; background: radial-gradient(ellipse at 50% 60%, #faf7f0, #ebe4d2 70%); border-right: 1.5px solid var(--ink); }
.card-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.card-stage .svgi { position: absolute; inset: 10%; display: grid; place-items: center; }
.card-stage .svgi svg { width: 100%; height: 100%; }
.card-stage .tag { position: absolute; left: 14px; bottom: 12px; font: 500 10.5px/1.4 var(--sans); letter-spacing: .2em; color: var(--mute); }
.card-body { padding: 26px 28px 24px; overflow-y: auto; }
.card-k { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--c); }
.card h2 { margin: 8px 0 0; font-size: 30px; font-weight: 900; letter-spacing: .06em; }
.card-kiln { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: .06em; }
.card-n { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; padding: 10px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.card-n b { font: 600 24px/1 var(--sans); letter-spacing: -.01em; }
.card-n span { font-size: 12.5px; color: var(--mute); }
.card-t { margin: 14px 0 0; font-size: 15px; line-height: 1.9; color: var(--ink); }
.card-src { margin: 12px 0 0; font-size: 11px; line-height: 1.6; color: var(--mute); }
.card-act { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.card-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; z-index: 2; }
.card-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ———— 上岸 ———— */
.land { position: absolute; inset: 0; z-index: 60; background: var(--paper); --c: var(--ink); }
#shore { position: absolute; left: 0; top: 0; width: 100%; height: 132px; display: block; }
.land-stage { position: absolute; left: 0; top: 132px; right: min(420px, 38%); bottom: 0; }
.land-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.land-stage #scene2d { pointer-events: none; }
.land-cap { position: absolute; right: 0; top: 132px; bottom: 0; width: min(420px, 38%); padding: 26px 30px calc(24px + var(--safe-b)); overflow-y: auto; border-left: 1.5px solid var(--ink); background: var(--paper-3); }
.land-x { position: absolute; left: clamp(12px, 2vw, 24px); top: 146px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 8px; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; font-weight: 700; letter-spacing: .1em; z-index: 2; }
.land-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.land-x:hover { background: var(--ink); color: var(--paper); }
.lc-k { font: 500 11px/1 var(--mono); letter-spacing: .06em; color: var(--mute); }
.lc-steps { display: flex; gap: 6px; margin: 10px 0 0; }
.lc-steps button { flex: 1; height: 30px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; font: 600 12px/1 var(--mono); position: relative; }
.lc-steps button.e { border-color: var(--iron); color: var(--iron); }
.lc-steps button[aria-current="step"] { background: var(--ink); color: var(--paper); }
.lc-steps button.e[aria-current="step"] { background: var(--iron); color: var(--paper); }
.lc-steps button:focus-visible { outline: 3px solid rgba(37, 69, 194, .5); outline-offset: 2px; }
.lc-flow { margin: 16px 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--cobalt); }
.lc-flow.e { color: var(--iron); }
.lc-flow svg { width: 26px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; }
.land-cap h2 { margin: 6px 0 0; font-size: 30px; font-weight: 900; letter-spacing: .06em; }
.lc-era { margin: 6px 0 0; font: 500 12px/1.4 var(--mono); color: var(--ink-2); }
.lc-t { margin: 14px 0 0; font-size: 15px; line-height: 1.95; }
.lc-layers { margin: 16px 0 0; }
.lc-layers h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--mute); }
.lc-layers div { display: grid; grid-template-columns: 56px 1fr; gap: 0 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.lc-layers div i { height: 12px; border: 1px solid rgba(29, 43, 83, .35); border-top-width: 0; }
.lc-layers div:first-of-type i { border-top-width: 1px; }
.lc-src { margin: 14px 0 0; font-size: 11px; line-height: 1.6; color: var(--mute); }
.lc-nav { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ———— 说明 ———— */
.about { position: absolute; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(29, 43, 83, .3); }
.about-in { position: relative; width: min(460px, 100%); height: 100%; overflow-y: auto; padding: 30px 30px calc(30px + var(--safe-b)); background: var(--paper-3); border-left: 1.5px solid var(--ink); animation: slide .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.about h2 { margin: 0; font-size: 24px; letter-spacing: .1em; }
.about h3 { margin: 22px 0 6px; font-size: 14px; letter-spacing: .2em; color: var(--ink-2); }
.about p, .about li { font-size: 14px; line-height: 1.9; color: var(--ink); }
.about ul { padding-left: 1.2em; margin: 6px 0; }
.about .src { font-size: 11.5px; line-height: 1.75; color: var(--mute); }
.about .card-x { right: 14px; top: 14px; }
.about kbd { font: 500 11px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line); background: var(--paper); }

/* ———— 手机 ———— */
@media (max-width: 760px) {
	.mast { left: 14px; top: 12px; }
	.mast-t { font-size: 34px; }
	.mast-s { margin-top: 6px; font-size: 12.5px; letter-spacing: .08em; }
	.mast-k { display: none; }
	.tools { top: 10px; right: 10px; gap: 6px; }
	.season button { min-height: 38px; padding: 0 9px; font-size: 14px; }
	.season button small { display: none; }
	.tb { width: 38px; height: 38px; }
	.tools .tb#bAbout { display: none; }
	.season-q { display: none; }
	.dock { width: 100%; bottom: calc(8px + var(--safe-b)); }
	.dock-h { padding: 0 14px 6px; }
	.chips { padding: 0 12px; }
	.chip { flex: 0 0 auto; min-width: 118px; }
	.wk-t b { font-size: 12.5px; }
	.tip { left: 10px !important; right: 10px; top: auto !important; bottom: calc(96px + var(--safe-b)); width: auto; }
	.dv-hud { top: 62px; }
	.dv-depth { font-size: 40px; }
	.mf { left: 0; right: 0; top: auto; width: auto; height: 46%; border-left: 0; border-top: 1.5px solid var(--ink); transform: translateY(100%); padding: 16px 16px calc(20px + var(--safe-b)); }
	.dive.has-mf .dv-hint { left: 50%; bottom: calc(46% + 12px); }
	.dv-hint { font-size: 13px; }
	.card { padding: 0; align-items: end; }
	.card-in { grid-template-columns: 1fr; max-height: 100%; height: 100%; overflow-y: auto; box-shadow: none; border: 0; }
	.card-stage { min-height: 46vh; border-right: 0; border-bottom: 1.5px solid var(--ink); }
	.card-body { padding: 18px 18px calc(24px + var(--safe-b)); overflow: visible; }
	.card h2 { font-size: 26px; }
	#shore { height: 92px; }
	.land-stage { top: 92px; right: 0; bottom: 46%; }
	.land-cap { top: auto; height: 46%; width: 100%; border-left: 0; border-top: 1.5px solid var(--ink); padding: 14px 16px calc(18px + var(--safe-b)); }
	.land-cap h2 { font-size: 24px; }
	.lc-t { font-size: 14px; line-height: 1.85; }
	.land-x { top: 100px; }
	.about-in { width: 100%; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.wk-ring { animation: none; }
	.card-in, .about-in { animation: none; }
}

/* 沉船名牌的六个方位 */
.wk[data-pos="l"] .wk-t, .wk[data-pos="ld"] .wk-t, .wk[data-pos="lu"] .wk-t { left: auto; right: 17px; border-left: 0; border-right: 2px solid var(--c); align-items: flex-end; }
.wk[data-pos="rd"] .wk-t, .wk[data-pos="ld"] .wk-t { top: 9px; }
.wk[data-pos="ru"] .wk-t, .wk[data-pos="lu"] .wk-t { top: auto; bottom: 15px; }
.wk[data-pos="rd"] .wk-t, .wk[data-pos="ru"] .wk-t { left: 14px; }
.wk[data-pos="ld"] .wk-t, .wk[data-pos="lu"] .wk-t { right: 14px; }

/* 宽屏：竖排刊头放在左边空白里 */
@media (min-width: 1101px) {
	.mast { display: flex; align-items: flex-start; gap: 14px; max-width: none; top: clamp(18px, 3vh, 34px); left: clamp(22px, 2.4vw, 40px); }
	.mast > * { writing-mode: vertical-rl; }
	.mast-t { font-size: clamp(52px, 6.4vh, 78px); letter-spacing: .16em; text-shadow: 3px 3px 0 rgba(224, 83, 58, .28); }
	.mast-s { margin: 4px 0 0; font-size: 15px; letter-spacing: .34em; }
	.mast-k { margin: 6px 0 0; letter-spacing: .3em; }
	.mast::before { left: -30px; top: -20px; right: -30px; bottom: -20px; }
}
.season-q { max-width: none; white-space: nowrap; }
@media (max-width: 760px) {
	.solo .dock { bottom: calc(60px + var(--safe-b)); }
	.solo .tip { bottom: calc(146px + var(--safe-b)); }
	/* 单独打开时左下角有站点的「在展馆中查看」：底部弹层留出位置，滚到底不被它挡住 */
	.solo .mf, .solo .land-cap { padding-bottom: calc(72px + var(--safe-b)); }
	.solo .card-body { padding-bottom: calc(76px + var(--safe-b)); }
}

/* 器物查看器的插槽 */
.vslot { position: absolute; inset: 0; }
.vslot canvas.vv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.vslot canvas.vv:active { cursor: grabbing; }
.land-stage #sceneBack, .land-stage #scene2d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.land-stage { background: radial-gradient(ellipse at 50% 58%, #faf7f0, #ebe4d2 72%); }
.nogl-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 2em; text-align: center; font-size: 14px; color: var(--ink-2); }
.dive.sky .dv-hud { color: var(--ink); }
.dive.sky .dv-depth, .dive.sky .dv-name { color: var(--ink); }
.dive.sky .dv-back { color: var(--ink); border-color: var(--ink); background: rgba(241, 236, 224, .8); }
.dive.sky .dv-back:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
	.dv-hud { left: auto; right: 14px; top: 14px; text-align: right; }
	.dv-depth { justify-content: flex-end; font-size: 34px; }
	.dv-name { font-size: 13px; margin-top: 4px; }
	.dv-name small { display: none; }
	.dv-back { top: 12px; }
}
.card-n.long b { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .02em; }

/* 图例 */
.legend { position: absolute; left: 0; top: 0; padding: 9px 12px 10px; background: rgba(241, 236, 224, .9); border: 1px solid rgba(29, 43, 83, .5); font-size: 12px; line-height: 1; color: var(--ink); pointer-events: none; display: grid; gap: 8px; }
.legend.off { display: none; }
.lg-h { font: 600 10.5px/1 var(--sans); letter-spacing: .3em; color: var(--mute); }
.lg-r { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.lg-r span { margin-left: 4px; color: var(--mute); font-size: 11px; }
.lg-r .lg-sep { width: 10px; margin: 0; }
.lg-r svg { width: 24px; height: 14px; overflow: visible; }
.ln { display: inline-block; width: 18px; height: 2px; background: var(--c); margin-left: 3px; box-shadow: 0 0 0 1.5px rgba(241, 236, 224, .7); }
.ln:first-child { margin-left: 0; }
.fl { display: inline-block; width: 22px; height: 0; border-top: 2px dashed var(--c); margin-left: 3px; }
.fl:first-child { margin-left: 0; }
.lg-n { font-size: 10.5px; color: var(--mute); letter-spacing: .06em; }
.dock-h { align-items: center; gap: 10px; }
.dock-h em { margin-left: auto; }
.snap { pointer-events: auto; min-height: 26px; padding: 0 10px; border: 1px solid var(--ink); background: rgba(241, 236, 224, .92); font: 600 11.5px/1 var(--serif); letter-spacing: .12em; color: var(--ink); cursor: pointer; }
.snap:hover { background: var(--ink); color: var(--paper); }
.snap:focus-visible { outline: 3px solid rgba(37, 69, 194, .5); outline-offset: 2px; }

/* 底下一条留给「一步步看」（右下）和站点小标签（左下）：沉船坞往上让，能滚动的面板底部多留些空 */
.dock { bottom: calc(60px + var(--safe-b)); }
.mf, .land-cap { padding-bottom: calc(72px + var(--safe-b)); }
.about-in { padding-bottom: calc(76px + var(--safe-b)); }
@media (min-width: 761px) and (max-width: 1360px) { .card-body { padding-bottom: 64px; } }
@media (max-width: 760px) {
	.dock { bottom: calc(60px + var(--safe-b)); }
	.tip { bottom: calc(146px + var(--safe-b)); }
	.mf, .land-cap { padding-bottom: calc(72px + var(--safe-b)); }
	.card-body { padding-bottom: calc(76px + var(--safe-b)); }
}
/* 平板竖放：六张船名卡排成两行，不被切掉 */
@media (min-width: 761px) and (max-width: 880px) {
	.chips { flex-wrap: wrap; overflow: visible; }
	.chip { flex: 1 0 30%; min-width: 0; }
}
/* 名牌没有不压字的位置时先不显示（符号照旧） */
.wk.nolab .wk-t { visibility: hidden; }
