:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #18332d;
  background: #f3f7f6;
  color-scheme: light;
  --surface: #fff;
  --surface-soft: #f7faf9;
  --ink: #18332d;
  --muted: #637a72;
  --line: #dce8e3;
  --accent: #11795f;
  --accent-deep: #0b624d;
  --accent-soft: #e7f4ee;
  --danger: #b84343;
  --shadow: 0 16px 50px rgba(15, 52, 40, .055);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, .button { border: 0; border-radius: 11px; background: var(--accent); color: #fff; padding: 10px 15px; font-weight: 650; cursor: pointer; line-height: 1.25; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .16s, transform .16s, box-shadow .16s; }
button:hover, .button:hover { background: var(--accent-deep); transform: translateY(-1px); }
button:disabled { opacity: .52; cursor: not-allowed; transform: none; }
button.secondary, .button.secondary { background: #ebf3ef; color: #195844; }
button.secondary:hover, .button.secondary:hover { background: #dcece3; }
button.danger { background: #fff0ef; color: var(--danger); }
button.danger:hover { background: #f8dddb; }
button.link { background: none; border-radius: 3px; color: var(--accent); padding: 0; min-height: 0; font-weight: 650; }
button.link:hover { background: none; text-decoration: underline; transform: none; }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [contenteditable]:focus-visible { outline: 3px solid #6ebaa0; outline-offset: 2px; }
input, select, textarea { width: 100%; max-width: 100%; border: 1px solid #cbdcd4; border-radius: 11px; padding: 10px 12px; background: var(--surface); color: var(--ink); min-height: 42px; }
input::placeholder { color: #96aaa1; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 15px; color: #39554a; }
label input, label select, label textarea { display: block; margin-top: 7px; }
label.check { display: inline-flex; align-items: center; gap: 9px; margin: 4px 0; font-weight: 550; cursor: pointer; }
label.check input { width: 17px; height: 17px; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); }
a { color: var(--accent); }
p { line-height: 1.58; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.025em; }
h1 { font-size: clamp(27px, 3vw, 36px); line-height: 1.15; margin: 0; font-weight: 750; }
h2 { font-size: 21px; line-height: 1.25; margin: 0 0 20px; font-weight: 730; }
h3 { font-size: 17px; line-height: 1.3; margin: 28px 0 13px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px max(22px, calc((100vw - 1500px) / 2)); background: #10352c; color: #fff; box-shadow: 0 6px 22px rgba(5, 30, 22, .11); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; font-size: 21px; font-weight: 830; letter-spacing: -.04em; text-decoration: none; }
.brand::before { content: ""; width: 31px; height: 31px; border-radius: 10px; background: linear-gradient(145deg, #8beaac, #31b99c); box-shadow: inset 0 -5px 8px #13856855; }
.brand span { font-size: 13px; font-weight: 500; letter-spacing: 0; color: #bfe0d1; border-left: 1px solid #ffffff33; padding-left: 13px; }
#identity { display: flex; align-items: center; gap: 12px; color: #d8eee2; font-size: 13px; }
#identity button.secondary { background: #ffffff1c; color: #fff; padding: 8px 12px; }
#identity button.secondary:hover { background: #ffffff32; }
main { max-width: 1500px; margin: 0 auto; padding: 30px 22px 80px; }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 28px; align-items: start; }
.workspace-sidebar { position: sticky; top: 22px; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 20px 14px 16px; box-shadow: var(--shadow); }
.sidebar-label { color: #849b91; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 0 11px; }
.account-switch { margin: 9px 0 24px; padding: 0 6px; }
.account-switch select { font-size: 14px; font-weight: 700; border-color: #d5e6dc; background: #f3f9f5; }
.nav-caption { margin-bottom: 9px; }
.tabs { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.tabs button { width: 100%; justify-content: flex-start; gap: 12px; background: transparent; color: #4d695d; padding: 11px 12px; min-height: 43px; border-radius: 10px; text-align: left; font-weight: 600; }
.tabs button:hover { background: #f2f7f4; color: #155941; transform: none; }
.tabs button.active, .tabs button.active:hover { background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 3px 0 var(--accent); }
.tabs svg { flex: 0 0 auto; }
.sidebar-foot { margin: 24px 8px 0; padding: 14px 6px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; line-height: 1.4; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #28b780; box-shadow: 0 0 0 4px #e2f5eb; }
.status-dot.bad { background: #d8893f; box-shadow: 0 0 0 4px #fff0df; }
.workspace-main { min-width: 0; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 7px 3px 24px; }
.page-heading p { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .105em; font-size: 11px; font-weight: 780; margin-bottom: 8px; }
.page-indicator { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: 11px; font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 2.3vw, 28px); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
#panel { min-height: 230px; }
#panel > h2:first-child { margin-bottom: 16px; }
#panel > h3, #chainpanel > h3 { border-top: 1px solid var(--line); padding-top: 24px; }
#panel > h3:first-child { border: 0; padding-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row > label { flex: 1 1 170px; }
.row > label.check { flex: 0 0 auto; margin-right: 9px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.grid > div:has(.stat) { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.stat { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; font-weight: 760; color: #116a53; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.statlabel { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 10px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.notice, .success, .error { padding: 14px 16px; border-radius: 12px; margin: 15px 0; line-height: 1.5; }
.notice { background: #fff8e9; border: 1px solid #f4e7c9; color: #6d5424; }
.success { background: #eaf7ee; border: 1px solid #d4ebda; color: #1b6347; }
.error { background: #fff0ef; border: 1px solid #f2d4d0; color: #9c3333; }
#flash:empty { display: none; }
#flash:not(:empty) { position: sticky; top: 10px; z-index: 10; }
#flash > div { box-shadow: 0 12px 30px #173e2d1c; }
#toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; max-width: min(420px, calc(100vw - 36px)); pointer-events: none; }
.toast { border-radius: 12px; padding: 13px 16px; box-shadow: 0 16px 42px #0d2c2080; font-size: 13px; font-weight: 650; line-height: 1.45; animation: toast-in .2s ease-out; }
.toast-success { background: #163d2d; color: #e9fff0; }
.toast-error { background: #723b37; color: #fff1ed; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #e8f3ed; color: #21674c; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 650; }
.pill.bad { background: #fde8e5; color: #a64242; }
.list { display: grid; gap: 9px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.item:hover { border-color: #bad7ca; background: #fcfefd; }
.item > div:first-child { min-width: 0; }
.item strong { display: block; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.item small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.item .row { justify-content: flex-end; }
.item .check { white-space: nowrap; }
.tablewrap { overflow-x: auto; margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e9f0eb; vertical-align: middle; }
thead th { color: #6b8376; background: #f7faf8; font-weight: 730; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbf9; }
tbody tr[role=button]:focus-visible { outline: 3px solid #6ebaa0; outline-offset: -3px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 220px; margin: 6px 0 8px; overflow: visible; }
.step { border: 1px solid var(--line); border-radius: 13px; padding: 18px; margin-bottom: 12px; background: var(--surface); }
.step .row { gap: 7px; }
.step .row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.step .row button { padding: 7px 10px; font-size: 12px; }
.step .preview { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-soft); border: 1px solid #e9f0eb; padding: 12px; border-radius: 9px; margin: 12px 0; color: #39584b; font-size: 13px; max-height: 160px; overflow-y: auto; }
.step-create-actions { margin: 16px 0 22px; }
.ai-generator { margin: 13px 0 18px; border: 1px solid #cce4d9; background: var(--accent-soft); border-radius: 13px; }
.ai-generator summary { padding: 14px 16px; color: var(--accent-deep); cursor: pointer; font-weight: 720; }
.ai-generator-body { padding: 0 16px 17px; }
.ai-generator-body p { margin: 0 0 13px; font-size: 13px; }
.ai-generator-body .grid { margin: 4px 0; }
.ai-generator-body #aikeynotice { margin: 0 0 15px; }
.ai-generator-body #aichannelmeta { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-generator-body #aidraftstatus:not(:empty) { margin-top: 12px; }
.ai-batch-intro { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.ai-batch-form { border: 1px solid #cde6d9; background: linear-gradient(145deg, #f3faf6, #fff); border-radius: 14px; padding: 19px; }
.ai-batch-form textarea { min-height: 90px; }
.ai-batch-form > p { max-width: 680px; margin: 3px 0 16px; }
.ai-batch-heading { margin-top: 20px; align-items: center; }
.ai-progress { height: 10px; border-radius: 999px; background: #e8f0eb; overflow: hidden; margin: 13px 0; }
.ai-progress > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1a8c68, #63c493); transition: width .25s; }
.ai-batch-actions { margin: 24px 0; padding: 17px; background: var(--accent-soft); border-radius: 12px; }
.ai-batch-actions p { margin: 9px 0 0; }
.ai-batch-results { display: grid; gap: 15px; margin-top: 22px; }
.ai-result { border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: var(--surface); }
.ai-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.ai-result-head strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.ai-result-head small { display: block; max-width: 800px; margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.ai-result-head .pill { flex: 0 0 auto; }
.ai-error-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 13px; }
.ai-error-actions .error { flex: 1 1 100%; margin: 0; }
.ai-preview-frame { display: block; width: 100%; height: 190px; margin: 15px 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.ai-edit-draft { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 13px; }
.ai-edit-draft summary { cursor: pointer; color: var(--accent-deep); font-weight: 700; }
.ai-edit-draft label { margin: 15px 0 10px; max-width: 760px; }
.ai-edit-draft textarea { min-height: 175px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.ai-edit-draft p { margin: 9px 0; }
.editorbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.editorbar button { padding: 7px 11px; background: #eaf3ed; color: #1b614a; }
.editorbar button:hover { background: #dcece1; }
.editor { min-height: 155px; border: 1px solid #cbdcd4; border-radius: 11px; padding: 14px; background: var(--surface); white-space: pre-wrap; line-height: 1.6; outline: none; }
.editor:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #40ad811f; }
.auth { max-width: 460px; margin: clamp(45px, 9vh, 105px) auto; padding: 34px; }
.auth h1 { margin-bottom: 27px; }
.auth form button { width: 100%; margin-top: 5px; }
.onboard { max-width: 850px; margin: 24px auto; }
.onboard .card { padding: clamp(22px, 4vw, 42px); }
.onboard h1 { margin-bottom: 18px; }
.progress { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.progress span { border: 1px solid #dce9df; background: #eaf3ed; color: #567566; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 650; }
.progress span.current { border-color: var(--accent); background: var(--accent); color: #fff; }
.channel-avatar { width: 88px; height: 88px; object-fit: cover; border-radius: 15px; border: 1px solid var(--line); }
.channel-avatar-empty { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: var(--muted); background: var(--surface-soft); }
.overview-head, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.overview-head h2, .section-heading h2 { margin-bottom: 7px; }
.overview-head p, .section-heading p { margin: 0; }
.overview-metrics { margin: 18px 0 22px; }
.stat-text { font-size: clamp(16px, 2vw, 24px); overflow-wrap: anywhere; }
.next-card { border: 1px solid #d7e9db; background: linear-gradient(135deg, #edf8f0, #f6faf7); border-radius: 14px; padding: 19px 21px; }
.next-card p { margin: 11px 0 14px; font-weight: 600; }
.empty-state { padding: 28px; border: 1px dashed #cadfd0; border-radius: 13px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.channel-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 17px; }
.channel-summary span { padding: 8px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.channel-summary strong { color: var(--ink); margin-right: 4px; }
.channel-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 10px; margin-bottom: 17px; }
.channel-main { display: flex; align-items: center; gap: 13px; }
.channel-list-avatar { width: 45px; height: 45px; flex: 0 0 45px; border-radius: 11px; object-fit: cover; border: 1px solid var(--line); }
.avatar-fallback { display: flex; align-items: center; justify-content: center; background: #ddf0e6; color: #146950; font-weight: 760; font-size: 18px; }
.secondary-section { margin-top: 30px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.secondary-section h3 { margin: 0 0 7px; }
.secondary-section p { margin: 0 0 13px; font-size: 13px; }
.secondary-section .row { margin-top: 10px; }
.secondary-section .row input { flex: 1 1 250px; }
.bulk-upload { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bulk-upload summary { cursor: pointer; padding: 14px 16px; color: var(--accent-deep); font-weight: 700; }
.bulk-upload summary:hover { background: var(--accent-soft); }
.bulk-upload-body { padding: 0 16px 16px; }
.bulk-upload-body label[for=bulkids] { margin-bottom: 0; }
.bulk-upload-body textarea { margin-top: 7px; min-height: 140px; font-variant-numeric: tabular-nums; }
.bulk-upload-actions { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.bulk-upload-actions .file-picker { flex: 1 1 220px; max-width: 330px; margin: 0; font-weight: 600; }
.bulk-upload-actions input[type=file] { font-size: 12px; min-height: 0; }
.bulk-result-summary { margin-top: 18px; font-size: 13px; color: var(--muted); }
.bulk-result-summary strong { color: var(--ink); }
.bulk-result-table { max-height: 360px; overflow: auto; }
.bulk-result-table td:first-child { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bulk-result-table td:last-child { overflow-wrap: anywhere; }
.inline-create { background: var(--accent-soft); border: 1px solid #cde3d5; border-radius: 13px; padding: 18px; margin: 16px 0 20px; }
.inline-create h3 { margin: 0 0 12px; }
.inline-create label { max-width: 620px; }
.stats-toolbar { justify-content: space-between; gap: 13px; }
.stats-toolbar h2 { margin: 0; }
.stats-toolbar select { width: auto; min-width: 120px; }
.stats-metrics { margin-top: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-chain-picker { border-top: 1px solid var(--line); margin-top: 27px; }
.stats-chain-picker select { width: min(420px, 100%); }
#panel > form, .settings-utm form { max-width: 760px; }
.settings-utm { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 4px; }
.link-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; }
.link-mode-options label { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
.link-mode-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.link-mode-options input[type=radio] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent); }
.link-mode-options strong, .link-mode-options small { display: block; }
.link-mode-options small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; margin-top: 4px; }
#bot-settings code, #utm-settings code { overflow-wrap: anywhere; }
.settings-ai { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 4px; }
.settings-ai form { max-width: 760px; }
.settings-ai p { max-width: 760px; }
.utm-grid { margin: 17px 0 8px; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.utm-grid label small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.utm-details { margin: 18px 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.utm-details summary { cursor: pointer; font-weight: 700; color: var(--accent-deep); }
.utm-details p { font-size: 13px; margin: 11px 0; }
.danger-zone { margin-top: 29px; padding: 17px 19px; border: 1px solid #efd7d3; background: #fff8f7; border-radius: 13px; }
.danger-zone h3 { margin: 0 0 13px; color: #ad4141; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 206px minmax(0, 1fr); gap: 20px; }
  .workspace-sidebar { padding: 17px 10px; }
  .page-indicator { display: none; }
}
@media (max-width: 790px) {
  main { padding: 20px 15px 55px; }
  .app-shell { display: block; }
  .workspace-sidebar { position: static; margin-bottom: 22px; padding: 12px; }
  .workspace-sidebar .sidebar-label, .sidebar-foot { display: none; }
  .account-switch { margin: 0 0 10px; max-width: 340px; }
  .tabs { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 3px; scrollbar-width: thin; }
  .tabs button { width: auto; min-width: max-content; padding: 9px 12px; }
  .tabs button.active { box-shadow: inset 0 -3px var(--accent); }
  .page-heading { margin: 4px 3px 18px; }
  .stats-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .link-mode-options { grid-template-columns: 1fr; }
  header { min-height: 58px; padding: 10px 15px; }
  .brand { font-size: 19px; }
  .brand span { display: none; }
  #identity { font-size: 0; }
  #identity button.secondary { font-size: 12px; }
  main { padding: 15px 10px 40px; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 4px; }
  .tabs button { min-width: 0; width: 100%; justify-content: center; padding: 10px 4px; font-size: 12px; }
  .tabs svg { display: none; }
  .card { padding: 18px; border-radius: 14px; }
  .page-heading p { font-size: 13px; }
  .item { align-items: flex-start; flex-direction: column; padding: 15px; }
  .overview-head, .section-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .channel-toolbar { grid-template-columns: 1fr; }
  .channel-item .row { align-items: center; }
  .secondary-section { padding: 15px; }
  .item .row { justify-content: flex-start; width: 100%; }
  .row > input:not([type=checkbox]), .row > select { flex: 1 1 100%; }
  .row > button, .row > .button { flex: 1 1 auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ai-generator-body .grid { grid-template-columns: 1fr; }
  .overview-metrics > div:last-child { grid-column: span 2; }
  .grid > div:has(.stat) { min-height: 105px; padding: 14px; }
  .stat { font-size: 24px; }
  .step .row { align-items: flex-start; }
  .step .row > div { width: 100%; }
  .auth { padding: 24px; margin-top: 55px; }
  .progress span { padding: 6px 9px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.seo-explain { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.seo-number { font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.seo-top { margin-top: 6px; color: var(--muted); font-size: 12px; }
.seo-top summary { cursor: pointer; }
.seo-top div { margin: 5px 0; overflow-wrap: anywhere; }
.seo-proposal, .seo-ideas { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 8px; }
.seo-proposal form { max-width: 760px; }
.seo-ideas .ai-result { margin-top: 12px; }
.seo-ideas p { overflow-wrap: anywhere; }
.settings-seo { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 4px; }
.settings-seo form { max-width: 760px; }
.seo-bulk-start { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(245px, .85fr); gap: 26px; padding: 23px; margin: 25px 0 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--accent-soft); }
.seo-bulk-start h3 { margin: 4px 0 8px; font-size: 21px; }
.seo-bulk-start p { margin: 5px 0 0; }
.seo-bulk-start form { min-width: 0; }
.seo-bulk-start form p { margin: 0 0 13px; }
.seo-single-mode { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 24px; }
.seo-single-mode > summary { cursor: pointer; color: var(--accent-deep); font-weight: 700; }
.seo-single-mode .ai-batch-form { margin-top: 18px; }
.seo-batch-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.seo-batch-metrics > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: var(--surface-soft); }
.seo-batch-metrics strong { font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--accent-deep); }
.seo-batch-metrics span { font-size: 12px; color: var(--muted); }
.seo-batch-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(145px, 180px) minmax(150px, 205px); gap: 9px; margin: 24px 0 12px; }
.seo-batch-actions { margin-bottom: 16px; }
.seo-batch-list { display: grid; gap: 10px; }
.seo-batch-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.seo-batch-row { display: grid; grid-template-columns: minmax(160px, 1.25fr) minmax(160px, 1fr) minmax(105px, .65fr) auto; gap: 15px; align-items: center; padding: 15px; }
.seo-batch-row:hover { background: var(--surface-soft); }
.seo-batch-row > div { min-width: 0; }
.seo-batch-channel { display: flex; align-items: flex-start; gap: 11px; }
.seo-batch-channel strong, .seo-batch-suggestion span { display: block; overflow-wrap: anywhere; line-height: 1.4; }
.seo-batch-channel small, .seo-batch-suggestion small, .seo-batch-frequency small { display: block; color: var(--muted); line-height: 1.4; font-size: 11px; }
.seo-batch-channel small { margin-top: 4px; }
.seo-batch-index { border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 800; min-width: 27px; padding: 4px 6px; text-align: center; }
.seo-batch-suggestion span { font-size: 13px; font-weight: 650; margin-top: 3px; }
.seo-batch-suggestion .seo-batch-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.seo-batch-frequency strong { display: block; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: 2px; }
.seo-batch-frequency span { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.seo-batch-detail { border-top: 1px solid var(--line); padding: 18px 20px 22px; background: var(--surface-soft); }
.seo-batch-detail h4 { font-size: 14px; margin: 24px 0 10px; }
.seo-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.seo-compare > div { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; min-width: 0; }
.seo-compare strong { display: block; overflow-wrap: anywhere; }
.seo-compare p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; font-size: 13px; }
.seo-batch-decision, .seo-batch-ideas { border-top: 1px solid var(--line); margin-top: 24px; }
.seo-batch-decision form { max-width: 750px; }
.seo-batch-decision .success { max-width: 750px; overflow-wrap: anywhere; }
.seo-batch-decision .success p { margin: 8px 0 0; white-space: pre-wrap; }
.seo-batch-idea { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; background: var(--surface); }
.seo-batch-idea > strong { margin-right: 9px; overflow-wrap: anywhere; }
.seo-batch-idea p { overflow-wrap: anywhere; margin: 8px 0; }
.seo-batch-idea form { display: flex; gap: 12px; align-items: end; margin-top: 12px; }
.seo-batch-idea form label { flex: 1 1 200px; margin: 0; }
.ideas-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 215px 170px 190px; gap: 9px; margin: 20px 0 11px; }
.idea-favorites-shortcut { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid #e5d9a6; border-radius: 13px; background: color-mix(in srgb, #f5e9b7 24%, var(--surface)); padding: 13px 16px; margin: -5px 0 20px; }
.idea-favorites-shortcut div { display: grid; gap: 3px; }
.idea-favorites-shortcut strong { color: var(--accent-deep); }
.idea-favorites-shortcut span { color: var(--muted); font-size: 12px; }
.ideas-table { min-width: 1030px; }
.ideas-table td { vertical-align: top; }
.ideas-table td:first-child { color: var(--accent-deep); font-weight: 800; }
.ideas-table td small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.ideas-table td strong { overflow-wrap: anywhere; }
.ideas-text { min-width: 235px; max-width: 380px; }
.ideas-text p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; line-height: 1.45; }
.ideas-text details { margin-top: 6px; }
.ideas-text summary { cursor: pointer; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.ideas-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.ideas-name code { overflow-wrap: anywhere; font-size: 12px; color: var(--accent-deep); }
.ideas-table .link { font-size: 11px; }
.ideas-name-form { display: flex; align-items: center; gap: 5px; margin: 7px 0; min-width: 180px; }
.ideas-name-form input { min-width: 100px; padding: 7px; font-size: 12px; }
.ideas-name-form button { padding: 8px; font-size: 11px; }
.ideas-volume strong { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--accent-deep); }
.ideas-origin { min-width: 180px; max-width: 260px; }
.ideas-origin .pill { margin-top: 7px; }
.ideas-decision-label { margin: 9px 0 0; font-size: 11px; }
.ideas-decision-label select { padding: 7px 9px; min-height: 34px; font-size: 12px; }
.ideas-apply { margin-top: 10px; }
.ideas-apply summary { cursor: pointer; color: var(--accent-deep); font-size: 12px; font-weight: 650; }
.ideas-apply-form { margin-top: 7px; display: grid; gap: 6px; }
.ideas-apply-form select { font-size: 12px; min-height: 35px; }
.ideas-apply-form button { font-size: 11px; padding: 8px 10px; }
.idea-scan-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid #cce3d6; border-radius: 14px; background: var(--accent-soft); padding: 18px; margin: 18px 0; }
.idea-scan-panel h3 { margin: 0 0 7px; }
.idea-scan-panel p { margin: 5px 0; max-width: 760px; }
.idea-scan-panel .row { justify-content: flex-end; }
.fresh-ideas-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 22px; align-items: start; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 20px 0 26px; background: var(--surface); }
.fresh-ideas-panel h3 { margin: 7px 0; }
.fresh-ideas-panel p { max-width: 760px; }
.fresh-ideas-panel form { display: grid; gap: 10px; }
.fresh-ideas-panel textarea, .fresh-ideas-panel input { width: 100%; }
.fresh-ideas-panel textarea { resize: vertical; }
.idea-active-section { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); padding: 17px; margin: 22px 0 28px; }
.idea-active-section > summary { cursor: pointer; font-size: 16px; font-weight: 730; color: var(--ink); }
.idea-active-section > p { margin: 10px 0 14px; }
#idea-channel-search { max-width: 430px; margin: 0 0 13px; }
.idea-channels-table { min-width: 760px; }
.idea-channels-table td { vertical-align: top; }
.idea-channels-table td:first-child { min-width: 230px; max-width: 340px; }
.idea-channels-table td:nth-child(2) { min-width: 180px; max-width: 240px; }
.idea-channels-table td small { display: block; color: var(--muted); margin-top: 5px; white-space: pre-wrap; line-height: 1.4; }
.idea-keyword { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 7px; margin: 0 4px 5px 0; font-size: 11px; }
.idea-list-heading { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 4px; }
.idea-list-heading h3 { margin: 0 0 7px; }
.idea-review-cell { min-width: 230px; max-width: 300px; }
.idea-matches { display: grid; gap: 7px; min-width: 175px; }
.idea-match { border-left: 2px solid #bddacb; padding: 1px 0 2px 8px; }
.idea-match.is-duplicate { border-color: #dd9d96; }
.idea-match .pill { padding: 2px 6px; font-size: 10px; }
.idea-match strong { display: block; margin-top: 4px; font-size: 12px; }
.idea-match small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.35; color: var(--muted); }
.idea-exclude-one { margin-top: 8px; }
@media (max-width: 960px) {
  .ideas-toolbar { grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr); }
  .seo-bulk-start { grid-template-columns: 1fr; }
  .seo-batch-row { grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto; }
  .seo-batch-frequency { grid-column: 2; }
}
@media (max-width: 650px) {
  .idea-scan-panel { grid-template-columns: 1fr; }
  .idea-scan-panel .row { justify-content: flex-start; }
  .fresh-ideas-panel { grid-template-columns: 1fr; }
  .idea-channels-table { min-width: 0; }
  .idea-channels-table thead { display: none; }
  .idea-channels-table tbody, .idea-channels-table tr, .idea-channels-table td { display: block; width: 100%; }
  .idea-channels-table tr { padding: 12px; border-bottom: 1px solid var(--line); }
  .idea-channels-table tr:last-child { border-bottom: 0; }
  .idea-channels-table td { padding: 6px 0; border: 0; max-width: none !important; min-width: 0 !important; }
  .idea-channels-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 4px; }
  .ideas-toolbar { grid-template-columns: 1fr; }
  .idea-favorites-shortcut { align-items: flex-start; flex-direction: column; }
  .ideas-table { min-width: 0; }
  .ideas-table thead { display: none; }
  .ideas-table tbody, .ideas-table tr, .ideas-table td { display: block; width: 100%; }
  .ideas-table tr { padding: 14px; border-bottom: 1px solid var(--line); }
  .ideas-table tr:last-child { border-bottom: 0; }
  .ideas-table td { padding: 8px 0; border: 0; max-width: none; min-width: 0; }
  .ideas-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
  .ideas-table .ideas-rank { padding-top: 0; }
  .seo-batch-toolbar { grid-template-columns: 1fr; }
  .seo-batch-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-batch-row { grid-template-columns: 1fr 1fr; gap: 11px; }
  .seo-batch-channel { grid-column: 1 / -1; }
  .seo-batch-suggestion { grid-column: 1; }
  .seo-batch-frequency { grid-column: 2; }
  .seo-batch-open { grid-column: 1 / -1; }
  .seo-compare { grid-template-columns: 1fr; }
  .seo-batch-idea form { display: block; }
  .seo-batch-idea form button { margin-top: 10px; width: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --surface: #182b25; --surface-soft: #1b3329; --ink: #e8f2eb; --muted: #a6c1b2; --line: #315044; --accent: #46b58b; --accent-deep: #69cba2; --accent-soft: #234337; --danger: #e8958e; --shadow: none; background: #10211b; color: var(--ink); }
  header { background: #0b2119; }
  input, select, textarea, .editor { background: #15291f; border-color: #42614d; color: var(--ink); }
  .account-switch select, .page-indicator, .item, .step { background: var(--surface); }
  button { color: #0b2d21; }
  button.secondary, .button.secondary, .editorbar button { background: #2a4a39; color: #d7f1df; }
  button.secondary:hover, .button.secondary:hover, .editorbar button:hover { background: #365d45; }
  button.danger { background: #4d2f2e; color: #ffc1b7; }
  button.danger:hover { background: #633837; }
  .tabs button { color: #b2cdbd; }
  .tabs button:hover { background: #20382c; color: #e3f6e8; }
  .tabs button.active, .tabs button.active:hover { color: #b1f2cd; }
  .status-dot { box-shadow: 0 0 0 4px #244a36; }
  .status-dot.bad { box-shadow: 0 0 0 4px #50402b; }
  .grid > div:has(.stat), .step .preview { background: var(--surface-soft); border-color: var(--line); }
  .stat { color: #8ae0ac; }
  thead th { background: #20372b; color: #b5cfbd; }
  td, th { border-color: #315044; }
  tbody tr:hover, .item:hover { background: #1e372c; }
  .notice { background: #40351e; border-color: #675431; color: #ffe5ad; }
  .next-card { background: #1d392b; border-color: #31573f; }
  .avatar-fallback { background: #2c4c39; color: #b2ebc9; }
  .danger-zone { background: #382626; border-color: #6e4140; }
  .danger-zone h3 { color: #f2aaa2; }
  .success { background: #1a3b2a; border-color: #315942; color: #b9ebc6; }
  .error { background: #452b2a; border-color: #6b3e3b; color: #ffc1b5; }
  .pill { background: #224735; color: #b7e9c9; }
  .pill.bad { background: #58342f; color: #ffc1b5; }
  .ai-batch-form { background: var(--surface-soft); border-color: var(--line); }
  .ai-progress { background: #294738; }
  .ai-result { background: var(--surface); }
  .seo-batch-row:hover { background: var(--surface-soft); }
  .seo-batch-idea { background: var(--surface); }
}
.cw-filters { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.cw-filters button { display:flex; gap:10px; align-items:center; }
.cw-filters [aria-pressed="true"] { background:var(--accent); color:#fff; }
.cw-toolbar { display:grid; grid-template-columns:minmax(180px,1fr) minmax(160px,.5fr) minmax(160px,.5fr); gap:12px; }
.cw-table { width:100%; table-layout:fixed; }
.cw-table th:first-child { width:32%; }
.cw-table th:last-child { width:180px; }
.cw-table td { vertical-align:top; overflow-wrap:anywhere; padding:20px 14px; }
.cw-table small { display:block; margin:6px 0; color:var(--muted); }
.cw-table .row { flex-wrap:wrap; }
.cw-chain + .cw-chain { border-top:1px solid var(--line); margin-top:12px; padding-top:12px; }
.cw-chain > button { text-align:left; font-weight:650; }
.cw-runtime { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.cw-runtime strong { font-size:13px; }
.cw-issues { padding-left:18px; font-size:13px; color:var(--muted); }
.cw-selection { border:1px solid var(--line); border-radius:12px; padding:14px; margin:14px 0; }
.cw-selection .row { flex-wrap:wrap; margin:10px 0; }
.cw-selection small { display:block; color:var(--muted); }
.cw-management { display:flex; flex-direction:column; align-items:flex-start; gap:14px; }
.cw-tools { border-top:1px solid var(--line); margin-top:26px; padding-top:18px; }
.cw-tools summary { cursor:pointer; font-weight:650; margin-bottom:14px; }
.cw-tools .item { margin:10px 0; }
.cw-dialog { width:min(560px,calc(100% - 32px)); max-height:90vh; overflow:auto; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--ink); padding:26px; }
.cw-dialog::backdrop { background:rgb(0 0 0 / 45%); }
.cw-dialog .row { flex-wrap:wrap; }
@media(max-width:760px) {
  .cw-toolbar { grid-template-columns:1fr; }
  .cw-table,.cw-table tbody,.cw-table tr,.cw-table td { display:block; width:100%; }
  .cw-table thead { display:none; }
  .cw-table tr { border:1px solid var(--line); border-radius:14px; margin:12px 0; padding:12px; }
  .cw-table td { border:0; padding:8px; }
  .cw-management { flex-direction:row; justify-content:space-between; align-items:center; }
}
.ai-target-modes { border:0; padding:0; margin:0 0 14px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ai-target-modes legend { font-weight:700; margin-bottom:12px; }
.ai-target-modes label { display:flex; flex-direction:row; align-items:flex-start; gap:10px; border:1px solid var(--line); border-radius:12px; padding:14px; cursor:pointer; margin:0; }
.ai-target-modes label:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.ai-target-modes input,.ai-target-row input { width:auto; margin:3px 0 0; flex-shrink:0; }
.ai-target-modes small,.ai-target-row small { display:block; color:var(--muted); margin-top:5px; }
.ai-target-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:16px 0 10px; }
.ai-target-toolbar > input { flex:1; min-width:180px; }
.ai-target-list { max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.ai-target-row { display:flex; flex-direction:row; align-items:flex-start; gap:12px; padding:12px 16px; margin:0; border-bottom:1px solid var(--line); cursor:pointer; }
.ai-target-row:last-child { border-bottom:0; }
@media(max-width:760px) { .ai-target-modes { grid-template-columns:1fr; } .ai-target-toolbar > .row { flex-wrap:wrap; } }
