/* Toon90 — 90s retro style, mobile-first（遵循 playbook 移动端检查要点） */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1033;
  --card: #fffdf5;
  --ink: #241b3a;
  --accent: #ff5c39;
  --accent2: #ffb347;
  --muted: #6b6480;
}

body {
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 20px, transparent 20px 40px);
  color: var(--ink);
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 20px; max-width: 720px; margin: 0 auto;
}
.brand {
  font-size: 26px; font-weight: 900; letter-spacing: 1px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--accent);
}
.tagline { color: #c9bfe8; font-size: 14px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }

.card {
  background: var(--card);
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.35);
  padding: 24px 20px;
  margin-bottom: 22px;
}

h1 { font-size: 26px; line-height: 1.25; margin-bottom: 10px; }
h2 { font-size: 19px; margin-bottom: 10px; }
.sub { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }

.upload { text-align: center; padding: 18px 6px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }

button.primary {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #fff; font-size: 16.5px; font-weight: 700;
  border: 3px solid var(--ink); border-radius: 10px;
  padding: 13px 22px; width: 100%; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
button.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
button.primary:disabled { opacity: 0.6; cursor: wait; }

.preview { text-align: center; }
.preview img {
  max-width: 100%; max-height: 300px;
  border: 3px solid var(--ink); border-radius: 8px;
  margin-bottom: 14px;
}

.status { margin-top: 12px; font-size: 14px; color: #1f7a33; }
.status.err { color: #c0392b; }

.result { text-align: center; }
.frame {
  position: relative; display: inline-block;
  border: 8px double var(--ink); border-radius: 10px;
  background: #f3ecd8; padding: 6px;
  max-width: 100%;
}
.frame img { display: block; max-width: 100%; max-height: 60vh; border-radius: 6px; }

.wm {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around;
}
.wm span {
  transform: rotate(-24deg);
  font-size: 15px; font-weight: 800; color: rgba(255,255,255,0.75);
  text-shadow: 0 0 4px rgba(0,0,0,0.45);
  white-space: nowrap; padding: 0 10px;
}

.lock-note {
  margin-top: 14px; background: #fff3e0;
  border: 2px solid var(--accent); border-radius: 10px;
  padding: 14px; font-size: 14.5px; text-align: left;
}
.lock-note b { color: var(--accent); }

#dlBtn { margin-top: 14px; }

.how ol { margin: 10px 0 10px 22px; font-size: 14.5px; line-height: 1.7; }
.how .hint { margin-top: 8px; }

.foot {
  text-align: center; color: #b7aede; font-size: 13px;
  padding: 0 16px 34px; max-width: 720px; margin: 0 auto;
}
.foot a { color: #e8e2ff; }
.legal { margin-top: 8px; font-size: 11.5px; color: #857aa8; }

/* paywall modal */
.paywall {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(15,8,35,0.72);
  align-items: center; justify-content: center; padding: 18px;
}
.paywall.show { display: flex; }
.paywall .box {
  background: var(--card); border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.4);
  max-width: 380px; width: 100%; padding: 22px 20px;
  position: relative; text-align: center; max-height: 88vh; overflow: auto;
}
.paywall .close {
  position: absolute; top: 8px; right: 14px;
  font-size: 26px; cursor: pointer; color: var(--muted);
}
.paywall h3 { font-size: 20px; margin-bottom: 8px; }
.paywall .price { font-size: 30px; font-weight: 900; color: var(--accent); margin: 8px 0; }
.paywall .price small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.paywall ul { list-style: none; margin: 12px 0; text-align: left; }
.paywall li { font-size: 14px; padding: 6px 0 6px 24px; position: relative; }
.paywall li::before { content: '✓'; position: absolute; left: 2px; color: #1f7a33; font-weight: 900; }
.pw-status { font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 8px; }
.lock-badge { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

.block-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700; margin: 12px 0 6px;
}
button.copy {
  background: #efe9d8; border: 2px solid var(--ink); border-radius: 6px;
  font-size: 12px; padding: 3px 10px; cursor: pointer;
}
textarea {
  width: 100%; border: 2px solid var(--ink); border-radius: 8px;
  font-size: 12px; padding: 8px; font-family: monospace; word-break: break-all;
}
.field { display: block; margin: 12px 0; text-align: left; }
.field span { font-size: 13px; font-weight: 700; display: block; margin-bottom: 6px; }

@media (max-width: 480px) {
  h1 { font-size: 22px; }
  .card { padding: 18px 14px; }
  .wm span { font-size: 12px; }
}
