:root {
  --bg: #060816;
  --panel: rgba(8, 14, 29, 0.92);
  --panel-2: #0d1830;
  --text: #edf7ff;
  --muted: #7f97b8;
  --line: rgba(84, 232, 255, 0.18);
  --line-strong: rgba(84, 232, 255, 0.4);
  --accent: #54e8ff;
  --accent-2: #ff4fd8;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(84, 232, 255, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(84, 232, 255, 0.42);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 232, 255, 0.2), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(255, 79, 216, 0.16), transparent 26%),
    linear-gradient(180deg, #07101d 0%, #03060d 100%);
  color: var(--text);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(84, 232, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 232, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
  opacity: 0.35;
}

.app-shell {
  display: grid;
  grid-template-columns: 350px 1fr;
  height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.console-collapsed {
  grid-template-columns: 0 1fr;
}

.control-panel {
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.97), rgba(5, 9, 18, 0.97)),
    radial-gradient(circle at top, rgba(84, 232, 255, 0.08), transparent 35%);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.app-shell.console-collapsed .control-panel {
  opacity: 0;
  transform: translateX(-18px);
  pointer-events: none;
  border-right-color: transparent;
}

.panel-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 18px 18px 24px;
}

.panel-header h1,
.preview-header h2,
.super-toolbar h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-header h1,
.preview-header h2 {
  font-size: clamp(2.2rem, 3vw, 3rem);
}

.panel-header {
  padding: 2px 2px 8px;
}

.panel-header h1 {
  line-height: 0.94;
  letter-spacing: 0.03em;
}

.super-toolbar h3 {
  font-size: 1.7rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  font-weight: 700;
}

.panel-copy,
.preview-meta,
.super-stage-meta {
  color: var(--muted);
  line-height: 1.5;
}

.panel-copy {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.38;
  max-width: 28ch;
}

.support-link-row {
  display: flex;
  margin-top: 12px;
}

.panel-footer-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.support-link-row-panel-footer {
  margin-top: 18px;
  justify-content: flex-start;
}

.support-link-row-feedback-footer {
  display: none;
  margin-top: 10px;
  justify-content: flex-start;
}

.support-link-row-super {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(84, 232, 255, 0.12);
  justify-content: flex-start;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 79, 216, 0.42);
  background: linear-gradient(90deg, rgba(84, 23, 72, 0.92), rgba(107, 31, 90, 0.92));
  color: #f2d8ee;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none;
  transition: color 150ms, border-color 150ms, background 150ms, transform 120ms;
}

.feedback-btn-preview {
  margin-left: 10px;
}

.feedback-btn-footer {
  position: static;
  max-width: none;
}

.feedback-btn:hover {
  color: #ffe7fb;
  border-color: rgba(255, 79, 216, 0.62);
  background: linear-gradient(90deg, rgba(104, 29, 88, 0.96), rgba(131, 41, 110, 0.96));
  box-shadow: none;
  transform: translateY(-1px);
}

.build-tag {
  display: inline-flex;
  align-items: center;
  margin: 8px 0 0;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(84, 232, 255, 0.16);
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.1), rgba(255, 79, 216, 0.08));
  color: #c2d8f8;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.panel-header-meta .build-tag {
  margin: 0;
}

.control-group {
  margin-top: 12px;
  padding: 13px 13px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    linear-gradient(135deg, rgba(84, 232, 255, 0.028), transparent 62%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.control-group.is-collapsible {
  padding-top: 10px;
}

.control-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-align: left;
  min-height: 0;
}

.control-group-toggle:hover,
.control-group-toggle:active {
  background: transparent;
  color: #dff7ff;
  box-shadow: none;
  filter: none;
  transform: none;
}

.control-group-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Rajdhani", sans-serif;
}

.control-group-toggle-label::before {
  content: "";
  flex: 0 0 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(84, 232, 255, 0.3));
}

.control-group-toggle-icon {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: transform 160ms ease, color 160ms ease;
}

