
:root {
  --bg: #11151b;
  --bg2: #171c24;
  --panel: #171c24;
  --panel2: #202831;
  --line: #303841;
  --line2: rgba(255, 255, 255, .10);
  --text: #f2f4f7;
  --muted: #a4adb8;
  --accent: #80dfc5;
  --accent2: #b5efd9;
  --danger: #ff9b9b;
  --green: #9af3c0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 39, 72, .92);
  color: var(--text);
  padding: 11px 14px;
  outline: none;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

select option {
  color: #101827;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 18px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(50, 221, 176, .15), transparent 28%),
    radial-gradient(circle at top right, rgba(86, 149, 255, .12), transparent 26%),
    linear-gradient(180deg, #09111f, var(--bg2));
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(105, 167, 255, .10), transparent 26%),
    radial-gradient(circle at 80% 0%, rgba(147, 214, 255, .08), transparent 28%);
}

.layout {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(292px, 320px);
  gap: 18px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

.panel,
.top-panel,
.brand-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .16);
  backdrop-filter: blur(10px);
}

.top-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 39, 72, .72);
}

.language-switcher button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.language-switcher button.active {
  background: linear-gradient(90deg, #4cc3ff, #4d8dff);
  color: #061225;
}

.account-pill,
.rss-link {
  min-height: 46px;
  border-radius: 999px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(18, 39, 72, .92);
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 18px;
  align-items: center;
}

.english-intro {
  margin-top: 18px;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.brand-clock,
.clock-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(17, 38, 72, .95);
  padding: 18px;
}

.brand-clock span,
.clock-card span {
  color: var(--muted);
  font-size: 13px;
}

.brand-clock strong,
.clock-card strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1;
}

.brand-clock small,
.clock-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.tab-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.tab-bar button,
.primary-button,
.secondary-button,
.danger-button,
.mini-button,
.chip-button,
.settings-list button,
.legal-links button,
.admin-grid button {
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 42, 80, .95);
  color: var(--text);
  padding: 10px 14px;
  font-weight: 800;
}

.tab-bar button {
  min-height: 54px;
  font-size: 17px;
}

.tab-bar button.active,
.primary-button,
.chip-button.active {
  background: linear-gradient(90deg, #4cc3ff, #4d8dff);
  color: #061325;
  border-color: rgba(147, 214, 255, .72);
}

.secondary-button {
  background: rgba(18, 42, 80, .95);
}

.danger-button {
  background: rgba(88, 25, 39, .88);
  border-color: rgba(255, 155, 155, .45);
  color: #ffd6d6;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .56fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.main-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .78fr);
}

.main-stack {
  display: grid;
  gap: 18px;
}

.hero-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(76, 195, 255, .18), transparent 36%),
    var(--panel);
}

.compact-hero .section-title {
  margin-bottom: 0;
}

.hero-inner h1 {
  margin: 18px 0 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-inner > p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.now-card {
  margin-top: 22px;
  border-radius: 20px;
  background: rgba(5, 12, 24, .72);
  border: 1px solid var(--line2);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.eyebrow {
  color: rgba(226, 236, 255, .56);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
}

.now-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.now-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.hero-actions,
.button-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 12px;
}

.program-card,
.bgm-card,
.comment,
.letter,
.selected-bgm-box,
.selected-mini,
.admin-grid > div {
  min-width: 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel2);
  padding: 14px;
}

.program-card-top,
.bgm-card-head,
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.program-card h3 {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.program-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.program-actions .mini-button {
  width: 100%;
  margin-top: 0;
  min-height: 40px;
  padding: 8px 10px;
}

.mini-button.primary {
  background: linear-gradient(90deg, #4cc3ff, #4d8dff);
  color: #061325;
  border-color: rgba(147, 214, 255, .72);
}

.program-meta,
.program-bgm,
.bgm-meta,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.program-meta,
.program-bgm {
  margin-top: 10px;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chip-row.wrap {
  flex-wrap: wrap;
}

.chip-row.scroll {
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.mood-bar {
  margin-top: 12px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(76, 195, 255, .12), rgba(147, 214, 255, .04)),
    rgba(5, 12, 24, .46);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.chip-button {
  flex: 0 0 auto;
  min-height: 38px;
  font-size: 13px;
  white-space: nowrap;
}

.chip-button.small {
  min-height: 36px;
  font-size: 12px;
  padding: 8px 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.badge-cyan {
  background: rgba(76, 195, 255, .20);
  color: #dff4ff;
}

.badge-green {
  background: rgba(56, 210, 142, .16);
  color: var(--green);
}

.section-title {
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.bgm-panel {
  overflow: hidden;
}

.embedded-bgm {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 24, .58);
  padding: 14px;
}

.bgm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.bgm-grid.compact {
  grid-template-columns: 1fr;
}

.bgm-card.selected {
  outline: 2px solid rgba(147, 214, 255, .72);
}

.bgm-title {
  font-weight: 900;
  line-height: 1.35;
}

.round-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(6, 13, 26, .90);
  color: var(--text);
  font-weight: 900;
}

.mini-button.full {
  width: 100%;
  margin-top: 12px;
}

.playback-bar {
  margin-top: 10px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.playback-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent2);
}

.comment-grid,
.letter-list,
.form-stack,
.settings-list,
.legal-links {
  display: grid;
  gap: 10px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.method-card {
  min-height: 112px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(17, 38, 72, .84);
  color: var(--text);
  padding: 14px;
  text-align: left;
}

.method-card.active {
  border-color: rgba(147, 214, 255, .72);
  background: linear-gradient(135deg, rgba(76, 195, 255, .24), rgba(17, 38, 72, .88));
}

.method-card strong,
.method-card span {
  display: block;
}

.method-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.selected-bgm-box span,
.selected-mini span,
.admin-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.selected-bgm-box strong,
.selected-mini strong,
.admin-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
}

.selected-bgm-box p,
.selected-mini p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 18px;
}

.account-card {
  background:
    radial-gradient(circle at top right, rgba(154, 243, 192, .12), transparent 34%),
    var(--panel);
}

.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.account-feature-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.account-feature-grid span {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(17, 38, 72, .86);
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.email-login-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
}

.email-auth-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 12, 24, .42);
}

