:root {
  --bg: #050506;
  --panel: rgba(0, 0, 0, 0.8);
  --panel-strong: rgba(11, 11, 14, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --panel-frost: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  --stroke: rgba(255, 255, 255, 0.15);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.24);
  --text: #f7f7f4;
  --text-soft: rgba(255, 255, 255, 0.62);
  --text-muted: rgba(255, 255, 255, 0.38);
  --purple: #5426f9;
  --purple-soft: rgba(84, 38, 249, 0.36);
  --purple-glow: rgba(119, 79, 255, 0.55);
  --yellow: #ffbe19;
  --green: #00ff88;
  --gray: #8a8a8a;
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --checker-a: rgba(0, 0, 0, 0.03);
  --checker-b: rgba(0, 0, 0, 0.09);
  color-scheme: dark;
  font-family:
    "Inter",
    "SF Pro Display",
    "PingFang SC",
    "Helvetica Neue",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

body.is-share-locked {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(84, 38, 249, 0.88);
  outline-offset: 2px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100vw;
  height: 100dvh;
  padding: 24px;
  background: #050506;
  overflow: hidden;
}

.share-mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(84, 38, 249, 0.16), transparent 34%),
    rgba(5, 5, 6, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.share-mode-overlay[hidden] {
  display: none;
}

.share-mode-card {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(10, 10, 13, 0.92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.share-mode-eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.share-mode-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.share-mode-copy,
.share-mode-meta,
.share-mode-error {
  margin: 0;
}

.share-mode-copy {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 15px;
  line-height: 1.6;
}

.share-mode-meta {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.5;
}

.share-mode-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.share-mode-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.share-mode-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.share-mode-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out);
}

.share-mode-submit:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.share-mode-submit:disabled {
  opacity: 0.56;
  cursor: progress;
}

.share-mode-error {
  min-height: 20px;
  margin-top: 12px;
  color: #ff8080;
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  background: transparent;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.toolbar-glass-surface {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.24);
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 16px;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-wordmark-img {
  display: block;
  width: 73.93px;
  height: 18.69px;
  object-fit: contain;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-cut {
  color: var(--purple);
}

.brand-kit {
  color: var(--text);
}

.topbar-hint-wrap {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.topbar-hint {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.topbar-hint.is-visible {
  display: flex;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.menu-group {
  position: relative;
}

.chip-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 170px;
  min-width: 170px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  transition:
    border-color 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.chip-button:hover:not(:disabled),
.toolbar-btn:hover:not(:disabled),
.asset-action:hover:not(:disabled),
.floating-menu-item:hover,
.empty-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.chip-button:hover:not(:disabled),
.toolbar-btn:hover:not(:disabled),
.asset-action:hover:not(:disabled),
.rail-item:hover,
.name-input-wrap:hover,
.current-preview-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.24);
}

.chip-button.is-upload,
.asset-action.primary,
.selection-prompt-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.08);
}

body.is-preupload .chip-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  box-shadow: none;
}

body.is-preupload .chip-button.is-upload {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.15)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 -2px 4px rgba(255, 255, 255, 0.05);
}

body.is-preupload #exportZipBtn:disabled {
  opacity: 1;
  color: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004)),
    rgba(255, 255, 255, 0.008);
}

.chip-button:disabled,
.toolbar-btn:disabled,
.asset-action:disabled,
.selection-prompt-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.asset-action.is-busy:disabled {
  opacity: 1;
  cursor: progress;
}

.chip-button:not(:disabled):active,
.toolbar-btn:not(:disabled):active,
.asset-action:not(:disabled):active,
.selection-prompt-button:not(:disabled):active {
  transform: translateY(1px);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.button-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.toolbar-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0.78;
  transform: rotate(180deg);
  transition: transform 0.18s var(--ease-out), opacity 0.18s ease;
}

.toolbar-caret svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-select-group.is-open .toolbar-caret {
  transform: rotate(0deg);
}

.chevron-icon {
  opacity: 0.84;
}

.floating-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 15;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  width: 170px;
  padding: 4px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.68);
  box-shadow: var(--shadow-md);
  transform: translateX(-50%);
  backdrop-filter: blur(25px);
}

.menu-group.is-open .floating-menu {
  display: flex;
}

.floating-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.floating-menu-item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.floating-menu-item:hover {
  color: rgba(255, 255, 255, 0.84);
}

