﻿:root {
  --sy-navy: #173b67;
  --sy-navy-2: #0f2c4f;
  --sy-blue: #1f6ea9;
  --sy-orange: #ef7b3a;
  --sy-orange-dark: #d96022;
  --sy-cream: #f7f2e8;
  --sy-paper: #ffffff;
  --sy-ink: #1d2a38;
  --sy-muted: #657386;
  --sy-line: #dbe3eb;
  --sy-soft: #eef4f8;
  --sy-shadow: 0 18px 50px rgba(22, 48, 78, .14);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--sy-cream); }
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(239,123,58,.10), transparent 26rem),
    linear-gradient(180deg, #f9f6ef 0%, #eef4f7 100%);
  color: var(--sy-ink);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.sy-player-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.sy-topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.sy-brand {
  display: inline-flex;
  align-items: center;
  color: var(--sy-navy);
  text-decoration: none;
  line-height: 0;
}
.sy-brand-logo {
  display: block;
  width: 238px;
  max-width: 42vw;
  height: auto;
}
.sy-top-actions { display: flex; align-items: center; gap: 10px; }
.sy-mode {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.sy-mode.is-full { background: #e8f3ff; color: #125b91; }
.sy-mode.is-trial { background: #fff0e3; color: #a44817; }
.sy-ghost-button,
.sy-player-footer button,
.sy-message-actions button,
.sy-message-actions a {
  border: 1px solid rgba(23,59,103,.20);
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  color: var(--sy-navy);
  padding: 9px 15px;
  text-decoration: none;
  font-weight: 700;
}
.sy-ghost-button:hover,
.sy-player-footer button:hover,
.sy-message-actions button:hover,
.sy-message-actions a:hover { background: #fff; border-color: var(--sy-blue); }

.sy-hero {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(520px, 1.45fr);
  gap: 18px;
  align-items: stretch;
}

.sy-cover-panel,
.sy-player-panel,
.sy-chapters {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(23,59,103,.10);
  box-shadow: var(--sy-shadow);
}
.sy-cover-panel {
  min-height: 420px;
  border-radius: 22px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(160px, 42%) 1fr;
  gap: 22px;
  align-items: center;
}
.sy-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 350px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #e5edf4, #f7fafc);
  box-shadow: 0 14px 30px rgba(22,48,78,.18);
}
.sy-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.sy-cover-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--sy-navy);
  background: linear-gradient(145deg, #eaf2f8, #fff8ec);
}
.sy-cover-fallback span { font-size: 52px; }
.sy-cover-fallback b { letter-spacing: .12em; }
.sy-cover-wrap.no-cover .sy-cover-fallback { display: grid; }
.sy-book-meta { min-width: 0; }
.sy-eyebrow {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--sy-soft);
  color: var(--sy-blue);
  font-size: 13px;
  font-weight: 700;
}
.sy-book-meta h1 {
  margin: 12px 0 8px;
  color: var(--sy-navy-2);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.35;
  word-break: break-word;
}
.sy-subtitle { margin: 0 0 14px; color: var(--sy-muted); line-height: 1.65; }
.sy-meta-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  margin: 7px 0;
  line-height: 1.5;
}
.sy-meta-row span { color: var(--sy-muted); }
.sy-meta-row b { font-weight: 600; word-break: break-word; }
.sy-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sy-summary span {
  padding: 7px 10px;
  border-radius: 9px;
  background: #f5f7fa;
  color: #526174;
  font-size: 13px;
}
.sy-trial-note {
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 11px;
  background: #fff6e9;
  border-left: 4px solid var(--sy-orange);
  color: #864214;
}
.sy-trial-note b, .sy-trial-note span { display: block; }
.sy-trial-note span { margin-top: 4px; font-size: 13px; line-height: 1.55; }

.sy-player-panel {
  border-radius: 22px;
  padding: 26px 28px 24px;
  background:
    linear-gradient(145deg, rgba(23,59,103,.98), rgba(13,42,75,.98)),
    #173b67;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sy-now-label {
  display: inline-block;
  color: #a9c9e4;
  font-size: 13px;
  letter-spacing: .12em;
}
.sy-now h2 {
  margin: 7px 0 5px;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.45;
  word-break: break-word;
}
.sy-now p { margin: 0; color: #b9cadd; font-size: 14px; }
#syAudio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sy-progress-group { margin-top: 26px; }
.sy-range {
  width: 100%;
  height: 5px;
  accent-color: var(--sy-orange);
}
.sy-progress { display: block; }
.sy-time-row { display: flex; justify-content: space-between; margin-top: 7px; color: #b9cadd; font-variant-numeric: tabular-nums; font-size: 13px; }
.sy-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 22px 0;
}
.sy-main-controls button {
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease;
}
.sy-main-controls button:hover { transform: translateY(-2px); }
.sy-small-control {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.sy-play-control {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff9656, var(--sy-orange-dark));
  box-shadow: 0 11px 26px rgba(0,0,0,.25);
  font-size: 27px;
  padding-left: 4px;
}
.sy-play-control.is-playing { padding-left: 0; }
.sy-tool-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
}
.sy-select-label, .sy-volume-label { display: flex; align-items: center; gap: 8px; color: #d4e0ec; font-size: 13px; }
.sy-mute-toggle {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}
.sy-mute-toggle:hover, .sy-mute-toggle:focus-visible { background: rgba(255,255,255,.18); outline: none; }
.sy-mute-toggle.is-muted { background: rgba(239,123,58,.20); border-color: rgba(255,168,110,.65); }
.sy-select-label select {
  min-height: 35px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22);
  background: #fff;
  color: var(--sy-navy);
  padding: 4px 9px;
}
.sy-volume-label input { min-width: 110px; }
.sy-chapter-toggle {
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 6px 12px;
}

.sy-chapters {
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
}
.sy-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 14px;
}
.sy-section-head span { color: var(--sy-orange); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.sy-section-head h2 { margin: 3px 0 0; color: var(--sy-navy); font-size: 25px; }
.sy-section-head p { margin: 0; color: var(--sy-muted); font-size: 13px; }
.sy-track-list { list-style: none; margin: 0; padding: 0 20px 20px; }
.sy-track-list li + li { margin-top: 7px; }
.sy-track {
  width: 100%;
  min-height: 70px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #f7f9fb;
  color: var(--sy-ink);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 82px 34px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.sy-track:hover { background: #eef5fa; border-color: #c5d9e8; transform: translateY(-1px); }
.sy-track.is-active { background: #fff4ea; border-color: #f1b48e; }
.sy-track-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf0f5;
  color: var(--sy-navy);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sy-track.is-active .sy-track-number { background: var(--sy-orange); color: #fff; }
.sy-track-copy { min-width: 0; }
.sy-track-copy b { display: block; line-height: 1.45; word-break: break-word; }
.sy-track-copy small { display: none; }
.sy-track-wave {
  height: 15px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.sy-track-wave i {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: #9aabba;
  transform-origin: center;
}
.sy-track-wave i:nth-child(2), .sy-track-wave i:nth-child(5) { height: 11px; }
.sy-track-wave i:nth-child(3) { height: 15px; }
.sy-track-wave i:nth-child(4) { height: 9px; }
.sy-track.is-active .sy-track-wave i { background: var(--sy-orange); }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i { animation: sy-wave .78s ease-in-out infinite; }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i:nth-child(2) { animation-delay: -.12s; }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i:nth-child(3) { animation-delay: -.28s; }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i:nth-child(4) { animation-delay: -.18s; }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i:nth-child(5) { animation-delay: -.36s; }
.sy-player-page.is-playing .sy-track.is-active .sy-track-wave i:nth-child(6) { animation-delay: -.08s; }
@keyframes sy-wave {
  0%, 100% { transform: scaleY(.48); opacity: .58; }
  50% { transform: scaleY(1.25); opacity: 1; }
}
.sy-track-duration { text-align: right; color: #69778a; font-variant-numeric: tabular-nums; }
.sy-track-play { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--sy-blue); box-shadow: 0 4px 12px rgba(23,59,103,.10); }
.sy-track.is-active .sy-track-play { color: var(--sy-orange-dark); }
.sy-chapters.is-collapsed .sy-track-list { display: none; }

.sy-player-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 4px 0;
  color: #6b7787;
  font-size: 13px;
}

.sy-message-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sy-message-card { width: min(560px, 100%); background: #fff; border-radius: 22px; padding: 36px; text-align: center; box-shadow: var(--sy-shadow); }
.sy-message-icon { width: 70px; height: 70px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; background: var(--sy-navy); color: #fff; font-size: 34px; }
.sy-message-card h1 { margin: 18px 0 10px; color: var(--sy-navy); }
.sy-message-card p { color: var(--sy-muted); line-height: 1.7; }
.sy-message-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sy-message-actions a { background: var(--sy-orange); border-color: var(--sy-orange); color: #fff; }

@media (max-width: 980px) {
  .sy-hero { grid-template-columns: 1fr; }
  .sy-cover-panel { min-height: 0; grid-template-columns: 190px 1fr; }
}

@media (max-width: 660px) {
  .sy-player-page { width: min(100% - 18px, 1240px); padding-top: 8px; }
  .sy-topbar { min-height: 56px; margin-bottom: 8px; }
  .sy-brand-logo { width: 190px; max-width: 48vw; }
  .sy-mode { padding: 5px 9px; font-size: 12px; }
  .sy-ghost-button { padding: 7px 10px; }
  .sy-cover-panel { grid-template-columns: 116px 1fr; gap: 15px; padding: 15px; border-radius: 16px; align-items: start; }
  .sy-cover-wrap { max-height: none; border-radius: 10px; }
  .sy-book-meta h1 { margin-top: 8px; font-size: 21px; }
  .sy-subtitle, .sy-meta-row, .sy-summary { font-size: 13px; }
  .sy-meta-row { grid-template-columns: 70px 1fr; }
  .sy-trial-note { grid-column: 1 / -1; }
  .sy-player-panel { padding: 20px 15px 18px; border-radius: 16px; }
  .sy-now h2 { font-size: 21px; }
  .sy-main-controls { gap: 8px; }
  .sy-small-control { width: 42px; height: 42px; font-size: 13px; }
  .sy-play-control { width: 64px; height: 64px; }
  .sy-tool-row { grid-template-columns: auto 1fr; gap: 12px; }
  .sy-chapter-toggle { grid-column: 1 / -1; }
  .sy-volume-label input { min-width: 90px; }
  .sy-chapters { border-radius: 16px; }
  .sy-section-head { padding: 18px 15px 11px; }
  .sy-track-list { padding: 0 9px 12px; }
  .sy-track { grid-template-columns: 42px minmax(0,1fr) 58px; gap: 8px; min-height: 65px; padding: 9px; }
  .sy-track-play { display: none; }
  .sy-track-copy small { display: none; }
  .sy-track-duration { font-size: 12px; }
  .sy-player-footer span { display: none; }
  .sy-player-footer { justify-content: center; }
}

@media (max-width: 430px) {
  .sy-brand-logo { width: 164px; max-width: 51vw; }
  .sy-cover-panel { grid-template-columns: 92px 1fr; }
  .sy-eyebrow { font-size: 11px; }
  .sy-book-meta h1 { font-size: 19px; }
  .sy-meta-row, .sy-subtitle, .sy-summary { display: none; }
  .sy-small-control:first-child, .sy-small-control:last-child { display: none; }
}