.email-auth-tabs button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 7px 10px;
  font-weight: 900;
  cursor: pointer;
}

.email-auth-tabs button.active {
  background: rgba(100, 180, 255, .18);
  color: var(--text);
}

.email-login-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) auto;
  gap: 10px;
  align-items: end;
}

.email-login-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.email-login-grid input {
  min-height: 42px;
  border-radius: 12px;
  padding: 9px 12px;
}

.email-login-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.email-login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 8px;
}

.email-login-actions-single {
  grid-template-columns: minmax(140px, 1fr);
}

.email-login-actions button {
  min-height: 42px;
  border-radius: 12px;
  padding: 8px 10px;
}

.text-link-button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 4px 2px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.text-link-button:disabled {
  cursor: wait;
  opacity: .55;
}

.form-message.success {
  border-color: rgba(77, 216, 148, .32);
  color: #b7f8d6;
}

.owner-empty {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(147, 214, 255, .22);
  background: rgba(5, 12, 24, .66);
  padding: 16px;
}

.owner-empty strong {
  display: block;
  font-size: 16px;
}

.owner-empty p {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.ad-stack {
  display: grid;
  gap: 10px;
}

.ad-slot {
  min-height: 144px;
  border-radius: 18px;
  border: 1px dashed rgba(147, 214, 255, .34);
  background:
    linear-gradient(135deg, rgba(105, 167, 255, .12), rgba(154, 243, 192, .06)),
    rgba(17, 38, 72, .72);
  padding: 16px;
  display: block;
}

.ad-slot.compact {
  min-height: 112px;
}

.ad-creative {
  width: 100%;
  height: 100%;
  min-height: 112px;
  border-radius: 12px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .06), transparent 34%),
    linear-gradient(135deg, rgba(76, 195, 255, .18), rgba(77, 216, 148, .10));
}

.full {
  width: 100%;
}

.seo-page {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 18% 14%, rgba(79, 184, 255, .18), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(77, 216, 148, .15), transparent 26%),
    var(--bg);
  color: var(--text);
}

.seo-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  background: rgba(17, 38, 72, .78);
}

.seo-article {
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 5vw, 46px);
  background: rgba(8, 18, 34, .9);
  box-shadow: var(--shadow);
}

.seo-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.seo-article h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.05;
}

.seo-description {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.seo-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.seo-meta div,
.seo-post-list a {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 38, 72, .64);
  padding: 13px;
}

.seo-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.seo-meta dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.seo-open-app {
  display: inline-flex;
  width: auto;
  margin-top: 24px;
  text-decoration: none;
}

.seo-post-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.seo-post-list a {
  display: grid;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.seo-post-list span {
  color: var(--muted);
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
  gap: 18px;
  margin-top: 18px;
}

.settings-list button,
.legal-links button {
  text-align: left;
  width: 100%;
}

.admin-panel {
  grid-column: 1 / -1;
}

.compact-account {
  grid-column: 1 / -1;
}

.compact-legal {
  padding: 14px;
}

.tiny-legal {
  grid-column: 1 / -1;
  padding: 9px 11px;
  border-radius: 14px;
  opacity: .78;
}

.tiny-legal:hover,
.tiny-legal:focus-within {
  opacity: 1;
}

.tiny-legal summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  list-style-position: inside;
}

.tiny-legal details[open] summary {
  color: var(--text);
}

.tiny-legal .legal-links.compact {
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.tiny-legal .legal-links.compact button {
  min-height: 34px;
  border-radius: 11px;
  padding: 7px 9px;
  font-size: 12px;
}

.tiny-legal .legal-preview {
  padding: 10px;
}

.tiny-legal .legal-preview strong {
  font-size: 13px;
}

.tiny-legal .legal-preview p {
  font-size: 12px;
  line-height: 1.5;
}

.compact-letter-card {
  padding: 11px 13px;
  border-radius: 14px;
}

.compact-letter-card summary {
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  list-style-position: inside;
}

.compact-letter-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.compact-letter-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.compact-letter-body textarea {
  min-height: 112px;
}

.legal-links.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.legal-links.compact button {
  min-height: 38px;
  border-radius: 13px;
  padding: 8px 10px;
  font-size: 13px;
}

.legal-links.compact button.active {
  border-color: rgba(147, 214, 255, .72);
  background: rgba(76, 195, 255, .18);
}

.legal-links.secondary {
  margin-top: 10px;
  opacity: .78;
}

.legal-preview {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 24, .52);
  padding: 12px;
}