.control-group.is-collapsed .control-group-toggle-icon {
  transform: rotate(-90deg);
}

.control-group-body {
  margin-top: 10px;
}

.control-group.is-collapsed .control-group-body {
  display: none;
}

.control-group:hover {
  border-color: rgba(84, 232, 255, 0.28);
  box-shadow: var(--shadow), 0 0 0 1px rgba(84, 232, 255, 0.06);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Rajdhani", sans-serif;
}

.section-title::before {
  content: "";
  flex: 0 0 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(84, 232, 255, 0.3));
}

.helper-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.panel-about .helper-text {
  margin-top: 0;
}

.panel-links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.panel-links a {
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-links a:hover {
  color: #bdf8ff;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

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

.panel-footer-brand {
  margin: 18px 2px 6px;
  color: rgba(169, 187, 218, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.bmc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 100, 0.3);
  background: rgba(255, 209, 100, 0.07);
  color: #ffd164;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 150ms, border-color 150ms, color 150ms;
}

.bmc-link:hover {
  background: rgba(255, 209, 100, 0.14);
  border-color: rgba(255, 209, 100, 0.55);
  color: #ffe6a0;
}

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

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(84, 232, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 22, 41, 0.98), rgba(9, 15, 28, 0.98));
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(84, 232, 255, 0.12);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(84, 232, 255, 0.16);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  padding: 3px;
}

input[type="color"]:hover {
  border-color: rgba(84, 232, 255, 0.38);
  box-shadow: 0 0 0 3px rgba(84, 232, 255, 0.08);
}

output {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent);
  font-family: "Rajdhani", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  cursor: pointer;
  transition: color 130ms ease;
}

.toggle:hover {
  color: var(--accent);
}

.toggle input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.actions.compact {
  margin-top: 10px;
}

.button-stack {
  display: flex;
  align-items: end;
}

button {
  border: none;
  border-radius: 999px;
  padding: 9px 13px;
  background: linear-gradient(90deg, var(--accent), #22c7ff);
  color: #04111b;
  cursor: pointer;
  font-weight: 700;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.16), 0 12px 30px rgba(84, 232, 255, 0.18);
  transition: filter 130ms ease, transform 100ms ease, box-shadow 130ms ease;
}

.control-panel button:not(.console-toggle) {
  min-height: 38px;
  font-size: 0.86rem;
}

.control-panel .actions button,
.control-panel .button-stack button {
  flex: 1 1 0;
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.28), 0 16px 36px rgba(84, 232, 255, 0.28);
}

button:active {
  filter: brightness(0.94);
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.14), 0 6px 14px rgba(84, 232, 255, 0.12);
}

button.secondary {
  background: linear-gradient(90deg, rgba(255, 79, 216, 0.18), rgba(84, 232, 255, 0.1));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255, 79, 216, 0.14);
}

button.secondary:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(255, 79, 216, 0.32), 0 12px 28px rgba(255, 79, 216, 0.16);
}

#saveCompositionButton,
#loadCompositionButton,
#renameCompositionButton,
#duplicateCompositionButton,
#deleteCompositionButton,
#addCurrentToSuperButton,
#smartAlignSuperButton,
#addTextToSuperButton,
#deleteSuperItemButton {
  width: 100%;
}

.super-toolbar #addCurrentToSuperButton,
.super-toolbar #smartAlignSuperButton,
.super-toolbar #addTextToSuperButton,
.super-toolbar #deleteSuperItemButton {
  width: auto;
}

.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  overflow: hidden;
}

.file-button input {
  display: none;
}

.composition-card.is-in-super {
  box-shadow: 0 0 0 2px rgba(255, 79, 216, 0.16);
}

.preview-panel {
  position: relative;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 22px 18px;
}

.preview-top {
  position: sticky;
  top: 0;
  z-index: 14;
  overflow: visible;
  padding-bottom: 12px;
  background: linear-gradient(180deg, rgba(4, 7, 13, 0.96), rgba(4, 7, 13, 0.78) 82%, transparent);
  backdrop-filter: blur(10px);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  position: relative;
  padding: 10px 196px 4px 10px;
  margin-bottom: 8px;
}

