@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-sans.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
}

:root {
  --teal: #009e7a;
  --teal-dark: #007a60;
  --teal-soft: #e3f3ee;
  --blue: #1e6fa8;
  --blue-soft: #e8f1f8;
  --navy: #1f2d5c;
  --ink: #1c2333;
  --muted: #566074;
  --cream: #faf6f0;
  --sand: #f1e8dc;
  --line: #e4dcd0;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(31, 45, 92, 0.1);
  --grad: linear-gradient(135deg, #1e6fa8, #0f8e95, #14a57d);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", "Segoe UI", sans-serif;
  --danger: #8c4636;
  --warn: #7a5520;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #e6dccf;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: inherit; }

#app { min-height: 100dvh; display: flex; justify-content: center; }
.app {
  width: min(430px, 100%);
  height: 100dvh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (max-width: 430px) {
  body { background: var(--cream); }
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(31, 45, 92, 0.12); }
}

.banner {
  flex: none;
  background: var(--sand);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 7px 12px 6px;
}
.grad { flex: none; height: 3px; background: var(--grad); }

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 6px 12px;
  min-height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy);
}
.brand img { height: 46px; width: auto; display: block; }
.brand span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--navy);
  color: var(--cream);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  text-decoration: none;
  padding: 0;
}

main {
  flex: 1;
  overflow: auto;
  padding: 6px 18px 22px;
  scrollbar-width: none;
}
main::-webkit-scrollbar { display: none; }
main.main-login { padding: 0; display: flex; flex-direction: column; }

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
h1, .h1 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 2px 0 0;
}
.screen-title { font-size: 34px; margin: 2px 0 14px; }
.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}
.section-label {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px 28px;
}
.login-logo {
  width: 188px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}
.login-sello {
  text-align: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.roles { display: flex; flex-direction: column; gap: 10px; }
.role {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px;
  color: var(--ink);
}
.role.is-on {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 0 0 3px rgba(0, 158, 122, 0.12);
}
.role-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--navy);
}
.role.is-on .role-mark { background: var(--white); color: var(--teal-dark); }
.role strong { display: block; font-size: 15px; line-height: 1.25; }
.role small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  color: transparent;
  background: var(--white);
}
.role.is-on .tick { background: var(--teal); border-color: var(--teal); color: white; }

