.family-settings > .card,
.account-settings > .card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.family-settings > .card > h2,
.account-settings > .card > h2,
.family-settings > .card > p {
  margin: 0;
}

.family-settings > .card > form + form {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.member-invite {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.settings-title {
  margin: 30px 0 14px;
  font-size: 1.25rem;
}

.account-settings {
  margin-top: 0;
}

.dashboard-library > .section-heading > .button {
  display: none;
}

.top-add {
  display: none;
}

.side-profile {
  flex-wrap: wrap;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

.profile-link:hover,
.profile-link:focus-visible,
.profile-link.active {
  background: var(--surface-soft);
}

.profile-link > span:last-child {
  display: grid;
}

.profile-link small {
  color: var(--muted);
  font-size: .7rem;
}

.logout-form {
  width: 100%;
  margin-top: 8px;
}

.logout-button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
}

.logout-button:hover {
  border-color: #b76a5d;
  color: #93483d;
}

.settings-logout {
  max-width: 320px;
  margin: 22px 0 5px;
}

.notification-settings-card > p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.notification-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.notification-option input {
  width: 18px;
  margin-top: 3px;
}

.notification-option span {
  display: grid;
  gap: 2px;
}

.notification-option small {
  color: var(--muted);
  font-weight: 400;
}

@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .top-add {
    display: inline-block;
  }

  .family-settings > .card,
  .account-settings > .card {
    gap: 15px;
  }
}

.scanner-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #060806;
}

.scanner-shell .scanner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: #000;
  z-index: 0;
}

.scanner-guide {
  position: relative;
  z-index: 2;
  width: min(82vw, 520px);
  aspect-ratio: 2.25 / 1;
  border: 3px solid #fff;
  border-radius: 16px;
  box-shadow: 0 0 0 100vmax #0008, inset 0 0 25px #0005;
  overflow: hidden;
}

.scanner-guide::before,
.scanner-guide::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #a9cd8f;
  border-style: solid;
}

.scanner-guide::before { left: -3px; top: -3px; border-width: 6px 0 0 6px; border-radius: 14px 0 0; }
.scanner-guide::after { right: -3px; top: -3px; border-width: 6px 6px 0 0; border-radius: 0 14px 0 0; }
.scanner-guide > span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-top: 2px solid #ef6b58;
  animation: scanner-line 2.2s ease-in-out infinite;
}

@keyframes scanner-line {
  0%,100% { top: 10px; }
  50% { top: calc(100% - 12px); }
}

.scanner-hint {
  position: fixed;
  z-index: 3;
  left: 20px;
  right: 20px;
  bottom: max(35px, env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 420px;
  padding: 11px 15px;
  border-radius: 999px;
  background: #111b;
  color: #fff;
  text-align: center;
  font-size: .9rem;
}

.scanner-hint::after {
  content: ' · Bei Unschärfe auf das Bild tippen';
}

.scanner-close {
  position: fixed;
  z-index: 4;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  background: #111b;
  color: #fff;
  font-size: 1.7rem;
}

.scanner-zoom {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 75px));
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(78vw, 380px);
  padding: 8px 13px;
  border-radius: 999px;
  background: #111c;
  color: #fff;
  transform: translateX(-50%);
  font-size: .8rem;
}

.scanner-zoom input {
  flex: 1;
  width: auto;
  accent-color: #a9cd8f;
}
