:root .pending-badge { display: inline-block; padding: 4px 8px; border-radius: 6px; background: #51451c; color: #ffe694; font-size: 12px; margin-bottom: 8px; }
#update-banner:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; font-size: 13px; background: var(--surface); color: var(--accent); }
#app-version { font-size: 11px; opacity: .65; }
:root {
  color-scheme: dark;
  --bg: #101411;
  --surface: #1a211c;
  --text: #edf5ed;
  --text-muted: #a3b3a6;
  --border: #313c33;
  --accent: #c9f36b;
  --accent-fg: #183427;
  --primary-action: #c9f36b;
  --primary-action-fg: #183427;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #438359; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.14; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; }
.topbar { position: sticky; inset-block-start: 0; z-index: 2; min-height: 69px; padding: 10px clamp(12px, 3vw, 38px); display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 21px; font-weight: 800; letter-spacing: -.045em; text-decoration: none; }
.brand img { border-radius: 10px; }
.top-actions { display: flex; gap: 9px; align-items: center; }
.button, .balance { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 8px 14px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 720; line-height: 1.3; text-decoration: none; }
.primary { background: var(--primary-action); color: var(--primary-action-fg); }
.primary:hover:not(:disabled) { background: #183b2c; }
.secondary { background: #fff; border-color: var(--border); color: var(--text); }
.secondary:hover:not(:disabled), .chip:hover { background: #eef5ec; }
.balance { background: #f0f6e9; color: #2c513e; border-color: #e2ebdb; white-space: nowrap; }
.balance:hover { background: #e7f1de; }
.shell { max-width: 1600px; min-height: calc(100vh - 69px); margin-inline: auto; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 30px 18px 24px; background: var(--surface); border-right: 1px solid var(--border); }
.nav-label, .eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .11em; color: #526b58; }
.nav-label { margin: 1px 0 10px 10px; }
.sidebar nav a { padding: 10px 12px; min-height: 43px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); text-decoration: none; font-weight: 600; border-radius: 9px; white-space: nowrap; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: #eaf3e8; color: #254e39; }
.sidebar-note { padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; font-size: 10px; color: #486350; font-weight: 800; letter-spacing: .06em; }
.sidebar-note p { margin-top: 7px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--text-muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5a9c67; margin-right: 5px; }
main { width: 100%; max-width: 1260px; min-width: 0; padding: 30px clamp(16px, 3.4vw, 46px) 0; margin-inline: auto; }
.hero { background: radial-gradient(ellipse at 84% 48%, #356b4f, transparent 54%), #163729; color: #fff; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; border-radius: 22px; overflow: hidden; min-height: 308px; isolation: isolate; }
.hero-copy { z-index: 1; padding: 35px 0 35px clamp(25px, 4vw, 52px); }
.hero-label { display: inline-flex; align-items: center; border: 1px solid #ffffff40; background: #ffffff0a; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 750; letter-spacing: .09em; }
.hero .dot { background: var(--accent); }
.hero h1 { font-size: clamp(35px, 4.05vw, 63px); line-height: 1.13; margin-top: 16px; letter-spacing: -.057em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { max-width: 325px; margin-top: 14px; color: #daeadf; }
.hero-button { margin-top: 21px; color: var(--accent-fg); background: var(--accent); }
.hero-button:hover { background: #daf890; }
.hero-art { display: flex; place-content: center; height: 100%; min-width: 0; }
.hero-art svg { width: 100%; max-width: 420px; height: 100%; max-height: 340px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-block: 16px 32px; }
.stat { display: flex; align-items: center; min-height: 80px; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.stat p { font-size: 12px; color: var(--text-muted); font-weight: 550; }
.stat strong { font-size: 24px; letter-spacing: -.05em; line-height: 1.22; }
.stat-icon { padding: 11px; line-height: 0; border-radius: 11px; }
.mint { background: #e8f4e6; color: #36664a; }
.lilac { background: #f0eafa; color: #694d84; }
.sand { background: #fff3d9; color: #835a19; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 15px; }
.section-head h2, .wallet-head h1 { font-size: clamp(26px, 3.2vw, 38px); margin-top: 4px; }
.section-head p:not(.eyebrow) { margin-top: 6px; color: var(--text-muted); font-size: 13px; }
.search { background: var(--surface); display: flex; align-items: center; gap: 8px; min-width: 170px; width: 245px; padding: 8px 11px; color: var(--text-muted); border-radius: 9px; border: 1px solid var(--border); }
.search input { width: 100%; border: 0; background: none; min-width: 0; outline: none; color: var(--text); }
.search:focus-within { outline: 2px solid #438359; }
.search-form { display: flex; align-items: stretch; gap: 8px; }
.search-form .button { white-space: nowrap; }
.search-form .search { min-width: 0; }
.search-area #search-submit-error { color: var(--danger, #9b352b); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; }
.chip[aria-pressed="true"] { background: #e8f4e7; border-color: #b9d5bc; color: #24563b; }
.result-count { font-size: 12px; color: var(--text-muted); margin-block: 13px 8px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-art { position: relative; overflow: hidden; aspect-ratio: 5/3; background: #e2ece2; }
.card-art svg { width: 100%; height: 100%; display: block; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--surface); color: #3e5246; border-radius: 6px; padding: 3px 7px; font-size: 10px; font-weight: 750; }
.card-copy { display: grid; flex: 1; min-width: 0; grid-template-rows: auto auto 1fr auto; gap: 6px; padding: 14px; overflow-wrap: anywhere; }
.card-meta { font-size: 11px; font-weight: 650; color: #53735c; }
.card h3 { font-size: 18px; }
.summary { color: var(--text-muted); font-size: 13px; }
.card-actions { display: flex; margin-top: 6px; }
.card-open { min-height: 35px; width: 100%; }
.card-open .icon { width: 16px; height: 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.empty { border-radius: var(--radius); border: 1px dashed #bacdbc; padding: 27px 18px; text-align: center; background: #fff; }
.empty p { margin: 7px 0 13px; color: var(--text-muted); }
.notice { padding: 10px 14px; background: #e8f4e7; border: 1px solid #bddbc2; margin: 0 0 14px; border-radius: 9px; color: #29573a; overflow-wrap: anywhere; }
.notice.error, .form-error { color: #9d2525; background: #fff0ed; border: 1px solid #f0c6c1; padding: 9px 11px; border-radius: 8px; font-size: 13px; }
.wallet-head { margin-bottom: 23px; }
.wallet-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.wallet-card, .history { padding: 20px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow-wrap: anywhere; }
.wallet-card h2 { font-size: 38px; margin: 7px 0; }
.wallet-card p:not(.eyebrow) { color: var(--text-muted); }
.history h2 { margin-bottom: 12px; }
.entry { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; margin: 0; border-top: 1px solid var(--border); }
.entry small { display: block; color: var(--text-muted); }
.entry .earned { color: #2d6841; }
footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding: 15px 0 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
dialog { width: min(calc(100% - 24px), 550px); max-height: calc(100% - 24px); overflow-y: auto; padding: 23px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 80px #05190e50; }
dialog::backdrop { background: #14291d88; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.dialog-head h2 { font-size: 27px; margin-top: 3px; overflow-wrap: anywhere; }
.close { width: 34px; height: 34px; flex-shrink: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font-size: 21px; line-height: 1; }
dialog p:not(.eyebrow, .form-error) { color: var(--text-muted); margin-bottom: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
dialog label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 650; }
dialog label :is(input:not([type="checkbox"]), textarea, select) { display: block; width: 100%; padding: 8px 9px; margin-top: 4px; border-radius: 8px; border: 1px solid #bdcbbf; background: var(--surface); color: var(--text); }
dialog textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
dialog .check { display: flex; align-items: start; gap: 7px; color: var(--text-muted); font-weight: 500; }
.check input { accent-color: var(--primary-action); flex: 0 0 auto; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 15px; }
.insights { padding: 13px; margin-block: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.insights p:last-child { margin: 6px 0 0; }
.ad-versions { margin: 10px 0 0; padding-left: 21px; }
.ad-versions li + li { margin-top: 12px; }
.ad-versions p { overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { padding: 6px 12px; border: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { display: flex; gap: 6px; }
  .sidebar nav a { min-height: 34px; padding: 5px 10px; margin-bottom: 0; font-size: 13px; }
  .nav-label, .sidebar-note { display: none; }
  main { padding-top: 14px; }
  .hero { grid-template-columns: 1fr; position: relative; min-height: 265px; }
  .hero-copy { padding: 22px; }
  .hero-art { position: absolute; inset: auto -15% -12% 48%; opacity: .22; transform: scale(1.15); pointer-events: none; }
  .stats { gap: 7px; margin-bottom: 24px; }
  .stat { align-items: start; flex-direction: column; gap: 6px; padding: 8px; }
  .stat-icon { padding: 6px; }
  .stat strong { font-size: 19px; }
}
@media (max-width: 480px) {
  .topbar { min-height: 54px; }
  .brand { font-size: 17px; gap: 4px; }
  .brand img { width: 24px; height: 24px; border-radius: 6px; }
  .top-actions { gap: 4px; }
  .top-actions button { min-height: 34px; font-size: 11px; padding-inline: 6px; gap: 3px; }
  .top-actions .icon { width: 13px; height: 13px; }
  .section-head { align-items: start; flex-direction: column; }
  .search { width: 100%; }
  .search-area { width: 100%; }
  .cards { gap: 10px; }
  .card-copy { padding: 10px; }
  .card h3 { font-size: 15px; }
  .card-meta { font-size: 10px; }
  .card-open { font-size: 11px; padding-inline: 4px; gap: 4px; }
  .card-open .icon { width: 12px; }
  .wallet-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 700px) {
  .button, .top-actions button, .sidebar nav a, .chip { min-height: 44px; }
  .search { padding-block: 0; }
  .search input { min-height: 44px; font-size: 16px; }
  dialog label :is(input:not([type="checkbox"]), textarea, select) { min-height: 44px; font-size: 16px; }
  .close { width: 44px; height: 44px; }
}
@media (max-width: 375px) {
  .cards { grid-template-columns: 1fr; }
  .card-meta { font-size: 12px; }
  .card-open { font-size: 13px; }
  .topbar { gap: 6px; padding-inline: 10px; }
  .brand { font-size: 15px; }
  .top-actions { flex-shrink: 0; white-space: nowrap; }
}
.secondary, .balance, .chip, .empty, .card-art, .close { background: var(--surface); color: var(--text); }
.secondary:hover:not(:disabled), .balance:hover, .chip:hover { background: #29382c; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"], .chip[aria-pressed="true"] { background: #2e4028; color: var(--accent); border-color: #65824c; }
.nav-label, .eyebrow, .card-meta, .sidebar-note { color: var(--text-muted); }
.hero { min-height: 175px; grid-template-columns: 1fr; background: linear-gradient(110deg, #213c2a, #19261d); }
.hero-copy { padding: 26px 30px; }
.hero h1 { font-size: clamp(28px, 3vw, 40px); margin-top: 12px; }
.hero p { max-width: 680px; }
.hero-art, .hero-button { display: none; }
.stats { margin-bottom: 24px; }
.stat { min-height: 68px; }
.mint, .lilac, .sand { background: #2a392c; color: var(--accent); }
.sort-tabs { display: flex; gap: 8px; margin-top: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.card { transition: border-color .15s, transform .15s; border-radius: 12px; }
.card:hover { border-color: #6d8a50; transform: translateY(-2px); }
.card-art { aspect-ratio: 4/5; background: #222e25; }
.creative-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag, .duration-badge { z-index: 1; background: #101811dc; color: #fff; border: 1px solid #ffffff25; font-variant-numeric: tabular-nums; }
.duration-badge { position: absolute; bottom: 10px; right: 10px; padding: 3px 7px; border-radius: 5px; font-size: 12px; }
.card h3 { font-size: 16px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-copy { padding: 12px; grid-template-rows: auto auto auto auto; }
.card-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.label-pill { display: inline-block; padding: 2px 8px; border-radius: 5px; background: #303a33; color: #b8c5ba; font-size: 11px; font-weight: 750; }
.label-new { background: #153f38; color: #7de1c8; }
.label-win { background: #3c381b; color: #f7da70; }
.label-scale { background: #304421; color: #c9f36b; }
#ad-dialog { width: min(850px, 96vw); max-width: none; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; border-radius: 18px 0 0 18px; }
.detail-subtitle { color: var(--text-muted); margin-block: 12px; }
.detail-video, .detail-image { width: 100%; max-height: 52vh; object-fit: contain; background: #050705; border-radius: 12px; margin-block: 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; }
.copyright-note { color: var(--text-muted); font-size: 12px; border-left: 2px solid #66864a; padding-left: 12px; }
.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px; padding: 14px; gap: 18px; margin-block: 24px; }
.detail-metrics dt { color: var(--text-muted); font-size: 11px; }
.detail-metrics dd { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.ad-copy { white-space: pre-wrap; line-height: 1.7; margin-block: 14px 24px; }
.insights, .form-hint { background: #222e25; color: var(--text-muted); }
.showcase-shell { max-width: 1380px; margin: auto; padding: 28px 30px; }
.showcase-page .hero { background: radial-gradient(ellipse at 90% 20%, #386130, transparent 65%), #192f22; }
.showcase-page .hero-copy { padding: 38px; }
.showcase-page .hero h1 { font-size: clamp(32px, 4vw, 54px); }
.showcase-page .hero p { max-width: 720px; }
.showcase-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }
.showcase-page small, .showcase-steps p, .showcase-cta p { color: var(--text-muted); }
.showcase-how { margin: 36px 0 46px; }
.showcase-how h2 { margin-block: 8px 20px; }
.showcase-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.showcase-steps article { border-top: 1px solid var(--border); padding-top: 16px; }
.showcase-steps span { color: var(--accent); font-weight: 800; }
.showcase-steps h3 { font-size: 17px; margin-block: 10px; }
.showcase-steps p { font-size: 13px; }
.showcase-page .section-head { flex-wrap: wrap; gap: 16px; }
.showcase-page .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.showcase-overlay { position: absolute; z-index: 1; top: 10px; right: 10px; max-width: 70%; padding: 7px 10px; border-radius: 6px; background: #101811eb; font-size: 11px; opacity: 0; transition: opacity .15s; }
.showcase-page .card:hover .showcase-overlay, .showcase-page .card:focus-within .showcase-overlay { opacity: 1; }
.showcase-play { position: absolute; inset: 43% 14% auto; z-index: 1; border: 1px solid #ffffff50; border-radius: 10px; padding: 12px; background: #101811df; color: #fff; font-weight: 750; }
.showcase-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #050705; object-fit: contain; }
.is-playing .duration-badge { display: none; }
.showcase-placeholder { display: grid; place-content: center; height: 100%; text-align: center; padding: 24px; color: var(--text-muted); }
.showcase-cta { margin-top: 40px; padding: 30px; border-radius: 16px; border: 1px solid var(--border); text-align: center; }
.showcase-cta p { margin: 12px 0 20px; }
.showcase-page footer { gap: 16px; flex-wrap: wrap; }
@media (max-width: 1000px) { .showcase-page .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (hover: none) { .showcase-overlay { opacity: 1; } }
@media (max-width: 700px) {
  .showcase-shell { padding: 16px 12px; }
  .showcase-page .hero-copy { padding: 24px 20px; }
  .showcase-page .cards, .showcase-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-page .card-open { white-space: normal; font-size: 11px; }
  .showcase-page .stat { padding: 12px 8px; }
  .showcase-cta { padding: 24px 16px; }
  .detail-metrics { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-open { font-size: 11px; padding-inline: 5px; }
  .hero-copy { padding: 22px; }
}
#keyword-dialog { width: min(900px, calc(100vw - 32px)); max-width: 900px; }
.keyword-table { overflow-x: auto; margin-top: 20px; }
.keyword-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.keyword-table th, .keyword-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); }
.keyword-table th { color: var(--text-muted); white-space: nowrap; }
.keyword-table td:first-child { max-width: 200px; overflow-wrap: anywhere; }
.keyword-status small { display: block; max-width: 260px; margin-top: 5px; color: var(--text-muted); }
.keyword-status.scanning, .keyword-status.done, #keyword-rewards { color: var(--accent); }
.keyword-status.error { color: #ff9696; }
.keyword-note { color: var(--text-muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 700px) and (max-height: 850px) {
  dialog { scroll-padding-block: 90px 85px; }
  dialog .dialog-head {
    position: sticky;
    top: -23px;
    z-index: 1;
    margin: -23px -23px 10px;
    padding: 23px 23px 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  dialog .dialog-actions {
    position: sticky;
    bottom: -23px;
    margin: 15px -23px -23px;
    padding: 12px 23px 23px;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
}
