@font-face {
  font-family: "Pacifico";
  src: url("assets/Pacifico-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05080d;
  --panel: rgba(14, 22, 20, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4efe4;
  --muted: #98a59e;
  --muted-2: #6d7a73;
  --gold: #f3c86b;
  --gold-bright: #ffdd96;
  --gold-deep: #c28c34;
  --mint: #7fe3b0;
  --red: #e25c4a;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --script: "Pacifico", "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
  --shadow-lg: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(46% 40% at 16% 2%, rgba(31, 122, 86, 0.3), transparent 70%),
    radial-gradient(40% 44% at 92% 8%, rgba(152, 101, 32, 0.16), transparent 70%),
    radial-gradient(52% 48% at 62% 104%, rgba(17, 82, 68, 0.24), transparent 70%),
    radial-gradient(60% 60% at 50% 40%, rgba(11, 20, 30, 0.2), transparent 70%),
    #05080d;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
}

::selection { background: rgba(243, 200, 107, 0.28); color: #fff; }

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

button, input { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 2px solid rgba(243, 200, 107, 0.8);
  outline-offset: 3px;
}

.app {
  width: 100%;
  max-width: 1500px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 22px 40px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------- top bar ---------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-star {
  width: 21px;
  height: 21px;
  fill: var(--gold);
  filter: drop-shadow(0 0 10px rgba(243, 200, 107, 0.55));
}

.brand-name {
  font-family: var(--script);
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #f7ebd3;
  transform: translateY(-1px);
}

.brand-name em {
  color: var(--gold);
  font-style: normal;
}

.brand-by {
  padding-left: 2px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.13em;
  color: rgba(243, 200, 107, 0.52);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.local-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.local-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.sound:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.sound[aria-pressed="true"] {
  color: var(--gold);
  border-color: rgba(243, 200, 107, 0.34);
  background: rgba(243, 200, 107, 0.075);
}

.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.equalizer i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  animation: eq 1.1s ease-in-out infinite;
  animation-play-state: paused;
  opacity: 0.55;
}

.sound[aria-pressed="true"] .equalizer i {
  animation-play-state: running;
  opacity: 1;
}

.equalizer i:nth-child(1) { animation-delay: -0.2s; }
.equalizer i:nth-child(2) { animation-delay: -0.6s; }
.equalizer i:nth-child(3) { animation-delay: -0.35s; }
.equalizer i:nth-child(4) { animation-delay: -0.8s; }

@keyframes eq {
  0%, 100% { height: 4px; }
  35% { height: 12px; }
  65% { height: 7px; }
}

.sound-label { font-size: 12.5px; letter-spacing: 0.06em; }

/* ---------------- layout ---------------- */

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 34px;
  align-items: stretch;
}

.stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.stage-host {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #05080d;
  box-shadow:
    0 50px 100px -40px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 90px -30px rgba(80, 210, 150, 0.22);
  isolation: isolate;
}

.canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 60px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
}

.demo-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 200, 107, 0.35);
  background: rgba(8, 12, 12, 0.62);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.stage-caption {
  margin: 0;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}

/* ---------------- panel ---------------- */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100svh - 108px);
  padding: 26px 24px 22px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(24, 34, 30, 0.86), rgba(9, 14, 13, 0.92));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(1.05);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.panel-head { display: flex; flex-direction: column; gap: 10px; }

.eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(243, 200, 107, 0.62);
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.34;
  letter-spacing: 0.01em;
  color: #f7f1e5;
}

.panel-head h1 span {
  color: var(--gold);
  background: linear-gradient(100deg, #ffe6ae, #efb957 60%, #ffd98a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

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

.step-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.step-head .num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(243, 200, 107, 0.26);
  background: rgba(243, 200, 107, 0.08);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.step-head h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ece6d9;
}

.step-head .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* dropzone */

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  transition: border-color 0.22s, background 0.22s, transform 0.22s;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(243, 200, 107, 0.55);
  background: rgba(243, 200, 107, 0.06);
}

.dropzone.is-drag { transform: scale(1.01); }

.dropzone:focus-within {
  border-color: rgba(243, 200, 107, 0.65);
  background: rgba(243, 200, 107, 0.07);
  box-shadow: 0 0 0 2px rgba(243, 200, 107, 0.14);
}

.dropzone.is-busy { pointer-events: none; opacity: 0.75; }

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dz-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(243, 200, 107, 0.22);
  background: linear-gradient(160deg, rgba(243, 200, 107, 0.16), rgba(243, 200, 107, 0.04));
  color: var(--gold);
}

.dz-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dz-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.dz-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #f2ecdf;
}

