:root,
[data-theme="night"] {
  color-scheme: dark;
  --bg: #0b1424;
  --card: #132033;
  --line: #2a4363;
  --text: #e7f1fb;
  --muted: #9bb4ce;
  --link: #7eb6ff;
  --button: #2f7fe8;
  --ok: #8fd0a4;
  --wait: #8eb7ef;
  --bad: #f0a394;
  --ink: #f5f9ff;
  --field: #0c1828;
  --glow: #1a3f72;
  --avatar: #1b314c;
  --badge-ok-bg: #163528;
  --badge-wait-bg: #16304e;
  --badge-bad-bg: #3a2428;
  --mine: #1a3d68;
  --theirs: #17283d;
  --flash: #152a44;
}

[data-theme="day"] {
  color-scheme: light;
  --bg: #eef5fc;
  --card: #ffffff;
  --line: #c5daf0;
  --text: #10233b;
  --muted: #4d6784;
  --link: #0d5fbf;
  --button: #1570d6;
  --ok: #1f7a45;
  --wait: #1d5fa8;
  --bad: #b42318;
  --ink: #ffffff;
  --field: #f7fbff;
  --glow: #d4e8fb;
  --avatar: #d7e7f7;
  --badge-ok-bg: #e5f6ec;
  --badge-wait-bg: #e3f0fc;
  --badge-bad-bg: #fdeceb;
  --mine: #d7e9fb;
  --theirs: #ffffff;
  --flash: #e7f2fc;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, var(--glow) 0, transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Tahoma, "Segoe UI", sans-serif;
  line-height: 1.75;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.35; font-weight: 700; }
main { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 3rem; }
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top, footer {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}
.top {
  display: flex;
  gap: 0.8rem 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.7rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.logo {
  height: 52px;
  width: auto;
  max-width: min(280px, 62vw);
  display: block;
  border-radius: 0;
  object-fit: contain;
}
.mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--button);
  color: var(--ink);
  border-radius: 10px;
  font-size: 1rem;
}
.menu, .account { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.menu { flex: 1; }
.account { margin-inline-start: auto; }
.menu a, .account > a:not(.button) {
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.menu a:hover, .menu a[aria-current="page"], .account > a:not(.button):hover {
  background: var(--field);
  color: var(--text);
  text-decoration: none;
}
.account .button { color: var(--ink); }
a.me { display: grid; padding: 0; text-decoration: none; }
.mini {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--avatar);
  color: var(--text);
  font-size: 0.85rem;
}
.notice-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, #020814 62%, transparent);
}
.notice {
  width: min(36rem, 100%);
  max-height: min(82vh, 42rem);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem 1.2rem 1.1rem;
}
.notice h2 { margin: 0 0 0.7rem; }
.notice .pre { margin-top: 0; }
.notice audio, .notice video {
  width: 100%;
  margin: 0.4rem 0 0.8rem;
  border-radius: 12px;
  background: #000;
}
.notice video { max-height: 280px; }
.notice button { width: 100%; min-height: 2.9rem; }
.welcome audio, .welcome video {
  width: 100%;
  margin: 0.4rem 0 0.8rem;
  border-radius: 12px;
  background: #000;
}
.welcome video { max-height: 360px; }
.face, .me-head { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 0.8rem; }
.me-head .avatar { width: 96px; height: 96px; aspect-ratio: auto; flex: none; }
.me-head p { margin: 0; flex: 1; }
.locked-phone { margin: 0.2rem 0 0.8rem; }
.fold summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.15rem 0;
}
.day-work {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.2rem 0.85rem 0.55rem;
  margin: 0.45rem 0;
  background: var(--card);
}
.day-work > summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-weight: 700;
}
.day-list { display: grid; gap: 0.15rem; }
.day-person {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.6rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.day-person p { margin: 0; }
.day-person form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.day-person input[type="file"] { max-width: 100%; }
.review-details { margin-top: 0.55rem; }
.review-details > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.25rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}
.review-line {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.review-line p { margin: 0; }
.review-line form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.review-line textarea { width: 100%; }
details.panel.fold > summary { font-size: 1.15rem; }
.fold .fields { margin-top: 0.7rem; }
.fields { display: grid; gap: 0.75rem; }
.fields p { margin: 0; }
.phone-edit { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin: 0.5rem 0; }
.phone-edit input { width: 11rem; }
.face .avatar { width: 96px; height: 96px; aspect-ratio: auto; flex: none; }
.button, button {
  background: var(--button);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  cursor: pointer;
}
.button:hover, button:hover { filter: brightness(1.06); }
.button.small { padding: 0.35rem 0.85rem; }
button.quiet, button.linkish {
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  filter: none;
}
button.quiet:hover, button.linkish:hover { color: var(--text); filter: none; }
button.linkish { padding: 0.28rem 0.55rem; }
.hero { padding: 0.4rem 0 0.2rem; }
.eyebrow { color: var(--link); margin: 0 0 0.2rem; font-size: 0.92rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); max-width: 14ch; margin: 0.15rem 0 0.4rem; }
.hero p:last-child { max-width: 40rem; color: var(--muted); margin-top: 0; }
.search, .stack, .panel, .sheet, .narrow {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.search {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  margin: 1rem 0;
  align-items: end;
}
label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.92rem; }
input, textarea, select {
  width: 100%;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--link); outline: none; }
