:root {
  --cream: #f6f1e8;
  --paper: #fffdf8;
  --ink: #17243a;
  --muted: #697386;
  --coral: #e95a47;
  --teal: #2a8b84;
  --line: #ded8cd;
  --accent: var(--coral);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 5%, rgb(233 90 71 / 9%), transparent 30%),
    var(--cream);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

button,
input { font: inherit; }

button,
a,
summary,
label { -webkit-tap-highlight-color: transparent; }

.home-shell,
.app-shell {
  width: min(100%, 900px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.home-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
}

.home h1,
.hero h1 {
  margin: 12px 0 0;
  font-weight: 950;
  letter-spacing: -.07em;
  line-height: .94;
}

.home h1 { font-size: clamp(80px, 18vw, 166px); }
.home-lead { max-width: 600px; margin: 28px 0 36px; font-size: clamp(19px, 3vw, 28px); line-height: 1.55; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.home-card {
  min-height: 230px;
  padding: 24px;
  border-radius: 28px;
  color: white;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 44px rgb(23 36 58 / 12%);
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-card:hover,
.home-card:focus-visible { transform: translateY(-4px); box-shadow: 0 24px 54px rgb(23 36 58 / 18%); }
.home-card.coral { background: var(--coral); }
.home-card.teal { background: var(--teal); }
.home-card small { font-weight: 900; opacity: .72; }
.home-card strong { margin: auto 0 24px; font-size: clamp(28px, 4vw, 44px); line-height: 1.18; }
.home-card span { font-size: 15px; font-weight: 800; }
.privacy { margin: 28px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.shosho { --accent: var(--teal); }
.app-shell { display: flex; flex-direction: column; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.back-link { color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; }

.channel-badge {
  max-width: 68%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 248 / 70%);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero { padding: clamp(50px, 10vh, 94px) 0 40px; }
.hero h1 { max-width: 760px; font-size: clamp(58px, 13vw, 124px); }
.play-button {
  width: 100%;
  min-height: 86px;
  margin-top: 38px;
  padding: 16px 22px;
  border: 0;
  border-radius: 24px;
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 28%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 950;
  cursor: pointer;
}

.play-button:active { transform: translateY(2px); }
.play-button:disabled { opacity: .55; cursor: wait; }
.play-icon { width: 44px; height: 44px; border-radius: 50%; background: white; color: var(--accent); display: grid; place-items: center; font-size: 17px; padding-left: 3px; }
.status { min-height: 24px; margin: 14px 4px 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgb(255 253 248 / 83%);
  box-shadow: 0 14px 36px rgb(23 36 58 / 6%);
}

.panel h2 { margin: 0 0 18px; font-size: 18px; }
.choice-row { display: grid; gap: 12px; }
.choice-row + .choice-row { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.choice-row label { display: flex; align-items: flex-start; gap: 10px; color: #344054; line-height: 1.5; cursor: pointer; }
input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.secondary, .danger { min-height: 48px; padding: 10px 13px; border-radius: 14px; font-weight: 850; cursor: pointer; }
.secondary { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.danger { border: 1px solid #bd3e34; background: transparent; color: #a9342c; }
.secondary:disabled { opacity: .4; cursor: not-allowed; }

.install-help { margin-top: 16px; padding: 18px 20px; border-radius: 18px; background: #e9e3d8; }
.install-help summary { font-weight: 900; cursor: pointer; }
.install-help p { margin: 12px 0 0; color: #4a5568; line-height: 1.75; }
.fine-print { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; }

@media (min-width: 680px) {
  .choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-button { width: auto; min-width: 360px; }
}

@media (max-width: 680px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-card { min-height: 180px; }
  .hero { padding-top: 50px; }
  .button-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
