/* ==========================================================================
   售后反馈 · 共享样式（设计令牌 + 基础组件），好评墙与后台共用
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --bg-glass: rgba(246, 245, 241, 0.86);
  --surface: #ffffff;
  --surface-2: #f4f2ed;
  --surface-3: #ebe8e1;
  --line: #e8e4dc;
  --line-strong: #d7d1c6;
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #736b65;

  --brand: #ea580c;
  --brand-btn: #c9460b;
  --brand-btn-hover: #b13d09;
  --on-brand: #ffffff;
  --brand-soft: #fff1e6;
  --brand-ink: #9a3412;
  --teal-soft: #e3f4f1;
  --teal-ink: #0f766e;
  --success-btn: #15803d;
  --success-btn-hover: #116932;
  --on-success: #ffffff;
  --success-soft: #e4f5e9;
  --success-ink: #166534;
  --warning-soft: #fdf1d8;
  --warning-ink: #a14b06;
  --danger-ink: #b91c1c;
  --danger-soft: #fdecec;
  --danger-line: #f3c4c4;
  --star: #f59e0b;
  --star-empty: #e3ded5;

  --overlay: rgba(28, 25, 23, 0.5);
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px -10px rgba(28, 25, 23, 0.14);
  --shadow-lg: 0 24px 64px -16px rgba(28, 25, 23, 0.35);
  --ring: 0 0 0 3px rgba(234, 88, 12, 0.28);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141210;
    --bg-glass: rgba(20, 18, 16, 0.84);
    --surface: #1d1a17;
    --surface-2: #26221e;
    --surface-3: #312c27;
    --line: #2e2924;
    --line-strong: #443d36;
    --text: #f3efe9;
    --text-2: #bdb5ab;
    --text-3: #978e84;

    --brand: #fb923c;
    --brand-btn: #fb923c;
    --brand-btn-hover: #fdab6a;
    --on-brand: #1c1917;
    --brand-soft: #3a2314;
    --brand-ink: #fdba74;
    --teal-soft: #0f2f2b;
    --teal-ink: #5eead4;
    --success-btn: #22c55e;
    --success-btn-hover: #4ade80;
    --on-success: #052e16;
    --success-soft: #0f2b19;
    --success-ink: #86efac;
    --warning-soft: #33250d;
    --warning-ink: #fcd34d;
    --danger-ink: #f87171;
    --danger-soft: #3a1717;
    --danger-line: #5c2626;
    --star: #fbbf24;
    --star-empty: #3d3731;

    --overlay: rgba(0, 0, 0, 0.62);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -10px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
    --ring: 0 0 0 3px rgba(251, 146, 60, 0.35);
  }
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

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

/* ---------- Icon ---------- */

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Button ---------- */

