/* =====================================================================
   pages-b: Karten (maps), öffentliche Karte (public-map), Embed Studio, SEO-Seiten
   App pages use theme tokens only. The public widget (.pm) defines its own
   light tokens and derives its accent from the map's brand colour (--brand).
   ===================================================================== */

/* ---------------- public widget: tokens ---------------- */
.pm {
  --brand: #5b55d9; --mk: var(--brand);
  --accent: var(--brand); --accent-600: color-mix(in srgb, var(--brand) 85%, #000); --accent-700: color-mix(in srgb, var(--brand) 70%, #000);
  --accent-50: color-mix(in srgb, var(--brand) 7%, #fff); --accent-100: color-mix(in srgb, var(--brand) 16%, #fff); --accent-contrast: #fff;
  --bg: #f6f7f9; --surface: #fff; --surface-2: #f8f9fb; --surface-3: #f1f3f6; --border: #e4e7ec; --border-strong: #d0d5dd;
  --text: #101828; --text-2: #475467; --text-3: #667085; --overlay: rgba(15, 18, 30, .45);
  --ok: #15803d; --ok-bg: #ecfdf3; --warn: #b45309; --warn-bg: #fffaeb; --soon: #d97706;
  --font: "Inter", system-ui, Arial, sans-serif; --pm-r: 14px; --pm-r-sm: 9px; --pm-r-pill: 999px; --pm-r-lg: 18px; --pm-pad: 14px; --pm-gap: 10px;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --ctrl-h: 40px; --fs: 14px; --fs-sm: 13px; --fs-xs: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 6px 16px rgba(16, 24, 40, .06); --shadow-lg: 0 16px 40px rgba(16, 24, 40, .18);
  color-scheme: light; color: var(--text); background: var(--bg); font: 14px/1.5 var(--font);
  position: relative; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
.pm.framed { border: 1px solid var(--border-strong); border-radius: var(--pm-r); }
.pm[data-radius="sharp"] { --pm-r: 4px; --pm-r-sm: 3px; --pm-r-pill: 4px; --pm-r-lg: 6px; }
.pm[data-radius="round"] { --pm-r: 22px; --pm-r-sm: 999px; --pm-r-pill: 999px; --pm-r-lg: 28px; }
.pm[data-density="compact"] { --pm-pad: 10px; --pm-gap: 6px; }
.pm[data-density="comfortable"] { --pm-pad: 20px; --pm-gap: 16px; }
.pm h1, .pm h2, .pm h3, .pm h4, .pm button, .pm input, .pm select, .pm textarea { font-family: var(--font); }
.pm *:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pm .ico { width: 16px; height: 16px; }
.pm h1, .pm h2, .pm h3, .pm h4 { color: var(--text); }
.pm-ribbon { position: sticky; z-index: 900; top: 0; display: block; text-align: center; background: #101828; color: #fff; font-size: 12px; font-weight: 600; padding: 5px 12px; box-shadow: var(--shadow); pointer-events: none; }

/* not available */
.pm-na { align-items: center; justify-content: center; background: radial-gradient(800px 400px at 50% 0%, var(--accent-50), var(--bg)); }
.pm-na-box { text-align: center; max-width: 420px; padding: 24px; }
.pm-na-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; margin: 0 auto 18px; color: var(--brand); }
.pm-na-ico .ico { width: 28px; height: 28px; }
.pm-na h1 { font-size: 22px; margin-bottom: 8px; } .pm-na p { color: var(--text-2); margin-bottom: 24px; }

/* brand + bars */
.pm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-brand b { display: block; font-size: 15px; line-height: 1.2; } .pm-brand span:not(.pm-logo) { font-size: 12px; color: var(--text-3); }
.pm-logo { width: 34px; height: 34px; border-radius: var(--pm-r-sm); background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.pm-logo.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; }
.pm-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pm-bar .pm-search { flex: 1; max-width: 520px; margin-left: auto; }
.pm-bar2 { padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pm-bar2:has(.pm-filters:empty) { display: none; }

/* search with suggestions */
.pm-search { position: relative; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--pm-r-pill); height: 42px; padding: 0 4px 0 14px; transition: box-shadow .15s, border-color .15s; }
.pm-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-100); }
.pm-search-ico { color: var(--text-3); display: flex; }
.pm-search input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; height: 100%; padding: 0 10px; font: inherit; color: var(--text); outline: none; }
.pm-search input::-webkit-search-cancel-button { cursor: pointer; }
.pm .pm-search input:focus-visible { outline: none; }
.pm-geo { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; justify-content: center; border: 0; border-radius: var(--pm-r-pill); background: var(--accent-50); color: var(--accent-700); font: 600 13px/1 var(--font); cursor: pointer; padding: 0 10px; }
.pm-geo:hover { background: var(--accent-100); }
.pm-search.big { height: 56px; padding-left: 20px; box-shadow: var(--shadow); border-color: var(--border); }
.pm-search.big input { font-size: 16px; }
.pm-search.big .pm-geo { height: 44px; padding: 0 16px; }
.pm-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 1000; border-radius: var(--pm-r); max-height: 340px; overflow-y: auto; text-align: left; }
.pm-sg { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.pm-sg .ico { color: var(--text-3); }
.pm-sg div { min-width: 0; flex: 1; } .pm-sg b { font-weight: 600; } .pm-sg div span { color: var(--text-3); font-size: 12px; margin-left: 6px; }
.pm-sg small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pm-sg.sel, .pm-sg:hover { background: var(--accent-50); } .pm-sg.sel .ico { color: var(--brand); }

/* filters */
.pm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-filters select { width: auto; height: 34px; border-radius: var(--pm-r-pill); padding: 0 30px 0 12px; font-size: 13px; border: 1px solid var(--border-strong); background-color: var(--surface); color: var(--text); }
.pm-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--surface-3); border-radius: var(--pm-r-pill); }
.pm-pills button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; height: 28px; padding: 0 12px; border-radius: var(--pm-r-pill); font: 500 13px/1 var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.pm-pills button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.pm-pills .n { font-size: 11px; color: var(--text-3); font-weight: 600; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--pm-r-pill); border: 1px solid var(--border-strong); background: var(--surface); font: 500 13px/1 var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.pm-chip[aria-pressed="true"] { background: var(--accent-50); border-color: var(--brand); color: var(--accent-700); }
.pm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; flex: none; }
.pm-dot.active { background: var(--ok); } .pm-dot.soon { background: var(--soon); }

