html {
  font-size: 14px;
}

:root {
  --bs-primary: #176b53;
  --bs-primary-rgb: 23, 107, 83;
  --bs-link-color: #176b53;
  --bs-link-hover-color: #105640;
  --bs-focus-ring-color: rgba(23, 107, 83, .25);
  --bp-ink: #18332e;
  --bp-muted: #61716c;
  --bp-mint: #e8f4ee;
  --bp-line: #e5ebe7;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--bs-primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8faf8;
  color: var(--bp-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

body > .container {
  flex: 1 0 auto;
  min-width: 0;
  width: min(100%, 1080px);
  max-width: 1080px;
  padding-inline: 18px;
}

main, .bp-table-region {
  min-width: 0;
  max-width: 100%;
}

main {
  overflow-wrap: anywhere;
}

main h1.h3 {
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  line-height: 1.5;
}

main .text-muted {
  color: var(--bp-muted) !important;
}

main a,
footer a {
  color: var(--bs-link-color);
}

main a:hover,
footer a:hover {
  color: var(--bs-link-hover-color);
}

main .btn,
main .form-control,
main .form-select {
  min-height: 44px;
}

main .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  --bs-btn-bg: #176b53;
  --bs-btn-border-color: #176b53;
  --bs-btn-hover-bg: #105640;
  --bs-btn-hover-border-color: #105640;
  --bs-btn-active-bg: #105640;
  --bs-btn-active-border-color: #105640;
  --bs-btn-disabled-bg: #176b53;
  --bs-btn-disabled-border-color: #176b53;
}

.btn-outline-primary {
  --bs-btn-color: #176b53;
  --bs-btn-border-color: #176b53;
  --bs-btn-hover-bg: #176b53;
  --bs-btn-hover-border-color: #176b53;
  --bs-btn-active-bg: #105640;
  --bs-btn-active-border-color: #105640;
}

.form-control:focus,
.form-select:focus,
main .btn:focus-visible,
.bp-primary-link:focus-visible,
.bp-more-menu summary:focus-visible,
.bp-secondary-navigation a:focus-visible {
  outline: 3px solid #91cdb2;
  outline-offset: 3px;
  box-shadow: none;
}

.bp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bp-brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--bs-primary);
  color: white;
  font-size: 16px;
}

.bp-brand > span:last-child {
  overflow-wrap: anywhere;
}

.bp-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 12px;
  background: var(--bp-mint);
}

.bp-welcome-copy {
  min-width: 0;
}

.bp-welcome h1 {
  font-weight: 800;
}

.bp-welcome-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.bp-guide {
  margin-bottom: 24px;
}

.bp-guide-intro {
  max-width: 70ch;
  margin-bottom: 0;
  color: var(--bp-muted);
}

.bp-guide-steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.bp-guide-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--bp-line);
}

.bp-guide-step-number {
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--bs-primary);
  font-weight: 800;
  text-align: center;
}

.bp-guide-step-copy {
  grid-column: 2;
}

.bp-guide-step > .bp-guide-figure {
  grid-column: 3;
}

.bp-guide-step-copy {
  min-width: 0;
}

.bp-guide-step-copy h3 {
  margin-bottom: 8px;
  font-weight: 700;
}

.bp-guide-step-copy p {
  max-width: 65ch;
  margin-bottom: 0;
  color: var(--bp-muted);
}

.bp-guide-figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  background: #f8faf8;
}

.bp-guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.bp-guide-figure figcaption {
  padding: 8px 12px;
  color: var(--bp-muted);
  font-size: 13px;
}

.bp-guide-camera {
  padding: 12px;
  text-align: center;
}

.bp-guide-camera svg {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto;
}

.bp-guide-camera figcaption {
  padding-bottom: 0;
}

.bp-guide-results {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.bp-guide-results img {
  border: 1px solid var(--bp-line);
  border-radius: 6px;
  background: #fff;
}

.bp-guide-results figcaption {
  padding: 0 2px 2px;
}

.bp-guide-note {
  max-width: 75ch;
  margin: 0 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bp-line);
  color: var(--bp-muted);
}

.bp-panel,
.bp-content-panel {
  min-width: 0;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--bp-line);
  border-radius: 12px;
  background: #fff;
}

