/* 臺灣的孩子 — child theme styles. Every selector is prefixed with .tm- so
   the full-page HTML apps embedded in posts keep their own styling. */

:root {
	--tm-bg: #f6fafa;
	--tm-surface: #ffffff;
	--tm-surface-2: #eaf2f2;
	--tm-text: #16282a;
	--tm-muted: #5d6e70;
	--tm-line: #dbe7e8;
	/* PANTONE 14-4812 Aqua Splash — Color of the Year 2027 */
	--tm-brand: #86ced1;
	--tm-brand-strong: #6bbfc3;
	--tm-on-brand: #0e2c2f;
	/* Same hue, darkened so text and icons stay readable on light backgrounds */
	--tm-accent: #1b6e72;
	--tm-accent-soft: #e0f3f4;
	--tm-glow: rgba(134, 206, 209, .32);
	--tm-shadow: 0 1px 2px rgba(14,44,47,.05), 0 8px 24px rgba(14,44,47,.07);
	--tm-radius: 16px;
	--tm-ease: cubic-bezier(.2, .7, .2, 1);
	--tm-font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--tm-bg: #0e1617; --tm-surface: #151f20; --tm-surface-2: #1d2a2b; --tm-text: #eef5f5;
		--tm-muted: #93a6a8; --tm-line: #27383a; --tm-accent: #86ced1; --tm-accent-soft: #17373a;
		--tm-brand: #86ced1; --tm-brand-strong: #a3dcde; --tm-on-brand: #0e2c2f;
		--tm-glow: rgba(134, 206, 209, .18); --tm-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
	}
}
:root[data-theme="dark"] {
	--tm-bg: #0e1617; --tm-surface: #151f20; --tm-surface-2: #1d2a2b; --tm-text: #eef5f5;
	--tm-muted: #93a6a8; --tm-line: #27383a; --tm-accent: #86ced1; --tm-accent-soft: #17373a;
	--tm-brand: #86ced1; --tm-brand-strong: #a3dcde; --tm-on-brand: #0e2c2f;
	--tm-glow: rgba(134, 206, 209, .18); --tm-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

body.tm-body { background: var(--tm-bg); color: var(--tm-text); margin: 0; zoom: var(--tm-zoom, 1); }
/* 大字模式: scales the whole page, including the tools embedded in posts. */
:root[data-text="large"] { --tm-zoom: 1.2; }
html:has(body.tm-body.home) { scroll-behavior: smooth; }
/* Only the home page owns the whole body font; posts keep the app's own font. */
body.tm-body.home, .tm-header, .tm-footer, .tm-palette, .tm-fab { font-family: var(--tm-font); }
.tm-wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.tm-header *, .tm-footer *, .tm-home *, .tm-palette * { box-sizing: border-box; }

/* ---------- Header ---------- */
.tm-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--tm-bg) 82%, transparent);
	backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s, box-shadow .3s;
}
.tm-header.is-scrolled { border-bottom-color: var(--tm-line); }
.tm-header__bar { display: flex; align-items: center; gap: 16px; height: 64px; transition: height .3s var(--tm-ease); }
.tm-header.is-scrolled .tm-header__bar { height: 54px; }
.tm-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--tm-text); text-decoration: none; margin-right: auto; }
.tm-logo__mark { width: 28px; height: 28px; border-radius: 9px; background: var(--tm-brand); display: grid; place-items: center; color: var(--tm-on-brand); }
.tm-logo:hover .tm-logo__mark { transform: rotate(-8deg) scale(1.05); }
.tm-logo__mark { transition: transform .35s var(--tm-ease); }
.tm-nav { display: flex; gap: 4px; }
.tm-nav a { padding: 8px 12px; border-radius: 10px; color: var(--tm-muted); text-decoration: none; font-size: 15px; transition: color .2s, background .2s; }
.tm-nav a:hover, .tm-nav a.is-active { color: var(--tm-text); background: var(--tm-surface-2); }
.tm-actions { display: flex; gap: 8px; align-items: center; }
.tm-btn-ghost {
	display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
	border: 1px solid var(--tm-line); border-radius: 10px; background: var(--tm-surface);
	color: var(--tm-muted); font: inherit; font-size: 14px; cursor: pointer;
	transition: border-color .2s, color .2s, transform .15s;
}
.tm-btn-ghost:hover { color: var(--tm-text); border-color: color-mix(in srgb, var(--tm-text) 25%, var(--tm-line)); }
.tm-btn-ghost:active { transform: scale(.96); }
.tm-btn-ghost kbd { font: 12px/1 var(--tm-font); padding: 3px 6px; border-radius: 6px; background: var(--tm-surface-2); color: var(--tm-muted); }
.tm-btn-icon { width: 38px; padding: 0; justify-content: center; }
.tm-text-toggle { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; }
.tm-text-toggle[aria-pressed="true"] { background: var(--tm-brand); border-color: var(--tm-brand); color: var(--tm-on-brand); }
.tm-theme-toggle .tm-icon-sun { display: none; }
:root[data-theme="dark"] .tm-theme-toggle .tm-icon-sun { display: block; }
:root[data-theme="dark"] .tm-theme-toggle .tm-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tm-theme-toggle .tm-icon-sun { display: block; }
	:root:not([data-theme="light"]) .tm-theme-toggle .tm-icon-moon { display: none; }
}
.tm-btn-sub { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--tm-brand); color: var(--tm-on-brand); font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s var(--tm-ease), background .2s; }
.tm-btn-sub:hover { transform: translateY(-1px); background: var(--tm-brand-strong); color: var(--tm-on-brand); }
.tm-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--tm-brand); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Hero ---------- */
.tm-hero { padding: 88px 0 56px; background: radial-gradient(900px 440px at 88% -12%, color-mix(in srgb, var(--tm-brand) 42%, transparent), transparent 70%), radial-gradient(520px 300px at 2% 4%, color-mix(in srgb, var(--tm-brand) 16%, transparent), transparent 70%); }
.tm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tm-accent); background: var(--tm-accent-soft); padding: 6px 12px; border-radius: 999px; font-weight: 500; }
.tm-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: tm-pulse 2s infinite; }
@keyframes tm-pulse { 50% { opacity: .3; } }
.tm-hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.1; letter-spacing: -.03em; margin: 20px 0 16px; font-weight: 800; }
.tm-hero h1 em { font-style: normal; color: inherit; background: linear-gradient(transparent 58%, var(--tm-brand) 0); padding: 0 .06em; border-radius: 4px; }
:root[data-theme="dark"] .tm-hero h1 em { color: var(--tm-brand); background: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm-hero h1 em { color: var(--tm-brand); background: none; } }
.tm-hero p { font-size: clamp(16px, 2vw, 19px); color: var(--tm-muted); max-width: 560px; line-height: 1.7; margin: 0 0 28px; }
.tm-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.tm-btn {
	display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px;
	font: 500 15px var(--tm-font); text-decoration: none; cursor: pointer; border: 1px solid transparent;
	transition: transform .2s var(--tm-ease), box-shadow .2s, background .2s;
}
.tm-btn--primary { background: var(--tm-brand); color: var(--tm-on-brand); font-weight: 600; }
.tm-btn--primary:hover { transform: translateY(-2px); background: var(--tm-brand-strong); box-shadow: 0 8px 22px var(--tm-glow); }
.tm-btn--soft { background: var(--tm-surface); color: var(--tm-text); border-color: var(--tm-line); }
.tm-btn--soft:hover { transform: translateY(-2px); }
.tm-btn svg { transition: transform .2s var(--tm-ease); }
.tm-btn:hover svg { transform: translateX(3px); }
.tm-stats { display: flex; gap: 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--tm-line); }
.tm-stats b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.tm-stats span { font-size: 13px; color: var(--tm-muted); }

