/* Zelix: shared styles for the dashboard, desktop, gallery, admin and download pages.
   (The landing page has its own file: home.css.) Dark glass look, Quicksand + Estedad from fonts.css. */
:root {
  --bg: #04161B; --paper: #0A2A33; --ink: #EAF7F9; --lake: #4FB3C4; --saffron: #FFC02E;
  --line: rgba(255, 255, 255, .14); --muted: #9DB8BF; --danger: #FF8A80; --glass: rgba(255, 255, 255, .06);
  --card: rgba(10, 42, 51, .66); --on-accent: #10303B;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 105%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); line-height: 1.7; font-weight: 500;
  background-color: var(--bg); background-attachment: fixed;
  background-image: radial-gradient(60% 50% at 82% -5%, hsl(190 55% 21%), transparent 70%), radial-gradient(50% 45% at 4% 105%, hsl(210 50% 16%), transparent 70%);
  animation: pageIn .5s ease both;
}
body.dk { background: var(--bg); animation: none; }
.embedded body { background: #07252E; }
button, input, select { color: inherit; font-size: inherit; }
button { cursor: pointer; }
code { font-family: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 22px 16px 70px; }
.muted { color: var(--muted); font-weight: 500; }
.uname { direction: ltr; unicode-bidi: embed; }

/* ---------- background bubbles (fx.js) ---------- */
.fx-bubbles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#desk .fx-bubbles { position: absolute; }
.fx-bubbles i { position: absolute; bottom: -70px; border-radius: 50%; opacity: 0; border: 1.5px solid rgba(255, 255, 255, .2);
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .3), rgba(255, 255, 255, .03) 45%, transparent 70%);
  animation: bubbleRise var(--d) linear var(--dl) infinite; }
@keyframes bubbleRise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 8% { opacity: .8; } 100% { transform: translate3d(var(--dx), -115vh, 0); opacity: 0; } }

/* ---------- header ---------- */
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px 10px 18px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: 28px; background: var(--glass); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.25rem; font-weight: 700; direction: ltr; }
.brand a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.head-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who { color: var(--muted); font-size: .95rem; }
.who b { color: var(--ink); direction: ltr; unicode-bidi: embed; }
.tools { display: flex; gap: 8px; }
.tool { height: 38px; min-width: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: .85rem; transition: background .2s; }
.tool:hover { background: rgba(255, 255, 255, .14); }

