/* ==========================================================================
   GSSMCS — member portal sign-in (login.html)
   ========================================================================== */

/* ---------- Boot splash (installed app only) ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: #070B14;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: opacity 0.25s var(--ease-out-expo);
}
html.is-standalone .splash { display: flex; }
.splash.fade-out { opacity: 0; pointer-events: none; }
.splash img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.splash strong {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.splash p {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: rgba(57, 167, 255, 0.9);
  animation: motto-reveal 0.6s var(--ease-out-expo) 0.15s both;
}
@keyframes motto-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Layout: brand panel (desktop) + sign-in column ---------- */
.portal {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-surface);
  color: var(--color-text-main);
  transition: color 300ms, background-color 300ms;
}

.brand-panel {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background-color: var(--navy);
  color: #fff;
  user-select: none;
}
html.dark .brand-panel { background-color: var(--ink); }
.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.brand-panel > * { position: relative; z-index: 10; }

.brand-panel__home { display: flex; align-items: center; gap: 0.875rem; text-align: left; }
.brand-panel__home:focus { outline: none; }
.brand-panel__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.brand-panel__home:hover .brand-panel__logo { transform: scale(1.05); }
.brand-panel__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.05));
}
.brand-panel__home strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  transition: color 150ms;
}
.brand-panel__home:hover strong { color: var(--color-accent); }
.brand-panel__home small {
  display: block;
  max-width: 280px;
  margin-top: 0.125rem;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.brand-panel h1 {
  max-width: 32rem;
  margin: auto 0;
  font-family: var(--font-serif);
  font-size: 1.875rem;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}
.brand-panel__foot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.brand-panel__foot em {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.025em;
}
.brand-panel__foot small { font-size: 0.75rem; line-height: 1rem; color: rgba(255, 255, 255, 0.5); }

.signin {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding:
    max(1.25rem, calc(env(safe-area-inset-top, 0px) + 0.85rem))
    max(1.25rem, calc(env(safe-area-inset-right, 0px) + 1.25rem))
    max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 0.85rem))
    max(1.25rem, calc(env(safe-area-inset-left, 0px) + 1.25rem));
  background-color: var(--color-surface);
  transition: color 150ms, background-color 150ms;
}
html.dark .signin { background-color: var(--ink); }

@media (min-width: 768px) {
  .portal { flex-direction: row; }
  .brand-panel { display: flex; width: 46%; }
}
@media (min-width: 1024px) {
  .brand-panel { width: 44%; padding: 3.5rem; }
  .brand-panel h1 { font-size: 2.25rem; line-height: 2.5rem; }
}
@media (min-width: 1280px) {
  .brand-panel { width: 42%; }
  .brand-panel h1 { font-size: 3rem; line-height: 1; }
}

