:root {
  --brand-50: #f5f2ff;
  --brand-100: #ede7ff;
  --brand-200: #ddd2ff;
  --brand-300: #c5b3ff;
  --brand-400: #a78bfa;
  --brand-500: #8b5cf6;
  --brand-600: #7c3aed;
  --brand-700: #6d28d9;
  --brand-800: #5b21b6;
  --brand-900: #4c1d95;

  --bg: #f5f6f8;
  --bg-subtle: #f8f9fb;
  --surface: #ffffff;
  --surface-hover: #fafafa;
  --surface-active: #f3f4f6;

  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --divider: #eceff3;

  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-disabled: #9ca3af;
  --text-on-brand: #ffffff;

  --success: #16a34a;
  --success-bg: #ecfdf3;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #2563eb;
  --info-bg: #eff6ff;

  --link: var(--brand-600);
  --link-hover: var(--brand-700);
  --focus-ring: rgba(124, 58, 237, 0.25);

  --btn-primary-bg: var(--brand-600);
  --btn-primary-bg-hover: var(--brand-700);
  --btn-primary-text: #ffffff;

  --btn-secondary-bg: #ffffff;
  --btn-secondary-bg-hover: #f9fafb;
  --btn-secondary-border: var(--border);
  --btn-secondary-text: var(--text);

  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-border-hover: #9ca3af;
  --input-border-focus: var(--brand-600);
  --input-placeholder: #9ca3af;

  --chart-grid: #e5e7eb;
  --chart-axis: #6b7280;
  --chart-1: #8b5cf6;
  --chart-2: #a78bfa;
  --chart-3: #c4b5fd;
  --chart-4: #ddd6fe;
  --chart-5: #ede9fe;

  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 12px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 10px 24px rgba(16, 24, 40, 0.1);

  --color-primary: var(--brand-600);
  --color-primary-hover: var(--brand-700);
  --color-background: var(--bg);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --color-text: var(--text);
  --color-text-secondary: var(--text-secondary);

  /* Backward-compatible aliases used by current code */
  --background: var(--bg);
  --card: var(--surface);
  --foreground: var(--text);
  --muted: var(--bg-subtle);
  --muted-foreground: var(--text-muted);
  --primary: var(--brand-600);
  --primary-foreground: var(--text-on-brand);
  --secondary: var(--btn-secondary-bg);
  --secondary-foreground: var(--btn-secondary-text);
  --accent: var(--brand-400);
  --accent-soft: var(--brand-50);
  --glow: rgba(124, 58, 237, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.7);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family:
    "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", "Noto Sans SC",
    ui-sans-serif, system-ui, sans-serif;
}

body {
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  padding: 20px 16px 48px;
  background:
    radial-gradient(980px 420px at -8% -10%, color-mix(in srgb, var(--brand-200) 22%, transparent), transparent 64%),
    radial-gradient(740px 320px at 108% 0%, color-mix(in srgb, var(--brand-300) 20%, transparent), transparent 66%),
    linear-gradient(to bottom, var(--bg-subtle) 0%, var(--bg) 100%);
  position: relative;
}


.page {
  max-width: 1280px;
  margin: 0 auto;
}

.stack-24 {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stack-28 {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.topbar,
.section-head,
.card-top,
.card-foot,
.form-actions,
.feedback-row,
.feedback-meta,
.share-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--primary);
}

.brand-text {
  font-size: 16px;
  font-weight: 600;
}

.hero-card,
.content-card,
.feedback-form,
.feedback-list-card,
.create-panel,
.upload-panel,
.demo-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(1.08) blur(10px);
  -webkit-backdrop-filter: saturate(1.08) blur(10px);
}

.hero-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background:
    linear-gradient(165deg, color-mix(in oklch, var(--accent-soft) 50%, var(--card)) 0%, color-mix(in oklch, var(--card) 92%, white) 58%),
    var(--glass-bg);
  border-color: color-mix(in oklch, var(--primary) 18%, var(--border));
  box-shadow: var(--shadow-md);
}