/* ---------- buttons, forms ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; padding: 11px 24px; border: 0; border-radius: 999px;
  background: var(--saffron); color: var(--on-accent); font-weight: 700; text-decoration: none; text-align: center; transition: transform .15s, background .2s, opacity .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.full { width: 100%; margin-top: 18px; }
.btn.ghost { height: 38px; padding: 6px 16px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
button:disabled, select:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { transform: none; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
.btn.ghost .ripple { background: rgba(79, 179, 196, .3); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

label.f { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], select, .search {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .28); color: var(--ink); direction: ltr; text-align: left; }
.search { width: min(100%, 240px); padding: 8px 16px; border-radius: 999px; direction: inherit; text-align: start; }
input:focus, select:focus { outline: none; border-color: var(--saffron); }
select { direction: inherit; text-align: start; }
select option { background: var(--paper); color: var(--ink); }
.error { color: #ff9d92; min-height: 1.6em; margin: 10px 0 0; font-weight: 600; }
.ok { color: var(--lake); min-height: 1.2em; margin: 6px 0 0; font-weight: 600; }
.tabs, .seg { display: flex; gap: 4px; padding: 5px; margin-bottom: 16px; border-radius: 999px; background: rgba(0, 0, 0, .32); }
.tabs button, .seg button { flex: 1; padding: 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; transition: background .25s, color .25s; }
.tabs button[aria-selected="true"], .seg button.on { background: var(--saffron); color: var(--on-accent); }

/* ---------- page hero ---------- */
.ph { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 4px 0 28px; padding: clamp(22px, 4vw, 44px); border-radius: 36px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(60% 120% at 85% 0%, rgba(255, 192, 46, .16), transparent 60%), linear-gradient(160deg, rgba(13, 59, 70, .9), rgba(6, 34, 42, .9)); }
.ph-text { position: relative; z-index: 2; min-width: 0; }
.ph-kicker { margin: 0 0 4px; color: var(--saffron); font-weight: 700; font-size: 1.02rem; }
.ph-title { margin: 0; font-weight: 700; font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.2; text-shadow: 0 8px 30px rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.ph-sub { margin: 10px 0 0; max-width: 46ch; color: #cfe3e7; font-size: 1.05rem; }
.ph-art { position: relative; flex: none; width: 270px; height: 230px; perspective: 900px; display: grid; place-items: center; }
.pc-rig { transform: rotate(-12deg); transform-style: preserve-3d; }
.pc { --s: 140px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; animation: pcSpin 16s linear infinite; }
@keyframes pcSpin { from { transform: rotateX(-22deg) rotateY(0); } to { transform: rotateX(-22deg) rotateY(360deg); } }
.pc b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12%; border: 1px solid rgba(255, 255, 255, .38);
  background: linear-gradient(115deg, rgba(255, 255, 255, .5), transparent 28%, rgba(255, 255, 255, .1) 52%, transparent 70%), linear-gradient(150deg, #2BA9BE, #0A4556); box-shadow: inset 0 0 30px rgba(255, 255, 255, .16); }
.pc b svg { width: 44%; height: 44%; stroke: #fff; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pc .p1 { transform: translateZ(calc(var(--s) / 2)); }
.pc .p2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.78); }
.pc .p3 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(.6); }
.pc .p4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.85); }
.pc .p5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.2); }
.pc .p6 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.5); }
.pchip { position: absolute; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); font-size: .8rem; font-weight: 700; direction: ltr; animation: pBob 6s ease-in-out infinite; }
.pc1 { left: 0; top: 14%; } .pc2 { right: 0; top: 34%; animation-delay: -2s; } .pc3 { left: 8%; bottom: 8%; animation-delay: -4s; }
.porb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 5%, rgba(255, 255, 255, 0) 6.5%), radial-gradient(circle at 35% 30%, #FFD66B, #FFB800 55%, #B77A00); box-shadow: 0 12px 20px rgba(0, 0, 0, .3); animation: pBob 7s ease-in-out infinite; }
.po1 { width: 38px; height: 38px; right: 14%; top: 6%; } .po2 { width: 24px; height: 24px; left: 30%; bottom: 0; animation-delay: -3s; }
@keyframes pBob { 50% { transform: translateY(-12px); } }

/* ---------- upload box ---------- */
.drop { display: block; position: relative; padding: 46px 16px; text-align: center; cursor: pointer; border: 2px dashed rgba(79, 179, 196, .55); border-radius: 28px; background: var(--card); transition: background .2s, border-color .2s, transform .2s; }
.drop:hover { transform: translateY(-2px); }
.drop.over { background: rgba(255, 192, 46, .12); border-color: var(--saffron); transform: scale(1.015); }
.drop .up { width: 46px; height: 46px; stroke: var(--lake); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.drop.over .up { stroke: var(--saffron); animation: bob .7s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px); } }
.drop strong { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.5; }
.drop span { color: var(--muted); font-size: 1rem; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 3px solid var(--saffron); outline-offset: 3px; }
.progress { margin-top: 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress div { height: 10px; width: 0; border-radius: 999px; background: var(--saffron) repeating-linear-gradient(45deg, rgba(255, 255, 255, .3) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: stripes .8s linear infinite; transition: width .15s; }
@keyframes stripes { to { background-position: 28px 0; } }
.progress-text { font-size: .92rem; color: var(--muted); margin: 6px 0 0; }

/* ---------- lists ---------- */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.list-head h2 { margin: 0; font-size: 1.7rem; font-weight: 700; }
.list-head small { margin-inline-start: 10px; color: var(--muted); font-size: 1rem; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.row { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background-color .15s; content-visibility: auto; contain-intrinsic-size: auto 72px; }
.row:hover { background: rgba(255, 255, 255, .05); }
.row:last-child { border-bottom: 0; }
.badge { width: 54px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-size: .74rem; font-weight: 700; direction: ltr; overflow: hidden; background: #4D6C77; }
.badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-img { background: #C2417A; } .t-vid { background: #6D4AE0; } .t-aud { background: #2A8F6A; }
.t-zip { background: #B8741A; } .t-doc { background: #1D6E7E; } .t-code { background: #3A4A8C; }
.badge.av-admin { background: #C2417A; font-size: 1.15rem; }
.badge.av-moderator { background: #6D4AE0; font-size: 1.15rem; }
.badge.av-member { background: #4D6C77; font-size: 1.15rem; }
.info { min-width: 0; }
.name { font-weight: 700; font-size: 1.04rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { font-size: .9rem; color: var(--muted); }
.actions { display: flex; gap: 8px; }
.actions a, .actions button { display: inline-block; padding: 6px 15px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; transition: transform .12s, background .2s; }
.actions a { background: var(--saffron); border-color: transparent; color: var(--on-accent); }
.actions a:hover, .actions button:hover { transform: translateY(-2px); }
.actions button.share.on { background: var(--lake); border-color: transparent; color: #04161B; }
.actions button.del:hover { border-color: var(--danger); color: var(--danger); }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 1.08rem; font-weight: 600; }
.role { display: inline-block; padding: 0 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; color: #fff; vertical-align: middle; line-height: 1.75; }
.role.r-admin { background: #C2417A; } .role.r-moderator { background: #6D4AE0; } .role.r-member { background: #4D6C77; }
.role-select { width: auto; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; cursor: pointer; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.stat b { font-size: 1.7rem; font-weight: 700; line-height: 1.4; }
.stat span { color: var(--muted); font-size: .9rem; }
.role-legend { display: grid; gap: 8px; margin: 0 0 18px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.legend-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .94rem; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 22px; }
.g-item { position: relative; margin: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 20px; content-visibility: auto; contain-intrinsic-size: auto 230px; }
.g-thumb { display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: rgba(255, 255, 255, .06); cursor: zoom-in; }
.g-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.g-thumb:hover img { transform: scale(1.04); }
.g-cap { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 10px; font-size: .88rem; min-height: 40px; }
.g-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-who b { direction: ltr; unicode-bidi: embed; }
.g-guest { color: var(--muted); }
.g-del { padding: 1px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: .82rem; }
.g-del:hover { border-color: var(--danger); color: var(--danger); }
.more-row { text-align: center; margin-top: 18px; }
.view-dlg { max-width: min(96vw, 980px); }
.view-dlg img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: 14px; }

/* ---------- tilt + glow on cards (fx.js) ---------- */
.g-item, .stat { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out, box-shadow .2s; }
.g-item::after, .stat::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 58%); }
.g-item.tilting, .stat.tilting { box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.g-item.tilting::after, .stat.tilting::after { opacity: 1; }

/* ---------- dialogs ---------- */
dialog { width: calc(100% - 32px); max-width: 460px; padding: 24px; color: var(--ink); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(160deg, #0D3B46, #06222A); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(5, 15, 20, .6); backdrop-filter: blur(5px); }
dialog[open] { animation: dlgIn .28s cubic-bezier(.2, .9, .3, 1.15); }
dialog h3 { margin: 0 0 2px; font-size: 1.5rem; font-weight: 700; }
.dlg-file { margin: 0 0 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.dlg-info { color: var(--muted); font-size: .92rem; margin: 10px 0 0; }
.dlg-btns { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dlg-btns .btn { flex: 1; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(22px) scale(.94); } }

/* ---------- login-style cards (download page, admin denied) ---------- */
.auth { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 20px 20px 56px; }
.auth-tools { position: absolute; top: 16px; inset-inline-end: 16px; }
.auth-card { width: 100%; max-width: 410px; padding: 30px 26px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); animation: rise .6s .12s cubic-bezier(.2, .8, .3, 1) backwards; transition: transform .2s ease-out; will-change: transform; }
.auth-card .brand { justify-content: center; font-size: 2rem; margin-bottom: 4px; }
.auth-card .brand img { width: 44px; height: 44px; border-radius: 13px; }
.tagline { margin: 0 0 22px; color: var(--muted); text-align: center; }
.share-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.share-card { text-align: center; }
.share-card .badge { margin: 8px auto 12px; width: 72px; height: 60px; font-size: .95rem; }
.share-card .name { white-space: normal; word-break: break-word; font-size: 1.2rem; }
.share-card .btn { display: flex; text-decoration: none; }
.credit { position: absolute; bottom: 14px; inset-inline: 0; text-align: center; color: var(--muted); font-size: .88rem; direction: ltr; letter-spacing: .05em; }
.credit b { color: var(--ink); }
.wrap .credit { position: static; margin-top: 44px; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes pageIn { from { opacity: 0; } }

/* ================= desktop ================= */
body.dk { margin: 0; overflow: hidden; height: 100vh; height: 100dvh; }
.embedded header, .embedded .credit { display: none; }
.embedded .wrap { padding-top: 12px; }
#shell { position: fixed; inset: 0; display: flex; flex-direction: column; direction: ltr; }
#shell[data-pos="top"] { flex-direction: column-reverse; }
#shell[data-pos="left"] { flex-direction: row-reverse; }
#shell[data-pos="right"] { flex-direction: row; }
html[dir="rtl"] #icons, html[dir="rtl"] #taskbar, html[dir="rtl"] .win, html[dir="rtl"] .dk-menu, html[dir="rtl"] .dk-toast { direction: rtl; }
#desk { flex: 1; position: relative; overflow: hidden; min-width: 0; min-height: 0; background: radial-gradient(60% 55% at 50% 45%, #1B5F6E 0, transparent 70%), linear-gradient(165deg, #0C3A45, #04161B); }
#icons { position: absolute; inset: 0; z-index: 1; padding: 14px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 104px); grid-auto-columns: 98px; gap: 6px; align-content: start; justify-content: start; }
#winLayer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#winLayer .win { pointer-events: auto; }

.dk-icon { position: relative; width: 92px; height: 100px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 2px solid transparent; border-radius: 18px; background: transparent; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); animation: iconPop .55s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.dk-icon.sel, .dk-icon:focus-visible { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); }
.dk-ic { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 12px 26px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .4);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 55%); transition: transform .22s cubic-bezier(.2, 1.4, .4, 1), box-shadow .22s; }
.dk-ic svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dk-icon:hover .dk-ic { transform: translateY(-5px) rotate(-4deg) scale(1.08); box-shadow: 0 20px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .4); }
.dk-icon:active .dk-ic { transform: scale(.94); }
.ic-pc { background-color: #1D8FA3; } .ic-files { background-color: #D98E1F; } .ic-trash { background-color: #4D6C77; }
.ic-gallery { background-color: #C2417A; } .ic-admin { background-color: #6D4AE0; } .ic-settings { background-color: #2A9C74; }
.dk-label { font-size: .9rem; font-weight: 700; line-height: 1.35; text-align: center; }
.dk-badge { position: absolute; top: 0; inset-inline-end: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #E5484D; color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; text-shadow: none; }
@keyframes iconPop { from { opacity: 0; transform: translateY(18px) scale(.6) rotate(-8deg); } }

.dk-widget { position: absolute; bottom: 26px; z-index: 0; padding: 16px 26px 18px; border-radius: 28px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); backdrop-filter: blur(14px); pointer-events: none; }
html[dir="rtl"] .dk-widget { left: 28px; } html[dir="ltr"] .dk-widget { right: 28px; }
.w-time { font-size: 3.8rem; font-weight: 700; line-height: 1.15; direction: ltr; text-align: center; }
.w-date { color: #cfe3e7; font-weight: 600; text-align: center; }
.w-hi { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--saffron); font-weight: 700; font-size: 1.1rem; text-align: center; }

.win { position: absolute; display: flex; flex-direction: column; min-width: 270px; min-height: 170px; resize: both; overflow: hidden; color: var(--ink);
  background: rgba(8, 30, 38, .94); border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; box-shadow: 0 34px 70px rgba(0, 0, 0, .55); }
.win.min { display: none; }
.win.max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; border-width: 0; resize: none; }
.win-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex: none; background: rgba(255, 255, 255, .06); color: var(--ink); cursor: grab; touch-action: none; user-select: none; }
.win.active .win-bar { background: linear-gradient(90deg, rgba(79, 179, 196, .35), rgba(79, 179, 196, .12)); color: #fff; }
.win-ic svg, .task-ic svg, .dk-mi-ic svg, .wb svg, .dk-check svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.win-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-btns { display: flex; gap: 4px; }
.wb { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: inherit; }
.wb svg { width: 14px; height: 14px; stroke-width: 2.4; }
.wb:hover { background: rgba(255, 255, 255, .26); }
.wb.close:hover { background: #E5484D; color: #fff; }
.win-body { flex: 1; overflow: auto; position: relative; min-height: 0; }
.win-body.over { outline: 3px dashed var(--saffron); outline-offset: -6px; }
.win.opening { animation: winIn .3s cubic-bezier(.2, .9, .3, 1.15); }
.win.closing { animation: winOut .18s ease-in forwards; pointer-events: none; }
@keyframes winIn { from { opacity: 0; transform: perspective(900px) translateY(26px) rotateX(12deg) scale(.9); } }
@keyframes winOut { to { opacity: 0; transform: perspective(900px) translateY(18px) rotateX(-10deg) scale(.9); } }
.dk-pad { padding: 14px; }
.dk-gap { height: 14px; }
.dk-h { margin: 12px 0 6px; font-size: 1.3rem; font-weight: 700; }
.dk-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dk-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #07252E; }
.dk-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dk-toolbar .btn { padding: 7px 18px; }
.dk-toolbar .search { flex: 1; }
.dk-msg { padding: 0 12px; min-height: 0; margin: 6px 0 0; }
.dk-list { margin: 10px 12px; }
.win .progress { margin: 8px 12px 0; }
.win .row { grid-template-columns: 44px 1fr; }
.win .badge { width: 44px; height: 38px; font-size: .68rem; }
.win .actions { grid-column: 1 / -1; flex-wrap: wrap; }
.win .actions a, .win .actions button { padding: 4px 12px; font-size: .86rem; }
.pc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pc-head .badge { width: 56px; height: 56px; font-size: 1.4rem; }
.dk-bar { height: 14px; margin-top: 4px; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.dk-bar div { height: 100%; background: var(--saffron); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.wall-sw { height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.wall-sw.on { outline: 3px solid var(--saffron); outline-offset: 2px; }

#taskbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; flex: none; min-width: 0; z-index: 200; color: var(--ink); background: rgba(4, 22, 27, .8); backdrop-filter: blur(18px); animation: barIn .5s .1s ease-out backwards; }
#shell[data-pos="bottom"] #taskbar { border-top: 1px solid var(--line); }
#shell[data-pos="top"] #taskbar { border-bottom: 1px solid var(--line); }
#shell[data-pos="left"] #taskbar { border-right: 1px solid var(--line); }
#shell[data-pos="right"] #taskbar { border-left: 1px solid var(--line); }
#shell[data-pos="left"] #taskbar, #shell[data-pos="right"] #taskbar { flex-direction: column; width: 68px; padding: 8px 6px; }
.start { width: 42px; height: 42px; flex: none; padding: 0; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--saffron); transition: transform .15s; }
.start img { width: 30px; height: 30px; border-radius: 9px; }
.start:hover { transform: translateY(-1px); }
#tasks { flex: 1; display: flex; gap: 6px; min-width: 0; overflow: auto; }
#shell[data-pos="left"] #tasks, #shell[data-pos="right"] #tasks { flex-direction: column; width: 100%; align-items: center; }
.task { display: flex; align-items: center; gap: 6px; max-width: 170px; padding: 5px 12px; flex: none; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: .86rem; animation: popIn .24s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.task.active { border-color: rgba(255, 192, 46, .8); background: rgba(255, 192, 46, .16); }
.task.minimized { opacity: .6; }
.task .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shell[data-pos="left"] .task .tt, #shell[data-pos="right"] .task .tt { display: none; }
.tray { display: flex; align-items: center; gap: 8px; flex: none; font-weight: 600; font-size: .86rem; }
#shell[data-pos="left"] .tray, #shell[data-pos="right"] .tray { flex-direction: column; }
#shell[data-pos="left"] .tools, #shell[data-pos="right"] .tools { flex-direction: column; }
#clock { direction: ltr; }
@keyframes barIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.7); } }

.dk-menu { position: fixed; z-index: 500; min-width: 220px; padding: 6px; color: var(--ink); background: #0A2A33; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .55); animation: menuIn .18s ease-out; transform-origin: bottom left; }
.dk-mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: start; font-weight: 600; }
.dk-mi:hover { background: rgba(255, 255, 255, .08); }
.dk-mi-t { flex: 1; }
.dk-check { color: var(--saffron); }
.dk-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.dk-toast { position: fixed; inset-inline: 0; bottom: 76px; z-index: 600; width: max-content; max-width: 90vw; margin: auto; padding: 9px 20px; color: var(--ink); background: rgba(0, 0, 0, .78); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; animation: toastIn .25s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: perspective(700px) rotateX(-12deg) scale(.94); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- small screens ---------- */
@media (max-width: 700px) { .ph-art, .dk-widget { display: none; } }
@media (max-width: 720px) { .wb-max { display: none; } .win-bar { cursor: default; } }
@media (max-width: 560px) {
  .row { grid-template-columns: 46px 1fr; }
  .badge { width: 46px; height: 40px; }
  .actions { grid-column: 1 / -1; }
  .actions a, .actions button { flex: 1; text-align: center; }
  .role-select { flex: 1; }
  .drop strong { font-size: 1.25rem; }
  header { border-radius: 24px; }
  .list-head h2 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-bubbles { display: none; }
}
