/* Links - App-Oberflaeche (Startseite, Anmeldung, Editor, Admin).
 * Logische Eigenschaften (margin-inline, inset-inline) statt left/right,
 * damit dieselbe Datei fuer fa/ar (dir=rtl) funktioniert. */
/* Vazirmatn (OFL, fonts/OFL.txt) - lokal statt Google Fonts, das im Iran oft langsam oder gesperrt ist.
   Variable Schrift: eine Datei fuer alle Staerken 100-900. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --line: #e2e0da;
  --ink: #1d1d1b;
  --ink-2: #55534e;
  --muted: #86847d;
  --primary: #5b3df5;
  --primary-ink: #ffffff;
  --primary-soft: #ece8ff;
  --ok: #138a4b;
  --bad: #c62828;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --series-1: #2a78d6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --surface: #1d1d1c; --surface-2: #262624; --line: #34332f;
    --ink: #f3f2ee; --ink-2: #c3c2b7; --muted: #8f8d85;
    --primary: #8f7bff; --primary-soft: #2b2547; --series-1: #3987e5;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --surface: #1d1d1c; --surface-2: #262624; --line: #34332f;
  --ink: #f3f2ee; --ink-2: #c3c2b7; --muted: #8f8d85;
  --primary: #8f7bff; --primary-soft: #2b2547; --series-1: #3987e5;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
[dir="rtl"] body { font-family: "Vazirmatn", system-ui, sans-serif; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.05rem; margin: 1.6em 0 .7em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }
.hp { position: absolute; inset-inline-start: -9999px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.logo { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar-right > a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.topbar-right > a:not(.btn):hover { color: var(--ink); }
.lang-switch select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; font: inherit; }
.sitefoot { margin-top: auto; padding: 20px; text-align: center; color: var(--muted); font-size: .85rem; }
.dash-body .sitefoot { display: none; }

/* ---------- Knoepfe & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 140px; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; direction: ltr; }
.input-prefix span { padding: 10px 0 10px 12px; color: var(--muted); white-space: nowrap; }
.input-prefix input { border: 0; padding-inline-start: 2px; border-radius: 0; min-width: 0; }
.input-prefix input:focus { outline: none; }
.input-prefix:focus-within { outline: 2px solid var(--primary); }
.input-prefix.big { font-size: 1.1rem; border-radius: 999px; }
.input-prefix.big span { padding: 14px 0 14px 20px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input { max-width: 140px; }
.captcha-row img { border-radius: 6px; }
#username-status.ok, .form-msg.ok { color: var(--ok); }
#username-status.bad, .form-msg.bad { color: var(--bad); }
.form-msg { margin-top: 8px; font-size: .9rem; }

.alert { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-size: .92rem; }
.alert-error { background: #fdecea; color: #8a1c1c; }
.alert-success { background: #e7f6ec; color: #135c33; }

/* ---------- Anmeldung ---------- */
.auth-card { width: min(440px, calc(100% - 32px)); margin: 40px auto; background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: 0; font-size: 1.6rem; }
.auth-card.center { text-align: center; }
.auth-alt { text-align: center; margin: 14px 0 0; font-size: .92rem; }

