:root {
  --ink: #101827;
  --muted: #5b6879;
  --line: #dbe3eb;
  --soft: #f6f8fb;
  --green: #079d61;
  --green-dark: #056f47;
  --green-soft: #eaf8f1;
  --blue: #2367d8;
  --red: #e63746;
  --red-soft: #fff0f2;
  --paper: #ffffff;
  --shadow: 0 18px 44px rgba(16, 24, 39, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ytv-page {
  margin: 0;
  background: linear-gradient(180deg, #fff 0, #f7fafc 520px, #fbfcfd 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ytv-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
}

.ytv-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 950;
}

.ytv-play {
  width: 42px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--red);
  flex: 0 0 auto;
}

.ytv-play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
  margin-left: 3px;
}

.ytv-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ytv-header nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #263446;
  font-weight: 900;
  white-space: nowrap;
}

.ytv-header nav a:last-child {
  border-color: #bfead7;
  background: var(--green-soft);
  color: var(--green-dark);
}

main {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(22px, 3.2vw, 42px) 0 0;
}

.ytv-hero-copy {
  max-width: 980px;
  margin-bottom: 24px;
}

.ytv-kicker {
  width: fit-content;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 950;
}

.ytv-hero h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 78px);
  line-height: 1.08;
  font-weight: 950;
}

.ytv-hero h1::first-letter {
  color: var(--green);
}

.ytv-lead {
  max-width: 840px;
  margin: 12px 0 0;
  color: #263343;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 860;
}

.ytv-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 28px;
  align-items: start;
}

.ytv-editor,
.ytv-controls,
.ytv-player,
.ytv-info-grid article,
.ytv-section,
.ytv-faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.ytv-editor,
.ytv-controls {
  padding: clamp(18px, 2vw, 28px);
}

.ytv-template-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ytv-template-tabs button {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.ytv-template-tabs span {
  min-width: 44px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.ytv-template-tabs b {
  font-size: 18px;
  line-height: 1.2;
}

.ytv-template-tabs button.is-active {
  border-color: var(--green);
  background: #fbfffd;
  box-shadow: inset 0 0 0 2px rgba(7, 157, 97, .2);
}

.ytv-template-tabs button.is-active span {
  background: var(--green);
  color: #fff;
}

.ytv-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #233044;
  font-size: 16px;
  font-weight: 950;
}

.ytv-field + .ytv-field {
  margin-top: 16px;
}

.ytv-field small {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 900;
}

.ytv-field input,
.ytv-field textarea {
  width: 100%;
  border: 1px solid #c5d0da;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  outline: none;
}

.ytv-field input {
  min-height: 54px;
  padding: 0 14px;
}

.ytv-field textarea {
  min-height: 360px;
  padding: 16px;
  line-height: 1.78;
  resize: vertical;
}

.ytv-field input:focus,
.ytv-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 157, 97, .16);
}

.ytv-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.ytv-helper-row button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
}

.ytv-helper-row div {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.ytv-helper-row span {
  display: block;
  color: var(--blue);
  font-weight: 950;
}

.ytv-panel-head h2,
.ytv-section-head h2,
.ytv-info-grid h2,
.ytv-faq h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.25;
  font-weight: 950;
}

.ytv-panel-head p,
.ytv-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 820;
}

.voice-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.voice-style {
  min-height: 104px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 13px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.voice-style span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 950;
}

.voice-style b {
  font-size: 22px;
  line-height: 1.2;
}

.voice-style small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

.voice-style.is-active {
  border-color: var(--green);
  background: #fbfffd;
  box-shadow: inset 0 0 0 2px rgba(7, 157, 97, .22);
}

.voice-style.is-active span {
  background: var(--green);
  color: #fff;
}

.ytv-selected-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #bfead7;
  border-radius: 8px;
  background: var(--green-soft);
  color: #1f4937;
  font-weight: 850;
}

.ytv-speed {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.ytv-speed b {
  font-size: 17px;
  font-weight: 950;
}

.speed-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #c5d0da;
  border-radius: 8px;
  background: #fff;
}

.speed-row button {
  min-height: 52px;
  border: 0;
  border-right: 1px solid #c5d0da;
  background: #fff;
  color: #243142;
  font-size: 17px;
  font-weight: 920;
}

.speed-row button:last-child {
  border-right: 0;
}

.speed-row button.is-active {
  background: var(--green);
  color: #fff;
}

.ytv-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ytv-limits span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e3e9ee;
  border-radius: 8px;
  background: #fbfcfd;
  color: #3d4b5f;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.ytv-hp {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ytv-primary {
  width: 100%;
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(7, 157, 97, .24);
}

.ytv-primary:hover {
  background: var(--green-dark);
}