.dz-text small {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* tray */

.tray {
  display: flex;
  gap: 8px;
  padding: 2px 1px 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tray::-webkit-scrollbar { display: none; }
.tray:empty { display: none; }

.tray-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: -2px 0 0 2px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.tray-hint[hidden] { display: none; }

.tray-hint svg {
  flex: none;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: rgba(243, 200, 107, 0.58);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.thumb {
  position: relative;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(243, 200, 107, 0.45);
  background: #0a0f0d;
  animation: pop 0.28s ease both;
}

.thumb::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 2;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 10, 9, 0.74) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd98a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 3H4a1 1 0 0 0-1 1v3M17 3h3a1 1 0 0 1 1 1v3M7 21H4a1 1 0 0 1-1-1v-3M17 21h3a1 1 0 0 0 1-1v-3'/%3E%3C/svg%3E") center/9px 9px no-repeat;
  pointer-events: none;
}

.thumb:hover,
.thumb:focus-within { border-color: rgba(243, 200, 107, 0.9); }

.thumb-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 13px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
  display: block;
  transition: transform 0.25s ease;
}

.thumb-open:hover img { transform: scale(1.06); }

.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.5);
  background: #1a211e;
  color: #cfd8d3;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
}

.thumb:hover .thumb-remove,
.thumb:focus-within .thumb-remove { opacity: 1; transform: scale(1); }

.thumb-remove:hover { background: var(--red); color: #fff; }

@media (hover: none) {
  .thumb-remove {
    opacity: 1;
    transform: scale(1);
    background: rgba(18, 24, 21, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
}

.thumb-add {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  font-weight: 300;
  transition: color 0.2s, border-color 0.2s;
}

.thumb-add:hover { color: var(--gold); border-color: rgba(243, 200, 107, 0.5); }

.thumb-add::after { display: none; }

@keyframes pop {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

/* message */

.msg-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: border-color 0.2s, background 0.2s;
}

.msg-input::placeholder { color: var(--muted-2); }

.msg-input:hover { border-color: rgba(255, 255, 255, 0.18); }

.msg-input:focus {
  outline: none;
  border-color: rgba(243, 200, 107, 0.55);
  background: rgba(0, 0, 0, 0.3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chips button:hover {
  color: var(--gold);
  border-color: rgba(243, 200, 107, 0.32);
  background: rgba(243, 200, 107, 0.06);
}

/* tips */

.tips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}

.tips-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(243, 200, 107, 0.72);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.tips-head svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.tips ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tips li {
  position: relative;
  padding-left: 10px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--muted-2);
}

.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(243, 200, 107, 0.45);
}

/* actions */

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
  user-select: none;
}

.btn .ico {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:active { transform: translateY(1px) scale(0.995); }

.btn.primary {
  color: #24190a;
  background: linear-gradient(180deg, #ffe3a6 0%, #f2c366 55%, #e3ab47 100%);
  border-color: rgba(255, 240, 200, 0.7);
  box-shadow: 0 14px 34px -16px rgba(240, 190, 90, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn.primary:hover {
  filter: brightness(1.045);
  box-shadow: 0 18px 40px -14px rgba(240, 190, 90, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn.primary:disabled {
  cursor: wait;
  opacity: 0.75;
  filter: saturate(0.8);
}

.btn.ghost {
  color: #dfe6e1;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-strong); }

.btn.subtle { color: var(--muted); }

.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; padding: 0 10px; font-size: 12.5px; }

.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: center;
  letter-spacing: 0.02em;
}

.privacy svg {
  flex: none;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ---------------- intro ---------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(6, 14, 12, 0.28), rgba(2, 5, 7, 0.74) 78%);
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
  transition: opacity 0.45s ease, visibility 0.45s;
}

.intro.is-hidden { opacity: 0; visibility: hidden; }

body.intro-open { overflow: hidden; }

.intro-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100svh - 36px);
  overflow-y: auto;
  padding: 42px 42px 28px;
  border-radius: 30px;
  border: 1px solid rgba(255, 219, 154, 0.16);
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(243, 200, 107, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(24, 34, 30, 0.96), rgba(8, 13, 12, 0.98));
  box-shadow:
    0 60px 140px -50px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-align: center;
  animation: introIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  scrollbar-width: none;
}

.intro-card::-webkit-scrollbar { display: none; }

@keyframes introIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.intro-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.intro-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.intro-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.intro-star {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  color: var(--gold);
  filter: drop-shadow(0 0 22px rgba(243, 200, 107, 0.55));
  animation: float 4.5s ease-in-out infinite;
}

.intro-star svg { width: 100%; height: 100%; fill: currentColor; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

.intro-card .eyebrow { margin-bottom: 10px; color: rgba(243, 200, 107, 0.72); }

.intro-by {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(243, 200, 107, 0.5);
  text-transform: none;
}

.intro-card h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 650;
  line-height: 1.36;
  letter-spacing: 0.01em;
  color: #f9f2e3;
}

.intro-card h2 span {
  background: linear-gradient(100deg, #ffe8b7, #efb957 55%, #ffdc8c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-copy {
  margin: 14px auto 0;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
}

.intro-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(320px, 100%);
  margin: 26px auto 0;
}

.btn.big { height: 52px; border-radius: 14px; font-size: 15px; }

.intro-foot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 18px 0 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.intro-foot svg,
.intro-music svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.intro-music {
  margin: 7px 0 0;
  font-size: 10px;
  color: rgba(109, 122, 115, 0.75);
  letter-spacing: 0.02em;
}

/* ---------------- crop ---------------- */

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(60% 55% at 50% 42%, rgba(6, 14, 12, 0.42), rgba(2, 5, 7, 0.84) 78%);
  backdrop-filter: blur(16px) saturate(0.92);
  -webkit-backdrop-filter: blur(16px) saturate(0.92);
}

.crop-modal[hidden] { display: none; }

body.crop-open { overflow: hidden; }

.crop-card {
  width: min(440px, 100%);
  max-height: calc(100svh - 28px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 219, 154, 0.18);
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(243, 200, 107, 0.11), transparent 60%),
    linear-gradient(180deg, rgba(24, 34, 30, 0.97), rgba(8, 13, 12, 0.98));
  box-shadow:
    0 60px 140px -50px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  scrollbar-width: none;
  animation: introIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.crop-card::-webkit-scrollbar { display: none; }

.crop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.crop-head .eyebrow { margin: 2px 0 0; }

.crop-head h2 {
  margin: 7px 0 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #f7f1e5;
}

.crop-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.crop-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.crop-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.crop-sub {
  margin: 9px 0 14px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
}

.crop-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: #05080d;
  touch-action: none;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.crop-stage.is-dragging { cursor: grabbing; }

.crop-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  will-change: transform, width, height;
}

.crop-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 0 49.3%, rgba(2, 5, 7, 0.68) 50%);
}

