/* ALX Creator Tools: global foundations and shared components */
:root {
  --bg: #08090d;
  --surface: #111319;
  --surface-raised: #171a22;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f6f8;
  --text-muted: #9399a8;
  --violet: #9c72ff;
  --violet-bright: #b794ff;
  --cyan: #56d9e8;
  --green: #8de7ac;
  --danger: #ff7387;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --font-display: "Arial Black", "Arial Narrow", Arial, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

.site-header,
.tool-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1400px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

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

.brand__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: linear-gradient(145deg, #252937, #11131a);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.brand__name {
  font-size: 0.92rem;
}

.site-header__label,
.tool-header__meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav,
.tool-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.nav-action {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: .72rem;
}

.site-nav a:hover,
.nav-action:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.account-trigger {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-size: .72rem;
}

.account-trigger__avatar,
.profile-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  color: #0c0d11;
  background: var(--violet-bright);
  font-weight: 800;
}

.account-trigger__avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero {
  position: relative;
  isolation: isolate;
  width: min(1400px, calc(100% - 48px));
  min-height: calc(100vh - 152px);
  margin: 0 auto;
  padding: 88px 0 92px;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  content: "";
}

.hero__glow {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
}

.hero__glow--violet {
  top: 80px;
  left: 10%;
  background: var(--violet);
}

.hero__glow--cyan {
  right: 8%;
  bottom: 0;
  background: var(--cyan);
}

.hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  margin-bottom: 62px;
}

.hero__content {
  min-width: 0;
}

