/* CreatorKit v2 — anti-slop redesign.
   Design read: creator tool suite + services storefront, TW audience, premium dark-tech.
   Dials: VARIANCE 7 / MOTION 5 / DENSITY 4. Single accent, no purple gradients. */
:root {
  --ink: #0b0c0e;
  --ink-2: #101114;
  --surface: #16171b;
  --surface-2: #1c1d22;
  --hairline: rgba(255,255,255,.08);
  --hairline-2: rgba(255,255,255,.14);
  --txt: #f4f3ef;
  --muted: #9ba0a6;
  --accent: #d6ff4b;
  --accent-ink: #171a05;
  --line-green: #06c755;
  --danger: #ff6b6b;
  --warn: #ffc24b;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", -apple-system, "PingFang TC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.65;
}
::selection { background: var(--accent); color: var(--accent-ink); }

.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--ink-2);
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 16px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 14px; border-bottom: 1px solid var(--hairline); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 19px;
  font-family: var(--font-display); letter-spacing: -1px;
}
.brand strong { display: block; font-size: 17px; font-family: var(--font-display); letter-spacing: .2px; }
.brand small { color: var(--muted); font-size: 11.5px; letter-spacing: .4px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.nav-group-title {
  color: var(--muted); font-size: 10.5px; letter-spacing: 2.2px; text-transform: uppercase;
  margin: 16px 10px 6px; font-family: var(--font-mono);
}
.nav button {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-sm); color: var(--txt); font-size: 13.5px;
  transition: background .14s ease, color .14s ease;
  border-left: 2px solid transparent;
}
.nav button .ico { font-size: 15px; width: 20px; text-align: center; opacity: .9; }
.nav button:hover { background: var(--surface); }
.nav button.active { background: var(--surface); border-left-color: var(--accent); }
.sidebar-foot { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.lang-toggle {
  all: unset; cursor: pointer; padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--surface); text-align: center; font-size: 12.5px; transition: background .14s;
}
.lang-toggle:hover { background: var(--surface-2); }
.ghost-link { color: var(--muted); font-size: 12px; text-decoration: none; padding: 3px 8px; transition: color .14s; }
.ghost-link:hover { color: var(--accent); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 13px 24px;
  border-bottom: 1px solid var(--hairline); position: sticky; top: 0;
  background: rgba(11,12,14,.88); backdrop-filter: blur(12px); z-index: 20;
}
.hamburger { all: unset; cursor: pointer; font-size: 20px; display: none; min-width: 44px; min-height: 44px; text-align: center; line-height: 44px; }
.platform-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pchip {
  all: unset; cursor: pointer; font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--muted); white-space: nowrap;
  display: flex; align-items: center; gap: 6px; transition: all .14s ease;
  font-family: var(--font-mono);
}
.pchip:hover { border-color: var(--hairline-2); color: var(--txt); }
.pchip.on { border-color: var(--accent); color: var(--txt); background: rgba(214,255,75,.06); }
.pchip .dot { width: 7px; height: 7px; border-radius: 50%; }
.settings-btn { all: unset; cursor: pointer; font-size: 17px; padding: 6px; opacity: .8; transition: opacity .14s; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.settings-btn:hover { opacity: 1; }

.view { padding: 30px 28px 60px; max-width: 1020px; width: 100%; margin: 0 auto; flex: 1; }
.foot {
  display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px;
  border-top: 1px solid var(--hairline); color: var(--muted); font-size: 12px;
}
.foot a { color: var(--accent); text-decoration: none; }
.ai-status { font-family: var(--font-mono); font-size: 11px; }
.ai-status.ok { color: var(--accent); }
.ai-status.off { color: var(--warn); }

/* ---------- Hero (asymmetric, editorial) ---------- */
.hero { padding: 26px 0 34px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
.hero .kicker {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 3px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.hero .kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero-value {
  position: relative; overflow: hidden; display: grid; gap: 7px;
  max-width: 760px; margin: 0 0 24px; padding: 18px 20px 19px;
  background:
    radial-gradient(circle at 96% 0, rgba(214,255,75,.13), transparent 42%),
    var(--surface);
  border: 1px solid var(--hairline-2); border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
}
.hero-value::after {
  content: "22"; position: absolute; right: 15px; top: -20px;
  color: rgba(214,255,75,.055); font-family: var(--font-display);
  font-size: 100px; line-height: 1; font-weight: 700; letter-spacing: -7px;
  pointer-events: none;
}
.hero-value-badge {
  position: relative; z-index: 1; width: fit-content;
  color: var(--accent); font-family: var(--font-mono); font-size: 10.5px;
  font-weight: 500; letter-spacing: 1.8px;
}
.hero-value strong {
  position: relative; z-index: 1; display: block; max-width: 25em;
  font-family: var(--font-display); font-size: clamp(19px, 2.4vw, 27px);
  line-height: 1.28; letter-spacing: -.45px;
}
.hero-value-copy {
  position: relative; z-index: 1; display: block; max-width: 51em;
  color: var(--muted); font-size: 13.5px; line-height: 1.65;
}
.hero h1 {
  margin: 0 0 14px; font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; letter-spacing: -1px; font-weight: 700;
  max-width: 14em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0 0 22px; color: var(--muted); max-width: 36em; font-size: 15.5px; }
.hero-stats { display: flex; gap: 28px; margin: 0 0 24px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--font-display); font-size: 22px; color: var(--txt); }
.hero-stats span { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .5px; }

/* ---------- Buttons ---------- */
.btn {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 11px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; text-align: center; transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(214,255,75,.22); }
.btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--hairline-2); }
.btn.ghost:hover { border-color: var(--txt); }
.btn.line-cta { background: var(--line-green); color: #fff; }
.btn.line-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(6,199,85,.3); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.video-paste-row { display: flex; margin: 12px 0 10px; }
.video-paste-row .btn { min-height: 44px; }
.video-action-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.video-action-grid .btn { min-height: 48px; padding-inline: 14px; }
.video-download { font-size: 15.5px; letter-spacing: .1px; }
.video-download-frame { display: none; }
.video-caption-result:empty { display: none; }
.caption-panel .rb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.caption-panel .caption-output { min-height: 132px; resize: vertical; }
.video-pass-host:empty { display: none; }
.video-pass {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-lg);
  padding: 17px 18px;
  margin-bottom: 14px;
}
.video-pass.login-pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-color: rgba(214,255,75,.34);
}
.video-pass-copy, .video-pass-head > div { display: flex; flex-direction: column; gap: 3px; }
.video-pass strong { font-family: var(--font-display); font-size: 16px; line-height: 1.35; }
.video-pass small { color: var(--muted); font-size: 12px; line-height: 1.55; }
.video-pass-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.8px;
}
.video-login-btn { min-height: 44px; white-space: nowrap; }
.video-pass-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.video-pass-account { display: flex; align-items: center; gap: 9px; }
.video-logout-btn { min-height: 44px; padding-inline: 12px; font-size: 12px; }
.video-pass-foot { display: block; margin-top: 12px; }
.video-punches { display: grid; grid-template-columns: repeat(3, 34px); gap: 7px; }
.video-punch {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px dashed var(--hairline-2);
  color: var(--muted);
  font-family: var(--font-mono);
}
.video-punch.active {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(214,255,75,.08);
}
.exhausted-pass { border-color: rgba(255,194,75,.38); }
.video-mission {
  background: linear-gradient(135deg, rgba(214,255,75,.09), rgba(214,255,75,.025));
  border: 1px solid rgba(214,255,75,.24);
  border-radius: var(--r-md);
  margin-top: 14px;
  padding: 14px;
}
.video-mission.completed {
  background: rgba(255,255,255,.025);
  border-color: var(--hairline-2);
}
.video-mission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.video-mission-head > div { display: flex; flex-direction: column; gap: 3px; }
.video-mission-head strong { font-size: 14px; }
.video-mission-status {
  background: var(--accent);
  border-radius: 999px;
  color: var(--accent-ink);
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
}
.video-mission.completed .video-mission-status {
  background: var(--surface-2);
  color: var(--muted);
}
.video-mission-action {
  color: var(--txt);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  margin: 11px 0 9px;
}
.video-mission-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.video-mission-stats span {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 5px 8px;
}
.video-achievements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}
.video-achievement {
  border: 1px dashed var(--hairline-2);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px 5px;
  text-align: center;
}
.video-achievement.unlocked {
  background: rgba(214,255,75,.1);
  border-color: rgba(214,255,75,.35);
  color: var(--accent);
}
.video-mission-next, .video-mission-reset { display: block; }
.video-mission-reset { margin-top: 2px; }
.video-protection-pending {
  color: var(--accent);
  display: block;
  margin-top: 5px;
}
.video-weekly {
  background: rgba(0,0,0,.18);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  margin: 12px 0 8px;
  padding: 12px;
}
.video-weekly.completed { border-color: rgba(214,255,75,.38); }
.video-weekly-head {
  align-items: center;
  display: grid;
  gap: 3px 8px;
  grid-template-columns: 1fr auto;
}
.video-weekly-head .video-pass-kicker { grid-column: 1 / -1; }
.video-weekly-head strong { font-size: 13px; }
.video-weekly-head > span:last-child {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.video-weekly-progress {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, 1fr);
  margin: 9px 0;
}
.video-weekly-progress span {
  background: var(--surface-2);
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  height: 6px;
}
.video-weekly-progress span.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(214,255,75,.18);
}
.video-weekly p {
  color: var(--txt);
  font-size: 11.5px;
  line-height: 1.55;
  margin: 0 0 3px;
}
.creator-profile-card {
  background:
    radial-gradient(circle at 100% 0, rgba(69,221,255,.08), transparent 38%),
    rgba(0,0,0,.16);
  border: 1px solid rgba(69,221,255,.2);
  border-radius: var(--r-md);
  margin-top: 12px;
  padding: 14px;
}
.creator-profile-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.creator-profile-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.creator-profile-head strong { font-size: 14px; }
.creator-profile-head small { color: #8cecff; }
.creator-plan-badge {
  background: rgba(69,221,255,.1);
  border: 1px solid rgba(69,221,255,.3);
  border-radius: 999px;
  color: #8cecff;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 9px;
}
.creator-delivery-total {
  align-items: baseline;
  display: flex;
  gap: 7px;
  margin: 13px 0 9px;
}
.creator-delivery-total b {
  color: var(--txt);
  font-family: var(--font-display);
  font-size: 24px;
}
.creator-delivery-total span {
  color: var(--muted);
  font-size: 11.5px;
}
.creator-delivery-label {
  display: block;
  margin: -3px 0 8px;
}
.delivery-achievements {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.delivery-achievement {
  border: 1px dashed var(--hairline-2);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px 4px;
  text-align: center;
}
.delivery-achievement.unlocked {
  background: rgba(69,221,255,.08);
  border-color: rgba(69,221,255,.32);
  color: #8cecff;
}
.creator-next-level {
  display: block;
  margin-top: 8px;
}
.creator-plan-details {
  border-top: 1px solid var(--hairline);
  margin-top: 12px;
  padding-top: 10px;
}
.creator-plan-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  list-style: none;
  min-height: 32px;
}
.creator-plan-details summary::-webkit-details-marker { display: none; }
.creator-plan-details summary::after {
  color: var(--muted);
  content: "+";
  font-family: var(--font-mono);
}
.creator-plan-details[open] summary::after { content: "−"; }
.creator-plan-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 9px;
}
.creator-plan-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  min-width: 0;
  padding: 9px;
}
.creator-plan-card.active { border-color: rgba(69,221,255,.38); }
.creator-plan-card > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: space-between;
}
.creator-plan-card strong { font-size: 11px; }
.creator-plan-card > div span {
  color: #8cecff;
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.creator-plan-card small {
  display: block;
  font-size: 9.5px;
  line-height: 1.45;
  margin-top: 5px;
}
.creator-plan-note {
  display: block;
  margin-top: 8px;
}

/* ---------- Section headers ---------- */
.sec-head { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 16px; }
.sec-head .idx { font-family: var(--font-mono); color: var(--accent); font-size: 13px; }
.sec-head h2 { margin: 0; font-family: var(--font-display); font-size: 21px; letter-spacing: -.3px; }
.sec-head .sub { color: var(--muted); font-size: 12.5px; margin-left: auto; font-family: var(--font-mono); }

/* ---------- Tool grid ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.tool-card {
  all: unset; cursor: pointer; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 7px;
  transition: border-color .16s ease, transform .16s ease; position: relative; overflow: hidden;
}
.tool-card::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .22s ease;
}
.tool-card:hover { border-color: var(--hairline-2); transform: translateY(-2px); }
.tool-card:hover::after { right: 0; }
.tool-card .t-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card .t-ico { font-size: 21px; }
.tool-card .t-num { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.tool-card .t-name { font-weight: 600; font-size: 14.5px; letter-spacing: .1px; }
.tool-card .t-desc { color: var(--muted); font-size: 12px; line-height: 1.55; }
.tool-card .t-tag {
  align-self: flex-start; font-size: 9.5px; padding: 2.5px 8px; border-radius: 999px;
  font-family: var(--font-mono); letter-spacing: 1px;
  border: 1px solid var(--hairline-2); color: var(--muted);
}
.tool-card .t-tag.ai { border-color: rgba(214,255,75,.4); color: var(--accent); }

/* ---------- Service cards (paid funnel) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.svc-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 9px;
  transition: border-color .16s ease;
}
.svc-card:hover { border-color: rgba(6,199,85,.45); }
.svc-card .s-ico { font-size: 26px; }
.svc-card h3 { margin: 0; font-family: var(--font-display); font-size: 16.5px; }
.svc-card p { margin: 0; color: var(--muted); font-size: 12.5px; flex: 1; }
.svc-card .s-price { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: .5px; }
.svc-card .btn { margin-top: 4px; padding: 9px 14px; font-size: 13px; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.price-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.price-card.hot { border-color: var(--accent); position: relative; }
.price-card.hot::before {
  content: "推薦"; position: absolute; top: -9px; left: 20px; background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; letter-spacing: 1px;
}
.price-card h3 { margin: 0; font-family: var(--font-display); font-size: 17px; }
.price-card .p-amt { font-family: var(--font-display); font-size: 26px; letter-spacing: -.5px; }
.price-card .p-amt small { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.price-card ul { margin: 0; padding: 0 0 0 2px; list-style: none; color: var(--muted); font-size: 12.8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price-card ul li::before { content: "— "; color: var(--accent); }

/* ---------- Tool page ---------- */
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tool-head .back { all: unset; cursor: pointer; font-size: 13px; color: var(--muted); font-family: var(--font-mono); transition: color .14s; }
.tool-head .back:hover { color: var(--accent); }
.tool-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -.3px; }
.tool-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 20px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 14px; font-size: 14.5px; font-family: var(--font-display); letter-spacing: .1px; }