/* ---------- Sections ---------- */
.tm-section { padding: 48px 0; scroll-margin-top: 60px; }
.tm-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.tm-section h2 { font-size: 26px; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.tm-section__head p { margin: 4px 0 0; color: var(--tm-muted); font-size: 15px; }

/* ---------- Tool cards ---------- */
.tm-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tm-card {
	--mx: 50%; --my: 50%;
	position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px;
	border-radius: var(--tm-radius); background: var(--tm-surface); border: 1px solid var(--tm-line);
	color: var(--tm-text); text-decoration: none; overflow: hidden; isolation: isolate;
	transition: transform .35s var(--tm-ease), box-shadow .35s, border-color .35s;
}
.tm-card::before { /* cursor spotlight */
	content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
	background: radial-gradient(420px circle at var(--mx) var(--my), var(--tm-glow), transparent 60%);
}
.tm-card:hover { transform: translateY(-4px); box-shadow: var(--tm-shadow); border-color: color-mix(in srgb, var(--tm-accent) 35%, var(--tm-line)); }
.tm-card:hover::before { opacity: 1; }
.tm-card__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--tm-accent-soft); color: var(--tm-accent); transition: transform .35s var(--tm-ease); }
.tm-card:hover .tm-card__icon { transform: scale(1.08) rotate(-4deg); }
.tm-card h3 { margin: 4px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.tm-card p { margin: 0; color: var(--tm-muted); font-size: 14.5px; line-height: 1.7; flex: 1; }
.tm-card__go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--tm-accent); }
.tm-card__go svg { transition: transform .25s var(--tm-ease); }
.tm-card:hover .tm-card__go svg { transform: translateX(4px); }