.preview-header-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
}

.console-toggle {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.12), rgba(84, 232, 255, 0.05));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.14);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.preview-header > div:first-child {
  position: relative;
  padding: 4px 0 12px;
}

.preview-header > div:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 168px;
  height: 2px;
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.9), rgba(84, 232, 255, 0.18));
  box-shadow: 0 0 18px rgba(84, 232, 255, 0.24);
}

.preview-header .eyebrow,
.super-toolbar .eyebrow {
  margin-bottom: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
}

.preview-header h2 {
  font-size: clamp(2.8rem, 5.8vw, 4.5rem);
  line-height: 0.94;
  letter-spacing: 0.04em;
  text-shadow: 0 0 22px rgba(84, 232, 255, 0.08);
}

.preview-meta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(84, 232, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 19, 35, 0.86), rgba(8, 13, 25, 0.92)),
    linear-gradient(90deg, rgba(84, 232, 255, 0.08), rgba(255, 79, 216, 0.08));
  color: #a9bbda;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 30px rgba(4, 8, 18, 0.34);
}

.preview-meta:empty {
  display: none;
}

.tab-button {
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.12), rgba(84, 232, 255, 0.05));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.14);
  padding: 10px 18px;
  font-size: 0.95rem;
  transition: background 150ms ease, box-shadow 150ms ease, filter 130ms ease;
}

.tab-button:hover:not(.is-active) {
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.22), rgba(84, 232, 255, 0.1));
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.28);
}

.tab-button.is-active {
  background: linear-gradient(90deg, var(--accent), #22c7ff);
  color: #04111b;
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
}

.canvas-stage,
.super-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(84, 232, 255, 0.08);
  box-shadow: none;
  position: relative;
}

.canvas-stage {
  background:
    linear-gradient(180deg, rgba(10, 16, 29, 0.98), rgba(7, 11, 21, 0.98)),
    linear-gradient(0deg, rgba(84, 232, 255, 0.03), rgba(84, 232, 255, 0.03));
}

.super-stage {
  padding: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

canvas {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(84, 232, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.05), 0 16px 38px rgba(0, 0, 0, 0.34), 0 0 26px rgba(84, 232, 255, 0.05);
  background: #000;
}

#previewCanvas {
  max-height: min(56vh, 680px);
  border-radius: 0;
}

