/* Drop-inspired presentation layer. All application selectors and state classes
   remain in styles.css; this file changes only their visual treatment.
   Reference: usedrop.io / Refero 36d939b8-e3b5-45c7-8d81-f7c4d7c8fdaa.
   Grid: 1200px = 590px + 20px + 590px. Fluid below 1328px. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@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;
}

:root {
  --paper: #fff;
  --surface: #f5f5f5;
  --lavender: #b8afda;
  --lavender-soft: #efecf7;
  --carbon: #1a1a1a;
  --ink: #101010;
  --muted: #626260;
  --line: #dedede;
  --gold: #101010;
  --pink: #564879;
  --dark-bg: #101010;
  --card-bg: #fff;
  --panel-bg: #f5f5f5;
  --text-primary: #101010;
  --text-secondary: #626260;
  --border-color: #dedede;
  --danger: #a12d35;
  --shadow: none;
  --radius: 16px;
  --font: "Inter", "Segoe UI", Arial, sans-serif;
  --velvet-noise-yellow: none;
  --velvet-noise-rose: none;
  --velvet-noise-graphite: none;
  color-scheme: light;
}

html { scroll-padding-top: 24px; }
body {
  padding: 0 32px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lavender); color: var(--ink); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}
.container {
  width: min(1200px, 100%);
  min-height: 100dvh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.header {
  min-height: 102px;
  margin: 0;
  padding: 24px 0;
  gap: 24px;
  border: 0;
}
.logo-wrapper { gap: 14px; align-items: center; }
.logo { font-size: 32px; font-weight: 600; letter-spacing: -1.8px; color: var(--ink); }
.logo span { color: inherit; }
.logo-sub { max-width: 190px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.nav { gap: 24px; }
.nav a { color: var(--ink); font-size: 13px; font-weight: 400; }
.nav a:hover, .nav a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.nav-user { max-width: 190px; overflow-wrap: anywhere; color: var(--muted); }
.nav #loginBtn { padding: 11px 23px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; }
.nav #loginBtn:hover { background: #353535; }
.language-switch { border: 1px solid var(--line); background: transparent; padding: 3px; }
.language-switch [data-language] { min-width: 32px; min-height: 30px; color: var(--muted); font-size: 11px; }
.language-switch [data-language].active { background: var(--ink); color: var(--paper); }

.workspace-intro { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 60px; align-items: end; padding: 30px 0 35px; }
.workspace-intro h1 { margin: 0; font-size: clamp(38px, 4.65vw, 64px); line-height: 1.02; font-weight: 400; letter-spacing: -0.055em; }
.workspace-intro h1 span { display: block; }
.workspace-intro-copy { max-width: 380px; padding-bottom: 3px; }
.workspace-intro-copy p { margin: 0; font-size: 14px; line-height: 1.55; }
.workspace-intro-copy p + p { margin-top: 12px; color: var(--muted); }
.container:has(#page-projects.active) .workspace-intro,
.container:has(#page-admin.active) .workspace-intro,
.container:has(#page-projects.active) .service-guide,
.container:has(#page-admin.active) .service-guide,
.container:has(#page-projects.active) .setup-note,
.container:has(#page-admin.active) .setup-note { display: none; }
.statusbar { margin: 0 0 18px; padding: 12px 0; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.tabs, .tariff-tool-switch { gap: 8px; padding: 0; border: 0; }
.tabs { margin-bottom: 24px; }
.tabs .tab, .tariff-tool-switch .tab {
  padding: 11px 21px;
  min-height: 44px;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--ink) !important;
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.tabs .tab:hover, .tariff-tool-switch .tab:hover { background: var(--surface) !important; border-color: #999 !important; }
.tabs .tab.active, .tariff-tool-switch .tab.active {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-color: var(--ink) !important;
  box-shadow: none;
}
.page, .page.active, .tariff-panel { animation: none; transition: none; }
.project-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.left-col, .right-col { gap: 20px; min-width: 0; }
.block { padding: 26px; border: 0; border-radius: 24px; background: var(--surface); box-shadow: none; }
.block-title { margin-bottom: 18px; font-size: 20px; line-height: 1.25; font-weight: 400; letter-spacing: -0.035em; }
.block-compact { flex: none; }
.block-grow { min-height: 0; }
.form-group { gap: 8px; }
input, textarea, select, .modal input {
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid #d2d2cc;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  accent-color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #71716d; opacity: 1; }
input:focus, textarea:focus, select:focus, .modal input:focus { border-color: var(--pink); box-shadow: 0 0 0 2px var(--lavender-soft); outline: none; }
input[type="checkbox"], input[type="radio"] { min-height: 0; padding: 0; }
.form-group > label, .tariff-calc-grid label, .map-review-item label { font-size: 13px; font-weight: 400; color: var(--ink); }
small, .hint { font-size: 12px; line-height: 1.5; }
.left-col > .block-grow { background: var(--carbon); --text-primary: #fff; --text-secondary: #c3c3be; color: #fff; }
.left-col > .block-grow .block-title { color: #fff; }
#keywordsInput { min-height: 265px; background: #252525; border-color: #4a4a47; color: #fff; resize: vertical; }
#keywordsInput::placeholder { color: #b6b6b0; }
#keywordsInput:focus { border-color: var(--lavender); box-shadow: none; }
.left-col > .block-grow .btn-link { color: #fff; text-decoration-color: #73736e; }
.left-col > .block-grow .btn-link:hover { color: var(--lavender); }
.right-col > .block-compact { background: var(--lavender); }
.right-col > .block-compact .block-title { color: var(--ink); }
.region-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.region-chip { min-height: 40px; padding: 9px 12px; border: 1px solid #9389b5; border-radius: 999px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 400; box-shadow: none; transform: none; }
.region-chip:hover { color: var(--ink); border-color: var(--ink); background: #c9c1e4; transform: none; }
.region-chip.active { background: var(--paper); background-image: none; border-color: var(--paper); color: var(--ink); box-shadow: none; }
.region-code-picker { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.region-code-picker input { min-height: 42px; border: 1px solid #9389b5; background: transparent; border-radius: 999px; font-size: 12px; }
.region-code-picker input::placeholder { color: #443a5e; }
.region-code-add { min-height: 42px; padding-inline: 16px; }
.region-code-preview, .region-code-hint { color: #3d315b; }
.region-search-results { background: var(--paper); border-color: var(--line); box-shadow: 0 12px 30px #10101018; }
.region-search-result { color: var(--ink); }
.region-search-result:hover, .region-search-result:focus-visible { background: var(--lavender-soft); }
.launch-area { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.launch-area .btn, .launch-area .instruction-link { flex: none; width: auto; }
.btn, .btn-pink, .btn:not(.secondary):not(.btn-danger) {
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  text-shadow: none;
  box-shadow: none;
  letter-spacing: 0;
  transform: none;
  transition: background-color 160ms ease, transform 160ms ease;
}
.btn::before, .btn::after { display: none; }
.btn:hover, .btn:not(.secondary):not(.btn-danger):hover { background: #353535; border-color: #353535; color: var(--paper); box-shadow: none; transform: translateY(-1px); }
.btn:active, .btn:not(.secondary):not(.btn-danger):active { transform: translateY(0); box-shadow: none; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid #bdbdb6; box-shadow: none; }
.btn.secondary:hover { background: var(--surface); color: var(--ink); }
.btn-danger { background: #faeded; color: var(--danger); border-color: #e8b7bb; }
.btn-danger:hover { background: #f2d9dc; color: var(--danger); }
.btn:disabled, .btn:not(.secondary):not(.btn-danger):disabled { opacity: .55; transform: none; box-shadow: none; }
.btn-link, .instruction-link, .auth-link, .project-card .actions a { color: var(--ink); font-size: 12px; font-weight: 400; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #aaa; }
.btn-link { min-height: 40px; padding-block: 8px; }
.btn-link:hover, .instruction-link:hover, .auth-link:hover { color: var(--pink); text-decoration-color: currentColor; }
.btn-group { gap: 20px; align-items: center; }
.recommend-container { gap: 10px; }
.recommend-list { min-height: 90px; max-height: 220px; padding: 0; background: transparent; border: 0; border-radius: 0; }
.recommend-list .item { border-color: var(--line); color: var(--ink); }
.recommend-actions { margin-top: auto; gap: 20px; }
.empty-inline { padding: 8px 0; text-align: left; font-size: 13px; color: var(--muted); }
#recommendCount { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
#addAllRecommendedBtn { color: var(--ink); background: transparent; border: 0; border-radius: 0; box-shadow: none; }
#addAllRecommendedBtn:hover { background: transparent; color: var(--pink); }
.first-screen-legal { text-align: right; margin-top: 20px; font-size: 12px; }
.first-screen-legal a { color: var(--muted); }

.service-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin: 96px 0 64px; }
.service-guide-intro { padding: 36px; background: var(--lavender-soft); border-radius: 24px; align-self: start; }
.service-guide h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); font-weight: 400; line-height: 1.12; letter-spacing: -0.045em; }
.service-guide-intro p { max-width: 320px; margin: 28px 0 0; font-size: 14px; line-height: 1.6; }
.service-guide-list { margin: 0; }
.service-guide-list > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.service-guide-list > div:first-child { padding-top: 0; }
.service-guide-list dt { font-size: 19px; font-weight: 400; letter-spacing: -.03em; }
.service-guide-list dd { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.setup-note { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 40px 0; border-top: 1px solid var(--line); }
.setup-note h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 40px; font-weight: 400; line-height: 1.1; letter-spacing: -.04em; }
.setup-note p { margin: 0 0 16px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.workspace-footer { margin-top: 48px; padding: 34px 0 24px; border-top: 1px solid var(--line); }
.footer-wordmark { display: flex; justify-content: space-between; align-items: center; font-size: clamp(72px, 16vw, 208px); font-weight: 500; line-height: 1; letter-spacing: -.075em; }
.footer-wordmark span { color: var(--lavender); font-weight: 300; font-family: Arial, sans-serif; letter-spacing: 0; }
.footer-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
html:lang(en) .locale-ru, html:lang(ru) .locale-en { display: none; }

/* Existing Maps workflow, projects and admin retain all controls and states. */
.guide-logo { text-decoration: none; }
.nav .guide-open { padding: 11px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; }
.guide-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 70px; align-items: end; padding: 48px 0 64px; }
.guide-hero h1 { margin: 0; font-size: clamp(38px, 4.3vw, 60px); line-height: 1.06; font-weight: 400; letter-spacing: -.05em; }
.guide-hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.guide-section { display: grid; grid-template-columns: 1fr 1.6fr; gap: 80px; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.guide-section h2 { margin: 0; font-size: 36px; font-weight: 400; line-height: 1.15; letter-spacing: -.04em; }
.guide-body { max-width: 680px; font-size: 15px; line-height: 1.75; }
.guide-body p { margin: 0 0 18px; }
.guide-body li { margin-bottom: 12px; }
.guide-body ul, .guide-body ol { padding-left: 22px; }
.guide-body a { color: var(--pink); text-underline-offset: 4px; }
.guide-body code { font-size: 14px; overflow-wrap: anywhere; }
.guide-step + .guide-step { margin-top: 34px; }
.guide-step h3 { margin: 0 0 10px; font-size: 22px; font-weight: 400; letter-spacing: -.03em; line-height: 1.3; }
.guide-example { display: grid; gap: 8px; padding: 26px; border-radius: 20px; background: var(--lavender-soft); }
.guide-example strong { font-size: 24px; font-weight: 400; letter-spacing: -.035em; }
.guide-example span { color: var(--muted); font-size: 13px; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--lavender); border-radius: 24px; padding: 40px; margin-top: 36px; }
.guide-cta h2 { margin: 0; font-size: 36px; font-weight: 400; letter-spacing: -.04em; line-height: 1.2; }
.guide-cta .btn { text-decoration: none; flex-shrink: 0; }
.map-steps { gap: 10px; margin-bottom: 24px; }
.map-step { padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; }
.map-step.active { color: var(--ink); background: var(--lavender-soft); border-color: var(--lavender); }
.narrow { width: min(740px, 100%); max-width: 100%; margin: 0 auto; padding: 32px; }
.map-url-help { margin-top: 14px; padding: 20px; border: 0; border-radius: 16px; background: var(--paper); color: var(--muted); font-size: 13px; line-height: 1.6; }
.map-url-help strong, .map-url-help span { color: var(--ink); }
.map-review-item { padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.map-total { margin-block: 22px; padding: 20px; background: var(--lavender-soft); border-radius: 16px; }
.map-total strong { color: var(--ink); font-weight: 500; font-size: 26px; }
.map-nav-buttons { margin-top: 24px; }
.projects-head { margin: 24px 0; }
.projects-head .page-title { font-weight: 400; font-size: 36px; letter-spacing: -.04em; }
.project-card { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--paper); box-shadow: none; }
.project-card .url { color: var(--ink); font-weight: 500; }
.badge, .status-pill { background: var(--lavender-soft); background-image: none; border: 0; color: #44375f; box-shadow: none; font-weight: 400; }
.personal-referral { background: var(--lavender-soft); border: 0; border-radius: 20px; }
.personal-referral h3 { color: var(--ink); font-weight: 400; }
.personal-referral-stats { background: transparent; }
.empty-state { padding: 52px 24px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--surface); }
.admin-summary div { background: var(--surface); border: 0; border-radius: 16px; }
.admin-summary span { color: var(--ink); font-weight: 400; }
.admin-table { background: var(--paper); }
.admin-table th { background: var(--surface); color: var(--muted); font-weight: 400; }
.admin-table th, .admin-table td { font-size: 12px; padding: 14px 12px; }
.admin-stats-toolbar select, .admin-click-ranges, .table-action, .admin-toggle-track { border-color: #c6c6c0; }
.table-action { color: var(--ink); background: var(--paper); min-height: 36px; }
.table-action:hover { background: var(--lavender-soft); }
.admin-click-range.is-active, .admin-toggle.is-on .admin-toggle-track { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.admin-toggle.is-on .admin-toggle-track > span { background: var(--paper); }
.stat-success, .worker-stat b, .click-day-stat b, .map-query-status.is-found { color: #246347; }
.map-missing-count, .map-keyword-error, .map-query-status.is-missing { color: #904320; }
.map-query-status.is-missing { background: #fcf1e9; border-color: #edceba; }
.map-keyword-editor-actions button[type="submit"] { background: var(--ink); color: var(--paper); }

/* Dialogs: flat light surfaces, strong selected state, natural vertical scroll. */
.modal-overlay { background: #1010107a; backdrop-filter: none; padding: 24px; }
#tariffModal { align-items: safe center; }
.modal, #tariffModal .modal { background: var(--paper); color: var(--ink); border: 0; border-radius: 24px; padding: 30px; box-shadow: 0 24px 80px #00000020; }
.modal-header { align-items: flex-start; gap: 20px; }
.modal-header h2 { color: var(--ink); font-size: 30px; line-height: 1.12; font-weight: 400; letter-spacing: -.045em; }
.modal-header p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 10px; }
.modal-close { display: grid; place-items: center; flex: 0 0 38px; width: 38px; min-height: 38px; padding: 0; background: var(--surface); color: var(--ink); border-radius: 50%; font-size: 24px; line-height: 1; }
.modal-close:hover { background: var(--lavender-soft); }
.auth-modal { width: min(480px, calc(100vw - 32px)); }
.auth-form { gap: 18px; }
.auth-message { color: var(--danger); background: #faeded; border-color: #e8b7bb; }
.auth-message.success { color: #246347; background: #e9f3ed; border-color: #c4dfce; }
.tariff-grid, .tariff-period { gap: 8px; }
#tariffModal .tariff-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tariff-card, .period-item {
  min-height: 94px;
  padding: 16px 8px;
  border: 1px solid var(--line) !important;
  border-radius: 16px;
  background: var(--surface) !important;
  color: var(--ink);
  box-shadow: none !important;
  transform: none;
  cursor: pointer;
}
.period-item { min-height: 62px; }
.tariff-card:hover, .period-item:hover { background: var(--lavender-soft) !important; border-color: #9c92bb !important; box-shadow: none; transform: none; }
.tariff-card.active, .period-item.active { background: var(--lavender) !important; border-color: #786b9e !important; color: var(--ink); box-shadow: none !important; }
.tariff-card .value { font-size: 28px; font-weight: 400; letter-spacing: -.04em; }
.tariff-card .label, .tariff-card .price, .period-item small { color: var(--muted); font-size: 12px; }
.tariff-card.active .label, .tariff-card.active .price, .period-item.active small { color: #3e3458; }
#tariffModal .tariff-recommendation { background: var(--surface); border: 0; border-radius: 18px; padding: 22px; }
.rec-row { border-color: var(--line); color: var(--muted); }
.rec-main strong, .rec-row strong { color: var(--ink); font-weight: 400; }
.rec-main strong { font-size: 44px; letter-spacing: -.045em; }
.rec-main span, .rec-monthly { color: var(--muted); }
.recommended-plan, #tariffModal .recommended-plan { padding: 18px; background: var(--lavender); border: 0; border-radius: 16px; box-shadow: none; }
.recommended-plan small { color: #44395e; }
.recommended-plan strong, .recommended-plan span { color: var(--ink); font-weight: 400; }
.tariff-table, .tariff-table-wrap { background: transparent; border: 0; box-shadow: none; }
#tariffModal .tariff-table tbody tr, #tariffModal .tariff-table tbody tr.active { background: var(--paper) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
#tariffModal .tariff-table tbody tr.active { background: var(--lavender-soft) !important; border-color: #9c92bb !important; }
#tariffModal .tariff-table tbody td { color: var(--ink); background: transparent !important; }
.tariff-total { color: var(--muted); }
.tariff-total .price { color: var(--ink); font-weight: 400; font-size: 30px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
#tariffModal .tariff-billing-row { grid-template-columns: minmax(155px, auto) minmax(0, 1fr) auto; }
#tariffModal .tariff-billing-row .tariff-total { display: grid; grid-template-columns: 1fr; gap: 2px; align-content: center; }
#tariffModal .tariff-total .price { white-space: nowrap; }
#tariffModal .tariff-billing-footer { border-color: var(--line); }
.trial-notice, .subscription-notice { color: var(--muted); background: transparent; border: 0; line-height: 1.55; }
.payment-method-switch label { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 400; }
.payment-method-switch label:has(input:checked) { background: var(--lavender-soft); border-color: #9c92bb; }
.payment-method-switch input[type="radio"] { accent-color: var(--ink); }
#tariffModal .recurring-consent { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-weight: 400; }
#tariffModal .recurring-consent span { white-space: normal; }
#tariffModal .recurring-consent input[type="checkbox"] { border-color: #7c7c76; background: var(--paper); accent-color: var(--ink); box-shadow: none; }
#tariffModal .recurring-consent input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
#tariffModal .recurring-consent input[type="checkbox"]:checked::after { border-color: var(--paper); }
.info-dot { color: var(--ink); background: var(--lavender-soft); border-color: #bbb1d4; }
.info-dot::after { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 12px 30px #10101020; }
.toast { border: 1px solid #484842; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px #10101020; }
.field-error { border-color: var(--danger) !important; box-shadow: 0 0 0 2px #a12d3518 !important; }
.legal-page { background: var(--paper); color: var(--ink); border: 0; box-shadow: none; }
.legal-page h1, .legal-page h2 { font-weight: 400; color: var(--ink); letter-spacing: -.035em; }
.legal-page p, .legal-muted { color: var(--muted); }

@media (max-width: 1100px) {
  .logo-sub { display: none; }
  .nav { gap: 18px; }
  .workspace-intro { gap: 32px; }
  .block { padding: 22px; }
  .service-guide, .setup-note { gap: 40px; }
  .region-code-picker { grid-template-columns: minmax(0, 1fr); }
  .region-code-add { grid-column: 1; grid-row: auto; }
  .region-code-preview { grid-row: auto; }
}
@media (max-width: 820px) {
  .guide-hero { grid-template-columns: 1fr; gap: 24px; }
  .guide-hero p { max-width: 540px; }
  .guide-section { gap: 32px; }
  .guide-section h2 { font-size: 30px; }
  .guide-cta { padding: 28px; }
  .guide-cta h2 { font-size: 28px; }
  body { padding-inline: 24px; }
  .header { gap: 20px; min-height: 90px; }
  .logo { font-size: 28px; }
  .nav { gap: 14px; }
  .nav a { font-size: 12px; }
  .workspace-intro { grid-template-columns: 1fr; gap: 22px; padding-top: 24px; }
  .workspace-intro h1 { font-size: 52px; }
  .workspace-intro-copy { max-width: 580px; }
  .workspace-intro-copy p + p { margin-top: 8px; }
  .project-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .left-col, .right-col { gap: 16px; }
  .block { padding: 20px; border-radius: 20px; }
  .block-title { font-size: 18px; }
  .region-chips { grid-template-columns: 1fr; }
  .launch-area { gap: 8px; }
  .launch-area .btn { width: 100%; }
  .launch-area .instruction-link { width: 100%; text-align: center; padding-block: 8px; }
  #keywordsInput { min-height: 350px; }
  .btn-group, .recommend-actions { gap: 4px 14px; }
  .service-guide { gap: 28px; margin-top: 64px; }
  .service-guide-intro { padding: 26px; }
  .service-guide h2 { font-size: 30px; }
  .setup-note { gap: 28px; }
  .setup-note h2 { font-size: 34px; }
}
@media (max-width: 640px) {
  #tariffModal .tariff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tariffModal .tariff-grid .tariff-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #tariffModal .tariff-billing-row { grid-template-columns: 1fr; }
  #tariffModal .tariff-billing-row .tariff-total { display: flex; justify-content: space-between; }
  .guide-hero { padding: 32px 0 40px; }
  .guide-hero h1 { font-size: 36px; }
  .guide-section { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .guide-section h2 { font-size: 32px; }
  .guide-body { font-size: 14px; }
  .guide-example { padding: 20px; }
  .guide-example strong { font-size: 22px; }
  .guide-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  body { padding-inline: 18px; }
  .header { display: grid; grid-template-columns: 1fr; padding: 24px 0 16px; gap: 20px; }
  .logo { font-size: 30px; }
  .logo-wrapper { min-height: 34px; }
  .nav { display: flex; flex-wrap: wrap; gap: 12px 10px; width: 100%; padding-right: 0; }
  .nav a { min-height: 36px; display: inline-flex; align-items: center; font-size: 12px; }
  .nav .language-switch { position: absolute; top: 23px; right: 18px; }
  .nav #loginBtn { padding: 8px 12px; margin-left: auto; }
  .nav-user { max-width: 100%; }
  .workspace-intro { padding: 24px 0 28px; gap: 20px; }
  .workspace-intro h1 { font-size: clamp(34px, 9.4vw, 52px); line-height: 1.06; }
  .workspace-intro-copy p { font-size: 13px; }
  .statusbar { padding-top: 14px; margin-bottom: 16px; line-height: 1.6; }
  #toolTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 20px; }
  #toolTabs .tab { min-width: 0; min-height: 44px; padding: 9px 10px; font-size: 12px; }
  #toolTabs .tab:last-child { grid-column: 1 / -1; }
  .project-form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .block { padding: 22px; border-radius: 22px; }
  .block-title { font-size: 20px; margin-bottom: 18px; }
  input, textarea, select, .modal input { font-size: 16px; }
  .form-group small { margin-top: 6px; }
  #keywordsInput { min-height: 220px; }
  .region-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .region-chip { min-height: 44px; }
  .region-code-picker input { font-size: 16px; min-height: 46px; }
  .region-code-add { min-height: 44px; }
  .launch-area { margin-top: 22px; }
  .launch-area .btn { min-height: 48px; }
  .btn-link, .instruction-link { font-size: 12px; }
  .first-screen-legal { text-align: left; }
  .service-guide { grid-template-columns: 1fr; gap: 30px; margin: 56px 0 36px; }
  .service-guide-intro { padding: 28px; }
  .service-guide h2 { font-size: 32px; }
  .service-guide-intro p { margin-top: 22px; }
  .service-guide-list > div { padding-block: 18px; }
  .setup-note { grid-template-columns: 1fr; gap: 24px; padding-top: 30px; }
  .setup-note h2 { font-size: 36px; }
  .workspace-footer { margin-top: 12px; padding-top: 28px; }
  .footer-meta { margin-top: 24px; font-size: 11px; flex-wrap: wrap; }
  .map-steps { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .map-step { min-width: 0; padding: 11px 16px; }
  .narrow { padding: 22px; }
  .map-url-help { padding: 16px; font-size: 12px; }
  .map-nav-buttons { flex-wrap: wrap; }
  .map-nav-buttons .btn { flex: 1; }
  .map-total { padding: 16px; }
  .map-total strong { font-size: 24px; }
  .projects-head .page-title { font-size: 30px; }
  .projects-actions { width: 100%; gap: 8px; }
  .projects-actions .btn { flex: 1; padding-inline: 12px; }
  .project-type-tabs { display: flex; }
  .project-type-tabs .tab { flex: 1; }
  .admin-section-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-overlay { padding: 12px; }
  .modal, #tariffModal .modal { padding: 24px 20px; border-radius: 22px; width: calc(100vw - 24px); }
  .modal-header h2 { font-size: 28px; }
  .modal-close { flex-basis: 36px; width: 36px; min-height: 36px; }
  .tariff-tool-switch .tab { padding-inline: 12px; font-size: 12px; }
  .tariff-card .value { font-size: 25px; }
  .tariff-card, .period-item { min-height: 88px; padding: 14px 8px; }
  .period-item { min-height: 60px; }
  #tariffModal .tariff-recommendation { padding: 18px; }
  #tariffModal .tariff-total { gap: 12px; }
  .tariff-total .price { font-size: 30px; }
  .rec-main strong { font-size: 36px; }
  .payment-method-switch label { min-height: 44px; }
  .referral-create { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  /* Keep working dialogs and account controls quiet; the landing presentation
     explicitly keeps its motion regardless of the system preference. */
  :is(.modal-overlay, #page-projects, #page-admin),
  :is(.modal-overlay, #page-projects, #page-admin) *,
  :is(.modal-overlay, #page-projects, #page-admin) *::before,
  :is(.modal-overlay, #page-projects, #page-admin) *::after {
    animation: none !important; transition: none !important;
  }
}