.eyebrow,
.tool-card__category,
.section-label {
  margin: 0 0 14px;
  color: var(--violet-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  padding: .08em .16em .12em 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: .94;
  letter-spacing: -.055em;
  overflow: visible;
  text-transform: uppercase;
}

.text-gradient {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, var(--violet-bright), var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
  padding: .02em 0.12em .08em 0;
  margin-right: -0.12em;
}

.hero__description {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  overflow-wrap: anywhere;
}

.showcase {
  width: min(100%, 520px);
  min-width: 0;
  justify-self: end;
}

.showcase__viewport {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.showcase__track {
  display: flex;
  height: 100%;
}

.showcase-slide {
  position: relative;
  display: grid;
  min-width: 100%;
  max-width: 100%;
  place-items: center;
  padding: 22px 28px 66px;
}

.showcase-lyric {
  position: relative;
  display: flex;
  width: min(58%, 250px);
  aspect-ratio: 9 / 16;
  flex-direction: column;
  justify-content: center;
  padding: 12%;
  overflow: hidden;
  color: #f7f1ff;
  background: radial-gradient(circle at 25% 20%, #4d1c73, transparent 38%), #0c0812;
  box-shadow: 0 24px 55px rgba(0,0,0,.5);
  font-family: var(--font-display);
  line-height: .9;
  text-align: center;
}

.showcase-lyric small,
.showcase-lyric i {
  position: absolute;
  right: 8%;
  left: 8%;
  color: rgba(255,255,255,.5);
  font-family: "Courier New", monospace;
  font-size: .48rem;
  font-style: normal;
  letter-spacing: .1em;
  text-align: left;
}

.showcase-lyric small { top: 5%; }
.showcase-lyric i { bottom: 5%; text-align: right; }
.showcase-lyric span { color: rgba(255,255,255,.28); font-size: clamp(1.05rem, 2.4vw, 1.8rem); }
.showcase-lyric strong { color: #d0afff; font-size: clamp(1.7rem, 2.7vw, 2.35rem); white-space: nowrap; }

.showcase-receipt {
  width: min(68%, 300px);
  padding: 30px 26px;
  color: #171713;
  background: #efede5;
  box-shadow: 0 24px 55px rgba(0,0,0,.5);
  font-family: "Courier New", monospace;
  transform: rotate(2deg);
}

.showcase-receipt > small,
.showcase-receipt > strong { display: block; text-align: center; }
.showcase-receipt > small { font-size: .55rem; letter-spacing: .1em; }
.showcase-receipt > strong { margin: 12px 0 18px; font-size: 1.25rem; }
.showcase-receipt > i { display: block; border-top: 1px dashed currentColor; }
.showcase-receipt p { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0; font-size: .62rem; }
.showcase-receipt b { font-weight: 400; }

.showcase-barcode {
  width: 72%;
  height: 34px;
  margin: 22px auto 0;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 6px, transparent 6px 9px);
}

.showcase-square {
  display: flex;
  width: min(78%, 360px);
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12%;
  color: #d9ffe4;
  background: radial-gradient(circle at 70% 25%, #1d683a, transparent 42%), #050907;
  box-shadow: 0 24px 55px rgba(0,0,0,.5);
  font-family: var(--font-display);
  line-height: .92;
  text-align: center;
}

.showcase-square small {
  margin-bottom: 28px;
  color: rgba(217,255,228,.5);
  font-family: "Courier New", monospace;
  font-size: .52rem;
  letter-spacing: .1em;
}

.showcase-square span { color: rgba(217,255,228,.3); font-size: clamp(1.15rem, 2.6vw, 2rem); }
.showcase-square strong { font-size: clamp(2rem, 4.7vw, 3.8rem); }

.showcase-poster {
  position: relative;
  display: flex;
  width: min(66%, 300px);
  aspect-ratio: 4 / 5;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(120deg, transparent 45%, rgba(86,217,232,.2) 46% 51%, transparent 52%),
    radial-gradient(circle at 25% 20%, #8c245f, transparent 35%),
    linear-gradient(145deg, #261027, #07161a);
  box-shadow: 0 28px 60px rgba(0,0,0,.52);
  font-family: var(--font-display);
  line-height: .86;
  text-align: center;
  transform: rotate(-2deg);
}

.showcase-poster small,
.showcase-poster i {
  position: absolute;
  color: rgba(255,255,255,.55);
  font-family: "Courier New", monospace;
  font-size: .5rem;
  font-style: normal;
  letter-spacing: .1em;
}

.showcase-poster small { top: 7%; left: 8%; }
.showcase-poster i { right: 8%; bottom: 7%; }
.showcase-poster span { color: rgba(255,255,255,.32); font-size: clamp(1.2rem, 2.5vw, 2rem); }
.showcase-poster strong { color: #ff9fda; font-size: clamp(2.3rem, 4.5vw, 4rem); text-shadow: 5px 5px 0 #176b73; }

.showcase-ticket {
  width: min(80%, 370px);
  padding: 32px;
  color: #f4f0e7;
  border-left: 9px solid #d94e87;
  background: #251c29;
  box-shadow: 0 26px 60px rgba(0,0,0,.5);
  font-family: "Courier New", monospace;
  transform: rotate(1.5deg);
}

.showcase-ticket > div:first-child { display: flex; flex-direction: column; }
.showcase-ticket small { color: #d7a5bd; font-size: .56rem; letter-spacing: .12em; }
.showcase-ticket strong { margin: 10px 0 5px; font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.8rem); }
.showcase-ticket span { font-size: .62rem; }
.showcase-ticket > i { display: block; margin: 24px 0; border-top: 1px dashed rgba(255,255,255,.45); }
.showcase-ticket p { display: flex; justify-content: space-between; margin: 0; }
.showcase-ticket__code { margin-top: 24px; font-size: 1.4rem; letter-spacing: .12em; text-align: center; }

.showcase-vhs {
  position: relative;
  display: flex;
  width: min(88%, 410px);
  aspect-ratio: 16 / 10;
  flex-direction: column;
  justify-content: center;
  padding: 9%;
  overflow: hidden;
  color: #fff;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.035) 3px 4px),
    linear-gradient(135deg, #13101d, #071f24);
  box-shadow: 10px 7px 0 #db4777, -9px -6px 0 #36cbd2, 0 28px 60px rgba(0,0,0,.5);
  font-family: var(--font-display);
  line-height: .82;
}

.showcase-vhs small,
.showcase-vhs i {
  position: absolute;
  color: rgba(255,255,255,.58);
  font-family: "Courier New", monospace;
  font-size: .55rem;
  font-style: normal;
}

.showcase-vhs small { top: 8%; left: 7%; }
.showcase-vhs i { right: 7%; bottom: 8%; }
.showcase-vhs span { color: rgba(255,255,255,.34); font-size: clamp(1.1rem, 2.3vw, 1.8rem); }
.showcase-vhs strong { color: #f5f5f5; font-size: clamp(2.6rem, 5vw, 4.8rem); text-shadow: 4px 0 #db4777, -4px 0 #36cbd2; }

.showcase-caption {
  position: absolute;
  right: 28px;
  bottom: 12px;
  left: 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  color: var(--text-muted);
  font-size: .66rem;
}

.showcase-caption strong { color: var(--text); font-size: .74rem; }
.showcase-caption span { text-align: right; }

.showcase__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}

.showcase__arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.showcase__arrow:hover { color: var(--text); background: rgba(255,255,255,.06); }
.showcase__arrow:focus-visible { outline: 1px solid var(--violet-bright); outline-offset: 2px; }

.showcase__dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.showcase__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.showcase__dot.is-active {
  width: 24px;
  border-radius: 5px;
  background: var(--violet-bright);
}

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

.tool-card {
  position: relative;
  display: grid;
  min-height: 560px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, transform 180ms ease;
}

.tool-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.tool-card__top {
  z-index: 2;
  display: flex;
  align-items: center;
  align-self: start;
  justify-content: space-between;
}

.tool-card__number,
.tool-card__label {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.tool-card__visual {
  position: absolute;
  top: 72px;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 40px;
  color: rgba(255, 255, 255, 0.12);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.82;
  letter-spacing: -0.08em;
  transform: rotate(-4deg);
}

.tool-card__visual span:nth-child(2) {
  color: rgba(156, 114, 255, 0.32);
  text-align: right;
}

.tool-card__visual--receipt {
  top: 58px;
  align-items: center;
  padding: 0;
  transform: rotate(5deg);
}

.tool-card__visual--lyric {
  top: 54px;
  align-items: center;
  padding: 0;
  transform: none;
}

.mini-lyric {
  position: relative;
  display: flex;
  width: 205px;
  aspect-ratio: 9 / 16;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  color: #fff;
  background: radial-gradient(circle at 30% 20%, #4c1e6b, transparent 38%), #0c0912;
  box-shadow: 12px 18px 45px rgba(0,0,0,.45);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: .9;
  text-align: center;
  transform: rotate(-2deg);
}

.mini-lyric small,
.mini-lyric i {
  position: absolute;
  right: 9%;
  left: 9%;
  color: rgba(255,255,255,.48);
  font-family: "Courier New", monospace;
  font-size: .45rem;
  font-style: normal;
  letter-spacing: .1em;
  text-align: left;
}

.mini-lyric small { top: 6%; }
.mini-lyric i { bottom: 6%; text-align: right; }
.mini-lyric p { margin: 3px 0; color: rgba(255,255,255,.28); }
.mini-lyric strong { color: #cda9ff; font-size: 2rem; }

.download-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  width: 210px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #14161d;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}

.download-menu[hidden] {
  display: none;
}

.download-menu button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: .74rem;
  text-align: left;
}

.download-menu button:hover {
  background: rgba(255,255,255,.06);
}

.download-menu small {
  color: var(--text-muted);
  font-size: .58rem;
}

.app-dialog {
  width: min(620px, calc(100% - 30px));
  max-height: min(760px, calc(100vh - 30px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  background: #111319;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}

.app-dialog::backdrop {
  background: rgba(4,5,8,.78);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1rem;
}

.dialog-header p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: .68rem;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.dialog-body {
  max-height: calc(100vh - 130px);
  padding: 18px;
  overflow-y: auto;
}

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

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.dialog-note {
  padding: 11px 12px;
  border: 1px solid rgba(86,217,232,.2);
  border-radius: 7px;
  color: var(--text-muted);
  background: rgba(86,217,232,.06);
  font-size: .68rem;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  font-size: 1.1rem;
}

.profile-head h3,
.profile-head p {
  margin: 0;
}

.profile-head p {
  color: var(--text-muted);
  font-size: .7rem;
}

.visibility-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.visibility-control label {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .7rem;
}

.visibility-control label:has(input:checked) {
  color: var(--text);
  background: var(--surface-raised);
}

.visibility-control input {
  position: absolute;
  opacity: 0;
}

.library-list {
  display: grid;
  gap: 8px;
}

.library-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c0e13;
}

.library-item strong,
.library-item span {
  display: block;
}

.library-item span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: .65rem;
}

.library-item__actions {
  display: flex;
  gap: 5px;
}

.library-item .table-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.toast-stack {
  position: fixed;
  z-index: 1200;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}

.app-toast {
  max-width: 320px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  background: #171a22;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  font-size: .72rem;
}

.mini-receipt {
  display: flex;
  width: 210px;
  min-height: 250px;
  flex-direction: column;
  gap: 18px;
  padding: 32px 25px;
  color: #111218;
  background: #efede6;
  box-shadow: 12px 18px 45px rgba(0, 0, 0, 0.4);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
}

.mini-receipt i {
  display: block;
  height: 6px;
  background: rgba(17, 18, 24, 0.18);
}

.mini-receipt i:nth-of-type(2) {
  width: 78%;
}

.mini-receipt small {
  margin-top: auto;
  font-size: 0.52rem;
}

.tool-card__content {
  z-index: 2;
  align-self: end;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(9, 10, 14, 0.82);
  backdrop-filter: blur(18px);
}

.tool-card__content h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.045em;
}

.tool-card__content p:not(.tool-card__category) {
  max-width: 480px;
  margin: 0 0 24px;
  color: var(--text-muted);
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  transition: filter 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button {
  padding: 0 16px;
}

.button:hover,
.icon-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.button--primary {
  color: #100d19;
  background: var(--violet-bright);
}

.button--secondary {
  color: #071215;
  background: var(--cyan);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.button--danger {
  border-color: rgba(255, 115, 135, 0.25);
  color: var(--danger);
  background: rgba(255, 115, 135, 0.08);
}

.button.is-active {
  border-color: var(--violet);
  color: var(--violet-bright);
  background: rgba(156, 114, 255, 0.14);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.site-footer__studio {
}

/* Shared workspace shell */
.workspace-page {
  background:
    radial-gradient(circle at 85% 0%, rgba(156, 114, 255, 0.08), transparent 30%),
    var(--bg);
}

.tool-header {
  width: calc(100% - 36px);
  max-width: none;
}

.tool-header__left,
.tool-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: color 160ms ease, border-color 160ms ease;
}

.back-link:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  min-height: calc(100vh - 78px);
  padding: 14px 18px 18px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(17, 19, 25, 0.88);
}

.panel__header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.panel__title {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}

.panel__subtitle {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.panel__body {
  padding: 18px;
}

.control-group {
  margin-bottom: 24px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label,
.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.control-description,
.field-hint {
  margin: -2px 0 10px;
  color: var(--text-muted);
  font-size: .66rem;
  line-height: 1.45;
}

.field {
  margin-bottom: 14px;
}

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

.field input,
.field select,
.field textarea,
.table-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #0c0e13;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.table-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(156, 114, 255, 0.12);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0c0e13;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
}

.segmented-control button.is-active {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

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

.button-stack .button--wide {
  grid-column: 1 / -1;
}

.preview-stage {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 28px;
  overflow: auto;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 20px 20px,
    #0b0c10;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--violet-bright);
  background: rgba(156, 114, 255, 0.08);
}

.empty-state p {
  max-width: 280px;
  margin: 0;
  font-size: 0.8rem;
}

@media (max-width: 1080px) {
  .hero__intro {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 7.5vw, 6rem);
  }

  .workspace {
    grid-template-columns: 290px 1fr;
  }

  .workspace > .panel:last-child {
    grid-column: 1 / -1;
    min-height: 620px;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .site-footer {
    width: calc(100% - 30px);
    max-width: 1400px;
  }

  .site-header__label,
  .tool-header__meta {
    display: none;
  }

  .site-nav a,
  .site-nav .nav-action,
  .account-trigger > span:last-child {
    display: none;
  }

  .account-trigger {
    padding-right: 5px;
  }

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

  .hero {
    padding: 60px 0 70px;
  }

  .hero__intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .showcase {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    justify-self: center;
  }

  .hero__content,
  .hero__description {
    width: 100%;
    max-width: 100%;
  }

  .hero__description {
    inline-size: calc(100vw - 30px);
    max-inline-size: calc(100vw - 30px);
    word-break: break-word;
  }

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

  .tool-card {
    min-height: 520px;
  }

  .workspace {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .workspace > .panel:last-child {
    min-height: 560px;
  }

  .tool-header {
    width: calc(100% - 20px);
  }

  .tool-header .brand__name {
    display: none;
  }

  .tool-header__actions .nav-action {
    display: none;
  }

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

@media (max-width: 480px) {
  .site-header {
    min-height: 66px;
  }

  .hero h1 {
    font-size: 3.1rem;
    line-height: .98;
  }

  .showcase-slide {
    padding: 16px 18px 58px;
  }

  .showcase__viewport {
    aspect-ratio: 1;
  }

  .showcase-lyric {
    width: min(54%, 200px);
  }

  .showcase-lyric strong {
    font-size: 1.65rem;
  }

  .showcase-caption {
    right: 18px;
    bottom: 8px;
    left: 18px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }

  .showcase-caption span {
    text-align: center;
  }

  .tool-card {
    min-height: 500px;
    padding: 18px;
  }

  .tool-card__content {
    padding: 18px;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
  }

  .tool-header__actions .button {
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  .tool-header__actions .button span {
    font-size: 1rem;
  }
}