.ytv-primary i {
  display: inline-flex;
  width: 30px;
  height: 24px;
  background: linear-gradient(90deg, transparent 0 4px, #fff 4px 8px, transparent 8px 12px, #fff 12px 16px, transparent 16px 20px, #fff 20px 24px, transparent 24px 30px);
}

.ytv-usage-link {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #bfead7;
  border-radius: 8px;
  background: #fbfffd;
}

.ytv-usage-link span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 950;
}

.ytv-usage-link b {
  color: var(--green-dark);
  font-size: 18px;
}

.ytv-usage-link small {
  color: var(--muted);
  font-weight: 800;
}

.ytv-player {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(260px, 1fr) 180px;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 16px;
}

.ytv-player-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ytv-player-head span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 950;
}

.ytv-player-head b {
  display: block;
  color: #5b6675;
  font-size: 14px;
}

.ytv-player-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.ytv-player audio {
  width: 100%;
}

.ytv-player a {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 950;
  white-space: nowrap;
}

.ytv-player a[aria-disabled="true"] {
  border-color: var(--line);
  color: #95a1ac;
  pointer-events: none;
}

.ytv-info-grid,
.ytv-usage-grid,
.ytv-card-grid {
  display: grid;
  gap: 16px;
}

.ytv-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.ytv-info-grid article,
.ytv-section,
.ytv-faq {
  padding: clamp(18px, 2.4vw, 28px);
}

.ytv-info-grid ul {
  margin: 14px 0 0;
  padding-left: 1.2em;
  color: #364456;
  font-size: 17px;
  font-weight: 780;
}

.ytv-info-grid a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf2f6;
  color: #263343;
  font-size: 17px;
  font-weight: 900;
}

.ytv-info-grid a::after {
  content: ">";
  color: var(--muted);
}

.ytv-section,
.ytv-faq {
  margin-top: 26px;
}

.ytv-section-head {
  margin-bottom: 16px;
}

.ytv-section-head p {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-weight: 950;
}

.ytv-usage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ytv-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ytv-usage-grid article,
.ytv-card-grid article {
  min-height: 142px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ytv-usage-grid b,
.ytv-card-grid b {
  display: block;
  color: var(--green-dark);
  font-size: 21px;
  line-height: 1.25;
}

.ytv-usage-grid p,
.ytv-card-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 760;
}

.ytv-faq {
  display: grid;
  gap: 12px;
}

.ytv-faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ytv-faq summary {
  cursor: pointer;
  padding: 16px;
  font-size: 18px;
  font-weight: 950;
}

.ytv-faq p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-weight: 760;
}

.ytv-sticky-generate {
  display: none;
}

.ytv-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 34px 16px 48px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

body[data-voice-state="processing"] .ytv-primary,
body[data-voice-state="processing"] .ytv-sticky-generate {
  opacity: .72;
  cursor: wait;
}

body[data-voice-state="done"] .ytv-player {
  border-color: rgba(7, 157, 97, .55);
  box-shadow: 0 12px 28px rgba(7, 157, 97, .12);
}

body[data-voice-state="error"] .ytv-player {
  border-color: rgba(210, 55, 55, .45);
}

@media (max-width: 1180px) {
  .ytv-workspace,
  .ytv-info-grid,
  .ytv-usage-grid,
  .ytv-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ytv-player {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .ytv-header {
    min-height: 58px;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }

  .ytv-brand {
    font-size: 18px;
  }

  .ytv-header nav {
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .ytv-header nav a {
    flex: 0 1 auto;
    min-height: 34px;
    padding: 0 10px;
    font-size: 14px;
  }

  main {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

  .ytv-hero h1 {
    font-size: 39px;
  }

  .ytv-lead {
    font-size: 18px;
  }

  .ytv-workspace,
  .ytv-template-tabs,
  .voice-style-grid,
  .ytv-limits,
  .ytv-info-grid,
  .ytv-usage-grid,
  .ytv-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ytv-editor,
  .ytv-controls {
    padding: 14px;
  }

  .ytv-template-tabs button,
  .voice-style {
    min-height: 72px;
    grid-template-columns: 58px minmax(0, 1fr);
    place-items: center start;
    text-align: left;
  }

  .ytv-template-tabs span {
    width: 48px;
  }

  .ytv-field textarea {
    min-height: 270px;
    font-size: 17px;
  }

  .ytv-helper-row {
    align-items: stretch;
    flex-direction: column;
  }

  .speed-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .speed-row button {
    border-right: 0;
    border-bottom: 1px solid #c5d0da;
  }

  .speed-row button:last-child {
    border-bottom: 0;
  }

  .ytv-primary {
    min-height: 68px;
    font-size: 22px;
  }

  .ytv-sticky-generate {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-size: 18px;
    font-weight: 950;
    box-shadow: 0 14px 30px rgba(7, 157, 97, .28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
    transition: opacity .18s ease, transform .18s ease;
  }

  body[data-sticky-ready="true"] .ytv-sticky-generate,
  body[data-voice-state="processing"] .ytv-sticky-generate {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .ytv-footer {
    padding-bottom: 82px;
  }
}