/* body: list + map */
.pm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px 1fr; }
.pm-body:has(.pm-side.hidden) { grid-template-columns: 1fr; }
.pm-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border-right: 1px solid var(--border); }
.pm-count { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: var(--text-2); }
.pm-count > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pm-rh-n { color: var(--text-3); font-size: 12px; }
.pm-link { border: 0; background: none; color: var(--brand); font: 600 13px/1 var(--font); cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 6px 0; white-space: nowrap; }
.pm-list { flex: 1; overflow-y: auto; padding: 4px 12px 16px; display: flex; flex-direction: column; gap: var(--pm-gap); }
.pm-map { position: relative; min-height: 0; background: #e8ecef; z-index: 0; }
.pm-map.dark { background: #1d2230; }
.pm-map.dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.6); }
.pm-map.gray .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.pm .leaflet-container { font-family: var(--font); }
.pm .leaflet-control-zoom a { color: var(--text); }

/* cards */
.pm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--pm-r); padding: var(--pm-pad); cursor: pointer; transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 4px; outline: none; flex: none; }
.pm-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pm-card.on, .pm-card:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-100); }
.pm-card h3 { font-size: 15px; line-height: 1.3; margin: 2px 0 0; }
.pm-card-top { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.pm-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.pm-cat span { width: 8px; height: 8px; border-radius: 3px; }
.pm-km { margin-left: auto; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pm-near { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pm-near .ico { width: 12px; height: 12px; } .pm-near + .pm-km { margin-left: 0; }
.pm-addr { color: var(--text-2); font-size: 13px; }
.pm-addr .nw { white-space: nowrap; }
.pm-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.pm-status.open { color: var(--ok); } .pm-status.soon { color: var(--soon); }
.pm-status.other { color: color-mix(in srgb, var(--sc, var(--soon)) 82%, #000); } .pm-status.other .pm-dot { background: var(--sc, var(--soon)); }
.pm-stag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface-3); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.pm-stag .pm-dot { width: 7px; height: 7px; background: var(--sc); }
.pm-cfs { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.pm-cfs em, .pm-cfl { font-style: normal; color: var(--text-3); }
.pm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--pm-r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 13px/1 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.pm-btn:hover { background: var(--surface-3); }
.pm-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pm-btn.primary:hover { background: var(--accent-600); }
.pm-actions.compact .pm-btn:not(.primary) span { display: none; }
.pm-actions.compact .pm-btn:not(.primary) { width: 32px; padding: 0; }
.pm-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; color: var(--text-3); text-align: center; }
.pm-empty > .ico { width: 28px; height: 28px; color: var(--text-3); } .pm-empty b { color: var(--text); } .pm-empty .pm-btn { margin-top: 8px; }
.pm-more { border: 1px dashed var(--border-strong); background: var(--surface); color: var(--brand); border-radius: var(--pm-r); height: 40px; font: 600 13px/1 var(--font); cursor: pointer; flex: none; }
.pm-note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* markers */
.pm-mk-wrap { background: none; border: 0; }
.pm-mk { display: block; transition: transform .15s; transform-origin: 50% 100%; }
.pm-mk.dot { width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: var(--mk); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); transform-origin: 50% 50%; }
.pm-mk.dot.soon { background: #fff; border-color: var(--sc, var(--soon)); }
.pm-mk.pin { width: 28px; height: 36px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.pm-mk.pin path { fill: var(--mk); stroke: #fff; stroke-width: 2; } .pm-mk.pin circle { fill: #fff; }
.pm-mk.pin.soon path { fill: #fff; stroke: var(--sc, var(--soon)); stroke-width: 2.4; } .pm-mk.pin.soon circle { fill: var(--sc, var(--soon)); }
.pm-mk.logo { width: 34px; height: 34px; border-radius: 50%; background: var(--mk); color: #fff; font: 700 12px/30px var(--font); text-align: center; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); transform-origin: 50% 50%; }
.pm-mk.logo.soon { background: #fff; color: var(--sc, var(--soon)); border-color: var(--sc, var(--soon)); }
.on .pm-mk, .hover .pm-mk { transform: scale(1.3); }
.on .pm-mk.pin path { stroke: #101828; }
.pm-cl { display: grid; place-items: center; border-radius: 50%; background: var(--mk); color: #fff; font: 700 13px/1 var(--font); box-shadow: 0 0 0 5px color-mix(in srgb, var(--mk) 28%, transparent), 0 2px 6px rgba(0,0,0,.25); cursor: pointer; }
.pm-you { display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: #101828; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(16,24,40,.18); animation: pm-pulse 2s infinite; }
@keyframes pm-pulse { 50% { box-shadow: 0 0 0 11px rgba(16,24,40,.06); } }
.pm-tip { font-family: var(--font); font-size: 12px; border-radius: 8px; border: 0; box-shadow: var(--shadow); }

/* powered by */
.pm-powered { display: inline-flex; gap: 4px; align-items: center; justify-content: center; font-size: 11.5px; color: var(--text-3); padding: 6px 12px; text-decoration: none !important; }
.pm-powered b { color: var(--text-2); }
.pm > .pm-powered { background: var(--surface); border-top: 1px solid var(--border); }
.pm-powered.float { position: absolute; z-index: 800; left: 10px; bottom: 6px; background: rgba(255,255,255,.92); border-radius: 99px; padding: 3px 10px; box-shadow: var(--shadow); }

/* floating icon buttons, toast, modal */
.pm-ibtn { width: 36px; height: 36px; flex: none; border-radius: var(--pm-r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 18px/1 var(--font); cursor: pointer; display: inline-grid; place-items: center; }
.pm-ibtn:hover { background: var(--surface-3); }
.pm-toasts { position: absolute; z-index: 1300; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
.pm-toast { background: #101828; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; box-shadow: var(--shadow-lg); animation: pop .15s; }
.pm-overlay { position: fixed; inset: 0; z-index: 1200; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.pm-modal { width: min(520px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--pm-r-lg); box-shadow: var(--shadow-lg); animation: pop .15s; }
.pm-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.pm-modal-head > div { flex: 1; } .pm-modal-head h3 { font-size: 17px; } .pm-modal-head span { font-size: 13px; color: var(--text-3); }
.pm-modal-body { padding: 4px 20px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.pm-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.pm-modal-foot .pm-btn { height: 40px; padding: 0 16px; }
.pm-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pm-modal input, .pm-modal select { height: 40px; }
.pm-consent { align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.pm-consent input { margin-top: 2px; }
.pm-err { background: #fef3f2; color: #b91c1c; border-radius: 10px; padding: 9px 12px; font-size: 13px; }

/* detail panel */
.pm-detail-in { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pm-detail-hero { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pm-detail-in h2 { font-size: 20px; line-height: 1.25; }
.pm-detail-in h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-top: 10px; }
.pm-rows { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 2px; font-size: 13.5px; color: var(--text-2); }
.pm-rows > div { display: flex; gap: 10px; align-items: flex-start; } .pm-rows .ico { color: var(--brand); margin-top: 2px; }
.pm-rows a { color: var(--text); }
.pm-desc { color: var(--text-2); font-size: 13.5px; margin: 6px 0 0; }
.pm-hours { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-hours td { padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--text-2); } .pm-hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pm-hours tr.today td { color: var(--text); font-weight: 700; }
.pm-special { display: flex; gap: 8px; font-size: 12.5px; background: var(--accent-50); color: var(--accent-700); padding: 8px 10px; border-radius: 10px; margin-top: 6px; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-tags span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--surface-3); border-radius: 99px; padding: 4px 10px; color: var(--text-2); }
.pm-tags .ico { width: 13px; height: 13px; color: var(--ok); }

/* ---- template 2: single location ---- */
.pm-t2 { display: block; }
.pm-t2 .pm-map { position: absolute; inset: 0; }
.pm-panel { position: absolute; z-index: 700; top: 16px; left: 16px; bottom: 16px; width: 400px; background: var(--surface); border-radius: var(--pm-r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.pm-switch { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pm-switch select { flex: 1; min-width: 0; height: 36px; border-radius: var(--pm-r-sm); font-weight: 600; }
.pm-panel .pm-detail { flex: 1; overflow-y: auto; }
.pm-detail .pm-detail-hero { margin: -18px -18px 4px; padding: 22px 18px 18px; background: linear-gradient(135deg, var(--brand), var(--accent-700)); }
.pm-detail .pm-detail-hero .pm-logo { background: #fff; color: var(--brand); }
.pm-cat.light { color: #fff; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 99px; }
.pm-cat.light span { box-shadow: 0 0 0 1.5px #fff; }
.pm-panel .pm-powered { border-top: 1px solid var(--border); }

/* ---- template 3: mobile sheet ---- */
.pm-t3 { display: block; }
.pm-t3 .pm-map { position: absolute; inset: 0; }
.pm-float-top { position: absolute; z-index: 800; top: 12px; left: 12px; right: 60px; max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.pm-float-top .pm-search { box-shadow: var(--shadow); border-color: transparent; }
.pm-sheet { position: absolute; z-index: 750; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(560px, 100%); background: var(--surface); border-radius: var(--pm-r-lg) var(--pm-r-lg) 0 0; box-shadow: 0 -8px 30px rgba(16,24,40,.18); display: flex; flex-direction: column; height: 172px; transition: height .25s ease; }
.pm-sheet[data-sheet="half"] { height: 52%; } .pm-sheet[data-sheet="full"] { height: calc(100% - 70px); }
.pm-sheet.drag { transition: none; }
.pm-handle { border: 0; background: none; padding: 10px 0 4px; cursor: grab; touch-action: none; display: flex; justify-content: center; width: 100%; flex: none; }
.pm-handle span { width: 42px; height: 5px; border-radius: 9px; background: var(--border-strong); }
.pm-sheet-head { padding: 0 14px 8px; border-bottom: 1px solid var(--border); flex: none; }
.pm-sheet-head .pm-count { padding: 2px 2px 8px; }
.pm-sheet-head .pm-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pm-sheet-head .pm-filters > * { flex: none; }
.pm-sheet .pm-list { padding-top: 10px; }
.pm-t3 .pm-powered.float { bottom: auto; top: 64px; left: 12px; }

/* ---- template 4: explorer ---- */
.pm-t4 { display: block; }
.pm-t4 .pm-map { position: absolute; inset: 0; }
.pm-t4 .pm-float-top { max-width: 1000px; }
.pm-t4 .pm-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.pm-t4 .pm-filters > * { box-shadow: var(--shadow); flex: none; }
.pm-t4 .pm-filters select, .pm-t4 .pm-chip { border-color: transparent; }
.pm-carousel { position: absolute; z-index: 800; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.pm-carousel > .pm-ibtn { box-shadow: var(--shadow); border-color: transparent; border-radius: 50%; }
.pm-track { flex: 1; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px; scrollbar-width: none; }
.pm-track::-webkit-scrollbar { display: none; }
.pm-card.v-tile { flex: 0 0 290px; scroll-snap-align: start; box-shadow: var(--shadow); border-color: transparent; }
.pm-card.v-tile.on { border-color: var(--brand); }
.pm-track .pm-empty, .pm-track .pm-note { background: var(--surface); border-radius: var(--pm-r); box-shadow: var(--shadow); flex: 0 0 auto; margin: 0 auto; }
.pm-track .pm-more { flex: 0 0 180px; height: auto; box-shadow: var(--shadow); }
.pm-t4 .pm-powered.float { left: auto; right: 10px; bottom: 214px; }

/* ---- template 5: split view ---- */
.pm-t5 .pm-body { grid-template-columns: 320px 1fr; position: relative; }
.pm-t5.has-detail .pm-body { grid-template-columns: 320px 1fr 380px; }
.pm-t5 .pm-detail { position: relative; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); }
.pm-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.pm-card.v-slim { padding: calc(var(--pm-pad) - 2px); } .pm-card.v-slim .pm-actions { display: none; } .pm-card.v-slim.on .pm-actions { display: flex; }

/* ---- template 6: finder ---- */
.pm-t6 { overflow-y: auto; display: block; background: var(--surface); }
.pm-wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 24px; }
.pm-hero { text-align: center; padding: 18px 0 22px; }
.pm-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); background: var(--accent-50); padding: 4px 10px; border-radius: 99px; margin-bottom: 12px; }
.pm-hero h1 { font-size: 32px; letter-spacing: -.02em; line-height: 1.15; }
.pm-hero p { color: var(--text-2); margin: 8px auto 20px; max-width: 560px; font-size: 15px; }
.pm-hero .pm-search { max-width: 680px; margin: 0 auto; }
.pm-t6 .pm-wrap > .pm-filters { justify-content: center; padding: 6px 0 18px; border-bottom: 1px solid var(--border); }
.pm-rhead { display: flex; align-items: center; gap: 10px; padding: 16px 0 12px; }
.pm-rhead > div { flex: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pm-rhead .pm-rh-t { font-size: 18px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.pm-rhead .pm-rh-n { font-size: 13px; }
.pm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pm-grid.nolist { grid-template-columns: 1fr; } .pm-grid.nolist .pm-cards { display: none; }
.pm-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pm-gap); align-content: start; }
.pm-cards > .pm-empty, .pm-cards > .pm-note, .pm-cards > .pm-more { grid-column: 1 / -1; }
.pm-card.v-grid { padding: calc(var(--pm-pad) + 2px); }
.pm-card.v-grid .pm-actions { margin-top: auto; padding-top: 10px; }
.pm-card.v-grid .pm-actions .pm-btn:not(.primary) span { display: none; } .pm-card.v-grid .pm-actions .pm-btn:not(.primary) { width: 32px; padding: 0; }
.pm-mapcard { position: sticky; top: 16px; border: 1px solid var(--border); border-radius: var(--pm-r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.pm-mapcard .pm-map { height: min(620px, calc(100vh - 90px)); }
.pm-grid.nolist .pm-mapcard .pm-map { height: 560px; }
.pm-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 14px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--border); }
.pm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pm-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg-a { background: var(--mk); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--mk); }
.lg-s { background: #fff; border: 2.5px solid var(--sc, var(--soon)); }
.lg-y { background: #101828; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(16,24,40,.2); }
.pm-wrap > .pm-powered { display: flex; margin-top: 20px; }

/* ---- responsive widget ---- */
@media (max-width: 1100px) { .pm-t5.has-detail .pm-body { grid-template-columns: 300px 1fr; } .pm-t5 .pm-detail { position: absolute; z-index: 900; right: 0; top: 0; bottom: 0; width: min(380px, 100%); box-shadow: var(--shadow-lg); } }
@media (max-width: 980px) { .pm-cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pm-t1, .pm-t5 { overflow-y: auto; display: block; }
  .pm-bar { flex-wrap: wrap; gap: 10px; padding: 12px; } .pm-bar .pm-search { max-width: none; flex-basis: 100%; }
  .pm-bar2 { padding: 8px 12px; }
  .pm-bar2 .pm-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .pm-bar2 .pm-filters > * { flex: none; }
  .pm-body, .pm-t5 .pm-body, .pm-t5.has-detail .pm-body { display: flex; flex-direction: column; }
  .pm-body .pm-map { height: 300px; order: -1; flex: none; }
  .pm-side { border-right: 0; } .pm-list { overflow: visible; }
  .pm-t5 .pm-detail { position: fixed; inset: 0; width: auto; z-index: 1100; }
  .pm-t2 { overflow-y: auto; }
  .pm-t2 .pm-map { position: relative; inset: auto; height: 42vh; }
  .pm-panel { position: relative; top: auto; left: auto; bottom: auto; width: auto; border-radius: var(--pm-r-lg) var(--pm-r-lg) 0 0; margin-top: -18px; box-shadow: 0 -6px 24px rgba(16,24,40,.12); overflow: visible; }
  .pm-panel .pm-detail { overflow: visible; }
  .pm-float-top { right: 12px; }
  .pm-t3 .leaflet-top.leaflet-right, .pm-t4 .leaflet-top.leaflet-right { top: 110px; }
  .pm-carousel > .pm-ibtn { display: none; }
  .pm-card.v-tile { flex-basis: 82%; }
  .pm-wrap { padding: 18px 14px; } .pm-hero { padding: 8px 0 16px; } .pm-hero h1 { font-size: 24px; } .pm-hero p { font-size: 14px; }
  .pm-search.big { height: 52px; padding-left: 14px; } .pm-search.big .pm-geo span { display: none; } .pm-search.big .pm-geo { padding: 0; width: 42px; height: 42px; }
  .pm-t6 .pm-wrap > .pm-filters { justify-content: flex-start; }
  .pm-grid { grid-template-columns: 1fr; } .pm-mapcard { position: relative; top: 0; order: -1; } .pm-mapcard .pm-map { height: 300px; }
  .pm-form2 { grid-template-columns: 1fr; }
  .pm-t4 .pm-powered.float { bottom: 206px; }
}

/* ===================== APP PAGES (tokens only) ===================== */
/* ---------- maps list ---------- */
.mp-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mp-tools .input-icon { width: 260px; max-width: 100%; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.mp-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.mp-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.mp-prev { position: relative; display: block; height: 150px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mp-mini { width: 100%; height: 100%; display: block; }
.mp-mini .land { fill: var(--surface-3); }
.mp-mini .water { fill: color-mix(in srgb, var(--info) 14%, var(--surface-2)); }
.mp-mini .road { fill: none; stroke: var(--surface); stroke-width: 5; stroke-linecap: round; }
.mp-mini .road.thin { stroke-width: 2.5; }
.mp-mini circle { fill: var(--mc); stroke: var(--surface); stroke-width: 1.6; }
.mp-mini circle.soon { fill: var(--surface); stroke: var(--warn); stroke-width: 2; }
.mp-st { position: absolute; top: 10px; left: 10px; }
.mp-st .badge { box-shadow: var(--shadow-sm); }
.mp-st .badge:not(.ok) { background: var(--surface); }
.mp-theme { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; border-radius: 99px; padding: 3px 10px 3px 8px; box-shadow: var(--shadow-sm); }
.mp-theme .ico { width: 14px; height: 14px; color: var(--accent-text); }
.mp-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mp-body h3 { font-size: var(--fs-md); } .mp-body h3 a { color: var(--text); }
.mp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.mp-stats b { display: block; font-size: var(--fs-lg); letter-spacing: -.01em; } .mp-stats span { font-size: var(--fs-xs); color: var(--text-3); }
.mp-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.mp-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 300px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text); text-align: center; padding: 20px; }
.mp-new:hover { border-color: var(--accent); background: var(--accent-50); text-decoration: none; }
.mp-new .ico-wrap { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-50); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; }

/* ---------- map editor ---------- */
.me { display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); gap: 16px; align-items: start; }
.me-panel { display: flex; flex-direction: column; min-width: 0; }
.me-tabs.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; overflow: visible; }
.me-tabs.tabs button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; margin: 0; border-radius: var(--radius); font-size: var(--fs-sm); color: var(--text-2); }
.me-tabs.tabs button .ico { width: 16px; height: 16px; color: var(--text-3); }
.me-tabs.tabs button:hover { background: var(--surface-3); }
.me-tabs.tabs button.active { background: var(--accent-50); color: var(--accent-700); }
.me-tabs.tabs button.active .ico { color: var(--accent-text); }
[data-mode="dark"] .me-tabs.tabs button.active { color: var(--text); }
.me-tab { padding: 18px 20px 22px; min-height: 420px; }
/* fields scrolled into view (focus, keyboard, scrollIntoView) stop above the sticky save bar instead of under it */
html:has(.me-save) { scroll-padding-bottom: 88px; }
.me-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.me-save.is-dirty { background: var(--warn-bg); }
.me-state { font-size: var(--fs-sm); display: inline-flex; align-items: center; }
.me-state .ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--ok); }
.me-dirty { color: var(--warn); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.me-set { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.me-set:last-child { border-bottom: 0; }
.me-set > div:first-child { flex: 1; min-width: 0; } .me-set b { display: block; font-weight: 600; font-size: var(--fs); }
.me-set > div:first-child > span { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.me-set .badge { margin-left: 6px; vertical-align: 1px; }
.me-group + .me-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.me-group h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 8px; }
.me-token { display: flex; gap: 8px; } .me-token input { flex: 1; min-width: 0; }
.me-color { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-color input[type=text] { width: 100px; }
.me-sw { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; }
.me-sw .swatch { width: 24px; height: 24px; padding: 0; }
.me-opts { display: grid; gap: 8px; }
.me-opts.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 6px; }
.me-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: 500 var(--fs-sm)/1.3 var(--font); cursor: pointer; text-align: left; }
.me-opt:hover { background: var(--surface-2); }
.me-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); background: var(--accent-50); }
.me-opts.three .me-opt { flex-direction: column; gap: 8px; padding: 14px 8px; }
.me-opt.wide .ico { color: var(--accent-text); width: 20px; height: 20px; }
.me-opt.wide b { display: block; } .me-opt.wide span { font-size: var(--fs-xs); color: var(--text-3); font-weight: 400; }
.seg .me-opt { border: 0; background: none; box-shadow: none; padding: 6px 12px; border-radius: calc(var(--radius) - 3px); font-weight: 500; color: var(--text-2); }
.seg .me-opt.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mk-demo { display: block; }
.mk-demo.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.mk-demo.pin { width: 20px; height: 26px; } .mk-demo.pin path { fill: var(--accent); } .mk-demo.pin circle { fill: var(--surface); }
.mk-demo.logo { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.me-loc-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-loc-tools .input-icon { grid-column: 1 / -1; }
.me-loc-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; font-size: var(--fs-sm); color: var(--text-2); }
.me-locs { border: 1px solid var(--border); border-radius: var(--radius); max-height: 460px; overflow-y: auto; }
.me-loc { display: flex; align-items: center; gap: 10px; min-height: var(--ctrl-h); padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.me-loc:last-child { border-bottom: 0; }
.me-loc:hover { background: var(--surface-2); }
.me-loc input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.me-loc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-loc-t b { font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-loc.off b { color: var(--text-3); }
.mp-stb { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.mp-stb > i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex: none; }
.me-vals { display: flex; flex-direction: column; gap: 6px; padding: 0 0 12px; border-bottom: 1px solid var(--border); }
.me-vals > div { display: flex; flex-wrap: wrap; gap: 6px; }
.me-vals.off { opacity: .45; pointer-events: none; }
.me-chks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.me-chk { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface); font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.me-chk.on { border-color: var(--accent); background: var(--accent-50); }
.me-chk input { margin: 0; accent-color: var(--accent); }
.me-chk:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.me-chk .me-cdot { margin: 0; }
.me-opts.fonts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.me-opts.fonts .me-opt { flex-direction: column; gap: 6px; padding: 12px 4px; text-align: center; justify-content: center; }
.me-opts.fonts .me-opt b { font-size: var(--fs-xs); font-weight: 500; line-height: 1.2; }
.me-font-ag { font-size: 22px; line-height: 1; font-weight: 600; }
.me-tab .hint .ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.me-tab textarea.mono { font-size: 12.5px; }
.me-cdot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.me-startmap { height: 280px; }
.me-start-grid { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 10px; margin-top: 12px; }

/* template thumbnails (CSS wireframes) */
.me-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.me-thumb { position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; font: inherit; color: var(--text); padding: 8px; }
.me-thumb:disabled { opacity: .55; cursor: not-allowed; }
.me-thumb-t { display: flex; flex-direction: column; padding: 0 4px 4px; } .me-thumb-t b { font-size: var(--fs-sm); } .me-thumb-t span { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.35; }
.me-lock { position: absolute; top: 14px; right: 14px; }
.tw { position: relative; height: 104px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; padding: 5px; }
.tw i { display: block; height: 8px; border-radius: 3px; background: var(--border-strong); }
.tw .w-bar { height: 10px; background: var(--surface); border: 1px solid var(--border); }
.tw .w-row { flex: 1; display: flex; gap: 4px; min-height: 0; }
.tw .w-list { width: 38%; display: flex; flex-direction: column; gap: 4px; } .tw .w-list.n { width: 26%; }
.tw .w-list i, .tw .w-grid i, .tw .w-det i, .tw .w-panel i { height: auto; flex: 1; background: var(--surface); border: 1px solid var(--border); }
.tw .w-list i:first-child { border-color: var(--accent); }
.tw .w-map { position: relative; flex: 1; border-radius: 4px; background: repeating-linear-gradient(35deg, transparent 0 12px, color-mix(in srgb, var(--surface) 70%, transparent) 12px 14px), var(--accent-50); }
.tw .w-map.full { position: absolute; inset: 0; border-radius: 0; }
.tw .w-map b { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.tw .w-map b:nth-child(1) { left: 30%; top: 30%; } .tw .w-map b:nth-child(2) { left: 62%; top: 52%; } .tw .w-map b:nth-child(3) { left: 45%; top: 70%; }
.tw .w-panel { position: absolute; left: 6px; top: 6px; bottom: 6px; width: 40%; background: var(--surface); border-radius: 5px; padding: 4px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm); }
.tw .w-panel i.h, .tw .w-det i.h { flex: 0 0 18px; background: var(--accent); border: 0; }
.tw .w-pill { position: absolute; top: 6px; left: 8px; right: 30%; height: 10px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tw .w-pill.c { position: static; width: 60%; margin: 2px auto 0; border: 1px solid var(--border); }
.tw .w-sheet { position: absolute; left: 10%; right: 10%; bottom: 0; height: 44%; background: var(--surface); border-radius: 8px 8px 0 0; padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); }
.tw .w-sheet i { height: 7px; } .tw .w-sheet i.hd { width: 18px; height: 3px; margin: 0 auto; }
.tw .w-cards { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 30%; display: flex; gap: 4px; }
.tw .w-cards i { height: auto; flex: 1; background: var(--surface); box-shadow: var(--shadow-sm); }
.tw .w-det { width: 28%; display: flex; flex-direction: column; gap: 3px; }
.tw .w-chips { display: flex; justify-content: center; gap: 3px; } .tw .w-chips i { width: 16%; height: 6px; border-radius: 99px; }
.tw .w-grid { width: 50%; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }

/* live preview */
.me-prev { position: sticky; top: 76px; display: flex; flex-direction: column; height: calc(100vh - 100px); min-height: 520px; overflow: hidden; }
.me-prev-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.me-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ok); }
.me-live .dot { animation: me-blink 1.6s infinite; }
@keyframes me-blink { 50% { opacity: .3; } }
.me-stage { flex: 1; min-height: 0; background: var(--surface-3); display: flex; justify-content: center; padding: 14px; overflow: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.me-device { width: 100%; height: 100%; transition: width .25s; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.me-device[data-device="tablet"] { width: 768px; max-width: 100%; }
.me-device[data-device="phone"] { width: 390px; max-width: 100%; border-radius: 26px; border: 8px solid var(--text); }
.me-device iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 1100px) { .me { grid-template-columns: minmax(0, 1fr); } .me-prev { position: relative; top: 0; height: 640px; } }
@media (max-width: 700px) {
  .me-tab { padding: 16px; min-height: 0; }
  .me-thumbs { grid-template-columns: 1fr 1fr; gap: 8px; }
  .me-loc { flex-wrap: wrap; row-gap: 4px; } .me-loc-t { flex-basis: calc(100% - 28px); } .me-loc .mp-stb { margin-left: 28px; }
  .me-set { flex-wrap: wrap; } .me-opts.fonts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .me-tabs.tabs button { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: var(--fs-xs); text-align: center; }
  .me-save { flex-wrap: wrap; }
  .me-opts.three .me-opt { padding: 10px 4px; }
  .me-prev { height: 560px; } .me-stage { padding: 8px; }
  .me-start-grid { grid-template-columns: 1fr 1fr; }
  .mp-grid { grid-template-columns: 1fr; }
}

/* ---------- embed studio ---------- */
.em-pick { display: flex; align-items: flex-end; gap: 16px; padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.em-pick-sel { width: 320px; max-width: 100%; }
.em-pick-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; }
.em-state { margin-left: auto; padding-bottom: 8px; display: inline-flex; align-items: center; }
.em-state .ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--ok); }
.em { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.em-right { gap: 16px; min-width: 0; }
.em-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.em-presets { display: flex; gap: 6px; margin-top: -8px; }
.em-domains { display: flex; flex-wrap: wrap; gap: 6px; }
.em-domains .alert { width: 100%; }
.em-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); font-weight: 500; }
.em-chip .ico { width: 14px; height: 14px; color: var(--text-3); }
.em-chip button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; padding: 0; }
.em-chip button:hover { background: var(--err-bg); color: var(--err); }
.em-add { display: flex; gap: 8px; margin-top: 4px; } .em-add input { flex: 1; min-width: 0; }
.em-tabs { padding: 0 10px; }
.em-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.em-tabs button .ico { width: 15px; height: 15px; }
.em-lead { margin: 0 0 12px; }
.em-right .codebox { min-height: 64px; padding-right: 110px; max-height: 320px; overflow-y: auto; }
.em-steps { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); }
.em-steps b { color: var(--text); }
.em-link { display: flex; gap: 8px; } .em-link input { flex: 1; min-width: 0; }
.em-qrwrap { display: flex; gap: 20px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.em-qrbox { width: 168px; height: 168px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); flex: none; }
.em-qr { width: 100%; height: 100%; display: block; }
.em-stage { background: var(--surface-3); padding: 16px; overflow: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.em-frame { max-width: 100%; margin: 0 auto; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.em-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.em-consent { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: var(--text-2); }
.em-consent p { max-width: 420px; margin: 0; }
.em-consent-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-50); color: var(--accent-text); display: grid; place-items: center; }
@media (max-width: 1100px) { .em { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .em-state { margin-left: 0; } .em-link { flex-wrap: wrap; } .em-link input { flex-basis: 100%; } .em-right .codebox { padding-right: 14px; padding-top: 46px; } }

/* ---------- SEO pages ---------- */
.seo-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: 28px; overflow: hidden;
  background: radial-gradient(600px 280px at 100% 0%, var(--accent-50), transparent 70%), var(--surface); }
.seo-hero h2 { font-size: 24px; line-height: 1.2; margin: 10px 0 8px; max-width: 520px; }
.seo-hero p { color: var(--text-2); max-width: 540px; }
.seo-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; background: var(--accent-50); color: var(--accent-700); border-radius: 99px; padding: 4px 10px; }
[data-mode="dark"] .seo-eyebrow { color: var(--text); }
.seo-eyebrow .ico { width: 14px; height: 14px; }
.seo-steps { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.seo-steps div { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.seo-steps { color: var(--text-2); }
.seo-steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; font-size: 12px; flex: none; }
.seo-serp { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.seo-serp-q { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 99px; padding: 8px 14px; font-size: var(--fs-sm); color: var(--text-2); }
.seo-serp-q .ico { width: 15px; height: 15px; }
.seo-serp-r { display: flex; flex-direction: column; gap: 3px; } .seo-serp-r > .xs { color: var(--text-3); }
.seo-serp-r b { color: var(--info); font-size: 15px; font-weight: 600; } .seo-serp-r .small { color: var(--text-2); }
.seo-stars { color: var(--warn); font-size: var(--fs-sm); } .seo-stars .xs { color: var(--text-3); }
.seo-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.seo-url { color: var(--text-2); }
.seo-browser { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seo-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.seo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.seo-bar span { margin-left: 10px; flex: 1; min-width: 0; background: var(--surface); border-radius: 99px; padding: 4px 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.seo-bar .ico { width: 13px; height: 13px; color: var(--ok); flex: none; }
.seo-page { background: var(--surface); }
.seo-ph { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; padding: 22px; color: #fff; background: var(--seo-c, var(--brand-primary)); }
.seo-ph h2 { color: #fff; margin: 4px 0 2px; } .seo-ph p { opacity: .9; margin: 0 0 8px; } .seo-ph .xs { opacity: .8; }
.seo-ph-btns { display: flex; gap: 6px; flex-wrap: wrap; } .seo-ph-btns .btn { pointer-events: none; }
.seo-pbody { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; }
.seo-pbody h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 6px; }
.seo-hours td { height: 30px; padding: 0 4px; font-size: var(--fs-sm); } .seo-hours td:last-child { text-align: right; }
.seo-hours tr.today td { font-weight: 700; }
.seo-pbody .small .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent-text); }
.seo-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.seo-map { height: 230px; }
.seo-ld { max-height: 260px; overflow-y: auto; padding-right: 110px; }
@media (max-width: 1100px) { .seo-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) { .seo-hero { grid-template-columns: 1fr; padding: 20px; } .seo-pbody { grid-template-columns: 1fr; } }
.pm-t5 .pm-detail .pm-detail-hero { padding-right: 60px; }
.seo-noidx { display: flex; flex-direction: column; gap: 2px; }
.seo-noidx .me-set { padding: 8px 0; }
.seo-noidx .me-set > div:first-child > .mp-stb { display: inline-flex; margin: 0; font-size: var(--fs); color: var(--text); }
.seo-grid [data-example] { word-break: break-all; }
.em-look { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .em-look { grid-template-columns: 1fr; } }
.pm-detail-in > .pm-stag, .pm-detail-in > .pm-status { align-self: flex-start; }
@media (max-width: 1199px) { .pm-cards { grid-template-columns: minmax(0, 1fr); } }