/* ---------- Header ---------- */
.signin__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0cc;
}
html.dark .signin__header { border-color: rgba(255, 255, 255, 0.1); }
.signin__header .icon-btn:hover { color: var(--color-sapphire); }
html.dark .signin__header .icon-btn:hover { color: var(--color-accent); }
.signin__home .icon { width: 18px; height: 18px; transition: transform 300ms; }
.signin__home:hover .icon { transform: scale(1.1); }
.signin__mobile-brand { display: flex; align-items: center; gap: 0.5rem; }
.signin__mobile-brand img { width: 1.5rem; height: 1.5rem; object-fit: contain; }
.signin__mobile-brand span {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
html.dark .signin__mobile-brand span { color: #fff; }
.signin__actions { display: flex; align-items: center; gap: 0.375rem; }
@media (min-width: 640px) {
  .signin__home .icon { width: 1.25rem; height: 1.25rem; }
  .signin__bell .icon { width: 18px; height: 18px; }
  .signin__actions { gap: 0.5rem; }
}
@media (min-width: 768px) { .signin__mobile-brand { display: none; } }

/* ---------- Form column ---------- */
.signin__body { width: 100%; max-width: 28rem; margin: auto; padding: 2rem 0; }
@media (min-width: 640px) { .signin__body { padding: 3rem 0; } }
.signin__intro { margin-bottom: 2rem; }

.install-pill-row { margin-bottom: 0.875rem; }
.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.install-pill .icon { transition: transform 150ms; }
.install-pill:hover .icon { transform: scale(1.1); }

.signin__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-primary);
}
html.dark .signin__title { color: #fff; }
@media (min-width: 640px) { .signin__title { font-size: 1.875rem; line-height: 2.25rem; } }
@media (min-width: 1024px) { .signin__title { font-size: 2.25rem; line-height: 2.5rem; } }

/* Remembered member card */
.member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.875rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
}
html.dark .member-card { background-color: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.member-card__who { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.member-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: var(--color-sapphire);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.member-card__who > div { min-width: 0; }
.member-card__label { font-size: 0.75rem; line-height: 1rem; color: var(--color-text-subtle); }
.member-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.member-card__id { font-family: var(--font-mono); font-size: 10px; color: var(--color-accent); }
html.dark .member-card__label { color: rgba(255, 255, 255, 0.6); }
html.dark .member-card__name { color: #fff; }

.text-link {
  font-weight: 600;
  color: var(--color-sapphire);
  transition: color 150ms;
}
.text-link:hover { color: var(--color-accent); }
html.dark .text-link { color: var(--color-accent); }
html.dark .text-link:hover { color: #7dd3fc; }
.member-card .text-link {
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Status message */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  color: var(--color-crimson);
  transition: all 150ms;
}
.notice .icon { width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; }
.notice p { font-size: 0.75rem; line-height: 1.625; font-weight: 500; }
@media (min-width: 640px) { .notice p { font-size: 0.875rem; } }
.notice--success { background-color: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.notice--success .icon { color: #059669; }
html.dark .notice--success { background-color: #022c2266; border-color: #05966966; color: #6ee7b7; }
html.dark .notice--success .icon { color: #34d399; }

/* ---------- Form ---------- */
.signin-form > * + * { margin-top: 1.25rem; }
.form-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}
.form-row__head label {
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
html.dark .form-row__head label { color: rgba(255, 255, 255, 0.8); }
.form-row__head .text-link { font-size: 11px; font-weight: 500; }
.form-row__head .text-link:focus { outline: none; }

/* Detected identifier type: Email / Member ID / Username */
.id-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 200ms;
}
.id-type[data-type="email"] { background-color: #dbeafe; color: var(--color-sapphire); }
.id-type[data-type="memberId"] { background-color: #d1fae5; color: #065f46; }
.id-type[data-type="username"] { background-color: #f3e8ff; color: #6b21a8; }
html.dark .id-type[data-type="email"] { background-color: #1e3a8a66; color: #7dd3fc; }
html.dark .id-type[data-type="memberId"] { background-color: #064e3b66; color: #6ee7b7; }
html.dark .id-type[data-type="username"] { background-color: #581c8766; color: #d8b4fe; }

.input-wrap { position: relative; }
.input-wrap__icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding-left: 0.875rem;
  color: var(--color-text-subtle);
  pointer-events: none;
  transition: color 150ms;
}
.input-wrap:focus-within .input-wrap__icon { color: var(--color-sapphire); }
html.dark .input-wrap__icon { color: rgba(255, 255, 255, 0.4); }
html.dark .input-wrap:focus-within .input-wrap__icon { color: var(--color-accent); }

.input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: var(--color-text-main);
  font-size: 0.875rem;
  line-height: 1.25rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.input--password { padding-right: 2.75rem; }
.input:focus {
  outline: none;
  border-color: var(--color-sapphire);
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5), 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
html.dark .input { background-color: #0D1627; border-color: rgba(255, 255, 255, 0.15); color: #fff; }
html.dark .input:focus { border-color: var(--color-accent); }
html.dark .input::placeholder { color: rgba(255, 255, 255, 0.3); }

.reveal-password {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 0.875rem;
  color: var(--color-text-subtle);
  transition: color 150ms;
}
.reveal-password:hover { color: var(--color-primary); }
.reveal-password:focus { outline: none; }
html.dark .reveal-password { color: rgba(255, 255, 255, 0.4); }
html.dark .reveal-password:hover { color: #fff; }

.caps-warning {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  font-size: 11px;
  font-weight: 500;
  color: #d97706;
}
html.dark .caps-warning { color: #fbbf24; }

.remember-row { display: flex; align-items: center; justify-content: space-between; padding-top: 0.25rem; }
.remember-row label { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; user-select: none; }
.remember-row input { width: 1rem; height: 1rem; cursor: pointer; }
.remember-row span { font-size: 0.75rem; line-height: 1rem; color: var(--color-text-muted); }
html.dark .remember-row span { color: rgba(255, 255, 255, 0.7); }

.btn-primary--submit { padding: 0.875rem 1.5rem; transition-duration: 200ms; }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.or-divider { position: relative; display: flex; align-items: center; justify-content: center; }
.or-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #e2e8f0cc;
}
.or-divider span {
  position: relative;
  padding: 0 0.75rem;
  background-color: var(--color-surface);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
html.dark .or-divider::before { border-color: rgba(255, 255, 255, 0.1); }
html.dark .or-divider span { background-color: var(--ink); color: rgba(255, 255, 255, 0.5); }

.biometric > * + * { margin-top: 0.75rem; }
.biometric { padding-top: 0.25rem; }
.btn-biometric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  color: var(--color-sapphire);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 150ms;
}
.btn-biometric:active { transform: scale(0.99); }
.btn-biometric:disabled { opacity: 0.5; }
html.dark .btn-biometric { background-color: rgba(255, 255, 255, 0.05); color: var(--color-accent); }
html.dark .btn-biometric:hover { background-color: rgba(255, 255, 255, 0.1); }
@media (min-width: 640px) { .btn-biometric { font-size: 0.875rem; line-height: 1.25rem; } }

.signin__apply { padding-top: 1rem; text-align: center; }
.signin__apply p { font-size: 0.75rem; line-height: 1.625; color: var(--color-text-subtle); }
.signin__apply a { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.25rem; }
html.dark .signin__apply p { color: rgba(255, 255, 255, 0.6); }

.signin__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding-top: 1rem;
  font-size: 11px;
  color: var(--color-text-subtle);
}
.signin__footer button { text-decoration: underline; text-underline-offset: 2px; transition: color 150ms; }
.signin__footer button:hover { color: var(--color-primary); }
.signin__footer button:focus { outline: none; }
html.dark .signin__footer { color: rgba(255, 255, 255, 0.5); }
html.dark .signin__footer button:hover { color: #fff; }

/* ---------- Support & recovery dialog ---------- */
.support {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.support[hidden] { display: none; }
.support__panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  color: var(--color-text-main);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
html.dark .support__panel { background-color: #0D1627; border-color: rgba(255, 255, 255, 0.15); color: #fff; }
.support__x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  color: var(--color-text-subtle);
  transition: color 150ms;
}
.support__x:hover { color: var(--color-text-main); }
.support__x:focus { outline: none; }
html.dark .support__x { color: rgba(255, 255, 255, 0.5); }
html.dark .support__x:hover { color: #fff; }
.support__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.support__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--color-sapphire);
}
html.dark .support__badge { color: var(--color-accent); }
.support__head h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-primary);
}
.support__head p { font-size: 0.75rem; line-height: 1rem; color: var(--color-text-subtle); }
html.dark .support__head h3 { color: #fff; }
html.dark .support__head p { color: rgba(255, 255, 255, 0.6); }

.support__body { font-size: 0.75rem; line-height: 1.625; color: var(--color-text-muted); }
.support__body > * + * { margin-top: 0.875rem; }
html.dark .support__body { color: rgba(255, 255, 255, 0.8); }
.support__box {
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
}
.support__box > * + * { margin-top: 0.5rem; }
.support__box--tight > * + * { margin-top: 0.25rem; }
html.dark .support__box { background-color: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.support__box-title { display: flex; align-items: center; gap: 0.375rem; font-weight: 600; color: var(--color-primary); }
.support__box-title .icon { color: var(--color-sapphire); }
html.dark .support__box-title { color: #fff; }
html.dark .support__box-title .icon { color: var(--color-accent); }
.support__value {
  padding-left: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--color-sapphire);
}
.support__value--strong { font-weight: 600; }
html.dark .support__value { color: var(--color-accent); }
.support__hours { padding-left: 1.25rem; font-size: 11px; color: var(--color-text-subtle); }
html.dark .support__hours { color: rgba(255, 255, 255, 0.6); }
.support__footer { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
.support__close {
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  background-color: #f1f5f9;
  color: var(--color-text-main);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 150ms;
}
.support__close:hover { background-color: #e2e8f0; }
html.dark .support__close { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
html.dark .support__close:hover { background-color: rgba(255, 255, 255, 0.15); }

/* ---------- "Add to Home Screen" / "Install App" bottom sheets ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-color: #02061766;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sheet[hidden] { display: none; }
.sheet__panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: 1.5rem 1.5rem 0 0;
  border: 1px solid #e2e8f0cc;
  background-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  color: var(--color-text-main);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}
html.dark .sheet__panel { background-color: rgba(12, 34, 64, 0.95); border-color: rgba(255, 255, 255, 0.15); color: #fff; }
.sheet__handle {
  width: 2.5rem;
  height: 0.25rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background-color: #cbd5e1;
}
html.dark .sheet__handle { background-color: rgba(255, 255, 255, 0.2); }
.sheet__x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem;
  border-radius: 9999px;
  color: var(--color-text-subtle);
  transition: color 150ms, background-color 150ms;
}
.sheet__x:hover { color: var(--color-text-main); background-color: #f1f5f9; }
.sheet__x:focus { outline: none; }
html.dark .sheet__x { color: rgba(255, 255, 255, 0.6); }
html.dark .sheet__x:hover { color: #fff; background-color: rgba(255, 255, 255, 0.1); }

.sheet__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.sheet__head img {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
}
.sheet__head h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-primary);
}
.sheet__head p { margin-top: 0.25rem; font-size: 0.75rem; line-height: 1rem; color: var(--color-text-subtle); }
html.dark .sheet__head h3 { color: #fff; }
html.dark .sheet__head p { color: rgba(255, 255, 255, 0.6); }

.sheet__list { margin-bottom: 1.5rem; }
.sheet__list > * + * { margin-top: 0.75rem; }
.sheet__list--features > * + * { margin-top: 0.625rem; }
.sheet__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0cc;
  background-color: #f8fafccc;
}
.sheet__list--features .sheet__item { align-items: center; padding: 0.75rem; }
html.dark .sheet__item { background-color: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.sheet__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  border-radius: 0.75rem;
  color: var(--color-sapphire);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
}
.sheet__list--features .sheet__num { margin-top: 0; }
html.dark .sheet__num { color: var(--color-accent); }
.sheet__item > div:last-child { flex: 1; }
.sheet__item strong {
  display: block;
  font-size: 0.75rem;
  line-height: 1.375;
  font-weight: 600;
  color: var(--color-primary);
}
.sheet__list--features .sheet__item strong { line-height: 1.25; }
.sheet__item small {
  display: block;
  margin-top: 0.125rem;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-subtle);
}
html.dark .sheet__item strong { color: #fff; }
html.dark .sheet__item small { color: rgba(255, 255, 255, 0.6); }

/* Inline "button" chips that mimic Safari's UI */
.ui-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background-color: #e2e8f0;
  color: var(--color-text-main);
  font-size: 11px;
  font-weight: 500;
  vertical-align: baseline;
}
.ui-chip--mono { font-family: var(--font-mono); font-weight: inherit; }
.ui-chip svg { display: inline; margin-right: 0.125rem; }
.ui-chip .icon { margin-right: 0.25rem; color: var(--color-sapphire); }
html.dark .ui-chip { background-color: rgba(255, 255, 255, 0.15); color: #fff; }
html.dark .ui-chip .icon { color: var(--color-accent); }

.sheet__actions > * + * { margin-top: 0.75rem; }
.sheet__actions--tight > * + * { margin-top: 0.625rem; }
.sheet__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding-top: 0.25rem;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-sapphire);
  animation: bounce 1s infinite;
}
html.dark .sheet__hint { color: var(--color-accent); }
.sheet__secondary {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-subtle);
  transition: color 150ms;
}
.sheet__secondary:hover { color: var(--color-text-main); }
html.dark .sheet__secondary { color: rgba(255, 255, 255, 0.7); }
html.dark .sheet__secondary:hover { color: #fff; }

@media (min-width: 640px) {
  .sheet { align-items: center; padding: 1rem; }
  .sheet__panel { max-width: 28rem; padding: 1.75rem; border-radius: 1.5rem; }
  .sheet__handle { display: none; }
  .sheet__x { top: 1.25rem; right: 1.25rem; }
  .sheet__head img { width: 4rem; height: 4rem; }
  .sheet__head h3 { font-size: 1.25rem; }
  .sheet__steps .sheet__item strong { font-size: 0.875rem; }
  .sheet__hint { display: none; }
}
