:root {
  /* Garnatah — black & pink */
  --bg: #0a0a0b; --panel: #141315; --panel-2: #1b191c; --text: #f6eff3; --muted: #a79ca3; --line: #2b262a;
  --accent: #c9367f;           /* raspberry pink: fills, borders, buttons */
  --accent-2: #b52a6f;         /* button hover */
  --accent-text: #e0559a;      /* pink text/icons on black (readable) */
  --accent-ink: #ffffff;       /* text on raspberry buttons */
  --accent-soft: rgba(201,54,127,.16);
  --danger: #ff5b4a;           /* destructive actions — stays clearly different from the brand pink */
  --danger-soft: rgba(255,91,74,.12);
  --hover: #1f1b1e; --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 14px; }
button:hover { background: var(--hover); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover { background: var(--accent-2); }
input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
a { color: var(--accent-text); }
.hidden { display: none !important; }

/* auth page */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.brand { font-weight: 700; font-size: 22px; display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.brand .dot, .brand .logo { width: 26px; height: 26px; flex-shrink: 0; }
.brand { letter-spacing: .02em; }
.card p.sub { color: var(--muted); margin: 0 0 20px; }
.card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.card button.primary { width: 100%; margin-top: 18px; padding: 11px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 10px; }
.switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* drive layout */
header { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
header .brand { margin: 0; font-size: 18px; }
header input[type=search] { max-width: 420px; flex: 1; }
header .me { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
main { max-width: 1100px; margin: 0 auto; padding: 18px 20px 80px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.crumbs { flex: 1; font-size: 16px; min-width: 200px; }
.crumbs a { cursor: pointer; text-decoration: none; color: var(--text); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--muted); margin: 0 6px; }
.quota { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; max-width: 320px; }
.bar > div { height: 100%; background: var(--accent); }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
td.name { display: flex; align-items: center; gap: 10px; cursor: pointer; word-break: break-all; }
td.num, th.num { text-align: right; white-space: nowrap; color: var(--muted); font-size: 14px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { padding: 4px 9px; font-size: 13px; margin-left: 4px; }
.icon { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.shared { font-size: 11px; color: var(--accent-text); border: 1px solid var(--accent); border-radius: 4px; padding: 0 5px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

.drop { position: fixed; inset: 0; background: rgba(201,54,127,0.135); color: var(--accent-text); border: 3px dashed var(--accent); display: grid; place-items: center; font-size: 22px; font-weight: 600; z-index: 20; pointer-events: none; }
.uploads { position: fixed; right: 16px; bottom: 16px; width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 12px; z-index: 10; font-size: 13px; }
.uploads .row { margin: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 30; font-size: 14px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal img, .modal video { max-width: 92vw; max-height: 82vh; border-radius: 8px; background: #000; }
.modal iframe { width: 90vw; height: 85vh; border: 0; background: #fff; border-radius: 8px; }

@media (max-width: 640px) {
  header { flex-wrap: wrap; }
  header input[type=search] { order: 3; max-width: none; flex-basis: 100%; }
  .hide-sm { display: none; }
  td.actions button { margin: 2px; }
}

/* thumbnails */
.row-thumb { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--line); }

/* grid view */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; }
.tile:hover { background: var(--hover); }
.tile-img { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; }
.tile-img.folder { font-size: 54px; }
.tile-img .icon { width: 64px; height: 64px; font-size: 15px; border-radius: 12px; }
.tile-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-name { margin-top: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 26px; }
.tile-meta { font-size: 12px; color: var(--muted); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 16px; padding-left: 3px; pointer-events: none; }
.tile-badge { position: absolute; top: 6px; left: 6px; background: var(--panel); }
.more { padding: 0 8px; border: 0; background: transparent; font-size: 18px; line-height: 1.4; color: var(--muted); }
.tile .more { position: absolute; right: 6px; bottom: 8px; }
.more:hover { background: var(--line); }
.menu { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; display: flex; flex-direction: column; min-width: 170px; padding: 4px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu button { border: 0; text-align: left; padding: 7px 10px; border-radius: 6px; background: transparent; }
.menu button:hover { background: var(--hover); }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; } }

/* upload manager */
.uploads { max-height: 50vh; overflow-y: auto; }
.up { padding: 6px 2px; border-bottom: 1px solid var(--line); }
.up:last-child { border-bottom: 0; }
.up-top { display: flex; align-items: center; gap: 6px; }
.up-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.up-cancel { border: 0; background: transparent; padding: 0 6px; color: var(--muted); }
.up .bar { max-width: none; margin: 5px 0 3px; }
.up-status { font-size: 12px; color: var(--muted); }
.up.ok .bar > div { background: #2e9e6a; }
.up.bad .up-status { color: var(--danger); }
@media (max-width: 640px) { .uploads { left: 10px; right: 10px; width: auto; } }

/* auth extras */
.forgot-link { text-align: right; font-size: 13px; margin-top: 8px; }
.note { font-size: 14px; border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; line-height: 1.4; }
.note.info { background: rgba(46,158,106,.12); color: #2e9e6a; }
.note.error { background: var(--danger-soft); color: var(--danger); }
.card h2 { font-size: 20px; margin: 6px 0 6px; }
.big-icon { font-size: 40px; margin: 14px 0 4px; }
#inbox button { width: 100%; margin-top: 8px; padding: 10px; }
#inboxErr { color: var(--muted); }

/* ===== v7: layout with sidebar ===== */
main { max-width: none; margin: 0; padding: 18px 24px 90px; flex: 1; min-width: 0; }
.layout { display: flex; align-items: flex-start; }
.side { width: 210px; flex-shrink: 0; position: sticky; top: 61px; height: calc(100vh - 61px); padding: 14px 10px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--text); text-decoration: none; font-size: 15px; user-select: none; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-item.drop-hover { outline: 2px dashed var(--accent); }
.side-quota { margin-top: auto; padding: 10px 12px; }
.mobile-quota { display: none; }
a.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 14px; color: var(--text); text-decoration: none; }
a.btn:hover { background: var(--hover); }
select { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; }
button.danger { color: var(--danger); border-color: var(--danger); }
.danger-text { color: var(--danger) !important; }

.toolbar { align-items: center; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb-title { font-size: 18px; font-weight: 600; }
body[data-view="recent"] .drive-only, body[data-view="starred"] .drive-only,
body[data-view="trash"] .drive-only, body[data-view="search"] #newFolder { display: none; }

/* selection bar */
.selbar { position: sticky; top: 61px; z-index: 4; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.selbar #selCount { font-weight: 600; }
.sel-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.sel-actions button, #selClear { padding: 6px 11px; font-size: 14px; }
.banner { background: var(--accent-soft); color: var(--text); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }

/* list */
th.chk, td.chk { width: 34px; padding-right: 0; }
input.sel { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; margin: 0; }
tr.selected td { background: var(--accent-soft); }
td.name .nm { overflow: hidden; text-overflow: ellipsis; }
td.actions { width: 1%; }
td.actions .act-inline { padding: 4px 10px; font-size: 13px; }
.star { border: 0; background: transparent; padding: 0 4px; color: var(--muted); font-size: 16px; line-height: 1; opacity: 0; }
tr:hover .star, .tile:hover .star, .star.on { opacity: 1; }
.star.on { color: #f2b632; }
.drop-hover td, .tile.drop-hover { background: rgba(201,54,127,0.243) !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
.crumbs a.drop-hover { outline: 2px dashed var(--accent); border-radius: 4px; }
.drag-ghost { position: fixed; top: -100px; background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: 8px; font-weight: 600; }

/* grid tiles: checkbox + star overlays */
.tile.selected { outline: 2px solid var(--accent); background: var(--accent-soft); }
.tile-img input.sel { position: absolute; top: 8px; left: 8px; opacity: 0; z-index: 2; }
.tile:hover .tile-img input.sel, .tile.selected .tile-img input.sel, body.selecting .tile-img input.sel { opacity: 1; }
.tile-img .star { position: absolute; top: 4px; right: 4px; z-index: 2; background: rgba(0,0,0,.35); color: #fff; border-radius: 6px; padding: 3px 5px; }
.tile-img .star.on { color: #f2b632; }
.tile-badge { left: auto; right: 6px; top: auto; bottom: 6px; }

/* folder picker */
.picker { background: var(--panel); color: var(--text); width: min(460px, 94vw); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.picker h3 { margin: 0; font-size: 17px; }
.picker .crumbs { font-size: 14px; min-width: 0; }
.picker-list { border: 1px solid var(--line); border-radius: 10px; max-height: 45vh; overflow-y: auto; }
.picker-item { display: flex; width: 100%; align-items: center; gap: 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; padding: 10px 12px; background: transparent; }
.picker-item:last-child { border-bottom: 0; }
.picker-item .chev { margin-left: auto; color: var(--muted); }
.picker-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.picker-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { background: transparent; border: 0; color: #f6a; font-weight: 700; padding: 0; color: #ff8a8f; }

/* ===== phones ===== */
@media (max-width: 760px) {
  .layout { display: block; }
  .side { position: sticky; top: 0; z-index: 4; width: auto; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); padding: 6px; gap: 4px; }
  .nav-item { padding: 7px 10px; white-space: nowrap; font-size: 14px; }
  .side-quota { display: none; }
  .mobile-quota { display: block; }
  main { padding: 12px 12px 90px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tools select, .tools button { width: 100%; min-width: 0; }
  body[data-view="drive"] #uploadBtn { grid-column: span 2; }
  td.actions .act-inline { display: none; }
  .star { opacity: 1; }
  .tile-img input.sel { opacity: .9; }
  .selbar { top: 47px; flex-wrap: wrap; }
  .sel-actions { margin-left: 0; width: 100%; }
}

/* ===== admin page ===== */
.admin-tag { font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 5px; padding: 2px 7px; margin-left: 4px; }
main.admin { max-width: 1100px; margin: 0 auto; padding: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cs-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.cs-big { font-size: 24px; font-weight: 700; margin: 6px 0 2px; }
.cs-sub { font-size: 13px; color: var(--muted); }
.card-stat .bar { max-width: none; margin-top: 10px; }
.bar.warn > div { background: #e0a100; }
.warn { background: rgba(224,161,0,.12); border: 1px solid rgba(224,161,0,.5); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; display: grid; gap: 6px; }
.admin-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.admin-box h2 { font-size: 17px; margin: 0; }
.admin-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.admin-head input { max-width: 260px; }
.table-wrap { overflow-x: auto; }
table.users { border: 0; }
table.users td { vertical-align: middle; }
.u-email { font-weight: 500; word-break: break-all; }
.u-store { min-width: 150px; font-size: 13px; }
.u-store .bar { max-width: 180px; margin-top: 4px; }
tr.disabled td { opacity: .55; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.badge { font-size: 11px; border-radius: 4px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); }
.badge.admin { border-color: var(--accent); color: var(--accent-text); }
.badge.off { background: var(--danger); color: #fff; border-color: var(--danger); }
.badge.unv { border-color: #e0a100; color: #b88300; }
.badge.you { background: var(--hover); }
.settings-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 12px 0; font-size: 14px; }
.settings-grid > div:nth-child(odd) { color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }
td.name { display: table-cell; cursor: pointer; }
.cellwrap { display: flex; align-items: center; gap: 10px; min-width: 0; word-break: break-all; }

/* ===== v8: security / account ===== */
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.code-input { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; margin-top: 6px; }
#twofa input { margin-top: 10px; }
.show-sm { display: none; }
#accountLink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.page-title { font-size: 24px; margin: 4px 0 2px; }
.stack { display: grid; gap: 12px; max-width: 420px; }
.stack label, .picker label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 10px; background: var(--hover); color: var(--muted); }
.pill.on { background: rgba(46,158,106,.15); color: #2e9e6a; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.steps { padding-left: 20px; display: grid; gap: 14px; line-height: 1.5; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 10px; margin: 10px 0 6px; }
.qr img { display: block; }
code.secret { font-size: 13px; background: var(--hover); padding: 2px 6px; border-radius: 5px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; max-width: 520px; }
.codes code { font-size: 16px; background: var(--hover); padding: 8px 10px; border-radius: 8px; text-align: center; letter-spacing: 1px; }
.warn-text { color: #b88300; font-weight: 600; }
tr.ev-bad td:first-child { color: var(--danger); }
.events td { font-size: 14px; }
.danger-zone { border-color: rgba(255,91,74,.4); }
button.danger-bg, button.primary.danger-bg { background: var(--danger); border-color: var(--danger); color: #fff; }
.badge.tfa { border-color: #2e9e6a; color: #2e9e6a; }
.account .admin-box h2 { margin-bottom: 8px; }
.account .admin-box p { margin: 6px 0 12px; }
@media (max-width: 640px) { .show-sm { display: inline; } }


/* ===== v10: Garnatah theme ===== */
:root { --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C9367F' stroke-width='1' opacity='.16'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate%2845 28 28%29'/%3E%3Cpath d='M0 0 L11 11 M56 0 L45 11 M0 56 L11 45 M56 56 L45 45'/%3E%3C/g%3E%3C/svg%3E"); }
::selection { background: var(--accent); color: var(--accent-ink); }
header { background: rgba(10,10,11,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; }
.brand .ar { font-family: "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", serif; font-weight: 400; color: var(--accent-text); opacity: .8; font-size: .85em; margin-left: 2px; }
a { color: var(--accent-text); }
button:hover { border-color: #3d2a34; }
button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
input, select { background: var(--panel-2); border-color: var(--line); }
input:focus, select:focus { outline: 2px solid rgba(201,54,127,0.6); outline-offset: 1px; border-color: transparent; }
table, .tile, .card, .admin-box, .card-stat, .picker, .uploads, .menu { background: var(--panel); border-color: var(--line); }
tbody tr:hover { background: var(--hover); }
.side { background: linear-gradient(180deg, rgba(201,54,127,0.047), transparent 40%); }
.nav-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.toast { background: #1d1a1c; color: var(--text); border: 1px solid rgba(201,54,127,0.6); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast-btn { color: var(--accent-text); }
.up.ok .bar > div { background: #4cd39a; }
.note.info { background: rgba(76,211,154,.1); color: #6fe0ae; }
.bar.warn > div { background: #f5c04a; }
.badge.unv { border-color: #f5c04a; color: #f5c04a; }
.warn-text { color: #f5c04a; }
.pill.on { background: rgba(76,211,154,.14); color: #6fe0ae; }
.badge.tfa { border-color: #4cd39a; color: #6fe0ae; }
.warn { background: rgba(245,192,74,.08); border-color: rgba(245,192,74,.4); }
.shared { background: var(--accent-soft); }
.empty { background-image: var(--pattern); border: 1px dashed var(--line); border-radius: var(--radius); }

/* sign-in pages: geometric tile background */
.auth { background: radial-gradient(1200px 600px at 20% 10%, rgba(201,54,127,0.135), transparent 60%), var(--pattern), var(--bg); }
.auth .card { box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.auth .card .brand .logo { width: 30px; height: 30px; }

/* split layout on the sign-in page: arch on the left, form on the right */
.auth.split { display: grid; grid-template-columns: 1.1fr 1fr; place-items: stretch; padding: 0; }
.hero { position: relative; display: grid; place-items: center; padding: 40px 30px; overflow: hidden; border-right: 1px solid var(--line); }
.arch { width: min(380px, 80%); aspect-ratio: 3 / 4; border: 2px solid var(--accent); border-radius: 50% 50% 0 0 / 34% 34% 0 0; padding: 18% 10% 10%;
        display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
        background: linear-gradient(180deg, rgba(201,54,127,0.135), rgba(201,54,127,0.027) 55%, transparent), rgba(10,10,11,.55);
        box-shadow: 0 0 0 8px rgba(201,54,127,0.068), 0 30px 80px rgba(0,0,0,.6) inset; }
.arch .logo, .arch .logo[width] { width: 150px; height: 150px; filter: drop-shadow(0 6px 24px rgba(201,54,127,0.472)); }
.arch h1 { margin: 6px 0 0; font-size: 40px; letter-spacing: .04em; font-weight: 800; }
.arch .ar { font-family: "KFGQPC Uthman Taha Naskh", "Noto Naskh Arabic", serif; font-size: 30px; color: var(--accent-text); line-height: 1.2; }
.arch .tag { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.arch .pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.arch .pills span { font-size: 12px; border: 1px solid rgba(201,54,127,0.472); color: var(--accent-text); border-radius: 20px; padding: 3px 10px; }
.hero .foot { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12.5px; color: var(--muted); padding: 0 20px; }
.auth-main { display: grid; place-items: center; padding: 30px 20px; }
.auth.split .card .brand { display: none; }
@media (max-width: 860px) {
  .auth.split { grid-template-columns: 1fr; }
  .hero { border-right: 0; padding: 26px 20px 0; }
  .arch { aspect-ratio: auto; width: 100%; max-width: 420px; border-radius: 160px 160px 18px 18px; padding: 26px 20px 18px; }
  .arch .logo, .arch .logo[width] { width: 104px; height: 104px; }
  .arch h1 { font-size: 30px; }
  .arch .ar { font-size: 22px; }
  .arch .pills, .hero .foot { display: none; }
  .auth-main { padding: 18px 14px 30px; place-items: start center; }
}
input[type=checkbox] { accent-color: var(--accent); }

/* ===== v10b: line icons, Nasrid flag, memorial ===== */
.ico { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
button .ico, a.btn .ico { margin-right: 6px; }
#viewToggle, #newFolder, #uploadBtn { display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico { width: 19px; height: 19px; color: var(--muted); }
.nav-item.active .ico, .nav-item:hover .ico { color: var(--accent-text); }
.icon.folder-ico { background: rgba(201,54,127,0.176); color: var(--accent-text); }
.icon.folder-ico .ico { width: 17px; height: 17px; vertical-align: 0; }
.tile-img.folder { color: var(--accent-text); }
.tile-img.folder .ico.big { width: 64px; height: 64px; stroke-width: 1.3; opacity: .9; }
.play .ico { width: 18px; height: 18px; margin-left: 2px; color: #fff; }
.star { display: inline-grid; place-items: center; padding: 2px 4px; }
.star .ico { width: 16px; height: 16px; }
.star.on { color: var(--accent-text); }
.star.on .ico path { fill: currentColor; }
.tile-img .star.on { color: var(--accent-text); }
.picker-item .ico { color: var(--accent-text); margin-right: 4px; }
.acct-ico .ico { width: 18px; height: 18px; vertical-align: -4px; }
.with-ico { display: flex; align-items: center; gap: 8px; }
.with-ico .ico { color: var(--accent-text); }
h2.with-ico .ico { width: 22px; height: 22px; color: #6fe0ae; }
.ev { display: inline-flex; align-items: center; gap: 8px; }
.ev .ico { width: 16px; height: 16px; }
.ev-ok .ico { color: #6fe0ae; }
.ev-bad { color: var(--danger); }
.ev-info .ico { color: var(--accent-text); }
.big-icon { color: var(--accent-text); }
.big-icon .ico { width: 44px; height: 44px; }
tr.ev-bad td:first-child { color: inherit; }

.memorial { display: flex; align-items: center; justify-content: center; gap: 12px; }
.memorial .flag { width: 54px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.5); flex-shrink: 0; }
.hero .foot.memorial { bottom: 22px; font-size: 13px; }
.hero .foot.memorial .flag { width: 64px; }
.memorial.mobile-only { display: none; font-size: 12.5px; color: var(--muted); margin-top: 18px; max-width: 420px; text-align: left; }
@media (max-width: 860px) {
  .memorial.mobile-only, .memorial.mobile-only[hidden] { display: flex; }
  .memorial.mobile-only .flag { width: 46px; }
}
.stack label.choice, .choice { display: flex; font-size: 14px; color: var(--text); gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: 18px; height: 18px; padding: 0; flex: none; accent-color: var(--accent); margin: 1px 0 0; outline: none; }
.code-input[maxlength="8"] { letter-spacing: 5px; }

/* Nasrid motto: KFGQPC Uthman Taha Naskh (free font from the King Fahd Glorious Quran Printing Complex, served unmodified) */
@font-face { font-family: "KFGQPC Uthman Taha Naskh"; font-display: swap;
  src: local("KFGQPC Uthman Taha Naskh"), url("/fonts/UthmanTN1-Ver10.woff2") format("woff2"); }
.arch .motto { font-family: "KFGQPC Uthman Taha Naskh", "Noto Naskh Arabic", serif; font-size: 34px; line-height: 1.5; margin: -6% 0 -4px; white-space: nowrap;
  background: linear-gradient(100deg, #8a6420 0%, #d4a63a 22%, #fff3c4 45%, #f2c95c 55%, #b8862b 78%, #8a6420 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 200, 90, .55)) drop-shadow(0 0 18px rgba(230, 170, 50, .35));
  animation: motto-shine 7s ease-in-out infinite; }
@keyframes motto-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) { .arch .motto { animation: none; background-position: 50% 0; } }
@media (max-width: 860px) { .arch .motto { font-size: 26px; margin: 0 0 -2px; } }

/* ---------- public shared-folder page ---------- */
.shared-page { min-height: 100vh; display: flex; flex-direction: column; }
.sh-head { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.sh-head .brand { text-decoration: none; color: var(--text); margin: 0; }
.sh-head .brand .logo { width: 34px; height: 34px; }
.sh-tag { font-size: 12px; color: var(--accent-text); border: 1px solid rgba(201,54,127,.45); border-radius: 20px; padding: 3px 10px; }
.sh-main { flex: 1; width: min(1100px, 100%); margin: 0 auto; padding: 26px 20px; }
.sh-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sh-title h1 { margin: 0 0 4px; font-size: 26px; }
.sh-crumbs { margin: 18px 0 16px; color: var(--muted); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.sh-crumbs a { color: var(--accent-text); text-decoration: none; }
.sh-empty { text-align: center; padding: 40px 0; }
.sh-foot { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 18px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.sh-foot .flag { border-radius: 4px; object-fit: cover; }
.tile-img .ico.big { width: 48px; height: 48px; color: var(--accent-text); }
.tile-meta { display: flex; align-items: center; justify-content: space-between; }
.tile-meta .dl { color: var(--muted); display: inline-flex; padding: 2px; }
.tile-meta .dl:hover { color: var(--accent-text); }
.play-badge { position: absolute; inset: auto 8px 8px auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; color: #fff; }
.play-badge .ico { width: 16px; height: 16px; }
.viewer { display: flex; flex-direction: column; gap: 10px; max-width: 96vw; }
.viewer-bar { display: flex; align-items: center; gap: 10px; }
.viewer-bar .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .btn { text-decoration: none; }
.viewer-body { display: flex; align-items: center; gap: 8px; }
.viewer-body .nav { font-size: 28px; line-height: 1; padding: 6px 14px; background: rgba(0,0,0,.5); }
.viewer-body audio { width: min(520px, 80vw); }
