/* ============================================================
   App Store — Play-Store-inspired Design System
   Palette:   surface #FFFFFF, chip #F1F3F4, ink #202124,
              muted #5F6368, border #E8EAED,
              accent (Play green) #01875F, success #1E8E3E,
              warning #F9AB00, danger #D93025, star gold #FFB400
   Type:      display/headings -> 'Google Sans' (falls back to Roboto)
              body               -> 'Roboto'
              mono/data          -> 'Roboto Mono' (versions, hashes, sizes)
   Signature: monospace "package chips" (v2.4.1 · 24 MB · verified) reused
              across app cards, upload progress and the moderation queue —
              a nod to package manifests, the thing the whole app is about.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Roboto+Mono:wght@400;500;600&display=swap');

:root {
    --color-bg: #FFFFFF;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F1F3F4;
    --color-ink: #202124;
    --color-muted: #5F6368;
    --color-border: #E8EAED;
    --color-accent: #01875F;
    --color-accent-ink: #FFFFFF;
    --color-accent-soft: #E6F4EF;
    --color-success: #1E8E3E;
    --color-success-soft: #E6F4EA;
    --color-warning: #F9AB00;
    --color-warning-soft: #FEF7E0;
    --color-danger: #D93025;
    --color-danger-soft: #FCE8E6;
    --color-star: #FFB400;

    --font-display: 'Google Sans', 'Roboto', 'Segoe UI', sans-serif;
    --font-body: 'Roboto', 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(32, 33, 36, 0.08);
    --shadow-md: 0 4px 16px rgba(32, 33, 36, 0.10);
    --shadow-lg: 0 16px 40px rgba(32, 33, 36, 0.18);

    --header-height: 64px;
    --bottom-nav-height: 60px;
    --container-max: 1240px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------------------------------------------------- */
/* Header                                                       */
/* ---------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--color-ink);
    white-space: nowrap;
}

/* Play-style angled triangle mark: a soft four-tone wash clipped into
   a rounded "play button" silhouette — evokes the store's identity
   without reproducing any specific logo asset. */
.brand__mark {
    position: relative;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    background:
        conic-gradient(from -30deg at 38% 50%,
            #00D28A 0deg 90deg,
            #01875F 90deg 180deg,
            #0B57D0 180deg 270deg,
            #FFB400 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(1, 135, 95, 0.35);
}

.brand__mark svg {
    width: 15px;
    height: 15px;
    color: #fff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 1;
}

.header-nav {
    display: none;
    gap: 4px;
    margin-left: 8px;
}

.header-nav a {
    position: relative;
    padding: 8px 4px;
    margin: 0 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-muted);
}

.header-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -21px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--color-accent);
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.header-nav a:hover { color: var(--color-ink); }

.header-nav a.is-active {
    color: var(--color-ink);
    font-weight: 700;
}

.header-nav a.is-active::after { opacity: 1; transform: scaleX(1); }

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 860px) {
    .header-nav { display: flex; }
}

/* ---------------------------------------------------------- */
/* Search bar                                                   */
/* ---------------------------------------------------------- */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 420px;
    display: none;
}

@media (min-width: 640px) {
    .search-bar { display: block; }
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--color-surface-alt);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--color-ink);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.search-bar input::placeholder { color: var(--color-muted); }

.search-bar input:focus {
    background: var(--color-surface);
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
    outline: none;
}

.search-bar svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-muted);
}

.search-bar-mobile {
    padding: 12px 16px;
    display: block;
}

.search-bar-mobile .search-bar { display: block; max-width: none; }

@media (min-width: 640px) {
    .search-bar-mobile { display: none; }
}

/* ---------------------------------------------------------- */
/* Buttons                                                       */
/* ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--color-accent); color: #fff; font-weight: 700; }
.btn-primary:hover { background: #016B4C; box-shadow: 0 1px 8px rgba(1, 135, 95, 0.35); }

.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-ink); font-weight: 500; }
.btn-ghost:hover { background: var(--color-surface-alt); }

/* Text-only ghost actions that should read as a link (e.g. "Log in") */
.btn-ghost.btn-accent { color: var(--color-accent); font-weight: 700; }
.btn-ghost.btn-accent:hover { background: var(--color-accent-soft); }

