:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #131720;
  --panel-2: #1a1f29;
  --field: #0d1117;
  --text: #f4f7fb;
  --muted: #a9b2bf;
  --subtle: #7d8796;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #ff8a3d;
  --accent-soft: #ffbd84;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 138, 61, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 5%, rgba(255, 190, 120, 0.08), transparent 26rem),
    linear-gradient(145deg, #07090d 0%, #090c12 48%, #08090d 100%);
  font-family: Inter, Pretendard, "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.58), transparent 92%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.96), rgba(7, 9, 13, 0.7) 76%, transparent);
  backdrop-filter: blur(14px);
}

.app-home-chip,
.app-nav-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #e5ebf4;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.app-home-chip {
  color: var(--accent);
  border-color: rgba(255, 138, 61, 0.34);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.app-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.app-nav-btn:hover,
.app-home-chip:hover {
  border-color: rgba(255, 138, 61, 0.5);
  background: rgba(255, 138, 61, 0.08);
}

.app-nav-btn.nav-featured {
  border-color: rgba(255, 138, 61, 0.6);
  background: rgba(255, 138, 61, 0.11);
  color: var(--accent-soft);
}

.app-nav-btn.is-active {
  pointer-events: none;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 54px;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 18px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-kicker,
.output-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.tool-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.tool-lead {
  max-width: 820px;
  margin: 14px 0 0;
  color: #c7d0dc;
  font-size: 16px;
  line-height: 1.72;
  word-break: keep-all;
}

.tool-privacy-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tool-privacy-badges span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 138, 61, 0.25);
  border-radius: 4px;
  background: rgba(255, 138, 61, 0.06);
  color: #d7b092;
  font-size: 11px;
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(400px, 0.9fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.settings-panel,
.output-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    rgba(15, 18, 24, 0.94);
  box-shadow: var(--shadow);
}

.settings-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.output-panel {
  position: sticky;
  top: 72px;
  min-height: 720px;
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-heading.compact {
  margin-top: 4px;
  padding-top: 12px;
}

.section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 138, 61, 0.42);
  border-radius: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-actions button,
.output-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe6ef;
  font-size: 12px;
  font-weight: 850;
}

.settings-actions button:hover,
.output-actions button:hover {
  border-color: rgba(255, 138, 61, 0.45);
  background: rgba(255, 138, 61, 0.08);
}

.status-text {
  min-height: 16px;
  margin: -7px 0 0;
  color: #d1a17e;
  font-size: 11px;
  font-weight: 750;
}

label {
  display: grid;
  gap: 7px;
  color: #d5dce6;
  font-size: 12.5px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #343b47;
  border-radius: 4px;
  outline: none;
  background: var(--field);
  color: #f3f6fa;
}

input,
select {
  min-height: 40px;
  padding: 0 11px;
}

textarea {
  padding: 11px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 138, 61, 0.62);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, 0.1);
}

.field-grid {
  display: grid;
  gap: 12px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-help,
.profile-help {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.profile-options {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 138, 61, 0.15);
  border-radius: 5px;
  background: rgba(255, 138, 61, 0.035);
}

.profile-options[hidden] {
  display: none;
}

.profile-options h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.checkbox-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c6ceda;
  font-size: 12px;
  font-weight: 700;
}

.checkbox-grid input {
  width: auto;
  min-height: auto;
  accent-color: var(--accent);
}

.output-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.output-toolbar h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}

#promptSummary {
  margin: 7px 0 0;
  color: #8f9aa8;
  font-size: 12px;
  line-height: 1.55;
}

.primary-action {
  min-height: 40px !important;
  padding: 0 15px !important;
  border-color: rgba(255, 138, 61, 0.58) !important;
  background: #fff0e4 !important;
  color: #111317 !important;
}

.prompt-output {
  min-height: 560px;
  margin-top: 18px;
  resize: vertical;
  background: #080a0d;
  color: #e9eef6;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.62;
}

.output-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #818b99;
  font-size: 11px;
}

.workflow-note {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(255, 138, 61, 0.19);
  border-radius: 5px;
  background: rgba(255, 138, 61, 0.045);
}

.workflow-note strong {
  color: var(--accent-soft);
  font-size: 12px;
}

.workflow-note p {
  margin: 7px 0 0;
  color: #abb5c2;
  font-size: 12px;
  line-height: 1.7;
  word-break: keep-all;
}

.tool-content-hub,
.adsense-slot,
.site-footer {
  margin-top: 18px;
}

