:root {
  color-scheme: light;
  --bg: #dde2e8;
  --panel: #ffffff;
  --ink: #101826;
  --muted: #435066;
  --line: #9ca8b8;
  --brand: #082d5f;
  --brand-strong: #031a3a;
  --brand-soft: #e4eaf2;
  --danger: #9d2f28;
  --danger-deep: #681d19;
  --danger-bg: #f5e7e5;
  --gold: #9e8138;
  --shadow: 0 14px 30px rgba(7, 18, 38, 0.14);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #cfd7e1 0, rgba(207, 215, 225, 0) 300px),
    linear-gradient(135deg, rgba(3, 26, 58, 0.11), rgba(16, 24, 38, 0.05)),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 12px max(34px, env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: block;
  padding: 8px 0 12px;
  background: linear-gradient(180deg, rgba(220, 232, 247, 0.98) 0, rgba(220, 232, 247, 0.94) 70%, rgba(220, 232, 247, 0) 100%);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.2;
  text-align: center;
}

.admin-topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 10px;
  align-items: center;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(9, 31, 63, 0.08);
}

.topbar .icon-button:last-child {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  border-color: rgba(255, 255, 255, 0.22);
}

.icon-button svg,
.card-icon svg,
.round-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.view {
  display: none;
  animation: rise 180ms ease;
}

.view.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 8px;
}

.police-notice {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 45, 94, 0.98), rgba(18, 81, 160, 0.96)),
    radial-gradient(circle at 84% 18%, rgba(205, 164, 75, 0.36), transparent 26%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.notice strong,
.notice span {
  display: block;
  line-height: 1.45;
}

.notice strong {
  font-size: 22px;
}

.police-notice span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
}

.text-button {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
}

