/* Zuno 0.15: soundboard, calls as messages, saved messages, Seen, seasons, insights,
   close friends, DM sections, server folders, account switching, profile widgets. */

/* ---------- soundboard ---------- */
.sb-pop { width: 340px; max-width: calc(100vw - 16px); padding: 0; overflow: hidden; }
.sb-pop .pop-head { padding: 12px 14px 8px; display: flex; align-items: baseline; gap: 8px; }
.sb-scroll { max-height: 320px; overflow-y: auto; padding: 0 10px 8px; }
.sb-scroll h6 { margin: 8px 4px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sb-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--input); color: var(--text); transition: transform .15s var(--spring), background .15s; min-width: 0; }
.sb-btn:hover { background: color-mix(in srgb, var(--brand) 18%, var(--input)); transform: translateY(-1px); }
.sb-btn.hit { animation: sb-hit .35s var(--spring); }
@keyframes sb-hit { 40% { transform: scale(.9); } }
.sb-e { font-size: 22px; line-height: 1.2; }
.sb-n { font-size: 12px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px 10px; border-top: 1px solid var(--border); }
.sb-foot input { flex: 1; accent-color: var(--brand); }
.sb-bubble { position: absolute; top: 8px; right: 10px; font-size: 26px; animation: sb-float 1.6s ease-out forwards; pointer-events: none; z-index: 2; }
@keyframes sb-float { from { transform: translateY(6px) scale(.6); opacity: 0; } 20% { transform: none; opacity: 1; } to { transform: translateY(-34px); opacity: 0; } }
.sb-row .sb-emoji-btn { font-size: 24px; width: 40px; height: 40px; border-radius: 8px; background: var(--input); }
.sb-volrow { display: flex; align-items: center; gap: 6px; }
.sb-volrow input { width: 90px; accent-color: var(--brand); }

/* ---------- voice & video settings ---------- */
.mic-test { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.mic-meter { flex: 1; height: 10px; border-radius: 5px; background: var(--input); overflow: hidden; }
.mic-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--brand)); border-radius: inherit; transition: width .06s linear; }

/* ---------- calls as messages ---------- */
.call-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-top: 4px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--border); max-width: 460px; }
.call-card .cc-ico { font-size: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 20%, transparent); flex: none; }
.call-card.missed .cc-ico { background: color-mix(in srgb, var(--red) 20%, transparent); }
.call-card.live .cc-ico { animation: cc-ring 1.4s ease-in-out infinite; }
@keyframes cc-ring { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.call-card .cc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.call-card .cc-text b { color: var(--header); font-weight: 600; }
.call-card .cc-text small { color: var(--muted); font-size: 12.5px; }
.call-card.missed .cc-text b { color: #fa777c; }
.cc-faces { display: flex; }
.cc-faces > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--panel); border-radius: 50%; }

/* ---------- saved messages & Seen ---------- */
.saved-pop { width: 420px; }
.sv-item { position: relative; }
.sv-acts { display: flex; gap: 4px; align-items: flex-start; flex: none; }
.sv-remind { margin-top: 4px; font-size: 12px; color: var(--yellow); }
.sv-remind.done { color: var(--muted); }
.saved-pop .fp-empty .zm, .saved-pop .fp-empty svg { width: 64px; height: 64px; }
.seen-tag { font-size: 11.5px; color: var(--muted); text-align: right; padding: 2px 4px 0; animation: pop .2s ease-out; }
.msg .seen-tag { grid-column: 1 / -1; }