/* ---------- Article list ---------- */
.tm-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tm-chip {
	height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--tm-line); background: var(--tm-surface);
	color: var(--tm-muted); font: 14px var(--tm-font); cursor: pointer; transition: all .2s;
}
.tm-chip:hover { color: var(--tm-text); }
.tm-chip[aria-pressed="true"] { background: var(--tm-text); color: var(--tm-bg); border-color: var(--tm-text); }
.tm-search { position: relative; margin-left: auto; }
.tm-search input {
	height: 38px; width: 220px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--tm-line);
	background: var(--tm-surface); color: var(--tm-text); font: 14px var(--tm-font); outline: none; transition: border-color .2s, width .3s var(--tm-ease);
}
.tm-search input:focus { border-color: var(--tm-accent); width: 260px; }
.tm-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--tm-muted); pointer-events: none; }
.tm-list { list-style: none; margin: 0; padding: 0; }
.tm-row { border-bottom: 1px solid var(--tm-line); }
.tm-row a { display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; align-items: start; padding: 24px 8px; color: inherit; text-decoration: none; border-radius: 12px; transition: background .25s; }
.tm-row a:hover { background: var(--tm-surface); }
.tm-row time { color: var(--tm-muted); font-size: 14px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tm-row h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.5; transition: color .2s; }
.tm-row a:hover h3 { color: var(--tm-accent); }
.tm-row p { margin: 0; color: var(--tm-muted); font-size: 14.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-row__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tm-tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--tm-surface-2); color: var(--tm-muted); }
.tm-row__arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--tm-line); color: var(--tm-muted); transition: all .25s var(--tm-ease); }
.tm-row a:hover .tm-row__arrow { background: var(--tm-brand); border-color: var(--tm-brand); color: var(--tm-on-brand); transform: rotate(-45deg); }
.tm-row[hidden] { display: none; }
.tm-empty { padding: 40px 0; text-align: center; color: var(--tm-muted); }
mark.tm-hl { background: var(--tm-accent-soft); color: var(--tm-accent); border-radius: 3px; padding: 0 2px; }

/* ---------- Footer ---------- */
.tm-footer { border-top: 1px solid var(--tm-line); padding: 32px 0 40px; margin-top: 48px; color: var(--tm-muted); font-size: 14px; }
.tm-footer .tm-wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tm-footer a { color: inherit; text-decoration: none; }
.tm-footer a:hover { color: var(--tm-text); }

/* ---------- Back-to-top ---------- */
.tm-fab {
	position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--tm-line); background: var(--tm-surface); color: var(--tm-text); box-shadow: var(--tm-shadow);
	display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none;
	transition: opacity .3s, transform .3s var(--tm-ease);
}
.tm-fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.tm-fab:hover { transform: translateY(-3px); }

