/* Image Format Converter — 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;
  --warning: #b45309;
  --danger: #c0392b;
  --success: #1e7e34;
  --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); }

/* Global controls */
.global-bar { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.global-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.field { display: block; }
.field.inline { min-width: 180px; }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.field-label .en { color: var(--quiet); font-weight: 400; font-size: 12px; }
select, input[type="range"] { width: 100%; }
select { padding: 10px 12px; border: 1px solid var(--control-line); border-radius: var(--control-radius); background: var(--surface); font-size: 15px; line-height: 1.5; }
select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(0 113 227 / .15); }
input[type="range"] { accent-color: var(--accent); height: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.global-actions { margin-top: 16px; }
.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); }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.summary { margin-top: 16px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.summary strong { color: var(--ink); }
.summary .saved { color: var(--success); }

/* File list */
.file-list-card { padding-top: 24px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.file-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; background: var(--surface); }
.file-item.error { border-color: rgb(192 57 43 / .4); }
.thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--canvas); border: 1px solid var(--line); }
.thumb-placeholder { display: grid; place-items: center; font-size: 12px; color: var(--quiet); text-align: center; padding: 4px; }
.file-main { min-width: 0; }
.file-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin-top: 4px; font-size: 13px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.file-meta .arrow { color: var(--muted); }
.file-meta .out-size { color: var(--ink); font-weight: 500; }
.file-meta .saved { color: var(--success); }
.file-warn { margin-top: 4px; font-size: 12px; color: var(--warning); }
.file-error { margin-top: 4px; font-size: 12px; color: var(--danger); }
.file-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-controls select { width: auto; min-width: 92px; padding: 6px 8px; font-size: 13px; }
.quality-mini { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quality-mini input[type="range"] { width: 90px; height: 28px; }
.file-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--wash); color: var(--muted); white-space: nowrap; }
.file-badge.converting { background: rgb(0 113 227 / .12); color: var(--accent); }
.file-badge.done { background: rgb(30 126 52 / .12); color: var(--success); }
.file-badge.error { background: rgb(192 57 43 / .12); color: var(--danger); }
@media (max-width: 640px) {
  .file-item { grid-template-columns: 56px 1fr; }
  .thumb { width: 56px; height: 56px; }
  .file-controls { grid-column: 1 / -1; }
}

.hint { font-size: 13px; color: var(--quiet); line-height: 1.5; margin: 16px 0 0; }

/* Notes */
.notes ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.7; color: var(--muted); font-size: 15px; }
.notes li + li { margin-top: 8px; }
.notes strong { color: var(--ink); }
.fineprint { font-size: 12px; color: var(--quiet); line-height: 1.6; }

.site-footer { padding-bottom: 32px; text-align: center; font-size: 13px; color: var(--quiet); }
