/* Capture participant experience, based on the CheckCog visual system. */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/manrope:vf@5.3.0/latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --app-font-sans: "Manrope Variable", "Avenir Next", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --app-color-ink: #121735;
  --app-color-brand: #111e8f;
  --app-color-primary: #dfe3ff;
  --app-color-primary-hover: #cdd3ff;
  --app-color-primary-active: #b9c1ff;
  --app-color-primary-ink: #071379;
  --app-color-focus: #3342b5;
  --app-color-muted: #626986;
  --app-color-line: #dfe2f1;
  --app-color-soft: #f0f2ff;
  --app-color-canvas: #f8f9fa;
  --app-radius-control: 999px;
  --app-shadow-control: 0 0.75rem 1.75rem rgba(17, 30, 143, 0.18);
  --bs-primary: #3342b5;
  --bs-primary-rgb: 51, 66, 181;
  --bs-primary-text-emphasis: #071379;
  --bs-primary-bg-subtle: #f0f2ff;
  --bs-primary-border-subtle: #b9c1ff;
  --bs-link-color: #25339e;
  --bs-link-color-rgb: 37, 51, 158;
  --bs-link-hover-color: #071379;
  --bs-link-hover-color-rgb: 7, 19, 121;
  --bs-focus-ring-color: rgba(51, 66, 181, 0.28);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--app-color-canvas);
  color: var(--app-color-ink);
  font-family: var(--app-font-sans);
  -webkit-font-smoothing: antialiased;
}

.app-root {
  min-height: 100%;
}

.app-screen-height {
  min-height: var(--app-viewport-height, 100dvh);
}

.btn,
button:not(.btn-close),
input:is([type="submit"], [type="button"], [type="reset"]) {
  border-radius: var(--app-radius-control);
}

.btn-primary {
  --bs-btn-color: var(--app-color-primary-ink);
  --bs-btn-bg: var(--app-color-primary);
  --bs-btn-border-color: var(--app-color-primary);
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: var(--app-color-primary-hover);
  --bs-btn-hover-border-color: var(--app-color-primary-hover);
  --bs-btn-focus-shadow-rgb: 51, 66, 181;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: var(--app-color-primary-active);
  --bs-btn-active-border-color: var(--app-color-primary-active);
  --bs-btn-disabled-color: #747a9a;
  --bs-btn-disabled-bg: #e8e9f3;
  --bs-btn-disabled-border-color: #e8e9f3;
}

.btn-outline-primary {
  --bs-btn-color: #25339e;
  --bs-btn-border-color: #7d88d3;
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: var(--app-color-primary);
  --bs-btn-hover-border-color: #7d88d3;
  --bs-btn-focus-shadow-rgb: 51, 66, 181;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: var(--app-color-primary-active);
  --bs-btn-active-border-color: #6572c4;
}

.welcome-page,
.auth-page,
.utility-page,
.completion-screen {
  display: grid;
  place-items: center;
  min-height: var(--app-viewport-height, 100dvh);
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--app-color-canvas);
  color: var(--app-color-ink);
  text-align: center;
}

.welcome-page__card,
.auth-card,
.completion-screen__card {
  width: min(100%, 32rem);
  border-radius: 2rem;
  padding: clamp(1.5rem, 7vw, 2.5rem);
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(18, 23, 53, 0.08);
}

.capture-logo {
  display: block;
  width: clamp(7rem, 28vw, 10rem);
  height: auto;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  clip-path: circle(47.5% at center);
  filter: drop-shadow(0 1rem 1.5rem rgba(18, 23, 53, 0.14));
}

.capture-logo--small {
  width: clamp(2.5rem, 10vw, 3.5rem);
  margin-bottom: 0;
}

.capture-character {
  display: block;
  height: auto;
  object-fit: contain;
}

.welcome-page__character {
  width: clamp(8rem, 30vw, 11rem);
  max-width: 52vw;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(18, 23, 53, 0.1));
}

.completion-screen__character {
  width: clamp(10rem, 28vh, 15rem);
  max-width: 60vw;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(18, 23, 53, 0.1));
}

.page-brand {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-brand__link {
  display: inline-flex;
  border-radius: 50%;
}

.page-brand__link:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 4px;
}