/* ---------- Command palette ---------- */
.tm-palette { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.tm-palette.is-open { display: flex; }
.tm-palette__backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.4); backdrop-filter: blur(4px); animation: tm-fade .2s; }
.tm-palette__panel {
	position: relative; width: min(600px, 100%); background: var(--tm-surface); border: 1px solid var(--tm-line);
	border-radius: 18px; box-shadow: 0 24px 64px rgba(0,0,0,.25); overflow: hidden; animation: tm-pop .25s var(--tm-ease);
}
@keyframes tm-fade { from { opacity: 0; } }
@keyframes tm-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.tm-palette__input { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--tm-line); color: var(--tm-muted); }
.tm-palette__input input { flex: 1; height: 58px; border: 0; outline: 0; background: transparent; color: var(--tm-text); font: 17px var(--tm-font); }
.tm-palette__list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.tm-palette__group { padding: 10px 12px 6px; font-size: 12px; color: var(--tm-muted); letter-spacing: .04em; }
.tm-palette__item a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--tm-text); text-decoration: none; font-size: 15px; }
.tm-palette__item[aria-selected="true"] a { background: var(--tm-accent-soft); color: var(--tm-accent); }
.tm-palette__item .tm-kind { margin-left: auto; font-size: 12px; color: var(--tm-muted); }
.tm-palette__foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--tm-line); font-size: 12px; color: var(--tm-muted); }
.tm-palette__foot kbd { font: 11px var(--tm-font); padding: 2px 5px; border: 1px solid var(--tm-line); border-radius: 4px; margin-right: 4px; }

/* ---------- 你是…？ persona entry ---------- */
.tm-who { padding-bottom: 32px; }
.tm-who__head h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -.02em; }
.tm-who__pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tm-who__btn { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-surface); color: var(--tm-text); font: 600 16px var(--tm-font); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .15s var(--tm-ease); }
.tm-who__btn svg { flex: none; color: var(--tm-accent); }
.tm-who__btn:hover { border-color: var(--tm-brand); background: var(--tm-surface); transform: translateY(-1px); }
.tm-who__btn[aria-selected="true"] { background: var(--tm-brand); border-color: var(--tm-brand); color: var(--tm-on-brand); }
.tm-who__btn[aria-selected="true"] svg { color: var(--tm-on-brand); }
.tm-who__panel { margin-top: 16px; padding: 20px; border-radius: 20px; background: color-mix(in srgb, var(--tm-brand) 12%, var(--tm-surface)); border: 1px solid color-mix(in srgb, var(--tm-brand) 45%, var(--tm-line)); animation: tm-panel .35s var(--tm-ease); }
.tm-who__panel[hidden] { display: none; }
.tm-who__lead { margin: 0 0 14px; font-size: 16.5px; font-weight: 500; line-height: 1.7; }
.tm-who__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tm-who__card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--tm-surface); border: 1px solid var(--tm-line); color: var(--tm-text); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s var(--tm-ease); }
.tm-who__card:hover { border-color: var(--tm-brand); box-shadow: var(--tm-shadow); transform: translateY(-2px); color: var(--tm-text); }
.tm-who__card .tm-card__icon { width: 42px; height: 42px; border-radius: 12px; }
.tm-who__text { display: grid; gap: 3px; min-width: 0; }
.tm-who__text b { font-size: 16px; line-height: 1.5; }
.tm-who__text small { color: var(--tm-muted); font-size: 13.5px; line-height: 1.6; }
.tm-who__phone { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 4px; font-size: 13px; color: var(--tm-muted); }
.tm-who__phone strong { font-size: 19px; color: var(--tm-accent); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.tm-who__phone em { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--tm-surface-2); }
.tm-who__go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--tm-line); color: var(--tm-muted); transition: all .2s; }
.tm-who__card:hover .tm-who__go { background: var(--tm-brand); border-color: var(--tm-brand); color: var(--tm-on-brand); }
.tm-who__card--phone .tm-who__go { background: var(--tm-accent-soft); border-color: transparent; color: var(--tm-accent); }
.tm-who__hint { margin: 12px 0 0; color: var(--tm-muted); font-size: 14px; }
.tm-who__hint[hidden] { display: none; }
@media (max-width: 720px) {
	.tm-who__pick { grid-template-columns: 1fr 1fr; }
	.tm-who__btn { min-height: 52px; font-size: 15px; padding: 0 12px; }
	.tm-who__panel { padding: 14px; }
	.tm-who__grid { grid-template-columns: 1fr; }
	.tm-who__card { grid-template-columns: auto 1fr; padding: 12px 14px; }
	.tm-who__go { display: none; }
}