.btn {
  --btn-h: 40px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--btn-h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-lg { --btn-h: 48px; padding: 0 24px; font-size: 16px; }
.btn-sm { --btn-h: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--brand-btn); color: var(--on-brand); }
.btn-primary:hover:not([disabled]) { background: var(--brand-btn-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover:not([disabled]) { background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2); color: var(--text); }
.btn-success { background: var(--success-btn); color: var(--on-success); }
.btn-success:hover:not([disabled]) { background: var(--success-btn-hover); }
.btn-danger { border-color: var(--danger-line); color: var(--danger-ink); }
.btn-danger:hover:not([disabled]) { background: var(--danger-soft); }
.btn-danger-solid { background: var(--danger-ink); color: #fff; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }

.spinner {
  width: 16px; height: 16px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form ---------- */

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.field-label em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--text-3); }
.field-hint { font-size: 13px; color: var(--text-3); }
.field-error { font-size: 13px; color: var(--danger-ink); }
.counter { font-size: 12px; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }

.input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px; /* 小于 16px 时 iOS 聚焦会自动放大页面 */
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-3); opacity: 1; }
.input:hover { border-color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[aria-invalid="true"] { border-color: var(--danger-ink); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
textarea.input { min-height: 120px; resize: vertical; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Chip / Badge / Tag ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip[aria-pressed="true"] { border-color: transparent; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.chip-dashed { border-style: dashed; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.badge-customer { background: var(--teal-soft); color: var(--teal-ink); }
.badge-official { background: var(--brand-soft); color: var(--brand-ink); }
.badge-pending { background: var(--warning-soft); color: var(--warning-ink); }
.badge-approved { background: var(--success-soft); color: var(--success-ink); }
.badge-rejected { background: var(--surface-3); color: var(--text-2); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
}

/* ---------- Avatar / Stars ---------- */

.avatar {
  --h: 30;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  background: hsl(var(--h) 72% 93%);
  color: hsl(var(--h) 48% 30%);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}
@media (prefers-color-scheme: dark) {
  .avatar { background: hsl(var(--h) 26% 23%); color: hsl(var(--h) 72% 82%); }
}

.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; }
.stars .is-off { color: var(--star-empty); }

/* ---------- Segmented control ---------- */

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
}
.segmented button {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.segmented button:hover { color: var(--text); }
.segmented button:focus-visible { outline: none; box-shadow: var(--ring); }
.segmented button[aria-selected="true"],
.segmented button[aria-checked="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.08), 0 1px 6px -1px rgba(28, 25, 23, 0.1);
}
@media (prefers-color-scheme: dark) {
  .segmented { background: var(--surface-2); }
  .segmented button[aria-selected="true"],
  .segmented button[aria-checked="true"] { background: var(--surface-3); box-shadow: none; }
}

/* ---------- Review card ---------- */

.review-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rc-head { display: flex; align-items: center; gap: 12px; }
.rc-who { flex: 1; min-width: 0; }
.rc-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1;
  color: var(--text-3);
}
.rc-head .badge { align-self: flex-start; margin-top: 2px; }
.rc-text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.rc-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.rc-more {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.rc-more:hover { text-decoration: underline; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* 九宫格：单张按原比例，2/4 张两列，其余三列；格子尺寸保持一致 */
.media-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 12px; }
.media-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.media-grid.cols-2 { grid-template-columns: repeat(2, 1fr); width: calc((100% - 8px) / 3 * 2 + 4px); }
.media-grid.is-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 340px; }
.media-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: zoom-in;
}
.media-cell:focus-visible { outline: none; box-shadow: var(--ring); }
.media-cell.is-single { aspect-ratio: var(--ar, 1); width: var(--w, 240px); max-width: 100%; }
.media-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.media-cell img.is-loaded { opacity: 1; }
@media (hover: hover) {
  .media-cell:hover img { transform: scale(1.03); }
}
.media-cell.is-video { background: linear-gradient(145deg, #44403c, #1c1917); }
.media-play {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.media-play .icon { width: 16px; height: 16px; margin-left: 2px; }
.media-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

/* ---------- Skeleton / Empty ---------- */

.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 40%, var(--surface-2) 60%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { padding: 56px 16px; text-align: center; color: var(--text-3); }
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}
.empty-icon .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.empty h3 { margin-bottom: 4px; font-size: 16px; color: var(--text); }
.empty p { margin-bottom: 20px; font-size: 14px; }

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 3000;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: #1c1917;
  color: #fafaf9;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.is-shown { opacity: 1; transform: none; }
.toast-success .icon { color: #4ade80; }
.toast-error .icon { color: #f87171; }
@media (prefers-color-scheme: dark) {
  .toast { background: #f3efe9; color: #1c1917; }
  .toast-success .icon { color: #15803d; }
  .toast-error .icon { color: #b91c1c; }
}

/* ---------- Sheet（移动端底部弹层 / 桌面居中弹窗 / 后台右侧抽屉） ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.25s;
}
.sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.32s var(--ease), opacity 0.2s;
}
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-panel:focus { outline: none; }
.dialog-message { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.sheet-grip {
  width: 36px; height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--line-strong);
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 20px;
}
.sheet-title { padding-top: 6px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.sheet-subtitle { margin-top: 2px; font-size: 13px; color: var(--text-3); }
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 20px 24px;
  overscroll-behavior: contain;
}
.sheet-foot {
  display: flex;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet-foot:empty { display: none; }

@media (min-width: 640px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet-panel {
    max-width: 520px;
    max-height: min(860px, calc(100vh - 48px));
    border-radius: var(--radius-xl);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  .sheet.is-open .sheet-panel { opacity: 1; transform: none; }
  .sheet-foot { padding-bottom: 16px; }
}

.sheet.is-dialog { align-items: center; padding: 24px; }
.sheet.is-dialog .sheet-grip { display: none; }
.sheet.is-dialog .sheet-panel { max-width: 400px; border-radius: var(--radius-xl); opacity: 0; transform: scale(0.96); }
.sheet.is-dialog.is-open .sheet-panel { opacity: 1; transform: none; }
.sheet.is-dialog .sheet-foot { justify-content: flex-end; border-top: 0; padding-top: 4px; }

@media (min-width: 960px) {
  .sheet.is-drawer { align-items: stretch; justify-content: flex-end; padding: 0; }
  .sheet.is-drawer .sheet-panel {
    max-width: 560px;
    max-height: none;
    height: 100%;
    border-radius: 0;
    opacity: 1;
    transform: translateX(100%);
  }
  .sheet.is-drawer.is-open .sheet-panel { transform: none; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: #0c0a09;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}
.lightbox.is-open { opacity: 1; }
.lb-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 8px 16px 16px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}
.lb-bar > * { pointer-events: auto; }
.lb-count { font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0.9; }
.lb-actions { display: flex; gap: 8px; }
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn.is-round { width: 40px; padding: 0; }
.lb-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  height: 100%;
  padding: calc(60px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.lb-slide img, .lb-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}
/* 超长截图：按宽度铺开，纵向滚动阅读 */
.lb-slide.is-tall { align-items: flex-start; overflow-y: auto; }
.lb-slide.is-tall img { width: min(100%, 720px); max-height: none; }
.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  place-items: center;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}
.lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lb-nav.is-prev { left: 20px; }
.lb-nav.is-next { right: 20px; }
.lb-nav[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .lb-nav { display: grid; }
}

/* ---------- Media picker ---------- */

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.picker-item, .picker-add { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); }
.picker-item { overflow: hidden; background: var(--surface-2); }
.picker-item img { width: 100%; height: 100%; object-fit: cover; }
.picker-item.is-video { background: linear-gradient(145deg, #44403c, #1c1917); }
.picker-item.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
}
.picker-item .spinner { position: absolute; left: 50%; top: 50%; z-index: 1; margin: -8px 0 0 -8px; color: var(--brand); }
.picker-tag {
  position: absolute;
  left: 4px; bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
}
.picker-tag .icon { width: 11px; height: 11px; }
.picker-remove {
  position: absolute;
  top: 4px; right: 4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  cursor: pointer;
}
.picker-remove::before { content: ""; position: absolute; inset: -8px; }
.picker-remove .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.picker-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border: 1.5px dashed var(--line-strong);
  background: var(--surface);
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.picker-add:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.picker-add:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.picker-add input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picker-add .counter { font-size: 11px; }

/* ---------- Star input ---------- */

.star-input { display: flex; align-items: center; gap: 2px; }
.star-input button {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--star-empty);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s var(--ease);
}
.star-input button.is-on { color: var(--star); }
.star-input button:active { transform: scale(0.88); }
.star-input button:focus-visible { outline: none; box-shadow: var(--ring); }
.star-input .icon { width: 30px; height: 30px; }
.star-input-label { margin-left: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }

/* ---------- Tag input ---------- */

.tag-input { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-input .input {
  width: 128px;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
}

/* ---------- Motion ---------- */

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