/* ===== 轻处理 — "纸上的精密工具" ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette — Washi paper + Slate graphite */
  --bg:            #FAF8F4;
  --surface:       #FFFFFF;
  --surface-alt:   #F4F1EB;
  --surface-hover: #EDEAE3;
  --border:        #E7E2D9;
  --border-hover:  #D4CDC0;
  --border-active: #C0B8AA;

  --text:          #1E1B17;
  --text-secondary:#6B6660;
  --text-muted:    #9B958D;

  --primary:       #556B7A;
  --primary-hover: #455867;
  --primary-glow:  rgba(85,107,122,0.10);
  --primary-subtle:#EDF0F3;

  --accent:        #C87D4F;
  --accent-subtle: #FBF2EB;

  --green:         #6B9080;
  --green-subtle:  #EDF4F1;
  --red:           #C4665A;
  --red-subtle:    #FBF0EE;
  --amber:         #D4A24E;
  --amber-subtle:  #FDF6EB;

  --radius-xs: 6px; --radius-sm: 10px; --radius: 14px; --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
  --shadow:    0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.08);

  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono:    "SF Mono", "Cascadia Code", "Consolas", monospace;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 62px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ═══ 背景纹理 — 极淡纸纹 ═══ */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle 18px at 32px 32px, rgba(180,170,155,0.10) 0%, transparent 60%),
    radial-gradient(circle 18px at calc(100% - 32px) 32px, rgba(180,170,155,0.10) 0%, transparent 60%),
    radial-gradient(circle 18px at 32px calc(100% - 32px), rgba(180,170,155,0.10) 0%, transparent 60%),
    radial-gradient(circle 18px at calc(100% - 32px) calc(100% - 32px), rgba(180,170,155,0.10) 0%, transparent 60%);
  background-repeat: no-repeat;
}

/* ══════ Header ══════ */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.logo-link {
  display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text);
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: white;
  box-shadow: 0 2px 6px rgba(85,107,122,0.16);
}
.logo-text {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em;
}
.nav { display: flex; align-items: center; gap: 10px; }
.nav-badge {
  --nav-dot-color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.84rem; font-weight: 700;
  background: var(--surface); color: var(--text-secondary);
  padding: 6px 18px; border-radius: 22px;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}
.nav-badge::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--nav-dot-color); margin-right: 6px; vertical-align: middle;
  transition: background 0.3s ease;
}
.nav-lock {
  font-size: 0.84rem; font-weight: 600; color: var(--text-secondary);
  padding: 6px 14px; display: flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); border-radius: 22px;
  background: var(--surface);
}
.btn-upgrade-nav {
  font-size: 0.86rem; font-weight: 700;
  background: var(--primary); color: white; border: none;
  padding: 8px 22px; border-radius: 22px; cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.btn-upgrade-nav:hover {
  background: var(--primary-hover); transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(85,107,122,0.24);
}

/* ══════ Hero ══════ */
.hero { text-align: center; padding: 72px 0 28px; }

/* ══════ Hero Mascot — 小眼睛机器人 ══════ */
.hero-mascot {
  position: relative; width: 100px; height: 110px; margin: 0 auto 12px;
  animation: bot-float 3.5s ease-in-out infinite;
}
@keyframes bot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bot { position: relative; width: 100%; height: 100%; }

/* 天线 */
.bot-antenna {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 4px; height: 20px; background: var(--primary); border-radius: 2px; z-index: 2;
}
.bot-blink {
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  animation: bot-blink-glow 1.5s ease-in-out infinite;
}
@keyframes bot-blink-glow {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 4px var(--accent); }
  50% { opacity: 1; box-shadow: 0 0 10px var(--accent); }
}