.btn-danger { background: var(--color-danger); color: #fff; font-weight: 700; }
.btn-danger:hover { background: #B3261E; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---------------------------------------------------------- */
/* Category tabs (horizontally scrollable on mobile)            */
/* ---------------------------------------------------------- */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 20px;
    scrollbar-width: none;
    border-bottom: 1px solid var(--color-border);
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tabs a {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-ink);
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-tabs a:hover { background: var(--color-surface-alt); }

.category-tabs a.is-active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    border-color: var(--color-accent);
    font-weight: 700;
}

/* ---------------------------------------------------------- */
/* App grid + card                                              */
/* ---------------------------------------------------------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 4px 20px 24px;
}

@media (min-width: 640px) {
    .app-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 4px 20px 32px; }
}

@media (min-width: 960px) {
    .app-grid { grid-template-columns: repeat(4, 1fr); }
}

.app-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #D6DAE0;
}

/* The whole clickable surface, everything EXCEPT the copy-link button —
   keeping that button as a sibling (not a nested <button> inside the
   <a>) is what lets the two live in the same corner without ever
   fighting for clicks or for space. */
.app-card__link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
}

.app-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* Rounded-square "squircle" icon frame, plain and flat like the real
   Play Store grid — no gradient ring, just a clean bordered thumbnail. */
.app-card__icon-frame {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--color-surface-alt);
    box-shadow: inset 0 0 0 1px rgba(32, 33, 36, 0.06);
}

.app-card__icon {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: var(--color-surface-alt);
    object-fit: cover;
    display: block;
}

.app-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.app-card__name {
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.app-card__developer {
    font-size: 12px;
    color: var(--color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Rating + price share one line, like the real Play Store tile —
   nothing here stretches into a full-width bar. */
.app-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: 3px;
}

.app-card__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-muted);
}

.app-card__meta svg { width: 13px; height: 13px; }

/* Rated apps get a warm star instead of the neutral muted tone —
   "New" (no ratings yet) stays quiet/grey so the eye lands on apps
   that actually have a track record. */
.app-card__meta--rated { color: var(--color-ink); }
.app-card__meta--rated svg { color: #FFB300; }

.app-card__price {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-ink);
    white-space: nowrap;
    flex: 0 0 auto;
}

.app-card__price--free { color: var(--color-accent); }

/* Copy-link button — sits in the opposite top corner from the badge,
   as its own sibling element so it never overlaps the icon/badge and
   never fights the card's own click target. */
