/* DL HOST stylesheet.
   The first part is the exact design system of ho3yn19.ir (copied from its index.php), the second part adds DL HOST components built on the same tokens. */
:root {
    --bg: #f3f7f6;
    --bg-2: #e6efec;
    --surface: rgba(255, 255, 255, .7);
    --surface-strong: #ffffff;
    --text: #0c1a1f;
    --muted: #5b7373;
    --line: rgba(12, 26, 31, .09);
    --turq: #0fb5a0;
    --turq-2: #2ee6d0;
    --saffron: #e8912b;
    --holiday: #d8453b;
    --glow: rgba(15, 181, 160, .22);
    --glow-2: rgba(232, 145, 43, .16);
    --shadow: 0 30px 70px -28px rgba(12, 26, 31, .25);
    --turq-text: #067d6e;
    --saffron-text: #a35d00;
    color-scheme: light;
}
html[data-theme="dark"] {
    color-scheme: dark;
}
html[data-theme="dark"] {
    --bg: #07111a;
    --bg-2: #0d1d29;
    --surface: rgba(255, 255, 255, .05);
    --surface-strong: #0f202c;
    --text: #eaf6f3;
    --muted: #8aa6a3;
    --line: rgba(255, 255, 255, .09);
    --turq: #2ee6d0;
    --turq-2: #9cf6ff;
    --saffron: #ffb547;
    --holiday: #ff7a6b;
    --glow: rgba(46, 230, 208, .22);
    --glow-2: rgba(255, 181, 71, .16);
    --shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
    --turq-text: #2ee6d0;
    --saffron-text: #ffb547;
}
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;
        --bg: #07111a;
        --bg-2: #0d1d29;
        --surface: rgba(255, 255, 255, .05);
        --surface-strong: #0f202c;
        --text: #eaf6f3;
        --muted: #8aa6a3;
        --line: rgba(255, 255, 255, .09);
        --turq: #2ee6d0;
        --turq-2: #9cf6ff;
        --saffron: #ffb547;
        --holiday: #ff7a6b;
        --glow: rgba(46, 230, 208, .22);
        --glow-2: rgba(255, 181, 71, .16);
        --shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
        --turq-text: #2ee6d0;
        --saffron-text: #ffb547;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Vazir', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 24px 16px 40px;
    overflow-x: hidden;
    position: relative;
    transition: background-color .4s, color .4s;
}

/* en uses the same font, just flips direction and hides fa spans */
html[data-lang="en"] .fa { display: none; }
html[data-lang="fa"] .en { display: none; }
html[data-lang="en"] body { font-family: 'Vazir', system-ui, sans-serif; }

.aura {
    position: fixed; inset: -20%;
    background:
        radial-gradient(40% 40% at 20% 25%, var(--glow), transparent 70%),
        radial-gradient(35% 35% at 85% 80%, var(--glow-2), transparent 70%);
    filter: blur(40px);
    animation: drift 22s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}
