:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #657083;
  --line: #d8dde7;
  --panel: #ffffff;
  --bg: #f4f6f9;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(28, 36, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

h1,
h2 {
  margin: 0 0 16px;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 22px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

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

input,
textarea,
select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 650;
}

fieldset {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  padding: 2px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.public-home {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(28, 36, 48, 0.07) 1px, transparent 1px),
    #f7f5ee;
  background-size: 38px 38px;
  padding: 28px;
}

.public-home-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(720px, 100%);
  text-align: center;
}

.public-home-logo {
  width: min(280px, 74vw);
  height: auto;
  margin-bottom: 26px;
  animation: home-logo-in 900ms ease both, home-logo-breathe 4200ms ease-in-out 950ms infinite;
}

.public-home h1 {
  max-width: 700px;
  font-size: 64px;
}

.public-home p {
  max-width: 620px;
  margin: 0 0 14px;
  color: #475166;
  font-size: 18px;
  line-height: 1.55;
}

.public-home .eyebrow {
  color: var(--accent-strong);
}

.public-home-note {
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  font-size: 15px;
}

.home-notice {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 3;
  margin: 0;
  transform: translateX(-50%);
}

.admin-corner {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 7px 10px;
  color: #657083;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.admin-corner:hover {
  background: #ffffff;
  color: var(--accent-strong);
}

.hero,
.topbar,
.panel,
.split {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 420px;
  padding: 80px 0 36px;
}

.hero p {
  max-width: 760px;
  font-size: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 16px;
}

.panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 1px 0 rgba(28, 36, 48, 0.03);
}

.narrow {
  max-width: 460px;
}

.auth {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.split {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.feature-grid div,
.version-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.feature-grid span,
.version-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.versions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.version-card {
  display: grid;
  gap: 12px;
}

.version-card form {
  margin: 0;
}

.version-card button {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  padding: 0;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 750;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: #f8fafc;
  color: var(--accent-strong);
}

.actions,
.table-actions,
.tool-group,
.copyline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.copyline {
  flex-wrap: nowrap;
}

.copyline input {
  margin: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  color: var(--ink);
  font-weight: 600;
}

.check input {
  width: auto;
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hint,
.empty {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto;
  border: 1px solid #b6e0db;
  border-radius: 8px;
  background: #edf9f7;
  padding: 14px 16px;
}

.notice.error {
  border-color: #f4b9b4;
  background: #fff1f0;
  color: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.large {
  display: grid;
  min-height: 340px;
  place-items: center;
}

.is-lab {
  overflow: hidden;
}

.lab {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 22px;
}

.sidebar h1 {
  font-size: 24px;
}

.preview-stage {
  position: relative;
  display: grid;
  overflow: auto;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(28, 36, 48, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(28, 36, 48, 0.06) 1px, transparent 1px),
    #e9edf3;
  background-size: 32px 32px;
  padding: 42px;
}

.device-frame {
  position: relative;
  width: min(var(--frame-w, 1440px), 100%);
  height: min(var(--frame-h, 900px), calc(100vh - 84px));
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: width 180ms ease, height 180ms ease, border-radius 180ms ease, padding 180ms ease;
}

.device-frame.mockup {
  border: 10px solid #111827;
  border-radius: 28px;
  padding: 0;
}

.device-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.grid-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: none;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 35, 24, 0.18) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 12.5% 100%;
}

.device-frame.show-grid .grid-overlay {
  display: block;
}

.tool-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  cursor: pointer;
  font-weight: 700;
}

.tool-button.active {
  border-color: var(--accent);
  background: #e3f5f2;
  color: var(--accent-strong);
}

@media (max-width: 900px) {
  h1 {
    font-size: 32px;
  }

  .split,
  .feature-grid,
  .lab {
    grid-template-columns: 1fr;
  }

  .lab {
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preview-stage {
    min-height: 70vh;
    padding: 20px;
  }
}

.studio-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(28, 36, 48, 0.09) 1px, transparent 1px),
    #f7f5ee;
  background-size: 48px 48px;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.studio-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.studio-loader-inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  justify-items: center;
  min-width: min(420px, calc(100vw - 40px));
  border: 1px solid rgba(28, 36, 48, 0.16);
  border-radius: 8px;
  background: rgba(251, 251, 247, 0.92);
  padding: 30px;
  box-shadow: 0 28px 90px rgba(28, 36, 48, 0.18);
}