.app-card__copy {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.app-card:hover .app-card__copy,
.app-card:focus-within .app-card__copy,
.app-card__copy.is-copied {
    opacity: 1;
    transform: translateY(0);
}

/* Always visible on touch devices — there's no hover to reveal it. */
@media (hover: none) {
    .app-card__copy { opacity: 1; transform: none; }
}

.app-card__copy:hover { background: var(--color-accent-soft); border-color: #CDEEE0; color: var(--color-accent); }
.app-card__copy svg { width: 14px; height: 14px; }
.app-card__copy.is-copied { background: var(--color-success-soft); border-color: #BFE3C9; color: #146C2E; }

/* "Package chip" — the signature element: monospace manifest-style tag
   reused on cards, upload progress and moderation. */
.pkg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.01em;
    color: var(--color-muted);
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 3px 8px;
}

.pkg-chip--success { color: #146C2E; background: var(--color-success-soft); border-color: #BFE3C9; }
.pkg-chip--warning { color: #7C5800; background: var(--color-warning-soft); border-color: #FDE293; }
.pkg-chip--danger  { color: #C5221F; background: var(--color-danger-soft);  border-color: #F6C6C2; }
.pkg-chip--info    { color: #01684A; background: var(--color-accent-soft); border-color: #CDEEE0; }

/* Early Access / Upcoming badge — a normal flow item next to the icon
   (in .app-card__top), never absolutely positioned over it, so long
   dates never collide with the artwork on narrow mobile cards. */
.app-card__badge {
    flex: 0 1 auto;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #01684A;
    background: var(--color-accent-soft);
    border: 1px solid #CDEEE0;
    border-radius: 6px;
    padding: 2px 7px;
    white-space: normal;
    text-align: right;
    line-height: 1.3;
    margin-right: 34px; /* clears the copy-link button in the opposite corner */
}
.app-card--upcoming { opacity: 0.92; }

/* Horizontal "Upcoming" rail on the homepage */
.upcoming-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scrollbar-width: none;
}
.upcoming-rail::-webkit-scrollbar { display: none; }
.upcoming-rail .app-card { flex: 0 0 172px; }
.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 10px;
}

/* ---------------------------------------------------------- */
/* Analytics — lightweight, dependency-free charts               */
/* ---------------------------------------------------------- */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.chart-bar {
    flex: 1 1 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    min-width: 3px;
}

.chart-bar__fill {
    width: 100%;
    min-height: 2px;
    background: var(--color-accent);
    border-radius: 3px 3px 0 0;
    transition: background 0.15s ease;
}

.chart-bar:hover .chart-bar__fill { background: #016B4C; }

.chart-axis {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 6px;
}

.hbar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hbar-row {
    display: grid;
    grid-template-columns: 110px 1fr 56px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.hbar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-ink);
}

.hbar-track {
    height: 8px;
    background: var(--color-surface-alt);
    border-radius: 4px;
    overflow: hidden;
}

.hbar-fill {
    display: block;
    height: 100%;
    background: var(--color-accent);
    border-radius: 4px;
}

.hbar-value {
    text-align: right;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 860px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------- */
/* Cards / panels                                                */
/* ---------------------------------------------------------- */
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 720px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.stat-card__label { font-size: 12px; color: var(--color-muted); margin-bottom: 6px; }
.stat-card__value { font-family: var(--font-display); font-size: 24px; font-weight: 700; }

/* ---------------------------------------------------------- */
/* App detail hero (view-game.php)                              */
/* Signature: the "manifest strip" below carries the site's      */
/* monospace package-chip language into one continuous terminal- */
/* style readout — the detail page's own take on the signature.  */
/* ---------------------------------------------------------- */
.app-hero {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.app-hero::before {
    content: '';
    position: absolute;
    inset: -60% -10% auto -10%;
    height: 260px;
    background: radial-gradient(circle at 18% 30%, rgba(1, 135, 95, 0.14), transparent 62%);
    pointer-events: none;
}

.app-hero__icon-frame {
    position: relative;
    flex: 0 0 auto;
    width: 108px;
    height: 108px;
    border-radius: 26px;
    padding: 3px;
    background: linear-gradient(135deg, var(--color-accent), #34A853 55%, #0F9D58);
    box-shadow: var(--shadow-md);
}

.app-hero__icon-frame img {
    width: 100%;
    height: 100%;
    border-radius: 23px;
    object-fit: cover;
    background: var(--color-surface);
    display: block;
}

.app-hero__body {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.app-hero__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.app-hero__title {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.01em;
}

.app-hero__meta {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0 0 14px;
}

.app-hero__meta a { color: var(--color-accent); font-weight: 600; }
.app-hero__meta a:hover { text-decoration: underline; }

.app-hero__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

/* Stat strip below the rating — same three/four-up layout Play Store
   uses for downloads / size / age rating, just plain and light instead
   of a dark terminal box, to match Play Store's own detail page. */
.manifest-strip {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    font-family: var(--font-body);
    font-size: 12px;
    background: transparent;
    color: var(--color-ink);
    border-radius: 0;
    overflow: visible;
    margin-bottom: 20px;
    width: fit-content;
    max-width: 100%;
}

.manifest-strip__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
    color: var(--color-muted);
}

.manifest-strip__item:first-child { padding-left: 0; }
.manifest-strip__item:last-child { border-right: none; }
.manifest-strip__item svg { width: 15px; height: 15px; opacity: 0.85; flex: none; color: var(--color-accent); }
.manifest-strip__item strong { color: var(--color-ink); font-weight: 700; letter-spacing: 0; }

.app-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-hero__actions .btn-primary { padding: 12px 30px; font-size: 15px; font-weight: 700; box-shadow: 0 2px 10px rgba(1, 135, 95, 0.32); }

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 0 0 8px;
}

.changelog-box {
    border-left: 3px solid var(--color-accent);
    background: var(--color-accent-soft);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 14px 18px;
    margin-top: 22px;
}

.changelog-box h3 { margin: 0 0 6px; font-size: 14px; }
.changelog-box p { margin: 0; }

.screenshot-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
}

.screenshot-strip__item {
    flex: 0 0 auto;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    scroll-snap-align: start;
    border-radius: 16px;
}

.screenshot-strip__item img {
    display: block;
    height: 300px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-strip__item:hover img,
.screenshot-strip__item:focus-visible img { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.screenshot-strip__item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

@media (max-width: 480px) {
    .screenshot-strip__item img { height: 220px; }
}

/* ---------------------------------------------------------- */
/* Screenshot lightbox                                           */
/* ---------------------------------------------------------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 17, 16, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: lightbox-fade-in 0.15s ease;
}

@keyframes lightbox-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(92vw, 900px); }

.lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.lightbox-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.75);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-nav--prev { left: 16px; }
.lightbox-nav--next { right: 16px; }

@media (max-width: 620px) {
    .lightbox-nav { width: 40px; height: 40px; }
    .lightbox-nav--prev { left: 6px; }
    .lightbox-nav--next { right: 6px; }
    .lightbox-close { top: 12px; right: 12px; }
}

/* ---------------------------------------------------------- */
/* Collapsible "About this app" description                     */
/* ---------------------------------------------------------- */
.description-block {
    position: relative;
    overflow: hidden;
}

.description-block.is-collapsed {
    max-height: 6.6em;
}

.description-block.is-collapsed::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 2.4em;
    background: linear-gradient(to bottom, transparent, var(--color-surface));
}

.description-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-accent);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.description-toggle svg { transition: transform 0.2s ease; }
.description-toggle.is-expanded svg { transform: rotate(180deg); }

/* ---------------------------------------------------------- */
/* Ratings summary — score + star-distribution histogram         */
/* Signature: reuses the review data itself as the visual, no     */
/* decoration beyond what the numbers already say.                */
/* ---------------------------------------------------------- */
.rating-summary {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.rating-summary__score {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 96px;
}

.rating-summary__number {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    color: var(--color-ink);
}

.rating-summary__count {
    font-size: 12px;
    color: var(--color-muted);
}

.rating-summary__bars {
    flex: 1 1 240px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.rating-bar-row__label {
    width: 10px;
    text-align: right;
    color: var(--color-muted);
    font-family: var(--font-mono);
}

.rating-bar-row__count {
    width: 32px;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 11px;
}

.rating-bar-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--color-surface-alt);
    overflow: hidden;
}

.rating-bar-track__fill {
    height: 100%;
    border-radius: 3px;
    background: var(--color-star);
    transition: width 0.5s ease;
}

@media (max-width: 480px) {
    .rating-summary { gap: 20px; }
    .rating-summary__number { font-size: 36px; }
}

.review-card {
    display: flex;
    gap: 12px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}

.review-card:last-child { border-bottom: none; }

.review-card__avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
}

.review-card__body { flex: 1; min-width: 0; }
.review-card__comment { color: var(--color-ink); line-height: 1.55; }

@media (max-width: 480px) {
    .app-hero { padding: 20px; gap: 16px; }
    .app-hero__icon-frame { width: 84px; height: 84px; border-radius: 21px; }
    .app-hero__icon-frame img { border-radius: 18px; }
    .app-hero__title { font-size: 22px; }
}

/* ---------------------------------------------------------- */
/* Developer apply page                                         */
/* ---------------------------------------------------------- */
.dev-hero {
    text-align: center;
    padding: 8px 0 8px;
}

.dev-hero .section-eyebrow {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dev-hero h1 {
    font-size: 34px;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.dev-hero p {
    color: var(--color-muted);
    font-size: 15px;
    max-width: 460px;
    margin: 0 auto;
}

.perk-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 32px 0;
}

@media (min-width: 720px) {
    .perk-grid { grid-template-columns: repeat(3, 1fr); }
}

.perk-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.perk-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    margin-bottom: 14px;
}

.perk-card__icon svg { width: 18px; height: 18px; }
.perk-card h3 { font-size: 15px; margin: 0 0 6px; }
.perk-card p { font-size: 13px; color: var(--color-muted); margin: 0; line-height: 1.5; }

.step-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 28px 0;
}

.step-list__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.step-list__item:last-child { border-bottom: none; }

.step-list__num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-ink);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.step-list__body h4 { margin: 0 0 2px; font-size: 14px; }
.step-list__body p { margin: 0; font-size: 13px; color: var(--color-muted); }

.status-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}

.status-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--color-surface);
    color: var(--color-muted);
}