label.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; font-size: 12.5px; }
label.field > span { color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select, input[type=file] {
  background: var(--ink-2); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  color: var(--txt); padding: 11px 13px; font-size: 14px; font-family: inherit; width: 100%;
  transition: border-color .14s;
}
textarea { resize: vertical; min-height: 92px; line-height: 1.65; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
/* a11y: 鍵盤操作可見焦點框（loop-engineer i1；原本全站僅 input 且 outline:none，鍵盤使用者看不到焦點） */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; padding: 6px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); cursor: pointer; transition: all .14s; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.out {
  background: var(--ink-2); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  padding: 15px; white-space: pre-wrap; line-height: 1.75; font-size: 13.8px; min-height: 40px;
}
.result-block { margin-bottom: 13px; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-block .rb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.result-block .rb-plat { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; font-family: var(--font-display); }
.copy-btn { all: unset; cursor: pointer; font-size: 11.5px; color: var(--accent); padding: 3px 9px; border-radius: 6px; font-family: var(--font-mono); transition: background .14s; }
.copy-btn:hover { background: var(--surface-2); }
.count { font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.count.over { color: var(--danger); }

/* result-footer LINE CTA */
.rcta {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: rgba(6,199,85,.07); border: 1px solid rgba(6,199,85,.25); border-radius: var(--r-md);
  padding: 13px 16px; margin: 18px 0 6px; flex-wrap: wrap;
}
.rcta span { font-size: 13px; }
.rcta a { flex-shrink: 0; }

/* ---------- Tables ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 500; font-size: 12px; font-family: var(--font-mono); }
.spec-table td b { color: var(--accent); font-family: var(--font-display); }
.spec-scroll { overflow-x: auto; }

/* ---------- Health ring ---------- */
.score-ring { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; }
.ring { --p: 0; width: 100px; height: 100px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid; place-items: center; }
.ring::before { content: ""; position: absolute; width: 74px; height: 74px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 26px; font-family: var(--font-display); }
.check-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.check-item input { width: auto; }
.muted { color: var(--muted); }
.pill {
  display: inline-block; font-size: 11.5px; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--hairline); margin: 0 5px 6px 0;
}
.badge-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--accent); font-family: var(--font-mono); }

