.ads-page {
  background:
    radial-gradient(circle at 83% 4%, rgba(168, 205, 190, .32), transparent 28rem),
    radial-gradient(circle at 7% 42%, rgba(244, 190, 135, .2), transparent 25rem),
    #f4f1ea;
}
.back-home { justify-self: end; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 750; }
.back-home span { color: var(--coral); margin-left: 4px; }
.ads-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 110px; }
.ads-hero { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: center; gap: 65px; margin-bottom: 46px; }
.ads-hero h1 { margin: 24px 0 17px; font-size: clamp(48px, 6vw, 76px); line-height: 1.02; letter-spacing: -.065em; }
.ads-hero h1 em { color: #2f8566; font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.ads-hero > div > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.campaign-visual { display: grid; gap: 7px; padding: 17px; border: 1px solid rgba(84,101,92,.16); border-radius: 22px; background: rgba(255,254,250,.7); box-shadow: 0 22px 50px rgba(52,62,56,.09); transform: rotate(2deg); }
.campaign-line { display: grid; gap: 4px; border: 1px solid #e0ddd6; border-radius: 10px; padding: 10px 11px; background: #fffefa; }
.campaign-line i { color: #4f9277; font-size: 7px; font-style: normal; font-weight: 850; letter-spacing: .12em; }
.campaign-line b { overflow: hidden; font: 650 10px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.campaign-visual > em { margin-top: 3px; border-radius: 8px; padding: 9px 10px; color: #95633c; background: #f3e5d5; font: normal 8px ui-monospace, SFMono-Regular, Menlo, monospace; }

.ads-workbench { padding: 27px; border: 1px solid rgba(105,98,88,.2); border-radius: 28px; background: rgba(255,254,250,.84); box-shadow: 0 28px 75px rgba(54,47,37,.1), inset 0 1px #fff; backdrop-filter: blur(14px); }
.workbench-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 4px 22px; }
.workbench-heading > div:first-child { display: grid; gap: 5px; }
.workbench-heading > div:first-child > span { color: #2f8566; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.workbench-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.local-note { display: inline-flex; align-items: center; gap: 7px; color: #8c867e; font-size: 10px; }
.local-note i { width: 6px; height: 6px; border-radius: 50%; background: #4da57e; }
.tool-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 7px; border-radius: 16px; background: #eeebe5; }
.tool-tabs button { min-height: 69px; display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; align-content: center; justify-content: start; column-gap: 11px; border: 0; border-radius: 11px; padding: 9px 15px; color: #777169; background: transparent; text-align: left; cursor: pointer; }
.tool-tabs button > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; align-self: center; border-radius: 9px; color: #6f6960; background: rgba(255,255,255,.55); font: italic 9px Georgia, serif; }
.tool-tabs button strong { align-self: end; font-size: 11px; }
.tool-tabs button small { align-self: start; margin-top: 3px; color: #999289; font-size: 8px; }
.tool-tabs button.active { color: #245f49; background: #fffefa; box-shadow: 0 5px 16px rgba(55,50,43,.08); }
.tool-tabs button.active > span { color: #fff; background: #3e8e6e; }
.tool-panel { margin-top: 12px; }
.tool-panel[hidden] { display: none; }
.utm-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; }
.utm-form-card, .utm-result-card, .naming-form-card, .name-preview-card { min-width: 0; border: 1px solid #e1dcd3; border-radius: 19px; background: #fffefa; }
.utm-form-card, .naming-form-card { padding: 21px; }
.utm-result-card, .name-preview-card { padding: 21px; }
.panel-heading, .result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading > div, .result-heading > div { display: grid; gap: 4px; }
.panel-heading > div > span, .result-heading > div > span, .naming-settings > div > span, .templates-heading > div > span, .preview-kicker { color: #2f8566; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.panel-heading h3, .result-heading h3, .naming-settings h3, .name-preview-card h3 { margin: 0; font-size: 17px; }
.panel-heading button { border: 0; border-radius: 8px; padding: 7px 9px; color: #69635c; background: #f0ede7; font-size: 8px; font-weight: 800; cursor: pointer; }
.landing-field { display: grid; gap: 7px; margin-top: 19px; color: #5c5750; font-size: 9px; font-weight: 800; }
.landing-field span, .utm-fields label > span { display: flex; justify-content: space-between; gap: 8px; }
.landing-field b, .utm-fields b { color: #a39c93; font-size: 7px; font-weight: 650; }
.landing-field input { width: 100%; height: 46px; border: 1px solid #d9d3ca; border-radius: 11px; outline: 0; padding: 0 13px; color: #34312d; background: #fff; font-size: 11px; }
.landing-field input:focus, .utm-fields input:focus, .name-fields input:focus, .template-fields input:focus { border-color: #489375; box-shadow: 0 0 0 4px rgba(72,147,117,.09); }
.source-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; }
.source-presets > span { margin-right: 3px; color: #979087; font-size: 8px; }
.source-presets button { border: 0; border-radius: 7px; padding: 6px 8px; color: #6d675f; background: #f0ede7; font-size: 8px; font-weight: 750; cursor: pointer; }
.source-presets button:hover { color: #2e7759; background: #e7f1eb; }
.utm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.utm-fields label { min-width: 0; display: grid; gap: 6px; color: #5c5750; font-size: 8px; font-weight: 800; }
.utm-fields input { width: 100%; height: 40px; border: 1px solid #ddd7ce; border-radius: 9px; outline: 0; padding: 0 10px; color: #49453f; background: #f9f7f2; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.panel-message, .batch-builder > p { min-height: 14px; margin: 7px 1px 0; color: #c24e3a; font-size: 8px; }
.batch-builder { margin-top: 7px; border-top: 1px solid #ece7df; padding-top: 11px; }
.batch-builder summary { list-style: none; display: flex; align-items: center; justify-content: space-between; color: #6e6860; font-size: 9px; font-weight: 800; cursor: pointer; }
.batch-builder summary::-webkit-details-marker { display: none; }
.batch-builder summary span { color: #3d8b6c; font-size: 15px; transition: transform .18s; }
.batch-builder[open] summary span { transform: rotate(45deg); }
.batch-builder > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 10px; }
.batch-builder label { grid-column: 1 / -1; color: #8d867e; font-size: 8px; }
.batch-builder textarea, #batchResults { width: 100%; resize: vertical; border: 1px solid #ddd7ce; border-radius: 9px; outline: 0; padding: 9px; background: #f9f7f2; font: 8px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.batch-builder button { border: 0; border-radius: 8px; padding: 0 10px; color: #fff; background: #292725; font-size: 8px; font-weight: 800; cursor: pointer; }
.batch-builder button:disabled { opacity: .4; cursor: default; }
#batchResults { display: block; margin-top: 6px; background: #eef6f1; }
.result-heading em { max-width: 120px; overflow: hidden; border-radius: 999px; padding: 5px 7px; color: #3e785f; background: #e8f2ed; font-size: 7px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
#utmResult { width: 100%; min-height: 170px; resize: none; border: 1px solid #ddd7ce; border-radius: 12px; outline: 0; margin-top: 18px; padding: 13px; color: #3e5148; background: #f3f7f4; font: 9px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.result-actions button, .result-actions a { min-height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid #d8d2c8; border-radius: 9px; color: #625c55; background: #f6f3ed; text-decoration: none; font-size: 9px; font-weight: 800; cursor: pointer; }
.result-actions .primary-action { border-color: #292725; color: #fff; background: #292725; }
.result-actions button:disabled, .result-actions a[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.parameter-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; }
.parameter-preview span { min-width: 0; display: grid; gap: 4px; border-radius: 9px; padding: 10px; background: #f2efe9; }
.parameter-preview small { color: #999289; font-size: 6px; font-weight: 850; letter-spacing: .1em; }
.parameter-preview b { overflow: hidden; color: #4e4943; font: 650 8px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.utm-result-card > p { margin: 13px 2px 0; color: #a09991; font-size: 8px; line-height: 1.6; }

.naming-settings { display: flex; align-items: flex-end; gap: 10px; border: 1px solid #e1dcd3; border-radius: 14px; padding: 13px 15px; background: #fffefa; }
.naming-settings > div { display: grid; gap: 4px; margin-right: auto; }
.naming-settings label { display: grid; gap: 5px; color: #827b73; font-size: 7px; font-weight: 800; }
.naming-settings select { min-width: 120px; height: 34px; border: 1px solid #d9d3ca; border-radius: 8px; outline: 0; padding: 0 8px; color: #5d5851; background: #f7f4ee; font-size: 8px; }
.naming-layout { display: grid; grid-template-columns: 1.25fr .75fr; align-items: start; gap: 12px; margin-top: 10px; }
.name-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.name-fields label { min-width: 0; display: grid; gap: 6px; color: #625d56; font-size: 8px; font-weight: 800; }
.name-fields input { min-width: 0; width: 100%; height: 38px; border: 1px solid #ddd7ce; border-radius: 9px; outline: 0; padding: 0 9px; color: #4d4942; background: #f9f7f2; font-size: 9px; }
.templates-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #ebe6de; }
.templates-heading > div:first-child { display: grid; gap: 4px; }
.templates-heading strong { font-size: 12px; }
.templates-heading button { border: 0; border-radius: 7px; padding: 6px 8px; color: #6d675f; background: #f0ede7; font-size: 7px; font-weight: 800; cursor: pointer; }
.template-fields { display: grid; gap: 8px; margin-top: 10px; }
.template-fields label { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; color: #5f5a53; font-size: 8px; font-weight: 850; }
.template-fields input { min-width: 0; height: 38px; border: 1px solid #d9d3ca; border-radius: 9px; outline: 0; padding: 0 10px; color: #425147; background: #f5f8f6; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; }
.token-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; }
.token-list > span { margin-right: 3px; color: #9b958d; font-size: 7px; }
.token-list code { border-radius: 5px; padding: 4px 5px; color: #597064; background: #eef3f0; font-size: 6px; }
.name-preview-card { position: sticky; top: 14px; }
.name-preview-card h3 { margin: 5px 0 15px; }
.name-result { position: relative; display: grid; gap: 6px; border-top: 1px solid #e6e1d9; padding: 13px 43px 13px 0; }
.name-result > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #438266; font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.name-result small { color: #aaa39a; font-size: 6px; font-weight: 650; letter-spacing: 0; }
.name-result strong { overflow-wrap: anywhere; color: #3e3a35; font: 650 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.name-result button { position: absolute; right: 0; top: 50%; border: 0; border-radius: 6px; padding: 5px 6px; color: #706a62; background: #ede9e2; font-size: 7px; font-weight: 800; cursor: pointer; transform: translateY(-50%); }
.copy-all-names { width: 100%; height: 38px; border: 0; border-radius: 9px; margin-top: 8px; color: #fff; background: #292725; font-size: 9px; font-weight: 850; cursor: pointer; }
.utm-sync { display: grid; gap: 8px; margin-top: 12px; border-radius: 12px; padding: 13px; background: #edf5f1; }
.utm-sync > div { display: flex; justify-content: space-between; gap: 10px; }
.utm-sync > div span { color: #3d735a; font-size: 9px; font-weight: 850; }
.utm-sync > div small { color: #8aa294; font-size: 7px; }
.utm-sync label { display: flex; align-items: center; gap: 6px; color: #62756b; font-size: 7px; }
.utm-sync input { accent-color: #3e8e6e; }
.utm-sync button { border: 0; border-radius: 8px; padding: 8px; color: #3f6754; background: #dcece4; font-size: 8px; font-weight: 850; cursor: pointer; }
.utm-sync button span { margin-left: 5px; }
.ads-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.ads-benefits article { min-height: 154px; padding: 21px; border: 1px solid rgba(111,103,92,.17); border-radius: 17px; background: rgba(255,254,250,.48); }
.ads-benefits span { color: #2f8566; font: italic 11px Georgia, serif; }
.ads-benefits strong { display: block; margin: 23px 0 7px; font-size: 14px; }
.ads-benefits p { margin: 0; color: #7f7970; font-size: 11px; line-height: 1.65; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 30; padding: 11px 15px; border-radius: 10px; color: #fff; background: #242220; box-shadow: 0 12px 36px rgba(0,0,0,.2); font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1020px) {
  .utm-layout, .naming-layout { grid-template-columns: 1fr; }
  .name-preview-card { position: static; }
  .name-preview-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .name-preview-card > .preview-kicker, .name-preview-card > h3, .copy-all-names, .utm-sync { grid-column: 1 / -1; }
  .name-result { border: 1px solid #e6e1d9; border-radius: 10px; padding: 12px 42px 12px 10px; }
}
@media (max-width: 780px) {
  .ads-hero { grid-template-columns: 1fr; }
  .campaign-visual { display: none; }
  .name-fields { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .ads-main { width: calc(100% - 24px); padding: 48px 0 76px; }
  .ads-hero { margin-bottom: 30px; }
  .ads-hero h1 { font-size: clamp(43px, 13vw, 61px); }
  .ads-hero > div > p { font-size: 14px; }
  .ads-workbench { padding: 13px; border-radius: 21px; }
  .workbench-heading { align-items: flex-start; flex-direction: column; padding: 8px 4px 17px; }
  .tool-tabs { grid-template-columns: 1fr; }
  .utm-form-card, .utm-result-card, .naming-form-card, .name-preview-card { padding: 16px; }
  .utm-fields, .parameter-preview { grid-template-columns: 1fr; }
  .name-fields { grid-template-columns: 1fr 1fr; }
  .naming-settings { align-items: stretch; flex-direction: column; }
  .naming-settings > div { margin: 0 0 4px; }
  .naming-settings select { width: 100%; }
  .name-preview-card { display: block; }
  .name-result { margin-top: 7px; }
  .ads-benefits { grid-template-columns: 1fr; }
  .ads-benefits article { min-height: 130px; }
}
@media (max-width: 420px) {
  .back-home { display: none; }
  .name-fields { grid-template-columns: 1fr; }
  .template-fields label { grid-template-columns: 1fr; }
  .result-actions { grid-template-columns: 1fr; }
}
