@font-face {
  font-family: Nunito;
  src: url('/fonts/nunito-regular.ttf') format('truetype');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url('/fonts/nunito-bold.ttf') format('truetype');
  font-weight: 700 900;
  font-display: swap;
}
:root {
  font-family: Nunito, ui-rounded, system-ui, sans-serif;
  color: #2d2445;
  background: #fff9f4;
  color-scheme: light;
  --ink: #2d2445;
  --muted: #716582;
  --pink: #c63868;
  --line: #eae2f1;
  --shadow: 0 8px 28px #48324d09, 0 2px 6px #48324d04;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 5% 6%, #fbeaf170, transparent 36%), radial-gradient(ellipse at 100% 32%, #e7f7ee60, transparent 30%);
}
button, input, select { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--pink);
  color: white;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 #a62450, 0 7px 16px #c6386812;
  transition: background .15s, box-shadow .15s;
}
button:hover, .button:hover { background: #ae2956; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, #transcript:focus-visible {
  outline: 3px solid #a78bca;
  outline-offset: 4px;
}
.secondary { color: var(--ink); background: white; border-color: var(--line); box-shadow: 0 2px 0 #eee8f4; }
.secondary:hover { background: #f7f1fb; }
.text-button { padding: 4px 0; color: var(--pink); background: none; box-shadow: none; font-size: 14px; }
.text-button:hover { background: none; text-decoration: underline; }
.button-small { font-size: 14px; padding: 9px 16px; }
.skip-link { position: absolute; left: 20px; top: -80px; padding: 12px; background: white; z-index: 20; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 20px auto; padding: 0 28px; max-width: 1440px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border: 1px solid var(--line); background: white; border-radius: 20px; padding: 11px 16px; box-shadow: var(--shadow); }
.brand img { object-fit: contain; }
.brand strong { display: block; font-size: 20px; line-height: 1.2; font-weight: 900; letter-spacing: -.6px; }
.brand-accent { color: var(--pink); }
.brand small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
nav { display: flex; align-items: center; gap: 28px; }
nav > a:not(.button) { font-size: 14px; font-weight: 800; text-decoration: none; }
nav > a:hover { color: var(--pink); }
nav > a.button:hover { color: white; }
main { max-width: 1240px; margin: auto; padding: 0 28px; }
.hero { max-width: 920px; margin: auto; text-align: center; padding: 48px 0 22px; }
h1 { font-size: clamp(38px, 4.5vw, 60px); font-weight: 900; letter-spacing: -1.8px; line-height: 1.12; margin: 0; }
h1 span { color: var(--pink); }
.intro { font-size: 18px; color: var(--muted); line-height: 1.6; margin: 22px 0 28px; }
.input-card { padding: 26px 28px 20px; border: 2px dashed #edb6c9; border-radius: 26px; background: #fffefef2; text-align: left; box-shadow: 0 16px 35px #c6386808; }
.input-card > label { display: block; font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.input-row { display: flex; gap: 12px; }
input[type=url], input[type=search] { width: 100%; min-width: 0; border: 1px solid #ded5e9; border-radius: 13px; background: #fdfbff; padding: 15px; color: var(--ink); font-size: 16px; }
input::placeholder { color: #898094; }
.form-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.language-label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
select { appearance: none; padding: 7px 27px 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 14px; background-image: linear-gradient(45deg, transparent 50%, #716582 50%), linear-gradient(135deg, #716582 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.input-note { color: var(--muted); font-size: 14px; text-align: center; margin: 20px 0 0; }
#status { min-height: 22px; color: var(--muted); margin: 14px 0 0; font-size: 14px; }
#error { text-align: left; background: #fff0f2; border: 1px solid #edb6c9; border-radius: 18px; padding: 18px 22px; color: #8e2648; margin-top: 12px; }
#error p { margin: 0 0 12px; line-height: 1.6; }
#error button { font-size: 14px; padding: 7px 14px; }
#result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; margin: 8px 0 58px; }
.watch-column { display: grid; gap: 20px; min-width: 0; }
.video-card, .transcript-card { background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 20px; margin: 0; letter-spacing: -.4px; }
#playback-time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.player-frame { aspect-ratio: 16/9; min-height: 200px; background: #211b31; }
.player-frame iframe { width: 100%; height: 100%; min-height: 200px; border: 0; display: block; }
.video-info { padding: 18px 22px 8px; }
.video-info h3 { font-size: 17px; line-height: 1.4; margin: 0 0 8px; }
.video-info a { color: var(--muted); font-size: 14px; }
#player-status { margin: 0; padding: 0 22px 18px; font-size: 14px; color: #8e2648; line-height: 1.5; }
#result-meta { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.follow-control, .toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; white-space: nowrap; }
input[type=checkbox] { accent-color: var(--pink); width: 16px; height: 16px; }
.transcript-tools { padding: 16px 20px 0; }
input[type=search] { padding: 10px 13px; font-size: 15px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; }
.actions { display: flex; gap: 8px; }
.actions button { padding: 7px 11px; font-size: 14px; border-radius: 10px; }
.transcript-hint { font-size: 13px; color: var(--muted); margin: 17px 22px 10px; }
#transcript { height: 432px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: #ded0df transparent; }
.cue { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; width: 100%; border: 1px solid transparent; border-radius: 12px; padding: 12px 10px; margin: 2px 0; color: var(--ink); background: transparent; box-shadow: none; white-space: normal; text-align: left; font-weight: 400; line-height: 1.65; }
.cue:hover { background: #fbf6fc; }
.cue.active { background: #fce8ef; border-color: #f1c8d7; }
.cue .cue-time { color: #a14c70; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cue .cue-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.without-times .cue { grid-template-columns: 1fr; }
.without-times .cue-time { display: none; }
#no-matches { padding: 30px 22px; color: var(--muted); text-align: center; }
#action-status { margin: 0; min-height: 28px; padding: 3px 22px 8px; font-size: 14px; color: var(--pink); }
.download-recommendation { padding: 14px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.7; background: #fdfaff; }
.download-recommendation a { font-weight: 800; color: var(--pink); }
.recommendation { padding: 24px; border: 1px solid #e3daef; border-radius: 22px; background: #f1ebf9; }
.recommendation-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 12px; }
.recommendation h2 { font-size: 25px; letter-spacing: -.6px; line-height: 1.2; margin: 0; }
.recommendation p { color: #665577; font-size: 16px; line-height: 1.6; margin: 14px 0 18px; }
.recommendation .button { background: var(--ink); box-shadow: 0 3px 0 #190f2b; width: 100%; font-size: 15px; }
.recommendation .button:hover { background: #47345f; }
.recommendation small { display: block; text-align: center; color: #746581; font-size: 12px; margin-top: 13px; }
.how-section { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; margin: 48px 0 72px; padding: 42px 18px 0; border-top: 1px solid #e9e0e9; }
h2 { font-size: 34px; font-weight: 900; line-height: 1.18; letter-spacing: -.8px; margin: 0 0 16px; }
.section-intro > p:last-child { color: var(--muted); line-height: 1.7; max-width: 390px; margin: 0; }
.steps { display: grid; gap: 26px; }
.steps article { display: flex; align-items: flex-start; gap: 16px; }
.step-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; background: #f9dce7; color: #a72c56; font-size: 23px; font-weight: 800; }
.step-icon.mint { background: #deefe5; color: #3f7862; font-size: 15px; }
.step-icon.lilac { background: #eae1f6; color: #76519e; }
h3 { font-size: 18px; font-weight: 800; margin: 0 0 7px; }
.steps p, .feature-grid p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0; }
.product-section { border: 1px solid #e7daef; border-radius: 28px; background: #fffdfef2; box-shadow: var(--shadow); padding: 38px 40px; }
.product-intro { display: flex; gap: 26px; align-items: center; }
.product-intro img { object-fit: contain; flex-shrink: 0; }
.product-intro h2 { font-size: 32px; }
.product-intro p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 30px 0; margin-top: 26px; border-top: 1px solid var(--line); }
.feature-grid article + article { border-left: 1px solid var(--line); padding-left: 30px; }
.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.product-actions > a:not(.button) { font-size: 14px; font-weight: 800; }
.product-actions > span { font-size: 12px; color: var(--muted); margin-left: auto; }
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 70px; padding: 78px 18px; }
details { border-bottom: 1px solid #e7dfe9; padding: 18px 0; }
details:first-child { padding-top: 0; }
summary { cursor: pointer; font-weight: 800; font-size: 17px; line-height: 1.5; }
details p { color: var(--muted); line-height: 1.7; padding-right: 16px; margin: 14px 0 0; }
details p a { color: var(--pink); }
footer { max-width: 1240px; margin: auto; padding: 26px 28px; border-top: 1px solid #e7dfe9; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.footer-brand { font-weight: 900; color: var(--ink); text-decoration: none; }
footer > div { display: flex; gap: 20px; margin-left: auto; }
[hidden] { display: none !important; }
@media (max-width: 1000px) {
  .site-header { padding: 0 20px; }
  nav { gap: 16px; }
  .brand strong { font-size: 18px; }
  #result { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; }
  .toolbar { flex-wrap: wrap; }
  .actions { margin-left: auto; }
  .how-section, .faq { gap: 40px; }
  .product-actions > span { width: 100%; margin-left: 0; }
  .panel-heading { padding: 17px; }
}
@media (max-width: 760px) {
  .site-header { margin: 14px auto; padding: 0 16px; gap: 10px; }
  .brand { padding: 9px 12px; gap: 7px; border-radius: 16px; }
  .brand img { width: 30px; height: 30px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 11px; }
  nav > a:not(.button) { display: none; }
  .button-small { font-size: 13px; padding: 9px 12px; }
  main { padding: 0 16px; }
  .hero { padding-top: 32px; }
  h1 { font-size: 42px; letter-spacing: -1.3px; }
  .intro { font-size: 16px; margin: 18px 0 24px; }
  .input-card { padding: 20px 18px; border-radius: 22px; }
  .input-row { flex-direction: column; }
  .input-row button { min-height: 48px; }
  .form-meta { align-items: flex-start; flex-direction: column; gap: 12px; }
  .input-note { font-size: 13px; margin-top: 17px; }
  #result { display: flex; flex-direction: column; gap: 18px; margin-bottom: 42px; }
  .watch-column { display: contents; }
  .video-card { width: 100%; order: 0; }
  .transcript-card { width: 100%; order: 1; }
  .recommendation { width: 100%; order: 2; }
  #transcript { height: 380px; }
  .panel-heading h2 { font-size: 19px; }
  .toolbar { gap: 12px; }
  .actions button { padding: 7px 10px; }
  .transcript-tools { padding: 15px 16px 0; }
  .transcript-hint { margin-inline: 18px; }
  .follow-control { font-size: 13px; }
  .how-section, .faq { grid-template-columns: 1fr; gap: 30px; padding-inline: 6px; }
  .how-section { margin: 30px 0 44px; padding-top: 30px; }
  h2 { font-size: 29px; }
  .product-section { padding: 26px 22px; border-radius: 22px; }
  .product-intro { gap: 15px; align-items: flex-start; }
  .product-intro img { width: 45px; height: 45px; }
  .product-intro h2 { font-size: 27px; }
  .product-intro h2 br { display: none; }
  .feature-grid { grid-template-columns: 1fr; gap: 22px; padding: 25px 0; margin-top: 24px; }
  .feature-grid article + article { border: 0; padding-left: 0; }
  .product-actions { gap: 18px; }
  .product-actions .button { width: 100%; }
  .faq { padding-block: 48px; }
  footer { padding: 24px 20px; gap: 12px; }
  footer > div { margin: 0; }
}
@media (max-width: 380px) {
  .brand-accent { display: none; }
  h1 { font-size: 36px; }
  .actions { width: 100%; }
  .actions button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .button { transition: none; }
}

/* A visible, honest waiting state: animation indicates activity, not a fake percentage. */
.input-card[aria-busy="true"] { border-style: solid; border-color: var(--pink); box-shadow: 0 0 0 5px #c638680a, 0 16px 35px #c6386810; }
button.is-loading { opacity: 1; gap: 10px; }
button.is-loading::before { content: ''; width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid #ffffff55; border-top-color: white; border-radius: 50%; animation: loading-spin .8s linear infinite; }
.loading-panel { margin-top: 20px; padding: 24px 26px 18px; border: 2px solid #e5a4bc; border-radius: 22px; background: #fff; text-align: left; box-shadow: 0 10px 30px #a6245012; }
.loading-main { display: flex; align-items: center; gap: 18px; }
.loading-spinner { width: 48px; height: 48px; flex: 0 0 48px; border: 5px solid #f8dfe9; border-top-color: var(--pink); border-radius: 50%; animation: loading-spin .9s linear infinite; }
.loading-copy { flex: 1; min-width: 0; }
.loading-copy h2 { margin: 0 0 7px; font-size: 23px; letter-spacing: -.4px; }
.loading-copy p { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.5; }
.loading-time { color: var(--pink); background: #fce8ef; padding: 7px 11px; border-radius: 10px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.loading-track { height: 6px; overflow: hidden; border-radius: 10px; background: #f6e8ef; margin: 22px 0 12px; }
.loading-track span { display: block; width: 35%; height: 100%; border-radius: inherit; background: var(--pink); animation: loading-travel 1.8s ease-in-out infinite; }
.loading-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 14px; color: var(--muted); }
.loading-footer button { padding: 7px 5px; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-travel { from { transform: translateX(-110%); } to { transform: translateX(390%); } }
@media (max-width: 760px) {
  .loading-panel { padding: 20px 18px 12px; }
  .loading-main { gap: 12px; align-items: flex-start; }
  .loading-spinner { width: 34px; height: 34px; flex-basis: 34px; border-width: 4px; margin-top: 3px; }
  .loading-copy h2 { font-size: 20px; }
  .loading-copy p { font-size: 15px; }
  .loading-time { font-size: 13px; padding: 5px 8px; }
  .loading-footer { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  button.is-loading::before, .loading-spinner, .loading-track span { animation: none; }
  .loading-track span { width: 100%; opacity: .45; }
}