.workspace {
  flex: 1;
  min-height: 561px;
  display: grid;
  grid-template-columns: minmax(0, 940px) 280px 140px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.canvas-panel,
.side-panel {
  position: relative;
  min-height: 0;
  height: 558px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  transition:
    border-color 0.24s var(--ease-out),
    background-color 0.24s var(--ease-out),
    box-shadow 0.24s var(--ease-out);
}

.canvas-panel {
  overflow: hidden;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
}

.canvas-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 9, 12, 0.98), rgba(0, 0, 0, 1));
  touch-action: none;
}

.drop-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(3, 3, 5, 0.48), rgba(0, 0, 0, 0.16));
  text-align: center;
  cursor: pointer;
}

.drop-zone-bg {
  position: absolute;
  left: 50%;
  bottom: -61.5px;
  width: 940px;
  max-width: none;
  opacity: 0.8;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.drop-zone.is-dragging {
  box-shadow:
    inset 0 0 0 1px rgba(0, 149, 255, 0.62),
    inset 0 0 80px rgba(0, 149, 255, 0.08);
}

.drop-zone-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -12px;
}

.drop-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 308px;
  min-height: 97px;
  padding: 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(15px);
}

.drop-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
  text-wrap: balance;
}

.drop-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
}

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 -2px 4px rgba(255, 255, 255, 0.05);
}

.canvas-stage-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.canvas-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  user-select: none;
}

.canvas-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.canvas-stage.is-pixelated img {
  image-rendering: pixelated;
}

.selection {
  position: absolute;
  border: 1.5px dashed rgba(255, 255, 255, 0.82);
  background: rgba(84, 38, 249, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(84, 38, 249, 0.3),
    0 0 0 9999px rgba(0, 0, 0, 0.08);
}

.selection-lasso {
  border: 0;
  box-shadow: none;
}

.selection-lasso-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.selection-lasso-svg path {
  fill: rgba(84, 38, 249, 0.14);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.selection-label {
  position: absolute;
  left: 50%;
  bottom: -38px;
  transform: translateX(-50%);
  min-width: 104px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.selection-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(84, 38, 249, 0.9);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.selection-handle[data-handle="n"] {
  top: -5px;
  left: calc(50% - 5px);
}

.selection-handle[data-handle="s"] {
  bottom: -5px;
  left: calc(50% - 5px);
}

.selection-handle[data-handle="e"] {
  top: calc(50% - 5px);
  right: -5px;
}

.selection-handle[data-handle="w"] {
  top: calc(50% - 5px);
  left: -5px;
}

.selection-handle[data-handle="nw"] {
  top: -5px;
  left: -5px;
}

.selection-handle[data-handle="ne"] {
  top: -5px;
  right: -5px;
}

.selection-handle[data-handle="sw"] {
  bottom: -5px;
  left: -5px;
}

.selection-handle[data-handle="se"] {
  right: -5px;
  bottom: -5px;
}

.selection-prompt {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 14;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 220px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.7);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%);
}

.selection-prompt.is-visible {
  display: flex;
}

.selection-prompt.is-hidden {
  display: none;
}

.selection-prompt-title {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.selection-prompt-button {
  width: 100%;
  height: 40px;
  border-radius: 999px;
}

.canvas-toolbar-layer {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  transform: translateX(-50%);
}

.canvas-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 57px;
  padding: 4px;
  border-radius: 999px;
}

body.is-preupload .canvas-toolbar-layer,
body.is-preupload .canvas-toolbar {
  display: none;
}

.toolbar-select-group {
  position: relative;
}

.toolbar-select-group.is-disabled {
  pointer-events: none;
}

.toolbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 180px;
  min-width: 180px;
  height: 49px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 1);
  font-size: 14px;
  line-height: 1;
  transition:
    color 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.toolbar-btn.is-active,
.toolbar-select-group.is-open .toolbar-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.05);
}

.toolbar-btn .button-icon,
.toolbar-btn .toolbar-caret {
  color: currentColor;
}

#selectToolBtn {
  color: rgba(255, 255, 255, 1);
}

#confirmSelectionBtn,
#deleteSelectionBtn {
  color: rgba(255, 255, 255, 0.6);
}

#confirmSelectionBtn:not(:disabled),
#deleteSelectionBtn:not(:disabled) {
  color: rgba(255, 255, 255, 1);
}

#confirmSelectionBtn:disabled,
#deleteSelectionBtn:disabled {
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
}

.select-mode-menu {
  position: absolute;
  left: 4px;
  bottom: calc(57px + 4px);
  z-index: 16;
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 180px;
  padding: 4px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.canvas-toolbar-layer.is-open .select-mode-menu,
.select-mode-menu.is-open {
  display: flex;
}

.select-mode-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  text-align: center;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.select-mode-item:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.select-mode-item.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
}

