/* HitPost — lihaila.com design tokens, so it reads as a Lihai La product. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --bg: #fbfbfa; --bg-raised: #ffffff; --bg-sunken: #f3f3f1;
  --text: #16161a; --text-muted: #5c5c66; --text-faint: #8a8a94;
  --border: #e9e9e5; --border-strong: #d8d8d2;
  --accent: #2f5d50; --accent-text: #ffffff; --accent-soft: #e8f0ed; --accent-2: #7fbfa8;
  --good: #2f7d4f; --good-soft: #e5f2ea; --warn: #9a6a00; --bad: #b23b3b; --bad-soft: #f9e6e6;
  --radius: 14px; --radius-s: 9px; --maxw: 920px;
  --gutter: clamp(16px, 5vw, 40px);
  --shadow-1: 0 1px 2px rgba(20,20,26,.05), 0 1px 3px rgba(20,20,26,.04);
  --shadow-2: 0 4px 6px -2px rgba(20,20,26,.06), 0 12px 24px -6px rgba(20,20,26,.09);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121215; --bg-raised: #1a1a1f; --bg-sunken: #0d0d10;
    --text: #f0f0ee; --text-muted: #a3a3ad; --text-faint: #74747e;
    --border: #26262c; --border-strong: #34343c;
    --accent: #7fbfa8; --accent-text: #0d1f1a; --accent-soft: #1b2a25; --accent-2: #2f5d50;
    --good: #6cc08f; --good-soft: #17271e; --warn: #e0b04a; --bad: #e57d7d; --bad-soft: #2c1a1a;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 4px 6px -2px rgba(0,0,0,.4), 0 12px 24px -6px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #121215; --bg-raised: #1a1a1f; --bg-sunken: #0d0d10;
  --text: #f0f0ee; --text-muted: #a3a3ad; --text-faint: #74747e;
  --border: #26262c; --border-strong: #34343c;
  --accent: #7fbfa8; --accent-text: #0d1f1a; --accent-soft: #1b2a25; --accent-2: #2f5d50;
  --good: #6cc08f; --good-soft: #17271e; --warn: #e0b04a; --bad: #e57d7d; --bad-soft: #2c1a1a;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 4px 6px -2px rgba(0,0,0,.4), 0 12px 24px -6px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.021em; font-weight: 640; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); letter-spacing: -0.032em; }
h3 { font-size: 1.02rem; }
a { color: inherit; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-muted); } .faint { color: var(--text-faint); } .small { font-size: .86rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand, .product-name { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.brand .logo { width: 22px; height: 22px; fill: var(--accent); }
.divider { width: 1px; height: 20px; background: var(--border-strong); }
.spark { width: 22px; height: 22px; fill: var(--accent); }
.spark circle { fill: var(--accent-2); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; cursor: pointer; color: var(--text-muted); }
.icon-btn:hover { background: var(--bg-sunken); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: .86rem; padding: 6px 8px; border-radius: 8px; }
.lang-btn:hover { background: var(--bg-sunken); color: var(--text); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; } :root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-sun { display: none; } :root:not([data-theme="light"]) .icon-moon { display: block; } }
@media (max-width: 560px) {
  .brand span { display: none; }
  /* Phones: keep the header to one row. The theme follows the system there, and the credits
     chip shrinks to the spark (plus the number when there are credits). */
  .brand-row { gap: 9px; }
  .header-row { gap: 6px; }
  .header-actions { gap: 0; }
  .icon-btn { width: 34px; height: 34px; }
  .lang-btn { padding: 6px 6px; }
  #account { margin-left: 2px; gap: 4px; }
}
.lang-btn, .product-name { white-space: nowrap; }
.divider { flex: none; }
@media (max-width: 360px) { #historyBtn { display: none; } }

/* account */
#account { margin-left: 6px; display: flex; align-items: center; gap: 6px; }
.x-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--text); color: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: .86rem; font-weight: 560; cursor: pointer; text-decoration: none; white-space: nowrap; }
.x-btn svg { width: 14px; height: 14px; fill: currentColor; }
.x-btn:hover { opacity: .88; }
.me { position: relative; }
.me-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 3px 8px 3px 3px; border-radius: 999px; }
.me-btn:hover { background: var(--bg-sunken); }
.me-btn img, .me-btn .initial { width: 30px; height: 30px; border-radius: 50%; }
.me-btn .initial { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-style: normal; font-weight: 650; font-size: .86rem; }
.me-btn span { font-size: .86rem; font-weight: 560; }
@media (max-width: 560px) { .me-btn span, .x-btn .x-label { display: none; } .x-btn { padding: 8px 10px; } }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.menu button:hover { background: var(--bg-sunken); }
.menu .menu-topup { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu .menu-bal { display: inline-flex; align-items: center; gap: 4px; font-weight: 620; color: var(--accent); font-variant-numeric: tabular-nums; }
.menu .menu-bal b { font-weight: inherit; }
.menu .menu-bal svg { width: 12px; height: 12px; fill: currentColor; }
.menu .menu-meta { padding: 6px 10px 8px; font-size: .8rem; color: var(--text-faint); border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* hero */
.hero { padding-top: clamp(36px, 7vw, 72px); padding-bottom: 26px; text-align: center; }
.lede { max-width: 620px; margin: 14px auto 0; font-size: 1.08rem; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 560; color: var(--text-muted); background: var(--bg-raised); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px 4px 8px; margin-bottom: 16px; }
.badge svg { width: 16px; height: 16px; fill: #1d9bf0; }
.gate-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; background: var(--bg-sunken); border-radius: 10px; font-size: .9rem; color: var(--text-muted); }

.promo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; position: relative; }
.promo img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.promo-text { display: grid; gap: 1px; flex: 1; min-width: 0; font-size: .92rem; }
.promo-x { width: 28px; height: 28px; flex: none; }
.promo-x svg { width: 14px; height: 14px; }
@media (max-width: 560px) { .promo { flex-wrap: wrap; } .promo-actions { order: 3; width: 100%; } .promo-actions .btn { width: 100%; } }
.nudge { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 0; font-size: .9rem; color: var(--text-muted); }

/* composer */
.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.composer { padding: 18px; }
.composer textarea { width: 100%; border: 0; resize: vertical; background: transparent; font-size: 1.05rem; line-height: 1.55; outline: 0; min-height: 96px; }
.composer textarea::placeholder, input::placeholder { color: var(--text-faint); }
.options { display: grid; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }
.opt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opt-label { font-size: .8rem; color: var(--text-faint); min-width: 64px; }
.opt-row { display: flex; gap: 12px 28px; flex-wrap: wrap; }
.opt.inline { gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg-sunken); padding: 3px; border-radius: 10px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; font-size: .86rem; cursor: pointer; color: var(--text-muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--bg-raised); color: var(--text); box-shadow: var(--shadow-1); font-weight: 560; }
select { background: var(--bg-sunken); border: 0; border-radius: 9px; padding: 6px 10px; font-size: .86rem; cursor: pointer; }
.handle-input { display: inline-flex; align-items: center; background: var(--bg-sunken); border-radius: 9px; padding: 0 10px; font-size: .86rem; }
.handle-input span { color: var(--text-faint); }
.handle-input input { border: 0; background: none; outline: 0; padding: 6px 2px; width: 150px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 580; cursor: pointer; font-size: .94rem; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--bg-sunken); color: var(--text); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn.magic { background: linear-gradient(110deg, var(--accent) 0%, #4f8f7a 50%, var(--accent) 100%); background-size: 200% 100%; color: var(--accent-text); }
.btn.magic:hover:not(:disabled) { animation: shimmer 1.6s linear infinite; }
.btn.sm { padding: 7px 12px; font-size: .86rem; border-radius: 9px; }

/* progress */
#progress { margin-top: 22px; }
.progress { padding: 18px 20px; }
.steps { display: grid; gap: 10px; }
.stepline { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: .94rem; }
.stepline .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); flex: none; }
.stepline .dot svg { width: 13px; height: 13px; }
.stepline.active { color: var(--text); font-weight: 560; }
.stepline.done { color: var(--text-muted); }
.stepline.done .dot { background: var(--accent-soft); color: var(--accent); }
.bounce { display: inline-flex; gap: 3px; }
.bounce i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite ease-in-out; }
.bounce i:nth-child(2) { animation-delay: .15s; } .bounce i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.bar { height: 6px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; margin-top: 16px; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; transition: width .8s ease; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
.hint { margin-top: 10px; font-size: .82rem; color: var(--text-faint); }

/* research */
#researchBox { margin-top: 18px; }
.research { padding: 4px 18px; }
.research summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 580; font-size: .94rem; }
.research summary::-webkit-details-marker { display: none; }
.research summary .chev { width: 16px; height: 16px; transition: transform .2s; color: var(--text-faint); margin-left: auto; }
.research[open] summary .chev { transform: rotate(180deg); }
.research .pulse { color: var(--text-muted); margin-bottom: 12px; }
.research h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-weight: 600; margin: 14px 0 6px; }
.research ul { padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; color: var(--text-muted); }
.research a { color: var(--accent); text-decoration: none; }
.research a:hover { text-decoration: underline; }
.research .body { padding-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; background: var(--bg-sunken); border-radius: 99px; padding: 3px 10px; color: var(--text-muted); }