.status-card__icon svg { width: 19px; height: 19px; }

.status-card--pending { background: var(--color-warning-soft); border-color: #FDE293; }
.status-card--pending .status-card__icon { color: var(--color-warning); }

.status-card--rejected,
.status-card--suspended { background: var(--color-danger-soft); border-color: #F6C6C2; }
.status-card--rejected .status-card__icon,
.status-card--suspended .status-card__icon { color: var(--color-danger); }

.status-card--approved { background: var(--color-success-soft); border-color: #BFE3C9; }
.status-card--approved .status-card__icon { color: #146C2E; }

.status-card h3 { margin: 0 0 4px; font-size: 15px; }
.status-card p { margin: 0; font-size: 13px; color: var(--color-muted); }
.status-card__body { flex: 1; min-width: 0; }
.status-card__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------- */
/* Developer-access panel (profile.php)                         */
/* Signature: a small "package manifest" readout for what        */
/* unlocking developer access actually grants — same monospace   */
/* language as pkg-chip/manifest-strip, applied to a permission   */
/* instead of an app. */
/* ---------------------------------------------------------- */
.dev-access {
    position: relative;
    overflow: hidden;
}

.dev-access__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.dev-access__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), #34A853 55%, #0F9D58);
    color: #fff;
    box-shadow: 0 6px 16px rgba(1, 135, 95, 0.28);
}

.dev-access__icon svg { width: 21px; height: 21px; }

.dev-access__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.dev-access__subtitle { font-size: 13px; color: var(--color-muted); margin-top: 1px; }

.dev-access__perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 16px 0 18px;
    padding: 0;
}

.dev-access__perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--color-ink);
}