.page-brand__icon {
  display: block;
  width: clamp(2.5rem, 10vw, 3.5rem);
  height: auto;
  border-radius: 50%;
  clip-path: circle(47.5% at center);
  object-fit: contain;
  filter: drop-shadow(0 0.3rem 0.5rem rgba(17, 30, 143, 0.16));
}

.welcome-page h1,
.auth-card h1,
.completion-screen h1 {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.welcome-page h1 > span:first-child {
  display: block;
}

.welcome-page__brand-line {
  display: block;
  margin-top: 0.2em;
  color: var(--app-color-brand);
}

.welcome-page__copy,
.completion-screen__copy {
  margin: 1rem auto 1.75rem;
  color: var(--app-color-muted);
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  font-weight: 600;
  line-height: 1.5;
}

.welcome-page__actions {
  display: grid;
  gap: 0.75rem;
}

.welcome-page__actions .btn,
.completion-screen__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.welcome-page__actions .btn-primary,
.completion-screen__action.btn-primary {
  border-color: transparent;
  box-shadow: var(--app-shadow-control);
}

/* Authentication and utility screens */

.auth-form {
  margin-top: 1.75rem;
  text-align: left;
}

.auth-form__field + .auth-form__field {
  margin-top: 1.1rem;
}

.auth-form__hint {
  display: block;
  margin: -0.2rem 0 0.5rem;
  color: #747a96;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
}

.auth-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  margin-top: 1.5rem;
  border-color: transparent;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
  box-shadow: var(--app-shadow-control);
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--app-color-line);
  padding-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.auth-links a {
  text-underline-offset: 0.2em;
}

.auth-errors,
.form-errors {
  border: 0;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.auth-errors p,
.form-errors p {
  margin-bottom: 0.5rem;
}

.auth-errors ul,
.form-errors ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.utility-card {
  width: min(100%, 38rem);
}

.utility-card__copy {
  margin-top: 1.25rem;
  color: #454c70;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  line-height: 1.5;
}

.utility-card__copy p {
  margin: 0;
}

.utility-card__copy p + p {
  margin-top: 0.75rem;
}

.utility-card__instructions,
.participant-feedback-message {
  margin-top: 1.5rem;
  border-radius: 1.5rem;
  padding: clamp(1.1rem, 4vw, 1.5rem);
  background: var(--app-color-soft);
  color: #454c70;
  line-height: 1.5;
  text-align: left;
}

.utility-card__instructions > :last-child,
.participant-feedback-message > :last-child {
  margin-bottom: 0;
}

.utility-card__instructions ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.utility-card__footer-copy {
  margin: 1.5rem 0 0;
  color: var(--app-color-muted);
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  font-weight: 600;
  line-height: 1.5;
}

.utility-card__hero-icon {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--app-color-brand);
  font-size: 3rem;
  line-height: 1;
}

.utility-card__action {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  margin-top: 1.5rem;
  border-color: transparent;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
  box-shadow: var(--app-shadow-control);
}

.participant-feedback-message {
  margin-top: 0;
}

/* Notification prompt */

.push-prompt {
  position: fixed;
  z-index: 9999;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(18, 23, 53, 0.44);
  text-align: center;
}

.push-prompt__card {
  width: min(100%, 32rem);
  border-radius: 2rem;
  padding: clamp(1.5rem, 6vw, 2rem);
  background: #fff;
  color: var(--app-color-ink);
  box-shadow: 0 1.5rem 3.5rem rgba(18, 23, 53, 0.2);
}

.push-prompt__icon {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--app-color-brand);
  font-size: 2.5rem;
  line-height: 1;
}

.push-prompt__card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.push-prompt__card p {
  margin: 0.75rem 0 1.25rem;
  color: var(--app-color-muted);
  font-weight: 600;
}

.push-prompt__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.push-prompt__actions .btn {
  min-height: 3.5rem;
  font-weight: 750;
}

.push-prompt__help {
  margin-top: 1rem;
  color: var(--app-color-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Check-in home */

.check-in-home {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(6rem, env(safe-area-inset-bottom));
  background: var(--app-color-canvas);
  color: var(--app-color-ink);
}

.check-in-home__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  width: min(100%, 42rem);
}

.check-in-home__status {
  text-align: center;
}

.check-in-home__character {
  width: clamp(10rem, 26vh, 14rem);
  max-width: 56vw;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(18, 23, 53, 0.1));
}