#superCanvas {
  max-height: min(70vh, 820px);
  border-radius: 0;
  border: 1px solid rgba(120, 235, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(84, 232, 255, 0.08),
    0 0 0 1px rgba(84, 232, 255, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.super-layout {
  padding-top: 8px;
}

.super-stage-wrap {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.super-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.super-toolbar-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 0 6px;
}

.super-toolbar-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.super-toolbar-row {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: visible;
  padding: 6px 0 4px;
}

.preview-panel.is-super-tab .super-toolbar-row {
  display: flex;
}

.super-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.super-toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex-shrink: 0;
  opacity: 0.5;
}

.super-dim-sep {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 2px;
}

.super-toolbar button,
.super-toolbar .file-button,
.super-toolbar select,
.super-toolbar input[type="text"] {
  min-height: 40px;
  flex: 0 0 auto;
  width: auto;
}

.super-toolbar button,
.super-toolbar .file-button {
  padding: 10px 16px;
  min-width: 0;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.super-toolbar select,
.super-toolbar input[type="text"] {
  padding: 8px 10px;
}

.super-toolbar input[type="text"] {
  width: 72px;
}

.super-toolbar-output {
  margin-left: auto;
}

.super-toolbar-output #shareLayoutButton {
  background: linear-gradient(90deg, var(--accent), #22c7ff);
  color: #04111b;
  box-shadow: 0 0 0 1px rgba(84, 232, 255, 0.2), 0 12px 30px rgba(84, 232, 255, 0.2);
}

.export-dropdown {
  position: relative;
  z-index: 320;
}

.export-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 400;
  background: var(--surface, #12092a);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

.export-dropdown-menu button {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

.export-dropdown-menu button:hover {
  background: var(--line, rgba(255,255,255,0.07));
  color: var(--accent);
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.share-modal.is-open {
  display: block;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}

.share-modal-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 8vh auto 0;
  padding: 18px;
  border: 1px solid rgba(84, 232, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(9, 15, 28, 0.98), rgba(7, 11, 21, 0.98)),
    linear-gradient(135deg, rgba(84, 232, 255, 0.04), rgba(255, 79, 216, 0.04));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
}

.share-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.share-modal-header h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-modal-close {
  min-width: 96px;
}

.share-modal-body .actions {
  justify-content: flex-start;
}

.share-result {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(84, 232, 255, 0.12);
  border-radius: 14px;
  background: rgba(7, 12, 22, 0.64);
}

.share-result input[readonly] {
  background: rgba(8, 13, 24, 0.96);
  color: #dff7ff;
}

.export-notice-card {
  width: min(520px, calc(100vw - 32px));
}

.export-notice-message {
  margin: 0 0 8px;
  color: #dff7ff;
  font-size: 0.96rem;
  line-height: 1.6;
}

#shareStatus[data-tone="error"] {
  color: #ff94b4;
}

#shareStatus[data-tone="success"] {
  color: #9effd7;
}

#shareStatus[data-tone="loading"] {
  color: #9fdcff;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: none;
}

.feedback-modal.is-open {
  display: block;
}

.feedback-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(8px);
}

.feedback-modal-card {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  margin: 8vh auto 0;
  padding: 18px;
  border: 1px solid rgba(84, 232, 255, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(9, 15, 28, 0.98), rgba(7, 11, 21, 0.98)),
    linear-gradient(135deg, rgba(84, 232, 255, 0.04), rgba(255, 79, 216, 0.06));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
}

.feedback-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.feedback-modal-header h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feedback-modal-body textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}

#feedbackType {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5L7 9L11 5' stroke='%23d7e5ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px 14px;
}

#submitFeedbackButton {
  min-width: 190px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.92), rgba(236, 72, 153, 0.92));
  color: #fdf7ff;
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.18), 0 14px 34px rgba(168, 85, 247, 0.24);
}

#submitFeedbackButton:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.32), 0 16px 36px rgba(168, 85, 247, 0.32);
}

#feedbackStatus[data-tone="error"] {
  color: #ff94b4;
}

#feedbackStatus[data-tone="success"] {
  color: #9effd7;
}

#feedbackStatus[data-tone="loading"] {
  color: #9fdcff;
}

.super-toolbar .file-button {
  min-width: 0;
}

.super-toolbar select,
.super-toolbar input[type="text"] {
  min-width: 0;
}

.super-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.super-zoom-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(84, 232, 255, 0.28);
  background: linear-gradient(180deg, rgba(22, 42, 63, 0.88), rgba(9, 19, 33, 0.96));
  color: #dffbff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.zoom-button {
  min-width: 36px !important;
  padding: 0 !important;
  font-size: 1rem !important;
  line-height: 1;
  text-align: center;
}

#superCanvasPreset {
  width: 140px;
}

#superCanvasWidth,
#superCanvasHeight {
  width: 72px;
}

.super-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
  align-items: start;
}

.super-library {
  height: fit-content;
  max-width: none;
  order: 3;
}

.composition-cards {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  padding-right: 2px;
}

.super-memory {
  margin-top: 18px;
  border-top: 1px solid rgba(84, 232, 255, 0.12);
  padding-top: 14px;
}

.saved-super-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
  overflow: visible;
  padding-bottom: 0;
}