/* ---------- Floating LINE FAB ---------- */
.line-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  background: var(--line-green); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 13px 20px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 28px rgba(6,199,85,.4);
  transition: transform .16s ease;
}
.line-fab:hover { transform: translateY(-2px) scale(1.02); }

/* ---------- Modal + toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 100; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--surface); border: 1px solid var(--hairline-2); border-radius: var(--r-lg); padding: 24px; width: min(440px, 92vw); }
.modal h3 { margin: 0 0 8px; font-family: var(--font-display); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.video-auth-modal { position: relative; width: min(430px, calc(100vw - 28px)); padding: 26px 24px 20px; }
.video-auth-modal h3 { padding-right: 42px; }
.modal-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 7px;
}
.modal-close {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
  border-radius: 50%;
}
.modal-close:hover { color: var(--txt); background: var(--surface-2); }
.video-auth-modal form { margin-top: 18px; }
.video-auth-modal .modal-submit { min-height: 46px; width: 100%; }
.video-auth-modal .text-btn {
  min-height: 44px;
  width: 100%;
  color: var(--muted);
  font-size: 12.5px;
  padding-block: 8px;
}
.video-auth-modal .text-btn:hover { color: var(--accent); }
.video-auth-modal input { min-height: 46px; font-size: 16px; }
.video-turnstile { min-height: 65px; margin: 2px 0 12px; overflow: hidden; }
.modal-status { min-height: 22px; color: var(--accent); font-size: 12.5px; margin: 12px 0 0; }
.modal-status.error { color: var(--danger); }
.video-auth-note {
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11.5px;
  margin: 12px 0 0;
  padding-top: 12px;
}
.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: var(--txt); color: var(--ink); padding: 11px 20px; border-radius: 10px;
  z-index: 200; font-size: 13.5px; font-weight: 600;
}
.toast[hidden] { display: none; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* article preview iframe */
.article-frame { width: 100%; height: 480px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; width: 262px; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .hamburger { display: block; }
  .view { padding: 20px 16px 70px; }
  .hero h1 { font-size: 29px; }
  .hero-value { padding: 16px; margin-bottom: 20px; }
  .hero-value strong { font-size: 19px; }
  .hero-value::after { right: 8px; top: -8px; font-size: 78px; }
  /* mobile: FAB 避讓——與 hero 綠色 CTA 重複同一 LINE 連結，手機縮成圖示鈕靠邊，
     不再蓋住工具卡內容；並尊重 iPhone home indicator 安全區（loop-engineer i2） */
  .line-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 13px 15px; }
  .line-fab #fabLabel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  /* mobile: 平台篩選改單行水平滑動，不再擠成 3 行吃掉整個第一屏（loop-engineer i1） */
  .platform-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 2px 2px 3px; scroll-snap-type: x proximity; }
  .platform-chips::-webkit-scrollbar { display: none; }
  .platform-chips .chip { flex: 0 0 auto; scroll-snap-align: start; }
}
@media (max-width: 420px) {
  body[data-view="video-info"] .line-fab { display: none; }
  .video-action-grid { grid-template-columns: 1fr; }
  .video-pass.login-pass { grid-template-columns: 1fr; }
  .video-login-btn { width: 100%; }
  .video-pass-head { align-items: flex-start; }
  .video-pass-account { align-items: flex-end; flex-direction: column; }
  .video-punches { grid-template-columns: repeat(3, 31px); gap: 6px; }
  .video-punch { width: 31px; height: 31px; }
  .video-achievements { gap: 5px; }
  .creator-plan-grid { grid-template-columns: 1fr; }
  .video-auth-modal { max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- loop-engineer i3：平板中段還原側欄 ---------- */
/* 置於檔尾，確保覆蓋上方 max-width:880px 的 mobile 規則。
   720–880px 空間足夠容納側欄，22 個工具的導覽不該藏進漢堡。 */
@media (min-width: 720px) and (max-width: 880px) {
  .app { grid-template-columns: 216px 1fr; }
  /* !important：覆蓋上方 max-width:880px 的 .sidebar 與 .sidebar.open（特異度較高） */
  .sidebar, .sidebar.open { position: sticky !important; top: 0; width: auto !important; transform: none !important; height: 100vh; box-shadow: none !important; z-index: auto; }
  .hamburger { display: none; }
  .view { padding: 22px 20px 40px; }
  .line-fab { right: 20px; bottom: 20px; padding: 13px 20px; }
  .line-fab #fabLabel { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; }
}

/* ---------- Tool card actions ----------
   2026-08-01｜修「接這類案件」點不到的功能性 bug。
   根因：.mini-actions／.mini-action 這兩個 class 由 app.js 產出，但樣式表裡
   從來沒有對應規則 → 三個動作是裸 inline 元素，第三個 <a> 在窄卡片裡折成兩行，
   rect 190x48 但真正可點的字只佔一小塊；線上實測 elementFromPoint(中心)
   打到的是外層 DIV.mini-actions，不是連結本身。
   修法：容器改 flex-wrap、每個動作給 inline-flex + 最小 32px 觸控高度，
   讓 rect == 可點區。主要動作（自己使用）留邊框，其餘走文字連結，
   避免三顆一模一樣的膠囊（那是 AI 味診斷表第 8/15 條）。 */
.tool-card .mini-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 12px; margin-top: 8px; padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.tool-card .mini-action {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 4px 2px;
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.2;
  color: var(--muted); white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
.tool-card .mini-action:first-child {
  padding: 4px 11px; border: 1px solid var(--hairline-2);
  border-radius: var(--r-sm); color: var(--txt); font-weight: 600;
}
.tool-card .mini-action:not(:first-child) {
  border-bottom: 1px solid transparent;
}
.tool-card .mini-action:hover,
.tool-card .mini-action:focus-visible { color: var(--accent); }
.tool-card .mini-action:first-child:hover,
.tool-card .mini-action:first-child:focus-visible { border-color: var(--accent); }
.tool-card .mini-action:not(:first-child):hover,
.tool-card .mini-action:not(:first-child):focus-visible { border-bottom-color: var(--accent); }
.tool-card .mini-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