.check-in-home__question {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.check-in-home__message {
  margin: 0.8rem 0 0;
  color: #454c70;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  line-height: 1.5;
}

.check-in-home__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
}

.check-in-home__actions form {
  display: flex;
  margin: 0;
}

.check-in-home__decision {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 5.5rem;
  padding: 1.15rem 1.5rem;
  font-size: clamp(1.2rem, 4.5vw, 1.55rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  box-shadow: var(--app-shadow-control);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.check-in-home__decision:hover {
  box-shadow: 0 1rem 2.25rem rgba(17, 30, 143, 0.22);
  transform: translateY(-0.125rem);
}

.check-in-home__decision--secondary {
  box-shadow: 0 0.5rem 1.5rem rgba(18, 23, 53, 0.08);
}

.check-in-home__navigation {
  position: absolute;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  gap: 0.75rem;
  transform: translateX(-50%);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--app-color-brand);
  box-shadow: 0 0.5rem 1.5rem rgba(18, 23, 53, 0.08);
  font-size: 1.4rem;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.icon-button:hover {
  background: #f5f6ff;
  color: var(--app-color-primary-ink);
  box-shadow: 0 0.75rem 1.75rem rgba(18, 23, 53, 0.12);
  transform: translateY(-0.125rem);
}

.icon-button:focus-visible,
.check-in-home__decision:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 4px;
}

/* Forms and participant profile */

.profile-page,
.flow-page,
.history-page,
.settings-page {
  min-height: var(--app-viewport-height, 100dvh);
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--app-color-canvas);
  color: var(--app-color-ink);
}

.profile-page__content,
.flow-page__content,
.history-page__content,
.settings-page__content {
  width: min(100%, 52rem);
  margin: 0 auto;
}

.flow-page__content--narrow,
.settings-page__content {
  width: min(100%, 42rem);
}

.profile-page__header,
.flow-page__header,
.history-page__header,
.settings-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

.profile-page__header h1,
.flow-page__header h1,
.history-page__header h1,
.settings-page__header h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.page-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--app-color-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-intro {
  max-width: 34rem;
  margin: 0.8rem auto 0;
  color: var(--app-color-muted);
  font-weight: 600;
  line-height: 1.5;
}

.profile-form,
.flow-card,
.settings-page__panel {
  border: 1px solid rgba(17, 30, 143, 0.14);
  border-radius: 2rem;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(18, 23, 53, 0.06);
}

.profile-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.profile-form__field {
  min-width: 0;
}

.profile-form__field--wide {
  grid-column: 1 / -1;
}

.profile-form .form-label,
.auth-form .form-label,
.session-form .form-label,
.drink-form .form-label,
.settings-form .form-label {
  margin-bottom: 0.5rem;
  color: #454c70;
  font-size: 0.9rem;
  font-weight: 750;
}

.profile-form .form-control,
.profile-form .form-select,
.auth-form .form-control,
.auth-form .form-select,
.session-form .form-control,
.session-form .form-select,
.drink-form .form-control,
.drink-form .form-select,
.settings-form .form-control,
.settings-form .form-select {
  min-height: 3.5rem;
  border: 1px solid #cdd1e5;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  background-color: #fcfcff;
  color: var(--app-color-ink);
  font-weight: 600;
}

.profile-form .form-control::placeholder,
.auth-form .form-control::placeholder {
  color: #7b809a;
  font-weight: 500;
  opacity: 1;
}

.profile-form .form-control:focus,
.profile-form .form-select:focus,
.auth-form .form-control:focus,
.auth-form .form-select:focus,
.session-form .form-control:focus,
.session-form .form-select:focus,
.drink-form .form-control:focus,
.drink-form .form-select:focus,
.settings-form .form-control:focus,
.settings-form .form-select:focus {
  border-color: var(--app-color-brand);
  background-color: #fff;
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.profile-form__fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.profile-form__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.profile-form__choice {
  position: relative;
}

.profile-form__choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-form__choice label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  border: 1px solid #cdd1e5;
  border-radius: var(--app-radius-control);
  padding: 0.7rem 1rem;
  background: #fcfcff;
  color: #454c70;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.profile-form__choice label:hover {
  border-color: var(--app-color-brand);
  background: #f5f6ff;
}