.who { display: flex; gap: 8px; margin-top: 12px; }
.who p { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--navy); width: 100%; }
.fields { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--navy); }
input, select, textarea {
  width: 100%;
  background: var(--sand);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  background: var(--white);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 158, 122, 0.15);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231F2D5C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  background-color: var(--sand);
}
.hint {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.form-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 15.5px;
  width: 100%;
  text-decoration: none;
}
.btn-gradient { background: var(--grad); color: white; margin-top: 14px; }
.btn-primary { background: var(--teal); color: white; }
.btn-primary:active { background: var(--teal-dark); }
.btn-line { background: var(--white); color: var(--teal-dark); border-color: var(--teal); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-quiet {
  width: auto;
  min-height: 40px;
  padding: 0 12px;
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
  font-size: 13.5px;
}
.btn-text {
  width: auto;
  min-height: 36px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 14px;
}
.btn-danger { background: var(--navy); color: white; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.hello { margin-bottom: 8px; }
.hello h1 { font-size: 32px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.hero, .card, .note, .cal-body, .vcard, .staff, .patient, .req, .stat, .orders, .paper, .privacy {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hero { overflow: hidden; box-shadow: var(--shadow); }
.hero-bar { height: 6px; background: var(--grad); }
.hero-body { padding: 12px 16px 14px; }
.hero h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 40px;
  line-height: 0.95;
  color: var(--navy);
  margin: 2px 0 6px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 700;
}
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.date-line { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }

.note { padding: 11px 14px; margin-top: 6px; }
.note h3 { margin: 0 0 3px; font-size: 15.5px; }
.note p { margin: 0; color: var(--muted); font-size: 14px; }
.note time { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }

.weeknav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.weeknav strong { display: block; text-align: center; color: var(--navy); font-size: 15px; }
.weeknav em { display: block; text-align: center; color: var(--muted); font-style: normal; font-size: 12px; font-weight: 700; }
.iconbtn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  display: grid;
  place-items: center;
  padding: 0;
}

.cal { display: grid; grid-template-columns: 54px 1fr; gap: 10px; margin-bottom: 10px; }
.cal-date {
  height: 58px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cal-date span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-date strong {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--navy);
  font-weight: 600;
}
.cal-date.is-today { background: var(--navy); border-color: var(--navy); }
.cal-date.is-today span, .cal-date.is-today strong { color: white; }
.cal-body { padding: 12px 12px; }
.cal-body h3 { margin: 0; font-size: 16px; }
.cal-body p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.libre { margin: 0; color: var(--muted); padding: 16px 4px; font-weight: 700; }

.chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 2px 0 12px; }
.daychip {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  padding: 6px 0 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.daychip span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.daychip strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.daychip.is-on { background: var(--navy); border-color: var(--navy); }
.daychip.is-on span, .daychip.is-on strong { color: white; }
.chip {
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 12px;
}
.chip.is-on { background: var(--navy); border-color: var(--navy); color: white; }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice .chip { text-align: left; border-radius: 14px; padding: 12px; font-weight: 700; white-space: normal; }
.choice .chip small { display: block; color: var(--muted); font-size: 12.5px; }
.choice .chip.is-on small { color: rgba(255,255,255,.8); }

.shift {
  padding: 12px;
  margin-bottom: 10px;
}
.shift h3 { margin: 0; font-size: 16.5px; }
.shift .hours { margin: 2px 0 8px; color: var(--navy); font-weight: 800; font-size: 14px; }
.shift.is-open { background: #fbf6ee; border-color: #ead7bc; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
}
.pill-pend { background: #f4e7d4; color: var(--warn); }
.pill-ok { background: var(--teal-soft); color: var(--teal-dark); }
.pill-no { background: #f6e4de; color: var(--danger); }
.pill-live { background: var(--teal); color: white; }
.pill-soft { background: var(--sand); color: var(--navy); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }

.req { padding: 14px; margin-bottom: 10px; }
.req h3 { margin: 6px 0 2px; font-size: 16px; }
.req p { margin: 0; color: var(--muted); font-size: 14px; }
.req .who-line { color: var(--ink); font-weight: 800; margin-top: 2px; }
.req .btn-row { margin-top: 12px; }

.progress-card { padding: 14px; margin-bottom: 14px; }
.progress-card strong { font-family: var(--serif); font-size: 28px; color: var(--navy); font-weight: 600; }
.bar {
  height: 8px;
  background: var(--sand);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.bar span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: inherit;
}
.bar span.is-run { width: 72% !important; animation: play 14s linear; }
@keyframes play { from { width: 0; } to { width: 72%; } }

.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 8px;
}
.cat-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.cat-head span { color: var(--muted); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.vcard {
  display: flex;
  gap: 12px;
  padding: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  align-items: center;
}
.thumb {
  position: relative;
  width: 108px;
  height: 74px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
}
.thumb-pa { background: linear-gradient(145deg, #1e6fa8, #0f8e95); }
.thumb-he { background: linear-gradient(145deg, #0f8e95, #14a57d); }
.thumb-mo { background: linear-gradient(145deg, #1f2d5c, #1e6fa8); }
.thumb-hi { background: linear-gradient(145deg, #147a8c, #8fd0c0); }
.thumb .time {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,.94);
  color: var(--navy);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
}
.playbub { width: 32px; height: 32px; }
.vbody { min-width: 0; }
.vbody strong { display: block; font-size: 14.5px; line-height: 1.25; }
.vbody em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--muted); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0 0 8px;
  min-height: 36px;
}
.summary { color: var(--muted); margin: 8px 0 14px; }
.stage {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: var(--radius);
  background: var(--grad);
  color: white;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 0;
}
.stage b { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.stage .bar { position: absolute; left: 14px; right: 14px; bottom: 12px; background: rgba(255,255,255,.35); }
.stage .bar span { background: white; width: 0; }
.done-banner {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.stat {
  padding: 10px 8px 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-height: 84px;
}
button.stat { width: 100%; }
.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--navy);
  font-weight: 600;
}
.stat span { display: block; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--muted); line-height: 1.2; }
.stat.is-alert strong { color: var(--warn); }

.staff, .patient {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  align-items: center;
}
.patient { grid-template-columns: 1fr auto; }
.patient a, .staff .who { text-decoration: none; min-width: 0; }
.ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 14px;
}
.ava.admin { background: var(--blue-soft); color: var(--blue); }
.staff h3, .patient h3 { margin: 0; font-size: 16px; }
.staff p, .patient p { margin: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.staff.is-off { background: #f7f3ec; }
.tog { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; font-weight: 800; color: var(--teal-dark); }
.switch {
  width: 48px;
  height: 28px;
  border-radius: 99px;
  border: 0;
  background: #d5cdc2;
  position: relative;
  padding: 0;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(28, 35, 51, 0.2);
  transition: transform 0.18s ease;
}
.switch.is-on { background: var(--teal); }
.switch.is-on i { transform: translateX(20px); }
.archive {
  justify-self: end;
  align-self: center;
}

.orders { padding: 14px; background: linear-gradient(180deg, #f4f6fb, #fff 56px); }
.orders h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--navy);
  font-weight: 600;
}
.lockchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--navy);
  color: white;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
}
.lockchip .ico { width: 14px; height: 14px; }
.file {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}
.file-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--navy);
  display: grid;
  place-items: center;
  flex: none;
}
.file strong { display: block; font-size: 13.5px; word-break: break-word; }
.file small { color: var(--muted); font-weight: 700; }
.log { list-style: none; padding: 0; margin: 8px 0 0; }
.log li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.privacy {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-top: 14px;
  color: var(--navy);
  background: var(--teal-soft);
  border-color: transparent;
}
.privacy p { margin: 0; font-size: 14px; }
.profile-card { padding: 16px; display: flex; gap: 12px; align-items: center; }
.profile-card h2 { margin: 0; font-family: var(--serif); font-size: 30px; color: var(--navy); font-weight: 600; }
.profile-card p { margin: 2px 0 0; color: var(--muted); font-weight: 700; }
.bigava {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex: none;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 35, 51, 0.46);
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 18px;
}
.overlay.is-sheet { align-items: flex-end; padding: 0; }
.overlay.is-dialog { align-items: center; }
.dialog, .sheet {
  width: min(360px, 100%);
  background: var(--white);
  border-radius: 22px;
  padding: 18px 16px 16px;
}
.sheet {
  width: 100%;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 88%;
  overflow: auto;
}
.grab {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  margin: 4px auto 10px;
}
.dialog h2, .sheet h2 {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--navy);
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.05;
}
.dialog p, .sheet p { margin: 0 0 8px; color: var(--muted); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.map {
  height: 150px;
  border-radius: 16px;
  margin: 8px 0 12px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #e7f3ee, #e4eef6);
  border: 1px solid var(--line);
}
.map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 45, 92, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 45, 92, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}
.map-pin {
  position: absolute;
  left: 58%;
  top: 46%;
  transform: translate(-50%, -100%);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  font-size: 12px;
}
.map-pin .ico { width: 28px; height: 28px; }
.paper {
  padding: 16px;
  margin: 8px 0 12px;
  box-shadow: var(--shadow);
}
.paper h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 28px; color: var(--navy); font-weight: 600; }
.paper p { margin: 0 0 4px; color: var(--ink); font-size: 14.5px; }
.lines { margin: 12px 0; }
.lines i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: var(--sand);
  margin-bottom: 8px;
}
.lines i:nth-child(2) { width: 92%; }
.lines i:nth-child(3) { width: 80%; }
.lines i:nth-child(4) { width: 88%; }
.fine { color: var(--muted) !important; font-size: 12.5px !important; margin-top: 8px !important; }

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 78px;
  background: var(--navy);
  color: white;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
  font-weight: 700;
  z-index: 40;
  font-size: 14.5px;
}
.toast.toast-low { bottom: 18px; }

.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(250, 246, 240, 0.96);
  border-top: 1px solid var(--line);
  padding: 4px 2px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  padding: 6px 1px 4px;
  min-height: 52px;
}
.tab.is-active { color: var(--teal-dark); }
.tab .ico { width: 22px; height: 22px; }
.badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--teal);
  color: white;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.ico { width: 22px; height: 22px; display: block; flex: none; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.noscript { padding: 24px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}