/* ---------- seasonal flair & effects ---------- */
.flair-opt { position: relative; }
.ltd-tag { position: absolute; top: 4px; right: 4px; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); background: linear-gradient(135deg, #ffb347, #ff5f6d); padding: 1px 5px; border-radius: 6px; z-index: 2; }
html[data-season="winter"] .ltd-tag { background: linear-gradient(135deg, #bfe9ff, #7ab8ff); }
.deco .dk-flap { transform-box: view-box; transform-origin: 50% 50%; animation: dk-flap .5s ease-in-out infinite alternate; }
@keyframes dk-flap { to { transform: scaleY(.82) translateY(4px); } }
.pfx-spooky i { font-size: calc(16px * var(--s)); animation-name: fx-fall-sway; animation-duration: calc(var(--t) * 1.4); opacity: .9; }
.pfx-blizzard i { width: calc(4px * var(--s)); height: calc(4px * var(--s)); border-radius: 50%; background: #fff; opacity: .9; animation-name: fx-blizzard; animation-duration: calc(var(--t) / 2.2); }
@keyframes fx-blizzard { from { transform: translate(0, 0); } to { transform: translate(-120px, 560px); } }
.fx-swatch .pfx-spooky i { animation-name: fx-fall-small; }
.fx-swatch .pfx-blizzard i { animation-name: fx-fall-small; }

.season-fx { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.season-fx i { position: absolute; left: var(--x); top: -40px; font-style: normal; animation: season-fall var(--t) linear var(--d) infinite; will-change: transform; }
.season-fx.s-winter i { width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; background: #fff; opacity: calc(.25 + var(--s) * .3); filter: blur(.4px); }
.season-fx.s-halloween i { font-size: calc(18px * var(--s)); opacity: .35; animation-duration: calc(var(--t) * 1.6); }
@keyframes season-fall { from { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--sw), 55vh) rotate(160deg); } to { transform: translate(0, 110vh) rotate(320deg); } }
html.reduce-motion .season-fx { display: none; }
@media not all /* (0.38) animations follow Zuno's own Reduce Motion switch only */ { .season-fx { display: none; } }

/* ---------- insights ---------- */
.ins-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ins-tile { background: var(--panel); border-radius: 12px; padding: 14px; box-shadow: inset 0 0 0 1px var(--border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ins-tile b { font: 600 28px/1.1 var(--display); color: var(--header); }
.ins-tile span { color: var(--text); font-size: 13.5px; }
.ins-tile small { color: var(--muted); font-size: 12px; }
.ins-card { background: var(--panel); border-radius: 12px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 14px; min-width: 0; }
.ins-card h4 { margin: 0 0 12px; color: var(--header); font-size: 14px; }
.ins-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ins-row .ins-card { margin-bottom: 14px; }
.chart { width: 100%; height: 140px; display: block; overflow: visible; }
.ch-bar { fill: var(--brand); }
.ch-hit:hover .ch-bar { fill: color-mix(in srgb, var(--brand) 75%, #fff); }
.ch-base { stroke: var(--border); stroke-width: 1; }
.ch-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.ch-area { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
.ch-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.ch-tip { position: fixed; z-index: 400; pointer-events: none; background: var(--floating); color: var(--header); font-size: 12.5px; font-weight: 600; padding: 6px 9px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.4); opacity: 0; transition: opacity .1s; white-space: nowrap; }
.ch-tip.on { opacity: 1; }
.heatmap { display: grid; grid-template-columns: 34px 1fr; gap: 4px 8px; }
.hm-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 2px; font-size: 11px; color: var(--muted); }
.hm-days span { display: flex; align-items: center; }
.hm-grid { display: grid; grid-template-columns: repeat(24, 1fr); grid-template-rows: repeat(7, 16px); gap: 2px; }
.hm-c, .hm-key i { border-radius: 3px; background: color-mix(in srgb, var(--brand) var(--k), var(--input)); }
.hm-c:hover { outline: 2px solid var(--header); outline-offset: -1px; }
.hm-hours { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hm-key { grid-column: 2; display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.hm-key i { width: 12px; height: 12px; display: inline-block; }
.rank { display: flex; flex-direction: column; gap: 8px; }
.rk-row { display: grid; grid-template-columns: minmax(80px, 40%) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; }
.rk-name { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-track { height: 10px; border-radius: 4px; background: var(--input); overflow: hidden; }
.rk-track i { display: block; height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; }
.rk-n { color: var(--header); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ins-tiles { grid-template-columns: 1fr 1fr; } .ins-row { grid-template-columns: 1fr; } }

/* ---------- close friends ---------- */
.cf-star { color: #3ddc84; font-size: 12px; }
.cf-sub { color: #6fe3a5 !important; }
.cf-card { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #3ddc84 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #3ddc84 35%, transparent); }
.cf-head { font-size: 11.5px; font-weight: 700; color: #6fe3a5; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.cf-head .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cf-text { color: var(--header); }
.cf-img { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; margin-top: 8px; cursor: zoom-in; }
.cf-toggle.on { background: color-mix(in srgb, #3ddc84 25%, var(--input)) !important; color: #b6f5d1 !important; }
.cf-photo-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.cf-photo { width: 64px; height: 64px; border-radius: 10px; background: var(--input); display: grid; place-items: center; font-size: 24px; overflow: hidden; flex: none; }
.cf-photo img { width: 100%; height: 100%; object-fit: cover; }
.cf-list .cf-people { max-height: 340px; overflow-y: auto; margin-top: 8px; }
.cf-person { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.cf-person:hover { background: var(--hover); }
.cf-person b { flex: 1; font-weight: 500; }

/* ---------- DM sections ---------- */
.dm-sec { display: flex; align-items: center; justify-content: space-between; margin: 12px 8px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); user-select: none; }
.dm-sec[data-dmcat] { cursor: pointer; }
.dm-sec[data-dmcat]:hover { color: var(--text); }
.dm-caret { font-style: normal; display: inline-block; margin-right: 4px; transition: transform .15s; }
.dm-sec.collapsed .dm-caret { transform: rotate(-90deg); }
.dm-sec-n { background: var(--red); color: #fff; border-radius: 8px; padding: 0 6px; font-size: 11px; }
.dm-cat-empty { font-size: 12px; color: var(--faint); padding: 2px 8px 6px; }

/* ---------- server folders ---------- */
.rail-folder { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 72px; }
.rail-folder.open { background: color-mix(in srgb, var(--fc) 18%, transparent); border-radius: 24px; width: 56px; padding: 4px 0 8px; margin: 0 8px; }
.rail-folder.open .rail-item { width: 56px; }
.folder-list { display: flex; flex-direction: column; gap: 8px; }
.folder-btn { background: color-mix(in srgb, var(--fc) 30%, var(--main)) !important; border-radius: 16px !important; }
.rail-folder.open .folder-btn { background: transparent !important; color: var(--fc); }
.folder-ico { font-size: 22px; }
.folder-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px; width: 100%; height: 100%; box-sizing: border-box; }
.folder-minis i { width: 17px; height: 17px; border-radius: 50%; background: var(--sv); display: grid; place-items: center; overflow: hidden; font-style: normal; color: #fff; }
.folder-minis i img { width: 100%; height: 100%; }
.folder-minis .sv-initials { font-size: 7px !important; font-weight: 700; }
.rail-item.dragging { opacity: .4; }
.rail-item.drop-before { box-shadow: 0 -4px 0 -1px var(--brand); }
.rail-item.drop-after { box-shadow: 0 4px 0 -1px var(--brand); }
.rail-item.drop-into .rail-btn { box-shadow: 0 0 0 3px var(--brand) !important; border-radius: 16px !important; }
.fold-colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fold-colors button { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--panel); }
.fold-colors button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--header); }

/* ---------- account switching ---------- */
.acct-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.acct-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--input); }
.acct-row.on { box-shadow: inset 0 0 0 2px var(--brand); }
.acct-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acct-add { width: 100%; }
.auth-accounts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.auth-accounts > .muted { width: 100%; }
.acct-chip { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 20px; background: var(--input); color: var(--header); }
.acct-chip:hover { background: color-mix(in srgb, var(--brand) 20%, var(--input)); }

/* ---------- profile widgets ---------- */
.widgets { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 4px 0 12px; }
.wg { background: color-mix(in srgb, var(--header) 5%, transparent); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.wg h5 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.wg-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wg-chips span { background: var(--input); border-radius: 12px; padding: 2px 8px; font-size: 13px; }
.wg-song { display: flex; align-items: center; gap: 10px; }
.wg-song h5 { margin-bottom: 2px; }
.wg-disc { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #222 18%, #111 20%, #2a2a2a 60%, #111 62%); font-size: 16px; animation: dk-spin 4s linear infinite; flex: none; }
.wg-photo img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; }
.wg-photo .muted { margin-top: 4px; }
.wg-text div { white-space: pre-wrap; overflow-wrap: anywhere; }
.wg-faves ol { margin: 0; padding-left: 20px; }
.wg-edit-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.wg-edit { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--input); }
.wg-e-ico { font-size: 18px; }
.wg-e-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-photo-pick { width: 120px; height: 80px; border-radius: 8px; background: var(--input); display: grid; place-items: center; font-size: 28px; overflow: hidden; margin: 6px 0; }
.wg-photo-pick img { width: 100%; height: 100%; object-fit: cover; }
