@charset "UTF-8";
/* Decroche brand (see app/static/brand): five colours on white, Figtree. */
:root {
  --bg: #ffffff;
  --surface: #f3f9fa;
  --card: #ffffff;
  --ink: #101820;          /* body text */
  --muted: #486d76;        /* secondary text, 5.6:1 on white */
  --line: #cfe6ea;         /* 1px borders */
  --line-soft: #e6f1f3;    /* grid lines */
  --brand: #0a8aa2;        /* logo, main button (white label >= 19px bold) */
  --brand-dark: #0b3c49;   /* titles, links, active state */
  --brand-bright: #1ab8cf; /* accent, today, dots (decor only on white) */
  --brand-soft: #e0fbfc;   /* light backgrounds, selection */
  --accent: var(--brand-dark);
  --accent-soft: var(--brand-soft);
  --ok: #17734a;
  --ok-soft: #e6f4ec;
  --warn: #8a5300;
  --warn-soft: #fff4e0;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --radius: 16px;
  --tabbar: 66px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h2 { font-size: 1.6rem; font-weight: 800; color: var(--brand-dark); letter-spacing: -.01em; margin: 4px 0 12px; }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); margin: 20px 0 8px; }
a { color: var(--brand-dark); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.error { color: var(--danger); min-height: 1.2em; margin: 6px 0; font-size: .92rem; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; }
.logo-lg { font-size: 2rem; margin-bottom: 4px; }
.logo-lg img { width: 46px; height: 46px; }

/* Login */
.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px 22px; }

/* Layout */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo { width: 36px; height: 36px; }
.salon-name { font-weight: 800; font-size: 1.1rem; color: var(--brand-dark); }
.mode-pill { border: 0; border-radius: 999px; padding: 2px 10px; margin-top: 2px; font-size: .8rem; font-weight: 700; }
.mode-ia { background: var(--brand-dark); color: #fff; }
.mode-mixte { background: var(--brand-soft); color: var(--brand-dark); }
.mode-humain { background: #edf1f2; color: var(--ink); }
.bell { position: relative; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--brand-dark); border-radius: 50%; width: 44px; height: 44px; }
.bell .ico { width: 22px; height: 22px; }
.badge { position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 6px; }
main { padding: 14px 16px calc(var(--tabbar) + var(--safe-bottom) + 24px); max-width: 1100px; margin: auto; overflow-x: clip; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tabbar) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
.tabbar button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .78rem; font-weight: 500; color: var(--muted); }
.tabbar button.active { color: var(--brand-dark); font-weight: 800; }
.tabbar button.active .ico { stroke-width: 2.2; }
.dot { position: absolute; top: 9px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }

