/* Nosboken – gemensam design för alla sidor (mobil först) */
[hidden] { display: none !important; }
:root {
  --bg: #f3f1ec;
  --card: #ffffff;
  --ink: #1d2621;
  --muted: #6e736c;
  --line: #e4e0d6;
  --soft: #ece8de;
  --green: #2f4a3a;
  --green2: #4e7a5f;
  --greenbg: #e3eee6;
  --accent: #b8742a;
  --accentbg: #f7ecdd;
  --ok: #2e7d4f;
  --bad: #b3412f;
  --r: 14px;
  --gap: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--green2); text-decoration: none; }
p { margin: .4rem 0; }

/* ---------- ram ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 6px; height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0; background: var(--green); color: #fff; }
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { background: none; border: 0; color: inherit; font-size: 26px; line-height: 1; width: 32px; height: 40px; cursor: pointer; padding: 0; }
.net { background: var(--accent); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 12px; }
main { max-width: 640px; margin: 0 auto; padding: 12px 14px calc(78px + var(--safe-b)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr 64px 1fr 1fr 1fr;
  background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; color: var(--muted); font-size: 11px; position: relative; }
.tabbar a span { font-size: 19px; line-height: 1.1; filter: grayscale(1); opacity: .75; }
.tabbar a.active { color: var(--green); font-weight: 650; }
.tabbar a.active span { filter: none; opacity: 1; }
.dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }

/* ---------- typografi ---------- */
h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 2px 6px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.card h2, .sheet h2 { font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0 0 8px; }
.title { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 16px; }