.studio-loader img {
  width: 190px;
  height: auto;
}

.loader-logo {
  animation: loader-logo 1050ms ease-in-out both;
}

.loader-scan,
.loader-cut {
  pointer-events: none;
  position: absolute;
}

.loader-scan {
  inset: 0;
  background: linear-gradient(110deg, transparent 0 42%, rgba(15, 118, 110, 0.2) 50%, transparent 58% 100%);
  animation: loader-scan 1050ms ease-in-out both;
}

.loader-cut {
  width: 140vw;
  height: 2px;
  background: rgba(180, 35, 24, 0.34);
  transform: rotate(-12deg);
}

.loader-cut-a {
  top: 34%;
  left: -18vw;
  animation: loader-cut 780ms ease-out both;
}

.loader-cut-b {
  right: -18vw;
  bottom: 28%;
  animation: loader-cut 780ms 220ms ease-out both reverse;
}

.loader-grid {
  display: grid;
  grid-template-columns: repeat(4, 46px);
  gap: 8px;
}

.loader-grid span {
  height: 8px;
  border-radius: 99px;
  background: rgba(15, 118, 110, 0.2);
  animation: loader-bar 900ms ease-in-out infinite;
}

.loader-grid span:nth-child(2) {
  animation-delay: 120ms;
}

.loader-grid span:nth-child(3) {
  animation-delay: 240ms;
}

.loader-grid span:nth-child(4) {
  animation-delay: 360ms;
}

.studio-loader-signal,
.studio-toolbar-brand span {
  display: flex;
  gap: 7px;
}

.studio-loader-signal span,
.studio-toolbar-brand i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #0f8a7e;
}

.studio-loader-signal span:nth-child(2),
.studio-toolbar-brand i:nth-child(2) {
  background: #f2be38;
}

.studio-loader-signal span:nth-child(3),
.studio-toolbar-brand i:nth-child(3) {
  background: #b28adb;
}

.studio-loader-skip {
  border: 1px solid rgba(28, 36, 48, 0.18);
  border-radius: 6px;
  background: #fff;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 750;
}

.preload-host {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.preload-frame {
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
}

.studio-app {
  grid-template-columns: 340px minmax(0, 1fr);
  background: #f7f5ee;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 260ms ease, transform 260ms ease;
}

.studio-app.is-ready {
  opacity: 1;
  transform: scale(1);
}

.studio-sidebar {
  overflow: auto;
  border-right: 1px solid rgba(28, 36, 48, 0.14);
  background: #fbfbf7;
  padding: 22px;
}

.studio-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.studio-logo {
  display: block;
  width: 156px;
  height: auto;
  margin-bottom: 22px;
}

.studio-sidebar h1 {
  font-size: 25px;
}

.studio-section {
  margin-top: 22px;
}

.studio-section h2 {
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.version-list,
.device-pills,
.toggle-list {
  display: grid;
  gap: 8px;
}

.version-choice,
.device-pills button {
  width: 100%;
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.version-choice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px;
  text-align: left;
}

.version-choice span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #f3b936;
  color: #151311;
  font-weight: 900;
}

.version-choice strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-choice em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.version-choice.is-active,
.device-pills button.is-active,
.studio-rail button.is-active {
  border-color: #0f8a7e;
  background: #eef8f5;
}

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

.device-pills button {
  display: grid;
  gap: 2px;
  min-height: 38px;
  padding: 8px;
  font-size: 13px;
  font-weight: 800;
}

.device-pills button strong,
.device-pills button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-pills button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.toggle-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  margin: 0;
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 750;
}

