.reflection-check-in-page {
  background:
    radial-gradient(circle at 50% 18%, rgba(100, 92, 173, .28), transparent 28%),
    radial-gradient(circle at 50% 78%, rgba(55, 151, 167, .13), transparent 30%),
    #171b35;
  color: #fff;
}

.reflection-check-in-page .page-shell {
  padding: 0;
  overflow-y: auto;
  background: transparent;
}

.reflection-check-in-page > .page-shell > #pageBack {
  display: none;
}

.check-in-loading,
.check-in-error,
.check-in-flow,
.check-in-result,
.check-in-history {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  box-sizing: border-box;
}

.check-in-loading,
.check-in-error {
  padding: 90px 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.check-in-loader {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: check-in-spin .8s linear infinite;
}

.check-in-loading p,
.check-in-error h1 {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.5;
}

.check-in-error button {
  min-height: 48px;
  margin-top: 20px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #28304e;
  font-weight: 750;
}

.check-in-flow {
  padding: max(28px, env(safe-area-inset-top)) 22px max(34px, env(safe-area-inset-bottom));
}

.check-in-head {
  padding-left: 54px;
}

.check-in-flow .quick-back,
.check-in-result .quick-back,
.check-in-history .quick-back {
  position: fixed;
  z-index: 5;
  top: max(18px, calc(env(safe-area-inset-top) + 10px));
  left: max(18px, calc(50% - 260px + 18px));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #252c49;
  box-shadow: 0 8px 22px rgba(4, 10, 32, .24);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.check-in-step {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 700;
}

.check-in-step span:last-child {
  color: #a8ddd4;
}

.check-in-progress {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.check-in-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78c9d2, #be8cce);
  transition: width 220ms ease;
}

.check-in-question {
  padding-top: clamp(42px, 8vh, 78px);
}

.check-in-question > p:first-child,
.check-in-result-kicker {
  margin: 0;
  color: #e5a8ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.check-in-question h1,
.check-in-result h1,
.check-in-history h1 {
  max-width: 470px;
  margin: 14px 0 28px;
  color: #fff;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.check-in-question h1:focus,
.check-in-result h1:focus,
.check-in-history h1:focus {
  outline: none;
}

.check-in-options {
  display: grid;
  gap: 11px;
}

.check-in-options button {
  width: 100%;
  min-height: 62px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 19px;
  background: rgba(73, 84, 128, .56);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.check-in-options button i {
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
}

.check-in-options button[aria-checked="true"] {
  border-color: rgba(172, 221, 219, .88);
  background: rgba(87, 118, 150, .82);
}

.check-in-options button[aria-checked="true"] i {
  border: 5px solid #fff;
  background: #70bbb8;
}

.check-in-options button:disabled {
  cursor: wait;
  opacity: .66;
}

.check-in-options button:focus-visible,
.check-in-complete:focus-visible,
.check-in-result-actions button:focus-visible,
.check-in-history button:focus-visible {
  outline: 3px solid rgba(173, 220, 255, .88);
  outline-offset: 3px;
}

.check-in-disclosure,
.check-in-pause,
.check-in-result-disclosure {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  line-height: 1.55;
}

.check-in-pause {
  margin-top: 6px;
}

.check-in-inline-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #ffd1d7;
  font-size: 13px;
  line-height: 1.45;
}

.check-in-complete,
.check-in-result-actions button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #29314e;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.check-in-complete:disabled {
  cursor: wait;
  opacity: .66;
}

.check-in-result,
.check-in-history {
  padding: max(92px, calc(env(safe-area-inset-top) + 74px)) 22px max(38px, env(safe-area-inset-bottom));
}

.check-in-result-summary {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
  line-height: 1.7;
}

.check-in-dimensions {
  padding: 18px;
  display: grid;
  gap: 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .07);
}

.check-in-dimension > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

.check-in-dimension strong {
  font-variant-numeric: tabular-nums;
}

.check-in-dimension-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.check-in-dimension-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70c5c6, #c28bcf);
}

.check-in-suggestions {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  color: #29314d;
}

.check-in-suggestions h2 {
  margin: 0;
  font-size: 14px;
}

.check-in-suggestions ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.check-in-suggestions li {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.check-in-result-actions {
  display: grid;
  gap: 9px;
}

.check-in-result-actions button {
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.check-in-result-actions .check-in-talk {
  margin-top: 18px;
  border: 0;
  background: #fff;
  color: #29314e;
}

.check-in-history-list {
  display: grid;
  gap: 12px;
}

.check-in-history-list article {
  padding: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(255, 255, 255, .07);
}

.check-in-history-open {
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.check-in-history-open span,
.check-in-history-open strong,
.check-in-history-open small {
  display: block;
}

.check-in-history-open span,
.check-in-history-open small {
  color: rgba(255, 255, 255, .64);
  font-size: 11px;
  line-height: 1.45;
}

.check-in-history-open strong {
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.45;
}

.check-in-history-delete {
  min-width: 56px;
  min-height: 48px;
  align-self: center;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 130, 145, .12);
  color: #ffd3da;
  font-size: 12px;
}

.check-in-history-empty {
  padding: 28px 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  color: rgba(255, 255, 255, .72);
  text-align: center;
}

@media (max-width: 560px) {
  .check-in-flow .quick-back,
  .check-in-result .quick-back,
  .check-in-history .quick-back {
    left: 18px;
  }
}

@media (max-width: 350px) {
  .check-in-flow {
    padding-inline: 16px;
  }

  .check-in-question h1 {
    font-size: 24px;
  }

  .check-in-options button {
    min-height: 56px;
    font-size: 14px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .check-in-flow,
  .check-in-result,
  .check-in-history {
    width: min(100%, 760px);
  }

  .check-in-question {
    padding-top: 24px;
  }

  .check-in-options {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .check-in-loader {
    animation: none;
  }

  .check-in-progress i,
  .check-in-options button {
    transition: none;
  }
}

@keyframes check-in-spin {
  to { transform: rotate(360deg); }
}