/* 头部 */
.bot-head {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 82px;
  background: linear-gradient(165deg, #A3B5C4 0%, #7D93A5 50%, #667E91 100%);
  border-radius: 20px;
  box-shadow:
    0 8px 22px rgba(85,107,122,0.24),
    inset 0 -5px 10px rgba(0,0,0,0.10),
    inset 0 3px 8px rgba(255,255,255,0.12);
}

/* 小眼睛 */
.bot-eye {
  position: absolute; top: 26px; width: 8px; height: 8px;
  background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 5px var(--accent);
}
.bot-eye:first-of-type { left: 22px; }
.bot-eye:last-of-type  { right: 22px; }

/* 嘴 */
.bot-mouth {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 4px; background: var(--accent); border-radius: 2px;
  opacity: 0.55;
}

/* 螺栓耳朵 */
.bot-bolt {
  position: absolute; top: 30px; width: 8px; height: 8px;
  background: var(--primary-hover); border-radius: 2px;
  border: 1px solid #667F93;
}
.bolt-l { left: -6px; }
.bolt-r { right: -6px; }

/* 阴影 */
.bot-shadow {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 12px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.08) 0%, transparent 70%);
  animation: bot-sh 3.5s ease-in-out infinite;
}
@keyframes bot-sh {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(0.82); opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 900;
  letter-spacing: -0.04em; margin-bottom: 8px; line-height: 1.15;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), #7A95A8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc {
  color: var(--text-secondary); font-size: 0.94rem; line-height: 1.65;
  max-width: 460px; margin: 0 auto;
}
.hero-desc strong { color: var(--text); font-weight: 700; }

/* ══════ Tools Grid — 横排换行 ══════ */
.tools-section-label {
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--text); padding: 22px 0 8px; margin: 0;
}
.tools-section-label:first-of-type { padding-top: 4px; }
.tools-section-label .count {
  font-weight: 500; color: var(--text-muted); font-size: 0.72rem;
  margin-left: 4px;
}

.tools-row {
  display: flex; gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0 24px;
}

/* 大卡片 · 自动填满一行6个 */
.tool-card {
  flex: 1 1 calc((100% - 70px) / 6);
  min-width: 155px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.3, 0, 0.2, 1);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(85,107,122,0.12);
}
.tool-card:active { transform: translateY(-1px); }

.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.3, 0, 0.2, 1);
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-icon-block { font-size: 1.9rem; line-height: 1; }
.tool-card h3 {
  font-family: var(--font-display); font-size: 0.98rem; font-weight: 700;
}
.tool-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }

.tool-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--accent-subtle); color: var(--accent);
  padding: 3px 8px; border-radius: 5px;
  text-transform: uppercase;
}

/* ══════ Tool Area ══════ */
.tool-area {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; overflow-x: hidden;
  background: var(--bg);
  padding: 76px 0 56px;
  animation: fadeUp 0.2s cubic-bezier(0.4,0,0.2,1);
}
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }

.tool-area-inner { max-width: 780px; margin: 0 auto; padding: 0 28px; }
.tool-area h2 {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  margin-bottom: 2px; letter-spacing: -0.02em;
}
.tool-area .tool-desc { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.85rem; }

