.theme-toggle {
    display: grid; place-items: center; flex: none; width: 36px; height: 36px;
    padding: 0; color: var(--text); background: var(--soft); cursor: pointer;
    border: 1px solid var(--line); border-radius: 6px;
}
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-sun, [data-theme=dark] .theme-toggle .theme-moon { display: none; }
[data-theme=dark] .theme-toggle .theme-sun { display: block; }
:root[data-theme=dark] {
    color-scheme: dark;
    --text: #e6ede9; --muted: #adb9b3; --line: #39443f; --line-soft: #303934;
    --green: #78dcb5; --green-dark: #a2edcf; --soft: #232b27; --chip: #244239;
    --search: #29332e; --shadow: 0 2px 6px #0004;
}
[data-theme=dark] body.store-ui { background: #171b1a; color: var(--text); }
[data-theme=dark] .store-ui :is(.site-header, .site-footer, .mobile-store-nav, .console-sidebar, .account-dropdown, .language-options, .skip-link) {
    background: #202623; color: var(--text); border-color: var(--line);
}
[data-theme=dark] .store-ui :is(.store-brand > span, .desktop-store-nav a:not(.active), .store-search button, .language-options button) { color: var(--text); }
[data-theme=dark] .store-ui :is(.store-search:focus-within, .language-options button:hover, .language-options button[aria-current], .play-info-strip, .play-edit, .play-detail-stats) {
    background: var(--soft); color: var(--text); border-color: var(--line);
}
[data-theme=dark] .store-ui .play-install:not(.disabled) { background: #166648; color: #fff; }
[data-theme=dark] .store-ui .language-picker > summary { border-color: var(--line); }
[data-theme=dark] .store-ui :is(.market-card, .related-app-card, .play-card) {
    color: var(--text);
}
[data-theme=dark] .store-ui :is(.market-card, .related-app-card, .play-card):is(:hover, :focus-visible, :focus-within) {
    background: var(--soft);
    color: var(--text);
}
@media (max-width: 480px) {
    .theme-toggle { width: 32px; height: 36px; }
}

.store-filterbar .store-device-filter { position: relative; flex: 0 0 auto; margin: 0; max-inline-size: 100%; }
.store-device-control {
    display: flex; align-items: center; gap: 8px; min-inline-size: 164px; min-block-size: 42px;
    padding-inline: 7px 13px; cursor: pointer; list-style: none;
    font-size: .875rem; font-weight: 600;
    border: 1px solid var(--line, #d5ddda); border-radius: 8px;
    background: var(--soft, #f1f5f3); color: var(--text, #183129);
}
.store-device-control:hover { border-color: #618675; }
.store-device-control:focus-visible, .store-device-options a:focus-visible { outline: 2px solid #398268; outline-offset: 2px; }
.store-device-control::-webkit-details-marker { display: none; }
.store-device-icon {
    flex: 0 0 auto;
    display: grid; place-items: center; inline-size: 28px; block-size: 28px;
    border-radius: 5px; background: #d9ebe2; color: #205b45;
}
.store-device-icon svg { inline-size: 17px; block-size: 17px; }
.store-device-chevron {
    margin-inline-start: auto; inline-size: 7px; block-size: 7px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg); pointer-events: none;
}
.store-device-filter[open] .store-device-chevron { transform: translateY(2px) rotate(225deg); }
.store-device-options {
    position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; z-index: 12;
    min-inline-size: 100%; padding: 4px; border: 1px solid var(--line, #d5ddda);
    border-radius: 8px; background: var(--soft, #f1f5f3); box-shadow: 0 5px 16px #0002;
}
.store-device-options a {
    display: flex; align-items: center; gap: 8px; padding: 5px 7px; min-block-size: 40px;
    border-radius: 5px; font-size: .875rem; white-space: nowrap; color: var(--text, #183129);
}
.store-device-options a:is(:hover, [aria-current]) { background: #61867527; }
[data-theme=dark] .store-device-icon { background: #29493c; color: #c5ebd6; }
@media (max-width: 620px) {
    .store-filterbar:has(.store-device-filter) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .store-filterbar .store-device-filter { justify-self: start; }
    .store-device-options { inset-inline: 0 auto; }
}
