:root {
  color-scheme: light;
  --paper: #fffafc;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(255, 244, 248, 0.82);
  --ink: #32272b;
  --muted: #8b747d;
  --line: #eed9e1;
  --accent: #e9658b;
  --accent-dark: #c94770;
  --accent-soft: #ffe0e9;
  --gold: #e8b84b;
  --shadow: 0 18px 46px rgba(167, 91, 116, 0.15);
  --ease: cubic-bezier(.2, 0, 0, 1);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: transparent;
}

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

button { color: inherit; }

.app-shell {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.app-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.app-header p { margin: 0; color: var(--muted); line-height: 1.65; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
}

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s ease;
}

.icon-btn { width: 42px; padding: 0; }

.btn:hover, .icon-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(167,91,116,.13); }
.btn:active, .icon-btn:active { transform: scale(.97); }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.active, .icon-btn.active { color: var(--accent-dark); border-color: #f4abc0; background: var(--accent-soft); }
.btn.danger { color: #b42d52; background: #fff2f5; }

.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: .82rem; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.95);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #ef93ad;
  box-shadow: 0 0 0 3px rgba(233,101,139,.13);
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 20px;
  text-align: center;
  border: 2px dashed #edb2c3;
  border-radius: 16px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: #fff0f5; transform: translateY(-2px); }
.dropzone strong { display: block; margin-bottom: 5px; }
.dropzone span { color: var(--muted); font-size: .88rem; }

.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;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 15px;
  color: #fff;
  background: rgba(50,39,43,.94);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0,0,0,.2);
  animation: toast-in .25s var(--ease) both;
}

@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (max-width: 720px) {
  .app-shell { padding: 12px; }
  .app-header { align-items: stretch; flex-direction: column; }
  .toolbar { gap: 7px; }
  .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