/* ---------- kort och rader ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0 0 var(--gap); }
.card.link { cursor: pointer; }
.card.link:active, .item.link:active { background: #faf8f4; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 var(--gap); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); min-height: 52px; }
.item:first-child { border-top: 0; }
.item.link { cursor: pointer; }
.item .grow { flex: 1; min-width: 0; }
.item .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chev { color: #b9b4a8; font-size: 20px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.pill { display: inline-block; background: var(--soft); border-radius: 99px; padding: 1px 8px; font-size: 12px; line-height: 1.6; margin: 2px 4px 2px 0; white-space: nowrap; }
.pill.green { background: var(--greenbg); color: var(--green); }
.pill.orange { background: var(--accentbg); color: #7a4a12; }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: 14px; }

/* ---------- knappar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--green); color: #fff; white-space: nowrap; }
.btn.secondary { background: var(--soft); color: var(--ink); }
.btn.ghost { background: none; color: var(--green2); padding: 0 6px; height: 32px; font-size: 14px; }
.btn.danger { background: none; color: var(--bad); border: 1px solid #e7c2ba; }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 0 0 var(--gap); }
.linkbtn { background: none; border: 0; color: var(--green2); font: inherit; font-size: 13px; padding: 6px 0; cursor: pointer; }

/* ---------- formulär ---------- */
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; height: 40px; font: inherit; font-size: 16px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--green); }
input[type=date], input[type=datetime-local] { -webkit-appearance: none; appearance: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.grid2 > * { min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); margin: 8px 0; font-weight: 400; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; cursor: pointer; }
.scale button.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- segment och chips ---------- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--soft); padding: 3px; border-radius: 10px; margin: 0 0 12px; }
.tabs button { height: 32px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 99px;
  padding: 0 12px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip .avatar { margin-left: -8px; }

/* ---------- hundbild ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--greenbg); color: var(--green); font-weight: 700; }
.avatar.ph { background: linear-gradient(135deg, #5d8a6d, #2f4a3a); color: #fff; }

/* ---------- översikt ---------- */
.hero { background: linear-gradient(160deg, #2f4a3a, #43695a); color: #fff; border-radius: 16px; padding: 14px; margin: 0 0 var(--gap); }
.hero .hi { font-size: 19px; font-weight: 700; }
.hero .sub { font-size: 13px; opacity: .8; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: rgba(255,255,255,.13); border-radius: 10px; padding: 8px 4px; text-align: center; }
.stat b { display: block; font-size: 19px; line-height: 1.15; }
.stat span { font-size: 11px; opacity: .85; }
.dogs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 var(--gap); }
.dogtile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 6px 10px; text-align: center; cursor: pointer; min-width: 0; }
.dogtile .avatar { margin: 0 auto 6px; }
.dogtile b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dogtile span { font-size: 12px; color: var(--muted); }
.dogtile.add { border-style: dashed; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.dogtile.add .plus { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.when { flex: none; width: 46px; text-align: center; background: var(--accentbg); border-radius: 10px; padding: 4px 0; }
.when b { display: block; font-size: 17px; line-height: 1.1; color: var(--accent); }
.when span { font-size: 10px; text-transform: uppercase; color: var(--muted); }
.ico { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }

/* ---------- grenar och övningar ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; cursor: pointer; font: inherit; color: inherit; min-height: 74px; min-width: 0; }
.tile .ic { font-size: 22px; display: block; }
.tile .nm { font-size: 12px; font-weight: 600; line-height: 1.2; display: block; margin-top: 3px; }
.tile .ct { font-size: 11px; color: var(--muted); display: block; }
.cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 2px 6px; }
.cat:first-child { margin-top: 4px; }
.addbtn { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.item.added { opacity: .55; }
.item.added .addbtn { background: var(--ok); }
.ladder { list-style: none; margin: 6px 0 0; padding: 0; }
.ladder li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--line); }
.ladder li:first-child { border-top: 0; }
.ladder .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ladder li.done .n { background: var(--green2); color: #fff; }
.ladder li.cur { font-weight: 650; }
.ladder li.cur .n { background: var(--accent); color: #fff; }

/* ---------- pass ---------- */
.ex { border-left: 4px solid var(--green2); }
.exhead { display: flex; align-items: center; gap: 8px; }
.exhead strong { flex: 1; min-width: 0; font-size: 15px; }
.badge { flex: none; background: var(--accentbg); color: #7a4a12; border: 0; border-radius: 99px; padding: 3px 9px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.crit { font-size: 14px; margin: 4px 0 0; }
.trials { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 8px; }
.trials:empty { display: none; }
.trial { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.trial.y { background: var(--ok); } .trial.n { background: var(--bad); }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; margin-top: 10px; }
.bigbtns button { height: 46px; border: 0; border-radius: 12px; color: #fff; font-size: 21px; cursor: pointer; }
.bigbtns .y { background: var(--ok); } .bigbtns .n { background: var(--bad); } .bigbtns .u { background: var(--soft); color: var(--ink); font-size: 18px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.suggest { background: var(--accentbg); border-radius: 10px; padding: 7px 10px; margin: 8px 0 6px; font-size: 13px; }
.decision { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.decision button { height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.decision button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
details.box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; margin: 0 0 var(--gap); }
details.box summary { display: flex; justify-content: space-between; align-items: center; height: 46px; list-style: none; cursor: pointer; font-size: 15px; gap: 8px; }
details.box summary span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.box summary::-webkit-details-marker { display: none; }
details.box summary::after { content: '›'; color: #b9b4a8; font-size: 20px; transform: rotate(90deg); flex: none; }
details.box[open] summary::after { transform: rotate(-90deg); }
details.box[open] { padding-bottom: 12px; }
.savebar { position: sticky; bottom: calc(60px + var(--safe-b)); display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0 4px;
  background: linear-gradient(rgba(243,241,236,0), var(--bg) 35%); z-index: 5; }
.map { height: 220px; border-radius: 12px; margin: 8px 0; }

/* ---------- chatt ---------- */
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 64px; }
.msg { max-width: 80%; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 6px 10px; font-size: 15px; }
.msg.me { align-self: flex-end; background: var(--greenbg); border-color: #cfe0d4; border-radius: 14px 14px 4px 14px; }
.msg .who { font-size: 11px; color: var(--muted); }
.daysep { text-align: center; font-size: 11px; color: var(--muted); margin: 6px 0; }
.chatbar { position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-b)); background: var(--bg); padding: 8px 14px; z-index: 9; border-top: 1px solid var(--line); }
.chatbar form { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* ---------- modal, toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 86vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px 14px calc(16px + var(--safe-b)); }
.sheet .btns { margin-top: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(70px + var(--safe-b)); background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 10px; z-index: 40; max-width: 90vw; font-size: 14px; }

/* ---------- övrigt ---------- */
.bar { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 4px 0; }
.bar > i { display: block; height: 100%; background: var(--green2); }
.chart { width: 100%; height: 96px; display: block; }
.notice { background: var(--accentbg); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0 0 var(--gap); }
.auth { max-width: 400px; margin: 24px auto; }
.logo { font-size: 40px; text-align: center; }
.code { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .12em; font-weight: 700; }
.photo-pick { display: flex; align-items: center; gap: 14px; }
.dangerzone { text-align: center; margin-top: 22px; }

/* ---------- prata in ---------- */
.micwrap { position: relative; display: block; }
.micwrap textarea { padding-right: 44px; }
.micwrap.inl { flex: 1; min-width: 0; }
.micwrap.inl input { padding-right: 42px; }
.mic { position: absolute; right: 5px; bottom: 5px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft); font-size: 16px; cursor: pointer; }
.micwrap.inl .mic { top: 50%; bottom: auto; transform: translateY(-50%); }
.mic.on { background: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(201,111,44,.2); } }

/* ---------- topbar kugghjul ---------- */
.gear { font-size: 21px; width: 40px; text-align: center; color: #fff; }

/* ---------- hunden i fokus ---------- */
.doghero { position: relative; border-radius: 18px; overflow: hidden; margin: 0 0 var(--gap); background: linear-gradient(160deg, #2f4a3a, #5d8a6d); color: #fff; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.doghero img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.doghero .ini { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 84px; font-weight: 700; opacity: .25; }
.doghero .shade { position: relative; padding: 46px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.doghero .name { font-size: 26px; font-weight: 750; line-height: 1.1; }
.doghero .meta { font-size: 13px; opacity: .9; margin-top: 2px; }
.doghero .discs { margin-top: 4px; font-size: 16px; letter-spacing: 2px; }
.doghero .edit { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.35); color: #fff; border-radius: 99px; padding: 4px 10px; font-size: 12px; }
.doghero .stats { margin-top: 10px; }
.doghero .stat { background: rgba(255,255,255,.18); backdrop-filter: blur(3px); }
.greet { font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.dogpick { display: flex; gap: 10px; overflow-x: auto; margin: 0 0 10px; padding: 2px; scrollbar-width: none; }
.dogpick button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; min-width: 52px; }
.dogpick button .avatar { outline: 2px solid transparent; outline-offset: 2px; }
.dogpick button.on { color: var(--ink); font-weight: 650; }
.dogpick button.on .avatar { outline-color: var(--green); }
.badge-n { background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 12px; font-weight: 650; }

/* ---------- spårläggaren ---------- */
.mapfull { height: calc(100dvh - 360px); min-height: 280px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin: 0 0 10px; z-index: 0; }
.mapfull.short { height: 300px; min-height: 0; }
.recbar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin: 0 0 8px; font-size: 14px; }
.recbar #acc { margin-left: auto; font-size: 12px; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: #c0392b; animation: pulse 1.2s infinite; }
.recdot.off { background: var(--muted); animation: none; }
.mkgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 4px; }
.mkgrid button { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 2px 6px; font: inherit; font-size: 11px; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mkgrid button span { font-size: 22px; line-height: 1.1; }
.mkgrid button:active { background: var(--greenbg); transform: scale(.96); }
.mk span { position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.35); font-size: 17px; }
.mk i { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; border-radius: 99px; min-width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; }
.runc { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.leaflet-control-layers { font-size: 13px; }
.list .item.check { margin: 0; cursor: pointer; }
.notice.tip { background: var(--greenbg); }
.scanbox { background: var(--soft); border-radius: 12px; padding: 10px; margin: 0 0 10px; display: grid; gap: 6px; }
.mrow { border: 1px solid var(--line); border-radius: 10px; padding: 6px; margin: 0 0 6px; display: grid; gap: 6px; background: #fff; }
.mgrid { display: grid; grid-template-columns: 1fr 64px 56px 56px; gap: 6px; }
.mgrid2 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.mrow input, .mrow select { min-width: 0; padding: 7px 8px; font-size: 14px; }

/* ---------- inget får hamna utanför skärmen ---------- */
html, body { overflow-x: hidden; }
main { overflow-x: clip; }
.btns > .btn, .btns > a.btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card, .box, .list, .grid2 > * { min-width: 0; max-width: 100%; }
input[type=date], input[type=datetime-local] { display: block; min-height: 40px; line-height: 40px; }
.steps { margin: 0 0 var(--gap); padding: 10px 12px 10px 34px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.steps li { margin: 4px 0 8px; font-size: 14px; line-height: 1.45; }
.steps li::marker { font-weight: 700; color: var(--green2); }
.info { border: 0; background: var(--soft); color: var(--green); border-radius: 50%; width: 26px; height: 26px; font-size: 14px; font-weight: 700; flex: none; cursor: pointer; font-family: Georgia, serif; font-style: italic; }
.sheet { max-height: 88dvh; overflow-y: auto; }
.ladder.pick li { cursor: pointer; border-radius: 8px; padding-left: 4px; } .ladder.pick li:active { background: var(--greenbg); }
.placemap { height: 180px; margin-top: 8px; } .leaflet-control-attribution { font-size: 10px; }
.policy { font-size: 14px; line-height: 1.5; } .policy ul { margin: 0; padding-left: 18px; } .policy li { margin: 3px 0; } .placebox summary { cursor: pointer; margin-top: 8px; color: var(--green2); }
.tile { position: relative; }
.tile.on { background: var(--greenbg); border-color: var(--green2); box-shadow: inset 0 0 0 1px var(--green2); }
.tile.on::after { content: '✓'; position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--green2); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.lvchips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.lvchips button { min-width: 30px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; cursor: pointer; padding: 0 6px; }
.lvchips button.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ===================== Tydligt och lättläst (äldre användare) ===================== */
:root { --muted: #565b54; --line: #d9d4c8; --gap: 12px; }
html, body { font-size: 17px; line-height: 1.45; }
h2 { font-size: 14px; color: #3f443e; margin: 22px 2px 8px; letter-spacing: .04em; }
h3 { font-size: 17px; }
.card h2, .sheet h2 { font-size: 20px; }
.small { font-size: 15px; }
.item { min-height: 60px; padding: 12px 14px; gap: 14px; }
.item b { font-size: 17px; }
.item .sub { font-size: 15px; }
.item .chev { font-size: 26px; color: #8c877b; }
.ico { font-size: 22px; }
.pill { font-size: 14px; padding: 2px 10px; }
.btn { height: 52px; font-size: 17px; border-radius: 12px; padding: 0 16px; }
.btn.small { height: 44px; font-size: 16px; padding: 0 14px; border-radius: 10px; }
.btn.ghost { height: 44px; font-size: 16px; min-width: 44px; }
.btn.secondary { border: 1px solid #d6d0c2; }
.linkbtn { font-size: 16px; padding: 10px 0; }
label { font-size: 15px; color: #3f443e; margin: 14px 0 6px; }
input, select, textarea { height: 50px; font-size: 17px; border-radius: 12px; border-color: #cfc9bb; }
textarea { min-height: 96px; }
input[type=checkbox] { width: 24px; height: 24px; }
.check { font-size: 17px; min-height: 44px; }
.tabs { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); padding: 4px; }
.tabs button { height: 44px; font-size: 15px; color: #3f443e; }
.chip { min-height: 42px; font-size: 16px; padding: 0 14px; }
.scale button { height: 46px; font-size: 17px; }
.tabbar a { font-size: 13px; padding: 8px 0 7px; }
.tabbar a span { font-size: 24px; filter: none; opacity: .55; }
.tabbar a.active span { opacity: 1; }
.tabbar a.active { color: var(--green); }
main { padding-bottom: calc(96px + var(--safe-b)); }
.topbar h1 { font-size: 20px; }
.iconbtn { font-size: 32px; width: 44px; height: 48px; }
.gear { font-size: 26px; width: 48px; }
.tile .nm { font-size: 14px; }
.tile { min-height: 86px; }
.dogtile b { font-size: 16px; }
.dogtile span { font-size: 14px; }
.stat b { font-size: 22px; }
.stat span { font-size: 13px; }
.notice { font-size: 16px; padding: 12px 14px; }
.toast { font-size: 17px; }
.bigbtns button { min-height: 72px; font-size: 30px; }
.decision button { min-height: 46px; font-size: 16px; }
.lvchips button { min-width: 44px; height: 44px; font-size: 16px; }
.mkgrid button { font-size: 13px; padding: 10px 2px 8px; }
.mkgrid button span { font-size: 26px; }
.msg { font-size: 17px; }
.chatbar input { height: 50px; }
.doghero .name { font-size: 30px; }
.doghero .meta { font-size: 15px; }
.greet { font-size: 16px; }
.empty, .card.center { font-size: 16px; }
.steps li { font-size: 16px; }
.policy { font-size: 16px; }
:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }
/* stor primärknapp på framsidan */
.bigaction { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px; font-size: 20px; border-radius: 16px; margin: 0 0 var(--gap); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 var(--gap); }
.quick a, .quick button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; font: inherit; font-size: 16px; font-weight: 650; color: var(--ink); cursor: pointer; text-align: center; padding: 8px; }
.quick span { font-size: 28px; }
.startguide .item b { font-size: 17px; }
.startguide .done b { text-decoration: line-through; color: var(--muted); }
.chatimg { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin: 2px 0 4px; cursor: pointer; background: var(--soft); min-height: 80px; }
.chatbar form { grid-template-columns: auto 1fr auto; }
.camb { width: 50px; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 24px; cursor: pointer; }

/* bilder och film */
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.mtile { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--soft); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.mtile img, .mtile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.mtile .play { position: absolute; inset: auto auto 6px 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 14px; }
.mtile.doc span { font-size: 30px; }
.mtile small { font-size: 12px; padding: 0 6px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mtile .mrm { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; min-height: 0; border-radius: 999px; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 15px; cursor: pointer; padding: 0; }
.mview { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; display: block; }
.ex .exmed { margin-top: 6px; }

/* klottervägg */
.wcard { padding: 12px; }
.wpost .wbody { margin: 6px 0 2px; white-space: normal; overflow-wrap: anywhere; font-size: 17px; }
.wpost a { color: inherit; text-decoration: none; }
.wrep { margin: 10px 0 0 22px; padding-left: 10px; border-left: 3px solid var(--soft); }
.whid { opacity: .5; }
.wreply { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 10px; }
.wreply input { margin: 0; min-width: 0; }
.manual summary span { font-size: 18px; font-weight: 600; }
.mstep { padding: 10px 2px; border-top: 1px solid var(--soft); }
.mstep p { margin: 4px 0 0; line-height: 1.5; }
details.fold { margin-bottom: 10px; }
details.fold > summary { min-height: 52px; display: flex; align-items: center; cursor: pointer; }
details.fold > summary small { display: block; font-weight: 400; font-size: 15px; margin-top: 2px; }
details.fold > summary span { font-size: 18px; font-weight: 600; }
details.fold > summary { height: auto; padding: 10px 0; }
details.fold > summary span { white-space: normal; }
.lvhead { all: unset; display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; min-height: 52px; box-sizing: border-box; }
.lvhead b { display: block; font-size: 17px; }
.lvnow { display: block; font-size: 15px; color: var(--ink); margin-top: 2px; }
.lvnow.none { color: var(--muted, #777); }
.lvbtn { flex: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 16px; background: var(--soft); }
.ladder.big li { font-size: 16px; padding: 12px 4px; min-height: 48px; align-items: center; }
.ladder.big .n { width: 30px; height: 30px; font-size: 15px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

/* ＋ knappen i nedre menyn */
.tabbar .plus { align-self: center; justify-self: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--green); color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.22); margin-top: -18px; cursor: pointer; display: grid; place-items: center; }
.tabbar .plus span { font-size: 30px; line-height: 1; font-weight: 300; }
.addlist .item { min-height: 56px; }
/* Underflikar */
.seg { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 12px; }
.seg button { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #d6d0c2; background: #fff; font: inherit; font-size: 15px; color: #3f443e; cursor: pointer; }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