/* results */
.results { display: grid; gap: 16px; margin-top: 18px; padding-bottom: 32px; }
.variant { padding: 18px; }
.variant-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.tag.need { background: var(--bg-sunken); color: var(--text-muted); font-weight: 500; }
.tag.win { background: var(--good-soft); color: var(--good); }
.posts { display: grid; gap: 10px; }
.post { position: relative; background: var(--bg-sunken); border-radius: 11px; padding: 12px 14px 26px; }
.post textarea { width: 100%; border: 0; background: none; resize: none; outline: 0; line-height: 1.55; font-size: .98rem; overflow: hidden; min-height: 2.4em; }
.post .count { position: absolute; right: 12px; bottom: 6px; font-size: .74rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.post .count.over { color: var(--bad); font-weight: 600; }
.post .count.fold { color: var(--warn); }
.post .num { position: absolute; left: 14px; bottom: 6px; font-size: .74rem; color: var(--text-faint); }
.post .img-btn { position: absolute; left: 50px; bottom: 2px; width: 26px; height: 22px; display: grid; place-items: center; border: 0; background: none; color: var(--text-faint); cursor: pointer; border-radius: 6px; }
.post:not(:has(.num)) .img-btn { left: 8px; }
.post .img-btn:hover { color: var(--accent); background: var(--bg-raised); }
.post .img-btn svg { width: 15px; height: 15px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:not(:empty) { margin: 6px 0 4px; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 9px; overflow: hidden; background: var(--bg-raised); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.why { font-size: .86rem; color: var(--text-muted); margin-top: 10px; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.actions .spacer { flex: 1; }
.actions .icon-btn { width: 34px; height: 34px; }

/* optimize panel */
.opt-panel { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.opt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.opt-tab { border: 0; background: var(--bg-sunken); border-radius: 10px; padding: 8px 12px; cursor: pointer; text-align: left; min-width: 120px; }
.opt-tab.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.opt-tab .t { font-size: .8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.opt-tab .s { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.opt-tab .crown { width: 13px; height: 13px; color: var(--good); }
.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 12px; }
.score { font-size: .74rem; color: var(--text-faint); }
.score .meter { height: 5px; background: var(--bg-sunken); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.score .meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
@media (max-width: 560px) { .scores { grid-template-columns: repeat(3, 1fr); } }
.changes { font-size: .86rem; color: var(--text-muted); padding-left: 18px; display: grid; gap: 3px; }
.preview { background: var(--bg-sunken); border-radius: 11px; padding: 12px 14px; white-space: pre-wrap; font-size: .96rem; line-height: 1.55; }
.preview + .preview { margin-top: 8px; }
.judge-note { font-size: .84rem; color: var(--text-muted); margin: 8px 0; }
.set-aside { font-size: .84rem; margin: 8px 0; padding: 8px 12px; border-radius: 9px; background: var(--warn-soft, rgba(224,176,74,.12)); color: var(--warn); }

/* article card */
.article .variant-head .faint { margin-left: auto; }
.art-label { display: grid; gap: 6px; font-size: .8rem; color: var(--text-faint); margin-top: 10px; }
.art-title { font: inherit; font-size: 1.15rem; font-weight: 650; color: var(--text); background: var(--bg-sunken); border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; outline: 0; }
.art-title:focus { border-color: var(--accent); }
.art-titles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.art-titles .chip { border: 0; cursor: pointer; text-align: left; }
.art-titles .chip:hover { background: var(--accent-soft); color: var(--accent); }
.art-body { min-height: 320px; font-size: .95rem; line-height: 1.6; }
.art-cover { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.thumb.wide { width: 160px; height: 90px; }

/* link notice */
.link-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--warn-soft, rgba(224,176,74,.12)); color: var(--warn); font-size: .86rem; }
.link-note span { flex: 1; min-width: 200px; }
.link-note.done { background: var(--good-soft); color: var(--good); }

/* image panel */
.img-tabs { width: fit-content; margin-bottom: 10px; }
.card-preview { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; margin: 10px 0; background: var(--bg-sunken); object-fit: cover; border: 1px solid var(--border); }
.card-styles, .ai-styles { width: fit-content; }
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; }
.card-fields label { display: grid; gap: 4px; font-size: .78rem; color: var(--text-faint); }
.card-fields label:first-child { grid-column: 1 / -1; }
.card-fields input, .card-fields textarea { font: inherit; font-size: .9rem; color: var(--text); background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; outline: 0; resize: vertical; }
.card-fields input:focus, .card-fields textarea:focus { border-color: var(--accent); }
@media (max-width: 480px) { .card-fields { grid-template-columns: 1fr; } }
.ai-wait { display: grid; gap: 8px; padding: 18px 0; color: var(--text-muted); font-size: .9rem; }
.ai-wait .bounce { margin-left: 6px; }

/* posted */
.posted { display: flex; align-items: center; gap: 10px; background: var(--good-soft); color: var(--good); border-radius: 11px; padding: 10px 14px; margin-top: 12px; font-size: .92rem; font-weight: 560; }
.posted a { color: inherit; }
.error-card { padding: 14px 18px; background: var(--bad-soft); color: var(--bad); border-radius: var(--radius); font-size: .94rem; }
.error-card .btn { margin-top: 10px; }

/* pricing */
.pricing { padding-top: 40px; padding-bottom: 12px; text-align: center; }
.pricing > p.muted { margin-top: 8px; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; text-align: left; }
@media (max-width: 820px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.price-card.hot { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.price-card h3 { font-size: .95rem; color: var(--text-muted); font-weight: 600; }
.price-card .amount { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.price-card .per { font-size: .84rem; color: var(--text-faint); margin-bottom: 10px; }
.price-card ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--text-muted); margin-bottom: 12px; }
.price-card li { display: flex; gap: 7px; align-items: flex-start; }
.price-card li svg { width: 15px; height: 15px; color: var(--accent); flex: none; margin-top: 3px; }
.price-card .btn { margin-top: auto; }
.price-card .ribbon { position: absolute; top: -10px; right: 14px; background: var(--accent); color: var(--accent-text); font-size: .72rem; font-weight: 620; padding: 2px 9px; border-radius: 99px; }
.price-note { margin-top: 14px; }
body.has-results .pricing { display: none; }

/* how */
.how { padding-top: 26px; padding-bottom: 56px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; }
.how h3 { margin: 8px 0 4px; }
.how p { font-size: .9rem; }
.step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: .86rem; }
body.has-results .how { display: none; }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: var(--bg-raised); border-left: 1px solid var(--border); box-shadow: var(--shadow-2); z-index: 40; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.history-list { overflow-y: auto; padding: 8px; }
.hist-tabs { margin: 10px 16px 0; width: fit-content; }
.history-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.history-item:hover { background: var(--bg-sunken); }
.history-item .h-idea { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-item .h-meta { font-size: .76rem; color: var(--text-faint); margin-top: 2px; }
.history-item .h-posted { color: var(--good); font-weight: 600; margin-left: 4px; }

/* credits + top-up */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,14,.45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); padding: 20px; box-shadow: var(--shadow-2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 12px; }
@media (max-width: 520px) { .packs { grid-template-columns: 1fr; } }
.pack { position: relative; display: grid; gap: 2px; text-align: left; border: 1px solid var(--border); background: var(--bg-sunken); border-radius: 12px; padding: 14px; cursor: pointer; }
.pack:hover { border-color: var(--accent); }
.pack:disabled { opacity: .6; cursor: default; }
.pack .n { font-size: 1.5rem; font-weight: 680; letter-spacing: -0.02em; }
.pack .n small { font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-left: 3px; }
.pack .price { font-weight: 620; }
.pack .per { font-size: .78rem; color: var(--text-faint); }
.pack .ribbon { position: absolute; top: -9px; right: 10px; background: var(--accent); color: var(--accent-text); font-size: .7rem; font-weight: 620; padding: 2px 8px; border-radius: 99px; }
.pay-methods { text-align: center; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: .88rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* delete account */
.menu button.danger { color: var(--bad); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:disabled { opacity: .45; }
.del-warn { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: .88rem; }
.del-label { display: grid; gap: 6px; margin-top: 16px; font-size: .86rem; color: var(--text-muted); }
.del-label input { font: inherit; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; outline: 0; color: var(--text); }
.del-label input:focus { border-color: var(--bad); }

/* owner stats */
.modal.wide { width: min(720px, 100%); }
.os-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .os-grid { grid-template-columns: repeat(2, 1fr); } }
.os-grid > div { background: var(--bg-sunken); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.os-grid .k { font-size: .78rem; color: var(--text-faint); }
.os-grid .v { font-size: 1.35rem; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.os-grid .sub { font-size: .76rem; color: var(--text-muted); }

/* billing panel */
.bill-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.bill-stats > div { background: var(--bg-sunken); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.bill-stats .k { font-size: .78rem; color: var(--text-faint); }
.bill-stats .v { font-size: 1.4rem; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .bill-stats { grid-template-columns: 1fr; } }
.bill-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-weight: 600; margin-bottom: 8px; }
.ledger { list-style: none; padding: 0; display: grid; max-height: 300px; overflow-y: auto; }
.ledger li { display: grid; grid-template-columns: 1fr auto 3.2em; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.ledger .lg-what { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.ledger .lg-what small { font-size: .76rem; }
.ledger .lg-amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.ledger .lg-amt.plus { color: var(--accent, #2f7d4f); }
.ledger .lg-bal { text-align: right; font-variant-numeric: tabular-nums; font-size: .82rem; }
.lg-more { margin: 8px auto 0; display: flex; }
#ledger { margin-bottom: 18px; }
.lg-head { display: grid; grid-template-columns: 1fr auto 3.2em; gap: 12px; font-size: .74rem; padding-bottom: 4px; }
.lg-head span { text-align: right; }
.bill-list { list-style: none; padding: 0; display: grid; max-height: 240px; overflow-y: auto; }
.bill-list li { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.bill-list .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
/* API keys panel */
.key-fresh { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.key-row { display: flex; gap: 8px; align-items: center; }
.key-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.bill-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* mode tabs + replies */
.mode-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0 auto 14px; flex-wrap: wrap; }
.mode-tabs { width: fit-content; margin: 0; }
.reset-btn svg { width: 14px; height: 14px; }
.mode-tabs button { padding: 7px 18px; font-size: .92rem; }
.mode-hidden { display: none !important; }
body.replies-mode .how, body.replies-mode .pricing, body.replies-mode .faq { display: none; }
#repliesView { display: grid; gap: 16px; }
.rp-card { padding: 18px; }
.rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.rp-head h3 { margin-bottom: 4px; }
.rp-cost { margin-top: 8px; }
.rp-find { display: flex; gap: 8px; margin-top: 12px; }
.rp-find input { flex: 1; min-width: 0; font: inherit; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; color: var(--text); outline: 0; }
.rp-find input:focus { border-color: var(--accent); }
.rp-list { display: grid; gap: 12px; margin-top: 12px; }
.rp-list:empty { margin-top: 0; }
.rp-item { border-top: 1px solid var(--border); padding-top: 12px; animation: rise .4s both; }
.rp-meta { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.rp-meta img { width: 26px; height: 26px; border-radius: 50%; }
.rp-open { margin-left: auto; color: var(--text-faint); }
.rp-open svg { width: 16px; height: 16px; }
.rp-text { margin: 6px 0 8px; font-size: .95rem; white-space: pre-wrap; }
.rp-parent { margin-top: 4px; }
.rp-draft { margin-top: 8px; }
.rp-wait { padding: 8px 0; }
.rp-note { margin-bottom: 2px; }
.rp-like svg { width: 15px; height: 15px; }
.rp-like.liked { color: #f91880; opacity: 1; }
.rp-like.liked svg { fill: currentColor; }
.rp-more { display: flex; justify-content: center; padding: 6px 0 2px; }
.rp-item.done .rp-text, .rp-item.done .rp-meta { opacity: .55; }
.rp-done { margin-top: 8px; }
.rp-done.skipped { background: var(--bg-sunken); color: var(--text-muted); }
.link-btn { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; font-size: .86rem; margin-left: auto; }
@media (max-width: 520px) { .rp-head { flex-direction: column; } }

/* faq */
.faq { padding-top: 44px; padding-bottom: 20px; }
.faq h2 { text-align: center; margin-bottom: 18px; }
.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 8px; }
.faq-item { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 13px 0; font-weight: 580; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--text-faint); font-weight: 400; font-size: 1.2rem; line-height: 1; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 14px; color: var(--text-muted); font-size: .94rem; }
body.has-results .faq { display: none; }

/* stats */
.stats { text-align: center; padding: 8px 0 28px; }
.stats p { font-size: .9rem; color: var(--text-faint); }
.stats b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 16px; }
.footer-row a { color: var(--text-muted); text-decoration: none; }
.footer-row a:hover { color: var(--text); }

/* ================= motion & polish ================= */
/* Hero: drifting aurora + faint dot grid behind the top of the page. */
main { position: relative; }
.hero-bg { position: absolute; inset: 0 0 auto 0; height: 760px; overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero-bg .b1 { width: 520px; height: 520px; left: calc(50% - 560px); top: -160px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 70%, transparent), transparent 70%); animation: drift1 18s ease-in-out infinite alternate; }
.hero-bg .b2 { width: 460px; height: 460px; left: calc(50% + 80px); top: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); animation: drift2 22s ease-in-out infinite alternate; }
.hero-bg .grid { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 20%, #000, transparent); mask-image: radial-gradient(ellipse 60% 55% at 50% 20%, #000, transparent); opacity: .5; }
@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-80px, 90px) scale(.94); } }
main > section, main > .container { position: relative; z-index: 1; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 55%, var(--accent) 90%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s ease-in-out infinite; }
@keyframes shine { 50% { background-position: 100% 0; } }

/* Flow strip: Grok → Brave → DeepSeek & Qwen → Post, with a pulse travelling the line. */
.flow { position: relative; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 26px auto 0; max-width: 760px; }
.flow::before { content: ''; position: absolute; left: 8%; right: 8%; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong) 12%, var(--border-strong) 88%, transparent); z-index: -1; }
.flow::after { content: ''; position: absolute; top: calc(50% - 3px); left: 8%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--accent-2) 60%, transparent); animation: travel 4.5s cubic-bezier(.6,0,.4,1) infinite; z-index: -1; }
@keyframes travel { 0% { left: 8%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 92%; opacity: 0; } }
.flow-step { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; font-size: .84rem; color: var(--text-muted); background: var(--bg-raised); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.flow-step svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.flow-step:nth-child(1) { animation: pop .5s .1s both; } .flow-step:nth-child(2) { animation: pop .5s .25s both; }
.flow-step:nth-child(3) { animation: pop .5s .4s both; } .flow-step:nth-child(4) { animation: pop .5s .55s both; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@media (max-width: 640px) { .flow { gap: 8px; } .flow::before, .flow::after { display: none; } .flow-step { font-size: .78rem; padding: 6px 11px; } }

/* Composer: soft glow while typing. */
.composer { transition: box-shadow .25s, border-color .25s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent), 0 18px 40px -18px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.primary { transition: transform .15s, filter .15s, box-shadow .2s; }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }

/* How-it-works icons. */
.step-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); }
.ic { width: 40px; height: 40px; overflow: visible; }
.ic-radar .ring { fill: none; stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 1.5; }
.ic-radar .sweep { transform-origin: 24px 24px; animation: spin 3.2s linear infinite; }
.ic-radar .beam { fill: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.ic-radar .dot { fill: var(--accent); animation: blip 3.2s infinite; }
.ic-radar .d2 { animation-delay: 1.1s; } .ic-radar .d3 { animation-delay: 2.1s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0%, 100% { opacity: .2; } 15% { opacity: 1; } 45% { opacity: .2; } }
.ic-cards .c { fill: var(--bg-raised); stroke: var(--accent); stroke-width: 1.5; transform-origin: 24px 40px; }
.ic-cards .c1 { animation: fanL 3s ease-in-out infinite; } .ic-cards .c3 { animation: fanR 3s ease-in-out infinite; }
.ic-cards .ln { stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; fill: none; stroke-dasharray: 14; animation: typeLn 3s ease-in-out infinite; }
@keyframes fanL { 0%, 100% { transform: rotate(0); } 40%, 70% { transform: rotate(-14deg) translateX(-2px); } }
@keyframes fanR { 0%, 100% { transform: rotate(0); } 40%, 70% { transform: rotate(14deg) translateX(2px); } }
@keyframes typeLn { 0% { stroke-dashoffset: 14; } 40%, 100% { stroke-dashoffset: 0; } }
.ic-spark path { fill: var(--accent); transform-box: fill-box; transform-origin: center; }
.ic-spark .s1 { animation: twinkle 2.4s ease-in-out infinite; }
.ic-spark .s2 { fill: var(--accent-2); animation: twinkle 2.4s .6s ease-in-out infinite; }
.ic-spark .s3 { fill: var(--accent-2); animation: twinkle 2.4s 1.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.85) rotate(0); opacity: .75; } 50% { transform: scale(1.08) rotate(12deg); opacity: 1; } }
.ic-plane .plane path { fill: var(--bg-raised); stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.ic-plane .plane { animation: fly 3s ease-in-out infinite; }
.ic-plane .trail { fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 2 4; animation: dash 1s linear infinite; }
@keyframes fly { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -4px); } }
@keyframes dash { to { stroke-dashoffset: -12; } }
.how-grid > div { padding: 18px; border-radius: var(--radius); transition: background .2s; }
.how-grid > div:hover { background: var(--bg-raised); }
.how h3 { margin-top: 14px; }

/* Crafting scene (radar while researching, typing cards while writing). */
.scene { display: grid; place-items: center; height: 120px; margin-bottom: 8px; }
.scene svg { width: 220px; height: 120px; overflow: visible; }
.scene .ring { fill: none; stroke: color-mix(in srgb, var(--accent) 30%, transparent); stroke-width: 1.2; }
.scene .pulse { fill: none; stroke: var(--accent-2); stroke-width: 1.5; transform-origin: 110px 60px; animation: ping 2.4s ease-out infinite; }
.scene .pulse.p2 { animation-delay: 1.2s; }
@keyframes ping { from { transform: scale(.2); opacity: .9; } to { transform: scale(1); opacity: 0; } }
.scene .sweep { transform-origin: 110px 60px; animation: spin 2.6s linear infinite; }
.scene .beam { fill: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.scene .post { fill: var(--accent); animation: blip 2.6s infinite; }
.scene .card { fill: var(--bg-raised); stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1.2; }
.scene .typing { fill: var(--accent); opacity: .55; transform-box: fill-box; transform-origin: left center; animation: typeW 1.8s ease-in-out infinite; }
.scene .typing.t2 { animation-delay: .3s; } .scene .typing.t3 { animation-delay: .6s; }
@keyframes typeW { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }
.scene .lift { animation: lift 2.4s ease-in-out infinite; } .scene .lift.l2 { animation-delay: .4s; } .scene .lift.l3 { animation-delay: .8s; }
@keyframes lift { 50% { transform: translateY(-5px); } }

/* Results arrive one after another; score bars fill in. */
.results > .variant { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.results > .variant:nth-of-type(2) { animation-delay: .12s; }
.results > .variant:nth-of-type(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.score .meter i { animation: grow .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes grow { from { width: 0 !important; } }
.opt-panel, .img-panel, #researchBox > .card { animation: rise .4s both; }
.variant { transition: box-shadow .2s, border-color .2s; }
.variant:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.price-card { transition: transform .2s, box-shadow .2s; }
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
/* Light theme: keep the gradient word dark enough to read. */
:root:not([data-theme="dark"]) .hero h1 em { background-image: linear-gradient(100deg, var(--accent) 15%, #4f9a80 55%, var(--accent) 90%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 em { background-image: linear-gradient(100deg, var(--accent) 10%, #c8f0e0 55%, var(--accent) 90%); } }
:root[data-theme="dark"] .hero h1 em { background-image: linear-gradient(100deg, var(--accent) 10%, #c8f0e0 55%, var(--accent) 90%); }
.art-label .post, .art-label textarea { color: var(--text); font-size: .95rem; }

/* one-time notice above the hero */
.notice { display: flex; align-items: flex-start; gap: 8px; max-width: 680px; margin: 0 auto 22px; padding: 10px 8px 10px 16px; text-align: left;
  background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 14px; font-size: .9rem; line-height: 1.5; }
.notice p { flex: 1; margin: 2px 0; }
.notice b { font-weight: 650; }
.notice a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.notice .icon-btn { flex: none; width: 30px; height: 30px; }
.notice .icon-btn svg { width: 15px; height: 15px; }