.profile-form__choice input:checked + label {
  border-color: transparent;
  background: var(--app-color-primary);
  color: var(--app-color-primary-ink);
  box-shadow: 0 0.4rem 1rem rgba(17, 30, 143, 0.12);
}

.profile-form__choice input:focus-visible + label {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 3px;
}

.profile-form__hint,
.form-hint {
  margin: 0.45rem 0 0;
  color: var(--app-color-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.profile-form__actions,
.flow-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--app-color-line);
  padding-top: 1.5rem;
}

.profile-form__actions .btn,
.flow-card__actions .btn,
.session-form__submit,
.drink-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.profile-form__actions .btn-primary,
.session-form__submit,
.drink-form__submit {
  border-color: transparent;
  box-shadow: var(--app-shadow-control);
}

/* Settings */

.settings-page {
  display: flex;
  align-items: center;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.settings-page__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-page__header {
  margin-bottom: 0.5rem;
}

.settings-page__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: var(--app-color-soft);
  color: var(--app-color-brand);
  font-size: 1.6rem;
}

.settings-page__details {
  margin: 0;
}

.settings-page__detail {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
}

.settings-page__detail:first-child {
  padding-top: 0;
}

.settings-page__detail:last-child {
  padding-bottom: 0;
}

.settings-page__detail + .settings-page__detail {
  border-top: 1px solid var(--app-color-line);
}

.settings-page__detail dt {
  color: #5f6682;
  font-size: 0.9rem;
  font-weight: 700;
}

.settings-page__detail dd {
  min-width: 0;
  margin: 0;
  color: var(--app-color-ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.settings-page__health-copy {
  margin: 1rem 0 0;
  border-radius: 1.25rem;
  padding: 1rem;
  background: var(--app-color-soft);
  color: #454c70;
  font-size: 0.9rem;
  line-height: 1.45;
}

.settings-page__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--app-color-line);
  padding-top: 1.25rem;
}

.settings-page__home {
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
}

.settings-page__home:hover {
  transform: translate(-50%, -0.125rem);
}

.settings-page__action-form {
  display: flex;
  margin: 0;
}

.settings-page__action {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.settings-form {
  margin-top: 1.25rem;
  border-top: 1px solid var(--app-color-line);
  padding-top: 1.25rem;
}

.settings-form__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.settings-form__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  min-height: 3.5rem;
  padding: 0 1rem;
  font-weight: 750;
  line-height: 1;
}

/* Drink category and detail screens */

.flow-card__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.flow-card__back {
  position: static;
  flex: 0 0 auto;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  border-radius: var(--app-radius-control);
  padding: 0.4rem 0.85rem;
  background: var(--app-color-soft);
  color: var(--app-color-primary-ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.drink-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.drink-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 10rem;
  border: 1px solid #cdd1e5;
  border-radius: 1.5rem;
  padding: 1rem 0.65rem;
  background: #fcfcff;
  color: var(--app-color-ink);
  font-family: var(--app-font-sans);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.drink-category-card:hover {
  border-color: #7d88d3;
  background: var(--app-color-soft);
  box-shadow: 0 0.75rem 1.5rem rgba(18, 23, 53, 0.08);
  transform: translateY(-0.125rem);
}

.drink-category-card:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 3px;
}

.drink-category-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 4.75rem;
  margin-bottom: 0.75rem;
  object-fit: contain;
}

.drink-detail-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.drink-detail-heading img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

.drink-detail-heading h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.drink-form,
.session-form {
  display: grid;
  gap: 1.25rem;
}

.drink-form__fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--app-color-soft);
  color: #454c70;
}

.drink-form__fact strong {
  color: var(--app-color-primary-ink);
}

.drink-form__cancel {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.drink-form__cancel .btn {
  color: var(--app-color-muted);
  font-weight: 650;
}

/* Session review and history */

.session-list {
  display: grid;
  gap: 0.75rem;
}

.session-drink {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--app-color-line);
  border-radius: 1.25rem;
  padding: 0.8rem 0.9rem;
  background: #fcfcff;
}

.session-drink__image {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: var(--app-color-soft);
}

.session-drink__image img {
  width: auto;
  max-width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
}

.session-drink__copy {
  min-width: 0;
  flex: 1;
}

.session-drink__copy strong,
.session-drink__copy span {
  display: block;
}

.session-drink__copy strong {
  color: var(--app-color-ink);
}