.back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-secondary); font-size: 0.84rem; font-weight: 600;
  margin-bottom: 20px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  padding: 7px 16px; border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.back-btn:hover {
  background: var(--primary); color: white; border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ══════ Drop Zone ══════ */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: all 0.25s ease; background: var(--surface-alt);
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary); background: var(--primary-subtle); border-style: solid;
}
.drop-zone .dz-icon { font-size: 2.4rem; margin-bottom: 8px; transition: transform 0.25s; }
.drop-zone:hover .dz-icon { transform: translateY(-3px); }
.drop-zone .dz-title { font-size: 0.96rem; font-weight: 700; }
.drop-zone .dz-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ══════ File List ══════ */
.file-list { margin-top: 16px; }
.file-list-header {
  font-size: 0.76rem; color: var(--text-muted); margin-bottom: 8px;
  font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.file-list-header strong { color: var(--primary); font-variant-numeric: tabular-nums; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 5px;
  transition: all 0.15s ease; gap: 10px;
}
.file-item:hover { background: var(--primary-subtle); border-color: var(--border-hover); }
.file-item.sortable { cursor: grab; user-select: none; }
.file-item.sortable:active { cursor: grabbing; }
.file-item.dragging { opacity: 0.4; transform: scale(0.97); }
.file-item.drag-over {
  border-color: var(--primary); background: var(--primary-subtle);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.file-thumb {
  width: 40px; height: 40px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--border); flex-shrink: 0; background: white;
}
.file-icon {
  width: 40px; height: 40px; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.file-name {
  font-size: 0.84rem; font-weight: 500; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-size {
  font-size: 0.74rem; color: var(--text-muted); margin: 0 14px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.file-remove {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 1rem; padding: 3px 5px; line-height: 1; border-radius: var(--radius-xs);
  transition: all 0.12s ease;
}
.file-remove:hover { color: white; background: var(--red); }

/* ══════ Buttons ══════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 700; cursor: pointer; border: none;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
  position: relative; z-index: 1;
}
.btn-primary:hover {
  background: var(--primary-hover); transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(85,107,122,0.24);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: #DDE0E4; color: #A8B0B8; cursor: not-allowed;
  box-shadow: none; transform: none;
}
.btn-secondary {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.btn-lg { padding: 13px 32px; font-size: 0.96rem; border-radius: var(--radius-sm); }
.action-bar { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ══════ Progress ══════ */
.progress-wrap { margin-top: 22px; display: none; }
.progress-wrap.active { display: block; animation: fadeUp 0.2s ease; }
.progress-bar {
  height: 5px; background: var(--border); border-radius: 8px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), #7A95A8);
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1); width: 0%;
}
.progress-text { font-size: 0.76rem; color: var(--text-secondary); margin-top: 5px; font-weight: 500; }

/* ══════ Settings ══════ */
.settings-row { display: flex; gap: 20px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.setting-group { display: flex; flex-direction: column; gap: 4px; }
.setting-group label {
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.setting-group select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.86rem; background: var(--surface); cursor: pointer; min-width: 120px;
  transition: border-color 0.2s;
}
.setting-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 5px; background: var(--border); border-radius: 8px; min-width: 140px; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); border: 3px solid white;
  box-shadow: var(--shadow-md); cursor: pointer; transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15); box-shadow: 0 0 0 6px var(--primary-glow);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); border: 3px solid white;
  box-shadow: var(--shadow-md); cursor: pointer;
}
.range-value {
  font-size: 0.82rem; color: var(--primary); font-weight: 800;
  min-width: 36px; display: inline-block; font-variant-numeric: tabular-nums;
}

/* ══════ Result ══════ */
.result-area {
  margin-top: 24px; padding: 20px 22px;
  background: var(--green-subtle); border: 1px solid #B8D8C8;
  border-radius: var(--radius); display: none;
  animation: fadeUp 0.3s ease;
}
.result-area.active { display: block; }
.result-title { font-weight: 800; color: #3D6B58; margin-bottom: 8px; font-size: 0.96rem; }
.result-stats {
  font-size: 0.8rem; color: #4A7A66; margin-bottom: 14px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.result-stats span {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.7); padding: 4px 12px;
  border-radius: var(--radius-xs); font-weight: 500; font-variant-numeric: tabular-nums;
}

/* ══════ Input ══════ */
.input {
  padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.88rem; width: 100%; background: var(--surface);
  transition: all 0.2s ease;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.input::placeholder { color: #BFB8AE; }

/* ══════ Toast ══════ */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--text); color: white; padding: 13px 30px;
  border-radius: 12px; font-size: 0.86rem; font-weight: 600;
  z-index: 2000; box-shadow: var(--shadow-xl);
  transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
  text-align: center; min-width: 180px;
}
.toast.hidden { opacity: 0; transform: translate(-50%,-50%) scale(0.92); pointer-events: none; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ══════ Limit Banner ══════ */
.limit-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--text); color: white;
  padding: 14px 28px; z-index: 999;
}
.limit-banner.hidden { display: none; }
#btn-upgrade { position: relative; z-index: 10; padding: 11px 26px; min-height: 44px; cursor: pointer; }
.limit-content { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; }
.limit-icon { font-size: 1.6rem; }
.limit-text strong { display: block; font-size: 0.92rem; font-weight: 800; }
.limit-text p { font-size: 0.78rem; opacity: 0.72; }