.bp-panel > :last-child,
.bp-content-panel > :last-child {
  margin-bottom: 0;
}

.bp-upload-panel #analysis-form {
  margin-bottom: 0 !important;
}

.bp-upload-panel .form-control[type="file"] {
  padding: 6px;
  border-color: var(--bp-line);
  border-radius: 10px;
  background: #fff;
}

.bp-upload-panel .form-control[type="file"]::file-selector-button {
  margin: -6px 12px -6px -6px;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--bp-line);
  background: var(--bp-mint);
  color: var(--bs-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.bp-upload-panel .form-control[type="file"]::file-selector-button:hover {
  background: var(--bp-line);
}

.bp-upload-panel .form-control[type="file"]:focus-visible {
  outline: 3px solid #91cdb2;
  outline-offset: 3px;
  box-shadow: none;
}

.bp-credit-balance {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--bp-line);
  border-radius: 999px;
  background: var(--bp-mint);
  color: var(--bp-ink);
  font-size: 1rem;
}

.bp-credit-balance svg {
  flex: 0 0 auto;
  color: var(--bs-primary);
}

.bp-mobile-upload-actions {
  align-items: center;
  gap: 10px;
}

.bp-upload-panel #analysis-result:empty {
  display: none;
}

.bp-chart-panel .bp-chart {
  max-width: 100%;
  border: 0;
  padding: 0;
}

.bp-history-panel {
  padding: 12px;
}

.bp-history-panel .bp-analysis-history {
  margin-bottom: 0;
}

.bp-analysis-history th {
  background: var(--bp-mint);
}

.bp-home-activity-heading {
  margin-bottom: .75rem;
  padding: .65rem .9rem;
  border-radius: 10px;
  background: var(--bp-mint);
  color: var(--bs-primary);
  font-weight: 700;
}

.bp-home-activity-table {
  margin-bottom: 0;
}

.bp-analysis-history a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-inline: 12px;
  font-weight: 700;
}

.bp-page-heading {
  margin-bottom: 12px;
}

.bp-page-heading h1 {
  margin-bottom: 0;
}

.bp-page-meta {
  margin-bottom: 18px;
}

.bp-correction-guidance {
  margin: 12px 0 18px;
  padding: 12px;
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  background: var(--bp-mint);
  color: var(--bp-ink);
}

.bp-correction-input-label {
  display: block;
  margin-top: .35rem;
  color: var(--bp-muted);
  font-size: 13px;
  line-height: 1.25;
}

.bp-image-panel > summary {
  font-weight: 700;
}

.bp-auth-card {
  border-color: var(--bp-line) !important;
  border-radius: 12px;
}

.bp-auth-card-body {
  max-width: 560px;
  margin-inline: auto;
}

.bp-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--bp-muted);
  font-size: var(--bs-body-font-size);
}

.bp-auth-divider::before,
.bp-auth-divider::after {
  flex: 1;
  border-top: 1px solid var(--bp-line);
  content: "";
}

.bp-auth-email > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--bs-link-color);
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
}

.bp-auth-email > summary::after {
  margin-left: 8px;
  content: "+";
  font-size: var(--bs-body-font-size);
  font-weight: 400;
}

.bp-auth-email[open] > summary::after {
  content: "-";
}

.bp-external-login-button {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding-inline: 52px;
  border-radius: 6px;
  font-weight: 600;
}

.bp-external-login-label {
  text-align: center;
}

.bp-external-login-button--line {
  --bs-btn-color: #fff;
  --bs-btn-bg: #06c755;
  --bs-btn-border-color: #06c755;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #05b34c;
  --bs-btn-hover-border-color: #05b34c;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #049e43;
  --bs-btn-active-border-color: #049e43;
}

.bp-external-login-button--google,
.bp-external-login-button--microsoft {
  --bs-btn-color: #3c4043;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #dadce0;
  --bs-btn-hover-color: #3c4043;
  --bs-btn-hover-bg: #f8faff;
  --bs-btn-hover-border-color: #c6c9ce;
  --bs-btn-active-color: #3c4043;
  --bs-btn-active-bg: #f1f3f4;
  --bs-btn-active-border-color: #c6c9ce;
}