.dev-access__perks svg {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: #146C2E;
}

.dev-access__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: var(--color-ink);
    color: #E7ECEA;
    margin-bottom: 14px;
}

.dev-access__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5F6368;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.dev-access__status--pending .dev-access__status-dot { background: var(--color-warning); }
.dev-access__status--approved .dev-access__status-dot { background: #34A853; }
.dev-access__status--rejected .dev-access__status-dot,
.dev-access__status--suspended .dev-access__status-dot { background: var(--color-danger); }

.form-section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin: 20px 0 12px;
}

.form-section-label:first-child { margin-top: 0; }

.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 480px) {
    .field-row { grid-template-columns: 1fr 1fr; }
}

.field-row .field { margin-bottom: 0; }

.terms-box {
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

/* ---------------------------------------------------------- */
/* Forms                                                         */
/* ---------------------------------------------------------- */
.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-family: inherit;
    font-size: 14px;
    color: var(--color-ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--color-accent); }

.field-error {
    color: var(--color-danger);
    font-size: 12px;
    margin-top: 4px;
}

.field-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--color-muted);
}

/* ---------------------------------------------------------- */
/* Empty / loading states                                        */
/* ---------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-muted);
}

.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.5; }

.loading-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-muted);
    font-size: 14px;
    padding: 24px;
    justify-content: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- */
