/* ThemeSettingsPanel: shared native dimensions, row spacing and preview cards.
   Desktop placement is owned by android-ui.css; it does not alter these rows. */
.theme-sheet{--picker-primary:#d0bcff;--picker-container:#4f378b;--picker-outline:#938f99;--picker-variant:#49454f}
.theme-sheet[data-theme-pending=true] button:disabled,.listing-filter-workspace[data-theme-pending=true] button:disabled{opacity:1}
.theme-sheet .native-section-tabs{position:sticky;top:0;z-index:2;display:flex;gap:3px;padding:3px;margin:0 0 4px;background:#49454fb8;border-radius:10px;overflow:hidden}
.theme-sheet .native-section-tabs button{display:flex;flex:1 1 0;min-width:0;flex-direction:column;justify-content:center;align-items:center;gap:1px;height:36px;min-height:36px;padding:0;white-space:nowrap;font-size:8px;line-height:9px;font-weight:500;border:1px solid #938f9959;border-radius:8px;background:#49454f6b;color:#e6e1e5}
.theme-sheet .native-section-tabs button[aria-pressed=true]{border:2px solid var(--picker-primary);background:#4f378bd1;font-weight:700}
.native-tab-icon{display:flex;align-items:center;justify-content:center;width:100%;height:18px;overflow:hidden}
.native-tab-icon .theme-bg-icon{width:17px;height:17px;border-radius:4px}
.native-tab-icon .theme-frame-icon{width:13px;height:17px}
.native-tab-icon .theme-style-icon{width:18px;height:12px;border-radius:3px}
.native-tab-icon .theme-style-icon svg{width:18px;height:12px}
.native-tab-icon .theme-layout-icon{width:19px;height:14px}
.native-tab-icon .theme-filter-dot{width:11px;height:11px;border:0}
.native-tab-icon .theme-font-icon{font-size:10px;line-height:12px}
.theme-panel-icon{display:block;width:14px;height:14px;border:1px solid var(--panel-frame,#938f9975);border-radius:3px;background:linear-gradient(var(--panel-raised,transparent),var(--panel-paper,transparent))}
.theme-sheet-actions{height:34px;gap:6px;padding:0;margin-bottom:4px;justify-content:flex-end}
.theme-sheet-actions::before{content:'Theme';margin-right:auto;font-size:14px;font-weight:500}
.theme-sheet-actions button{min-height:28px;padding:5px 9px;font-size:12px;line-height:18px;border-radius:6px;color:#cac4d0}
.theme-sheet-actions button[id$='-save']{font-weight:700;color:var(--picker-primary)}
.theme-sheet .listing-filter-workspace>fieldset{margin:0;padding:0;border:0;min-width:0}
.theme-sheet .listing-filter-workspace>fieldset>legend{display:none}
.theme-sheet .listing-filter-workspace>.finish-choices>legend{display:block;font-size:9px;line-height:11px;padding:2px 0;color:#cac4d0}
.theme-sheet .listing-filter-workspace>.finish-choices>legend.theme-filter-stage-heading{display:flex;align-items:center;gap:4px;width:100%;box-sizing:border-box}
.theme-filter-stage-heading::after{content:"";flex:1;height:.5px;background:#938f9940}
.theme-filter-stage-status{margin:0;color:#cac4d0;font-size:9px;line-height:11px;white-space:nowrap}
.theme-sheet .listing-filter-workspace>.finish-choices{display:block;margin:0 0 2px}
.theme-choice-grid{display:grid;grid-template-columns:repeat(var(--choice-columns),minmax(0,1fr));gap:5px;align-content:start}
.theme-sheet .theme-choice{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:100%;height:50px;min-height:50px;min-width:0;margin:0;padding:2px 3px;box-sizing:border-box;border:1px solid #938f9952;border-radius:8px;background:#1c1b1f6b;color:#e6e1e5;font-size:9px;line-height:11px;font-weight:400;overflow:hidden}
.theme-sheet .theme-choice[aria-pressed=true]{border-color:#d0bcffad}
.theme-choice-preview{display:flex;justify-content:center;align-items:center;height:31px;min-height:0;width:100%;padding:3px;box-sizing:border-box;border-radius:6px;background:#49454f6b;color:#e6e1e575;overflow:hidden}
.theme-choice[aria-pressed=true] .theme-choice-preview{color:#d0bcffd1}
.theme-choice-caption{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:clip;border-radius:4px;padding:1px 5px}
.theme-choice[aria-pressed=true]>.theme-choice-caption{background:#d0bcff2e;color:var(--picker-primary)}
.theme-bg-icon{display:block;width:22px;height:22px;flex:none;box-sizing:border-box;border:1px solid;border-radius:6px;background-position:center;background-size:cover;overflow:hidden}
.theme-bg-icon canvas{display:block}
.theme-frame-icon{position:relative;display:block;width:22px;height:25px;flex:none;overflow:hidden;border-radius:5px;background-color:#49454f73;background-size:100% 100%;color:#d8d2c8e0}
.theme-frame-icon>svg{display:block;width:100%;height:100%}
.frame-rail{position:absolute;display:block}
.frame-rail-top,.frame-rail-bottom{left:0;width:100%;height:9.68%;clip-path:polygon(0 0,100% 0,89% 100%,11% 100%)}
.frame-rail-top{top:0}.frame-rail-bottom{bottom:0;clip-path:polygon(11% 0,89% 0,100% 100%,0 100%)}
.frame-rail-left,.frame-rail-right{top:0;height:100%;width:11%;clip-path:polygon(0 0,100% 9.68%,100% 90.32%,0 100%)}
.frame-rail-left{left:0}.frame-rail-right{right:0;clip-path:polygon(0 9.68%,100% 0,100% 100%,0 90.32%)}
.theme-layout-icon{width:100%;height:100%;display:block}
.theme-style-icon{display:flex;align-items:center;justify-content:center;width:72px;height:24px;border-radius:6px;background:#49454f6b;color:white;overflow:hidden;font-size:8px;white-space:nowrap;line-height:10px}
.theme-style-icon[data-style=MAGAZINE]{background:#000b}
.theme-style-icon[data-style=VINTAGE_MAGAZINE]{background:#d9cdb3 url('/app/assets/styles/magazine_paper_background.webp') center/cover;color:#30271c}
.theme-style-icon[data-style=PLAYING_CARD]{background:#ece3cb url('/app/assets/backgrounds/playing_card_background.webp') center/cover;color:#30271c}
.theme-style-icon[data-style=T_SHIRT]{background:#49454f38;gap:2px;font-size:7px;padding:0 3px}
.theme-style-icon>svg{width:22px;height:22px;flex:none}
.theme-choice-style .theme-choice{height:38px;min-height:38px;padding:4px;background:#49454f4d}
.theme-choice-style .theme-choice-preview{height:100%;padding:0;background:none}
.theme-choice-style .theme-choice-caption{display:none}
.theme-choice-font .theme-choice{height:34px;min-height:34px;display:flex;padding:0 5px;background:#49454f4d;font-size:9px;border-color:#938f9959}
.theme-choice-font .theme-choice-caption{padding:0;background:none!important;color:inherit!important;text-overflow:ellipsis}
.theme-choice-font .theme-choice[aria-pressed=true],.theme-choice-style .theme-choice[aria-pressed=true]{border:2px solid var(--picker-primary);background:#4f378b6b}
.theme-choice-font .theme-choice[aria-pressed=true]::after,.theme-choice-style .theme-choice[aria-pressed=true]::after{content:'✓';position:absolute;right:0;top:0;padding:0 3px;background:#1c1b1fd1;border-radius:50%;color:var(--picker-primary);font-family:sans-serif;font-size:11px}
.theme-font-controls h3{font-size:9px;line-height:11px;font-weight:500;color:#cac4d0c2;margin:5px 0;padding:0 2px}
.theme-background-overlay{grid-column:span 3;display:flex;gap:2px;height:50px;padding:5px 4px;box-sizing:border-box;border:1px solid #938f9957;border-radius:10px;background:#49454f7a;min-width:0}
.theme-background-overlay>button{flex:.6;min-width:0;min-height:0;padding:0;border:0;background:#1c1b1f8a;border-radius:7px;font-size:11px;color:#e6e1e5}
.theme-background-overlay>label{position:relative;display:flex;flex-direction:column;align-items:center;flex:3.1;min-width:0;gap:0;margin:0;padding:0 8px;border-radius:7px;background:#e6e1e509;font-size:9px;line-height:11px}
.theme-background-overlay output{white-space:nowrap;color:#cac4d0}
.theme-background-overlay input[type=range]{width:100%;height:15px;min-height:15px;padding:0;margin:0;border:0;accent-color:#cac4d0;background:none;cursor:pointer}
.theme-background-overlay label>button{min-height:9px;height:9px;border:0;background:none;padding:0;font-size:6px;line-height:8px;color:#cac4d0a3;align-self:flex-start;margin-left:calc(40% - 22px);width:44px}
.theme-filter-grid,.theme-filter-target-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
.theme-filter-grid+.theme-filter-grid{margin-top:5px;border-top:1px solid #938f9930;padding-top:5px}
.theme-sheet .theme-filter-grid button,.theme-sheet .theme-filter-target-controls button{height:34px;min-height:34px;min-width:0;padding:0 5px;border:1px solid #938f996b;border-radius:8px;background:#49454f57;color:#e6e1e5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:4px}
.theme-sheet .theme-filter-grid button[aria-pressed=true],.theme-sheet .theme-filter-target-controls button[aria-pressed=true]{border:2px solid var(--picker-primary);background:#4f378bc7}
.theme-sheet .theme-filter-grid button[aria-pressed=mixed]{background:#4a4458}
.theme-filter-dot{display:inline-block;width:12px;height:12px;flex:none;border:1px solid #938f9973;border-radius:50%;box-sizing:border-box}
.theme-sheet .theme-filter-grid button:has(.theme-filter-dot){justify-content:flex-start}
.theme-sheet .theme-filter-target-controls{gap:5px;margin-bottom:2px}
.theme-sheet .theme-layout-controls .theme-choice-grid{gap:4px}
.theme-sheet .native-panel-tones{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.theme-sheet .native-panel-scope button{height:34px;min-height:34px;font-size:9px;border-radius:8px;padding:0 5px}
.theme-sheet .native-panel-tones button{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;height:34px;min-height:34px;padding:4px 5px;font-size:11px;border-radius:8px;background:linear-gradient(var(--panel-raised),var(--panel-paper));border:1px solid var(--panel-frame);color:var(--panel-ink,#d9dfd9)}
.theme-sheet .native-panel-tones button::after{content:'';width:42%;height:1px;background:var(--panel-accent);opacity:.52}
.theme-sheet .native-panel-tones button[aria-pressed=true]{border-color:var(--panel-accent);background:linear-gradient(var(--panel-raised),var(--panel-paper))}
.theme-sheet .native-panel-tones button[aria-pressed=true]::after{width:64%;opacity:.9}
.theme-sheet .native-panel-sample{display:none}
.theme-sheet .listing-filter-workspace>[role=status]{font-size:11px;margin:6px 0}

.theme-panel-preview{display:block;flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}.theme-panel-preview>.entry-document{min-height:100%;box-sizing:border-box}

.theme-filter-family-heading{width:100%;margin:2px 0;font-size:9px;line-height:11px;color:var(--muted)}
