/*
  61-settings.css — v46.0 Settings and its pages (design/settings/Settings,
  Setup). The Settings screen is dark with cream cards; its pages open in
  the app's dialog, which is cream, so the same cards sit on cream there.
*/

.st-screen { padding: 4px 0 24px; }
.st-title { margin: 6px 2px 10px; font-size: 22px; font-weight: 700; color: #f1e4c4; text-shadow: none; letter-spacing: 0; font-family: inherit; }
.st-label { margin: 14px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #bfae8c; }
.st-page .st-label { color: #5c4a30; }
.st-page .st-label:first-child { margin-top: 2px; }
.st-card { overflow: hidden; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; }
.st-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; box-sizing: border-box;
  padding: 8px 12px; border: 0; border-bottom: 1px solid #ddd0ab; background: transparent;
  color: #231a10; font: inherit; text-align: left; cursor: pointer;
}
.st-row:last-child { border-bottom: 0; }
.st-row > .cx-icon { flex-shrink: 0; color: #845c0f; }
.st-row-static { cursor: default; }
.st-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-row-title { font-size: 15px; font-weight: 700; color: #231a10; }
.st-row-sub { font-size: 13px; font-weight: 400; line-height: 1.35; color: #5c4a30; }
.st-value { flex-shrink: 0; font-size: 14px; color: #5c4a30; }
.st-chev { flex-shrink: 0; fill: none; stroke: #6e5b40; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.st-tag { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; border: 1px solid #b9a77f; font-size: 11px; font-weight: 700; color: #845c0f; }
.st-row:hover { background: #e8dbb6; }
.st-row-static:hover { background: transparent; }
.st-row:focus-visible, .st-switch:focus-visible, .st-part:focus-visible, .st-btn:focus-visible { outline: 2px solid #845c0f; outline-offset: -2px; }

/* Campaign setup: the module switches */
.st-modules { padding: 0; }
.st-module { padding: 10px 12px; border-bottom: 1px solid #ddd0ab; }
.st-module:last-child { border-bottom: 0; }
.st-module-row { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.st-module-row > .cx-icon { flex-shrink: 0; color: #845c0f; }
.st-module-row .st-row-title { flex: 1 1 auto; }
.st-switch { position: relative; flex-shrink: 0; width: 52px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: #d7c8a2; cursor: pointer; }
.st-switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fbf7ec; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s ease; }
.st-switch[aria-checked="true"] { background: #845c0f; }
.st-switch[aria-checked="true"] span { left: 25px; }
.st-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px 32px; }
.st-part { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #b9a77f; background: transparent; color: #5c4a30; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.st-part.is-on { border-color: #845c0f; background: #845c0f; color: #fbf7ec; }
.st-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.st-actions:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.st-btn { min-height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid #b9a77f; background: transparent; color: #231a10; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.st-btn.st-danger { border-color: #d9a495; color: #8a2f20; }

/* A note under the actions */
.st-note { margin: 10px 4px 0; font-size: 13px; color: #5c4a30; }

/* About */
.st-about { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 4px; text-align: center; color: #231a10; }
.st-about img { border-radius: 16px; }
.st-about-name { font-size: 20px; font-weight: 700; }
.st-about-version { font-size: 13px; color: #5c4a30; }
.st-about p { margin: 8px 0 0; font-size: 14px; color: #5c4a30; }
.st-banana { display: block; margin: 14px auto 0; }
@media (prefers-reduced-motion: reduce) { .st-switch span { transition: none; } }

/* ---------- v46.0.1: pages inside the Settings screen ---------- */
.st-screen .st-page .st-label { color: #bfae8c; }
.st-pagehead { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 0 6px; }
.st-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 6px 0 0; border: 0; background: none; color: #e8c069; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.st-back svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-pagetitle { flex: 1 1 auto; margin: 0; text-align: center; font-size: 17px; font-weight: 700; color: #f1e4c4; text-shadow: none; letter-spacing: 0; font-family: inherit; }
.st-pagehead .st-tag { border-color: #6e5b40; color: #e8c069; }
.st-pagehead::after { content: ""; width: 70px; }
.st-pagehead:has(.st-tag)::after { display: none; }
@media (min-width: 900px) { .st-pagehead { display: none; } }

/* You */
.st-you { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; color: #f1e4c4; }
.st-you-face { position: relative; flex-shrink: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.st-face { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 999px; background: #8fb3a0; color: #1f1712; font-size: 26px; font-weight: 800; }
.st-face img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.st-cam { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: #845c0f; color: #fbf7ec; border: 2px solid #33261b; }
.st-you-name { font-size: 20px; font-weight: 700; }
.st-you-sub { font-size: 13px; color: #bfae8c; }
.st-btn.st-wide { display: block; width: 100%; margin-top: 12px; background: #efe4c3; border-color: #ddd0ab; }
.st-btn.st-wide.st-danger { color: #8a2f20; }
.st-btn.st-small { min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.st-row-danger .st-row-title, .st-row-danger > .cx-icon { color: #8a2f20; }

/* Backups and sync */
.st-sync { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; }
.st-sync[data-state="live"] { background: #e4ecd4; border-color: #c6d6ad; }
.st-sync[data-state="error"] { background: #f6e1db; border-color: #e3b8ab; }
.st-sync-dot { flex-shrink: 0; width: 12px; height: 12px; border-radius: 999px; background: #8f8574; }
.st-sync[data-state="live"] .st-sync-dot { background: #4fb06b; }
.st-sync[data-state="saving"] .st-sync-dot { background: #e0a43a; }
.st-sync[data-state="remote"] .st-sync-dot { background: #5a9bd4; }
.st-sync[data-state="error"] .st-sync-dot { background: #a33a2a; }
.st-sync .st-btn { background: #fbf7ec; }
.st-note-box { padding: 10px 12px; border-radius: 12px; border: 1px dashed #6e5b40; color: #bfae8c; }
.st-module-sub { display: block; }

/* The party password sheet (in the bar's sheet) */
.st-field { display: flex; flex-direction: column; gap: 4px; }
.st-field label { font-size: 13px; font-weight: 700; color: #3d2f1d; }
.st-field input { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid #b9a77f; background: #fbf7ec; color: #231a10; font: inherit; font-size: 16px; }
.st-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; font-weight: 400; color: #3d2f1d; }
.st-check input { width: 22px; height: 22px; accent-color: #845c0f; }
.st-match { display: flex; align-items: center; gap: 6px; min-height: 20px; font-size: 13px; color: #5c4a30; }
.st-match.is-ok { color: #2f6b3f; font-weight: 600; }
.st-pwfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid #ddd0ab; font-size: 13px; color: #5c4a30; }
.st-pwfoot .cb-link { min-height: 32px; }
#cbSheet .cb-btn[disabled] { opacity: .5; cursor: default; }

/* Campaign setup: two columns on a desktop (design/settings/Desktop) */
.st-cols { display: block; }
@media (min-width: 900px) {
  .st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
  .st-col > .st-label:first-child { margin-top: 2px; }
}
.dk-tag { border-color: #6e5b40; color: #e8c069; }
.dk-channel.is-on .dk-tag { border-color: #1f1712; color: #1f1712; }
/* Buttons and notes on the dark Settings screen (the pages are dark now). */
.st-screen .st-btn { background: #efe4c3; border-color: #ddd0ab; color: #231a10; }
.st-screen .st-btn.st-danger { background: #f6e1db; border-color: #e3b8ab; color: #8a2f20; }
.st-screen .st-note { color: #bfae8c; }
/* 42-app-modern-style gives every button a 44px floor with !important; a switch is 30px tall (it sits in a 44px row). */
.st-module-row button.st-switch, .st-row button.st-switch { height: 30px; min-height: 0 !important; min-width: 0; flex: 0 0 52px; }
.st-parts button.st-part { min-height: 32px !important; }

/* Deleting a campaign (design/settings/Delete) and the deleted list (Deleted) */
.vault-flow { display: flex; flex-direction: column; gap: 12px; }
.vault-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.vault-steps li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #8a7a5c; }
.vault-steps li span { height: 4px; border-radius: 999px; background: #ddd0ab; }
.vault-steps li.is-done, .vault-steps li.is-now { color: #231a10; }
.vault-steps li.is-done span { background: #8a2f20; }
.vault-steps li.is-now span { background: #c87050; }
#modal .vault-title { margin: 4px 0 0; font-size: 22px; font-weight: 700; color: #231a10; }
.vault-help { margin: 0; font-size: 15px; line-height: 1.5; color: #3d2f1d; }
.vault-copy { padding: 12px; border-radius: 12px; background: #efe4c3; text-align: center; font-size: 17px; font-weight: 600; color: #5c4a30; overflow-wrap: anywhere; }
.vault-alpha { letter-spacing: .04em; font-size: 15px; white-space: nowrap; }
.vault-progress { display: block; height: 6px; border-radius: 999px; background: #ddd0ab; overflow: hidden; }
.vault-progress > span { display: block; height: 100%; background: #c87050; transition: width .15s ease; }
.vault-count { margin-top: -4px; font-size: 13px; color: #5c4a30; }
.vault-info { margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #b9a77f; font-size: 13px; line-height: 1.45; color: #5c4a30; }
.vault-actions { flex-direction: column; }
.vault-actions #vaultNext { width: 100%; min-height: 52px; }
#modal .modal-head .vault-cancel { flex-shrink: 0; white-space: nowrap; min-height: 44px; padding: 0 6px; border: 0; background: none; box-shadow: none; color: #845c0f; font-weight: 600; }
#modal:has(.vault-steps) .modal-head > .x { visibility: hidden; }
.vault-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid #ddd0ab; background: #efe4c3; }
.vault-card-head { display: flex; align-items: center; gap: 12px; }
.vault-badge { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; color: #1f1712; font-size: 18px; font-weight: 800; }
.vault-card-text { display: flex; flex-direction: column; min-width: 0; }
.vault-card-name { font-size: 16px; font-weight: 700; color: #231a10; }
.vault-card-sub { font-size: 13px; color: #5c4a30; }
.vault-left { display: flex; align-items: center; gap: 10px; }
.vault-left .vault-progress { flex: 1 1 auto; }
.vault-left .vault-progress > span { background: #845c0f; }
.vault-card.is-low .vault-left .vault-progress > span { background: #a33a2a; }
.vault-left-text { flex-shrink: 0; font-size: 13px; font-weight: 700; color: #5c4a30; }
.vault-card.is-low .vault-left-text { color: #8a2f20; }
#modal .vault-card button.vault-restore { width: 100%; min-height: 44px; border: 1px solid #845c0f; border-radius: 12px; background: transparent; box-shadow: none; color: #845c0f; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .vault-progress > span { transition: none; } }
