/* 比特币发行终端 · 琥珀荧光 CRT */
:root {
	--amb: #ffb000;
	--amb-hi: #ffd27a;
	--amb-2: #d99600;
	--amb-mid: #b07a00;
	--amb-lo: #6e4b00;
	--line: rgba(255, 176, 0, .34);
	--faint: rgba(255, 176, 0, .1);
	--glass: #0b0700;
	--bez: 10px;
	--mono: "JetBrains Mono", "Noto Serif SC", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Songti SC", "STSong", "SimSun", monospace;
	--wk-pill-bg: rgba(18, 11, 0, .94);
	--wk-pill-fg: #ffb000;
	--wk-pill-line: rgba(255, 176, 0, .45);
	--wk-pill-accent: #ffb000;
	--wk-pill-accent-fg: #000;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; }
body { color: var(--amb); font: 500 12.5px/1.5 var(--mono); letter-spacing: 0; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--amb); color: #000; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: 2px; }
kbd { font: inherit; }
a { color: var(--amb-hi); }

/* ———— 显示器 ———— */
.crt { position: relative; height: 100vh; height: 100svh; min-height: 640px; padding: var(--bez);
	background: radial-gradient(120% 90% at 50% 40%, #17110a 0%, #050403 60%, #000 100%); }
.screen { position: relative; height: 100%; overflow: hidden; border-radius: 6px;
	background: radial-gradient(ellipse at 50% 42%, #160d00 0%, #0a0600 62%, #050300 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 176, 0, .07), inset 0 0 110px rgba(0, 0, 0, .9), 0 0 0 2px #0e0b07, 0 0 60px rgba(255, 140, 0, .05); }
.fx-curve .screen { border-radius: 30px / 42px; box-shadow: inset 0 0 0 1px rgba(255, 176, 0, .08), inset 0 0 140px rgba(0, 0, 0, .95), inset 0 0 26px rgba(0, 0, 0, .8), 0 0 0 2px #0e0b07, 0 0 70px rgba(255, 140, 0, .06); }
.ov { position: absolute; inset: var(--bez); pointer-events: none; z-index: 20; border-radius: 6px; }
.fx-curve .ov { border-radius: 30px / 42px; }
.fx-scan .ov--scan { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .34) 0 1px, transparent 1px 3px); overflow: hidden; }
.fx-scan .ov--scan::after { content: ""; position: absolute; left: 0; right: 0; top: -25%; height: 22%;
	background: linear-gradient(180deg, transparent, rgba(255, 190, 60, .045), transparent); animation: roll 9s linear infinite; }
@keyframes roll { to { transform: translateY(560%); } }
.fx-vig .ov--vig { background: radial-gradient(ellipse at 50% 50%, transparent 56%, rgba(0, 0, 0, .66) 100%); }
.fx-curve .ov--glass { background: radial-gradient(70% 45% at 28% 6%, rgba(255, 226, 170, .07), transparent 70%), radial-gradient(40% 30% at 80% 100%, rgba(255, 200, 120, .03), transparent 70%); }
.fx-flick .screen { animation: flick 5.3s infinite steps(1); }
@keyframes flick { 0%, 100% { filter: none; } 31% { filter: brightness(1.06); } 32% { filter: none; } 63% { filter: brightness(.94); } 63.6% { filter: none; } 88% { filter: brightness(1.04) contrast(1.02); } 88.4% { filter: none; } }
.fx-glow .term, .fx-glow .boot { text-shadow: 0 0 1.5px rgba(255, 176, 0, .7), 0 0 8px rgba(255, 136, 0, .32); }
.fx-glow .cv { filter: drop-shadow(0 0 2.5px rgba(255, 170, 0, .75)); }
.fx-glow .cv--ov { filter: drop-shadow(0 0 3px rgba(255, 200, 80, .9)); }

/* ———— 开机 ———— */
.boot { position: absolute; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4vw;
	padding: clamp(24px, 5vh, 64px) clamp(24px, 5vw, 80px); background: inherit; cursor: pointer; transition: opacity .35s, filter .35s; }
.boot.is-out { opacity: 0; filter: brightness(3) blur(2px); pointer-events: none; }
.post { margin: 0; font: 500 clamp(12px, 1.05vw, 15px)/1.62 var(--mono); white-space: pre-wrap; min-height: 24em; align-self: center; }
.post .d { color: var(--amb-lo); }
.post .hi { color: var(--amb-hi); }
.post .inv { background: var(--amb); color: #000; text-shadow: none; padding: 0 .4em; }
.post .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--amb); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.boot__coin { margin: 0; display: grid; justify-items: center; gap: 12px; }
.coin { margin: 0; font: 400 9px/1 "JetBrains Mono", monospace; letter-spacing: 0; white-space: pre; color: var(--amb); user-select: none; }
.boot__coin figcaption { font-size: 13px; letter-spacing: .5em; color: var(--amb-2); min-height: 1.5em; }
.boot__go { position: absolute; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px); margin: 0; text-align: center; font-size: 13px; color: var(--amb-hi); }
.boot__go b { background: var(--amb); color: #000; text-shadow: none; padding: 1px 8px; font-weight: 600; }
.boot__go span { animation: blink 1.1s steps(1) infinite; }

/* ———— 终端网格 ———— */
.term { position: relative; height: 100%; display: grid; gap: 8px;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .98fr);
	grid-template-rows: auto auto minmax(0, 1fr) minmax(0, .82fr) minmax(150px, .9fr) auto auto;
	grid-template-areas: "tb tb tb" "fk fk fk" "sup read halv" "infl note halv" "log log log" "cmd cmd cmd" "ft ft ft";
	padding: 14px 20px 10px; }
.tb { grid-area: tb; display: flex; align-items: center; gap: 16px; min-height: 30px; padding-right: 400px; white-space: nowrap; }
.tb__id { padding: 2px 8px; background: var(--amb); color: #000; font-weight: 600; letter-spacing: .12em; text-shadow: none; }
.tb__ttl { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .3em; }
.tb__h b { font-weight: 600; color: var(--amb-hi); }
.tb__h em { font-style: normal; margin-left: 4px; padding: 0 5px; border: 1px solid var(--line); color: var(--amb-2); }
.tb__h em.live { border-color: var(--amb); color: var(--amb); }
.tb__clk { color: var(--amb-2); font-variant-numeric: tabular-nums; }
.tb__snd { all: unset; cursor: pointer; padding: 1px 8px; border: 1px solid var(--line); color: var(--amb-2); }
.tb__snd[aria-pressed="true"] { color: var(--amb); border-color: var(--amb); }
.tb__snd:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: 2px; }

.fk { grid-area: fk; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.fk button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; height: 30px; padding-right: 8px; border: 1px solid var(--line); color: var(--amb); white-space: nowrap; overflow: hidden; touch-action: manipulation; }
.fk kbd { display: inline-grid; place-items: center; align-self: stretch; min-width: 34px; background: var(--amb); color: #000; font-weight: 600; text-shadow: none; }
.fk button:hover, .fk button.is-on { background: rgba(255, 176, 0, .14); border-color: var(--amb); }
.fk button:active, .fk button.is-hit { background: var(--amb); color: #000; text-shadow: none; }
.fk button:active kbd, .fk button.is-hit kbd { background: #000; color: var(--amb); }
.fk button:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: 2px; }

.pane { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(255, 176, 0, .015); }
.pane.is-flash { animation: flash .9s steps(2) 1; }
@keyframes flash { 0%, 100% { border-color: var(--line); } 25%, 75% { border-color: var(--amb-hi); box-shadow: 0 0 0 1px var(--amb), 0 0 18px rgba(255, 176, 0, .3); } }
.pane__t { flex: none; display: flex; align-items: center; gap: 8px; height: 21px; margin: 0; padding-right: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: #000; background: var(--amb); text-shadow: none !important; white-space: nowrap; overflow: hidden; }
.pane__t kbd { align-self: stretch; display: inline-grid; place-items: center; padding: 0 7px; background: #000; color: var(--amb); border: 1px solid var(--amb); }
.pane__t small { font-size: 11.5px; font-weight: 500; opacity: .72; letter-spacing: 0; }
.seg { margin-left: auto; display: inline-flex; gap: 0; }
.seg button { all: unset; cursor: pointer; padding: 0 7px; font-size: 11.5px; font-weight: 600; line-height: 17px; color: #000; border: 1px solid rgba(0, 0, 0, .5); }
.seg button + button { border-left: 0; }
.seg button[aria-pressed="true"] { background: #000; color: var(--amb); }
.seg button:focus-visible { outline: 2px dashed #000; outline-offset: 1px; }

.p-sup { grid-area: sup; }
.p-read { grid-area: read; }
.p-halv { grid-area: halv; }
.p-infl { grid-area: infl; }
.p-note { grid-area: note; }
.p-log { grid-area: log; }

/* 图表 */
.chart { position: relative; flex: 1; min-height: 0; }
.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: crosshair; }
.cv:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: -3px; }
.cv--ov { pointer-events: none; }
.xread { position: absolute; right: 14px; bottom: 26px; padding: 3px 8px; font-size: 11.5px; line-height: 1.55; background: rgba(10, 6, 0, .88); border: 1px solid var(--line); pointer-events: none; white-space: nowrap; }
.xread b { font-weight: 600; color: var(--amb-hi); }
.xread i { font-style: normal; color: var(--amb-mid); }

/* 读数 */
.read { flex: 1; min-height: 0; position: relative; display: flex; gap: 6px; padding: 8px 10px; overflow: hidden; }
.kv { flex: 1; min-width: 0; margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; align-content: start; }
.kv dt { color: var(--amb-mid); white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kv dd.big { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--amb-hi); }
.kv dd small { color: var(--amb-mid); font-size: 11.5px; }
.kv dd .tag { padding: 0 4px; margin-left: 4px; border: 1px solid var(--line); color: var(--amb-2); font-size: 11px; }
.bar { display: block; height: 10px; margin: 3px 0 2px; background: repeating-linear-gradient(90deg, var(--amb) 0 3px, transparent 3px 5px); -webkit-mask: linear-gradient(90deg, #000 var(--p, 0%), rgba(0, 0, 0, .14) var(--p, 0%)); mask: linear-gradient(90deg, #000 var(--p, 0%), rgba(0, 0, 0, .14) var(--p, 0%)); }
.coin--mini { position: absolute; right: 16px; top: 28px; font-size: 5px; line-height: 1; opacity: .7; pointer-events: none; }

/* 减半表 */
.halv { flex: 1; min-height: 0; overflow: auto; scrollbar-color: var(--amb-lo) transparent; scrollbar-width: thin; }
.halv table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.halv th { position: sticky; top: 0; z-index: 1; padding: 4px 6px; text-align: right; font-weight: 500; color: var(--amb-mid); background: #0d0800; border-bottom: 1px solid var(--line); white-space: nowrap; }
.halv td { padding: 2px 6px; text-align: right; white-space: nowrap; }
.halv th:first-child, .halv td:first-child { text-align: left; }
.halv tr.past td { color: var(--amb); }
.halv tr.fut td { color: var(--amb-2); }
.halv tr.now td { background: var(--amb); color: #000; text-shadow: none; font-weight: 600; }
.halv td .e { color: var(--amb-mid); }
.halv tr.now td .e { color: rgba(0, 0, 0, .6); }
.halv tr.gap td { color: var(--amb-lo); text-align: center; }

/* 解读 */
.note { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px 10px; font-size: 13px; line-height: 1.78; scrollbar-color: var(--amb-lo) transparent; scrollbar-width: thin; }
.note .nt { margin-right: .6em; padding: 0 5px; font-size: 12.5px; font-weight: 600; color: #000; background: var(--amb-2); text-shadow: none; }
.note p { margin: 0 0 8px; }
.note b { color: var(--amb-hi); font-weight: 600; }

/* 输出 */
.log { flex: 1; min-height: 0; overflow: auto; padding: 6px 10px; font-size: 12.5px; line-height: 1.55; scrollbar-color: var(--amb-lo) transparent; scrollbar-width: thin; }
.log .l { white-space: pre; min-height: 1.55em; }
.log .l.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.log .cmdl { color: var(--amb-hi); margin-top: 6px; }
.log .cmdl::before { content: "BTC> "; color: var(--amb-mid); }
.log .dim { color: var(--amb-mid); }
.log .em { color: var(--amb-hi); font-weight: 600; }
.log .inv { background: var(--amb); color: #000; text-shadow: none; padding: 0 3px; }
.log .err { color: #ff7a2e; }
.log .w, .post .w { letter-spacing: .2em; }

/* 命令行 */
.cmd { grid-area: cmd; position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border: 1px solid var(--amb); background: rgba(255, 176, 0, .05); }
.cmd__p { font-weight: 600; color: var(--amb-hi); }
.cmd__in { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--amb-hi); font: 600 14px/1 var(--mono); letter-spacing: .04em; caret-color: var(--amb); caret-shape: block; text-transform: uppercase; }
.cmd__in::placeholder { color: var(--amb-lo); text-transform: none; letter-spacing: 0; }
.cmd:focus-within { box-shadow: 0 0 0 1px var(--amb), 0 0 16px rgba(255, 176, 0, .22); }
.cmd__hint { display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap; font-size: 11.5px; color: var(--amb-mid); }
.cmd__hint button { all: unset; cursor: pointer; padding: 1px 6px; border: 1px solid var(--line); color: var(--amb); }
.cmd__hint button:hover, .cmd__hint button.is-best { background: var(--amb); color: #000; text-shadow: none; }
.cmd__hint button:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: 1px; }
.cmd__hint .k { color: var(--amb-lo); }

.ft { grid-area: ft; display: flex; justify-content: space-between; gap: 16px; font-size: 11px; color: var(--amb-mid); }
.ft span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft strong { flex: none; color: var(--amb); font-weight: 600; }

/* 显示设置 */
.dlg { position: fixed; z-index: 50; right: 28px; top: 120px; width: 230px; padding: 12px 14px; border: 1px solid var(--amb); background: #0d0800; color: var(--amb); font: 500 13px/1.6 var(--mono);
	box-shadow: 0 0 0 4px #000, 0 0 30px rgba(255, 150, 0, .2); text-shadow: 0 0 6px rgba(255, 150, 0, .35); }
.dlg h2 { margin: -12px -14px 8px; padding: 2px 10px; font-size: 13px; background: var(--amb); color: #000; text-shadow: none; }
.dlg p { margin: 0 0 6px; color: var(--amb-mid); font-size: 12px; }
.dlg label { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 2px 0; }
.dlg input { accent-color: var(--amb); width: 15px; height: 15px; }
.dlg button { all: unset; cursor: pointer; margin-top: 8px; padding: 2px 10px; border: 1px solid var(--amb); }
.dlg button:hover { background: var(--amb); color: #000; }
.dlg button:focus-visible { outline: 2px dashed var(--amb-hi); outline-offset: 2px; }

/* ———— 中等宽度 ———— */
@media (max-width: 1240px) {
	.term { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(250px, 1fr) minmax(220px, 1fr) minmax(220px, .9fr) minmax(170px, .7fr) auto auto;
		grid-template-areas: "tb tb" "fk fk" "sup read" "infl halv" "note halv" "log log" "cmd cmd" "ft ft"; height: auto; min-height: 100%; }
	.crt { height: auto; min-height: 100svh; }
	.screen { height: auto; min-height: calc(100svh - 2 * var(--bez)); }
	.tb { padding-right: 380px; flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 1000px) {
	.tb { flex-wrap: wrap; row-gap: 4px; padding-right: 340px; }
	.tb__clk { display: none; }
	.fk { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.term { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "tb" "fk" "read" "sup" "infl" "halv" "note" "log" "cmd" "ft"; }
	.p-sup .chart { height: 260px; flex: none; }
	.p-infl .chart { height: 210px; flex: none; }
	.p-halv .halv { max-height: 380px; }
	.p-log .log { height: 280px; flex: none; }
	.cmd { position: sticky; bottom: 8px; z-index: 8; background: #0d0800; }
}
/* ———— 手机 ———— */
@media (max-width: 760px) {
	:root { --bez: 0px; }
	body { font-size: 12px; }
	.crt { padding: 0; min-height: 0; }
	.screen, .fx-curve .screen { border-radius: 0; min-height: 100svh; }
	.ov, .fx-curve .ov { border-radius: 0; position: fixed; inset: 0; }
	.term { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "tb" "fk" "read" "sup" "infl" "halv" "note" "log" "cmd" "ft"; padding: 10px 12px 12px; gap: 8px; }
	.tb { padding-right: 0; padding-top: 50px; gap: 6px 10px; }
	.tb__id { display: none; }
	.tb__ttl { flex-basis: 100%; font-size: 17px; letter-spacing: .2em; }
	.fk { gap: 5px; }
	.fk button { height: 34px; gap: 6px; padding-right: 4px; font-size: 12px; }
	.fk kbd { min-width: 28px; }
	.p-sup .chart { height: 210px; flex: none; }
	.p-infl .chart { height: 170px; flex: none; }
	.p-halv .halv { max-height: 330px; }
	.halv table { font-size: 11px; }
	.halv th, .halv td { padding-left: 3px; padding-right: 3px; }
	.p-note .note { max-height: none; }
	.p-log .log { height: 260px; flex: none; }
	.read { min-height: 0; }
	.kv dd.big { font-size: 16px; }
	.coin--mini { display: none; }
	.cmd { position: sticky; bottom: 0; z-index: 8; height: auto; min-height: 44px; flex-wrap: wrap; padding: 6px 10px; background: #0d0800; }
	.cmd__hint { flex-basis: 100%; flex-wrap: wrap; white-space: normal; padding-bottom: 2px; }
	.ft { flex-direction: column; gap: 4px; padding-bottom: 8px; }
	.ft span { white-space: normal; }
	.boot { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 18px; padding: 64px 16px 80px; }
	.post { min-height: 0; font-size: 11.5px; }
	.dlg { right: 12px; left: 12px; width: auto; top: 90px; }
	.xread { position: static; margin: 0 8px 8px; font-size: 11px; white-space: normal; }
	.p-sup { display: flex; flex-direction: column; }
}

/* 安静版本 */
@media (prefers-reduced-motion: reduce) {
	.fx-flick .screen, .fx-scan .ov--scan::after, .post .cur, .boot__go span, .pane.is-flash { animation: none !important; }
	.boot { transition: none; }
}