/* Notifications                                                 */
/* ---------------------------------------------------------- */
.header-bell {
    position: relative;
}

.header-bell__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--color-surface);
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.notification-item:hover { background: var(--color-surface-alt); }

.notification-item--unread {
    background: var(--color-accent-soft);
    border-color: #CDEEE0;
}

.notification-item__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    color: var(--color-accent);
}

.notification-item--unread .notification-item__icon {
    background: var(--color-surface);
}

.notification-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-item__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-ink);
}

.notification-item__message {
    font-size: 13px;
    color: var(--color-muted);
}

.notification-item__time {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 4px;
}

.notification-item__dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 4px;
}

/* ---------------------------------------------------------- */
/* Bottom navigation (mobile)                                    */
/* ---------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    z-index: 40;
}

@media (min-width: 860px) {
    .bottom-nav { display: none; }
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-muted);
}

.bottom-nav a svg { width: 20px; height: 20px; }
.bottom-nav a.is-active { color: var(--color-accent); }

body.has-bottom-nav { padding-bottom: var(--bottom-nav-height); }

@media (min-width: 860px) {
    body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------------------------------------------------------- */
/* Modal system                                                  */
/* ---------------------------------------------------------- */
body.modal-open { overflow: hidden; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 21, 26, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.modal-dialog.modal-form { text-align: left; max-width: 520px; }

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.modal-success .modal-icon { background: var(--color-success-soft); color: var(--color-success); }
.modal-error .modal-icon { background: var(--color-danger-soft); color: var(--color-danger); }
.modal-warning .modal-icon,
.modal-confirmation .modal-icon { background: var(--color-warning-soft); color: var(--color-warning); }

.modal-title { font-size: 18px; margin-bottom: 6px; }
.modal-message { color: var(--color-muted); font-size: 14px; margin-bottom: 4px; }

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modal-form .modal-footer { justify-content: flex-end; }

/* ---------------------------------------------------------- */
/* Download confirmation                                        */
/* This used to closely mirror Android's own package-installer  */
/* dialog (same "Do you want to install this app?" wording, same */
/* borderless split-button layout with no header chrome) — that  */
/* pattern is exactly what Safe Browsing flags as a page          */
/* impersonating an OS/security prompt to trick people into       */
/* installing software, and it got this site a real "Deceptive    */
/* pages" strike. Restyled to look unmistakably like a website     */
/* dialog: same rounded panel and pill buttons as every other      */
/* modal on the site, just with the app's icon/name for context.   */
/* ---------------------------------------------------------- */
.modal-dialog.modal-native-install { text-align: left; max-width: 360px; }

.native-install__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.native-install__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--color-surface-alt);
}

.native-install__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
}

.native-install__question { font-size: 14px; color: var(--color-muted); margin: 0; }

.native-install__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-spinner {
    width: 28px;
    height: 28px;
    margin: 6px auto 0;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    animation: spin 0.7s linear infinite;
}

/* ---------------------------------------------------------- */
/* Developer section layout (mobile-first)                      */
/* ---------------------------------------------------------- */
.dev-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 860px) {
    .dev-layout { flex-direction: row; align-items: flex-start; gap: 24px; }
}

.developer-sidebar { width: 100%; }

.developer-sidebar nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.developer-sidebar nav::-webkit-scrollbar { display: none; }