.legal-preview strong {
  display: block;
  font-size: 14px;
}

.legal-preview p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dev-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 42, 80, .95);
  color: var(--text);
  padding: 9px 12px;
  text-decoration: none;
  font-weight: 800;
}

.debug-text {
  color: var(--danger);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.admin-grid button {
  margin-top: 14px;
  min-height: 40px;
  font-size: 13px;
}

.right-rail {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 18px;
  min-width: 0;
  align-self: start;
}

.rail-status {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.maintenance-banner {
  position: sticky;
  top: 10px;
  z-index: 20;
  max-width: 1500px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 190, 90, .38);
  border-radius: 22px;
  background: rgba(77, 52, 14, .74);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.notice-banner {
  position: sticky;
  top: 10px;
  z-index: 21;
  max-width: 1500px;
  margin: 0 auto 14px;
  border: 1px solid rgba(147, 214, 255, .34);
  border-radius: 22px;
  background: rgba(17, 38, 72, .92);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.notice-banner span {
  color: var(--text);
  font-weight: 800;
}

.notice-banner button {
  margin-left: auto;
  min-height: 38px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 42, 80, .95);
  color: var(--text);
  padding: 8px 12px;
  font-weight: 800;
}

.form-message {
  margin: 12px 0 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 24, .58);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-message.error {
  border-color: rgba(255, 155, 155, .34);
  color: var(--danger);
}

.file-field {
  margin: 12px 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.file-field input {
  min-height: 48px;
}

.form-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.settings-list button:disabled,
.admin-grid button:disabled {
  cursor: not-allowed;
  opacity: .54;
}

.maintenance-banner span {
  color: var(--muted);
}

.maintenance-banner button {
  margin-left: auto;
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 42, 80, .95);
  color: var(--text);
  padding: 8px 12px;
  font-weight: 800;
}

.min-w-0 {
  min-width: 0;
}

.small-text {
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 961px) and (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  .program-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .app-shell {
    padding: 16px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
  }

  .top-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .brand-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(210px, .55fr);
  }

  .right-rail {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: 1fr 1fr;
  }

  .main-grid,
  .main-grid.two,
  .settings-grid,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .bgm-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ad-slot {
    min-height: 120px;
  }
}

@media (min-width: 821px) and (max-width: 960px) {
  .main-grid,
  .main-grid.two,
  .settings-grid,
  .inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px 12px 88px;
  }

  .top-panel {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: stretch;
  }

  .language-switcher,
  .account-pill {
    width: 100%;
  }

  .language-switcher button {
    flex: 1;
  }

  .account-pill,
  .rss-link {
    border-radius: 14px;
  }

  .brand-panel {
    grid-template-columns: 1fr;
  }

  .tab-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding: 8px;
    overflow-x: visible;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(8, 18, 34, .97);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .34);
    backdrop-filter: blur(12px);
  }

  .tab-bar button {
    min-height: 44px;
    border-radius: 12px;
    padding: 7px 5px;
    font-size: 13px;
  }

  .now-card {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-grid.wide,
  .email-login-grid,
  .method-grid,
  .account-feature-grid,
  .admin-grid,
  .seo-meta,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .email-login-actions {
    grid-template-columns: 1fr;
  }

  .bgm-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .program-grid,
  .bgm-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .button-line {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

/* ---- Site footer (運営情報リンク群) ---- */
.site-footer {
  position: relative;
  margin-top: 28px;
  padding: 22px 18px 32px;
  border-top: 1px solid var(--line);
  background: rgba(8, 18, 34, .72);
  color: var(--muted);
}

.site-footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 24px;
  align-items: center;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer-brand strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: .02em;
}

.site-footer-brand span {
  font-size: 13px;
  color: var(--muted);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-footer-links button {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 39, 72, .78);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.site-footer-links button:hover,
.site-footer-links button:focus-visible {
  border-color: var(--accent);
  background: rgba(18, 39, 72, .98);
  outline: none;
}

.site-footer-copy {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  opacity: .85;
}

.subpage-shell .site-footer {
  margin-top: 32px;
}

/* ---- Subpage shell ---- */
.subpage-shell {
  padding-bottom: 24px;
}

.subpage-layout {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 0 0;
}

.subpage {
  display: grid;
  gap: 18px;
}

.subpage-header {
  display: grid;
  gap: 10px;
}

.subpage-back {
  justify-self: start;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

.subpage-title {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: .01em;
}

.subpage-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.subpage-note {
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 200, 120, .35);
  background: rgba(80, 55, 18, .35);
  color: #ffe6c0;
  font-size: 13px;
  line-height: 1.6;
}

.subpage-grid {
  display: grid;
  gap: 16px;
}

.subpage-card {
  display: grid;
  gap: 10px;
}

.subpage-card h2 {
  margin: 0;
}

.subpage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.subpage-success {
  border-color: rgba(154, 243, 192, .45);
  background: linear-gradient(180deg, rgba(20, 60, 44, .55), rgba(10, 20, 36, .92));
}

/* ---- Meta list (About) ---- */
.meta-list {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.meta-list > div {
  display: contents;
}

.meta-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding-top: 2px;
}

.meta-list dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
}

.link-button {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent2);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  color: #cfe7ff;
  outline: none;
}