.bp-external-login-button--default {
  --bs-btn-color: #18332e;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #cbd5d0;
  --bs-btn-hover-color: #18332e;
  --bs-btn-hover-bg: #f3f7f5;
  --bs-btn-hover-border-color: #aebdb6;
}

.bp-external-login-mark {
  position: absolute;
  left: 16px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.bp-external-login-mark--line {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  background: url("../images/external-login/line-btn_base.png") center / contain no-repeat;
}

.bp-external-login-button--line:hover .bp-external-login-mark--line {
  background-image: url("../images/external-login/line-btn_hover.png");
}

.bp-external-login-button--line:active .bp-external-login-mark--line {
  background-image: url("../images/external-login/line-btn_press.png");
}

.bp-external-login-mark--google {
  background: url("../images/external-login/google.png") center / contain no-repeat;
}

.bp-external-login-mark--microsoft {
  background:
    linear-gradient(#f25022 0 0) 0 0 / 45% 45%,
    linear-gradient(#7fba00 0 0) 100% 0 / 45% 45%,
    linear-gradient(#00a4ef 0 0) 0 100% / 45% 45%,
    linear-gradient(#ffb900 0 0) 100% 100% / 45% 45%;
  background-repeat: no-repeat;
}

.bp-external-login-mark--default {
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
}

.bp-account-page {
  max-width: 860px;
  margin-inline: auto;
}

.bp-account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bp-line);
}

.bp-account-nav .nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  color: var(--bp-ink);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.bp-account-nav .nav-link.active {
  border-color: var(--bs-primary);
  background: var(--bp-mint);
  color: var(--bs-primary);
}

.bp-account-content {
  min-width: 0;
}

.bp-account-form {
  width: min(100%, 600px);
}

.bp-account-readonly {
  flex: 1 1 220px;
  min-width: 0;
}

.bp-account-login-list,
.bp-account-provider-list {
  display: grid;
  gap: 10px;
}

.bp-account-login-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  background: #fff;
}

.bp-account-login-item > span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.bp-account-login-item form {
  flex: 0 0 auto;
}

.bp-account-linked-provider {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.bp-account-linked-provider .bp-external-login-mark {
  position: static;
  flex-shrink: 0;
}

.bp-account-provider-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.footer {
  background: #fff;
  border-color: var(--bp-line) !important;
  font-size: 12px;
}

@media (max-width: 575.98px) {
  .bp-account-page {
    padding: 16px;
  }

  .bp-account-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-account-nav .nav-link {
    padding-inline: 8px;
  }

  .bp-account-login-item {
    align-items: stretch;
    flex-direction: column;
  }

  .bp-account-login-item .btn {
    width: 100%;
  }
}

.navbar-brand {
  min-width: 0;
  margin-right: .5rem;
  font-size: 1rem;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bp-navbar {
  background: white;
  border-color: var(--bp-line) !important;
}

.bp-navbar-container {
  display: block !important;
}

.bp-navbar-header {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bp-navbar .navbar-brand,
.bp-navbar .nav-link {
  color: var(--bp-ink);
}

.bp-navbar .navbar-brand:hover,
.bp-navbar .nav-link:hover {
  color: var(--bs-primary);
}

.bp-more-menu {
  position: relative;
  flex-shrink: 0;
}

.bp-more-menu summary {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  padding: .3rem .5rem;
  font-size: .875rem;
  cursor: pointer;
  list-style: none;
}

.bp-more-menu summary::-webkit-details-marker {
  display: none;
}

.bp-primary-navigation {
  background: white;
  border-bottom: 1px solid var(--bp-line);
}

.bp-primary-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bp-primary-link {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
  color: var(--bp-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.bp-nav-icon {
  display: none;
  font-size: 22px;
  line-height: 1;
}

.bp-primary-link[aria-current] {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
}

.bp-primary-link:hover,
.bp-primary-link:focus-visible {
  background: var(--bp-mint);
  color: var(--bs-primary);
}

.bp-primary-link:focus-visible,
.bp-more-menu summary:focus-visible {
  outline: 3px solid #91cdb2;
  outline-offset: -3px;
}

.bp-secondary-navigation {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1030;
  width: min(280px, calc(100vw - 2rem));
  padding: 8px;
  background: white;
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  box-shadow: 0 12px 30px #18332e18;
}

.bp-secondary-navigation .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.bp-secondary-navigation .nav-link:hover {
  background: var(--bp-mint);
}

.bp-secondary-navigation .form-inline {
  margin: 0;
}

.bp-secondary-navigation .btn-link {
  color: var(--bp-ink);
  text-decoration: none;
}

.bp-secondary-navigation .btn-link:hover {
  color: var(--bs-primary);
}

@media (max-width: 767.98px) {
  html {
    font-size: 16px;
    scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .bp-navbar {
    margin-bottom: 1rem;
  }

  .bp-welcome {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }

  .bp-welcome .text-muted {
    margin-bottom: 0;
    font-size: 14px;
  }

  .bp-welcome-actions > .btn {
    flex: 1 1 auto;
  }

  .bp-panel,
  .bp-content-panel {
    padding: 18px;
  }

  .bp-guide {
    padding: 18px;
  }

  .bp-guide-step {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }

  .bp-guide-step-number {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .bp-guide-step-copy,
  .bp-guide-step > .bp-guide-figure {
    grid-column: 2;
  }

  .bp-content-panel > h1.h3 {
    margin-bottom: 16px;
  }

  .bp-history-panel {
    padding: 10px;
  }

  .bp-upload-panel > h2 {
    margin-bottom: 16px;
  }

  .bp-credit-balance {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .bp-mobile-upload-actions:not([hidden]) {
    display: flex;
  }

  .bp-mobile-upload-actions > #mobile-camera-button {
    flex: 1 1 auto;
    min-height: 56px;
    font-size: 1.05rem;
    font-weight: 600;
  }

  .bp-mobile-upload-actions > #mobile-file-button {
    flex: 0 0 auto;
    min-height: 48px;
    padding-inline: 10px;
    font-size: 0.875rem;
  }

  .bp-mobile-upload-actions svg {
    width: 1.15em;
    height: 1.15em;
    margin-right: 4px;
    fill: currentColor;
    vertical-align: -0.15em;
  }

  .bp-page-heading {
    align-items: flex-start !important;
  }

  .bp-primary-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    margin-bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid #bed8ca;
    border-bottom: 0;
    box-shadow: 0 -4px 20px #18332e0d;
  }

  .bp-primary-inner {
    padding-inline: 8px;
  }

  .bp-primary-link {
    flex-direction: column;
    gap: 2px;
    min-height: 72px;
    margin: 4px;
    border: 0;
    border-radius: 12px;
    font-size: 12px;
  }

  .bp-primary-link[aria-current] {
    background: var(--bp-mint);
    font-weight: 800;
  }

  .bp-nav-icon {
    display: block;
  }
}

.layout-selector .form-select {
  max-width: 100%;
}

.help-disclosure-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-secondary);
  font-weight: 600;
  cursor: pointer;
}

.help-disclosure-toggle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--bs-secondary);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.help-disclosure-toggle:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.help-disclosure-content {
  max-width: 48rem;
}

.help-disclosure-content > p {
  margin-top: .5rem;
}

.bp-chart {
  width: 100%;
  max-width: 450px;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: var(--bs-body-bg);
}

.bp-chart-frame {
  display: flex;
  min-width: 0;
}

.bp-chart-axis {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 330px;
}

.bp-chart-scroll {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
}

.bp-chart-svg {
  display: block;
  max-width: none;
  height: 330px;
}

.bp-chart-gridline {
  stroke: var(--bs-border-color);
  stroke-width: 1;
}

.bp-chart-axis-label {
  fill: var(--bs-secondary-color);
  font-size: 12px;
}

.bp-chart-date-label,
.bp-chart-section-label,
.bp-chart-gap-label {
  fill: var(--bs-secondary-color);
  font-size: 10px;
}

.bp-chart-background-morning {
  fill: #fff;
  background: #fff;
}

.bp-chart-background-night {
  fill: #f0f1f3;
  background: #f0f1f3;
}

.bp-chart-background-missing {
  fill: #c5cad2;
  background: #c5cad2;
}

.bp-chart-systolic {
  fill: none;
  stroke: #dc3545;
  stroke-width: 2.5;
}

.bp-chart-diastolic {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 2.5;
}

.bp-chart-systolic-point,
.bp-chart-systolic-value {
  fill: #dc3545;
}

.bp-chart-diastolic-point,
.bp-chart-diastolic-value {
  fill: #0d6efd;
}

.bp-chart-point {
  stroke: var(--bs-body-bg);
  stroke-width: 1.5;
}

.bp-chart-value {
  font-size: 11px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--bs-body-bg);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.bp-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: .25rem;
  font-size: .875rem;
}

.bp-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.bp-chart-line {
  display: inline-block;
  width: 1.25rem;
  border-top: 3px solid;
}

.bp-chart-line-systolic {
  border-color: #dc3545;
}

.bp-chart-line-diastolic {
  border-color: #0d6efd;
}

.bp-chart-swatch {
  display: inline-block;
  width: .8rem;
  height: .8rem;
  border: 1px solid var(--bs-border-color);
}

.bp-responsive-table,
.bp-summary-table {
  min-width: 44rem;
}

.bp-summary-table {
  width: max-content;
  min-width: 100%;
}

.bp-summary-table th:not(.bp-summary-status, .bp-summary-memo),
.bp-summary-table td:not(.bp-summary-status, .bp-summary-memo) {
  white-space: nowrap;
}

.bp-summary-table th:nth-child(4),
.bp-summary-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bp-summary-table th:nth-child(5),
.bp-summary-table td:nth-child(5) {
  text-align: center;
}

.bp-summary-table .bp-summary-status {
  width: 3.5rem;
  min-width: 3.5rem;
  white-space: nowrap;
}

.bp-summary-table .bp-summary-memo {
  width: 16rem;
  min-width: 16rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .bp-summary-table .bp-summary-status {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bs-table-bg, #fff);
    box-shadow: 2px 0 4px #18332e14;
  }

  .bp-summary-table thead .bp-summary-status {
    z-index: 2;
    background: var(--bs-table-bg, #fff);
  }
}

.bp-readings-overview {
  display: none;
  min-width: 0;
  max-width: 100%;
}

body[data-layout="cards"] .bp-readings-overview,
body[data-layout="grid"] .bp-readings-overview {
  display: block;
}

.bp-overview-table {
  font-size: .875rem;
  margin-bottom: 0;
}

.bp-overview-table th,
.bp-overview-table td {
  white-space: nowrap;
}

.bp-mobile-editor-row > td {
  white-space: normal;
  padding: .75rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
}

.bp-mobile-editor-content {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
}

.bp-mobile-editor-field {
  min-width: 7rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  padding: .5rem;
  border: 2px solid transparent;
  border-radius: 6px;
}

.bp-mobile-editor-field.is-review-target {
  border-color: var(--bs-primary);
}

.bp-mobile-editor-field .js-cell-review {
  min-height: 2.75rem;
}

.bp-cell-review-message.is-error {
  color: var(--bs-danger-text-emphasis);
}

.bp-cell-review-guidance {
  display: none;
}

.bp-mobile-editor-references {
  display: flex;
  flex: 1 0 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.bp-mobile-editor-image {
  display: block;
  width: min(50vw, 20rem);
  max-width: 100%;
  max-height: 7rem;
  object-fit: contain;
}

.bp-mobile-editor-reference-image {
  display: grid;
  width: 100%;
  gap: .25rem;
}

.bp-pending-correction {
  text-decoration: underline dotted;
  text-underline-offset: .15em;
}

.js-reading-overview-row {
  cursor: pointer;
}

.js-reading-overview-row:hover {
  background-color: var(--bs-tertiary-bg, #f8f9fa);
}

.bp-reading-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.bp-responsive-table[data-testid="readings"] {
  --bp-card-columns: 3;
}

.bp-responsive-table .bp-reading-image {
  grid-column: 1 / -1;
}

.bp-responsive-table th,
.bp-responsive-table td {
  overflow-wrap: anywhere;
}

.bp-responsive-table .js-reading-preview {
  max-width: min(100%, 180px);
  max-height: 48px;
  cursor: pointer;
}

.bp-responsive-table .badge {
  white-space: normal;
  text-align: start;
}

.bp-responsive-table .bp-card-save-cell,
.bp-responsive-table .bp-card-save-column {
  display: none;
}

.bp-card-save-cell {
  text-align: end;
}

.bp-responsive-table input,
.bp-responsive-table select,
.bp-responsive-table button {
  min-height: 2.75rem;
  max-width: 100%;
}

.bp-responsive-table td::before {
  content: attr(data-label);
  display: none;
  font-weight: 600;
  margin-bottom: .25rem;
}

/* Keep one semantic table and one set of correction inputs in every layout. */
body[data-layout="cards"] .bp-responsive-table,
body[data-layout="grid"] .bp-responsive-table {
  display: block;
  min-width: 0;
}

@media (min-width: 768px) {
  .bp-responsive-table[data-testid="readings"] {
    width: 52rem;
    table-layout: fixed;
    min-width: 52rem;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(1),
  .bp-responsive-table[data-testid="readings"] td:nth-child(1) {
    width: 3.5rem;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(2),
  .bp-responsive-table[data-testid="readings"] td:nth-child(2) {
    width: 4rem;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(3),
  .bp-responsive-table[data-testid="readings"] td:nth-child(3) {
    width: 3rem;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(-n+3),
  .bp-responsive-table[data-testid="readings"] td:nth-child(-n+3) {
    white-space: nowrap;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(4),
  .bp-responsive-table[data-testid="readings"] td:nth-child(4),
  .bp-responsive-table[data-testid="readings"] th:nth-child(5),
  .bp-responsive-table[data-testid="readings"] td:nth-child(5) {
    width: 5.25rem;
  }

  .bp-responsive-table[data-testid="readings"] th:nth-child(6),
  .bp-responsive-table[data-testid="readings"] td:nth-child(6) {
    width: 3.5rem;
    white-space: nowrap;
  }

  .bp-responsive-table[data-testid="readings"] th.bp-reading-image-column,
  .bp-responsive-table[data-testid="readings"] td.bp-reading-image {
    width: 14rem;
    min-width: 14rem;
  }

  .bp-responsive-table .bp-reading-image {
    vertical-align: top;
  }

  .bp-responsive-table .bp-reading-comment {
    margin-top: .5rem;
    overflow-wrap: anywhere;
  }

  body[data-layout="table"] .bp-responsive-table .js-correction-input,
  body[data-layout="auto"] .bp-responsive-table .js-correction-input {
    width: 3.75rem;
    min-width: 3.75rem;
    max-width: 3.75rem;
  }

  body[data-layout="table"] .bp-responsive-table .js-reading-preview,
  body[data-layout="auto"] .bp-responsive-table .js-reading-preview {
    width: 12rem;
    min-width: 12rem;
    max-width: 12rem;
  }

}

body[data-layout="cards"] .bp-responsive-table thead,
body[data-layout="grid"] .bp-responsive-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

body[data-layout="cards"] .bp-responsive-table tbody,
body[data-layout="grid"] .bp-responsive-table tbody {
  display: grid;
  gap: 1rem;
}

body[data-layout="grid"] .bp-responsive-table tbody {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

body[data-layout="cards"] .bp-responsive-table tr,
body[data-layout="grid"] .bp-responsive-table tr {
  display: grid;
  grid-template-columns: repeat(var(--bp-card-columns, 2), minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .5rem;
  padding: .5rem;
}

body[data-layout="cards"] .bp-responsive-table td,
body[data-layout="grid"] .bp-responsive-table td {
  display: block;
  min-width: 0;
  padding: .5rem;
  border: 0;
}

body[data-layout="cards"] .bp-responsive-table td::before,
body[data-layout="grid"] .bp-responsive-table td::before {
  display: block;
}

body[data-layout="cards"] .bp-responsive-table td:last-child,
body[data-layout="grid"] .bp-responsive-table td:last-child {
  grid-column: 1 / -1;
}

body[data-layout="cards"] .bp-responsive-table .bp-card-save-cell,
body[data-layout="grid"] .bp-responsive-table .bp-card-save-cell {
  display: block;
}

@media (max-width: 767.98px) {
  .bp-readings-overview {
    display: block;
  }

  html.bp-cell-review-ready .bp-cell-review-guidance {
    display: block;
  }

  .bp-mobile-editor-content {
    max-width: calc(100vw - 3.5rem);
  }

  html.bp-overview-ready .bp-responsive-table[data-testid="readings"] .js-correction-input {
    display: none;
  }

  html.bp-overview-ready .bp-responsive-table[data-testid="readings"] .bp-correction-input-label {
    display: none;
  }

  .bp-responsive-table[data-testid="readings"] .bp-mobile-correction-source {
    display: none !important;
  }

  html.bp-overview-ready .bp-readings-overview[data-correction-enabled="true"] + .bp-table-region {
    display: none;
  }

  .bp-mobile-editor-content .js-correction-input {
    display: block;
    max-width: 7rem !important;
  }

  body[data-layout="cards"] .bp-responsive-table .js-reading-preview,
  body[data-layout="grid"] .bp-responsive-table .js-reading-preview,
  body[data-layout="auto"] .bp-responsive-table .js-reading-preview {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  body[data-layout="auto"] .bp-readings-overview {
    display: block;
  }

  body[data-layout="auto"] .bp-responsive-table {
    display: block;
    min-width: 0;
  }

  body[data-layout="auto"] .bp-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  body[data-layout="auto"] .bp-responsive-table tbody {
    display: grid;
    gap: 1rem;
  }

  body[data-layout="auto"] .bp-responsive-table tr {
    display: grid;
    grid-template-columns: repeat(var(--bp-card-columns, 2), minmax(0, 1fr));
    min-width: 0;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .5rem;
    padding: .5rem;
  }

  body[data-layout="auto"] .bp-responsive-table td {
    display: block;
    min-width: 0;
    padding: .5rem;
    border: 0;
  }

  body[data-layout="auto"] .bp-responsive-table td::before {
    display: block;
  }

  body[data-layout="auto"] .bp-responsive-table td:last-child {
    grid-column: 1 / -1;
  }

  body[data-layout="auto"] .bp-responsive-table .bp-card-save-cell {
    display: block;
  }
}

body[data-layout] .bp-analysis-history {
  display: table;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body[data-layout] .bp-analysis-history thead {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

body[data-layout] .bp-analysis-history tbody {
  display: table-row-group;
  gap: 0;
  grid-template-columns: none;
}

body[data-layout] .bp-analysis-history tr {
  display: table-row;
  border: 0;
  border-radius: 0;
  padding: 0;
}

body[data-layout] .bp-analysis-history td {
  display: table-cell;
  padding: .3rem;
  border-bottom: var(--bs-border-width, 1px) solid var(--bs-border-color, #dee2e6);
}

body[data-layout] .bp-analysis-history td::before {
  display: none;
}

body[data-layout] .bp-analysis-history td:last-child {
  grid-column: auto;
}

@media (max-width: 767.98px) {
  body[data-layout] .bp-ai-credit-history {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body[data-layout] .bp-ai-credit-history thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  body[data-layout] .bp-ai-credit-history tbody {
    display: grid;
    gap: .75rem;
  }

  body[data-layout] .bp-ai-credit-history tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .5rem;
    padding: .5rem;
  }

  body[data-layout] .bp-ai-credit-history td {
    display: block;
    min-width: 0;
    padding: .5rem;
    border: 0;
    overflow-wrap: anywhere;
  }

  body[data-layout] .bp-ai-credit-history td:first-child {
    grid-column: 1 / -1;
    white-space: nowrap;
  }

  body[data-layout] .bp-ai-credit-history td::before {
    display: block;
  }
}

@media (max-width: 767.98px) {
  body[data-layout] .bp-analysis-history th.bp-history-expiry,
  body[data-layout] .bp-analysis-history td.bp-history-expiry {
    display: none;
  }
}

.bp-autocorrect-attention {
  background-color: #ffe1b3 !important;
  color: #7a3e00;
}

.bp-manual-correction {
  background-color: #e7f1ff !important;
  box-shadow: inset 0 0 0 9999px #e7f1ff !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 767.98px) {
  .container main h1 {
    font-size: 1.35rem;
    line-height: 1.35;
  }
}