:root {
  --ink: #2f3533;
  --muted: #68736f;
  --paper: #fbf6e9;
  --green: #315f58;
  --green-soft: #cfe2d5;
  --yellow: #f3c956;
  --coral: #ef896c;
  --blue: #bcdce1;
  --white: #fffefa;
  --line: rgba(49, 95, 88, .18);
  --shadow: 7px 8px 0 rgba(49, 95, 88, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.wrap { width: min(1180px, calc(100% - 36px)); margin: auto; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 246, 233, .91); backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--green);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 20px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--green); border-radius: 45% 55% 52% 48%; background: var(--yellow); box-shadow: 3px 4px 0 var(--green); }
.nav-links { display: flex; gap: 9px; flex-wrap: wrap; }
.nav-links a, .nav-account { text-decoration: none; font-weight: 700; padding: 9px 13px; border-radius: 999px; }
.nav-account { border: 0; color: var(--ink); background: transparent; }
.nav-links a:hover, .nav-account:hover { background: var(--green-soft); }
.ai-disclosure { background: var(--yellow); border-bottom: 2px solid var(--green); }
.ai-disclosure .wrap { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font-size: 14px; }
.ai-disclosure b { white-space: nowrap; }

.hero { padding: 72px 0 42px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; align-items: center; }
.eyebrow, .pill { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--green); border-radius: 999px; background: var(--white); padding: 7px 12px; font-weight: 800; font-size: 13px; }
h1 { font-size: clamp(40px, 7vw, 78px); line-height: 1.04; margin: 20px 0; letter-spacing: -.045em; }
.hero h1 span { color: var(--coral); position: relative; }
.hero-copy { font-size: 18px; line-height: 1.85; max-width: 720px; color: var(--muted); }
.hero-card { background: var(--white); border: 3px solid var(--green); border-radius: 34px; padding: 28px; box-shadow: var(--shadow); transform: rotate(2deg); }
.sloth { font-size: 84px; text-align: center; filter: drop-shadow(4px 5px 0 rgba(49,95,88,.15)); }
.mini-flow { display: grid; gap: 12px; margin-top: 18px; }
.mini-step { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 2px solid var(--green); border-radius: 16px; padding: 11px 14px; font-weight: 800; }
.mini-step b { display: grid; place-items: center; width: 28px; height: 28px; background: var(--yellow); border-radius: 50%; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 30px; }
.field { border: 2px solid var(--green); background: var(--white); border-radius: 14px; min-height: 48px; padding: 10px 13px; color: var(--ink); }
.toolbar .field { flex: 1; min-width: 180px; }
.btn { border: 2px solid var(--green); border-radius: 14px; background: var(--green); color: white; padding: 10px 17px; font-weight: 900; box-shadow: 3px 4px 0 var(--yellow); }
.btn:hover { transform: translateY(-2px); }
.btn.alt { background: var(--white); color: var(--green); box-shadow: 3px 4px 0 var(--green-soft); }
.btn.coral { background: var(--coral); }

.section { padding: 42px 0 70px; }
.discovery-section { background: rgba(188,220,225,.45); border-block: 2px solid var(--green); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section h2 { font-size: clamp(30px, 4vw, 48px); margin: 8px 0; }
.section-note { color: var(--muted); max-width: 600px; line-height: 1.7; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card { overflow: hidden; background: var(--white); border: 2px solid var(--green); border-radius: 22px; box-shadow: 5px 6px 0 var(--green-soft); transition: .2s ease; }
.video-card:hover { transform: translateY(-5px) rotate(-.3deg); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--green-soft), var(--blue)); position: relative; display: grid; place-items: center; overflow: hidden; }
.thumb.portrait { aspect-ratio: 9 / 12; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: white; border: 3px solid white; font-size: 22px; }
.card-body { padding: 19px; }
.card-body h3 { margin: 10px 0; font-size: 21px; line-height: 1.4; }
.meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.tag { border-radius: 999px; background: var(--green-soft); padding: 5px 9px; font-size: 12px; font-weight: 800; }
.empty { grid-column: 1 / -1; background: var(--white); border: 2px dashed var(--green); border-radius: 24px; padding: 44px; text-align: center; color: var(--muted); }