/* ---------- Mission ---------- */
.tm-kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--tm-accent); margin-bottom: 12px; }
.tm-mission { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.tm-mission h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.35; letter-spacing: -.02em; margin: 0 0 16px; }
.tm-mission__text p { color: var(--tm-muted); font-size: 16px; line-height: 1.9; margin: 0 0 20px; }
.tm-link { display: inline-flex; align-items: center; gap: 6px; color: var(--tm-accent); font-weight: 500; text-decoration: none; }
.tm-link svg { transition: transform .25s var(--tm-ease); }
.tm-link:hover svg { transform: translateX(4px); }
.tm-principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tm-principles li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--tm-radius); background: var(--tm-surface); border: 1px solid var(--tm-line); transition: transform .3s var(--tm-ease), box-shadow .3s; }
.tm-principles li:hover { transform: translateX(4px); box-shadow: var(--tm-shadow); }
.tm-principles .tm-card__icon { flex: none; width: 44px; height: 44px; }
.tm-principles h3 { margin: 2px 0 4px; font-size: 17px; }
.tm-principles p { margin: 0; color: var(--tm-muted); font-size: 14.5px; line-height: 1.7; }

/* ---------- Age tabs ---------- */
.tm-tabs { position: relative; display: flex; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: 14px; background: var(--tm-surface-2); overflow-x: auto; scrollbar-width: none; }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs__ink { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--tm-surface); box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .4s var(--tm-ease), width .4s var(--tm-ease); }
.tm-tab { position: relative; z-index: 1; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--tm-muted); font: 500 15px var(--tm-font); cursor: pointer; white-space: nowrap; transition: color .2s; }
.tm-tab:hover, .tm-tab[aria-selected="true"] { color: var(--tm-text); background: transparent; }
.tm-tab[aria-selected="true"] svg { color: var(--tm-accent); }
.tm-soon { font-style: normal; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--tm-surface); color: var(--tm-muted); }
.tm-tab[aria-selected="true"] .tm-soon { background: var(--tm-surface-2); }
.tm-panel { animation: tm-panel .45s var(--tm-ease); }
.tm-panel[hidden] { display: none; }
@keyframes tm-panel { from { opacity: 0; transform: translateY(8px); } }
.tm-panel__lead { font-size: 17px; color: var(--tm-muted); margin: 0 0 20px; }
.tm-panel .tm-tools { margin-bottom: 8px; }
.tm-list--plain { margin-bottom: 8px; }
.tm-planned { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 16px; padding: 20px 24px; border: 1px dashed color-mix(in srgb, var(--tm-accent) 40%, var(--tm-line)); border-radius: var(--tm-radius); background: color-mix(in srgb, var(--tm-accent-soft) 45%, transparent); }
.tm-planned h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; color: var(--tm-accent); }
.tm-planned ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tm-planned li { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--tm-surface); border: 1px solid var(--tm-line); }
.tm-tools--compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tm-section--tight { padding: 0 0 24px; }
.tm-card--feature { border-color: color-mix(in srgb, var(--tm-brand) 60%, var(--tm-line)); background: linear-gradient(160deg, color-mix(in srgb, var(--tm-brand) 16%, var(--tm-surface)), var(--tm-surface) 60%); }
.tm-card--feature .tm-kicker { margin: 4px 0 -6px; }
.tm-card--feature h3 { font-size: 21px; }
.tm-card--small { padding: 20px; }
.tm-card--small h3 { font-size: 17px; }