@keyframes drift {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    100% { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

.stage {
    position: relative; z-index: 1;
    width: 100%; max-width: 680px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 24px;
}

.topbar {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
    font-size: .9rem; color: var(--muted);
    display: flex; align-items: center; gap: 10px;
}
.brand .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--turq);
    animation: ping 2s ease-out infinite;
}
@keyframes ping {
    0%   { box-shadow: 0 0 0 0 var(--glow); }
    80%  { box-shadow: 0 0 0 12px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.controls { display: flex; gap: 8px; }
.pill {
    font: inherit; font-size: .85rem; font-weight: 700;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color .2s, border-color .2s, transform .15s;
}
.pill:hover { border-color: var(--turq); }
.pill.icon-pill { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
#theme-btn[data-mode="system"] .ic-system,
#theme-btn[data-mode="light"] .ic-light,
#theme-btn[data-mode="dark"] .ic-dark { display: block; }
.flag { width: 24px; height: 16px; border-radius: 3px; display: none; }
html[data-lang="fa"] .flag-fa,
html[data-lang="en"] .flag-en { display: block; }
.pill:active { transform: scale(.96); }
.pill[aria-pressed="true"] { background: var(--turq); color: #04221e; border-color: transparent; }
html[data-theme="dark"] .pill[aria-pressed="true"] { color: #04221e; }

.domain-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2px 0 7px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .22em;
    font-family: Arial, sans-serif;
    text-align: center;
}
.domain-eyebrow .eyebrow-line {
    width: 26px;
    height: 1px;
    background: var(--saffron);
    flex: 0 0 26px;
}
html[data-lang="fa"] .domain-eyebrow {
    letter-spacing: 0;
    font-family: 'Vazir', system-ui, sans-serif;
    font-size: 12px;
}
.domain {
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(100deg, var(--turq), var(--turq-2) 45%, var(--saffron));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    line-height: 1.3;
    word-break: break-all;
    text-align: center;
}

.description {
    color: var(--muted);
    font-size: clamp(.95rem, 3.6vw, 1.1rem);
    line-height: 1.9;
    text-align: center;
    max-width: 520px;
}

.card {
    width: 100%;
    border-radius: 28px;
    background: linear-gradient(160deg, var(--surface), transparent), var(--surface);
    background-color: transparent;
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    padding: 32px 20px 28px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    text-align: center;
}

/* clock */
.ring-wrap {
    position: relative;
    width: min(360px, 84vw); aspect-ratio: 1;
    display: grid; place-items: center;
    margin-bottom: 4px;
}
.ring-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: var(--line); }
.ring-progress {
    stroke: url(#grad);
    stroke-linecap: round;
    transition: stroke-dashoffset .9s linear;
    filter: drop-shadow(0 0 8px var(--glow));
}
#live-clock {
    font-size: clamp(2.2rem, 8vw, 3.1rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    text-shadow: 0 0 30px var(--glow);
    white-space: nowrap;
}
.weekday { color: var(--saffron-text); font-size: .98rem; font-weight: 700; }
.date-line { font-size: clamp(1.1rem, 4.5vw, 1.45rem); font-weight: 700; }

.event-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 11px 18px; border-radius: 999px;
    background: linear-gradient(90deg, rgba(232,145,43,.18), rgba(15,181,160,.14));
    border: 1px solid rgba(232,145,43,.4);
    font-weight: 700; font-size: .95rem;
}
.event-pill .spark { color: var(--saffron); }

/* calendar */
.cal-head {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cal-title { font-size: clamp(1.2rem, 4vw, 1.45rem); font-weight: 800; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav a {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 12px;
    color: var(--text); text-decoration: none;
    border: 1px solid var(--line); background: var(--surface);
    font-weight: 800; font-size: 1.1rem;
}
.cal-nav a:hover { border-color: var(--turq); }
.cal-now {
    font-size: .8rem; color: var(--turq); text-decoration: none; font-weight: 700;
    padding: 0 10px; align-self: center;
}

.grid {
    width: 100%;
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.wd {
    font-size: .78rem; color: var(--muted); font-weight: 700; padding: 6px 0;
}
.cell {
    aspect-ratio: 1; min-height: 44px;
    border-radius: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 1px solid transparent;
    font-weight: 700; font-size: 1rem;
    position: relative;
}
.cell.blank { visibility: hidden; }
.cell.has-event { background: var(--surface-strong); border-color: var(--line); }
.cell.holiday { color: var(--holiday); }
.cell.holiday::after {
    content: ""; position: absolute; bottom: 6px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--holiday);
}
.cell.event::after {
    content: ""; position: absolute; bottom: 6px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--saffron);
}
.cell.today {
    background: linear-gradient(135deg, var(--turq), var(--saffron));
    color: #04221e; border-color: transparent;
}
.cell.today::after { background: #04221e; }

.agenda { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.agenda-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; border-radius: 14px;
    background: var(--surface-strong); border: 1px solid var(--line);
    font-size: .92rem;
}
.agenda-item .d { font-weight: 800; color: var(--saffron); min-width: 48px; }
.agenda-item.h .d { color: var(--holiday); }
.agenda-item .tag {
    font-size: .72rem; font-weight: 700; color: var(--holiday);
    border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.day-list { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.day-row {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 12px 14px; border-radius: 16px;
    background: var(--surface-strong); border: 1px solid var(--line);
}
.day-row .sd {
    min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.day-row .sd .n { font-size: 1.35rem; font-weight: 800; }
.day-row .sd .wd { font-size: .74rem; color: var(--muted); font-weight: 700; }
.day-row .info { flex: 1; display: flex; flex-direction: column; gap: 6px; text-align: start; min-width: 0; }
.day-row .dates { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); }
.day-row .occ { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .92rem; font-weight: 700; color: var(--saffron); }
.day-row .occ.h { color: var(--holiday); }
.day-row.hol { border-color: rgba(255, 122, 107, .45); }
.day-row.today {
    background: linear-gradient(135deg, rgba(15,181,160,.22), rgba(232,145,43,.18));
    border-color: transparent;
}
.day-row.today .sd .n { color: var(--turq); }
.agenda-item .hijri { color: var(--muted); font-size: .8rem; min-width: 96px; text-align: start; }
.agenda-item .names { flex: 1; text-align: start; }
.hijri-line { color: var(--muted); font-size: .92rem; font-weight: 700; }
.agenda-empty { color: var(--muted); font-size: .9rem; }
.note { color: var(--muted); font-size: .78rem; text-align: center; }

/* contact */
.contacts {
    width: 100%;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.contact {
    display: flex; flex-direction: column; gap: 4px; align-items: center;
    padding: 16px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text); text-decoration: none;
    transition: border-color .2s, transform .15s;
}
.contact:hover { border-color: var(--turq); transform: translateY(-2px); }
.contact small { color: var(--muted); font-size: .8rem; }
.contact strong { font-size: 1rem; direction: ltr; }

.greg-line { color: var(--muted); font-size: .92rem; font-weight: 700; }
.no-event { color: var(--muted); font-size: .9rem; }
.cta {
    --c: var(--turq);
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text); text-decoration: none;
    transition: transform .15s, border-color .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 14px 30px -18px var(--c); }
.cta.tg { --c: #26A5E4; }
.cta.wa { --c: #25D366; }
.cta.email { --c: #e5a94b; }
.cta.dlhost { --c: #20cdbb; }
.cta-icon {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 16px; background: var(--c); color: #fff;
    display: grid; place-items: center;
}
.cta-icon svg { width: 26px; height: 26px; fill: currentColor; }
.cta-text { display: flex; flex-direction: column; gap: 2px; text-align: start; min-width: 0; }
.cta-text small { color: var(--muted); font-size: .8rem; }
.cta-text strong { font-size: 1.02rem; direction: ltr; text-align: start; }
.footer { width:100%; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 0 8px; border-top:1px solid var(--line); color:var(--muted); font-size:.85rem; text-align:start; }
.footer b { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
    .aura, .brand .dot { animation: none; }
    .ring-progress { transition: none; }
}
@media (max-width: 480px) {
    body { padding: 16px 12px 32px; }
    .card { padding: 26px 12px 22px; border-radius: 22px; }
    .cell { min-height: 38px; font-size: .92rem; border-radius: 10px; }
    .grid { gap: 4px; }
}

/* one-screen layout: everything scales with the viewport */
html, body { height: 100%; }
body { min-height: 100dvh; height: auto; overflow-y: auto; padding: clamp(10px, 2.2vh, 26px) 14px; display: flex; flex-direction: column; }
.stage { margin: auto; justify-content: center; gap: clamp(8px, 1.8vh, 20px); }
.topbar { flex-shrink: 0; }
.domain { font-size: clamp(1.4rem, 4.2vh, 2.6rem); line-height: 1.2; }
.description { font-size: clamp(.82rem, 1.9vh, 1.02rem); line-height: 1.7; }
.card { padding: clamp(12px, 2.4vh, 28px) 16px; gap: clamp(6px, 1.3vh, 12px); border-radius: clamp(18px, 3vh, 26px); }
.ring-wrap { width: min(34vh, 72vw, 300px); margin-bottom: 0; }
#live-clock { font-size: clamp(1.5rem, min(5.4vh, 8.5vw), 2.8rem); }
.weekday { font-size: clamp(.8rem, 1.8vh, .95rem); }
.date-line { font-size: clamp(.95rem, 2.5vh, 1.25rem); }
.hijri-line, .greg-line { font-size: clamp(.78rem, 1.7vh, .9rem); }
.event-pill { padding: clamp(6px, 1.2vh, 10px) 14px; font-size: clamp(.8rem, 1.8vh, .9rem); }
.no-event { font-size: clamp(.78rem, 1.7vh, .88rem); }
.contacts { grid-template-columns: 1fr 1fr; gap: 10px; }
.cta { padding: clamp(8px, 1.4vh, 14px) 12px; gap: 10px; border-radius: 16px; }
.cta-icon { width: clamp(36px, 5.6vh, 46px); height: clamp(36px, 5.6vh, 46px); border-radius: 13px; }
.cta-icon svg { width: 22px; height: 22px; }
.cta-text strong { font-size: clamp(.85rem, 1.9vh, 1rem); }
.footer { font-size: clamp(.7rem, 1.5vh, .82rem); }
@media (max-width: 380px) { .contacts { grid-template-columns: 1fr; } }

/* DL HOST-inspired social cards: preserve original links and SVGs */
.contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.cta {
    min-width: 0;
    gap: 13px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cta:hover {
    transform: translateY(-3px);
    border-color: var(--c);
    box-shadow: 0 14px 30px -18px var(--c), var(--shadow);
}
.cta.tg { --c: #26A5E4; }
.cta.tg .cta-icon { background: rgba(38, 165, 228, .12); }
.cta.wa { --c: #25D366; }
.cta.wa .cta-icon { background: rgba(37, 211, 102, .12); }
.cta-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    background: rgba(25, 216, 197, .12);
    color: var(--c);
}
.cta-icon svg { width: 23px; height: 23px; fill: currentColor; }
.cta-text { gap: 4px; align-items: flex-start; }
.cta-text strong { max-width: 100%; overflow-wrap: anywhere; unicode-bidi: isolate; }
.cta-icon svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta-text small { font-size: .8rem; }
.cta-text strong { font-size: 1rem; font-weight: 800; }
.cta:focus-visible {
    outline: 2px solid var(--c);
    outline-offset: 3px;
}
@media (max-width: 640px) {
    .contacts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .cta { padding: 13px 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .cta { transition: none; }
    .cta:hover { transform: none; }
}

/* ==========================================================================
   DL HOST components. Everything below uses the same tokens as ho3yn19.ir
   (--bg, --surface, --text, --muted, --line, --turq, --saffron ...), so dark,
   light and system themes always match the main site.
   ========================================================================== */
:root {
    --field: #ffffff;
    --ok-text: #0a7a50;
    --warn-text: #7a5300;
    --bad-text: #a32020;
    --bad-bg: rgba(216, 69, 59, .10);
    --bad-line: rgba(216, 69, 59, .35);
    --hover-bg: rgba(15, 181, 160, .08);
}
html[data-theme="dark"] {
    --field: rgba(0, 0, 0, .25);
    --ok-text: #5ee9b0;
    --warn-text: #f6d58f;
    --bad-text: #ffb2b2;
    --bad-bg: rgba(255, 122, 107, .10);
    --bad-line: rgba(255, 122, 107, .35);
    --hover-bg: rgba(46, 230, 208, .08);
}
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --field: rgba(0, 0, 0, .25);
        --ok-text: #5ee9b0;
        --warn-text: #f6d58f;
        --bad-text: #ffb2b2;
        --bad-bg: rgba(255, 122, 107, .10);
        --bad-line: rgba(255, 122, 107, .35);
        --hover-bg: rgba(46, 230, 208, .08);
    }
}

a { color: inherit; }
button { font: inherit; }
.stage > * { max-width: 100%; }
.stage-wide { max-width: 850px; }
a.brand { color: var(--muted); text-decoration: none; }
a.brand:hover, a.brand:focus-visible { color: var(--text); }
.domain.heading { word-break: normal; overflow-wrap: anywhere; }
.arrow-back::before { content: '←'; }
html[dir="rtl"] .arrow-back::before { content: '→'; }
.cta.mainsite { --c: var(--saffron); }
.cta.mainsite .cta-icon { background: rgba(232, 145, 43, .14); }
.hero-title { font-size: clamp(1.4rem, 4.2vh, 2.6rem); line-height: 1.2; }

/* generic glass panel (same surface as the .card on ho3yn19.ir) */
.panel {
    width: 100%;
    border-radius: clamp(18px, 3vh, 26px);
    background: linear-gradient(160deg, var(--surface), transparent), var(--surface);
    background-color: transparent;
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    text-align: start;
}
.single-card { grid-template-columns: minmax(0, 1fr); }
.cta-text strong.native { direction: inherit; unicode-bidi: normal; }
.page-head { display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1.2vh, 12px); text-align: center; width: 100%; }
.back-link { color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 700; }
.back-link:hover, .back-link:focus-visible { color: var(--turq-text); }
.parent-link { align-self: flex-start; color: var(--turq-text); text-decoration: none; font-size: .88rem; font-weight: 700; }
.parent-link:hover { text-decoration: underline; }

/* buttons */
.btn, .admin-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 14px; padding: 12px 20px;
    background: var(--turq); color: #04221e;
    font: inherit; font-size: .92rem; font-weight: 800; text-decoration: none; cursor: pointer;
    transition: transform .15s, filter .2s;
}
.btn:hover, .admin-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active, .admin-btn:active { transform: scale(.97); }
.btn:focus-visible, .admin-btn:focus-visible, .action-btn:focus-visible, .mini-link:focus-visible { outline: 2px solid var(--turq); outline-offset: 3px; }

/* error page */
.error-card { padding: clamp(22px, 5vh, 44px) clamp(16px, 5vw, 36px); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.error-mark { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--hover-bg); border: 1px solid var(--line); font-size: 28px; font-weight: 800; color: var(--turq-text); }
.error-code { font-size: clamp(76px, 20vw, 132px); line-height: 1; font-weight: 900; letter-spacing: -.04em; direction: ltr; background: linear-gradient(100deg, var(--turq), var(--turq-2) 45%, var(--saffron)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-card h1 { font-size: clamp(1.35rem, 5vw, 1.9rem); font-weight: 800; }
.error-card p { color: var(--muted); line-height: 2; font-size: .95rem; max-width: 430px; }
.error-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* file listing */
.pathbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: .85rem; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.pathbar > span:first-child { color: var(--turq-text); }
.pathbar b { color: var(--text); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.path-sep { opacity: .5; }
.file-list { overflow: hidden; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.list-toolbar > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.list-toolbar b { font-size: .95rem; }
.list-toolbar small { color: var(--muted); font-size: .8rem; }
.copy-path, .action-btn {
    border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px;
    background: var(--surface); color: var(--text);
    font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: border-color .2s, transform .15s;
}
.copy-path { color: var(--turq-text); border-color: var(--turq); background: var(--hover-bg); }
.copy-path:hover, .action-btn:hover { border-color: var(--turq); }
.file-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--hover-bg); }
.file-symbol { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--hover-bg); color: var(--turq-text); }
.file-symbol svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.file-symbol.is-folder { color: var(--saffron-text); background: rgba(232, 145, 43, .12); }
.file-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; text-align: start; }
.file-info b { font-size: .92rem; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.file-info small { color: var(--muted); font-size: .78rem; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.file-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.download-btn { background: var(--turq); border-color: transparent; color: #04221e; }
.download-btn:hover { filter: brightness(1.06); }
.open-btn { color: var(--saffron-text); }
.empty-state { padding: 44px 18px; text-align: center; display: flex; align-items: center; flex-direction: column; gap: 8px; color: var(--muted); }
.empty-state > span { font-size: 2.2rem; color: var(--turq-text); line-height: 1; }
.empty-state b { color: var(--text); font-size: .95rem; }
.empty-state small { font-size: .8rem; }
.listing-tip { text-align: center; }

/* admin panel */
.admin-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.admin-head p { color: var(--muted); font-size: .9rem; line-height: 1.8; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.admin-nav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: none; background: var(--surface); }
.admin-nav a:hover, .admin-nav a:focus-visible { color: var(--turq-text); border-color: var(--turq); }
.admin-card { padding: 22px; scroll-margin-top: 16px; }
.admin-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.admin-top h2 { margin-bottom: 6px; }
.admin-top a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.admin-top a:hover { color: var(--turq-text); }
.sub-title { font-size: .85rem; margin: 20px 0 6px; color: var(--muted); font-weight: 700; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.admin-form .wide { grid-column: 1 / -1; }
.admin-input, .admin-select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--field); color: var(--text); font: inherit; font-size: .92rem; outline: none; }
.admin-input:focus, .admin-select:focus { border-color: var(--turq); }
.admin-btn.gold { background: var(--saffron); }
.admin-btn.danger { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad-text); padding: 8px 12px; font-size: .8rem; }
.admin-btn.mini { padding: 6px 11px; font-size: .85rem; border-radius: 10px; }
.admin-msg { width: 100%; padding: 12px 15px; border-radius: 14px; font-size: .88rem; line-height: 1.9; background: var(--hover-bg); border: 1px solid var(--turq); text-align: start; }
.admin-msg.error { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-text); }
.admin-msg.warn { background: rgba(232, 145, 43, .10); border-color: rgba(232, 145, 43, .4); color: var(--warn-text); }
.admin-msg.info { background: var(--surface); border-color: var(--line); }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-of-type { border-bottom: 0; }
.item-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.admin-item code { direction: ltr; unicode-bidi: isolate; text-align: start; overflow-wrap: anywhere; color: var(--turq-text); font-size: .82rem; }
.mini-link { font-size: .8rem; color: var(--muted); text-decoration: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mini-link:hover { color: var(--turq-text); border-color: var(--turq); }
.badge { font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { color: var(--ok-text); border-color: var(--ok-text); }
.badge.warn { color: var(--warn-text); border-color: var(--warn-text); }
.badge.bad { color: var(--bad-text); border-color: var(--bad-line); background: var(--bad-bg); }
.badge.muted { color: var(--muted); }
.admin-empty { color: var(--muted); font-size: .88rem; padding: 12px 0; }
.admin-login { max-width: 430px; margin-inline: auto; }
.admin-login .admin-form { grid-template-columns: 1fr; }
.admin-login h1 { font-size: 2rem; text-align: center; font-weight: 800; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 18px; }
.hint { font-size: .78rem; color: var(--muted); line-height: 1.9; margin-top: 12px; }
.hint-top { margin: 0 0 4px; font-size: .82rem; }
.logout-form { text-align: start; margin: 4px 0; }
.admin-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.8vh, 18px); }
.picker { border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 8px; background: var(--field); }
.picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .88rem; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { max-height: 340px; overflow: auto; overscroll-behavior: contain; }
.tree ul { padding-inline-start: 20px; border-inline-start: 1px dashed var(--line); margin-inline-start: 12px; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; }
.tree-row:hover { background: var(--hover-bg); }
.tree-row.is-picked { background: var(--hover-bg); outline: 1px solid var(--turq); }
.tree-toggle, .tree-spacer { width: 26px; height: 26px; flex: 0 0 26px; }
.tree-toggle { border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; font: inherit; }
.tree-toggle:hover { color: var(--turq-text); }
.tree-toggle::before { content: '▸'; }
html[dir="rtl"] .tree-toggle::before { content: '◂'; }
.tree-toggle[aria-expanded="true"]::before { content: '▾'; }
.tree-name { flex: 1; min-width: 0; direction: ltr; text-align: start; overflow-wrap: anywhere; font-size: .88rem; }
.tree-row.is-disabled .tree-name { color: var(--muted); }
.tree-pick { border: 1px solid var(--turq); background: transparent; color: var(--turq-text); border-radius: 10px; padding: 4px 11px; font: inherit; font-size: .8rem; cursor: pointer; }
.tree-pick:hover { background: var(--hover-bg); }
.tree-note { color: var(--muted); font-size: .82rem; padding: 6px 8px; }
.tree-note.is-error { color: var(--bad-text); }
.root-add { margin-top: 14px; }
.offline-card { padding: 34px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 460px; }
.offline-card p { color: var(--muted); line-height: 2; }

@media (max-width: 640px) {
    .file-row { flex-wrap: wrap; gap: 10px; padding: 12px 13px; }
    .file-actions { width: 100%; justify-content: flex-start; }
    .list-toolbar { padding: 14px; }
    .admin-card { padding: 16px; }
    .admin-form { grid-template-columns: 1fr; }
    .admin-item { align-items: flex-start; flex-direction: column; }
    .item-actions { align-self: flex-end; }
    .admin-top { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .admin-btn, .copy-path, .action-btn { transition: none; }
    .btn:hover, .admin-btn:hover { transform: none; }
}

html[data-lang="fa"] .en, html[data-lang="en"] .fa { display: none !important; }
a.pill { text-decoration: none; }
