:root {
  --page: #f6f4ef;
  --surface: #ffffff;
  --surface-muted: #eef4f2;
  --ink: #1f2933;
  --muted: #5f6974;
  --line: #d7dfdb;
  --teal: #006d77;
  --teal-dark: #00515a;
  --amber: #d98f00;
  --amber-soft: #f7c948;
  --berry: #9d2f4b;
  --green: #386641;
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.12);
  --header-height: 74px;
  color-scheme: light;
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  padding-top: var(--header-height);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 109, 119, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 109, 119, 0.04) 1px, transparent 1px),
    var(--page);
  background-size: 44px 44px;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--teal-dark);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-inner,
.container,
.footer-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  min-height: 42px;
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--teal-dark);
  background: var(--surface-muted);
  outline: none;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  content: "";
}

.menu-lines::before {
  transform: translateY(-7px);
}

.menu-lines::after {
  transform: translateY(5px);
}

.app-shell {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - var(--header-height));
  outline: none;
}

.section-band {
  padding: 34px 0;
}

.surface-band {
  background: rgba(255, 255, 255, 0.62);
  border-block: 1px solid rgba(215, 223, 219, 0.72);
}

.home-hero {
  padding: 48px 0 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 40px;
  align-items: center;
}

.hero-copy h1,
.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1.18;
}

.hero-text,
.page-heading p {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--berry);
  font-size: 0.86rem;
  font-weight: 800;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.popular-searches > span {
  color: var(--muted);
  font-weight: 800;
}

.keyword-chip,
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  color: var(--teal-dark);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--surface-muted);
  border: 1px solid #c9d8d4;
  border-radius: 999px;
}

.keyword-chip:hover,
.keyword-chip:focus-visible {
  color: #ffffff;
  background: var(--teal);
  outline: none;
}

.search-panel,
.search-page-tools,
.detail-main,
.detail-side,
.narrow-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 26px;
}

.search-panel h2 {
  margin: 0 0 18px;
  font-size: 1.28rem;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.search-form.is-compact {
  grid-template-columns: minmax(260px, 1.4fr) minmax(170px, 0.7fr) minmax(170px, 0.7fr) auto;
  align-items: end;
}

.search-actions {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
}

.search-actions > .primary-button,
.search-actions > .secondary-button {
  min-width: 0;
  flex: 1 1 0;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.sort-control span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.field input,
.field select,
.sort-control select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c7d0cb;
  border-radius: 8px;
}

.field input:focus,
.field select:focus,
.sort-control select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 109, 119, 0.16);
}

.date-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.date-range-fields[hidden] {
  display: none;
}

.date-input {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.date-input span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.date-input input {
  min-height: 38px;
  padding: 8px 10px;
}

.region-picker {
  position: relative;
  min-width: 0;
}

.region-picker-toggle {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c7d0cb;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.region-picker-toggle:hover,
.region-picker-toggle[aria-expanded="true"],
.region-picker-toggle:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 109, 119, 0.16);
}

.region-picker-toggle > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-picker-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.region-picker-menu[hidden] {
  display: none;
}

.region-option {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  color: var(--ink);
  cursor: pointer;
}

.region-option:hover {
  background: #f4f8fb;
}

.region-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--teal);
}

.region-option-city {
  font-weight: 800;
}

.region-city-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.region-group {
  padding: 4px 0;
  border-top: 1px solid #edf2f5;
}

.region-advanced {
  margin: 0 6px 5px 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

.region-advanced summary {
  padding: 4px 0;
  cursor: pointer;
}

.region-district-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  padding: 2px 0 4px 4px;
}

.region-option-unknown {
  margin-top: 6px;
  border-top: 1px solid #edf2f5;
}

.region-picker-clear {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
  color: var(--blue);
  background: transparent;
  border: 1px solid #d7e3ef;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.region-picker-clear:hover,
.region-picker-clear:focus-visible {
  background: #f4f8fb;
  outline: none;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  color: #ffffff;
  background: var(--teal);
  border: 1px solid var(--teal);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--teal-dark);
  outline: none;
}

.secondary-button {
  color: var(--teal-dark);
  background: var(--surface-muted);
  border: 1px solid #c9d8d4;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  color: #ffffff;
  background: var(--teal);
  outline: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  min-height: 114px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--teal-dark);
  font-size: 1.72rem;
  line-height: 1.2;
}