/* ---------- Subscribe ---------- */
.tm-subscribe { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; padding: 40px; border-radius: 24px; background: var(--tm-brand); color: var(--tm-on-brand); position: relative; overflow: hidden; isolation: isolate; }
.tm-subscribe::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%); }
.tm-subscribe .tm-kicker { color: var(--tm-on-brand); opacity: .7; }
.tm-subscribe h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; letter-spacing: -.02em; color: inherit; }
.tm-subscribe__text p { margin: 0; opacity: .82; line-height: 1.85; font-size: 15px; }
.tm-stage-pick { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tm-stage-pick legend { font-size: 14px; opacity: .82; margin-bottom: 10px; padding: 0; }
.tm-pick { position: relative; }
.tm-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tm-pick span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tm-on-brand) 32%, transparent); font-size: 14px; cursor: pointer; transition: all .2s; }
.tm-pick span svg { width: 0; transition: width .2s var(--tm-ease); }
.tm-pick:hover span { border-color: var(--tm-on-brand); }
.tm-pick input:checked + span { background: var(--tm-on-brand); border-color: var(--tm-on-brand); color: #fff; }
.tm-pick input:checked + span svg { width: 14px; }
.tm-pick input:focus-visible + span { outline: 2px solid var(--tm-on-brand); outline-offset: 2px; }
.tm-pick.is-flash span { animation: tm-flash .8s var(--tm-ease); }
@keyframes tm-flash { 40% { transform: scale(1.1); } }
.tm-subscribe__row { display: flex; gap: 8px; }
.tm-subscribe__row input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tm-on-brand) 28%, transparent); background: rgba(255,255,255,.6); color: inherit; font: 15px var(--tm-font); outline: none; }
.tm-subscribe__row input::placeholder { color: inherit; opacity: .5; }
.tm-subscribe__row input:focus { border-color: var(--tm-on-brand); background: rgba(255,255,255,.85); }
.tm-subscribe .tm-btn--primary { background: var(--tm-on-brand); color: #fff; }
.tm-subscribe .tm-btn--primary:hover { background: #163d41; box-shadow: none; }
.tm-subscribe .tm-btn[disabled] { opacity: .6; cursor: wait; }
.tm-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 13px; opacity: .82; line-height: 1.6; cursor: pointer; }
.tm-consent input { margin-top: 3px; accent-color: var(--tm-on-brand); }
.tm-subscribe__msg { margin: 12px 0 0; font-size: 14px; min-height: 1.4em; }
.tm-subscribe__msg[data-state="ok"] { color: var(--tm-on-brand); font-weight: 600; }
.tm-subscribe__msg[data-state="err"] { color: #8c1d14; font-weight: 600; }
.tm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Wish pool ---------- */
.tm-planned h3 small { font-weight: 400; font-size: 13px; color: var(--tm-muted); margin-left: 4px; }
.tm-planned__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tm-planned__actions .tm-link { font-size: 14px; }
.tm-planned li:has(.tm-vote-chip) { padding: 0; border: 0; background: none; }
.tm-vote-chip {
	display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: 999px;
	border: 1px solid var(--tm-line); background: var(--tm-surface); color: var(--tm-text); font: 14px var(--tm-font); cursor: pointer;
	transition: border-color .2s, transform .15s var(--tm-ease);
}
.tm-vote-chip b { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--tm-surface-2); color: var(--tm-muted); font-weight: 600; font-size: 13px; transition: background .2s, color .2s; }
.tm-vote-chip b i, .tm-vote i { font-style: normal; font-variant-numeric: tabular-nums; }
.tm-vote-chip:hover { border-color: var(--tm-accent); }
.tm-vote-chip:hover b { color: var(--tm-accent); }
.tm-vote-chip:active, .tm-vote:active { transform: scale(.94); }
.tm-vote-chip.is-voted { border-color: var(--tm-brand); }
.tm-vote-chip.is-voted b { background: var(--tm-brand); color: var(--tm-on-brand); }

.tm-wishes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.tm-wish-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.tm-wish { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: var(--tm-radius); background: var(--tm-surface); border: 1px solid var(--tm-line); transition: border-color .25s, box-shadow .25s; }
.tm-wish:hover { box-shadow: var(--tm-shadow); }
.tm-wish[hidden] { display: none; }
.tm-wish[data-progress="done"] { opacity: .75; }
.tm-wish__body { flex: 1; min-width: 0; }
.tm-wish h3 { margin: 4px 0 4px; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.tm-wish p { margin: 0 0 4px; color: var(--tm-muted); font-size: 14px; line-height: 1.7; }
.tm-wish .tm-row__meta { align-items: center; margin-top: 8px; }
.tm-wish .tm-link { font-size: 13px; }
.tm-vote {
	position: relative; flex: none; width: 56px; height: 60px; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg);
	color: var(--tm-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	font: 600 15px var(--tm-font); cursor: pointer; transition: all .2s var(--tm-ease);
}
.tm-vote:hover { border-color: var(--tm-accent); color: var(--tm-accent); }
.tm-vote:hover svg { transform: translateY(-2px); }
.tm-vote svg { transition: transform .2s var(--tm-ease); }
.tm-vote.is-voted { background: var(--tm-brand); border-color: var(--tm-brand); color: var(--tm-on-brand); cursor: default; }
.tm-vote--done { cursor: default; color: var(--tm-accent); background: var(--tm-accent-soft); border-color: transparent; }
.tm-vote.is-pop, .tm-vote-chip.is-pop b { animation: tm-pop-vote .45s var(--tm-ease); }
@keyframes tm-pop-vote { 40% { transform: scale(1.18); } }
.tm-plus { position: absolute; top: -6px; left: 50%; font: 700 13px var(--tm-font); color: var(--tm-accent); pointer-events: none; animation: tm-float .8s var(--tm-ease) forwards; }
@keyframes tm-float { to { opacity: 0; transform: translate(-50%, -22px); } from { transform: translate(-50%, 0); } }
.tm-badge { font-size: 12px; padding: 3px 8px; border-radius: 6px; font-weight: 500; }
.tm-badge--open { background: color-mix(in srgb, #e9a23b 18%, transparent); color: #b7741a; }
.tm-badge--doing { background: color-mix(in srgb, #3b82f6 16%, transparent); color: #2f6fd6; }
.tm-badge--done { background: var(--tm-accent-soft); color: var(--tm-accent); }

.tm-more { display: block; width: 100%; margin-top: 10px; height: 44px; border-radius: 12px; border: 1px dashed var(--tm-line); background: transparent; color: var(--tm-muted); font: 500 14px var(--tm-font); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.tm-more:hover { color: var(--tm-accent); border-color: var(--tm-accent); background: var(--tm-surface); }
.tm-more[hidden] { display: none; }
.tm-wish-form { position: sticky; top: 80px; display: grid; gap: 14px; padding: 24px; border-radius: 20px; background: var(--tm-surface); border: 1px solid var(--tm-line); box-shadow: var(--tm-shadow); }
.tm-wish-form h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 19px; }
.tm-wish-form h3 svg { color: var(--tm-accent); }
.tm-field { display: grid; gap: 6px; font-size: 14px; color: var(--tm-muted); }
.tm-field input, .tm-field select, .tm-field textarea {
	width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--tm-line); background: var(--tm-bg);
	color: var(--tm-text); font: 15px/1.6 var(--tm-font); outline: none; transition: border-color .2s, box-shadow .2s;
}
.tm-field textarea { resize: vertical; min-height: 80px; }
.tm-field input:focus, .tm-field select:focus, .tm-field textarea:focus { border-color: var(--tm-accent); box-shadow: 0 0 0 3px var(--tm-glow); }
.tm-note { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--tm-muted); padding: 10px 12px; border-radius: 10px; background: var(--tm-surface-2); }
.tm-wish-form .tm-btn { justify-content: center; }
.tm-wish-form .tm-btn[disabled] { opacity: .6; cursor: wait; }
.tm-form-msg { margin: 0; font-size: 14px; min-height: 1.4em; }
.tm-form-msg[data-state="ok"] { color: var(--tm-accent); }
.tm-form-msg[data-state="err"] { color: #d9534f; }
.tm-wish-form.is-sent { animation: tm-flash .6s var(--tm-ease); }

/* ---------- Reveal on scroll ---------- */
.tm-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--tm-ease), transform .6s var(--tm-ease); transition-delay: var(--d, 0s); }
.tm-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.tm-reveal { opacity: 1; transform: none; }
	*, *::before { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.tm-nav { display: none; }
	.tm-btn-ghost .tm-search-label, .tm-btn-ghost kbd { display: none; }
	.tm-btn-ghost.tm-open-palette { width: 38px; padding: 0; justify-content: center; }
	.tm-theme-toggle { display: none; }
	.tm-header__bar { gap: 8px; }
	.tm-logo { font-size: 15px; gap: 8px; }
	.tm-actions { gap: 6px; }
	.tm-hero { padding: 56px 0 32px; }
	.tm-stats { gap: 24px; }
	.tm-row a { grid-template-columns: 1fr; gap: 6px; padding: 20px 4px; }
	.tm-row__arrow { display: none; }
	.tm-mission, .tm-subscribe, .tm-wishes { grid-template-columns: 1fr; gap: 28px; }
	.tm-wish-form { position: static; }
	.tm-planned__actions { align-items: flex-start; }
	.tm-subscribe { padding: 28px 20px; }
	.tm-tab { flex: 0 0 auto; padding: 0 14px; }
	.tm-btn-sub { padding: 0 12px; }
	.tm-stats { gap: 20px; }
	.tm-search { margin-left: 0; width: 100%; }
	.tm-search input, .tm-search input:focus { width: 100%; }
}