/* ---- Contact form ---- */
.contact-form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.required-mark {
  color: var(--danger);
  margin-left: 2px;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 155, 155, .45);
  background: rgba(80, 18, 28, .55);
  color: #ffd6d6;
  font-size: 14px;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(105, 167, 255, .25);
}

/* ---- Legal tabs / document ---- */
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 42, 80, .85);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.legal-tabs button.active {
  background: linear-gradient(90deg, #4cc3ff, #4d8dff);
  color: #061325;
  border-color: rgba(147, 214, 255, .72);
}

.legal-tabs button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(105, 167, 255, .35);
}

.legal-document {
  padding: 22px 22px 26px;
}

/* ---- Minimal markdown styling ---- */
.md-body {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

.md-body .md-h1 {
  margin: 6px 0 4px;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: .01em;
}

.md-body .md-h2 {
  margin: 14px 0 2px;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--accent2);
}

.md-body .md-h3 {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--accent2);
}

.md-body .md-p {
  margin: 0;
  color: var(--text);
}

.md-body .md-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
}

.md-body .md-list li {
  line-height: 1.75;
}

@media (max-width: 820px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-links {
    justify-content: flex-start;
  }

  .subpage-layout {
    padding: 4px 4px 0;
  }

  .meta-list {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .meta-list dt {
    padding-top: 8px;
  }
}

/* ------------------------------------------------------------------ */
/* YouTubeライク視聴体験 v3: サムネイル付きカード / 番組詳細 / チャンネル / コメント */
/* ------------------------------------------------------------------ */

.program-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.program-card-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.program-card h3 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.4;
}

.program-title-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.program-title-link:hover {
  color: var(--accent2);
}

.program-thumb-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.program-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(10, 24, 48, .9);
  overflow: hidden;
}

.program-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.program-thumb.large {
  border-radius: 16px;
  border: 1px solid var(--line);
}