.text-button.hot {
  color: #fff;
  background: linear-gradient(180deg, #cf4a3d, var(--danger-deep));
  box-shadow: 0 12px 24px rgba(158, 43, 34, 0.18);
}

.dial-panel {
  display: grid;
  width: 100%;
  min-height: 116px;
  margin-top: 6px;
  padding: 18px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, #06447f 0, var(--brand) 58%, #0a6abe 100%),
    linear-gradient(90deg, rgba(205, 164, 75, 0.24), transparent 42%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 20px 34px rgba(6, 59, 120, 0.2);
}

.dial-panel span {
  font-size: 20px;
  font-weight: 700;
}

.dial-panel strong {
  color: #fff8da;
  font-size: 42px;
  line-height: 1.05;
}

.station-intro-card {
  display: grid;
  gap: 0;
  margin-top: 6px;
  overflow: hidden;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.station-photo {
  display: block;
  width: 100%;
  min-height: 290px;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: center;
  background: linear-gradient(135deg, rgba(6, 59, 120, 0.96), rgba(9, 87, 168, 0.86));
}

.station-intro-copy {
  padding: 15px 16px 16px;
}

.station-intro-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1.3;
}

.station-intro-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.home-call-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.home-call-card {
  display: grid;
  min-height: 106px;
  gap: 7px;
  place-content: center;
  padding: 14px 10px;
  color: var(--brand-strong);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.home-call-card.alarm {
  color: #fff;
  background:
    linear-gradient(135deg, #06447f 0, var(--brand) 64%, #0a6abe 100%),
    radial-gradient(circle at 88% 14%, rgba(205, 164, 75, 0.34), transparent 30%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 32px rgba(6, 59, 120, 0.18);
}

.home-call-card span {
  font-size: 18px;
  font-weight: 800;
}

.home-call-card strong {
  color: inherit;
  font-size: clamp(22px, 6.2vw, 31px);
  line-height: 1.1;
}

.grid-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.module-card {
  display: flex;
  min-height: 106px;
  flex-direction: row;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  padding: 17px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.module-card.priority {
  min-height: 106px;
  color: var(--danger-deep);
  background: #fff5f3;
  border-color: #efbbb4;
  box-shadow: 0 14px 28px rgba(158, 43, 34, 0.08);
}

.card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 8px;
}

.module-card.priority .card-icon {
  color: var(--danger-deep);
  background: rgba(201, 66, 53, 0.12);
}

.module-card strong {
  display: block;
}

.module-card strong {
  font-size: 22px;
  line-height: 1.28;
}

.module-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.module-card.priority small {
  color: #7a3b35;
}

.button-row.single {
  grid-template-columns: 1fr;
}

.consult-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.consult-summary span {
  padding: 8px 12px;
  color: var(--brand-strong);
  background: rgba(9, 87, 168, 0.08);
  border: 1px solid rgba(9, 87, 168, 0.14);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}

.form-card,
.quiet-panel,
.service-detail,
.chat-box,
.station-card,
.officer-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.form-card label {
  display: block;
  margin-bottom: 14px;
}

.form-card label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.field-hint {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

input,
textarea,
select {
  width: 100%;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

input,
select {
  height: 54px;
  padding: 0 13px;
  font-size: 17px;
}

textarea {
  min-height: 116px;
  padding: 12px;
  font-size: 17px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 77, 157, 0.14);
}

.location-box,
.image-preview {
  margin: 8px 0 14px;
  padding: 12px;
  color: var(--muted);
  background: #f5f9fe;
  border: 1px dashed #b7cade;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.55;
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.primary-button,
.secondary-button,
.ghost-button {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
}

.primary-button.danger {
  background: linear-gradient(180deg, #cf4a3d, var(--danger-deep));
}

.secondary-button {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
}

.secondary-button.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  border-color: transparent;
}

.ghost-button {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.view-back {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 9px 14px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.hotline-button {
  margin-top: 10px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 14px 26px rgba(6, 59, 120, 0.16);
}

.quiet-panel {
  margin-top: 12px;
}

.quiet-panel h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.quiet-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.quiet-view {
  min-height: calc(100vh - 86px);
  padding-top: 16vh;
  color: #cfd7d4;
  background: linear-gradient(180deg, #11191f 0, #0d1318 100%);
  border-radius: 8px;
}

.quiet-status {
  padding: 18px;
  text-align: center;
}

.quiet-status span {
  color: #8c9794;
  font-size: 16px;
}

.quiet-status strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 42px;
}

.quiet-status p {
  max-width: 300px;
  margin: 12px auto 0;
  color: #8c9794;
  line-height: 1.6;
}

.quiet-actions {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-top: 28px;
}

.round-action {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: #d9e3df;
  background: #182229;
  border: 1px solid #2b3a45;
  border-radius: 50%;
}

.round-action.danger {
  color: #fff;
  background: #8f251b;
  border-color: #bc4c40;
}

.round-action.recording {
  background: #d94848;
  box-shadow: 0 0 0 9px rgba(217, 72, 72, 0.16);
}

.chat-box {
  height: 430px;
  overflow: auto;
}

.chat-box.floating {
  height: min(44vh, 360px);
  box-shadow: none;
}

.message {
  max-width: 86%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.55;
}

.message.bot {
  color: var(--ink);
  background: #eef5fd;
}

.message.user {
  margin-left: auto;
  color: #fff;
  background: var(--brand);
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  margin-top: 10px;
}

.chat-input button {
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-size: 17px;
}

.quick-questions,
.service-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-questions button,
.service-tabs button {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: var(--brand-strong);
  white-space: nowrap;
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  font-size: 16px;
}

.service-tabs button.active {
  color: #fff;
  background: var(--brand);
}

.service-detail {
  margin-top: 12px;
}

.service-detail h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.service-detail h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.service-detail ul,
.service-detail ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.75;
  font-size: 17px;
}

.avatar {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
}

.station-card {
  display: grid;
  gap: 8px;
}

.contact-note,
.fraud-card,
.fraud-poster {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.contact-note {
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(9, 87, 168, 0.08), rgba(205, 164, 75, 0.12));
}

.contact-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.contact-note p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.station-card strong {
  font-size: 23px;
}

.station-card span,
.station-card p {
  color: var(--muted);
  font-size: 17px;
}

.station-card p {
  margin: 0;
  line-height: 1.6;
}

.station-card .text-button {
  width: 100%;
  margin-top: 4px;
}

.phone-grid {
  display: grid;
  gap: 10px;
}

.phone-card,
.map-card,
.select-card,
.elder-safe-card,
.quiz-card,
.video-panel,
.safety-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.phone-card {
  display: grid;
  gap: 10px;
}

.phone-card.hot {
  color: #fff;
  background:
    linear-gradient(135deg, #06447f 0, var(--brand) 60%, #0a6abe 100%),
    radial-gradient(circle at 90% 10%, rgba(205, 164, 75, 0.36), transparent 28%);
  border-color: rgba(255, 255, 255, 0.18);
}

.phone-card span,
.map-card span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.phone-card.hot span {
  color: rgba(255, 255, 255, 0.86);
}

.phone-card strong {
  font-size: 34px;
  line-height: 1.05;
}

.map-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.map-card strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
}

.map-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.select-card {
  display: block;
  margin-bottom: 12px;
}

.select-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.officer-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.officer-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.officer-card.featured {
  align-items: stretch;
  margin-bottom: 12px;
}

.officer-photo {
  display: grid;
  width: 96px;
  min-height: 132px;
  flex: 0 0 96px;
  place-items: center;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(9, 87, 168, 0.95), rgba(6, 59, 120, 0.98)),
    linear-gradient(135deg, rgba(205, 164, 75, 0.26), transparent);
  border-radius: 8px;
  box-shadow: inset 0 -20px 36px rgba(0, 0, 0, 0.12);
}

.officer-photo span {
  font-size: 42px;
  font-weight: 900;
}

.officer-photo small {
  margin-top: -20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.officer-card.compact .officer-line {
  margin-bottom: 12px;
}

.officer-body {
  min-width: 0;
  flex: 1;
}

.officer-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.officer-head h2 {
  margin: 0;
  font-size: 23px;
}

.officer-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.officer-line strong {
  color: var(--ink);
  font-size: 16px;
}

.assist-contact {
  display: grid;
  gap: 8px;
}

.assist-contact article {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: rgba(9, 87, 168, 0.05);
  border: 1px solid rgba(9, 87, 168, 0.1);
  border-radius: 8px;
}

.assist-contact strong,
.assist-contact span,
.assist-contact button {
  font-size: 16px;
}

.assist-contact span {
  color: var(--muted);
}

.assist-contact button {
  color: var(--brand-strong);
  background: transparent;
  font-weight: 800;
}

.tag {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 8px;
  font-size: 14px;
}

.poster-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fraud-poster {
  min-height: 132px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 45, 94, 0.98), rgba(12, 101, 147, 0.96)),
    linear-gradient(90deg, rgba(205, 164, 75, 0.22), transparent 36%);
}

.fraud-poster strong,
.fraud-poster span {
  display: block;
}

.fraud-poster strong {
  font-size: 24px;
}

.fraud-poster span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.5;
}

.fraud-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.fraud-card h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.fraud-card p,
.fraud-card li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.fraud-card p {
  margin: 0;
}

.fraud-card ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.fraud-case {
  margin-top: 12px;
  padding: 12px;
  color: var(--ink);
  background: rgba(201, 66, 53, 0.08);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.elder-safe-card {
  margin-bottom: 12px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 45, 94, 0.98), rgba(18, 81, 160, 0.96)),
    radial-gradient(circle at 88% 18%, rgba(205, 164, 75, 0.35), transparent 28%);
  border-color: rgba(255, 255, 255, 0.16);
}

.elder-safe-card strong {
  display: block;
  font-size: 25px;
}

.elder-safe-card p {
  margin: 10px 0 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.6;
}

.quiz-card {
  margin-bottom: 12px;
}

.quiz-card h2,
.video-panel h2,
.safety-card h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.quiz-card p,
.video-panel p,
.safety-card p,
.safety-card li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.quiz-options button {
  min-height: 56px;
  padding: 12px 14px;
  color: var(--brand-strong);
  text-align: left;
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 800;
}

.quiz-result {
  padding: 12px;
  color: var(--muted);
  background: #f5f9fe;
  border: 1px dashed #b7cade;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.quiz-result strong,
.quiz-result span {
  display: block;
}

.quiz-result.right {
  color: #1e5d36;
  background: #eef9f1;
  border-color: #b9dfc4;
}

.quiz-result.wrong {
  color: var(--danger-deep);
  background: var(--danger-bg);
  border-color: #efbbb4;
}

.quiz-result button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.video-panel {
  margin-bottom: 12px;
}

.video-placeholder {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 18px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(6, 59, 120, 0.94), rgba(15, 91, 161, 0.9)),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.18), transparent 30%);
  border-radius: 8px;
}

.video-placeholder span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--brand-strong);
  background: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.video-placeholder strong {
  margin-top: 12px;
  font-size: 18px;
}

.safety-grid {
  display: grid;
  gap: 10px;
}

.safety-card {
  position: relative;
  overflow: hidden;
}

.safety-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

.safety-card ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 18px;
  left: 16px;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  color: #fff;
  text-align: center;
  background: rgba(11, 22, 38, 0.92);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard article,
.ledger-item {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(12, 32, 58, 0.06);
}

.dashboard span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard strong {
  display: block;
  margin-top: 5px;
  color: var(--brand-strong);
  font-size: 30px;
  line-height: 1;
}

.ledger-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.ledger-list {
  display: grid;
  gap: 10px;
}

.ledger-item header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ledger-item h3 {
  margin: 0 0 5px;
  font-size: 18px;
  line-height: 1.35;
}

.ledger-item time,
.ledger-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.ledger-item p {
  margin: 8px 0 0;
}

.ledger-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.ledger-actions button {
  min-height: 42px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.bot-launcher {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  width: 112px;
  gap: 6px;
  justify-items: center;
  padding: 8px 8px 10px;
  color: var(--brand-strong);
  background: #ffffff;
  border: 1px solid rgba(9, 87, 168, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(8, 31, 64, 0.18);
}

.bot-launcher.is-open {
  display: none;
}

.bot-badge {
  padding: 3px 7px;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.bot-photo {
  display: block;
  width: 78px;
  height: 92px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border: 2px solid rgba(9, 87, 168, 0.24);
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(8, 31, 64, 0.12);
}

.bot-character {
  position: relative;
  display: block;
  width: 76px;
  height: 90px;
}

.bot-cap {
  position: absolute;
  top: 0;
  left: 7px;
  z-index: 3;
  width: 62px;
  height: 26px;
  background:
    linear-gradient(180deg, #101826 0, #050914 100%),
    linear-gradient(90deg, transparent 0 8px, #f7f7f7 8px 54px, transparent 54px);
  border-radius: 30px 30px 12px 12px;
  box-shadow: inset 0 -6px 0 #f5f5f5;
}

.bot-cap::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 5px;
  width: 11px;
  height: 11px;
  background: #f2f2f2;
  border: 2px solid #c9d2de;
  border-radius: 50%;
}

.bot-head {
  position: absolute;
  top: 18px;
  left: 10px;
  z-index: 2;
  width: 56px;
  height: 52px;
  background: linear-gradient(180deg, #ffe4cf, #ffd3bd);
  border-radius: 22px 22px 20px 20px;
  box-shadow: inset 0 -4px 0 rgba(217, 129, 112, 0.12);
}

.bot-head::before,
.bot-head::after {
  content: "";
  position: absolute;
  top: 22px;
  width: 11px;
  height: 15px;
  background: #ffd8c5;
  border-radius: 50%;
}

.bot-head::before {
  left: -8px;
}

.bot-head::after {
  right: -8px;
}

.bot-hair {
  position: absolute;
  top: 7px;
  width: 10px;
  height: 24px;
  background: #44322c;
}

.bot-hair.left {
  left: 0;
  border-radius: 10px 2px 12px 8px;
}

.bot-hair.right {
  right: 0;
  border-radius: 2px 10px 8px 12px;
}

.bot-eye {
  position: absolute;
  top: 25px;
  width: 8px;
  height: 10px;
  background: #211512;
  border-radius: 50%;
}

.bot-eye.left {
  left: 16px;
}

.bot-eye.right {
  right: 14px;
  height: 7px;
  background: transparent;
  border-radius: 0;
  border-top: 4px solid #211512;
  transform: rotate(-12deg);
}

.bot-smile {
  position: absolute;
  right: 19px;
  bottom: 12px;
  width: 16px;
  height: 8px;
  border-bottom: 2px solid var(--danger);
  border-radius: 0 0 16px 16px;
}

.bot-body {
  position: absolute;
  left: 15px;
  bottom: 0;
  width: 46px;
  height: 30px;
  background: linear-gradient(180deg, #a9ccf1, #7fb0df);
  border-radius: 14px 14px 8px 8px;
  border: 1px solid rgba(6, 59, 120, 0.18);
}

.bot-body::before,
.bot-body::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 10px;
  height: 5px;
  background: #17243a;
  border-radius: 999px;
}

.bot-body::before {
  left: 4px;
}

.bot-body::after {
  right: 4px;
}

.bot-tie {
  position: absolute;
  top: 3px;
  left: 20px;
  width: 7px;
  height: 22px;
  background: #0b1830;
  clip-path: polygon(50% 0, 100% 28%, 68% 100%, 32% 100%, 0 28%);
}

.bot-tip {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.bot-drawer {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 60;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px;
  background: rgba(246, 250, 255, 0.98);
  border: 1px solid rgba(9, 87, 168, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(8, 31, 64, 0.26);
}

.bot-drawer-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bot-drawer-head strong,
.bot-drawer-head span {
  display: block;
}

.bot-drawer-head strong {
  font-size: 22px;
}

.bot-drawer-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 15px;
}

.bot-close {
  width: 38px;
  height: 38px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid #c6d8eb;
  border-radius: 8px;
  font-size: 26px;
  line-height: 1;
}

.elder-actions {
  display: grid;
  gap: 10px;
}

.elder-actions button {
  min-height: 86px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(12, 32, 58, 0.06);
}

.elder-actions strong,
.elder-actions span {
  display: block;
}

.elder-actions strong {
  font-size: 25px;
}

.elder-actions span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.4;
}

.elder-call-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.elder-hint {
  margin: 12px 0 0;
  padding: 12px;
  color: var(--danger-deep);
  background: var(--danger-bg);
  border: 1px solid #efbbb4;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 420px) {
  .officer-line {
    flex-direction: column;
    gap: 2px;
  }

  .poster-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .grid-menu,
  .button-row {
    grid-template-columns: 1fr;
  }

  .officer-card {
    flex-direction: column;
  }

  .officer-photo {
    width: 100%;
    min-height: 110px;
    flex-basis: auto;
  }

  .elder-call-row {
    grid-template-columns: 1fr;
  }
}

*,
*::before,
*::after {
  border-radius: 0 !important;
}

.topbar {
  background: linear-gradient(180deg, rgba(207, 215, 225, 0.98) 0, rgba(207, 215, 225, 0.92) 72%, rgba(207, 215, 225, 0) 100%);
}

.topbar h1 {
  color: var(--brand-strong);
  font-weight: 900;
  letter-spacing: 0;
}

.eyebrow {
  color: #5b6574;
  font-weight: 700;
}

.station-intro-card,
.home-call-card,
.module-card,
.phone-card,
.map-card,
.select-card,
.elder-safe-card,
.quiz-card,
.video-panel,
.safety-card,
.officer-card,
.form-card,
.dashboard article,
.ledger-item {
  border-color: #8f9bac;
  box-shadow: 0 10px 24px rgba(7, 18, 38, 0.1);
}

.station-photo {
  min-height: 270px;
  filter: saturate(0.9) contrast(1.04);
}

.station-intro-copy {
  border-top: 4px solid var(--brand-strong);
}

.station-intro-copy strong {
  color: var(--brand-strong);
}

.station-intro-copy p {
  color: #3f4b5d;
}

.home-call-card.alarm,
.elder-safe-card,
.phone-card.hot,
.dial-panel {
  background: linear-gradient(135deg, #031a3a 0, #082d5f 62%, #113f77 100%);
  border-color: #203c63;
}

.module-card.priority {
  color: #21334f;
  background: #fbfcfe;
  border-color: #b6c1d0;
  box-shadow: 0 8px 20px rgba(7, 18, 38, 0.08);
}

.module-card.priority .card-icon,
.card-icon {
  color: #ffffff;
  background: #315f92;
}

.module-card {
  color: #21334f;
  background: #fbfcfe;
  border-color: #b6c1d0;
  box-shadow: 0 8px 20px rgba(7, 18, 38, 0.08);
}

.module-card small {
  color: #59687c;
}

.grid-menu .module-card:nth-child(1) .card-icon {
  background: #315f92;
}

.grid-menu .module-card:nth-child(2) .card-icon {
  background: #7d4d38;
}

.grid-menu .module-card:nth-child(3) .card-icon {
  background: #55714b;
}

.elder-safe-card {
  color: #1f314d;
  background: #f7f9fc;
  border-color: #b6c1d0;
}

.elder-safe-card strong {
  color: #0b315f;
}

.elder-safe-card p {
  color: #4c5d73;
}

.quiz-card,
.video-panel,
.safety-card,
.select-card,
.officer-card {
  background: #fbfcfe;
  border-color: #b6c1d0;
}

.quiz-options button,
.secondary-button,
.view-back {
  background: #eef3f8;
  border-color: #b7c5d5;
}

.module-card,
.module-card.priority {
  color: #24364d;
  background: #ffffff;
  border-color: #d4dce7;
  box-shadow: 0 7px 18px rgba(28, 50, 78, 0.06);
}

.module-card small,
.module-card.priority small {
  color: #6b7788;
}

.grid-menu .module-card:nth-child(1) {
  background: #f6faff;
}

.grid-menu .module-card:nth-child(2) {
  background: #fff8f4;
}

.grid-menu .module-card:nth-child(3) {
  background: #f7fbf6;
}

.grid-menu .module-card:nth-child(1) .card-icon,
.module-card.priority .card-icon {
  background: #6f9ed0;
}

.grid-menu .module-card:nth-child(2) .card-icon {
  background: #c98b6c;
}

.grid-menu .module-card:nth-child(3) .card-icon {
  background: #86ad78;
}

.elder-safe-card {
  color: #25384f;
  background: #f7fbff;
  border-color: #d4dce7;
}

.elder-safe-card strong {
  color: #24527f;
}

.elder-safe-card p {
  color: #617084;
}

.quiz-card,
.video-panel,
.safety-card,
.select-card,
.officer-card {
  background: #ffffff;
  border-color: #d4dce7;
  box-shadow: 0 7px 18px rgba(28, 50, 78, 0.06);
}

.quiz-options button,
.secondary-button,
.view-back,
.ledger-actions button {
  color: #2d557d;
  background: #f2f7fc;
  border-color: #d2dfeb;
}

.safety-card::before {
  background: #86ad78;
}

.video-placeholder {
  background: linear-gradient(135deg, #6f9ed0 0, #86ad78 100%);
}

.home-call-card,
.home-call-card.alarm {
  color: #28425e;
  background: #ffffff;
  border-color: #d4dce7;
  box-shadow: 0 7px 18px rgba(28, 50, 78, 0.06);
}

.home-call-card.alarm {
  background: #f6faff;
}

.home-call-card:nth-child(2) {
  background: #f7fbf6;
}

.home-call-card span {
  color: #506379;
}

.home-call-card strong {
  color: #2e638f;
}

.primary-button,
.secondary-button.is-active,
.quiz-result button {
  color: #ffffff;
  background: #5f8fc1;
}

.primary-button.danger {
  background: #c47a69;
}

.elder-safe-card .secondary-button,
.secondary-button,
.view-back,
.quiz-options button,
.ledger-actions button {
  color: #315f86;
  background: #f5f9fd;
  border-color: #d7e3ee;
}

.quiz-result.right {
  color: #3d6b48;
  background: #f3faf4;
  border-color: #d1e7d5;
}

.quiz-result.wrong {
  color: #9c564b;
  background: #fff7f5;
  border-color: #ead0cb;
}

.video-placeholder {
  color: #24415b;
  background: #eef6fb;
  border: 1px solid #d4dce7;
}

.video-placeholder span {
  color: #ffffff;
  background: #6f9ed0;
}

.video-placeholder strong {
  color: #3e5870;
}

.home-call-grid {
  grid-template-columns: 1fr;
}

.office-call-card,
.office-call-card.alarm {
  display: grid;
  min-height: 138px;
  gap: 10px;
  justify-items: center;
  padding: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, #06447f 0, #0957a8 62%, #0a6abe 100%),
    linear-gradient(90deg, rgba(205, 164, 75, 0.2), transparent 42%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 30px rgba(6, 59, 120, 0.18);
}

.office-call-card span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 19px;
  font-weight: 900;
}

.office-call-card strong {
  color: #fff8da;
  font-size: clamp(25px, 6.4vw, 34px);
}

.office-call-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.office-call-actions button {
  min-height: 44px;
  color: #063b78;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 900;
}

.module-card,
.module-card.priority,
.quiz-card,
.video-panel,
.safety-card,
.select-card,
.officer-card {
  color: #223550;
  background: #fbfcfe;
  border-color: #cbd7e5;
  box-shadow: 0 8px 20px rgba(12, 32, 58, 0.07);
}

.grid-menu .module-card:nth-child(1),
.grid-menu .module-card:nth-child(2),
.grid-menu .module-card:nth-child(3) {
  background: #fbfcfe;
}

.grid-menu .module-card:nth-child(1) .card-icon,
.grid-menu .module-card:nth-child(2) .card-icon,
.grid-menu .module-card:nth-child(3) .card-icon,
.module-card.priority .card-icon,
.card-icon {
  background: #5f8fc1;
}

.module-card strong,
.quiz-card h2,
.video-panel h2,
.safety-card h2,
.officer-head h2 {
  color: #102b4a;
}

.module-card small,
.quiz-card p,
.video-panel p,
.safety-card p,
.safety-card li {
  color: #5d6b7e;
}

.primary-button,
.secondary-button.is-active,
.quiz-result button {
  background: #5f8fc1;
}

.elder-safe-card {
  color: #223550;
  background: #f7faff;
  border-color: #cbd7e5;
  box-shadow: 0 8px 20px rgba(12, 32, 58, 0.07);
}

.elder-safe-card strong {
  color: #102b4a;
}

.elder-safe-card p {
  color: #5d6b7e;
}

.secondary-button,
.view-back,
.quiz-options button,
.elder-safe-card .secondary-button {
  color: #244f7a;
  background: #f2f7fc;
  border-color: #cbd7e5;
}

.safety-card::before {
  background: #5f8fc1;
}

.office-call-card,
.office-call-card.alarm {
  min-height: 124px;
  align-content: center;
  gap: 14px;
  padding: 20px 18px;
}

.office-call-card span {
  font-size: 21px;
  letter-spacing: 0;
}

.office-call-actions button {
  min-height: 52px;
  color: #063b78;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(3, 26, 58, 0.14);
}

.grid-menu .module-card:nth-child(1),
.module-card.priority {
  background: #f6faff;
}

.grid-menu .module-card:nth-child(2) {
  background: #fff8f4;
}

.grid-menu .module-card:nth-child(3) {
  background: #f7fbf6;
}

.grid-menu .module-card:nth-child(1) .card-icon,
.module-card.priority .card-icon {
  background: #6f9ed0;
}

.grid-menu .module-card:nth-child(2) .card-icon {
  background: #c98b6c;
}

.grid-menu .module-card:nth-child(3) .card-icon {
  background: #86ad78;
}

.officer-card .primary-button {
  background: linear-gradient(135deg, #06447f 0, #0957a8 62%, #0a6abe 100%);
  box-shadow: 0 10px 20px rgba(6, 59, 120, 0.16);
}

.office-call-card,
.office-call-card.alarm {
  min-height: 136px;
  background:
    linear-gradient(135deg, #04366d 0, #074f9a 60%, #0860b2 100%),
    linear-gradient(90deg, rgba(205, 164, 75, 0.18), transparent 45%);
  box-shadow: 0 18px 34px rgba(4, 54, 109, 0.22);
}

.office-call-actions {
  gap: 12px;
}

.office-call-actions button {
  min-height: 58px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 22px;
  letter-spacing: 0;
}

.office-call-actions button:active {
  background: rgba(255, 255, 255, 0.22);
}

.elder-safe-card {
  color: #ffffff;
  background: linear-gradient(135deg, #0b407b 0, #0d58a1 100%);
  border-color: #0a4d91;
  box-shadow: 0 10px 24px rgba(8, 54, 106, 0.16);
}

.elder-safe-card strong {
  color: #ffffff;
}

.elder-safe-card p {
  color: rgba(255, 255, 255, 0.94);
}

.elder-safe-card .secondary-button {
  color: #084375;
  background: #e5f2ff;
  border-color: #c7dff6;
  font-weight: 900;
}

.quiz-card,
.video-panel {
  background: #ffffff;
  border-color: #cbd7e5;
  box-shadow: 0 8px 20px rgba(12, 32, 58, 0.07);
}

.quiz-card h2,
.video-panel h2 {
  color: #061c38;
}

.quiz-card p,
.video-panel p {
  color: #435a78;
}

.quiz-options button {
  color: #084375;
  background: #e6f3ff;
  border-color: #bdd8f2;
  font-weight: 900;
}

.quiz-result {
  color: #4d6580;
  background: #f7fbff;
  border-color: #b9d4ee;
}

.video-placeholder {
  color: #ffffff;
  background: linear-gradient(135deg, #15548f 0, #2b73ad 100%);
  border: 0;
}

.video-placeholder span {
  color: #084375;
  background: #ffffff;
}

.video-placeholder strong {
  color: #ffffff;
}

.safety-card {
  background: #ffffff;
  border-color: #cbd7e5;
  box-shadow: 0 8px 20px rgba(12, 32, 58, 0.07);
}

.safety-card h2 {
  color: #061c38;
}

.safety-card p,
.safety-card li {
  color: #435a78;
}

.safety-card::before {
  width: 5px;
  background: linear-gradient(180deg, #1f6fb0, #caa24b);
}

.primary-button,
.secondary-button.is-active,
.quiz-result button {
  background: linear-gradient(180deg, #082d5f, #031a3a);
}

.secondary-button,
.view-back,
.quiz-options button,
.ledger-actions button {
  color: var(--brand-strong);
  background: #eef2f6;
  border-color: #9ca8b8;
}

.safety-card::before {
  width: 4px;
  background: var(--brand-strong);
}

.video-placeholder {
  background: linear-gradient(135deg, #07192f 0, #0b315f 100%);
}

:root {
  --service-blue-start: #0b407b;
  --service-blue-end: #0d58a1;
}

.office-call-card,
.office-call-card.alarm,
.elder-safe-card,
.video-placeholder {
  background: linear-gradient(135deg, var(--service-blue-start) 0, var(--service-blue-end) 100%);
}

.primary-button,
.secondary-button.is-active,
.quiz-result button,
.officer-card .primary-button {
  background: linear-gradient(135deg, var(--service-blue-start) 0, var(--service-blue-end) 100%);
}

.grid-menu .module-card:nth-child(1) .card-icon,
.module-card.priority .card-icon,
.card-icon {
  background: var(--service-blue-end);
}

.office-call-card,
.office-call-card.alarm {
  min-height: 232px;
  gap: 14px;
  padding: 14px 12px;
  box-shadow: 0 18px 34px rgba(11, 64, 123, 0.22);
}

.office-call-card span {
  font-size: 26px;
}

.office-call-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.office-call-actions button {
  min-height: 104px;
  width: 100%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 18px rgba(3, 26, 58, 0.12);
  font-size: clamp(25px, 6.4vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
}

.office-call-actions button:active {
  background: rgba(255, 255, 255, 0.22);
}

.safety-card::before {
  width: 5px;
  background: linear-gradient(180deg, #1f6fb0 0%, #7c9b90 62%, #caa24b 100%);
}
