/* Settings page */

.page { max-width: 620px; }

.set-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.set-back {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 800;
  transition: transform var(--dur) var(--ease-spring);
}
.set-back:hover { transform: translateX(-3px); }
.set-back:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

.set-card {
  padding: 18px; margin-bottom: 14px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight), var(--shadow-sm);
  animation: page-in .4s var(--ease-out) both;
}
.set-card:nth-of-type(2) { animation-delay: .05s; } .set-card:nth-of-type(3) { animation-delay: .1s; } .set-card:nth-of-type(4) { animation-delay: .15s; }
.set-card h2 { font-size: 1.125rem; margin-bottom: 12px; }
.set-hint { font-size: 0.8125rem; margin-top: 6px; }

.set-avatar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.set-avatar .btn.busy { opacity: .6; pointer-events: none; }
.set-avatar .btn.busy::after { content: " …"; }

.at-input { display: flex; align-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.at-input:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(78, 139, 95, .18); }
.at-input span { padding-inline-start: 14px; font-weight: 800; color: var(--muted); }
.at-input .input { flex: 1; min-width: 0; border: 0; box-shadow: none; padding-inline-start: 4px; }
.at-input .input:focus { box-shadow: none; }
.set-bio { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field-msg { font-size: 0.8125rem; color: var(--muted); font-weight: 600; min-height: 1.2em; }
.field-msg.bad { color: var(--thirsty-ink); }

.set-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2);
  text-align: start; font-weight: 600; color: var(--ink); margin-bottom: 10px;
  transition: border-color var(--dur), transform var(--dur) var(--ease-spring);
}
button.set-row:hover { border-color: var(--magenta-300); }
button.set-row:active { transform: scale(.98); }
.set-row.static { cursor: default; }
.set-row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.set-action { flex: none; font-size: 0.8125rem; font-weight: 800; color: var(--thirsty-ink); }

.danger-btn { color: var(--thirsty-ink); border-color: rgba(184, 90, 58, .3); }
.set-confirm { display: flex; flex-direction: column; gap: 10px; }
.set-confirm p { color: var(--muted); }

/* Switch rows (reminders) */
.set-sub { font-size: 0.8125rem; font-weight: 500; }
.switch { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); transition: background var(--dur, .2s); }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform var(--dur, .2s) var(--ease-spring); }
.switch.on { background: var(--green-500); }
.switch.on i { transform: translateX(20px); }
.set-row[disabled] { opacity: .6; }
.set-links { display: flex; flex-wrap: wrap; gap: 0 16px; justify-content: center; margin: 6px 0 4px; font-size: 0.875rem; }
.set-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-weight: 600; }
.set-about { text-align: center; font-size: 0.875rem; margin: 0 0 24px; }
.set-about a, .set-hint a { color: var(--happy-ink); font-weight: 700; }

/* Moderation queue (admins) */
.report { padding: 12px; border-radius: 16px; background: var(--surface-2); margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.report-what { font-size: 0.875rem; overflow-wrap: anywhere; }
.report-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.report-actions { display: flex; gap: 8px; justify-content: flex-end; }


/* Profile banner picker */
.set-banner { margin-bottom: 18px; }
.set-label { display: block; font-weight: 700; font-size: 0.875rem; margin-bottom: 8px; }
.banner-preview { height: 84px; border-radius: 18px; margin-bottom: 10px; transition: opacity var(--dur); }
.banner-preview::before { animation: none; transform: scale(1.02); }
.banner-preview::after { background: linear-gradient(0deg, rgba(14, 28, 19, .35), transparent 70%); }
.set-banner.busy .banner-preview { opacity: .6; }
.set-banner.busy .banner-options { pointer-events: none; opacity: .7; }
.banner-options { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.banner-opt {
  flex: none; width: 92px; display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: none;
  font: inherit; color: var(--ink); cursor: pointer; scroll-snap-align: start; text-align: start;
}
.banner-thumb {
  height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2) center / cover no-repeat; border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px var(--line); font-size: 1.375rem; font-weight: 800; color: var(--muted);
  transition: border-color var(--dur), transform var(--dur) var(--ease-spring);
}
.banner-upload .banner-thumb { border: 2px dashed var(--line-strong); }
.banner-upload .banner-thumb[style] span { display: none; }
.banner-name { font-size: 0.8125rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-opt:hover .banner-thumb { transform: translateY(-2px); }
.banner-opt:active .banner-thumb { transform: scale(.95); }
.banner-opt[aria-checked="true"] .banner-thumb, .banner-opt.is-selected .banner-thumb { border: 2px solid var(--green-500); box-shadow: 0 0 0 3px rgba(78, 139, 95, .2); }
.banner-opt[aria-checked="true"] .banner-name, .banner-opt.is-selected .banner-name { color: var(--happy-ink); }
.banner-opt:focus-visible, .banner-upload:focus-within { outline: 2px solid var(--gold-500); outline-offset: 3px; border-radius: 14px; }

/* Delete account */
.danger-link { color: var(--thirsty-ink); margin-top: 6px; font-size: 0.875rem; }
.danger-solid { background: var(--thirsty-ink); color: #fff; border-color: transparent; }
.danger-solid:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.del-list { margin: 0; padding: 12px 14px; list-style: none; display: flex; flex-direction: column; gap: 6px; border-radius: 14px; background: var(--surface-2); font-size: 0.875rem; }
.del-status { min-height: 1.3em; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.del-status.bad { color: var(--thirsty-ink); }
.danger-solid.is-loading:disabled { background: var(--thirsty-ink); color: #fff; opacity: .85; }
.banner-opt.locked .banner-thumb { filter: grayscale(.85) brightness(.7); display: grid; place-items: center; font-size: 1.125rem; }
.banner-opt.locked .banner-name { opacity: .7; }

/* Help rows are links or buttons; both look like the other rows */
a.set-row { color: inherit; text-decoration: none; }
#help .set-row .ic, .set-row > span:first-child > .ic { margin-inline-end: 4px; color: var(--happy-ink); }

/* Invite a friend */
.invite-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-color: var(--gold-hairline); }
.invite-art { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--gold-100); color: var(--soon-ink); animation: gift-wiggle 4s ease-in-out infinite; }
.invite-art .ic { width: 30px; height: 30px; }
.invite-card > div:last-child { flex: 1; min-width: 0; }
.invite-count { font-weight: 800; color: var(--happy-ink); margin: 6px 0 2px; }
@keyframes gift-wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-10deg); } 88% { transform: rotate(8deg); } 92% { transform: rotate(-5deg); } }

/* Theme: three choices in a segmented control */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin-bottom: 16px; border-radius: 18px; background: var(--surface-2); }
.seg3-opt { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 14px; background: none; color: var(--muted); font-weight: 800; font-size: .875rem; transition: background-color var(--dur), color var(--dur), box-shadow var(--dur); }
.seg3-opt .ic { width: 22px; height: 22px; }
.seg3-opt[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg3-opt[aria-checked="true"] .ic { color: var(--terra); animation: theme-pop .45s var(--ease-spring); }
@keyframes theme-pop { 40% { transform: scale(1.25) rotate(-12deg); } }

/* Language */
.lang-list { display: flex; flex-direction: column; gap: 6px; }
.lang-opt { min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 1rem; }
.lang-opt[aria-checked="true"] { border-color: var(--green-500); background: var(--green-100); color: var(--happy-ink); }
.lang-opt .ic { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) { .invite-art, .seg3-opt .ic { animation: none; } }
