:root {
  --bg: #eef4fa;
  --card: #ffffff;
  --text: #15283b;
  --muted: #5b6f84;
  --line: #d9e5f0;
  --accent: #1b65a3;
  --accent-ink: #ffffff;
  --accent-soft: #deebf7;
  --head: linear-gradient(90deg, #18629a, #0f3d63);
  --ok: #2f8f5b;
  --danger: #c4413a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 50, 90, .08), 0 4px 14px rgba(20, 50, 90, .07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1826; --card: #152437; --text: #e6eef7; --muted: #98abc0; --line: #243750;
    --accent: #5ba7e6; --accent-ink: #0d1826; --accent-soft: #1a3350; --shadow: none;
    --head: linear-gradient(90deg, #134e7c, #0b2c48);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.5rem; margin: .2rem 0 .8rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); }
.pre { white-space: pre-line; }

.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--head); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.icon-btn { background: none; border: 0; font-size: 1.3rem; cursor: pointer; padding: 6px; border-radius: 10px; }
.icon-btn:hover { background: rgba(255, 255, 255, .15); }
.top { gap: 8px; flex-wrap: wrap; padding-bottom: 0; }
.back-btn { color: #fff; font-size: 1.5rem; line-height: 1; padding: 4px 10px 6px; margin-left: -8px; }
.page-title { display: none; flex: 1; min-width: 0; font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.sub .brand { display: none; }
body.sub .page-title { display: block; }
.brand { flex: 1; }
#bell { color: #fff; }
.desk-only { display: none; }

main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }

/* mobile: icon menu is the second row of the header */
.tabs {
  order: 10; flex: 1 0 100%; display: flex; justify-content: space-around; margin: 6px -12px 0; padding: 0 0 6px;
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0;
  min-width: 0; color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .7rem; border-radius: 10px; white-space: nowrap;
}
/* line icons from the sprite in index.html */
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a .ic { width: 48px; height: 30px; padding: 4px 12px; border-radius: 999px; transition: background .2s, color .2s, transform .15s; }
.tabs a:hover .ic { background: rgba(255, 255, 255, .14); }
.tabs a:active .ic { transform: scale(.92); }
.tabs a.on { color: #fff; font-weight: 700; }
.tabs a.on .ic { background: #fff; color: #18629a; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }

/* news / events switch */
.seg { display: flex; gap: 4px; background: var(--accent-soft); padding: 4px; border-radius: 999px; margin: 0 0 16px; max-width: 420px; }
.seg a { flex: 1; text-align: center; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; }
.seg a.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 4px rgba(20, 50, 90, .12); }

/* home quick actions */
/* bar under the banner, same width */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 16px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 8px rgba(20, 50, 90, .08); }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; text-align: center;
  border-left: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .8rem; font-weight: 600; line-height: 1.2; }
.quick a:first-child { border-left: 0; }
.quick a .ic { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); transition: background .2s, color .2s, transform .15s; }
.quick a:hover .ic { background: var(--accent); color: #fff; }
.quick a:active .ic { transform: scale(.92); }
.quick a:hover { background: var(--accent-soft); color: var(--accent); }

/* menu */
.m-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 4px 8px; }
.m-list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.m-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.m-list > :first-child { border-top: 0; }
.m-item:hover { background: var(--accent-soft); }
.m-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.m-ic .ic { width: 22px; height: 22px; }
.m-item:hover .m-ic { background: var(--accent); color: #fff; }
.m-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-tx small { color: var(--muted); font-size: .85rem; }
.m-go { color: var(--muted); font-size: 1.4rem; }

/* how to adopt */
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; gap: 14px; padding: 12px 0; }
.st-n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps p { margin: 2px 0 0; }
.inst { padding: 0; margin-bottom: 10px; }
.inst summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.inst summary::-webkit-details-marker { display: none; }
.inst summary::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 1.4rem; transition: transform .15s; }
.inst[open] summary::after { transform: rotate(90deg); }
.inst summary span { font-size: 1.4rem; }
.inst .steps { padding: 0 16px 8px; margin: 0; }
.inst .steps li { padding: 8px 0; align-items: flex-start; }
.ok-box { border-color: #2e9d6a; }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin: 4px 0; }
/* login */
.auth { max-width: 480px; }
.step-n { margin: 0 0 8px; font-size: .8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: .9rem; cursor: pointer; }
.linkish:disabled { color: var(--muted); cursor: default; }
.chat-login { align-items: center; text-align: center; padding-bottom: 4px; }
.chat-login p { margin: 0 0 4px; }

/* community chat */
.chat { display: flex; flex-direction: column; min-height: 320px; }
.chat-top h1 { margin: 0; }
.chat-top p { margin: 2px 0 8px; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 2px; overscroll-behavior: contain; }
.chat-list > .btn { align-self: center; }
.chat-list > .btn[hidden] { display: none; }
.chat-list .empty { margin: auto; }
.msg { max-width: min(85%, 560px); align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 6px 12px 8px; }
.msg.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg.team { border-color: var(--accent); background: var(--accent-soft); }
.msg-head { display: flex; gap: 6px; align-items: baseline; font-size: .8rem; }
.msg-head span:last-child { margin-left: auto; opacity: .7; white-space: nowrap; }
.msg-text { overflow-wrap: anywhere; }
.msg-tools { display: flex; gap: 10px; margin-top: 2px; }
.msg-tools button { background: none; border: 0; padding: 0; font-size: .75rem; color: inherit; opacity: .7; cursor: pointer; text-decoration: underline; }
.chat-form { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.chat-as { margin: 0; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; }
.chat-row .btn { min-width: 52px; min-height: 44px; font-size: 1.2rem; padding: 0 14px; }
.sr-photos { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0; }
.sr-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin: 0 0 14px; background: var(--card); }
legend { font-weight: 700; padding: 0 6px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.filters select {
  flex: none; width: auto; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: .9rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  color: var(--text); text-decoration: none; display: block; border: 1px solid var(--line);
}
.card .ph { aspect-ratio: 1; background: var(--accent-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .in { padding: 10px 12px 12px; }
.card .t { font-weight: 700; font-size: 1.05rem; }
.card .s { color: var(--muted); font-size: .85rem; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.badge.foster { background: #e0f2f0; color: #1d7a70; }
.badge.home { background: #dff3e7; color: var(--ok); }
.badge.urgent { background: #fbe1df; color: var(--danger); }
@media (prefers-color-scheme: dark) {
  .badge.foster { background: #173a37; color: #7fd3c8; }
  .badge.home { background: #1d3427; color: #7fd1a1; }
  .badge.urgent { background: #3f1f1d; color: #f08b84; }
}

.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.gallery img { flex: none; width: min(88%, 520px); aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); scroll-snap-align: center; background: var(--accent-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.facts span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: .85rem; }

.list { display: flex; flex-direction: column; gap: 12px; }
.post { display: flex; gap: 12px; padding: 12px; }
.post .ph { width: 84px; height: 84px; flex: none; border-radius: 10px; aspect-ratio: auto; font-size: 2rem; }
.post .t { margin-bottom: 2px; }
.wall-list { display: flex; flex-direction: column; gap: 16px; }
.wall { padding: 0; }
.wall .acts { border-top: 1px solid var(--line); margin-top: 12px; padding: 6px 10px; }
.wall-ph + .acts, a:has(.wall-ph) + .acts { margin-top: 0; }
.post-acts { padding: 8px 0; }
.wall a { color: inherit; text-decoration: none; }
.wall-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.wall-head img { width: 40px; height: 40px; border-radius: 50%; }
.wall-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.wall-head span { font-size: .85rem; }
.wall-body { display: block; padding: 0 16px; }
.wall-body .t { margin-bottom: 4px; }
.wall-body p { margin: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
a.wall-more { display: inline-block; padding: 4px 16px 0; color: var(--accent); font-weight: 600; font-size: .95rem; }
.wall-ph { width: 100%; max-height: 640px; object-fit: cover; margin-top: 12px; }
.post .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover { border-radius: var(--radius); margin-bottom: 12px; width: 100%; max-height: 420px; object-fit: cover; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 12px;
  border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 7px 12px; font-size: .9rem; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.sticky-cta { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); margin-top: 16px; }

form .f { margin-bottom: 12px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.qr { width: 100%; max-width: 320px; border-radius: 12px; background: #fff; padding: 8px; margin: 8px 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty b { display: block; font-size: 2.5rem; margin-bottom: 6px; }
.spinner { text-align: center; padding: 40px; color: var(--muted); }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: .2s; max-width: calc(100% - 32px); z-index: 50; font-size: .95rem;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* admin */
.adm-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.adm-nav a { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .9rem; }
.adm-nav a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.adm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.adm-row img, .adm-row .ph { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; font-size: 1.5rem; aspect-ratio: auto; }
.adm-row .grow { flex: 1; min-width: 0; }
.adm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.adm-photos div { position: relative; }
.adm-photos img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.adm-photos .acts { display: flex; gap: 4px; margin-top: 4px; }
.adm-photos .acts button { flex: 1; font-size: .75rem; padding: 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.req .meta { font-size: .85rem; color: var(--muted); }
.req dl { margin: 8px 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .92rem; }
.req dt { color: var(--muted); }
.req dd { margin: 0; white-space: pre-line; }

.ai-box { border-color: var(--accent); background: linear-gradient(var(--accent-soft), var(--card) 70%); }
.ai-polish { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-polish button { font: inherit; font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.ai-polish button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.ai-polish button[data-undo] { color: var(--danger); }

/* home */
.banner { width: 100%; height: auto; aspect-ratio: 911 / 364; object-fit: cover; border-radius: 20px; margin-bottom: 14px; background: #18629a; }
.hero { display: flex; align-items: center; gap: 24px; background: var(--accent-soft); border-radius: 20px; padding: 22px 20px; margin-bottom: 16px; }
.hero h1 { font-size: 1.8rem; margin-top: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hero .btn.ghost { background: var(--card); }
.stats { display: flex; gap: 22px; margin-top: 16px; }
.stats b { display: block; font-size: 1.6rem; color: var(--accent); line-height: 1.1; }
.stats span { font-size: .85rem; color: var(--muted); }
.urgent-card { padding: 12px 14px; margin-bottom: 12px; border-color: var(--danger); }
.urgent-card .t { margin: 4px 0 2px; font-weight: 700; }
.urgent-card .s { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-head a { font-size: .9rem; text-decoration: none; white-space: nowrap; }
.home-cols { display: grid; gap: 0 24px; }
.notify-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.notify-box p { margin: 2px 0 0; }

/* AI search */
.ai-search { background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.ai-row { display: flex; gap: 8px; }
.ai-row input { flex: 1; min-width: 0; }
.ai-row .btn { flex: none; }
.small { font-size: .8rem; margin: 6px 0 0; }
.why { font-size: .82rem; color: var(--text); background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; margin: 8px 0 0; }

/* home feed: dogs with likes, comments, donations */
.feed { display: grid; gap: 16px; margin-bottom: 8px; }
.feed-card { display: flex; flex-direction: column; }
.feed-ph { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--accent-soft); font-size: 4rem; text-decoration: none; }
.feed-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed-card .in { padding: 12px 14px 4px; flex: 1; }
.feed-card a.t { color: var(--text); text-decoration: none; font-size: 1.2rem; }
.feed-text { color: var(--text); font-size: .95rem; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acts { display: flex; align-items: center; gap: 4px; padding: 8px 10px 12px; flex-wrap: wrap; }
.acts .btn { margin-left: auto; }
.act {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 999px; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.act:hover { background: var(--accent-soft); color: var(--accent); }
.act.on { color: var(--danger); }
.act:disabled { opacity: .6; }
.dog-acts { padding: 4px 0; margin-top: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment p { margin: 4px 0 0; overflow-wrap: anywhere; }
.c-head { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.c-form { margin-top: 14px; }
dialog#donate { border: 0; padding: 0; border-radius: 20px; background: var(--card); color: var(--text); width: min(420px, calc(100% - 32px)); box-shadow: 0 10px 40px rgba(10, 30, 60, .3); }
dialog#donate::backdrop { background: rgba(10, 25, 45, .55); }
dialog#donate .sheet { padding: 20px 20px 8px; position: relative; text-align: center; }
dialog#donate h2 { margin: 0 32px 8px; }
dialog#donate .qr { margin: 8px auto; }
dialog#donate .close { position: absolute; top: 10px; right: 10px; color: var(--muted); }

/* dog page */
.back { margin: 0 0 10px; }
.back a { text-decoration: none; font-size: .9rem; }
.gallery-empty { aspect-ratio: 1; border-radius: var(--radius); background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 5rem; margin-bottom: 12px; }

/* desktop: navigation moves to the header, wider grid, two-column dog page */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .top { padding: 10px max(24px, calc((100% - 1100px) / 2)); gap: 24px; flex-wrap: nowrap; }
  .tabs { order: 0; flex: 1; justify-content: stretch; gap: 6px; margin: 0; padding: 0; }
  .tabs a { flex: 1; justify-content: center; flex-direction: row; gap: 8px; font-size: 1rem; padding: 10px 8px; }
  .tabs a .ic { width: 20px; height: 20px; padding: 0; background: none !important; box-shadow: none !important; color: inherit !important; }
  .tabs a { color: rgba(255, 255, 255, .82); }
  .tabs a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
  .tabs a.on { background: #fff; color: #18629a; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
  .brand { flex: none; display: flex !important; }
  .back-btn, .page-title { display: none !important; }
  .desk-only { display: block; }
  .quick { margin-bottom: 24px; }
  .quick a { flex-direction: row; justify-content: center; gap: 10px; padding: 16px 8px; font-size: 1rem; }
  .m-group { max-width: 720px; }
  main { max-width: 1100px; padding: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
  .card { transition: transform .15s, box-shadow .15s; }
  a.card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(20, 50, 90, .14); }
  .hero { padding: 36px 40px; }
  .hero h1 { font-size: 2.4rem; }
  .banner { max-height: 340px; }
  .home-cols { grid-template-columns: 1fr 1fr; }
  .feed { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
  .dog-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .dog-media { position: sticky; top: 84px; }
  .gallery { margin: 0; padding: 0; }
  .gallery img { width: 100%; }
  .sticky-cta { position: static; }
  #toast { bottom: 24px; }
  .list .post .ph { width: 110px; height: 110px; }
  form#adopt, form#dog, form#post, form#help, form#push { max-width: 720px; }
}