.developer-sidebar nav a {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (min-width: 860px) {
    .developer-sidebar { width: 220px; flex: 0 0 auto; }
    .developer-sidebar nav {
        flex-direction: column;
        overflow-x: visible;
        position: sticky;
        top: 84px;
        padding-bottom: 0;
    }
    .developer-sidebar nav a { white-space: normal; }
}

.dev-form-col { flex: 1; min-width: 0; width: 100%; }

@media (min-width: 860px) {
    .dev-form-col { max-width: 640px; }
}

/* ---------------------------------------------------------- */
/* Admin section layout (mobile-first — mirrors .dev-layout)    */
/* Fixes admin pages rendering the sidebar and content as a     */
/* fixed-width flex row at every viewport, which on mobile      */
/* squeezed the content column down to a sliver and made stat   */
/* grids, charts and tables overlap/collide.                    */
/* ---------------------------------------------------------- */
.admin-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 860px) {
    .admin-layout { flex-direction: row; align-items: flex-start; gap: 24px; }
}

.admin-sidebar { width: 100%; }

.admin-sidebar nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.admin-sidebar nav::-webkit-scrollbar { display: none; }

.admin-sidebar nav a {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (min-width: 860px) {
    .admin-sidebar { width: 220px; flex: 0 0 auto; }
    .admin-sidebar nav {
        flex-direction: column;
        overflow-x: visible;
        position: sticky;
        top: 84px;
        padding-bottom: 0;
    }
    .admin-sidebar nav a { white-space: normal; }
}

/* ---------------------------------------------------------- */
/* Select picker (button that opens a modal instead of a       */
/* native <select> — friendlier tap target on mobile)          */
/* ---------------------------------------------------------- */
.select-picker {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    min-height: 46px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-family: inherit;
    font-size: 14px;
    color: var(--color-ink);
    text-align: left;
    cursor: pointer;
}

.select-picker:hover { border-color: var(--color-accent); }

.select-picker__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.select-picker--placeholder .select-picker__label { color: var(--color-muted); }

.select-picker__chevron { width: 16px; height: 16px; flex: 0 0 auto; color: var(--color-muted); }

.modal-dialog.modal-picker { text-align: left; max-width: 460px; padding: 22px 18px; }
.modal-picker .modal-title { padding: 0 6px; }

.picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.picker-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    min-height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    color: var(--color-ink);
    cursor: pointer;
}

.picker-option:hover { background: var(--color-surface-alt); }

.picker-option.is-selected {
    background: var(--color-accent-soft);
    border-color: #CDEEE0;
}

.picker-option__label { display: block; font-size: 14px; font-weight: 600; }
.picker-option__desc { display: block; font-size: 12px; color: var(--color-muted); margin-top: 2px; font-weight: 400; }

.picker-option__check {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--color-accent);
    visibility: hidden;
}

.picker-option.is-selected .picker-option__check { visibility: visible; }

/* ---------------------------------------------------------- */
/* File dropzone (replaces the native "Choose File" input)      */
/* ---------------------------------------------------------- */
.file-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 22px 16px;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--color-border);
    background: var(--color-surface-alt);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.file-drop:hover,
.file-drop.is-dragover {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
}

.file-drop.is-dragover { transform: scale(1.01); }

.file-drop__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Icon sits inside its own gradient badge rather than floating bare —
   gives the empty state something to anchor on, and doubles as the
   ".apk" motif when paired with the caption below. */
.file-drop__icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), #34A853 55%, #0F9D58);
    box-shadow: 0 8px 18px rgba(1, 135, 95, 0.22);
    transition: transform 0.18s ease;
}

.file-drop:hover .file-drop__icon-badge,
.file-drop.is-dragover .file-drop__icon-badge { transform: translateY(-3px) scale(1.04); }

.file-drop__icon { width: 26px; height: 26px; color: var(--color-accent); }
.file-drop__icon-badge .file-drop__icon { width: 24px; height: 24px; color: #fff; }

.file-drop__text strong { display: block; font-size: 13.5px; }
.file-drop__text span { display: block; font-size: 12px; color: var(--color-muted); margin-top: 2px; }

.file-drop__preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
}