.hero-headline {
  font-size: clamp(2.05rem, 3.2vw, 2.8rem);
  font-weight: 720;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-subtitle,
.muted,
.helper-text,
.feedback-time,
.card-meta,
.feedback-caption {
  color: var(--muted-foreground);
}

.hero-subtitle,
.helper-text,
.feedback-caption,
.feedback-time,
.card-meta {
  font-size: 14px;
  line-height: 1.5;
}

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

.stat-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card) 90%, white) 0%, color-mix(in oklch, var(--card) 98%, var(--muted)) 100%);
  border-color: color-mix(in oklch, var(--primary) 14%, var(--border));
  position: relative;
}

.stat-label {
  font-size: 13px;
  color: var(--muted-foreground);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title {
  margin: 0;
  font-size: clamp(1.28rem, 1.85vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted-foreground);
}

.button {
  border: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  min-height: 40px;
  line-height: 1;
  transition:
    transform 0.2s var(--ease-out-quart),
    box-shadow 0.2s var(--ease-out-quart),
    background 0.2s var(--ease-out-quart),
    opacity 0.2s var(--ease-out-quart),
    border-color 0.2s var(--ease-out-quart);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.button:hover {
  transform: translateY(-1px) scale(1.001);
  box-shadow: var(--shadow-sm);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.button-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-md);
}

.button-primary:hover {
  background: var(--btn-primary-bg-hover);
}

.button-outline {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--btn-secondary-border);
  color: var(--btn-secondary-text);
}

.button-outline:hover {
  background: var(--btn-secondary-bg-hover);
}

.button-ghost {
  background: transparent;
  border: 1px solid transparent;
}

.button-large {
  padding: 10px 24px;
}

.button-icon {
  width: 40px;
  padding: 0;
}

.icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-with-badge {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.count-badge,
.feedback-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  min-width: 20px;
}

.count-badge {
  position: absolute;
  right: -10px;
  top: -10px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

.feedback-badge {
  background: var(--primary);
}

.button-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  animation: spin 0.75s linear infinite;
}

.button-outline .button-spinner,
.button-ghost .button-spinner {
  border-color: rgba(23, 23, 23, 0.18);
  border-top-color: currentColor;
}

.demo-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  border-color: color-mix(in oklch, var(--primary) 8%, var(--border));
  cursor: pointer;
}