.otp { display: flex; justify-content: center; gap: 0.65rem; direction: ltr; margin: 0.4rem 0 0.2rem; }
.otp-box {
  width: 3.5rem;
  height: 3.7rem;
  padding: 0;
  text-align: center;
  font-size: 1.6rem;
  border-radius: 14px;
}
.helptext { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.loc { display: grid; gap: 0.55rem; margin: 0.2rem 0 0.6rem; }
.loc[hidden] { display: none; }
.search .loc { grid-column: 1 / -1; }
.loc-title { margin: 0; font-weight: 700; color: var(--text); }
.loc-status { margin: 0; min-height: 1.4em; font-weight: 700; }
.saved-note {
  position: fixed;
  z-index: 80;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(16rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.85rem 1rem;
  text-align: center;
  font-weight: 800;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--ok);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(8, 16, 32, 0.28);
}
.saved-note[hidden] { display: none; }
@media (max-width: 700px) {
  .saved-note { top: 10.5rem; }
}
.loc-map {
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  direction: ltr;
  background: var(--field);
  border: 1px solid var(--line);
}
.loc-map .leaflet-top,
.loc-map .leaflet-bottom { z-index: 2; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.loc-actions button { width: auto; min-height: 2.75rem; }
.search-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.search button { width: auto; min-height: 2.75rem; padding-inline: 1.5rem; }
.result-count { color: var(--muted); margin: 0.2rem 0 0.7rem; }
.check { display: flex; align-items: center; gap: 0.4rem; }
.check input { width: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.8rem; }
.job-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.2rem;
  align-items: start;
}
.job-alarm {
  border: 2px solid #e10600;
  border-radius: 16px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 0.9rem;
  background: color-mix(in srgb, #e10600 8%, var(--card));
}
.job-alarm strong { color: #e10600; display: block; margin-bottom: 0.35rem; }
.job-alarm p { margin: 0; }
.job-views { font-weight: 800; margin: 0.2rem 0 0.6rem; }
.job-main h1 { margin: 0.35rem 0; }
.job-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.8rem 0 1rem; }
.job-actions .button,
.job-side a.button { width: auto; color: var(--ink); text-decoration: none; }
.job-facts { width: 100%; border-collapse: collapse; margin: 0.4rem 0 1rem; }
.job-facts th, .job-facts td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.2rem;
  text-align: right;
  vertical-align: top;
}
.job-facts th { width: 9rem; color: var(--muted); font-weight: 600; }
.job-side {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 0.9rem;
}
.job-side .eyebrow { margin: 0; }
.job-person {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  color: inherit;
  text-decoration: none;
}
.job-person:hover { text-decoration: none; }
.job-side .avatar { width: 112px; height: 112px; border-radius: 50%; }
.job-side .button { width: 100%; }
.card, .row, .block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
}
a.card { text-decoration: none; color: inherit; transition: transform 0.15s ease, border-color 0.15s ease; }
a.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--link); }
.card { display: grid; gap: 0.2rem; padding: 0.85rem; }
.card strong { font-size: 1.05rem; }
.score { color: var(--wait); font-size: 0.88rem; }
.star-row { display: inline-flex; align-items: center; gap: 0.4rem; }
.star-icons { display: inline-flex; gap: 0.04rem; color: #6a5b32; letter-spacing: 0; }
.star-icons .on { color: #f5c518; }
.star-num { font-weight: 800; }
.id-ok {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #e7f6ea;
  color: #146c2e;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}
.card img, .fallback, .avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--avatar);
}
.fallback, .avatar.fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.person { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; align-items: center; }
.person .avatar { width: 140px; height: 140px; }
.sheet, .panel, .narrow { padding: 1.1rem 1.15rem; margin: 1rem 0; }
.sheet section + section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.narrow { max-width: 460px; margin-inline: auto; }
main:has(.auth) {
  display: flex;
  align-items: center;
  min-height: calc(100dvh - 12rem);
}
.auth {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 2rem 3rem;
  align-items: center;
}
.auth-lead h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  max-width: 12ch;
}
.auth-lead p { margin: 0; color: var(--muted); max-width: 34rem; }
.auth-form {
  display: grid;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem 1.35rem 1.15rem;
}
.auth-form p { margin: 0; }
.auth-form .errorlist { margin: 0; padding-inline-start: 1.1rem; color: var(--bad); }
.auth-form button[type="submit"] { width: 100%; min-height: 2.9rem; }
.auth-form .check { align-items: flex-start; line-height: 1.6; }
.auth-note { text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; }
.gallery figure { margin: 0; }
.chips, .choices { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips { align-items: center; }
.chip-lead { font-weight: 800; }
.report-box {
  margin: 0.85rem 0 0;
}
.report-link {
  display: inline-flex;
  align-items: center;
  color: #e10600;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid #e10600;
  border-radius: 12px;
  padding: 0.45rem 0.9rem;
  background: color-mix(in srgb, #e10600 8%, transparent);
}
.report-link:hover { text-decoration: none; }
.choices label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--text);
}
.choices input { width: auto; }
.combo { position: relative; }
.combo.open { z-index: 30; }
.search .combo-face,
.stack .combo-face,
.panel .combo-face,
.combo-face {
  width: 100%;
  text-align: start;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
}
.combo-panel {
  position: absolute;
  z-index: 25;
  inset-inline: 0;
  top: calc(100% + 0.35rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}
.combo-list,
.combo-panel .role-picks,
.combo-panel [data-role-groups] {
  max-height: 16rem;
  overflow: auto;
  margin-top: 0.45rem;
}
.combo-item {
  display: block;
  width: 100%;
  text-align: start;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}
.combo-item.active,
.combo-item:hover { background: var(--flash); }
.combo-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.role-picks { display: grid; gap: 0.35rem; max-height: 16rem; overflow: auto; padding: 0.6rem 0.75rem; margin: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.perm-picks { display: grid; gap: 0.35rem; padding: 0.6rem 0.75rem; margin: 0 0 0.75rem; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.perm-picks label { display: flex; align-items: center; gap: 0.45rem; color: var(--text); }
.perm-picks input { width: auto; }
.role-picks label { display: flex; align-items: center; gap: 0.45rem; color: var(--text); }
.role-picks input { width: auto; }
.choices label[hidden],
[data-role-group][hidden] { display: none !important; }
.role-board { display: grid; gap: 0.85rem; }
.role-kids { display: grid; gap: 0.35rem; margin-inline-start: 0.9rem; margin-top: 0.35rem; }
.role-cat h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.role-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  margin: 0.35rem 0;
  padding: 0.4rem 0.7rem;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.role-line input { width: 1.25rem; height: 1.25rem; flex: none; }
.role-line > span:first-of-type { flex: 1; }
.role-cat[hidden],
.role-line[hidden] { display: none !important; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.82rem;
}
.badge.ok { background: var(--badge-ok-bg); color: var(--ok); }
.badge.wait { background: var(--badge-wait-bg); color: var(--wait); }
.badge.bad { background: var(--badge-bad-bg); color: var(--bad); }
.count {
  background: var(--button);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: 0.8rem;
}
.count[hidden] { display: none; }
.msg-note {
  position: fixed;
  z-index: 70;
  inset-inline-end: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: min(22rem, calc(100vw - 2rem));
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 16px 40px rgba(8, 16, 32, 0.28);
}
.msg-note[hidden] { display: none; }
.msg-note p { margin: 0 0 0.45rem; }
.msg-note [data-msg-title] { font-weight: 700; }
.msg-note [data-msg-body] { color: var(--muted); }
.msg-note-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.reject-note {
  background: var(--badge-bad-bg);
  color: var(--bad);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}
.seo-box { margin: 0.45rem 0 0.7rem; }
.seo-box summary { cursor: pointer; font-weight: 700; }
.seo-list { margin: 0.25rem 0 0.7rem; padding-inline-start: 1.15rem; }
.seo-list li { margin: 0.2rem 0; }
.seo-list.bad { color: var(--bad); }
.push-enable { white-space: nowrap; min-height: 2.75rem; }
.muted { color: var(--muted); }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.crumbs a { color: inherit; }
.crumbs span { color: var(--ink); }
.crumbs a + a::before,
.crumbs a + span::before {
  content: "‹";
  margin-inline-end: 0.55rem;
}
.pre { white-space: pre-wrap; }
.prose { line-height: 1.9; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { margin: 1rem 0 0.4rem; }
.prose p { margin: 0.5rem 0; }
.prose img, .prose video { max-width: 100%; height: auto; border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.55rem; }
.prose blockquote { margin: 0.6rem 0; padding: 0.4rem 0.8rem; border-inline-start: 3px solid var(--link); color: var(--muted); }
.prose pre, .prose code { font-family: ui-monospace, monospace; }
.prose pre { overflow: auto; padding: 0.7rem; background: var(--field); border-radius: 12px; }
.row { display: grid; padding: 0.8rem 1rem; margin: 0.5rem 0; }
.talk { display: grid; gap: 0.5rem; margin: 1rem 0; }
.mine, .theirs { margin: 0; padding: 0.6rem 0.8rem; border-radius: 14px; max-width: 36rem; white-space: pre-wrap; }
.mine { background: var(--mine); justify-self: start; }
.theirs { background: var(--theirs); border: 1px solid var(--line); justify-self: end; }
.flash { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.flash li { background: var(--flash); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.4rem 0; }
.flash li.error { border-color: var(--bad); }
.flash li.success { border-color: var(--ok); }
.theme {
  display: flex;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
}
.theme button {
  background: transparent;
  color: var(--muted);
  padding: 0.2rem 0.75rem;
}
.theme button.active {
  background: var(--button);
  color: var(--ink);
}
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: 0.2rem 0; }
.phone { font-size: 1.4rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 1rem; }
.filters a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: var(--field);
  text-decoration: none;
  color: var(--text);
}
.filters a.active { background: var(--button); color: var(--ink); }
.blog-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.45rem 0 1.2rem;
}
.blog-cat {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.45rem;
  min-height: 8.5rem;
  padding: 0.95rem 0.75rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.blog-cat:hover {
  text-decoration: none;
  border-color: var(--link);
  transform: translateY(-2px);
}
.blog-cat-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--field);
  border: 1px solid var(--line);
}
.blog-cat-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.blog-cat strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.blog-cat > span {
  color: var(--muted);
  font-size: 0.84rem;
}
.blog-cat.active {
  background: var(--button);
  border-color: var(--button);
  color: var(--ink);
}
.blog-cat.active > span { color: color-mix(in srgb, var(--ink) 86%, transparent); }
.blog-cat.active .blog-cat-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: transparent;
}
.cat-rows { display: grid; gap: 0.55rem; margin: 0 0 1rem; }
.cat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.6rem;
  align-items: center;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem;
}
.cat-row form:first-child {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}
.cat-row input { width: auto; flex: 1; min-width: 0; }
.cat-row button { width: auto; }
.cat-row .muted { grid-column: 1 / -1; }
.post-list { display: grid; gap: 0.7rem; }
.post-list a.card { text-decoration: none; color: inherit; }
.post-card.has-cover {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}
.post-card-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
a.card img.post-thumb,
.post-card img.post-thumb {
  width: 118px;
  height: 66px;
  max-width: 118px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  display: block;
  padding: 0.15rem;
  box-sizing: border-box;
  background: #071018;
  border: 1px solid var(--line);
}
.post-head {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.post-head.has-cover {
  grid-template-columns: 148px 1fr;
  align-items: start;
  gap: 0.9rem 1rem;
}
.post-head-text { min-width: 0; }
.post-head-text h1 { margin-top: 0; }
.post-cover {
  width: 148px;
  height: 83px;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  display: block;
  padding: 0.2rem;
  box-sizing: border-box;
  background: #071018;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(8, 18, 36, 0.12);
}
.cover-preview {
  display: block;
  width: 148px;
  height: 83px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  margin: 0.4rem 0 0.8rem;
  padding: 0.2rem;
  box-sizing: border-box;
  background: #071018;
  border: 1px solid var(--line);
}
.post-thumb-sm {
  width: 72px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  padding: 0.1rem;
  box-sizing: border-box;
  background: #071018;
  border: 1px solid var(--line);
  flex: 0 0 auto;
  background: var(--field);
}
.blog-post-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.blog-post-row p { margin: 0; flex: 1; }
.blog-post-form label { display: grid; gap: 0.3rem; }
.blog-delete { margin-top: 1rem; }
.seo-fold {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: var(--field);
}
.seo-fold > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.seo-fold > summary::-webkit-details-marker { display: none; }
.seo-fold[open] > summary { margin-bottom: 0.55rem; }
.seo-fold .stack,
.seo-fold label { margin-top: 0.45rem; }
@media (max-width: 560px) {
  .post-head.has-cover {
    grid-template-columns: 112px 1fr;
    gap: 0.7rem;
  }
  .post-cover { width: 112px; height: 63px; border-radius: 12px; }
  .post-card.has-cover { grid-template-columns: 96px 1fr; gap: 0.65rem; }
  a.card img.post-thumb,
  .post-card img.post-thumb { width: 96px; height: 54px; max-width: 96px; border-radius: 10px; }
}
.prose { line-height: 1.9; font-size: 1.05rem; }
.prose .tn,
.prose .tn * { white-space: normal; }
.prose .tn h1,
.prose .tn h2,
.prose .tn h3,
.prose .tn h4,
.prose .tn h5,
.prose .tn h6,
.prose .tn p { margin: unset; }
.stack input[type="checkbox"] { width: auto; }
.pager { display: flex; gap: 0.7rem; align-items: center; }
.pager a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  color: var(--text);
  text-decoration: none;
}
.empty {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 1.4rem;
  color: var(--muted);
}
footer {
  color: var(--muted);
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
footer p { margin: 0.35rem 0; }
.phone-install[hidden] { display: none !important; }
.phone-install { text-align: center; }
.phone-install button { width: auto; min-height: 2.75rem; }
.stars-input { grid-column: 1 / -1; }
.stars-input > div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: center;
}
.stars-input > div > div { width: auto; flex: none; }
.stars-input label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.stars-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.stars-input label:hover { border-color: var(--link); }
.stars-input label:has(input:checked) {
  background: var(--button);
  color: var(--ink);
  border-color: transparent;
}
.stars-input label:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.score-line { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; align-items: center; }
.name-line { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.vip {
  display: inline-block;
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6e2a4, #c9a227);
  color: #2a2108;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.45;
}
.staff-score { color: var(--link); font-weight: 700; }
.review-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
  margin: 0.2rem 0 0.8rem;
}
.review-label { display: block; color: var(--muted); font-size: 0.88rem; margin-bottom: 0.25rem; }
.review-note { display: grid; gap: 0.25rem; color: var(--muted); font-size: 0.88rem; }
.review-compose textarea { min-height: 2.75rem; }
.review-compose button { width: auto; min-height: 2.75rem; }
.review-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.review-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.65rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}
.review-card p { margin: 0; flex: 1 1 8rem; }
.identity-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }
.identity-actions label { min-width: 8rem; }
.identity-actions input { width: 6rem; }
.identity-actions button { width: auto; }
.banner { margin: 0.4rem 0 1rem; }
.banner-slide { display: block; }
.banner-slide[hidden] { display: none !important; }
.banner-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.banner-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 0.6rem 0 1rem;
}
.banner-pair a { display: block; }
.banner-pair img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.report { width: 100%; border-collapse: collapse; }
.report th, .report td {
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.35rem;
  text-align: right;
  vertical-align: top;
}
.report th { color: var(--muted); font-weight: 600; }
.search-actions a.button { color: var(--ink); text-decoration: none; }
.banner-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.55rem; }
.banner-dots button {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border-radius: 50%;
  background: var(--line);
}
.banner-dots button.active { background: var(--button); }
.banner-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0.8rem;
}
.banner-tally li {
  display: grid;
  gap: 0.1rem;
  min-width: 7rem;
  background: var(--flash);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.8rem;
}
.banner-tally span { color: var(--muted); font-size: 0.85rem; }
.banner-tally strong { font-size: 1.25rem; }
.banner-place {
  margin: 1.15rem 0 0.45rem;
  font-size: 1.05rem;
}
.banner-where {
  justify-self: start;
  background: var(--button);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.95rem;
}
.banner-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  align-items: start;
}
.banner-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.75rem;
}
.banner-card summary {
  display: grid;
  gap: 0.3rem;
  cursor: pointer;
  list-style: none;
}
.banner-card summary::-webkit-details-marker { display: none; }
.banner-card summary::marker { content: ""; }
.banner-card img { width: 100%; max-height: 120px; object-fit: cover; border-radius: 12px; }
.banner-card form.stack { margin-top: 0.75rem; }
.banner-card label { display: grid; gap: 0.25rem; }
.banner.slim .banner-slide img { height: 140px; }
.reminder {
  background: var(--flash);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin: 0.8rem 0 1rem;
}
.reminder p { margin: 0.2rem 0; }
.sections {
  display: grid;
  gap: 0.9rem;
  margin: 0.4rem 0 1rem;
}
.section-group,
.subcat-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
}
.subcat-block h2 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.section-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.section-head:hover { text-decoration: none; }
.section-head img {
  width: 22rem;
  max-width: 46%;
  height: auto;
  aspect-ratio: 3.5 / 1;
  flex: none;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--field);
}
.section-head .section-fallback {
  width: 4.4rem;
  height: 4.4rem;
  align-self: flex-start;
  border-radius: 14px;
}
.share-save { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.35rem 0 0.8rem; }
.share-save form { margin: 0; }
.share-save button,
.share-save summary,
.share-save-link {
  width: 2.55rem;
  height: 2.55rem;
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
}
.share-save svg { width: 1.2rem; height: 1.2rem; display: block; }
.share-save .is-saved { background: var(--button); border-color: transparent; color: #fff; }
.share-pop { position: relative; }
.share-pop summary { list-style: none; }
.share-pop summary::-webkit-details-marker { display: none; }
.share-menu {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 0.35rem;
  min-width: 9rem;
  margin-top: 0.35rem;
  padding: 0.45rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.share-menu button,
.share-menu a {
  width: 100%;
  height: auto;
  min-height: 2.4rem;
  justify-content: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
}
.share-net.tg { color: #229ed9; }
.share-net.wa { color: #128a3e; }
.section-head-text { display: grid; gap: 0.15rem; min-width: 0; }
.section-head-text strong { font-size: 1.15rem; }
.section-head-text span { color: var(--link); font-size: 0.9rem; }
.subcats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.55rem;
}
.subcats a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.subcats a:hover { border-color: var(--link); text-decoration: none; }
.cat-tree { display: grid; gap: 0.9rem; }
.cat-root,
.cat-leaf {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
}
.cat-root { background: var(--field); }
.cat-leaf { background: var(--card); }
.subcat-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}
.global-search {
  display: flex;
  gap: 0.6rem;
  align-items: end;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.9rem;
  margin: 0.4rem 0 0.8rem;
}
.global-search label { flex: 1; }
.global-search input { min-height: 3rem; font-size: 1.05rem; }
.global-search button { width: auto; min-height: 3rem; padding-inline: 1.4rem; }
.topic-hits { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 0.8rem; }
.topic-hits a {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  color: var(--text);
  text-decoration: none;
}
.section-card img, .section-fallback {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--avatar);
}
.section-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 0.4rem;
}
.socials { display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0; margin: 0.45rem 0 0; list-style: none; }
.social-logo {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
}
.social-logo svg { width: 1.45rem; height: 1.45rem; display: block; }
.social-logo:hover { text-decoration: none; filter: brightness(1.08); }
.social-logo.ig { background: #d62976; }
.social-logo.tg { background: #229ed9; }
.social-logo.wa { background: #25d366; }
.social-logo.web { background: var(--button); color: var(--ink); }
.desk {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.online-bar {
  display: flex;
  gap: 0.55rem 0.9rem;
  align-items: center;
  overflow-x: auto;
  padding: 0.4rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.online-bar a,
.online-bar .online-total {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.online-bar a:hover { text-decoration: none; }
.online-bar a::before,
.online-bar .online-total::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ok);
}
.online-bar > span { color: var(--muted); white-space: nowrap; }
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ok);
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.online-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ok);
}
.online-pill:hover { text-decoration: none; }
.stat.online-now strong { color: var(--ok); }
.bar:has(.online-bar) ~ main .desk-nav { top: 9.6rem; }
.desk-nav {
  position: sticky;
  top: 7.2rem;
  display: grid;
  gap: 0.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem 0.7rem;
}
.desk-nav .eyebrow { padding-inline: 0.65rem; }
.desk-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  padding: 0.4rem 0.65rem;
}
.desk-nav a:hover,
.desk-nav a[aria-current="page"] {
  background: var(--field);
  color: var(--text);
  text-decoration: none;
}
.visitor-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin: 0.2rem 0 0.7rem;
}
.visitor-search label { flex: 1 1 12rem; }
.visitor-search button { width: auto; min-height: 2.75rem; }
.user-filters label { flex: 1 1 9rem; }
.jalali-field { display: flex; gap: 0.35rem; align-items: center; position: relative; }
.jalali-field input { flex: 1; min-width: 0; }
.jalali-open { width: auto; min-height: 2.5rem; padding-inline: 0.7rem; }
.jalali-pop {
  position: absolute;
  z-index: 40;
  width: 18rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.65rem;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 16%, transparent);
}
.jalali-pop[hidden] { display: none; }
.jalali-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; margin-bottom: 0.4rem; }
.jalali-bar button, .jalali-pop > button { width: auto; min-height: 2rem; padding: 0.25rem 0.55rem; }
.jalali-bar strong { font-size: 0.95rem; }
.jalali-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.15rem; margin-bottom: 0.45rem; }
.jalali-grid span, .jalali-grid button {
  min-height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
}
.jalali-week { color: var(--muted); font-size: 0.8rem; }
.jalali-grid button.on { background: var(--button); color: var(--ink); }
.jalali-grid button.today { outline: 1px solid var(--button); }
.visitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
}
.visitor-card {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem 0.7rem 0.5rem;
}
.visitor-card p { margin: 0; font-size: 0.92rem; }
.visitor-card strong { font-size: 1rem; }
.visitor-card details { margin-top: 0.25rem; }
.visitor-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: start;
  margin-top: 0.35rem;
}
.visitor-actions summary,
.visitor-actions button {
  min-height: 2.5rem;
  width: 100%;
}
.visitor-actions details { margin: 0; }
.visitor-card summary { cursor: pointer; color: var(--link); padding: 0.25rem 0; }
.visitor-card .stack,
.visitor-card .report { margin-top: 0.45rem; }
.user-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.user-block {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.user-block p { font-size: 0.86rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
  margin: 0.6rem 0 1.2rem;
}
.stat {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  color: inherit;
  text-decoration: none;
}
.stat strong { font-size: 1.55rem; line-height: 1.2; }
.stat span { color: var(--text); font-size: 0.95rem; }
a.stat:hover { border-color: var(--link); text-decoration: none; }
.stat.has { border-color: var(--link); background: var(--flash); }
@media (max-width: 800px) {
  main:has(.auth) { display: block; min-height: 0; }
  .auth { grid-template-columns: 1fr; gap: 1rem; }
  .auth-lead h1 { max-width: none; }
}
@media (max-width: 700px) {
  .top, footer, main { width: min(1080px, calc(100% - 1.25rem)); }
  .brand { min-width: 0; }
  .logo { height: auto; max-height: 36px; width: auto; max-width: 100%; }
  .me-head { flex-direction: column; align-items: flex-start; }
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand account" "menu menu";
    align-items: center;
    gap: 0.35rem 0.45rem;
    padding: 0.4rem 0 0.45rem;
  }
  .brand { grid-area: brand; width: auto; justify-content: flex-start; }
  .account {
    grid-area: account;
    width: auto;
    flex: none;
    margin-inline-start: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.15rem;
  }
  .menu {
    grid-area: menu;
    width: auto;
    flex: none;
    margin-inline-start: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; flex: none; }
  .menu a,
  .account > a:not(.button),
  .theme button,
  button.linkish,
  .account .button.small {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .menu a, .account > a:not(.button), button.linkish { padding: 0.3rem 0.7rem; }
  .theme { flex: none; }
  .theme button { min-width: 2.4rem; padding: 0.3rem 0.55rem; }
  .account .button.small { padding: 0.35rem 0.75rem; }
  input, textarea, select { font-size: 16px; }
  input[type="checkbox"] { width: 1.35rem; height: 1.35rem; }
  .hero h1 { font-size: 1.45rem; }
  .hero p:last-child { font-size: 0.95rem; }
  .loc-map { height: 220px; }
  footer { font-size: 0.88rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .phone-install:not([hidden]) {
    position: fixed;
    z-index: 50;
    inset-inline: 0;
    bottom: 0;
    margin: 0;
    padding: 0.55rem 0.8rem calc(0.55rem + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid var(--line);
  }
  .phone-install button { width: 100%; }
  body:has(.phone-install:not([hidden])) .msg-note {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
  .loc-actions { flex-direction: column; }
  .loc-actions button { width: 100%; }
  .choices label { min-height: 2.75rem; }
  .fold summary { min-height: 2.75rem; display: flex; align-items: center; }
  .report { display: block; overflow-x: auto; }
  .cards { grid-template-columns: 1fr; }
  .job-sheet { grid-template-columns: 1fr; }
  .job-side { order: -1; }
  .visitor-grid,
  .user-grid { grid-template-columns: 1fr; }
  .visitor-actions { grid-template-columns: 1fr 1fr; }
  .visitor-actions summary,
  .visitor-actions button { min-height: 2.75rem; }
  .day-person form { flex-direction: column; align-items: stretch; }
  .day-person button { width: 100%; }
  .visitor-search { flex-direction: column; align-items: stretch; }
  .visitor-search button { width: 100%; }
  .visitor-search .jalali-open { width: auto; }
  .person { grid-template-columns: 1fr; }
  .person .avatar { width: 96px; height: 96px; }
  .review-compose, .review-list { grid-template-columns: 1fr; }
  .banner-slide img, .banner.slim .banner-slide img {
    height: auto;
    max-height: 46vw;
    object-fit: cover;
  }
  .banner-pair { grid-template-columns: 1fr; }
  .banner-pair img { height: auto; max-height: 200px; object-fit: contain; }
  .banner-dots { gap: 0.1rem; }
  .banner-dots button,
  .banner-dots button.active {
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    display: grid;
    place-items: center;
  }
  .banner-dots button::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--line);
  }
  .banner-dots button.active::before { background: var(--button); }
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .section-head img {
    width: 100%;
    height: auto;
    aspect-ratio: 3.5 / 1;
    object-fit: cover;
    border-radius: 14px;
  }
  .section-head .section-fallback {
    width: 100%;
    height: 4.2rem;
  }
  .subcats { grid-template-columns: 1fr 1fr; }
  .subcats a { min-height: 3.1rem; font-size: 0.95rem; }
  .subcat-admin { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 1fr; }
  .cat-row form:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .cat-row form:last-child button { width: 100%; min-height: 2.75rem; }
  .search-actions { flex-direction: column; align-items: stretch; }
  .search button, .search-actions .quiet, .global-search button, .stack > button, .fields > button, .panel > p > .button {
    width: 100%;
    min-height: 2.75rem;
  }
  .search-actions .quiet { border: 1px solid var(--line); }
  .global-search { flex-direction: column; align-items: stretch; }
  .otp { width: 100%; gap: 0.5rem; }
  .otp-box {
    width: clamp(2.75rem, 16vw, 3.5rem);
    height: clamp(3.2rem, 18vw, 3.7rem);
    flex: 0 0 auto;
  }
  .hero h1 { max-width: none; }
  .desk { grid-template-columns: 1fr; }
  .desk-nav {
    position: static;
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    max-width: 100%;
  }
  .desk-nav .eyebrow { display: none; }
  .desk-nav a { white-space: nowrap; min-height: 2.75rem; }
}
@media (max-width: 440px) {
  .top {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "account" "menu";
  }
  .account { justify-content: flex-start; }
  .logo { max-width: min(220px, 72vw); max-height: 40px; }
}
@media (max-width: 380px) {
  .subcats { grid-template-columns: 1fr; }
}