.file-drop__preview:empty { display: none; }

.file-drop__thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.file-drop__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 12px;
    max-width: 100%;
}

.file-drop__chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }

/* ---------------------------------------------------------- */
/* Upload progress                                               */
/* ---------------------------------------------------------- */
.dev-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 14px;
}

.dev-back-link:hover { color: var(--color-accent); }
.dev-back-link svg { width: 14px; height: 14px; }

/* Upload progress reads like a terminal watching a package install —
   the same dark/mono language as .manifest-strip, applied to the one
   moment on the site where something is visibly "in flight". */
.upload-progress {
    background: var(--color-ink);
    color: #E7ECEA;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.upload-progress__file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-progress__file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(1, 135, 95, 0.24);
    color: #8FD9BE;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.upload-progress__file-icon svg { width: 18px; height: 18px; }

.upload-progress__file-name {
    font-weight: 600;
    font-size: 13.5px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#progress-status { color: rgba(231, 232, 245, 0.6) !important; }

.upload-progress__body { padding: 18px; }

.upload-progress__bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 0 0 10px;
}

.upload-progress__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #0F9D58);
    border-radius: 999px;
    transition: width 0.2s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(1, 135, 95, 0.6);
}

#progress-percent { color: #fff; }

.upload-progress__meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(231, 232, 245, 0.55);
}

.upload-progress__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.upload-progress .btn-ghost { border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.upload-progress .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------- */
/* Profile / account page                                       */
/* ---------------------------------------------------------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.avatar-upload {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.avatar-upload__label {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 4px var(--color-border);
}

.avatar-upload__input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.avatar-upload__edit {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    border: 2px solid var(--color-surface);
    pointer-events: none;
}

.avatar-upload__edit svg { width: 12px; height: 12px; }

.profile-header__info { min-width: 0; flex: 1; }

.profile-header__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-header__email {
    font-size: 13px;
    color: var(--color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

.profile-header__meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: #01684A;
    border: 1px solid #CDEEE0;
}

.badge-role--admin { background: var(--color-danger-soft); color: #C5221F; border-color: #F6C6C2; }
.badge-role--developer { background: var(--color-success-soft); color: #146C2E; border-color: #BFE3C9; }

/* Head admin outranks both admin and developer, so it gets the same
   gradient language as the hero icon / file-drop badges instead of a
   flat soft-tint pill — it reads as "highest tier" at a glance. */
.badge-role--head-admin {
    background: linear-gradient(135deg, var(--color-accent), #34A853 55%, #0F9D58);
    color: #fff;
    border-color: transparent;
}

/* Play-Store-style settings list: icon, title+description, action */
.settings-list { display: flex; flex-direction: column; }

.settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--color-border);
}

.settings-row:last-child { border-bottom: none; padding-bottom: 2px; }
.settings-row:first-child { padding-top: 2px; }

.settings-row__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-surface-alt);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-row__body { flex: 1; min-width: 0; }
.settings-row__title { font-weight: 600; font-size: 14px; }
.settings-row__desc { font-size: 12px; color: var(--color-muted); margin-top: 2px; line-height: 1.4; }
.settings-row__action { flex: 0 0 auto; }

/* Toggle switch (checkbox styled as a switch) */
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.switch__track {
    position: absolute;
    inset: 0;
    background: var(--color-border);
    border-radius: 999px;
    transition: background 0.15s ease;
    pointer-events: none;
}

.switch__track::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease;
}

.switch input:checked + .switch__track { background: var(--color-accent); }
.switch input:checked + .switch__track::before { transform: translateX(18px); }
.switch input:disabled + .switch__track { opacity: 0.5; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.panel--danger { border-color: #F6C6C2; }

/* ---------------------------------------------------------- */
/* Utility                                                       */
/* ---------------------------------------------------------- */
.text-muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
