/* 去印 Erase — Apple minimalist, light theme.
   Design tokens match rabbitshop.uk (style.css): #f5f5f7 canvas,
   #1d1d1f ink, #0071e3 accent, SF Pro / PingFang SC. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  --canvas: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #65656b;
  --quiet: #86868b;
  --line: rgb(0 0 0 / .06);
  --control-line: rgb(0 0 0 / .14);
  --wash: rgb(0 0 0 / .045);
  --accent: #0071e3;
  --accent-hover: #0065cc;
  --accent-ink: #fff;
  --danger: #c0392b;
  --success: #1e7e34;
  --mask-red: #ff2d55;
  --card-radius: 24px;
  --control-radius: 8px;
  --motion: .2s cubic-bezier(.16, 1, .3, 1);
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 600; line-height: 1.14; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: min(calc(100% - 48px), 1080px); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .78); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.topbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.header-note { font-size: 13px; color: var(--muted); }

main { padding-block: 48px 64px; display: grid; gap: 20px; }

/* Intro */
.intro { text-align: center; margin-bottom: 20px; }
.intro h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.subtitle { margin-top: 6px; font-size: 15px; color: var(--quiet); letter-spacing: .04em; text-transform: uppercase; }
.lede { margin-top: 16px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.badges { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; font-weight: 500; color: var(--muted); }
.badges li::before { content: ""; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: clamp(20px, 3vw, 32px); }
.section-title { font-size: 17px; margin-bottom: 16px; }
.section-title .en { color: var(--quiet); font-weight: 400; font-size: 13px; }

/* Dropzone */
.dropzone { border: 2px dashed var(--control-line); border-radius: 16px; padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color var(--motion), background-color var(--motion); }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.drag-over { border-color: var(--accent); background: rgb(0 113 227 / .06); }
.drop-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.drop-title { font-size: 17px; font-weight: 500; }
.drop-link { color: var(--accent); }
.drop-sub { margin-top: 8px; font-size: 13px; color: var(--quiet); }

.status { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.status.error { color: var(--danger); }
.engine-status { min-height: 18px; margin: 6px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
#engine-progress { display: block; width: min(420px, 100%); margin: 8px auto 0; accent-color: var(--accent); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 16px; }
.tool-field { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.tool-field input[type="range"] { width: 160px; accent-color: var(--accent); }
.tool-field output { font-variant-numeric: tabular-nums; color: var(--ink); min-width: 48px; }
.mode-group { display: flex; gap: 14px; border: 0; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.mode-group legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mode-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mode-group input { accent-color: var(--accent); }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.check-row input { accent-color: var(--accent); }
.check-row.inline { margin: 0; }

/* Stage */
.stage-wrap { position: relative; width: 100%; max-width: 920px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #e8e8ed; touch-action: none; }
#stage { display: block; width: 100%; height: auto; cursor: crosshair; }
.brush-cursor { position: absolute; pointer-events: none; border: 2px solid var(--mask-red); border-radius: 50%; box-shadow: 0 0 0 1px rgb(255 255 255 / .7); }
.hint { margin-top: 12px; font-size: 13px; color: var(--quiet); line-height: 1.6; }
.compare-field { margin-top: 4px; }
.compare-field input[type="range"] { flex: 1; min-width: 160px; }
.result-info { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-row.actions { margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--control-radius); font-size: 14px; font-weight: 500; transition: background-color var(--motion), transform var(--motion); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.secondary { background: var(--wash); color: var(--ink); min-height: 36px; padding: 6px 14px; }
.btn.secondary:hover { background: rgb(0 0 0 / .08); }

/* Notes */
.notes { background: var(--canvas); }
.note-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.note-list strong { color: var(--ink); }

/* Footer */
.site-footer { padding-block: 20px; text-align: center; font-size: 13px; color: var(--quiet); }
.brand-line { text-align: center; color: var(--muted); font-size: 12.5px; letter-spacing: .14em; padding: 20px 0 28px; margin: 0; }

@media (max-width: 640px) {
  main { padding-block: 32px 48px; }
  .toolbar { gap: 12px 16px; }
}
