/* Native guest screens use the family's paper, ink and illustrated notebook. */
html.is-native-app #authGate {
  min-height: 100dvh;
  align-content: center;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background-color: #f3efe4;
  background-image: linear-gradient(90deg, rgb(114 112 78 / 5%) 1px, transparent 1px), linear-gradient(rgb(114 112 78 / 5%) 1px, transparent 1px);
  background-size: 24px 24px;
}
html.is-native-app #authGate .auth-return-link,
html.is-native-app #authGate .marketing-header,
html.is-native-app #authGate .marketing-footer { display: none; }
:is(.native-welcome, .native-pairing) {
  box-sizing: border-box;
  width: min(100%, 475px);
  min-width: 0;
  margin: 0 auto;
  border: 1px solid #d7cfbb;
  border-radius: 22px;
  color: #262e23;
  background: #fffdf7;
  box-shadow: 0 12px 38px rgb(58 51 29 / 9%);
}
.native-welcome:not([hidden]) { display: grid; }
.native-welcome-brand { padding: 14px 22px; }
.native-welcome-brand .brand { --brand-mark-size: 43px; --brand-name-size: 25px; }
.native-welcome-art { width: 100%; height: auto; aspect-ratio: 2.35; object-fit: cover; object-position: 50% 59%; display: block; }
.native-welcome-copy { padding: 24px clamp(18px, 5vw, 32px) 11px; }
#nativeWelcome h1, #nativePairing h1 {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 8vw, 46px);
  line-height: 1.06; letter-spacing: -.045em; color: #273422;
}
#nativeWelcome p, #nativePairing > p, .native-viewfinder p {
  margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: #535849;
}
.native-welcome-actions { display: grid; gap: 9px; margin-block: 22px 4px; }
.native-auth-choice, .native-pairing-submit, .native-scan-button {
  width: 100%; min-height: 53px; padding: 11px 16px; border-radius: 13px; border: 1px solid #215849;
  background: #245f50; color: #fffdf5; font: inherit; font-weight: 700; line-height: 1.3;
}
.native-auth-choice { display: grid; grid-template-columns: 21px minmax(0, 1fr) 14px; align-items: center; gap: 11px; text-align: left; }
.native-auth-choice svg, .native-scan-button svg { width: 21px; height: 21px; flex-shrink: 0; }
.native-auth-choice svg:last-child { width: 14px; height: 14px; }
.native-child-choice, .native-scan-button { color: #304832; background: #eeeedd; border-color: #c9cfb6; }
#nativeWelcome .native-register { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; margin: 0; font-size: 14px; }
.native-register button, .native-photo-button, .native-auth-back {
  --action-bg: transparent; --action-hover: #eef2e9; --action-border: transparent; --action-shadow: none; --action-ink: #245f50;
  width: auto; background: transparent; border: 0; color: #245f50; text-decoration: underline;
  text-underline-offset: 3px; font: inherit; font-weight: 700; min-height: 48px; padding: 8px 4px;
}
.native-auth-back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.native-auth-back[hidden] { display: none; }
.native-pairing { padding: 10px clamp(18px, 5vw, 32px) 26px; }
.native-pairing-icon {
  display: grid; place-items: center; border-radius: 14px; width: 54px; height: 54px;
  margin-block: 10px 13px; background: #e8ecd7; color: #456044; transform: rotate(-3deg);
}
.native-pairing-icon svg { width: 30px; height: 30px; }
#nativePairing h1 { font-size: clamp(29px, 7.5vw, 39px); }
.native-scan-actions { margin-block: 18px 7px; display: grid; justify-items: start; }
.native-scan-button:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 10px; }
#nativePairingForm { border-top: 1px solid #ddd9c9; padding-top: 19px; display: grid; gap: 8px; }
#nativePairingForm label { font-size: 14px; font-weight: 700; }
#nativePairingCode {
  width: 100%; box-sizing: border-box; min-height: 56px; padding: 8px 14px; font: 600 25px/1.3 ui-monospace, monospace;
  letter-spacing: .13em; background: #fff; border: 1px solid #aaa995; border-radius: 12px;
}
#nativePairingCode::placeholder { color: #888a80; }
.native-pairing-submit { margin-top: 5px; }
.native-viewfinder { margin: 0 0 14px; }
.native-viewfinder video { width: 100%; aspect-ratio: 4 / 3; max-height: 36vh; background: #25352b; border-radius: 12px; object-fit: cover; }
#nativePairing .native-pairing-status { margin-top: 12px; font-size: 15px; font-weight: 600; color: #81412d; }
.native-pairing button:disabled { opacity: .58; }
:is(.native-welcome, .native-pairing) :is(button, input):focus-visible, .native-auth-back:focus-visible {
  outline: 3px solid #90520b; outline-offset: 2px;
}
@media (min-width: 760px) and (min-height: 470px) {
  .native-welcome { width: min(92vw, 890px); grid-template-columns: 46% minmax(0, 1fr); border-radius: 24px; }
  .native-welcome-brand { grid-column: 2; grid-row: 1; padding: 29px 32px 12px; }
  .native-welcome-art { grid-column: 1; grid-row: 1 / 3; border-radius: 23px 0 0 23px; height: 100%; min-height: 0; aspect-ratio: auto; }
  .native-welcome-copy { grid-column: 2; padding: 18px 32px 20px; }
  .native-welcome-actions { margin-top: 25px; }
}
@media (max-width: 360px) {
  html.is-native-app #authGate { padding-inline: 8px; }
  .native-welcome-copy { padding-inline: 14px; }
  .native-auth-choice { padding-inline: 12px; gap: 8px; }
}
@media (max-height: 480px) {
  html.is-native-app #authGate { align-content: start; }
  .native-welcome-art { max-height: 110px; }
}

html.is-native-app #signup {
  padding: 10px clamp(18px, 5vw, 32px) 25px;
  background: #fffdf7;
  border: 1px solid #d7cfbb;
}
html.is-native-app #signup .mobile-auth-brand { margin-block: 6px 18px; }
html.is-native-app #signup .mobile-auth-brand .brand { --brand-mark-size: 42px; --brand-name-size: 23px; }
html.is-native-app #signup > .panel-header {
  display: block; padding: 0; margin-block: 0 16px; background: transparent; border: 0;
}
html.is-native-app #signup > .panel-header .form-topic-illustration,
html.is-native-app #signup .auth-mode { display: none; }
html.is-native-app #signup #authPanelTitle {
  font: 700 clamp(27px, 7vw, 34px)/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em; overflow-wrap: normal;
}