.demo-card:hover,
.gallery-card:hover,
.thumb-card:hover,
.feedback-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.preview-shell {
  height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background:
    linear-gradient(130deg, color-mix(in oklch, var(--accent-soft) 48%, var(--muted)) 0%, var(--muted) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #dfe4ec;
}

.preview-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.preview-index-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 450;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

.preview-stack {
  height: 160px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.preview-stack-layer {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #dfe4ec;
}

.preview-stack-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-stack .layer-1 {
  left: 0;
  top: 0;
  z-index: 3;
}

.preview-stack .layer-2 {
  z-index: 2;
  opacity: 0.92;
  transform: translate(7px, 7px) scale(0.96);
  transform-origin: top left;
}

.preview-stack .layer-3 {
  z-index: 1;
  opacity: 0.84;
  transform: translate(14px, 14px) scale(0.92);
  transform-origin: top left;
}

.preview-placeholder {
  width: 96px;
  height: 128px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-placeholder span {
  display: block;
  border-radius: 999px;
  background: #e7e7e7;
}

.preview-placeholder span:nth-child(1) {
  height: 8px;
}

.preview-placeholder span:nth-child(2) {
  height: 46px;
  border-radius: var(--radius-xs);
}

.preview-placeholder span:nth-child(3),
.preview-placeholder span:nth-child(4),
.preview-placeholder span:nth-child(5) {
  height: 6px;
}

.preview-placeholder span:nth-child(5) {
  width: 68%;
}

.demo-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.demo-title {
  margin: 0;
  font-size: 18px;
  font-weight: 580;
  line-height: 1.3;
}

.demo-description {
  margin: 0;
  line-height: 1.46;
  font-size: 14px;
  color: color-mix(in oklch, var(--foreground) 94%, var(--muted-foreground));
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-card .card-meta {
  margin-top: 3px;
  line-height: 1.36;
}

.demo-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-card .card-top {
  align-items: flex-start;
}

.demo-card .card-actions .button {
  min-height: 46px;
  border-radius: var(--radius-md);
  padding: 0 24px;
  font-size: 18px;
  font-weight: 600;
}

.card-foot {
  margin-top: auto;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  padding: 0;
}

.text-button:hover {
  color: var(--foreground);
}

.empty-state-demo {
  min-height: 192px;
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.empty-state-demo p {
  margin: 0;
  font-size: 16px;
  color: var(--muted-foreground);
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.create-panel,
.upload-panel,
.feedback-form,
.feedback-list-card {
  padding: 24px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card) 88%, var(--accent-soft)) 0%, color-mix(in oklch, var(--card) 96%, var(--muted)) 42%),
    var(--glass-bg);
  border-color: color-mix(in oklch, var(--primary) 12%, var(--border));
}

.panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.panel-desc {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition:
    border-color 0.2s var(--ease-out-quart),
    box-shadow 0.2s var(--ease-out-quart),
    background 0.2s var(--ease-out-quart);
}

.textarea {
  min-height: 220px;
  resize: vertical;
}

.feedback-form .textarea {
  min-height: 120px;
}

.input:focus,
.textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px var(--focus-ring);
  background: var(--input-bg);
}

.upload-panel {
  height: 538px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.upload-empty {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted-foreground);
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
}

.upload-empty.is-dragover,
.upload-filled.is-dragover {
  border-color: color-mix(in oklch, var(--accent) 45%, var(--border));
  background: color-mix(in oklch, var(--accent-soft) 55%, white);
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  color: color-mix(in oklch, var(--text-muted) 86%, var(--primary));
  opacity: 0.92;
}

.upload-filled {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.thumb-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 6px 6px 0;
}

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

.thumb-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--muted);
  aspect-ratio: 136 / 102;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.thumb-card[draggable="true"] {
  cursor: grab;
}

.thumb-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  justify-content: flex-end;
  z-index: 3;
}

.thumb-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--card) 92%, white);
  color: color-mix(in oklch, var(--foreground) 82%, var(--brand-700));
  border: 1px solid color-mix(in oklch, var(--primary) 18%, var(--border));
  box-shadow: none;
}

.thumb-delete:hover {
  background: color-mix(in oklch, var(--card) 92%, white);
  color: color-mix(in oklch, var(--foreground) 82%, var(--brand-700));
  border-color: color-mix(in oklch, var(--primary) 18%, var(--border));
}

.thumb-delete .icon {
  width: 16px;
  height: 16px;
}

.delete-icon-btn {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in oklch, var(--primary) 12%, var(--border));
  background: linear-gradient(180deg, #fff, color-mix(in oklch, var(--muted) 72%, white));
  color: color-mix(in oklch, var(--foreground) 88%, var(--brand-700));
}

.delete-icon-btn:hover {
  border-color: color-mix(in oklch, var(--primary) 56%, var(--border));
  color: var(--primary);
  background: color-mix(in oklch, var(--brand-50) 62%, white);
  box-shadow: none;
}

.delete-icon-btn .icon {
  width: 27px;
  height: 27px;
}

.upload-bottom-button {
  width: 100%;
  margin-top: auto;
}

.gallery-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 10px;
  scroll-behavior: smooth;
}

.share-gallery-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.gallery-card {
  flex: 0 0 300px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  height: auto;
  background: var(--muted);
  transition:
    box-shadow 0.2s var(--ease-out-quart),
    transform 0.2s var(--ease-out-quart),
    border-color 0.2s var(--ease-out-quart);
  box-shadow: var(--shadow-sm);
  background:
    linear-gradient(175deg, color-mix(in oklch, var(--accent-soft) 18%, var(--muted)) 0%, var(--muted) 100%);
}

.gallery-card.is-active {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: color-mix(in oklch, var(--primary) 26%, var(--border));
}

.gallery-card button {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f1f3f8;
}

.gallery-seq-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 560;
  letter-spacing: 0.02em;
}

.gallery-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
  position: relative;
}