.side-panel {
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}

.current-panel {
  justify-content: space-between;
}

.rail-panel {
  align-items: stretch;
}

.preupload-panel-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.preupload-panel-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.preupload-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.35;
}

.preupload-panel-copy strong {
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
}

.rail-preupload-empty {
  gap: 24px;
}

.rail-preupload-empty .preupload-panel-copy strong {
  font-size: 20px;
}

body.is-preupload .current-panel,
body.is-preupload .rail-panel {
  padding-top: 0;
}

body.is-preupload .current-panel .preupload-panel-empty,
body.is-preupload .rail-panel .preupload-panel-empty {
  justify-content: center;
  padding-bottom: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.section-badge.is-hidden {
  opacity: 0;
}

.panel-empty,
.rail-empty {
  flex: 1;
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  text-align: center;
  padding: 24px 16px;
}

.empty-card strong {
  color: var(--text);
  font-size: 20px;
}

.current-status {
  width: auto;
  min-width: 44px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  line-height: 1;
}

.current-status.status-processing {
  color: var(--yellow);
  background: rgba(255, 190, 25, 0.11);
  border-color: rgba(255, 190, 25, 0.2);
}

.current-status.status-processed {
  color: var(--green);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.2);
}

.current-empty-card,
.rail-empty-card {
  background: rgba(255, 255, 255, 0.02);
}

.current-empty-card {
  min-height: 478px;
}

.rail-empty-card {
  min-height: 478px;
  font-size: 11px;
  line-height: 1.35;
  padding-inline: 8px;
}

.rail-empty-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.current-preview-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}

.preview-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.preview-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.rail-thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkerboard {
  background-image:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  background-color: rgba(255, 255, 255, 0.96);
}

.preview-dimensions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.current-name-wrap {
  margin-top: 12px;
}

.name-input-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.name-input-wrap:focus-within {
  border-color: rgba(84, 38, 249, 0.5);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(84, 38, 249, 0.16);
}

.name-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.asset-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  font-size: 14px;
}

.asset-action.primary {
  font-size: 14px;
}

.asset-action.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.26) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: button-sheen 1.35s linear infinite;
  pointer-events: none;
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0;
  align-items: center;
  width: 100%;
  max-height: 100%;
  scrollbar-width: thin;
}

.rail-title {
  width: 100%;
  margin-bottom: 4px;
}

.rail-item {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
  overflow: hidden;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out);
}

.rail-item::before {
  display: none;
}

.rail-item:hover,
.rail-item.is-active {
  transform: translateY(-1px);
}

.rail-item.is-active {
  border-color: rgba(110, 63, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(110, 63, 255, 0.92),
    0 0 0 4px rgba(110, 63, 255, 0.14);
}

.rail-thumb {
  width: 100%;
  padding: 6px;
}

.rail-thumb-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

@keyframes button-sheen {
  from {
    transform: translateX(-120%);
  }

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

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 268px 132px;
  }

  .chip-button {
    width: 152px;
    min-width: 152px;
  }

  .toolbar-btn {
    width: 180px;
    min-width: 180px;
  }
}

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

  .app-shell {
    width: 100%;
    min-height: 100dvh;
    height: auto;
    padding: 16px;
    overflow: visible;
  }

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

  .topbar-hint-wrap {
    order: 3;
    justify-content: flex-start;
  }

  .topbar-actions {
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chip-button {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .workspace {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .canvas-panel,
  .side-panel {
    height: auto;
  }

  .canvas-panel {
    min-height: 58dvh;
  }

  .current-panel,
  .rail-panel {
    min-height: 240px;
  }

  .rail-panel {
    min-height: 172px;
  }

  .rail-list {
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0;
  }

  .rail-title {
    min-width: 0;
  }

  .rail-item {
    flex: 0 0 auto;
  }

  .canvas-toolbar-layer {
    right: 12px;
    bottom: 12px;
    left: 12px;
    transform: none;
  }

  .canvas-toolbar {
    justify-content: center;
    overflow-x: auto;
  }

  .toolbar-btn {
    width: 180px;
    min-width: 180px;
  }

  .drop-zone-bg {
    width: 760px;
  }

  .drop-copy {
    width: min(308px, calc(100vw - 64px));
    min-height: 104px;
  }
}

@media (max-width: 560px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .brand-wordmark {
    font-size: 22px;
  }

  .canvas-panel {
    min-height: 50dvh;
  }

  .canvas-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .toolbar-btn {
    width: 100%;
    min-width: 0;
  }

  .select-mode-menu {
    left: 0;
    width: 100%;
  }
}
