body:has(.settings-screen) { background: #f8f8f8; }
.settings-screen { min-height: calc(100dvh - env(safe-area-inset-top)); padding-bottom: calc(env(safe-area-inset-bottom) + 40px); background: #f8f8f8; color: #2d2d2d; font-family: 'Instrument Sans', sans-serif; font-size: 15px; font-weight: 450; line-height: 1.6; letter-spacing: .15px; }
.settings-header { padding: 20px; border-bottom: 1px solid #eee; color: #1f4d4d; }
.settings-header h1, .settings-delete-intro h2 { font-size: 20px; font-weight: 550; line-height: 1.45; letter-spacing: -.2px; }
.settings-section { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-bottom: 1px solid #eee; }
.settings-section > h2 { color: #1f4d4d; font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: .44px; text-transform: uppercase; }
.settings-group { width: 100%; overflow: hidden; border-radius: 12px; background: white; }
.settings-group > :not(:last-child) { border-bottom: 1px solid #eee; }
.settings-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; }
.settings-row > img, .settings-link-row > img { flex-shrink: 0; }
.settings-row--stack { flex-direction: column; align-items: stretch; }
.settings-row-copy { flex: 1; min-width: 0; }
.settings-email { overflow-wrap: anywhere; }
.settings-caption { color: #707070; font-size: 13px; line-height: 1.5; letter-spacing: .13px; }
.settings-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: #d9efef; color: #1f4d4d; font-size: 17px; font-weight: 550; }
.settings-badge { flex-shrink: 0; padding: 4px 8px; border-radius: 999px; background: #f2f8f8; color: #306d6d; font-size: 12px; font-weight: 550; line-height: 1.5; letter-spacing: 0; }
.settings-remaining { white-space: nowrap; margin-right: -8px; }
.settings-link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; cursor: pointer; }
.settings-segments { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eee; }
.settings-segments button { flex: 1; padding: 8px 0; border-radius: 10px; color: #707070; font-size: 14px; font-weight: 550; line-height: 1.5; cursor: pointer; }
.settings-segments button[aria-pressed="true"] { background: white; color: #1f4d4d; box-shadow: 0 1px 2px #00000014; }
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings-switch { position: relative; flex: 0 0 64px; width: 64px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 0; }
.settings-switch::before { content: ''; position: absolute; width: 64px; height: 28px; top: 8px; left: 0; border-radius: 100px; background: #b4b4b4; }
.settings-switch::after { content: ''; position: absolute; width: 38px; height: 24px; top: 10px; left: 2px; border-radius: 100px; background: white; }
.settings-switch[aria-checked="true"]::before { background: #5a9999; }
.settings-switch[aria-checked="true"]::after { left: 24px; }
.settings-switch:disabled { opacity: .6; cursor: wait; }
.settings-error { color: #b3261e; font-size: 13px; line-height: 1.5; }
.settings-error:empty { display: none; }
.settings-inline-link { color: #1f4d4d; text-decoration: underline; text-align: left; font-size: 13px; }
.settings-section--actions { border-bottom: 0; }
.settings-sign-out { color: #1f4d4d; font-weight: 550; cursor: pointer; }
.settings-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 20px 20px; }
.settings-delete-link { color: #b3261e; min-height: 32px; }
.settings-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 14px 24px; border: 0; border-radius: 12px; background: #1f4d4d; color: white; font: 600 13px/1.6 'Instrument Sans', sans-serif; cursor: pointer; }
.settings-button--secondary { background: #eee; color: #1f4d4d; }
.settings-screen :is(a,button,input):focus-visible { outline: 2px solid #306d6d; outline-offset: -2px; }
.settings-delete-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: 448px; max-height: calc(100dvh - env(safe-area-inset-top) - 20px); margin: 0 auto; padding: 16px 0 max(32px, env(safe-area-inset-bottom)); overflow-y: auto; border: 0; border-radius: 24px 24px 0 0; background: white; color: #2d2d2d; }
.settings-delete-dialog::backdrop { background: #0006; }
.settings-delete-grabber { position: absolute; top: 6px; left: calc(50% - 30px); width: 60px; height: 4px; border-radius: 100px; background: #ccc; }
.settings-delete-intro { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-bottom: 1px solid #eee; color: #707070; }
.settings-delete-intro h2 { color: #1f4d4d; }
.settings-delete-intro a { color: #1f4d4d; text-decoration: underline; }
.settings-delete-confirm { display: flex; align-items: center; gap: 8px; padding: 20px; border-bottom: 1px solid #eee; cursor: pointer; }
.settings-delete-confirm input[type="checkbox"] { appearance: none; width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 8px; background: #eee; }
.settings-delete-confirm input:checked { appearance: auto; accent-color: #1f4d4d; }
.settings-delete-buttons { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.settings-button--danger { background: #b3261e; }
.settings-button--danger:disabled { background: #f3dcda; color: #8c4a45; cursor: default; }
.settings-header--back { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.settings-header--back h1 { text-align: center; }
.settings-back { display: flex; align-items: center; gap: 4px; letter-spacing: .15px; }
.settings-gift-list { border-bottom: 0; }
.settings-gift-cover { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 4px; object-fit: cover; background: #d9efef; }
.settings-gift-title { font-size: 13px; font-weight: 550; line-height: 1.5; letter-spacing: .13px; overflow-wrap: anywhere; }
.settings-copy-button { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: #eee; color: #1f4d4d; cursor: pointer; }
.settings-copy-button[data-copied="true"] img { visibility: hidden; }
.settings-copy-button[data-copied="true"]::after { content: '✓'; position: absolute; font-size: 20px; }
.settings-copy-status { color: #1f4d4d; font-size: 13px; line-height: 1.5; }
.settings-copy-status:empty { display: none; }
@media (max-width: 374px) {
  .settings-header--back { grid-template-columns: auto minmax(0, 1fr); }
  .settings-header--back > :last-child { display: none; }
  .settings-header--back h1 { text-align: right; }
  .settings-badge { max-width: 48%; overflow-wrap: anywhere; }
}