.gallery-progress span {
  display: block;
  height: 100%;
  background: #111827;
  transition:
    width 0.2s ease,
    transform 0.2s ease;
  border-radius: 999px;
}

.hero-note {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 560;
  color: color-mix(in oklch, var(--foreground) 92%, var(--brand-700));
  line-height: 1.55;
  border: 1px solid color-mix(in oklch, var(--primary) 20%, var(--border));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.share-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid color-mix(in oklch, var(--primary) 16%, var(--border));
  box-shadow: var(--shadow-sm);
}

.share-title {
  margin: 0;
  font-size: clamp(30px, 2.2vw, 40px);
  font-weight: 640;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.feedback-list-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-head {
  align-items: flex-start;
}

.feedback-head-title .section-title {
  margin: 0;
}

.feedback-summary-grid {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid color-mix(in oklch, var(--primary) 18%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--card) 96%, white);
  overflow: hidden;
}

.feedback-summary-item {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-summary-item + .feedback-summary-item {
  border-left: 1px solid color-mix(in oklch, var(--primary) 14%, var(--border));
}

.feedback-summary-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.feedback-summary-value {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.share-feedback-form .form-actions {
  align-items: flex-end;
  margin-top: 16px;
}

.share-feedback-form .panel-title {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 18px;
}

.share-feedback-form .field {
  gap: 10px;
}

.share-feedback-form .field + .field {
  margin-top: 24px;
}

.share-feedback-form .field label {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.share-feedback-form .input,
.share-feedback-form .textarea {
  padding: 12px 14px;
}

.share-feedback-form .input {
  min-height: 52px;
}

.share-feedback-form .textarea {
  min-height: 200px;
}

.share-feedback-form .helper-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.share-feedback-form .button.button-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.share-feedback-form .button.button-primary:hover {
  background: var(--btn-primary-bg-hover);
}

.thumb-strip {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 4px;
}

.thumb-strip .thumb-card {
  flex: 0 0 112px;
  aspect-ratio: 112 / 150;
}

.feedback-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    box-shadow 0.2s var(--ease-out-expo),
    transform 0.2s var(--ease-out-expo),
    border-color 0.2s var(--ease-out-expo);
  border-color: color-mix(in oklch, var(--primary) 18%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card) 92%, white) 0%, var(--card) 100%);
}

.feedback-item-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.feedback-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.feedback-empty {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--muted);
  color: var(--muted-foreground);
  text-align: center;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}

.image-overlay {
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: zoom-out;
  z-index: 40;
}

.image-lightbox {
  width: min(1040px, 92vw);
  max-height: 88vh;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.image-lightbox img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: color-mix(in oklch, var(--foreground) 16%, #0f172a);
}

.thumb-preview-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}

.thumb-preview-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal {
  width: min(640px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.link-box {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--muted);
  padding: 14px;
  font-size: 14px;
  word-break: break-all;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  background: linear-gradient(180deg, color-mix(in oklch, var(--primary) 86%, white) 0%, var(--primary) 100%);
  color: var(--primary-foreground);
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}

.button .ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  pointer-events: none;
  background: color-mix(in oklch, white 64%, transparent);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-expand 650ms var(--ease-out-expo) forwards;
}

.button-outline .ripple,
.button-ghost .ripple {
  background: color-mix(in oklch, var(--primary) 18%, transparent);
}

.icon-trash svg,
.icon-upload-board svg,
.icon-feedback-fab svg {
  fill: currentColor;
  stroke: none;
}

.icon-upload-board {
  width: 40px;
  height: 40px;
}

.icon-feedback-fab {
  width: 22px;
  height: 22px;
}

.mobile-scheme-view,
.mobile-feedback-fab,
.mobile-feedback-backdrop {
  display: none;
}

.mobile-scheme-stage,
.mobile-scheme-scroll,
.mobile-scheme-frame,
.mobile-scheme-indicator {
  display: none;
}

.upload-empty .panel-title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: color-mix(in oklch, var(--muted-foreground) 88%, var(--foreground));
}

.page.page-enter > * {
  animation: fade-rise 0.56s var(--ease-out-quart) both;
}

.page.page-enter > *:nth-child(2) {
  animation-delay: 70ms;
}