.live-banner, .auto-banner { margin: 10px 16px 0; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; }
.live-banner { background: var(--brand-dark); color: #fff; display: flex; align-items: center; gap: 10px; }
.live-banner::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-bright); animation: pulse 1.2s infinite; flex: none; }
.auto-banner { background: var(--warn-soft); color: var(--warn); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
@keyframes pulse { 50% { opacity: .25; } }

/* Generic */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.btn { border: 1px solid transparent; border-radius: 14px; padding: 11px 16px; background: var(--surface); color: var(--brand-dark); font-weight: 700; }
.btn.primary { background: var(--brand); color: #fff; font-size: 1.1rem; padding: 12px 20px; }       /* white on #0A8AA2: >= 19px bold */
.btn.small.primary, .btn.primary.compact { background: var(--brand-dark); font-size: .9rem; padding: 8px 13px; } /* small = dark teal for contrast */
.btn.ghost { background: #fff; border-color: var(--brand); color: var(--brand-dark); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn:active { transform: scale(.98); }
label { display: block; font-size: .9rem; color: var(--muted); font-weight: 500; margin: 12px 0 0; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input[type=checkbox] { display: inline-block; width: 22px; height: 22px; margin: 0; accent-color: var(--brand-dark); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 11px; font-size: .95rem; font-weight: 600; color: var(--brand-dark); }
.seg button.active { background: var(--brand-dark); color: #fff; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #edf1f2; color: var(--ink); }
.tag.ia { background: var(--brand-soft); color: var(--brand-dark); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-weight: 600; margin: 12px 0; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note .ico { width: 20px; height: 20px; margin-top: 1px; }

/* Agenda */
.agenda-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.agenda-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 12px; }
.agenda-nav .date-label { text-align: center; font-weight: 800; font-size: 1.2rem; color: var(--brand-dark); }
.agenda-nav .date-label::first-letter { text-transform: uppercase; }
.agenda-nav .hint { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.fab { position: fixed; z-index: 15; right: 16px; bottom: calc(var(--tabbar) + var(--safe-bottom) + 16px); width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 2rem; font-weight: 500; line-height: 1; box-shadow: 0 6px 18px #0b3c4940; }
.fab:active { transform: scale(.94); }
.icon-btn { display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--brand-dark); width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.closed-note { background: var(--surface); color: var(--muted); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: .92rem; }
.day-grid { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-head { position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 4px; font-weight: 800; font-size: .9rem; text-align: center; }
.time-col { position: relative; border-right: 1px solid var(--line-soft); }
.time-col div { position: absolute; right: 5px; font-size: .75rem; font-weight: 600; color: var(--muted); transform: translateY(-50%); }
.staff-col { position: relative; border-right: 1px solid var(--line-soft); background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px var(--hour)); }
.staff-col:last-child { border-right: 0; }
.staff-col.today { background-color: #f2fdfd; }
.bk { position: absolute; z-index: 1; left: 2px; right: 2px; border-radius: 10px; padding: 4px 6px; font-size: .75rem; line-height: 1.2; overflow: hidden; border-left: 4px solid; cursor: pointer; }
.bk b { display: block; font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bk.flash { animation: flash 1s ease 3; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--brand-bright); } }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--brand); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.grid-scroll { overflow-x: auto; border-radius: var(--radius); }
.off-hours { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #e0fbfc 0 6px, transparent 6px 12px); pointer-events: none; }

/* Staff filter chips */
.staff-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip.off { opacity: .45; }
.chip.off i { background: transparent; border: 2px solid var(--c); }

/* Week view (one column per day, like Google Calendar) */
.week-grid { grid-template-columns: 44px repeat(7, minmax(44px, 1fr)); }
.week-head { border: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; font-weight: 500; color: var(--muted); }
.week-head span { font-size: .82rem; }
.week-head b { font-size: 1.2rem; font-weight: 700; color: var(--ink); width: 36px; height: 36px; line-height: 36px; border-radius: 50%; }
.week-head.today b { background: var(--brand-dark); color: #fff; }
.week-head.closed b { color: var(--muted); }
.week-grid .bk { padding: 3px 5px; }

/* Month view */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.m-head { background: var(--card); text-align: center; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 8px 0; }
.m-cell { background: var(--card); min-height: 108px; padding: 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; overflow: hidden; position: relative; }
.m-cell.other .m-day { color: #9db3b8; font-weight: 500; }
.m-cell.closed:not(.other) { background: #f4fdfd; }
.m-cell.selected { background: var(--brand-soft); }
.m-day { align-self: center; font-size: .92rem; font-weight: 700; min-width: 30px; height: 26px; line-height: 26px; padding: 0 6px; text-align: center; border-radius: 999px; margin-bottom: 2px; }
.m-day.today { background: var(--brand-dark); color: #fff; }
.m-chip { display: flex; align-items: center; gap: 5px; font-size: .78rem; padding: 2px 6px; border-radius: 7px; background: var(--soft); white-space: nowrap; overflow: hidden; }
.m-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.m-chip span { overflow: hidden; text-overflow: ellipsis; }
.m-chip.flash { animation: flash 1s ease 3; }
.m-more { font-size: .76rem; font-weight: 700; color: var(--muted); padding-left: 5px; }
.m-count { display: none; }
.day-list { margin-top: 16px; }
.day-list .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.day-list .head b { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.day-list .head b::first-letter { text-transform: uppercase; }
.day-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.day-item i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.day-item .t { font-weight: 800; width: 52px; }
.day-item .w { flex: 1; min-width: 0; }

/* Phones: compact month (colour bars + count) and tighter week */
@media (max-width: 600px) {
  .m-cell { min-height: 70px; padding: 4px 3px; gap: 3px; }
  .m-chip { height: 5px; padding: 0; border-radius: 3px; background: var(--c); flex: none; pointer-events: none; }
  .m-chip i, .m-chip span { display: none; }
  .m-more { font-size: .68rem; text-align: center; padding: 0; }
  .week-grid { grid-template-columns: 34px repeat(7, minmax(38px, 1fr)); }
  .week-grid .bk { padding: 2px 3px; border-left-width: 3px; border-radius: 7px; }
  .week-grid .bk b { font-size: .68rem; white-space: normal; line-height: 1.15; }
  .week-grid .bk .who { display: none; }
  .week-head b { font-size: 1.05rem; width: 30px; height: 30px; line-height: 30px; }
  .agenda-nav .date-label { font-size: 1.1rem; }
  .agenda-bar { gap: 6px; }
  .agenda-bar .seg button { padding: 6px 9px; font-size: .9rem; }
  .agenda-bar .btn.small { padding: 7px 9px; font-size: .85rem; }
}

/* Mode */
.mode-btn { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.mode-btn .mi { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); }
.mode-btn .mi img { width: 30px; height: 30px; }
.mode-btn .mi .ico { width: 28px; height: 28px; }
.mode-btn .mt { flex: 1; }
.mode-btn strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--brand-dark); margin-bottom: 3px; }
.mode-btn .mt span { color: var(--muted); }
.mode-btn .radio { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brand); color: #fff; }
.mode-btn .radio .ico { width: 16px; height: 16px; stroke-width: 3; visibility: hidden; }
.mode-btn.active { border-color: var(--brand); background: var(--brand-soft); }
.mode-btn.active .mi { background: var(--brand); color: #fff; }
.mode-btn.active .radio { background: var(--brand-dark); border-color: var(--brand-dark); }
.mode-btn.active .radio .ico { visibility: visible; }

/* Lists */
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.item.done { opacity: .55; }
.item .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.item .title { font-weight: 700; }
.item details { margin-top: 8px; }
.item pre { white-space: pre-wrap; font-family: inherit; font-size: .88rem; background: var(--surface); padding: 10px; border-radius: 10px; margin: 6px 0 0; }
.menu a { display: flex; justify-content: space-between; padding: 16px; background: var(--card); border-radius: var(--radius); margin-bottom: 8px; color: var(--brand-dark); text-decoration: none; font-weight: 700; border: 1px solid var(--line); }

/* Minutes & report */
.gauge { height: 16px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.gauge div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.gauge div.warn { background: #c98a00; }
.gauge div.full { background: var(--danger); }
.big { font-size: 2.2rem; font-weight: 800; color: var(--brand-dark); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .v { font-size: 1.7rem; font-weight: 800; color: var(--brand-dark); }
.kpi .l { font-size: .85rem; color: var(--muted); }
.kpi.wide { grid-column: span 2; background: var(--brand-soft); border-color: var(--brand-soft); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
td, th { padding: 7px 4px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.svc-row { display: grid; grid-template-columns: 1fr 64px 70px auto; gap: 6px; align-items: end; margin-bottom: 8px; }
.svc-row input { padding: 9px 8px; }
.hours-row { display: grid; grid-template-columns: 92px 28px 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.hours-row input[type=time] { padding: 8px 6px; margin: 0; }

/* Modal & toasts */
.modal { position: fixed; inset: 0; z-index: 50; background: #10182066; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px 16px calc(18px + var(--safe-bottom)); }
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar) + var(--safe-bottom) + 10px); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--brand-dark); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: .95rem; font-weight: 600; max-width: 520px; box-shadow: 0 6px 18px #0b3c4933; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

@media (min-width: 760px) {
  .modal { align-items: center; }
  .sheet { border-radius: 22px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .kpi.wide { grid-column: span 2; }
}

/* Enquête (shop questionnaire) */
.actions3 { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0 16px; }
.action { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.action .ico { grid-row: span 2; width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.action b { font-size: 1.1rem; color: var(--brand-dark); }
.action span { font-size: .9rem; color: var(--muted); }
.gain-line { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: .95rem; }
.back { display: inline-block; margin-bottom: 6px; color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.sv-form h3 { margin-top: 26px; padding-bottom: 6px; border-bottom: 2px solid var(--brand-soft); }
.q { display: block; border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.ql { display: block; font-weight: 700; color: var(--ink); font-size: 1rem; margin-bottom: 7px; padding: 0; }
.ql i { font-weight: 500; color: var(--muted); font-style: normal; font-size: .85rem; }
label.q { margin: 0 0 16px; color: var(--ink); font-size: 1rem; }
.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opt { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.opt input[type=radio], .opt input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand-dark); font-weight: 600; font-size: .95rem; cursor: pointer; user-select: none; }
.opt input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt.other { flex-wrap: wrap; }
.opt.other input[type=text] { width: 170px; margin: 0; padding: 8px 10px; font-size: 15px; }
.opts.scale .opt span { width: 46px; text-align: center; padding: 9px 0; }
.scale-labels { display: flex; justify-content: space-between; max-width: 265px; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.num { display: flex; align-items: center; gap: 8px; max-width: 180px; }
.num input { margin: 0; }
.num b { color: var(--brand-dark); }
.gain-card { position: sticky; bottom: calc(var(--tabbar) + var(--safe-bottom) + 8px); margin: 18px 0 10px; padding: 12px 14px; border-radius: 16px; background: var(--brand-dark); color: #fff; font-size: 1rem; z-index: 3; }
.gain-card .muted { color: #b9d9df; }
.gain-card b { color: #fff; }
.sv-privacy { font-size: .85rem; color: var(--muted); margin-top: 18px; }
@media (min-width: 760px) { .actions3 { grid-template-columns: repeat(3, 1fr); } }

/* Field team: only the Terrain tab, no owner controls */
.field-only { display: none; }
body.field .field-only { display: grid; }
body.field #bell, body.field #mode-pill, body.field #auto-banner, body.field #live-banner { display: none !important; }
body.field .tabbar { display: none; }
body.field main { padding-bottom: calc(var(--safe-bottom) + 24px); }
body.field .gain-card { bottom: 8px; }

/* Terrain: shops to visit */
.terrain-seg { display: flex; width: 100%; margin-bottom: 14px; }
.terrain-seg a { flex: 1; text-align: center; padding: 9px 10px; border-radius: 11px; font-weight: 700; color: var(--brand-dark); text-decoration: none; }
.terrain-seg a.active { background: var(--brand-dark); color: #fff; }
.terrain-bar { display: grid; grid-template-columns: 150px 1fr; gap: 8px; margin-bottom: 10px; }
.terrain-bar select, .terrain-bar input { margin: 0; }
.filter-seg { display: flex; width: 100%; margin-bottom: 8px; }
.filter-seg button { flex: 1; }
.shop-group { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shop-group summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; background: var(--surface); cursor: pointer; list-style: none; }
.shop-group summary::-webkit-details-marker { display: none; }
.shop-group summary b { font-size: 1.1rem; color: var(--brand-dark); }
.shop { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.shop.done .shop-name { color: var(--muted); }
.tick { position: relative; flex: none; margin: 2px 0 0; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--brand); border-radius: 9px; background: #fff; cursor: pointer; }
.tick input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); }
.tick input:checked + span::after { content: ""; width: 8px; height: 14px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.tick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.shop-body { flex: 1; min-width: 0; }
.shop-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.shop-meta { font-size: .9rem; color: var(--muted); margin: 2px 0 6px; }
.shop-meta a { color: var(--muted); }
.shop-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-tags a.tag { text-decoration: none; color: var(--brand-dark); }
.tag.hot { background: var(--brand-dark); color: #fff; }
.opt-btn { border: 1.5px solid var(--line); background: #fff; color: var(--brand-dark); border-radius: 999px; padding: 8px 13px; font-weight: 600; }
.opt-btn.active { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.tri { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tri span { flex: 1; font-weight: 600; }
.tri button { border: 1.5px solid var(--line); background: #fff; color: var(--brand-dark); border-radius: 10px; padding: 7px 13px; font-weight: 700; }
.tri button.active { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.big-code { font-size: 2.6rem; font-weight: 800; letter-spacing: .3em; text-align: center; color: var(--brand-dark); background: var(--brand-soft); border-radius: 16px; padding: 14px; margin: 12px 0; }
.verify { border-color: var(--brand); background: #f6feff; margin-top: 16px; }
.verify .btn { margin-top: 10px; }
@media (max-width: 420px) { .terrain-bar { grid-template-columns: 1fr; } }
.view-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }
.near-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: var(--surface); }
.near-head b { font-size: 1.1rem; color: var(--brand-dark); }
.dist { font-size: .82rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.shop-map { position: relative; isolation: isolate; height: 64vh; min-height: 340px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); margin: 8px 2px 12px; }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.map-legend i.me { background: #2563eb; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { margin: 12px 14px; font-size: .92rem; line-height: 1.4; }
.pop b { font-size: 1.05rem; color: var(--brand-dark); }
.pop .btn { text-decoration: none; }

/* Calendar swipe */
#agenda-body { touch-action: pan-y; will-change: transform; }
.slide-from-right { animation: slide-from-right .22s ease-out; }
.slide-from-left { animation: slide-from-left .22s ease-out; }
@keyframes slide-from-right { from { transform: translateX(35%); opacity: 0; } }
@keyframes slide-from-left { from { transform: translateX(-35%); opacity: 0; } }