/* ---------- Startseite ---------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; padding: 60px 20px 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 0 0 16px; letter-spacing: -.02em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.claim { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.claim .input-prefix { flex: 1 1 280px; }
.hero-phone { display: flex; justify-content: center; }
.phone { width: 260px; height: 520px; border-radius: 40px; border: 10px solid #1d1d1b; padding: 40px 20px; background: linear-gradient(160deg, #ff7e5f, #feb47b); color: #fff; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.18); transform: rotate(3deg); }
.mock-avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.3); margin: 0 auto 10px; display: grid; place-items: center; font-size: 36px; }
.mock-name { font-weight: 700; margin-bottom: 10px; }
.mock-social { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.mock-social svg { width: 18px; height: 18px; }
.mock-btn { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 12px; margin: 10px 0; font-weight: 600; font-size: .9rem; }
.features { max-width: 1100px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.feature-icon { font-size: 28px; }
.feature h3 { margin: 10px 0 6px; }
.feature p { margin: 0; color: var(--ink-2); }
.cta { text-align: center; padding: 50px 20px 70px; }
.cta h2 { font-size: 1.8rem; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 190px minmax(0, 1fr) 400px; height: calc(100vh - 53px); }
.dash-tabs { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.dash-tabs button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: start; }
.dash-tabs button:hover { background: var(--surface-2); }
.dash-tabs button.active { background: var(--primary-soft); color: var(--primary); }
.dash-main { overflow-y: auto; padding: 18px 26px 80px; }
.tab-pane { display: none; max-width: 680px; margin: 0 auto; }
.tab-pane.active { display: block; }

.share-bar { max-width: 680px; margin: 0 auto 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); padding: 10px 12px; border-radius: 14px; box-shadow: var(--shadow); }
.share-url { min-width: 0; font-weight: 600; direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 160px; }
.save-state { font-size: .85rem; min-width: 80px; text-align: end; }
.save-state.ok { color: var(--ok); }
.save-state.err { color: var(--bad); }
.save-state.busy { color: var(--muted); }

.palette-wrap { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.palette-title { font-weight: 700; margin-bottom: 10px; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.pal-item { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); cursor: grab; user-select: none; font-weight: 600; font-size: .9rem; }
.pal-item:hover, .pal-item:focus { border-color: var(--primary); outline: none; }
.pal-item.ui-draggable-dragging { box-shadow: 0 10px 24px rgba(0,0,0,.18); cursor: grabbing; width: 160px; background: var(--surface); }
.pal-icon { font-size: 1.1rem; }
.palette-wrap .small { margin: 10px 0 0; }

.block-list { list-style: none; margin: 0; padding: 0; min-height: 60px; border-radius: 14px; transition: background .15s; }
.block-list.drop-target { background: var(--primary-soft); outline: 2px dashed var(--primary); outline-offset: 4px; }
.block-list > .pal-item { margin-bottom: 10px; }
.empty-list { text-align: center; color: var(--muted); padding: 30px; border: 2px dashed var(--line); border-radius: 14px; }
.blk { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; border: 1px solid transparent; }
.blk.open { border-color: var(--primary); }
.blk.is-off { opacity: .6; }
.blk.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--primary); } 100% { box-shadow: var(--shadow); } }
.blk.ui-sortable-helper { box-shadow: 0 14px 30px rgba(0,0,0,.2); }
.blk-placeholder { height: 58px; border: 2px dashed var(--primary); border-radius: 14px; margin-bottom: 10px; background: var(--primary-soft); visibility: visible !important; }
.blk-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.blk-handle, .soc-handle { cursor: grab; color: var(--muted); font-weight: 900; letter-spacing: -2px; padding: 6px 4px; user-select: none; touch-action: none; }
.blk-handle:active { cursor: grabbing; }
.blk-icon { font-size: 1.1rem; }
.blk-summary { flex: 1; min-width: 0; border: 0; background: none; text-align: start; cursor: pointer; padding: 2px 0; font: inherit; color: var(--ink); display: flex; flex-direction: column; }
.blk-main { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk-sub { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: start; }
.blk-clicks { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.blk-badge { font-size: .9rem; }
.blk-body { padding: 4px 16px 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.blk-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.blk-schedule summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); margin: 4px 0 10px; }
.emoji-input { max-width: 90px; text-align: center; font-size: 1.1rem; }
.img-edit { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.img-edit img { width: 90px; height: 64px; object-fit: cover; border-radius: 8px; }
.soc-list { margin-bottom: 8px; }
.soc-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; background: var(--surface); }
.soc-row select { flex: 0 0 140px; }
.soc-row .soc-u { flex: 1; direction: ltr; }
.soc-add { margin-bottom: 14px; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9c7c0; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
[dir="rtl"] .switch input:checked + span::before { transform: translateX(-18px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Design */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.preset { border: 2px solid transparent; border-radius: 14px; height: 150px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; box-shadow: var(--shadow); font: inherit; }
.preset.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.preset-name { font-weight: 700; font-size: .85rem; margin-top: 6px; }
.preset-btn { display: block; width: 80%; height: 18px; }
.preset-btn.r-square { border-radius: 3px; } .preset-btn.r-round { border-radius: 7px; } .preset-btn.r-pill { border-radius: 99px; }
.preset-btn.btn-fill { background: var(--btn); }
.preset-btn.btn-outline { border: 2px solid var(--btn); }
.preset-btn.btn-soft { background: color-mix(in srgb, var(--btn) 25%, transparent); }
.preset-btn.btn-shadow { background: var(--btn); box-shadow: 0 3px 6px rgba(0,0,0,.18); }
.preset-btn.btn-hard { background: var(--btn); border: 2px solid var(--btn-fg); box-shadow: 3px 3px 0 var(--btn-fg); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }
.field.color { flex: 0 0 auto; }
.field.color input { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.bg-image { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bg-image img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.btn-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.btn-style-opt input { position: absolute; opacity: 0; }
.btn-style-opt .sample { display: block; text-align: center; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .85rem; border: 2px solid transparent; }
.btn-style-opt .sample.btn-fill { background: var(--ink); color: var(--surface); }
.btn-style-opt .sample.btn-outline { border-color: var(--ink); }
.btn-style-opt .sample.btn-soft { background: var(--surface-2); }
.btn-style-opt .sample.btn-shadow { background: var(--surface); box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.btn-style-opt .sample.btn-hard { background: var(--surface); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-style-opt input:checked + .sample { outline: 3px solid var(--primary); outline-offset: 2px; }
.font-serif { font-family: Georgia, "Vazirmatn", serif; } .font-mono { font-family: ui-monospace, Consolas, "Vazirmatn", monospace; } .font-rounded { font-family: "Nunito", "Vazirmatn", ui-rounded, sans-serif; }

/* Profil */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-edit img, .avatar-empty { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.avatar-empty { background: var(--surface-2); display: grid; place-items: center; font-size: 36px; }
.seo summary { cursor: pointer; font-weight: 600; margin: 10px 0; }
.card-form { background: var(--surface); padding: 18px; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-form h2 { margin-top: 0; }
.card-form .input-prefix { margin-bottom: 6px; }
.card-form .btn { margin-top: 10px; }
.card-form.danger h2 { color: var(--bad); }

/* Statistik */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile span { display: block; font-size: .82rem; color: var(--ink-2); }
.tile strong { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.chart { background: var(--surface); border-radius: 14px; padding: 14px 16px 8px; box-shadow: var(--shadow); margin: 0 0 12px; }
.chart figcaption { display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; }
.chart figcaption strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; direction: ltr; }
.chart svg { width: 100%; height: 180px; display: block; overflow: visible; }
.chart .bar { fill: var(--series-1); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit.on { fill: rgba(127,127,127,.12); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 5px 9px; font-size: .8rem; white-space: nowrap; display: flex; gap: 8px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.table th { font-size: .82rem; color: var(--ink-2); background: var(--surface-2); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-title { display: block; font-weight: 600; }
.t-url { display: block; font-size: .8rem; color: var(--muted); direction: ltr; text-align: start; word-break: break-all; }

/* Vorschau */
.dash-preview { background: var(--surface-2); border-inline-start: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 20px; }
.phone-frame { width: 340px; height: min(700px, calc(100vh - 100px)); border: 10px solid #1d1d1b; border-radius: 44px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.phone-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-toggle { display: none; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 18px; padding: 24px; text-align: center; position: relative; max-width: 340px; width: 100%; }
.modal-box h2 { margin-top: 0; }
.modal-close { position: absolute; top: 8px; inset-inline-end: 12px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
#qr-code { display: flex; justify-content: center; background: #fff; padding: 12px; border-radius: 12px; }
#qr-url { word-break: break-all; direction: ltr; }

/* ---------- schmale Bildschirme ---------- */
@media (max-width: 1100px) {
  .dash { grid-template-columns: 70px minmax(0, 1fr); }
  .dash-tabs button { flex-direction: column; font-size: .7rem; gap: 2px; padding: 8px 4px; text-align: center; }
  .dash-tabs button span { font-size: 1.2rem; }
  .dash-preview { display: none; position: fixed; inset: 53px 0 0 0; z-index: 60; }
  .show-preview .dash-preview { display: flex; }
  .preview-toggle { display: block; position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 70; border: 0; background: var(--ink); color: var(--surface); border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
}
@media (max-width: 760px) {
  .topbar { padding: 8px 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-phone { display: none; }
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: auto; min-height: calc(100vh - 53px); }
  .dash > * { min-width: 0; }
  .topbar-right { gap: 10px; }
  .topbar .logo { font-size: 1rem; }
  .dash-tabs { flex-direction: row; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); padding: 6px; position: sticky; top: 49px; z-index: 40; }
  .dash-tabs button { flex: 1 0 auto; }
  .dash-main { padding: 14px 16px 90px; overflow: visible; }
  .tiles { grid-template-columns: 1fr 1fr 1fr; }
  .tile strong { font-size: 1.3rem; }
  .soc-row select { flex-basis: 110px; }
  .phone-frame { width: 100%; max-width: 360px; height: calc(100vh - 110px); }
}

/* ---------- Admin ---------- */
.admin { max-width: 1100px; width: 100%; margin: 0 auto; padding: 20px 16px 40px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-nav a { padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; background: var(--surface); }
.admin-nav a.active { background: var(--primary-soft); color: var(--primary); }
.admin-nav a:last-child { margin-inline-start: auto; }
.admin-search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 420px; }
.admin-tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.admin .table { margin-bottom: 14px; }
.admin .table tr.muted td { opacity: .55; }
.admin .card-form > input[type=text] { max-width: 420px; }
.pager { display: flex; gap: 8px; flex-wrap: wrap; }
.pager a, .pager strong { padding: 4px 10px; border-radius: 8px; background: var(--surface); }
@media (max-width: 760px) { .admin .table { display: block; overflow-x: auto; } }

/* ---------- snapbio: Pro, Tarife, Geld verdienen ---------- */
.pro-badge { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; vertical-align: middle; direction: ltr; }
.seg input:disabled + span, .check input:disabled { opacity: .55; cursor: not-allowed; }
.pricing-wrap { max-width: 1000px; width: 100%; margin: 0 auto; padding: 30px 16px 60px; }
.pricing-head { text-align: center; margin-bottom: 26px; }
.pricing-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 8px; }
.pricing-head .lead { margin: 0 auto 16px; }
.pro-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 30px; }
.pro-features h3 { margin-top: 0; font-size: 1rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; background: var(--surface); border-radius: 18px; padding: 26px 22px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; }
.plan h2 { margin: 0; }
.plan .btn { margin-top: auto; }
.plan-best { border-color: var(--primary); }
.plan-tag { position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
[dir="rtl"] .plan-tag { transform: translateX(50%); }
.plan-price { font-size: 1.7rem; font-weight: 800; margin: 6px 0; }
.center { text-align: center; }
.receipt th { width: 45%; }
.ltr { direction: ltr; unicode-bidi: embed; }
.pro-list { list-style: none; padding: 0; margin: 0 0 16px; line-height: 2; }
.earn-steps ol { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; margin: 0 0 24px; }
.earn-steps li { counter-increment: s; position: relative; background: var(--surface); border-radius: 16px; padding: 18px 20px; padding-inline-start: 70px; box-shadow: var(--shadow); }
.earn-steps li::before { content: counter(s); position: absolute; inset-inline-start: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.earn-steps h3 { margin: 0 0 6px; }
.earn-steps p { margin: 0 0 8px; color: var(--ink-2); }
.earn-url { display: inline-block; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; }
.earn-steps > .btn { display: flex; width: max-content; margin: 0 auto; }
.earn-rules { margin-top: 24px; }
.earn-rules ul { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
.home-earn { max-width: 1100px; margin: 20px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.home-earn-box { background: var(--surface); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.home-earn-box:first-child { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.home-earn-box h2 { margin: 10px 0 8px; font-size: 1.3rem; }
.home-earn-box p { color: var(--ink-2); margin: 0 0 16px; }
@media (max-width: 760px) { .topbar-right { gap: 8px; font-size: .9rem; } }
.inline-form { display: flex; gap: 4px; margin-top: 4px; }
.inline-form select { padding: 4px; width: auto; }