.two-column {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: start;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading-row h2,
.detail-section h2 {
  margin: 0;
  font-size: 1.36rem;
}

.text-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stack-list,
.notice-list {
  display: grid;
  gap: 12px;
}

.list-card,
.notice-item,
.quick-link,
.media-tile,
.warning-banner,
.side-summary {
  border-radius: 8px;
}

.list-card,
.notice-item,
.quick-link {
  background: var(--surface);
  border: 1px solid var(--line);
}

.list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 18px;
  text-decoration: none;
}

.list-card:hover,
.list-card:focus-visible,
.quick-link:hover,
.quick-link:focus-visible {
  border-color: var(--teal);
  outline: none;
  transform: translateY(-1px);
}

.list-card strong,
.list-card span {
  display: block;
}

.list-card span,
.list-card time {
  color: var(--muted);
  font-size: 0.92rem;
}

.notice-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 18px;
}

.notice-item time {
  color: var(--berry);
  font-weight: 800;
}

.notice-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.notice-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 16px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.page-heading {
  background: rgba(238, 244, 242, 0.72);
  border-bottom: 1px solid rgba(215, 223, 219, 0.72);
}

.search-page-tools {
  padding: 20px;
  margin-bottom: 18px;
}

.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.result-count {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.result-count strong {
  color: var(--teal-dark);
  font-size: 1.25rem;
}

.query-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.sort-control {
  display: grid;
  min-width: 150px;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 15px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.result-table th {
  color: var(--muted);
  font-size: 0.88rem;
  background: #fbfcfb;
}

.result-table tbody tr:last-child td {
  border-bottom: 0;
}

.result-row {
  cursor: pointer;
}

.result-row:hover,
.result-row:focus {
  background: var(--surface-muted);
  outline: none;
}

.name-link {
  display: block;
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.name-lines {
  display: grid;
  gap: 2px;
}

.name-line {
  display: block;
}

.name-link:hover,
.name-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: none;
}

.case-id {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.table-sort {
  padding: 0;
  color: inherit;
  font-weight: 900;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.table-sort:hover,
.table-sort:focus-visible {
  color: var(--teal-dark);
  outline: none;
}

.empty-cell,
.empty-note {
  color: var(--muted);
  text-align: center;
}

.detail-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.back-link:hover,
.back-link:focus-visible {
  color: #ffffff;
  background: var(--teal);
  outline: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  padding: 24px;
}

.detail-side {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  padding: 18px;
}

.warning-banner {
  padding: 14px 16px;
  color: #6b3d00;
  font-weight: 800;
  line-height: 1.65;
  background: #fff4cf;
  border: 1px solid #efd36f;
}

.detail-list {
  display: grid;
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.detail-field {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-field dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.detail-field dd {
  margin: 0;
  font-weight: 800;
  line-height: 1.55;
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-section p {
  color: var(--muted);
  line-height: 1.85;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.media-tile {
  position: relative;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.media-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-tile figcaption,
.video-tile span:last-child {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.video-tile:hover,
.video-tile:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.play-mark {
  position: absolute;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.play-mark::after {
  position: absolute;
  top: 18px;
  left: 23px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid var(--teal);
  content: "";
}

.source-link {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--teal-dark);
  font-weight: 800;
}

.side-summary {
  padding: 18px;
  margin-bottom: 14px;
  background: var(--surface-muted);
  border: 1px solid #c9d8d4;
}

.side-summary strong {
  display: block;
  margin-top: 10px;
  color: var(--teal-dark);
  font-size: 1.18rem;
}

.side-summary p,
.side-summary time {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.full-width {
  width: 100%;
}

.narrow-content {
  max-width: 760px;
  padding: 24px;
}

.placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.site-footer-content {
  position: relative;
  z-index: 2;
  padding: 30px 0;
  color: #ffffff;
  background: #1f2933;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--amber-soft);
  outline: none;
}

.site-watermark {
  position: fixed;
  right: 24px;
  bottom: 16px;
  z-index: 4;
  max-width: calc(100vw - 48px);
  padding: 7px 10px;
  color: rgba(31, 41, 51, 0.28);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
  pointer-events: none;
  user-select: none;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 8px;
}

@media (max-width: 980px) {
  :root {
    --header-height: 68px;
  }

  .nav-inner,
  .container,
  .footer-inner {
    width: min(100% - 32px, 1160px);
  }

  .menu-button {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: calc(var(--header-height) - 1px);
    right: 16px;
    left: 16px;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .hero-grid,
  .two-column,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .search-form.is-compact,
  .stats-grid,
  .quick-link-grid,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-form.is-compact .primary-button {
    grid-column: span 2;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: var(--header-height);
  }

  .brand span {
    max-width: 190px;
    font-size: 1rem;
    line-height: 1.25;
  }

  .home-hero,
  .section-band {
    padding: 26px 0;
  }

  .hero-copy h1,
  .page-heading h1 {
    font-size: 1.82rem;
  }

  .hero-text,
  .page-heading p {
    font-size: 1rem;
  }

  .search-panel,
  .search-page-tools,
  .detail-main,
  .narrow-content {
    padding: 18px;
  }

  .search-form.is-compact,
  .stats-grid,
  .quick-link-grid,
  .media-grid,
  .detail-heading {
    grid-template-columns: 1fr;
  }

  .detail-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .search-form.is-compact .primary-button {
    grid-column: auto;
  }

  .section-heading-row,
  .list-card,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .notice-item {
    grid-template-columns: 1fr;
  }

  .site-watermark {
    right: 12px;
    bottom: 10px;
    font-size: 0.78rem;
  }
}

/* Homepage visual treatment inspired by the provided reference. */
:root {
  --navy: #081a31;
  --navy-soft: #102844;
  --blue: #1f74e8;
  --blue-soft: #edf6ff;
  --page: #f5f9fe;
  --line: #dbe6f2;
  --ink: #172b49;
  --muted: #66758b;
  --header-height: 84px;
}

body {
  background: var(--page);
  overflow-x: hidden;
}

.site-header {
  background: var(--navy);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(5, 24, 48, 0.1);
}

.nav-inner,
.container,
.footer-inner {
  width: min(1240px, calc(100% - 56px));
}

.brand {
  gap: 12px;
  color: #ffffff;
}

.brand img {
  width: 48px;
  height: 48px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  color: #ffffff;
  font-size: 1.16rem;
  line-height: 1.2;
}

.brand-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.primary-nav {
  gap: 8px;
}

.nav-link {
  position: relative;
  min-height: 44px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 6px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: #ffffff;
  background: transparent;
  outline: none;
}

.nav-link.is-active::after {
  position: absolute;
  right: 14px;
  bottom: 3px;
  left: 14px;
  height: 3px;
  background: var(--blue);
  border-radius: 3px;
  content: "";
}

.nav-link-login {
  margin-left: 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.nav-link-login.is-active::after {
  display: none;
}

.menu-button {
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  background: #ffffff;
}

.home-hero {
  position: relative;
  z-index: 10;
  overflow: visible;
  padding: 34px 0 28px;
  background: linear-gradient(180deg, #eff7ff 0%, #f8fbff 100%);
  border-bottom: 1px solid #e1edf9;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-copy .eyebrow {
  color: #3778b9;
}

.hero-copy h1 {
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: 0;
}

.hero-text {
  max-width: 760px;
  margin: 12px auto 0;
  color: #5d6d83;
  font-size: 1.05rem;
}

.hero-pets {
  position: absolute;
  bottom: 12px;
  left: max(16px, calc(50% - 620px));
  width: 290px;
  opacity: 0.78;
}

.hero-paw {
  position: absolute;
  color: #d5e8fb;
  opacity: 0.65;
}

.hero-paw-one {
  top: 32px;
  right: 9%;
  transform: rotate(18deg);
}

.hero-paw-two {
  right: 3%;
  bottom: 24px;
  transform: rotate(30deg) scale(1.25);
}

.icon {
  display: block;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-paw {
  width: 58px;
  height: 58px;
  fill: currentColor;
  stroke: none;
}

.home-search-panel {
  position: relative;
  z-index: 3;
  max-width: 1060px;
  padding: 10px;
  margin: 24px auto 0;
  border-color: #dce9f6;
  border-radius: 9px;
  box-shadow: 0 12px 28px rgba(51, 102, 153, 0.12);
}

.search-form.is-hero {
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, 0.58fr) minmax(150px, 0.58fr) auto;
  gap: 12px;
  align-items: center;
}

.search-form.is-hero .field {
  position: relative;
  display: block;
}

.search-form.is-hero .field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-form.is-hero .field input,
.search-form.is-hero .field select,
.search-form.is-hero .primary-button {
  min-height: 48px;
}

.search-form.is-hero .field input,
.search-form.is-hero .field select {
  border-color: #d7e2ee;
}

.search-form.is-hero .region-picker-toggle {
  min-height: 48px;
  border-color: #d7e2ee;
}

.search-form.is-hero .region-picker-menu {
  top: calc(100% + 6px);
}

.search-form.is-hero .primary-button {
  min-width: 112px;
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.search-form.is-hero .search-actions {
  min-width: 222px;
}

.search-form.is-hero .search-clear-button {
  color: #31597f;
  background: #ffffff;
  border-color: #d7e2ee;
}

.search-form.is-hero .search-clear-button:hover,
.search-form.is-hero .search-clear-button:focus-visible {
  color: #155fc3;
  background: #f5f9fe;
  border-color: #9fc4ef;
  outline: none;
}

.search-form.is-hero .primary-button:hover,
.search-form.is-hero .primary-button:focus-visible {
  background: #155fc3;
}

.popular-searches {
  justify-content: center;
  margin-top: 14px;
  gap: 8px;
  font-size: 0.88rem;
}

.popular-searches > span {
  color: var(--ink);
}

.keyword-chip {
  min-height: 28px;
  padding: 4px 10px;
  color: #36516f;
  background: #f8fbff;
  border-color: #d7e5f4;
  border-radius: 6px;
  font-size: 0.83rem;
}

.keyword-chip:hover,
.keyword-chip:focus-visible {
  color: #ffffff;
  background: var(--blue);
}

.home-stats-band {
  padding: 16px 0 8px;
  background: var(--page);
}

.stats-grid {
  gap: 0;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e0eaf4;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(49, 86, 122, 0.08);
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  min-height: 82px;
  padding: 10px 22px;
  border: 0;
  border-right: 1px solid #e7eef6;
  border-radius: 0;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card > span:not(.stat-icon) {
  align-self: end;
  color: #66758b;
  font-size: 0.86rem;
}

.stat-card strong {
  align-self: start;
  margin-top: 4px;
  color: #173f73;
  font-size: 1.65rem;
}

.stat-icon {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: 3px;
  color: #2875e8;
  background: #eef6ff;
  border-radius: 50%;
}

.stat-card:nth-child(2) .stat-icon {
  color: #1eb47a;
  background: #edf9f4;
}

.stat-card:nth-child(3) .stat-icon {
  color: #f49a24;
  background: #fff6e8;
}

.stat-card:nth-child(4) .stat-icon {
  color: #7563dc;
  background: #f3f0ff;
}

.icon-stat {
  width: 27px;
  height: 27px;
}

.home-dashboard-band {
  position: relative;
  z-index: 1;
  padding: 16px 0 42px;
  background: var(--page);
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.home-sidebar {
  display: grid;
  gap: 16px;
}

.home-panel {
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e0eaf4;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(49, 86, 122, 0.08);
}

.home-panel .section-heading-row {
  margin-bottom: 14px;
}

.home-panel .section-heading-row h2 {
  color: var(--ink);
  font-size: 1.25rem;
}

.home-panel .eyebrow {
  color: #5480ae;
  margin-bottom: 6px;
}

.latest-meta {
  margin: 6px 0 0;
  color: #708198;
  font-size: 0.82rem;
  line-height: 1.5;
}

.latest-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 10px;
}

.latest-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.latest-filter-row .latest-control select {
  min-width: 112px;
}

.latest-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.latest-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.latest-control > span {
  color: #66758b;
  font-size: 0.82rem;
  font-weight: 800;
}

.latest-control select {
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  color: #304b6d;
  background: #ffffff;
  border: 1px solid #d7e3ef;
  border-radius: 5px;
  font-size: 0.82rem;
}

.latest-table-head {
  display: grid;
  grid-template-columns: 1.4fr 0.82fr 1.22fr 0.82fr;
  gap: 12px;
  padding: 10px 14px;
  color: #66758b;
  background: #f5f8fc;
  border: 1px solid #e7eef6;
  font-size: 0.82rem;
  font-weight: 800;
}

.stack-list {
  gap: 0;
}

.list-card {
  display: grid;
  grid-template-columns: 1.4fr 0.82fr 1.22fr 0.82fr;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border-width: 0 1px 1px;
  border-radius: 0;
}

.list-card strong {
  color: #173f73;
}

.list-name-lines {
  display: grid;
  gap: 2px;
}

.name-line {
  display: block;
}

.list-card span,
.list-card time {
  align-self: center;
  color: #53657d;
  font-size: 0.86rem;
}

.list-card .category-pill {
  justify-self: start;
  min-height: 28px;
  padding: 4px 9px;
  color: #3a6cb3;
  background: #edf5ff;
  border-color: #cfe1f6;
  border-radius: 5px;
  font-size: 0.78rem;
}

.list-card:hover,
.list-card:focus-visible {
  background: #f8fbff;
  transform: none;
}

.outline-button {
  display: flex;
  width: min(220px, 100%);
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  margin: 18px auto 0;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid #d7e3f1;
  border-radius: 6px;
}

.outline-button:hover,
.outline-button:focus-visible {
  color: #ffffff;
  background: var(--blue);
  outline: none;
}

.heading-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  vertical-align: -5px;
  color: var(--blue);
  place-items: center;
}

.orange-icon {
  color: #f18c2e;
}

.icon-heading {
  width: 21px;
  height: 21px;
}

.notice-list {
  gap: 0;
}

.notice-item {
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #e8eef5;
  border-radius: 0;
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-item time {
  color: #6d7e95;
  font-size: 0.78rem;
}

.notice-item h3 {
  color: #304b6d;
  font-size: 0.9rem;
}

.notice-item p {
  color: #7a8798;
  font-size: 0.8rem;
  line-height: 1.5;
}

.panel-note {
  margin: 5px 0 0;
  color: #8794a5;
  font-size: 0.72rem;
}

.recent-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.recent-media-card {
  min-width: 0;
  overflow: hidden;
  color: #34567f;
  background: #f8fbff;
  border: 1px solid #e0eaf4;
  border-radius: 6px;
  text-decoration: none;
}

.recent-media-card:hover,
.recent-media-card:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.recent-media-image-wrap {
  position: relative;
}

.recent-media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.recent-media-type {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  color: #ffffff;
  background: rgba(8, 26, 49, 0.72);
  border-radius: 3px;
  font-size: 0.64rem;
  font-weight: 800;
}

.recent-media-title {
  display: block;
  overflow: hidden;
  padding: 7px 7px 8px;
  color: #536b88;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel .section-heading-row {
  margin-bottom: 6px;
}

.quick-panel .quick-link-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.quick-panel .quick-link {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  min-height: 48px;
  padding: 10px 0;
  color: #34567f;
  background: transparent;
  border-width: 0 0 1px;
  border-color: #e8eef5;
  border-radius: 0;
}

.quick-panel .quick-link:last-child {
  border-bottom: 0;
}

.quick-panel .quick-link:hover,
.quick-panel .quick-link:focus-visible {
  color: var(--blue);
  transform: none;
}

.quick-link-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--blue);
  background: #eef6ff;
  border-radius: 5px;
}

.quick-link:nth-child(2) .quick-link-icon {
  color: #7563dc;
  background: #f3f0ff;
}

.quick-link:nth-child(3) .quick-link-icon {
  color: #f18c2e;
  background: #fff4e6;
}

.quick-link:nth-child(4) .quick-link-icon {
  color: #1eb47a;
  background: #edf9f4;
}

.icon-quick {
  width: 16px;
  height: 16px;
}

.site-footer-content {
  background: var(--navy);
}

.site-watermark {
  z-index: 1;
  color: rgba(23, 43, 73, 0.24);
  background: transparent;
  opacity: 0.72;
}

.footer-inner {
  justify-content: center;
  text-align: center;
}

.footer-copyright {
  width: 100%;
}

.footer-copyright p {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.82);
}

.footer-copyright p + p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
}

.footer-report-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  margin-top: 12px;
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.footer-report-button:hover,
.footer-report-button:focus-visible {
  color: #ffffff;
  background: #155fc3;
  border-color: #155fc3;
  outline: none;
}

.footer-disclaimer {
  max-width: 1080px;
  padding-top: 18px;
  margin: 20px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-disclaimer h2 {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

.footer-disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

.footer-disclaimer-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  line-height: 1.7;
}

.footer-disclaimer-grid strong {
  color: rgba(255, 255, 255, 0.84);
}

.hero-submit-action {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.hero-submit-button {
  min-width: 220px;
  min-height: 56px;
  padding-inline: 28px;
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(31, 116, 232, 0.24);
  font-size: 1.08rem;
}

.hero-submit-button:hover,
.hero-submit-button:focus-visible {
  color: #ffffff;
  background: #155fc3;
  border-color: #155fc3;
}

.latest-table-head,
.list-card {
  grid-template-columns: 1.25fr 0.72fr 1.12fr 0.9fr 0.52fr 0.78fr;
}

.list-card strong {
  display: grid;
  gap: 4px;
}

.list-case-id {
  color: #7b8ba1;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.reason-text {
  color: #536b88;
  font-size: 0.8rem;
  line-height: 1.4;
}

.comment-count {
  color: #356eb3;
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

.home-empty-note {
  padding: 28px 14px;
  margin: 0;
  border: 1px solid #e7eef6;
}

@media (max-width: 640px) {
  .hero-submit-button {
    width: min(100%, 280px);
  }

  .latest-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .latest-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .latest-filter-row .latest-control {
    display: grid;
    align-items: stretch;
    gap: 4px;
  }

  .latest-filter-row .latest-control select {
    min-width: 0;
  }

  .latest-toolbar > .latest-controls {
    justify-content: flex-start;
  }

  .list-card {
    grid-template-columns: 1fr auto;
  }

  .list-card time {
    grid-row: 1 / span 4;
  }
}

@media (max-width: 980px) {
  .nav-inner,
  .container,
  .footer-inner {
    width: min(100% - 32px, 1240px);
  }

  .hero-pets {
    left: -36px;
    opacity: 0.35;
  }

  .search-form.is-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-form.is-hero .primary-button {
    grid-column: auto;
  }

  .search-form.is-hero .search-actions {
    grid-column: span 2;
  }

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

  .home-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-media-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 70px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-tagline {
    display: none;
  }

  .hero-pets {
    bottom: 0;
    left: -92px;
    width: 240px;
  }

  .hero-paw-two {
    right: -14px;
  }

  .search-form.is-hero {
    grid-template-columns: 1fr;
  }

  .search-form.is-hero .primary-button {
    grid-column: auto;
  }

  .search-form.is-hero .search-actions {
    grid-column: auto;
    min-width: 0;
  }

  .region-picker-menu {
    max-height: 280px;
  }

  .region-district-list {
    grid-template-columns: 1fr;
  }

  .date-range-fields {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .stat-card {
    min-width: 0;
    padding: 12px;
    border-right: 0;
  }

  .stat-card strong {
    min-width: 0;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid #e7eef6;
  }

  .latest-table-head {
    display: none;
  }

  .list-card {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }

  .list-card strong {
    grid-column: 1;
  }

  .list-card > span:not(.category-pill) {
    grid-column: 1;
  }

  .list-card .category-pill {
    grid-column: 1;
  }

  .list-card time {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

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

  .recent-media-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-disclaimer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-link-login {
    margin-left: 0;
  }
}

/* Compact display-mode controls. The default remains the browser's responsive layout. */
.view-mode-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(8, 26, 49, 0.78);
}

.view-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.view-mode-button .icon {
  width: 15px;
  height: 15px;
}

.view-mode-button:hover,
.view-mode-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.view-mode-button.is-active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.view-mode-label-short {
  display: none;
}

html[data-view-mode="mobile"] {
  --header-height: 118px;
}

html[data-view-mode="mobile"] .nav-inner {
  position: relative;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-top: 9px;
}

html[data-view-mode="mobile"] .view-mode-switcher {
  position: absolute;
  bottom: 8px;
  left: 0;
}

html[data-view-mode="mobile"] .menu-button,
html[data-view-mode="mobile"] .primary-nav {
  display: inline-flex;
}

html[data-view-mode="mobile"] .primary-nav {
  position: absolute;
  top: calc(var(--header-height) - 1px);
  right: 16px;
  left: 16px;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

html[data-view-mode="mobile"] .primary-nav.is-open {
  display: grid;
}

html[data-view-mode="mobile"] .brand img {
  width: 42px;
  height: 42px;
}

html[data-view-mode="mobile"] .brand-tagline {
  display: none;
}

html[data-view-mode="mobile"] .brand-name {
  font-size: 1rem;
}

html[data-view-mode="mobile"] .hero-grid,
html[data-view-mode="mobile"] .two-column,
html[data-view-mode="mobile"] .detail-layout,
html[data-view-mode="mobile"] .home-dashboard-grid {
  grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .search-form.is-hero {
  grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .search-form.is-hero .primary-button,
html[data-view-mode="mobile"] .search-form.is-hero .search-actions {
  grid-column: auto;
}

html[data-view-mode="mobile"] .home-sidebar {
  grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] .recent-media-grid {
  grid-template-columns: 1fr 1fr;
}

html[data-view-mode="mobile"] .section-heading-row,
html[data-view-mode="mobile"] .footer-inner {
  align-items: flex-start;
  flex-direction: column;
}

@media (max-width: 980px) {
  .view-mode-switcher {
    order: 3;
  }

  .view-mode-label-wide {
    display: none;
  }

  .view-mode-label-short {
    display: inline;
  }
}

@media (max-width: 640px) {
  html[data-view-mode="mobile"] {
    --header-height: 118px;
  }

  .view-mode-button {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 0.74rem;
  }
}

/* Keep the compact switcher usable on narrow screens even before a mode is selected. */
@media (max-width: 980px) {
  html:not([data-view-mode="desktop"]) {
    --header-height: 118px;
  }

  html:not([data-view-mode="desktop"]) .nav-inner {
    position: relative;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 9px;
  }

  html:not([data-view-mode="desktop"]) .view-mode-switcher {
    position: absolute;
    bottom: 8px;
    left: 0;
  }

  html:not([data-view-mode="desktop"]) .menu-button {
    display: inline-flex;
  }

  html:not([data-view-mode="desktop"]) .primary-nav {
    position: absolute;
    top: calc(var(--header-height) - 1px);
    right: 16px;
    left: 16px;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  html:not([data-view-mode="desktop"]) .primary-nav.is-open {
    display: grid;
  }
}

@media (max-width: 640px) {
  html:not([data-view-mode="desktop"]) .brand img {
    width: 42px;
    height: 42px;
  }

  html:not([data-view-mode="desktop"]) .brand-tagline {
    display: none;
  }

  html:not([data-view-mode="desktop"]) .brand-name {
    font-size: 1rem;
  }
}

/* Custom inline pickers avoid the oversized native select dialog on mobile browsers. */
.inline-picker {
  position: relative;
}

.inline-picker-toggle {
  display: inline-flex;
  min-width: 112px;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 9px;
  color: #304b6d;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid #d7e3ef;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
}

.inline-picker-toggle:hover,
.inline-picker-toggle[aria-expanded="true"],
.inline-picker-toggle:focus-visible {
  border-color: #9fc4ef;
  outline: 3px solid rgba(31, 116, 232, 0.12);
}

.inline-picker-toggle > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-picker-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  min-width: 160px;
  max-width: min(280px, calc(100vw - 32px));
  max-height: 300px;
  overflow: auto;
  padding: 5px;
  background: #ffffff;
  border: 1px solid #d7e3ef;
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(26, 62, 102, 0.2);
}

.inline-picker-menu[hidden] {
  display: none;
}

.inline-picker-option {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  color: #304b6d;
  font-size: 0.84rem;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.inline-picker-option:hover,
.inline-picker-option:focus-visible,
.inline-picker-option.is-selected {
  color: #155fc3;
  background: #edf5ff;
  outline: none;
}

html[data-view-mode="mobile"] .inline-picker-menu {
  width: min(260px, 75vw);
  max-width: 75vw;
  max-height: 50vh;
}

@media (max-width: 640px) {
  .inline-picker-menu {
    width: min(260px, 75vw);
    max-width: 75vw;
    max-height: 50vh;
  }
}

@media (max-width: 640px) {
  .inline-picker-toggle {
    min-width: 102px;
    gap: 10px;
  }

  .inline-picker-option {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.88rem;
  }
}