.saved-super-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 24, 44, 0.92), rgba(7, 12, 24, 0.96));
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.saved-super-card:hover {
  transform: translateY(-2px);
  border-color: rgba(84, 232, 255, 0.28);
  box-shadow: 0 6px 22px rgba(84, 232, 255, 0.1);
}

.saved-super-card.is-selected {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(84, 232, 255, 0.14);
}

.saved-super-card.is-selected .saved-super-card-body h4 {
  color: #dffbff;
}

.saved-super-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.saved-super-card-body {
  padding: 10px 12px;
}

.saved-super-card-body h4,
.saved-super-card-body p {
  margin: 0;
}

.saved-super-card-body h4 {
  font-size: 0.96rem;
  line-height: 1.18;
}

.saved-super-card-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.saved-super-card-body .saved-super-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(84, 232, 255, 0.08);
  color: #b7d9ec;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.composition-card {
  flex: 0 0 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 24, 44, 0.92), rgba(7, 12, 24, 0.96));
  overflow: hidden;
  cursor: grab;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.composition-card:hover {
  transform: translateY(-3px);
  border-color: rgba(84, 232, 255, 0.32);
  box-shadow: 0 8px 28px rgba(84, 232, 255, 0.12);
}

.composition-card.is-selected {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(84, 232, 255, 0.14);
}

.composition-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.composition-card-body {
  padding: 12px;
}

.composition-card-body h4,
.composition-card-body p {
  margin: 0;
}

.composition-card-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.super-stage-wrap {
  min-width: 0;
  width: 100%;
  order: 1;
}

.super-stage-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 6px;
}

.super-stage-meta span:empty {
  display: none;
}

.super-zoom-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(84, 232, 255, 0.14);
  background: linear-gradient(90deg, rgba(84, 232, 255, 0.08), rgba(84, 232, 255, 0.04));
  color: var(--accent);
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  flex: 0 0 auto;
  user-select: none;
}

select:disabled,
input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1280px) {
  .super-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .preview-panel {
    order: 1;
  }

  .control-panel {
    order: 2;
  }

  .control-panel,
  .preview-panel,
  .panel-scroll {
    height: auto;
  }

  .preview-top {
    position: static;
  }

  .preview-header {
    padding: 8px 0 4px;
    margin-bottom: 10px;
    gap: 12px;
  }

  .preview-header-actions {
    position: static;
    justify-content: flex-start;
  }

  .preview-header > div:first-child {
    padding: 2px 0 10px;
  }

  .preview-header h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }
}

@media (max-width: 720px) {
  #feedTabButton,
  #superTabButton,
  .super-toolbar-tabs,
  #superView {
    display: none !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .control-panel {
    order: 1;
  }

  .preview-panel {
    order: 2;
    height: auto;
    overflow: visible;
    padding: 8px 0 0;
  }

  .panel-header h1 {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .panel-copy {
    max-width: none;
    font-size: 0.86rem;
  }

  .control-grid,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .preview-header {
    padding-top: 0;
    margin-bottom: 2px;
  }

  .preview-header h2 {
    font-size: clamp(1.35rem, 7.2vw, 2.1rem);
    letter-spacing: 0.03em;
  }

  .preview-header .eyebrow {
    font-size: 0.84rem;
  }

  .super-toolbar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .super-toolbar-row {
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
  }

  .control-panel button:not(.console-toggle) {
    font-size: 0.82rem;
  }

  .panel-footer-stack {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 12px;
    background: rgba(7, 11, 21, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(84, 232, 255, 0.08);
  }

  .support-link-row-panel-footer,
  .support-link-row-feedback-footer {
    position: static;
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 0;
  }

  .support-link-row-super {
    display: none;
  }

  .feedback-btn-preview {
    display: none;
  }

  .feedback-btn-footer {
    display: inline-flex;
    max-width: calc(100vw - 32px);
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .panel-footer-brand {
    margin: 0;
    text-align: center;
  }

  .panel-scroll {
    padding-bottom: 158px;
  }

  .feedback-modal-card {
    margin-top: 5vh;
    padding: 16px;
  }
}