.toggle-list input {
  width: auto;
  margin: 0;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.check-list strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.check-list span {
  min-width: 0;
  font-weight: 750;
}

.studio-main {
  position: relative;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
}

.studio-toolbar {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(28, 36, 48, 0.14);
  background: rgba(251, 251, 247, 0.94);
  padding: 12px 86px 12px 18px;
}

.studio-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-toolbar-brand img {
  width: 124px;
  height: auto;
}

.studio-current {
  min-width: 0;
  text-align: center;
}

.studio-current strong,
.studio-current span,
.studio-current em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-current strong {
  font-size: 15px;
}

.studio-current span,
.studio-current em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.studio-main .preview-stage {
  position: relative;
  min-height: 0;
  padding: 42px 88px 42px 42px;
  background:
    linear-gradient(90deg, rgba(28, 36, 48, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(28, 36, 48, 0.07) 1px, transparent 1px),
    #f2f1eb;
  background-size: 32px 32px;
}

.studio-app.is-dark-preview .preview-stage {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #181a1d;
}

.preview-scale-note {
  position: absolute;
  left: 42px;
  right: 94px;
  bottom: 12px;
  z-index: 8;
  margin: 0;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  color: #475166;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 12px 26px rgba(28, 36, 48, 0.1);
}

.preview-loader {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  background: rgba(242, 241, 235, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(3px);
}

.preview-loader.is-visible {
  opacity: 1;
}

.preview-loader div {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(340px, calc(100% - 40px));
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 20px 44px rgba(28, 36, 48, 0.16);
}

.preview-loader span {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(15, 118, 110, 0.18);
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: preview-spin 760ms linear infinite;
}

.preview-loader p,
.preview-loader em {
  margin: 0;
  text-align: center;
}

.preview-loader p {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.preview-loader em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.studio-main .device-shell {
  position: relative;
  display: block;
  transition: width 180ms ease, height 180ms ease;
}

.studio-main .device-frame {
  box-sizing: content-box;
  width: var(--frame-w, 1440px);
  height: var(--frame-h, 900px);
  border: 10px solid #111827;
  border-radius: 26px;
  transform: scale(var(--preview-scale, 1));
  transform-origin: top left;
  box-shadow: 0 22px 70px rgba(28, 36, 48, 0.2);
}

.studio-main .device-frame:not(.mockup) {
  border-width: 1px;
  border-radius: 4px;
}

.studio-main .device-frame.mockup {
  border-color: #151a24;
  background: #151a24;
}

.studio-main .device-frame.mockup::before,
.studio-main .device-frame.mockup::after {
  content: "";
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
}

.studio-main .device-frame.mockup.device-phone {
  border-width: 12px;
  border-radius: 36px;
}

.studio-main .device-frame.mockup.device-phone iframe {
  border-radius: 22px;
}

.studio-main .device-frame.mockup.device-phone::before {
  top: 10px;
  left: 50%;
  display: block;
  width: 92px;
  height: 22px;
  border-radius: 999px;
  background: #080a0d;
  transform: translateX(-50%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.studio-main .device-frame.mockup.device-phone::after {
  left: 50%;
  bottom: 8px;
  display: block;
  width: 118px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
}

.studio-main .device-frame.mockup.device-tablet {
  border-width: 14px;
  border-radius: 28px;
}

.studio-main .device-frame.mockup.device-tablet iframe {
  border-radius: 13px;
}

.studio-main .device-frame.mockup.device-tablet::before {
  top: 5px;
  left: 50%;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06070a;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07);
}

.studio-main .device-frame.mockup.device-desktop {
  border-width: 12px;
  border-radius: 18px;
}

.studio-main .device-frame.mockup.device-desktop::before {
  top: -8px;
  left: 18px;
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.studio-rail {
  position: absolute;
  top: 88px;
  right: 16px;
  z-index: 10;
  display: grid;
  gap: 8px;
  width: 64px;
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 8px;
  background: rgba(251, 251, 247, 0.94);
  padding: 8px;
  box-shadow: 0 18px 40px rgba(28, 36, 48, 0.12);
}

.studio-rail p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.studio-rail button {
  min-height: 38px;
  border: 1px solid rgba(28, 36, 48, 0.14);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.secure-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  background: #111827;
}

.secure-view header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(251, 251, 247, 0.96);
  padding: 10px 14px;
}

.secure-view header div {
  min-width: 0;
}

.secure-view header strong,
.secure-view header span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secure-view header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.secure-view iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.client-home {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(280px, 420px);
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin-inline: auto;
  align-items: center;
  padding: 40px 0;
}

.client-loader {
  z-index: 80;
}

.client-home {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.client-home.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.client-home.is-single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.client-home.is-locked {
  position: relative;
}

.client-home.is-locked::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 48, 0.32);
  backdrop-filter: blur(6px);
}

.client-hero,
.client-panel {
  position: relative;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 8px;
  background: #fbfbf7;
  padding: 28px;
  box-shadow: 0 22px 54px rgba(28, 36, 48, 0.11);
}

.client-hero {
  min-height: 420px;
}

.client-hero h1 {
  max-width: 680px;
  font-size: 48px;
}

.client-hero p {
  max-width: 620px;
  font-size: 18px;
}

.client-brief {
  color: var(--ink);
  font-weight: 650;
}

.client-warning,
.tour-estimate,
.mobile-advice {
  max-width: 560px;
  border-left: 3px solid #f2be38;
  background: #fff8e1;
  padding: 10px 12px;
  font-size: 14px;
}

.tour-estimate {
  margin-bottom: 0;
  border-left-color: var(--accent);
  background: #edf9f7;
}

.mobile-advice {
  display: none;
  border-left-color: #b28adb;
  background: #f5effc;
  color: #34264a;
}

.password-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: min(440px, calc(100vw - 32px));
  border: 1px solid rgba(28, 36, 48, 0.18);
  border-radius: 8px;
  background: #fbfbf7;
  padding: 24px;
  box-shadow: 0 28px 90px rgba(14, 18, 24, 0.28);
  transform: translate(-50%, -50%);
}

.password-modal h2 {
  margin-bottom: 8px;
}

.password-modal p {
  margin-top: 0;
}

.password-modal .button {
  width: 100%;
}

.password-feedback {
  display: none;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.password-feedback.is-visible,
.password-feedback.error {
  display: block;
}

.password-feedback.warning {
  border: 1px solid #f2d383;
  background: #fff8e1;
  color: #695017;
}

.password-feedback.error {
  border: 1px solid #f4b9b4;
  background: #fff1f0;
  color: var(--danger);
}

.password-note {
  color: var(--muted);
  font-size: 13px;
}

.client-version-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-version-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.client-version-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.tour-overlay.is-visible {
  opacity: 1;
}

.tour-dim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(1.5px);
}

.tour-focus {
  position: absolute;
  border: 2px solid #f2be38;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 9999px rgba(251, 251, 247, 0.68), 0 12px 36px rgba(28, 36, 48, 0.16), 0 0 0 6px rgba(242, 190, 56, 0.14);
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.tour-card {
  pointer-events: auto;
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(28, 36, 48, 0.18);
  animation: tour-card-in 180ms ease both;
}

.tour-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.tour-card p {
  margin-top: 0;
}

.tour-progress {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 999px;
  background: #edf9f7;
  padding: 0 10px;
  color: #27655f;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.tour-arrow {
  position: absolute;
  top: -9px;
  left: 28px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(28, 36, 48, 0.18);
  border-left: 1px solid rgba(28, 36, 48, 0.18);
  background: #ffffff;
  transform: rotate(45deg);
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes tour-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-logo-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes home-logo-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.015);
  }
}

@keyframes loader-scan {
  from {
    transform: translateX(-80%);
  }

  to {
    transform: translateX(80%);
  }
}

@keyframes loader-cut {
  from {
    transform: translateX(-24vw) rotate(-12deg);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  to {
    transform: translateX(24vw) rotate(-12deg);
    opacity: 0;
  }
}

@keyframes loader-bar {
  0%,
  100% {
    transform: scaleX(0.45);
    opacity: 0.45;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes loader-logo {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }

  45% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes preview-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .studio-app {
    grid-template-columns: 1fr;
    height: auto;
  }

  .studio-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(28, 36, 48, 0.14);
  }

  .studio-main {
    min-height: 72vh;
  }

  .client-home {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 680px) {
  .mobile-advice {
    display: block;
  }

  .public-home {
    padding: 20px;
  }

  .public-home-logo {
    width: min(240px, 74vw);
  }

  .public-home h1 {
    font-size: 38px;
  }

  .public-home p {
    font-size: 16px;
  }

  .client-hero h1 {
    font-size: 34px;
  }

  .studio-toolbar {
    grid-template-columns: 1fr;
    padding-right: 86px;
  }

  .studio-toolbar-brand {
    display: none;
  }

  .studio-current {
    text-align: left;
  }

  .studio-main .preview-stage {
    padding: 24px 82px 24px 16px;
  }
}