.wish-section { background: rgba(207,226,213,.72); border-block: 3px solid var(--green); }
.wish-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; align-items: start; }
.panel { background: var(--white); border: 2px solid var(--green); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.stack { display: grid; gap: 13px; }
label { font-weight: 800; display: grid; gap: 7px; }
textarea.field { resize: vertical; min-height: 104px; }
.compact-textarea { min-height: 112px; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.source-grid small, .variant-format small { color: var(--muted); font-weight: 500; line-height: 1.5; }
.file-field { padding-block: 8px; }
.variant-builder { border: 2px dashed var(--green); border-radius: 20px; padding: 18px; margin: 4px 0; }
.variant-builder legend { padding: 0 9px; font-weight: 900; font-size: 18px; }
.variant-builder .section-note { margin: 0 0 14px; }
.variant-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.variant-list { display: grid; gap: 10px; }
.variant-row { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(110px, 145px) minmax(140px, 175px) auto; gap: 14px; align-items: end; background: var(--paper); border: 2px solid var(--green); border-radius: 16px; padding: 13px; }
.check-row { display: flex; grid-template-columns: none; align-items: flex-start; gap: 9px; font-weight: 700; line-height: 1.5; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: 0 0 auto; }
.series-option { grid-column: 1 / -1; border-top: 1px dashed var(--green); padding-top: 11px; }
.prompt-detection { color: var(--green); font-weight: 800; }
.variant-format { display: flex; align-items: center; gap: 11px; min-height: 48px; }
.variant-format b, .variant-format small { display: block; }
.format-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--yellow); color: var(--green); font-size: 28px; line-height: 1; font-weight: 900; }
.variant-count { width: 100%; }
.remove-variant { min-height: 48px; border: 2px solid var(--coral); border-radius: 12px; padding: 8px 13px; background: var(--white); color: #a64029; font-weight: 900; }
.remove-variant:hover { background: #fff0eb; }
.form-result { min-height: 24px; margin: 0; color: var(--green); font-weight: 800; line-height: 1.6; }
.wish-list { display: grid; gap: 14px; }
.wish { display: grid; grid-template-columns: 38px 64px 1fr auto; gap: 14px; align-items: center; background: var(--white); border: 2px solid var(--green); border-radius: 18px; padding: 15px; }
.wish.highlight { outline: 6px solid rgba(243,201,86,.6); transform: translateY(-2px); }
.rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: white; font-weight: 900; }
.vote { border: 0; border-radius: 14px; background: var(--yellow); min-height: 58px; font-weight: 900; color: var(--ink); }
.wish h3 { margin: 0 0 5px; font-size: 17px; }
.wish p { margin: 0; color: var(--muted); font-size: 14px; }
.wish-share { margin-top: 8px; border: 0; background: transparent; color: var(--green); text-decoration: underline; font-weight: 900; padding: 0; }
.status { padding: 6px 9px; font-size: 12px; border-radius: 999px; background: var(--blue); font-weight: 900; white-space: nowrap; }

.modal { border: 0; padding: 0; background: transparent; width: min(900px, calc(100% - 28px)); }
.modal::backdrop { background: rgba(25,35,32,.75); backdrop-filter: blur(5px); }
.modal-box { max-height: 90vh; overflow: auto; position: relative; background: var(--paper); border: 3px solid var(--green); border-radius: 26px; padding: 24px; }
.close { position: sticky; top: 0; float: right; border: 2px solid var(--green); border-radius: 50%; width: 42px; height: 42px; background: var(--white); font-weight: 900; z-index: 2; }
.viewer { clear: both; aspect-ratio: 16/9; background: #17211f; border-radius: 18px; overflow: hidden; display: grid; place-items: center; color: white; }
.viewer video { width: 100%; height: 100%; }
.content-disclosure { display: inline-flex; margin-top: 10px; padding: 6px 10px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--green); font-size: 12px; font-weight: 900; }
.episode-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.episode-link { border: 2px solid var(--green); background: var(--white); color: var(--green); border-radius: 999px; padding: 6px 10px; font-weight: 800; }
.episode-link.active { background: var(--green); color: white; }
.view-summary, .comment-rule { color: var(--muted); font-size: 14px; line-height: 1.6; }
.btn.line { background: #06c755; border-color: #048c3d; color: white; box-shadow: 3px 4px 0 #b8e8c8; }
.related-block { margin-top: 28px; padding-top: 20px; border-top: 2px dashed var(--green); }
.compact-grid { grid-template-columns: repeat(3,1fr); gap: 14px; }
.compact-grid .card-body { padding: 14px; }
.compact-grid .card-body h3 { font-size: 16px; }
.compact-grid .card-body p, .compact-grid .tags { display: none; }
.detail-copy { line-height: 1.8; white-space: pre-wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.comments { display: grid; gap: 10px; margin-top: 18px; }
.comment { padding: 12px 14px; border-left: 5px solid var(--yellow); background: var(--white); }
.comment strong { display: block; margin-bottom: 4px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; background: var(--ink); color: white; border-radius: 14px; padding: 13px 17px; opacity: 0; transform: translateY(20px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }
footer { padding: 38px 0; background: var(--green); color: white; text-align: center; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-nav { background: var(--green); color: white; padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
.admin-nav .brand { margin-bottom: 32px; }
.admin-nav button { width: 100%; text-align: left; border: 0; border-radius: 12px; background: transparent; color: white; padding: 12px; font-weight: 800; }
.admin-nav button.active, .admin-nav button:hover { background: rgba(255,255,255,.14); }
.admin-main { padding: 36px; max-width: 1350px; width: 100%; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--white); border: 2px solid var(--green); border-radius: 18px; padding: 18px; box-shadow: 4px 5px 0 var(--green-soft); }
.stat b { display: block; font-size: 34px; margin-top: 8px; }
.table-wrap { overflow: auto; background: var(--white); border: 2px solid var(--green); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--green-soft); font-size: 13px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .panel { width: min(430px, 100%); }
.account-modal { width: min(680px, calc(100% - 28px)); }
.account-head { display: flex; gap: 14px; align-items: center; margin: 14px 0 24px; }
.account-head img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 2px solid var(--green); }
.account-head h2, .account-head p { margin: 0; }
.subscription-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.favorite-list { display: grid; gap: 8px; margin-bottom: 18px; }
.favorite-link { border: 2px solid var(--green); border-radius: 12px; background: var(--white); padding: 10px 12px; text-align: left; font-weight: 800; }
.hidden { display: none !important; }
.review-list { display: grid; gap: 24px; }
.review-card { display: grid; gap: 18px; scroll-margin-top: 24px; }
.review-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.review-heading h2 { font-size: 30px; margin: 8px 0; }
.review-video { width: 100%; max-height: 560px; border-radius: 18px; background: #18201e; }
.version-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 12px; margin-top: 12px; }
.version-item, .publish-box, .marketing-draft { border: 2px solid var(--ink); border-radius: 16px; padding: 16px; background: #fff; }
.version-item small { display: block; margin-top: 10px; }
.marketing-draft { margin-top: 12px; }
.marketing-draft pre { font: inherit; white-space: pre-wrap; word-break: break-word; }
.review-card details summary { cursor: pointer; }
.review-card textarea { min-height: 110px; }
.publish-box { background: var(--cream); }
code { word-break: break-all; }

@media (max-width: 900px) {
  .hero, .wish-layout { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { height: auto; position: static; display: flex; align-items: center; gap: 8px; overflow: auto; }
  .admin-nav .brand { margin: 0 auto 0 0; min-width: 170px; }
  .admin-nav button { width: auto; white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { align-items: center; padding: 8px 0; gap: 7px; }
  .brand { font-size: 0; }
  .brand-mark { width: 38px; height: 38px; font-size: 18px; }
  .nav-links { justify-content: flex-end; flex-wrap: nowrap; gap: 0; }
  .nav-links a, .nav-account { padding: 7px 6px; font-size: 13px; white-space: nowrap; }
  .hero { padding-top: 45px; }
  .grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .ai-disclosure .wrap { align-items: flex-start; text-align: left; padding-block: 9px; }
  .wish { grid-template-columns: 34px 55px 1fr; }
  .wish .status { grid-column: 3; justify-self: start; }
  .compact-grid, .subscription-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 22px 14px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .source-grid { grid-template-columns: 1fr; }
  .variant-row { grid-template-columns: 1fr; align-items: stretch; }
  .remove-variant { width: 100%; }
  .review-heading { display: block; }
  .review-heading h2 { font-size: 24px; }
  .review-card { padding: 16px; }
  .publish-box .variant-toolbar { display: grid; }
}