/* ══════ Modal ══════ */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  animation: fadeModal 0.2s ease;
}
@keyframes fadeModal { from { opacity: 0; } to { opacity: 1; } }
.modal.hidden { display: none; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(18,16,13,0.45);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.modal-content {
  position: relative; background: var(--surface);
  border-radius: var(--radius-lg); padding: 34px 30px 26px;
  max-width: 440px; width: 92%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleModal 0.26s cubic-bezier(0.4,0,0.2,1);
}
@keyframes scaleModal {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 12px; right: 16px; font-size: 1.5rem;
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }
.modal-content h2 {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  text-align: center; letter-spacing: -0.02em;
}
.price {
  text-align: center; font-size: 2.6rem; font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary), #7A95A8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: 4px 0 14px; line-height: 1;
}
.price span { font-size: 1rem; font-weight: 800; -webkit-text-fill-color: var(--text); }
.feature-list { list-style: none; margin-bottom: 20px; }
.feature-list li {
  padding: 4px 0; font-size: 0.84rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 7px;
}
.pay-methods { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; }
.pay-option {
  text-align: center; padding: 12px; border-radius: 12px;
  border: 2px solid transparent; cursor: pointer; transition: all 0.2s;
}
.pay-option:hover { background: var(--surface-hover); }
.pay-option.active {
  border-color: var(--primary); background: var(--primary-subtle);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.pay-option span { display: block; font-size: 0.76rem; margin-top: 6px; color: var(--text-muted); font-weight: 700; }
.pay-qr-img { width: 120px; height: 120px; border: 2px solid var(--border); border-radius: 12px; object-fit: contain; background: white; }
.pay-qr-placeholder { width: 120px; height: 120px; background: var(--surface-hover); border: 2px dashed var(--border); border-radius: 12px; display: none; align-items: center; justify-content: center; font-size: 0.68rem; color: var(--text-muted); text-align: center; padding: 8px; line-height: 1.4; }
.pay-note { font-size: 0.76rem; color: var(--text-muted); text-align: center; margin-bottom: 12px; line-height: 1.5; }
.wx-qr-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 2px; }
.wx-qr-img { width: 130px; height: 130px; border: 3px solid var(--green); border-radius: 14px; object-fit: contain; box-shadow: 0 0 0 4px rgba(107,144,128,0.06); }
.pay-contact { display: flex; gap: 8px; }
.pay-contact .input { flex: 1; }

/* ══════ Footer ══════ */
.footer {
  margin-top: auto; text-align: center; padding: 28px 0;
  color: var(--text); font-size: 0.84rem; font-weight: 600;
  border-top: 1px solid var(--border);
}
.footer p { display: flex; align-items: center; justify-content: center; gap: 5px; }
.footer-small { font-size: 0.78rem; margin-top: 4px; opacity: 0.7; }
.footer-small button { text-decoration: underline; }

/* ══════ Crop UI ══════ */
.crop-area { margin-bottom: 18px; }
.crop-wrapper {
  position: relative; margin: 0 auto; background: #E8E5DF;
  border-radius: var(--radius); overflow: hidden; user-select: none;
}
.crop-wrapper canvas { display: block; }

/* ══════ Thumbnail Grid ══════ */
.thumb-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px; padding: 10px;
  background: var(--surface-alt); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.thumb-item {
  cursor: pointer; border: 2px solid transparent;
  border-radius: 4px; overflow: hidden; transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center;
  background: white;
}
.thumb-item:hover { border-color: var(--border-hover); }
.thumb-item.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }
.thumb-item canvas { display: block; width: 80px; height: auto; }
.thumb-item span {
  font-size: 0.68rem; color: var(--text-muted); font-weight: 600;
  padding: 2px 0 4px; font-variant-numeric: tabular-nums;
}
.thumb-item.selected span { color: var(--primary); }
.hidden { display: none !important; }

/* ══════ Responsive ══════ */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  body { padding-top: 56px; }
  .tool-area { padding: 68px 0 36px; }
  .tool-area-inner { padding: 0 16px; }
  .hero { padding: 44px 0 18px; }
  .hero-mascot { width: 80px; height: 88px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-desc { font-size: 0.84rem; }
  .tools-row { gap: 10px; }
  .tool-card { flex: 1 1 calc((100% - 10px) / 2); min-width: 140px; padding: 16px 14px 14px; }
  .tool-card p { font-size: 0.7rem; }
  .pay-methods { flex-direction: column; align-items: center; }
  .pay-contact { flex-direction: column; }
  .limit-content { flex-direction: column; text-align: center; }
  .settings-row { gap: 12px; }
  .result-stats { gap: 8px; flex-direction: column; }
  .header .container { padding: 0 16px; }
  .nav { gap: 5px; flex-wrap: wrap; }
  .nav-badge { font-size: 0.74rem; padding: 4px 12px; }
  .nav-lock { display: none; }
}