.crop-ring {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  border: 2px solid rgba(255, 222, 150, 0.72);
  box-shadow:
    0 0 26px rgba(243, 200, 107, 0.18),
    inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.crop-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(4, 8, 7, 0.6);
  backdrop-filter: blur(8px);
  color: rgba(246, 237, 215, 0.65);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.crop-control-label {
  flex: none;
  font-size: 11px;
  color: var(--muted);
}

.crop-controls input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 20px;
  accent-color: var(--gold);
}

.crop-zoom-value {
  flex: none;
  min-width: 38px;
  text-align: right;
  font-size: 11px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.crop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 8px;
  margin-top: 16px;
}

.crop-actions .btn {
  height: 42px;
  padding: 0 8px;
  font-size: 12.5px;
}

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 21, 19, 0.94);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  color: #eee8db;
  font-size: 12.5px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.toast.gold { border-color: rgba(243, 200, 107, 0.4); color: var(--gold-bright); }

.mobile-save {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 240, 200, 0.7);
  border-radius: 15px;
  background: linear-gradient(180deg, #ffe3a6 0%, #f2c366 55%, #e3ab47 100%);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #24190a;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  z-index: 30;
}

.mobile-save svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-save:disabled { opacity: 0.72; }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 18px;
  border-radius: 14px;
  background: #2a1a14;
  color: #ffd9c8;
  text-align: center;
  font-size: 14px;
}

/* ---------------- responsive ---------------- */

@media (max-width: 1160px) {
  .layout { grid-template-columns: minmax(0, 1fr) 356px; gap: 24px; }
  .app { padding: 20px 26px 24px; }
  .panel { padding: 22px 20px 20px; }
  .panel-head h1 { font-size: 25px; }
}

@media (max-width: 980px) {
  .app { padding: 14px 15px 104px; gap: 14px; }
  .layout { display: flex; flex-direction: column; gap: 20px; flex: 0 0 auto; }
  .stage { gap: 8px; flex: none; }
  .stage-host { height: min(62svh, 620px); min-height: 360px; flex: none; }
  .stage-caption { display: block; font-size: 11px; text-align: center; }
  .panel { max-height: none; padding: 21px 19px 20px; border-radius: 22px; gap: 18px; }
  .panel-head h1 { font-size: 24px; }
  .panel-head .lede { display: none; }
  .canvas-wrap { border-radius: 22px; }
  .topbar .local-note { display: none; }
  .intro-card { padding: 36px 24px 24px; border-radius: 24px; }
  .intro-card h2 { font-size: 30px; }
  .intro-star { width: 48px; height: 48px; margin-bottom: 14px; }
  .intro-copy { font-size: 12.5px; }
  .mobile-save {
    display: flex;
    position: fixed;
    left: 15px;
    right: 15px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-save[hidden] { display: none; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 1100px) {
  .demo-badge { display: none; }
}

@media (max-width: 560px) {
  .crop-modal { padding: 10px; }
  .crop-card { padding: 18px; border-radius: 22px; }
  .crop-head h2 { font-size: 17.5px; }
  .crop-sub { font-size: 11px; margin-bottom: 12px; }
  .crop-actions .btn { font-size: 11.5px; }
}

@media (max-width: 460px) {
  .brand-name { font-size: 18px; }
  .brand-by { font-size: 8px; letter-spacing: 0.1em; }
  .brand-star { width: 18px; height: 18px; }
  .sound { padding: 0 12px; gap: 8px; }
  .topbar { min-height: 38px; }
  .stage-host { height: min(58svh, 540px); min-height: 320px; }
  .panel-head h1 { font-size: 22px; }
  .btn-row .btn { font-size: 11.5px; gap: 5px; }
  .btn-row .ico { width: 15px; height: 15px; }
  .intro-actions { margin-top: 22px; }
  .intro-card h2 { font-size: 27px; }
  .mobile-save { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
