:root {
  --bg: #06090b;
  --bg-glow: rgba(34, 195, 207, 0.16);
  --bg-gradient-start: #040607;
  --bg-gradient-end: #071013;
  --paper: #0d1317;
  --surface: rgba(11, 16, 20, 0.92);
  --surface-strong: rgba(16, 23, 28, 0.98);
  --ink: #f4f7f8;
  --muted: #9aa8ae;
  --line: rgba(95, 123, 132, 0.2);
  --line-strong: rgba(105, 148, 160, 0.34);
  --accent: #22c3cf;
  --accent-deep: #53e0ea;
  --accent-soft: rgba(34, 195, 207, 0.12);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
  --phone-frame-start: #182126;
  --phone-frame-end: #07090b;
  --phone-body: #0d1113;
  --phone-ink: #edf3f5;
  --phone-muted: #9db0b8;
  --phone-accent: #58d9e4;
  --phone-lyrics: #f3f8fa;
  --phone-empty-line: rgba(255, 255, 255, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --container: 1320px;
  --mono:
    "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Courier New", monospace;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="light"] {
  --bg: #ecf3f5;
  --bg-glow: rgba(34, 195, 207, 0.14);
  --bg-gradient-start: #f5fbfc;
  --bg-gradient-end: #e5eef0;
  --paper: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --ink: #102128;
  --muted: #5d727c;
  --line: rgba(32, 65, 79, 0.12);
  --line-strong: rgba(34, 195, 207, 0.26);
  --accent: #10aab7;
  --accent-deep: #0f7f92;
  --accent-soft: rgba(16, 170, 183, 0.12);
  --shadow: 0 24px 60px rgba(14, 41, 49, 0.14);
  --phone-frame-start: #111619;
  --phone-frame-end: #020405;
  --phone-body: #0d1113;
  --phone-ink: #edf3f5;
  --phone-muted: #9db0b8;
  --phone-accent: #58d9e4;
  --phone-lyrics: #f3f8fa;
  --phone-empty-line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 68% 18%, rgba(34, 195, 207, 0.18), transparent 18%),
    radial-gradient(circle at 18% 9%, rgba(34, 195, 207, 0.08), transparent 16%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  padding: 20px 16px 36px;
}

button,
input,
textarea {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(100%, var(--container));
  max-width: var(--container);
  margin: 0 auto;
}
.workspace-bar,
.hero-copy,
.hero-note,
.composer-panel,
.preview-panel,
.disclaimer-panel,
.site-footer {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 19, 23, 0.92) 0%, rgba(7, 10, 12, 0.96) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

:root[data-theme="light"] .workspace-bar,
:root[data-theme="light"] .hero-copy,
:root[data-theme="light"] .hero-note,
:root[data-theme="light"] .composer-panel,
:root[data-theme="light"] .preview-panel,
:root[data-theme="light"] .disclaimer-panel,
:root[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 251, 253, 0.96) 100%);
}

.workspace-bar,
.hero-copy,
.hero-note,
.composer-panel,
.preview-panel,
.disclaimer-panel,
.site-footer {
  border-radius: var(--radius-xl);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(34, 195, 207, 0.18));
}

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 20px;
  background: rgba(8, 13, 17, 0.82);
}

.workspace-brand {
  flex-shrink: 0;
}

.workspace-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 24px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-note {
  padding: 24px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(34, 195, 207, 0.5);
  border-radius: 999px;
  background: rgba(4, 14, 18, 0.78);
  box-shadow: inset 0 0 0 1px rgba(11, 28, 35, 0.5);
}

:root[data-theme="light"] .eyebrow-pill {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(34, 195, 207, 0.08);
}

.hero h1,
.panel-header h2 {
  margin: 0;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-text,
.panel-header p,
.hero-note li {
  color: var(--muted);
}

.hero-text {
  max-width: 60ch;
  margin: 16px 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-highlights {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.highlight-pill {
  min-width: min(100%, 220px);
  flex: 1 1 220px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 22, 27, 0.94) 0%, rgba(10, 14, 17, 0.98) 100%);
}

:root[data-theme="light"] .highlight-pill {
  background: rgba(255, 255, 255, 0.94);
}

.hero-note {
  display: flex;
}

.info-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.info-card {
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 15, 18, 0.88);
}

:root[data-theme="light"] .info-card {
  background: rgba(255, 255, 255, 0.94);
}

.info-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.info-card h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