@media (max-width: 1020px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .output-panel {
    position: static;
    min-height: auto;
  }

  .prompt-output {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .app-nav,
  .app-shell {
    width: min(100% - 20px, 1280px);
  }

  .app-nav {
    align-items: flex-start;
  }

  .app-nav-links {
    gap: 6px;
  }

  .app-nav-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .tool-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tool-privacy-badges {
    justify-content: flex-start;
  }

  .settings-panel,
  .output-panel {
    padding: 15px;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .output-toolbar {
    flex-direction: column;
  }

  .settings-actions,
  .output-actions {
    width: 100%;
  }

  .settings-actions button,
  .output-actions button {
    flex: 1;
  }
}
/* 2026-08-20 profile-specific UX refinement */
.app-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin: 13px 0 0;
  color: #8994a2;
  font-size: 12px;
  font-weight: 700;
}

.app-meta > a:not(.support-link) {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 900;
}

.app-meta > a:not(.support-link):hover {
  text-decoration: underline;
}

.settings-actions .settings-primary {
  border-color: rgba(255, 138, 61, 0.48);
  background: rgba(255, 138, 61, 0.11);
  color: #ffd3b0;
}

.settings-actions .settings-reset {
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #8f99a6;
}

.common-meta-grid {
  align-items: start;
}

.profile-inline-note {
  align-self: end;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

#platformField[hidden],
#ytCustomDurationField[hidden],
#ytCustomStyleField[hidden],
#igSlidesField[hidden],
#thCountField[hidden] {
  display: none !important;
}

.youtube-package-checks {
  padding-top: 2px;
}

.output-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.prompt-output {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  resize: none;
  overflow-y: auto;
  padding: 14px 15px;
  font-size: 13.5px;
  line-height: 1.72;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
}

.prompt-output::-webkit-scrollbar {
  width: 7px;
}

.prompt-output::-webkit-scrollbar-track {
  background: transparent;
}

.prompt-output::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.prompt-output::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 138, 61, 0.5);
}

.workflow-note {
  flex: 0 0 auto;
  margin-top: 14px;
}

.workflow-note ol {
  margin: 8px 0 0 18px;
  padding: 0;
  color: #abb5c2;
  font-size: 12px;
  line-height: 1.65;
}

.workflow-note li + li {
  margin-top: 3px;
}

.workflow-note li strong {
  color: #e5edf7;
}

.copy-toast {
  position: fixed;
  top: 74px;
  right: 22px;
  z-index: 20000;
  min-width: min(340px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 138, 61, 0.42);
  border-radius: 5px;
  background: rgba(14, 17, 22, 0.97);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.48);
  color: #eef3f8;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast[hidden] {
  display: none;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.copy-toast.is-error {
  border-color: rgba(255, 106, 106, 0.48);
}

.copy-toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 138, 61, 0.13);
  color: var(--accent-soft);
  font-size: 15px;
  font-weight: 950;
}

.copy-toast.is-error .copy-toast-icon {
  background: rgba(255, 106, 106, 0.12);
  color: #ff9b9b;
}

.copy-toast strong,
.copy-toast small {
  display: block;
}

.copy-toast strong {
  font-size: 12.5px;
}

.copy-toast small {
  margin-top: 3px;
  color: #9ea8b5;
  font-size: 11px;
}

.primary-action.is-copied {
  border-color: rgba(255, 138, 61, 0.65) !important;
  background: #ffd9bc !important;
}

@media (max-width: 1020px) {
  .output-panel {
    height: auto !important;
    overflow: visible;
  }

  .prompt-output {
    min-height: 430px;
    height: 430px;
    flex: none;
  }
}

@media (max-width: 760px) {
  .copy-toast {
    top: auto;
    right: 16px;
    bottom: 18px;
    left: 16px;
    min-width: 0;
  }
}

.field-grid.single-visible {
  grid-template-columns: 1fr;
}


/* 2026-08-20 v2.2 manual file save, leave guard, TTS-safe YouTube output */
.top-choice-grid > label .field-help {
  min-height: 33px;
}

.status-text.is-unsaved {
  color: #ffbd84;
}

.status-text.is-success {
  color: #aebbc9;
}

.visually-hidden-file {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.copy-toast {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  min-width: min(390px, calc(100vw - 32px));
  padding: 17px 19px;
  transform: translate(-50%, calc(-50% - 10px)) scale(0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 138, 61, 0.05);
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.copy-toast strong {
  font-size: 14px;
}

.copy-toast small {
  margin-top: 5px;
  font-size: 12px;
}

.leave-modal {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 5, 8, 0.72);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.leave-modal[hidden] {
  display: none;
}

.leave-modal.is-visible {
  opacity: 1;
}

.leave-dialog {
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 138, 61, 0.4);
  border-radius: 7px;
  background: #11151c;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.68);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.16s ease;
}

.leave-modal.is-visible .leave-dialog {
  transform: translateY(0) scale(1);
}

.leave-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.leave-dialog h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.leave-dialog > p:not(.leave-kicker) {
  margin: 11px 0 0;
  color: #aeb8c5;
  font-size: 13px;
  line-height: 1.7;
  word-break: keep-all;
}

.leave-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.leave-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  color: #e5ebf4;
  font-size: 12px;
  font-weight: 850;
}

.leave-actions .leave-primary {
  border-color: rgba(255, 138, 61, 0.52);
  background: #fff0e4;
  color: #111317;
}

.leave-actions .leave-danger {
  color: #ffb1a8;
  border-color: rgba(255, 115, 99, 0.28);
}

@media (max-width: 760px) {
  .copy-toast {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    min-width: min(360px, calc(100vw - 28px));
  }

  .leave-actions {
    flex-direction: column;
  }

  .leave-actions button {
    width: 100%;
  }
}