.program-thumb.thumb-auto {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.program-thumb.thumb-auto .thumb-genre {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  background: rgba(6, 14, 28, .42);
  border-radius: 999px;
  padding: 3px 10px;
}

.program-thumb.thumb-auto .thumb-title {
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .42);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.program-thumb.large.thumb-auto .thumb-title {
  font-size: 24px;
  -webkit-line-clamp: 3;
}

.thumb-g0 { background: linear-gradient(135deg, #16336b, #0e6f64); }
.thumb-g1 { background: linear-gradient(135deg, #243a8c, #6a3d9c); }
.thumb-g2 { background: linear-gradient(135deg, #0c4a6e, #1d7fb8); }
.thumb-g3 { background: linear-gradient(135deg, #5b2d62, #a8456b); }
.thumb-g4 { background: linear-gradient(135deg, #14532d, #3f8e4f); }
.thumb-g5 { background: linear-gradient(135deg, #7c4a16, #b8762a); }

.channel-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #061325;
  font-weight: 900;
  flex: none;
  line-height: 1;
}

.program-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.channel-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-link:hover {
  color: var(--accent2);
}

.channel-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card-stats {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.program-card .program-actions {
  margin-top: auto;
  padding-top: 12px;
}

/* 番組詳細ビュー */
.watch-layout {
  max-width: 980px;
}

.program-detail-stack,
.channel-stack {
  display: grid;
  gap: 14px;
}

.detail-back {
  justify-self: start;
}

.program-detail .detail-title {
  margin: 14px 0 0;
  font-size: 26px;
  line-height: 1.35;
}

.detail-meta-row {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.detail-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.detail-channel-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 4px;
  cursor: pointer;
  min-width: 0;
}

.detail-channel-button.as-text {
  cursor: default;
}

.detail-channel-button:not(.as-text):hover strong {
  color: var(--accent2);
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-description {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 24, 48, .55);
  padding: 12px 14px;
}

.detail-description p {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

/* コメント */
.comment-form {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-login-prompt {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.comment-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.comment-item {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.comment-content {
  min-width: 0;
  flex: 1;
}

.comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-head strong {
  font-size: 14px;
}

.comment-content p {
  margin: 4px 0 0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-delete {
  margin-top: 0;
}

/* チャンネル */
.channel-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.channel-header-row h1 {
  margin: 0;
  font-size: 24px;
}

.channel-bio {
  margin: 6px 0 0;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.avatar-color-row {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.avatar-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-color-option {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.avatar-color-option.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

/* Shared listening shell, creator tools, and accessible playback. */
html { color-scheme: dark; scroll-padding-top: 140px; }
body { background: var(--bg); }
button, input, textarea, select, h1, h2, h3, .eyebrow { letter-spacing: 0; }
button { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .6; }
button svg, a svg { flex: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px #80dfc522; }
input, textarea, select { border-radius: 6px; background: #1b222a; font-size: 15px; }
select option { color: var(--text); background: #1b222a; }
.app-shell { padding: 0; background: var(--bg); overflow-x: clip; }
.app-bg { display: none; }
.app-header { position: sticky; top: 0; z-index: 30; background: #11151bf5; border-bottom: 1px solid var(--line); }
.app-header-inner { max-width: 1420px; min-height: 76px; padding: 12px 36px; margin: auto; display: grid; grid-template-columns: 225px minmax(180px, 520px) auto; align-items: center; gap: 24px; }
.brand-home { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--text); background: transparent; border: 0; padding: 0; }
.brand-home strong { font-size: 26px; font-weight: 750; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #102820; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #1b222a; padding: 0 12px; border-radius: 6px; color: var(--muted); min-width: 0; }
.search-field input { background: transparent; border: 0; padding: 10px 0; min-height: 42px; box-shadow: none; }
.search-field:focus-within { border-color: var(--accent); }
.top-actions { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 14px; align-items: center; justify-self: end; width: auto; }
.language-switcher { display: inline-flex; width: max-content; max-width: none; border: 0; border-radius: 6px; padding: 3px; gap: 1px; background: #1b222a; flex: none; }
.language-switcher button { flex: none; width: auto; white-space: nowrap; background: transparent; color: var(--muted); border: 0; font-size: 12px; min-height: 32px; padding: 5px 9px; border-radius: 4px; }
.language-switcher button.active { background: #34443f; color: var(--accent2); }
.account-pill { display: inline-flex; gap: 7px; align-items: center; border-radius: 6px; background: #222b33; border: 1px solid var(--line); color: var(--text); padding: 8px 12px; min-height: 38px; font-size: 13px; }
.tab-bar { position: sticky; top: 76px; z-index: 25; display: flex; justify-content: center; gap: 32px; padding: 0 24px; margin: 0; background: #11151bf5; border-bottom: 1px solid var(--line); border-radius: 0; }
.tab-bar button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; flex: none; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 16px 8px; min-height: 54px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tab-bar button.active { color: var(--accent); border-color: var(--accent); background: transparent; box-shadow: none; }
.layout { max-width: 1420px; padding: 32px 36px 0; grid-template-columns: minmax(0, 1fr) 246px; gap: 36px; }
.main-content, .main-stack, .listen-stack, .settings-grid { min-width: 0; display: grid; gap: 32px; }
.panel { background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; min-width: 0; }
.section-title { margin-bottom: 18px; gap: 16px; align-items: center; }
.section-title h2, .view-heading h1 { font-size: 22px; line-height: 1.4; margin: 0; font-weight: 700; }
.section-title p { font-size: 13px; color: var(--muted); margin-top: 7px; }
.view-heading { display: flex; align-items: center; justify-content: space-between; }
.badge { border-radius: 4px; padding: 4px 7px; background: #26303a; color: #bec8d1; font-size: 11px; }
.badge-green { background: #213e32; color: #ade9cb; }
.badge-cyan { background: #1e3640; color: #afdce9; }
.primary-button, .secondary-button, .mini-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; font-size: 13px; font-weight: 650; border-radius: 6px; padding: 10px 14px; max-width: 100%; }
.primary-button, .mini-button.primary { background: var(--accent); border: 1px solid var(--accent); color: #10241e; box-shadow: none; }
.primary-button:hover, .mini-button.primary:hover { background: #a8edd6; }
.secondary-button, .mini-button { color: var(--text); background: #242d36; border: 1px solid #34404a; }
.secondary-button:hover, .mini-button:hover { border-color: #667a83; }
.danger-button { border-radius: 6px; background: #3c2328; font-size: 13px; }
.text-link-button { display: inline-flex; align-items: center; gap: 7px; color: var(--accent2); font-size: 13px; padding: 7px 0; border: 0; background: transparent; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; flex: none; }
.icon-button:hover { color: var(--text); background: #2b343e; }
.featured-episode { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding-bottom: 30px; border-bottom: 1px solid var(--line); align-items: center; }
.featured-cover { border-radius: 6px; overflow: hidden; }
.featured-cover .program-thumb { aspect-ratio: 1; }
.featured-info { min-width: 0; }
.featured-info .eyebrow { color: var(--accent); text-transform: none; font-size: 12px; font-weight: 650; }
.featured-info h2 { font-size: 26px; line-height: 1.5; margin: 10px 0; overflow-wrap: anywhere; }
.featured-info p { color: #b7c0ca; font-size: 14px; line-height: 1.8; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.featured-meta { margin: 14px 0 18px; font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.featured-info .program-actions > button { flex: none; width: auto; }
.program-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
.program-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; min-width: 0; overflow: visible; }
.program-card-body { padding: 12px 0 0; gap: 2px; }
.program-card h3 { font-size: 15px; font-weight: 650; margin: 0; line-height: 1.6; min-height: 48px; }
.program-title-link { font-weight: 650; }
.program-thumb { border-radius: 6px; }
.program-thumb.thumb-auto { background-image: none; gap: 10px; padding: 20px; justify-content: end; }
.thumb-g0 { background-color: #244b42 !important; }
.thumb-g1 { background-color: #48506e !important; }
.thumb-g2 { background-color: #2e5165 !important; }
.thumb-g3 { background-color: #80514f !important; }
.thumb-g4 { background-color: #4c624e !important; }
.thumb-g5 { background-color: #77633e !important; }
.thumb-symbol { position: absolute; right: 16px; top: 16px; color: #ffffff70; }
.program-thumb.thumb-auto .thumb-genre { background: #00000025; font-size: 10px; border-radius: 3px; padding: 3px 6px; }
.program-thumb.thumb-auto .thumb-title { font-size: 17px; line-height: 1.6; text-shadow: none; padding-right: 12px; font-weight: 650; }
.thumb-duration { position: absolute; right: 8px; bottom: 8px; color: #fff; background: #11151bbd; padding: 2px 5px; font-size: 10px; border-radius: 3px; }
.program-channel-row { margin-top: 3px; }
.program-card-stats { margin-top: 5px; gap: 10px; font-size: 11px; }
.program-meta { color: var(--muted); font-size: 11px; margin-top: 5px; }
.program-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.program-card .program-actions { padding-top: 14px; }
.program-card .mini-button { min-height: 34px; padding: 7px 9px; font-size: 11px; }
.section-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 22px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 10px; font-size: 12px; }
.section-more:hover { color: var(--text); background: #1c232a; }
.right-rail { position: sticky; top: 164px; align-self: start; display: grid; gap: 28px; max-height: calc(100vh - 180px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 10px; }
.queue-section .section-title h2 { font-size: 16px; }
.queue-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 0; text-align: left; color: var(--text); border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.queue-item > div { min-width: 0; flex: 1; }
.queue-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.7; }
.queue-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-index { color: #779c8d; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.queue-item:hover strong { color: var(--accent); }
.posting-summary { border-top: 1px solid var(--line); padding-top: 20px; }
.posting-summary h2 { font-size: 16px; }
.selected-mini { background: transparent; border: 0; border-radius: 0; padding: 0; }
.selected-mini small { color: var(--muted); }
.ad-slot, .ad-slot.compact { border-radius: 4px; background: #171d24; border: 1px solid #222c35; padding: 0; min-height: 72px; }
.ad-slot .ad-creative { background: #1a232a; border-radius: 3px; height: 100%; min-height: 70px; }
.ad-slot.compact, .ad-slot.compact .ad-creative { min-height: 110px; }
.ad-stack { gap: 14px; }
.owner-empty { border: 1px dashed #39434e; border-radius: 6px; padding: 32px 24px; display: grid; justify-items: start; gap: 12px; background: #151b22; }
.owner-empty strong { font-size: 16px; }
.owner-empty p { margin: 0; font-size: 13px; line-height: 1.8; }
.browse-filters { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.browse-filters label { display: flex; align-items: center; gap: 9px; }
.browse-filters select { width: auto; min-width: 130px; min-height: 38px; padding: 7px 10px; font-size: 13px; }
.hero-card, .compact-hero { background: transparent; border: 0; padding: 0; border-radius: 0; }
.auth-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; color: var(--text); background: #1a2129; border: 1px solid #46505a; border-radius: 8px; padding: 26px; }
.auth-dialog::backdrop { background: #080d13c9; }
.auth-dialog-heading { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 24px; }
.auth-dialog-heading h2 { margin: 0; font-size: 22px; }
.auth-dialog-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.auth-dialog .email-login-panel { padding: 0; background: transparent; border: 0; }
.auth-dialog .email-login-grid { grid-template-columns: 1fr; gap: 18px; }
.auth-dialog .email-login-grid label { font-size: 13px; }
.auth-dialog .email-login-actions, .auth-dialog .email-login-actions button { width: 100%; }
.email-auth-tabs { background: #11181f; border-radius: 6px; margin-bottom: 22px; }
.email-auth-tabs button { min-height: 36px; border-radius: 4px; font-size: 13px; }
.email-auth-tabs button.active { background: #34443f; color: var(--accent2); }
.notice-banner { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100% - 32px); margin: 0; background: #283b33; border: 1px solid #50786a; border-radius: 6px; gap: 14px; padding: 10px 14px; font-size: 13px; pointer-events: none; }
.notice-banner button { pointer-events: auto; }
.has-player .notice-banner { bottom: 114px; }
.form-message { font-size: 13px; background: #213830; border-radius: 6px; line-height: 1.8; }
.form-message.error { background: #3b242b; color: #ffbbb9; }
.form-stack { gap: 22px; }
.form-stack label span, .file-field > span { font-size: 13px; }
.method-grid { gap: 10px; }
.method-card { border: 1px solid var(--line); border-radius: 6px; background: #1a222a; padding: 16px; }
.method-card.active { background: #213931; border-color: #7ecdaf; }
.method-card strong { font-size: 14px; }
.method-card span { font-size: 12px; line-height: 1.7; }
.selected-bgm-box, .embedded-bgm { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 20px 0 0; }
.selected-bgm-box p { font-size: 12px; color: var(--muted); }
.bgm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bgm-card { background: #1a232b; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.bgm-card.selected { background: #20352e; border-color: #75b49b; }
.bgm-title { font-size: 14px; }
.bgm-meta { font-size: 11px; }
.round-button { border-radius: 6px; min-width: 36px; width: 36px; height: 36px; padding: 0; color: var(--text); background: #2d3940; border: 0; }
.mood-bar { gap: 7px; padding: 8px 0; }
.chip-button, .chip-button.small { border-radius: 5px; color: var(--muted); background: #232d35; border: 1px solid transparent; font-size: 12px; }
.chip-button.active { color: var(--accent2); background: #29443b; border-color: #477e69; }
.settings-list { gap: 16px; }
.setting-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.setting-row input[type="range"] { width: 100%; }
.setting-toggle { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; font-size: 13px; align-items: center; }
.setting-toggle input { width: 34px; height: 18px; min-height: 0; accent-color: var(--accent); }
.account-card, .channel-settings-card { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.compact-letter-card, .tiny-legal { border-top: 1px solid var(--line); padding-top: 16px; }
.compact-letter-card summary, .tiny-legal summary { font-size: 12px; color: var(--muted); }
.legal-links.compact button { border-radius: 4px; font-size: 11px; background: transparent; }
.legal-preview { border-radius: 0; border: 0; background: transparent; padding: 14px 0; font-size: 12px; }
.site-footer { max-width: 1420px; margin: 48px auto 0; padding: 24px 36px 32px; background: transparent; border: 0; }
.site-footer-inner { border-top: 1px solid var(--line); padding-top: 20px; gap: 16px; }
.site-footer-brand strong { font-size: 13px; }
.site-footer-brand span, .site-footer-copy, .site-footer-links button { font-size: 11px; color: #8c98a4; }
.site-footer-links { gap: 14px; }
.site-footer-links button { padding: 4px 0; background: transparent; border: 0; }
.subpage-layout { max-width: 960px; padding: 32px 36px 0; }
.subpage-layout.watch-layout { max-width: 1040px; }
.program-thumb.large { border-radius: 6px; border: 0; max-height: 400px; }
.program-detail .detail-title { font-size: 24px; }
.detail-description { border-radius: 0; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 20px 0; }
.legal-tabs button { border-radius: 5px; background: #242d36; }
.legal-tabs button.active { background: #29443b; color: var(--accent2); }
.about-value-card { border-radius: 6px; background: #1a232b; }
.md-body .md-h1 { font-size: 26px; }
.md-body .md-h2 { font-size: 20px; }
.player-bar { position: fixed; z-index: 35; inset: auto 0 0; display: grid; grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr) 120px; align-items: center; gap: 24px; min-height: 88px; padding: 14px 36px; background: #1c282bf7; border-top: 1px solid #3a5652; }
.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-track > svg { flex: none; color: var(--accent); }
.player-track > div { min-width: 0; }
.player-title { display: block; background: transparent; border: 0; padding: 0; text-align: left; color: var(--text); font-size: 13px; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.player-track small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-play { background: var(--accent); color: #10241e; border-radius: 50%; }
.player-progress { display: grid; gap: 4px; }
.player-progress span { font-variant-numeric: tabular-nums; font-size: 10px; color: var(--muted); text-align: center; }
.player-volume { display: flex; align-items: center; gap: 8px; }
input[type="range"] { padding: 0; border: 0; accent-color: var(--accent); background: transparent; min-height: 20px; box-shadow: none; }
.player-speech-label { color: var(--muted); font-size: 12px; }
.has-player { padding-bottom: 88px; }
@media (min-width: 1600px) { .program-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) {
  .app-header-inner { grid-template-columns: 175px minmax(120px, 1fr) auto; gap: 16px; padding: 12px 24px; }
  .layout { grid-template-columns: minmax(0, 1fr) 218px; gap: 24px; padding: 28px 24px 0; }
  .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-episode { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .featured-info h2 { font-size: 22px; }
  .player-bar { gap: 16px; padding: 14px 24px; grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr); }
  .player-volume { display: none; }
}
@media (max-width: 850px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .right-rail { display: none; }
  .app-header-inner { grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; }
  .brand-home strong { font-size: 22px; }
  .top-actions { gap: 8px; }
  .account-pill span { display: none; }
  .account-pill { padding: 8px; width: 36px; height: 36px; min-height: 36px; justify-content: center; }
  .featured-episode { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 128px; }
  .app-shell { padding-bottom: 74px; }
  .app-header-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 116px; padding: 12px 16px; gap: 12px; }
  .brand-home strong { font-size: 22px; }
  .brand-mark { width: 30px; height: 30px; }
  .search-field { grid-row: 2; grid-column: 1 / -1; }
  .search-field input { min-height: 36px; font-size: 13px; }
  .language-switcher button { min-height: 30px; padding: 4px 7px; }
  .language-switcher { width: auto; }
  .tab-bar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; padding: 4px 8px max(7px, env(safe-area-inset-bottom)); gap: 0; justify-content: space-around; border-top: 1px solid var(--line); border-bottom: 0; }
  .tab-bar button { flex: 1; gap: 5px; flex-direction: column; min-height: 55px; padding: 7px 2px; border: 0; font-size: 10px; }
  .tab-bar button.active { color: var(--accent); }
  .layout { padding: 24px 16px 0; }
  .main-stack, .main-content, .settings-grid { gap: 26px; }
  .view-heading h1, .section-title h2 { font-size: 20px; }
  .featured-episode { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; padding-bottom: 24px; }
  .featured-info h2 { font-size: 18px; line-height: 1.5; margin: 8px 0; }
  .featured-info p { display: none; }
  .featured-info .eyebrow { font-size: 10px; }
  .featured-meta { font-size: 10px; margin: 8px 0 12px; gap: 6px; }
  .featured-info .program-actions { grid-column: 1 / -1; }
  .featured-info .text-link-button { display: none; }
  .featured-info .mini-button { padding: 7px 8px; font-size: 11px; min-height: 34px; }
  .program-grid { gap: 22px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-thumb.thumb-auto { padding: 12px; }
  .program-thumb.thumb-auto .thumb-title { font-size: 12px; -webkit-line-clamp: 2; line-height: 1.5; padding-right: 0; margin-bottom: 14px; }
  .thumb-symbol { display: none; }
  .thumb-genre { display: none; }
  .program-card h3 { font-size: 13px; min-height: 40px; }
  .program-channel-row { gap: 6px; }
  .channel-link, .channel-name { font-size: 11px; }
  .program-card-stats, .program-meta { font-size: 10px; }
  .program-card .mini-button { padding: 7px 6px; font-size: 10px; gap: 4px; }
  .program-card .mini-button svg { width: 13px; height: 13px; }
  .featured-cover .program-thumb { aspect-ratio: 1; }
  .featured-cover .thumb-title { display: none !important; }
  .featured-cover .thumb-symbol { display: block; inset: 0; margin: auto; width: 36px; height: 36px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-card { display: grid; gap: 4px; text-align: left; }
  .form-grid, .form-grid.wide, .bgm-grid { grid-template-columns: 1fr; }
  .setting-row { grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
  .site-footer { margin-top: 36px; padding: 24px 16px 28px; }
  .site-footer-inner { display: grid; grid-template-columns: 1fr; }
  .site-footer-links { justify-content: flex-start; gap: 12px; }
  .subpage-layout, .subpage-layout.watch-layout { padding: 24px 16px 0; }
  .program-detail .detail-title { font-size: 22px; }
  .player-bar { bottom: 66px; min-height: 74px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 16px; }
  .player-progress { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .player-speech-label { display: none; }
  .player-track { gap: 8px; }
  .player-track > svg { width: 19px; }
  .player-title { font-size: 12px; }
  .has-player { padding-bottom: 175px; }
  .notice-banner { bottom: 82px; }
  .has-player .notice-banner { bottom: 176px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (max-width: 350px) {
  .app-header-inner { padding: 12px; gap: 8px; }
  .brand-home { gap: 6px; }
  .brand-home strong { font-size: 20px; }
  .language-switcher button { padding: 4px 5px; font-size: 11px; }
  .top-actions { gap: 6px; }
}

@media (max-width: 520px) {
  .detail-channel-row {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions .primary-button {
    width: 100%;
  }

  .channel-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Social listening: compact feeds, library actions and a script-first composer. */
.brand-mark { background: transparent; border-radius: 0; flex: none; }
.brand-home strong { font-size: 23px; font-weight: 800; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.quick-create { padding: 9px 14px; font-size: 12px; min-height: 38px; }
.feed-switcher { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.feed-switcher button { color: var(--muted); border: 0; background: transparent; border-radius: 4px; min-height: 38px; padding: 8px 13px; font-size: 13px; white-space: nowrap; }
.feed-switcher button:hover { background: #252c30; color: var(--text); }
.feed-switcher button.active { background: #8ce2bd; color: #102820; font-weight: 700; }
.program-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.program-tools .icon-button { width: 32px; height: 34px; min-height: 34px; padding: 6px; }
.program-tools .is-saved { color: #8ce2bd; background: #243c32; }
.program-card .program-actions { flex-wrap: nowrap; gap: 4px; }
.program-thumb .default-cover-art { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.thumb-g1 .default-cover-art { transform: scale(1.25); transform-origin: 15% 50%; }
.thumb-g2 .default-cover-art { transform: scale(1.35); transform-origin: 85% 50%; }
.thumb-g3 .default-cover-art { transform: scaleX(-1); }
.thumb-g4 .default-cover-art { transform: scale(1.45); transform-origin: 50% 20%; }
.thumb-g5 .default-cover-art { transform: scale(1.3); transform-origin: 65% 65%; }
.program-thumb.thumb-auto .thumb-genre { position: relative; color: #f3f6f4; background: #11151bcf; }
.program-thumb.thumb-auto .thumb-title { position: relative; display: -webkit-box; max-width: 94%; background: #11151bcf; color: #fff; font-size: 14px; line-height: 1.6; padding: 4px 8px; border-radius: 2px; margin-bottom: 15px; }
.thumb-duration { z-index: 1; }
.featured-cover .thumb-title { display: none !important; }
.featured-cover .thumb-genre { display: none; }
.composer-script textarea { min-height: 170px; font-size: 15px; padding: 16px; line-height: 1.9; }
.composer-script small { text-align: right; }
.form-stack label small, .cover-paused { color: var(--muted); font-size: 11px; line-height: 1.8; }
.composer-options { border-top: 1px solid var(--line); padding-top: 15px; }
.composer-options summary { font-size: 13px; cursor: pointer; }
.composer-options .form-grid { padding-top: 16px; }
.library-settings { border-top: 1px solid var(--line); padding-top: 20px; }
.library-settings h2 { font-size: 15px; }
@media (max-width: 600px) {
  .brand-home strong { font-size: 20px; }
  .feed-switcher { gap: 4px; }
  .feed-switcher button { font-size: 11px; padding: 7px 9px; min-height: 34px; }
  .program-thumb.thumb-auto .thumb-title { font-size: 11px; padding: 3px 5px; line-height: 1.5; }
  .program-tools .icon-button { width: 28px; height: 32px; min-height: 32px; padding: 5px; }
  .program-tools svg { width: 16px; }
  .featured-info .program-actions { flex-wrap: wrap; gap: 8px; }
  .featured-info .program-tools { margin-left: 0; }
  .quick-create { font-size: 11px; min-height: 34px; padding: 7px 10px; }
}
