/* 潮聲小築的下載頁（tools/site.py 複製到 local/build/site/）：資訊架構參考應用程式商店的頁面，配色用遊戲介面的深藍＋金（docs/art/UI_STYLE.md） */
:root {
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #eef1f8;
	--text: #1b2233;
	--muted: #5b6478;
	--line: #dde2ee;
	--accent: #1d3a6e;
	--accent-text: #ffffff;
	--gold: #b9862a;
	--chip: #e6ebf6;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
	--radius: 16px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0d1323;
		--surface: #151d33;
		--surface-2: #1c2640;
		--text: #e9edf6;
		--muted: #a3adc4;
		--line: #26304d;
		--accent: #f2c46d;
		--accent-text: #1a1306;
		--gold: #f2c46d;
		--chip: #222d4a;
		--shadow: none;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0d1323;
	--surface: #151d33;
	--surface-2: #1c2640;
	--text: #e9edf6;
	--muted: #a3adc4;
	--line: #26304d;
	--accent: #f2c46d;
	--accent-text: #1a1306;
	--gold: #f2c46d;
	--chip: #222d4a;
	--shadow: none;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
	-webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
h2 { font-size: 1.25rem; margin-bottom: .75rem; }
h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* 頂端列 */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.lang { display: flex; gap: 4px; }
.lang a { padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.lang a[aria-current] { background: var(--chip); color: var(--text); font-weight: 600; }

/* 標題區 */
.hero { display: flex; gap: 32px; align-items: flex-start; justify-content: space-between; padding: 36px 0 24px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: .02em; }
.hero .tagline { color: var(--gold); font-weight: 700; font-size: 1.05rem; margin-top: .2rem; }
.hero .dev { color: var(--muted); font-size: .95rem; }
.hero-icon { width: 160px; height: 160px; border-radius: 36px; box-shadow: var(--shadow); flex: none; }
.stats { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 20px 0; }
.stats li { display: flex; flex-direction: column; align-items: center; padding: 0 18px; border-left: 1px solid var(--line); min-width: 84px; }
.stats li:first-child { border-left: 0; padding-left: 0; align-items: flex-start; }
.stats b { font-size: 1rem; }
.stats span { color: var(--muted); font-size: .8rem; }
.badge-age { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; font-size: .85rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); color: var(--accent); background: var(--surface); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.cta-note { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

/* 截圖 */
.shots { margin: 8px 0 28px; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.strip button { flex: none; width: min(78vw, 420px); aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; scroll-snap-align: start; }
.strip img { width: 100%; height: 100%; object-fit: cover; }

/* 兩欄 */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.side .card { position: static; }
.about ul, .card ul { padding-left: 1.2em; margin: .3rem 0; }
.about li { margin: .15rem 0; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: .6rem; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ▾"; }
details[open] > summary::after { content: " ▴"; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin-top: 14px !important; }
.tags li { background: var(--chip); border-radius: 999px; padding: 3px 12px; font-size: .85rem; }

/* 資料安全性 */
.safety { border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px; margin: 12px 0; }
.safety .row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.safety .row:first-child { border-top: 0; }
.safety .ico { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--chip); display: grid; place-items: center; font-size: .9rem; }
.safety b { display: block; }
.safety span { color: var(--muted); font-size: .9rem; }

/* 下載卡 */
.dl-grid { display: grid; gap: 16px; }
.dl { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.dl[data-current] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dl header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.dl h3 { margin: 0; font-size: 1.1rem; }
.dl .req { color: var(--muted); font-size: .9rem; margin: .2rem 0 .6rem; }
.dl ol { padding-left: 1.3em; margin: .4rem 0; }
.dl .files { display: flex; flex-wrap: wrap; gap: 10px; }
.dl .btn { padding: 8px 16px; font-size: .95rem; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; color: var(--muted); word-break: break-all; margin-top: .5rem; }
.hash button { font: inherit; font-size: .75rem; margin-left: 6px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }

/* 常見問題 */
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { color: var(--text) !important; margin: 0 !important; }
.faq p { color: var(--muted); }

/* 側欄 */
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.side dt { color: var(--muted); }
.side dd { margin: 0; }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li { padding: 6px 0; }

.credits { font-size: .9rem; }
.credits li { margin: .25rem 0; }
footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .85rem; }

/* 看大圖 */
dialog#viewer { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog#viewer::backdrop { background: rgba(5, 8, 16, .88); }
dialog#viewer img { max-width: 96vw; max-height: 86vh; border-radius: 10px; }
.viewer-bar { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.viewer-bar button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px; font-size: 1rem; cursor: pointer; }

@media (max-width: 860px) {
	.cols { grid-template-columns: 1fr; }
	.hero { flex-direction: column-reverse; gap: 16px; padding-top: 24px; }
	.hero-icon { width: 96px; height: 96px; border-radius: 22px; }
	.stats li { padding: 0 12px; min-width: 0; }
}