.format-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.format-card {
  min-width: 0;
  max-width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .format-card {
  background: rgba(16, 170, 183, 0.04);
}

.format-card strong {
  display: block;
  margin-bottom: 10px;
}

.format-card code,
.hero-note code {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 0.92em;
  -webkit-overflow-scrolling: touch;
}

.hero-note code + code {
  margin-top: 8px;
}

.hero-note ul {
  margin: 0;
  padding-left: 18px;
}

.hero-note li + li {
  margin-top: 10px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.composer-panel,
.preview-panel {
  padding: 24px;
  height: 100%;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-header > * {
  min-width: 0;
}

.panel-header p {
  margin: 8px 0 0;
  max-width: 48ch;
  line-height: 1.5;
}

.action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.action-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
  text-decoration: none;
  max-width: 100%;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #1db7c7 0%, #33d2c5 100%);
  color: #041012;
  box-shadow: 0 18px 34px rgba(34, 195, 207, 0.18);
}

.button-secondary {
  background: rgba(8, 14, 18, 0.72);
  color: var(--ink);
  border-color: var(--line-strong);
}

:root[data-theme="light"] .button-secondary {
  background: rgba(255, 255, 255, 0.84);
}

.store-button {
  border-radius: 18px;
}

.icon-button {
  width: 16px;
  height: 16px;
}

.icon-title {
  width: 18px;
  height: 18px;
  color: var(--accent-deep);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 13, 17, 0.84);
  color: var(--ink);
  padding: 14px 16px;
  outline: none;
}

:root[data-theme="light"] .field input,
:root[data-theme="light"] .field textarea {
  background: rgba(255, 255, 255, 0.92);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 195, 207, 0.14);
}

.field-large {
  margin-bottom: 0;
}

.field textarea {
  min-height: 420px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.97rem;
  line-height: 1.55;
  white-space: pre;
}

.composer-tools {
  margin-top: 14px;
}

.insert-row,
.status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.insert-row {
  margin-bottom: 12px;
}

.token-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(8, 13, 17, 0.78);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
  max-width: 100%;
}

.token-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(12, 20, 24, 0.94);
}

:root[data-theme="light"] .token-button {
  background: rgba(255, 255, 255, 0.88);
}

.icon-token {
  width: 15px;
  height: 15px;
  color: var(--accent-deep);
}

.status-chip {
  min-width: min(100%, 180px);
  flex: 1 1 180px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 15, 18, 0.88);
}

:root[data-theme="light"] .status-chip {
  background: rgba(255, 255, 255, 0.92);
}

.meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.meta-chip {
  min-width: min(100%, 220px);
  flex: 1 1 220px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 15, 18, 0.88);
}

:root[data-theme="light"] .meta-chip {
  background: rgba(255, 255, 255, 0.92);
}

.meta-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.meta-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-label {
  width: 15px;
  height: 15px;
  color: var(--accent-deep);
}

.preview-header {
  margin-bottom: 18px;
}

.phone-frame {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 14px;
  border-radius: 38px;
  background: linear-gradient(
    180deg,
    var(--phone-frame-start) 0%,
    var(--phone-frame-end) 100%
  );
  box-shadow: 0 28px 60px rgba(10, 10, 10, 0.28);
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
}

.phone-body {
  height: 700px;
  border-radius: 28px;
  padding: 22px 18px 20px;
  background: var(--phone-body);
  color: var(--phone-ink);
  display: flex;
  flex-direction: column;
}

.song-header {
  margin-bottom: 22px;
  flex-shrink: 0;
}

.song-header h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
  color: var(--phone-accent);
}

.song-header p {
  margin: 8px 0 0;
  font-size: 1rem;
  color: var(--phone-muted);
}

.song-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 6px;
}

.song-scroll-area {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--phone-accent) transparent;
}

.song-scroll-area::-webkit-scrollbar {
  width: 8px;
}

.song-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.song-scroll-area::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--phone-accent) 72%, transparent);
}

.song-line-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-section {
  color: var(--phone-muted);
  font-weight: 700;
}

.song-chords,
.song-lyrics {
  margin: 0;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.song-chords {
  color: var(--phone-accent);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
}

.song-lyrics {
  color: var(--phone-lyrics);
  font-size: 1rem;
  line-height: 1.45;
}

.empty-preview {
  padding: 20px 18px;
  border: 1px dashed var(--phone-empty-line);
  border-radius: 18px;
  color: var(--phone-muted);
  line-height: 1.6;
}

.disclaimer-panel {
  margin-top: 22px;
  padding: 16px 18px;
}

.disclaimer-label {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.disclaimer-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.3fr);
  gap: 28px;
  margin-top: 18px;
  padding: 24px 26px;
}

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-columns h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ink);
}

.footer-columns a {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  transition: color 160ms ease;
}

.footer-columns a:hover,
.footer-columns a:focus-visible {
  color: var(--ink);
}

@media (max-width: 1080px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-actions {
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

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

  .phone-frame {
    width: 100%;
    max-width: 460px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 18px 12px 28px;
  }

  .workspace-bar,
  .site-footer {
    padding: 16px;
    border-radius: 24px;
  }

  .hero-copy,
  .hero-note,
  .composer-panel,
  .preview-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .disclaimer-panel {
    padding: 16px;
    border-radius: 24px;
  }

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

  .panel-header,
  .action-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-highlights,
  .workspace-actions,
  .action-row,
  .meta-row,
  .insert-row,
  .status-row {
    width: 100%;
  }

  .highlight-pill,
  .status-chip,
  .meta-chip {
    width: 100%;
  }

  .button,
  .token-button {
    width: 100%;
  }

  .phone-body {
    height: 560px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