.session-drink__copy span {
  margin-top: 0.2rem;
  color: var(--app-color-muted);
  font-size: 0.9rem;
}

.session-drink__remove-form {
  flex: 0 0 auto;
  margin: 0;
}

.session-drink__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: #fff0f1;
  color: #a91f32;
}

.session-empty {
  display: grid;
  place-items: center;
  min-height: 8rem;
  border: 1px dashed #bfc4dd;
  border-radius: 1.5rem;
  padding: 1.25rem;
  color: var(--app-color-muted);
  font-weight: 650;
  text-align: center;
}

.session-review__add {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 0;
}

.session-review__add .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding-inline: 1.5rem;
  font-weight: 750;
  line-height: 1.2;
}

.session-review__divider {
  margin: 0.75rem 0 1.5rem;
  border: 0;
  border-top: 1px solid var(--app-color-line);
  opacity: 1;
}

.session-form__actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.session-form__actions form {
  display: flex;
  margin: 0;
}

.session-form__actions .btn {
  width: 100%;
  min-height: 3.75rem;
  font-weight: 750;
}

.history-page__header {
  position: relative;
}

.history-page__back {
  position: absolute;
  top: 0;
  left: 0;
}

.history-list {
  display: grid;
  gap: 0.8rem;
}

.history-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(17, 30, 143, 0.14);
  border-radius: 1.5rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(18, 23, 53, 0.05);
}

.history-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1.15rem;
  background: var(--app-color-soft);
  color: var(--app-color-primary-ink);
  line-height: 1;
}

.history-card__date strong {
  font-size: 1.35rem;
}

.history-card__date span {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

.history-card__copy h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.history-card__copy p {
  margin: 0.3rem 0 0;
  color: var(--app-color-muted);
  font-size: 0.9rem;
}

.history-empty {
  border: 1px dashed #bfc4dd;
  border-radius: 2rem;
  padding: clamp(2rem, 8vw, 4rem);
  background: #fff;
  color: var(--app-color-muted);
  text-align: center;
}

.history-empty i {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--app-color-brand);
  font-size: 2.5rem;
}

/* Application chrome */

.app-alert {
  z-index: 2000;
  width: min(90%, 32rem);
}

.app-alert .alert {
  border: 0;
  border-radius: 1.25rem;
}

.app-footer {
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) max(0.65rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--app-color-canvas);
  color: #7b809a;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 40rem) {
  .profile-form__grid,
  .profile-form__actions,
  .flow-card__actions,
  .session-form__actions,
  .settings-page__controls {
    grid-template-columns: 1fr;
  }

  .profile-form__field--wide {
    grid-column: auto;
  }

  .profile-form__choices,
  .drink-category-grid {
    gap: 0.5rem;
  }

  .drink-category-card {
    min-height: 8.5rem;
    padding: 0.75rem 0.4rem;
    font-size: 0.82rem;
  }

  .drink-category-card img {
    height: 3.5rem;
  }

  .settings-page__detail {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .settings-page__detail dd {
    text-align: left;
  }
}

@media (max-width: 30rem) {
  .check-in-home__actions {
    grid-template-columns: 1fr;
  }

  .check-in-home__decision {
    min-height: 4.75rem;
  }

  .drink-category-page {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .drink-category-page .flow-page__header {
    margin-bottom: 0.75rem;
  }

  .drink-category-page .flow-page__header h1 {
    font-size: 1.75rem;
  }

  .drink-category-page .page-intro {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .drink-category-page .flow-card {
    padding: 0.75rem;
  }

  .drink-category-page .flow-card__topbar {
    margin-bottom: 0.65rem;
  }

  .drink-category-page .drink-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .drink-category-page .drink-category-card {
    min-height: 7.5rem;
    border-radius: 1rem;
    padding: 0.45rem 0.2rem;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .drink-category-page .drink-category-card img {
    height: 2.75rem;
    margin-bottom: 0.35rem;
  }
}

@media (max-height: 36rem) and (min-width: 31rem) {
  .check-in-home__content {
    gap: 0.75rem;
  }

  .check-in-home__character,
  .completion-screen__character {
    width: 5.5rem;
    margin-bottom: 0.4rem;
  }

  .check-in-home__navigation {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .check-in-home__decision,
  .icon-button,
  .profile-form__choice label,
  .drink-category-card {
    transition: none;
  }
}