.page.page-enter > *:nth-child(3) {
  animation-delay: 130ms;
}

.page.page-enter > *:nth-child(4) {
  animation-delay: 190ms;
}

.thumb-grid-wrap::-webkit-scrollbar,
.gallery-scroll::-webkit-scrollbar,
.thumb-strip::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.thumb-grid-wrap::-webkit-scrollbar-thumb,
.gallery-scroll::-webkit-scrollbar-thumb,
.thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(23, 23, 23, 0.22);
  border-radius: 999px;
}

.thumb-grid-wrap::-webkit-scrollbar-track,
.gallery-scroll::-webkit-scrollbar-track,
.thumb-strip::-webkit-scrollbar-track {
  background: rgba(23, 23, 23, 0.06);
  border-radius: 999px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple-expand {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page.page-enter > * {
    animation: none;
  }
}

@media (max-width: 960px) {
  .create-layout {
    grid-template-columns: 1fr;
  }

  .demo-card {
    grid-template-columns: 1fr;
  }

  .card-actions {
    justify-content: flex-start;
  }

  .feedback-summary-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .share-page {
    max-width: 100vw;
    gap: 0;
    width: calc(100% + 24px);
    margin: -20px -12px -48px;
  }

  .app-shell {
    padding-inline: 12px;
  }

  .hero-card,
  .create-panel,
  .upload-panel,
  .feedback-list-card {
    padding: 18px;
  }

  .page-title,
  .hero-headline {
    font-size: 28px;
  }

  .topbar,
  .section-head,
  .card-top,
  .card-foot,
  .form-actions,
  .feedback-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .share-topbar,
  .share-hero,
  .share-gallery-card,
  .share-feedback-form {
    display: none;
  }

  .mobile-scheme-stage {
    display: block;
    position: relative;
    min-height: 100vh;
    padding-bottom: 84px;
    background: #0b0d12;
  }

  .mobile-scheme-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-scheme-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-scheme-frame {
    display: block;
    flex: 0 0 100vw;
    width: 100vw;
    scroll-snap-align: start;
    background: #0b0d12;
  }

  .mobile-scheme-btn {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mobile-scheme-btn img {
    width: 100vw;
    height: auto;
    display: block;
  }

  .mobile-scheme-indicator {
    display: inline-flex;
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 56;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 560;
    letter-spacing: 0.02em;
    pointer-events: none;
  }

  .mobile-feedback-fab {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    border: 1px solid color-mix(in oklch, var(--primary) 26%, var(--border));
    background: #fff;
    color: color-mix(in oklch, var(--text-secondary) 88%, var(--primary));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  }

  .mobile-feedback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 54;
    display: block;
    background: rgba(15, 23, 42, 0);
    pointer-events: none;
    transition: background 0.24s var(--ease-out-quart);
  }

  .mobile-feedback-backdrop.is-open {
    background: rgba(15, 23, 42, 0.28);
    pointer-events: auto;
  }

  .mobile-feedback-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(102%);
    transition: transform 0.28s var(--ease-out-quart);
  }

  .mobile-feedback-sheet.is-open {
    transform: translateY(0);
  }

  .mobile-feedback-form {
    position: relative;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
    border: 1px solid color-mix(in oklch, var(--primary) 16%, var(--border));
    background: #fff;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.16);
  }

  .mobile-sheet-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid color-mix(in oklch, var(--primary) 18%, var(--border));
    background: #fff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-sheet-close .icon {
    width: 15px;
    height: 15px;
  }

  .mobile-feedback-form .panel-title {
    margin: 0 0 12px;
    padding-right: 42px;
    font-size: 21px;
    line-height: 1.25;
  }

  .mobile-feedback-form .field {
    gap: 8px;
  }

  .mobile-feedback-form .field + .field {
    margin-top: 14px;
  }

  .mobile-feedback-form .field label {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
  }

  .mobile-feedback-form .input {
    min-height: 48px;
  }

  .mobile-feedback-form .textarea {
    min-height: 132px;
  }

  .mobile-feedback-form .form-actions {
    margin-top: 14px;
    justify-content: flex-end;
  }
}
