/* Lumo Settings — canonical Telegram-like Settings UI.
   This file is the only visual owner of #setScreen and .stx-* settings geometry. */
#setScreen{
  --settingsBackground:var(--background-grouped,#000);
  --settingsSectionBackground:var(--surface-primary,#1c1c1e);
  --settingsPrimary:var(--label-primary,var(--text,#fff));
  --settingsSecondary:var(--label-secondary,var(--muted,#8e8e93));
  --settingsSeparator:var(--separator,rgba(127,127,127,.24));
  --settingsAccent:var(--accent,#0a84ff);
  --settingsDestructive:#ff453a;
  --settingsIconSurface:rgba(127,127,127,.18);
  --settingsSelected:color-mix(in srgb,var(--settingsAccent) 14%,transparent);
  position:fixed;z-index:80;inset:0 0 calc(58px + var(--sab,0px)) 0;
  display:block;background:var(--settingsBackground);color:var(--settingsPrimary);
  transform:translateX(102%);visibility:hidden;pointer-events:none;
  transition:transform .24s cubic-bezier(.2,.8,.2,1),visibility 0s linear .24s;
  overflow:hidden;
}
#setScreen.open{transform:translateX(0);visibility:visible;pointer-events:auto;transition:transform .24s cubic-bezier(.2,.8,.2,1),visibility 0s}
/* The global toast is a sibling of Settings and must sit above its panel. */
body.settings-open #toast{z-index:1001}
body.settings-deep #setScreen{inset-bottom:0}
#setScreen *,#setScreen *::before,#setScreen *::after{box-sizing:border-box}
.settings-root{height:100%;min-height:0}

/* Mobile navigation */
.stx-mobile-shell{height:100%;display:flex;flex-direction:column;background:var(--settingsBackground)}
.stx-mobile-nav{flex:0 0 auto;min-height:calc(52px + var(--sat,0px));padding:var(--sat,0px) max(8px,var(--sar,0px)) 0 max(8px,var(--sal,0px));display:grid;grid-template-columns:minmax(72px,1fr) auto minmax(72px,1fr);align-items:center;background:color-mix(in srgb,var(--settingsBackground) 88%,transparent);border-bottom:.5px solid var(--settingsSeparator);-webkit-backdrop-filter:blur(22px) saturate(140%);backdrop-filter:blur(22px) saturate(140%)}
.stx-mobile-nav h1{margin:0;text-align:center;font-size:17px;line-height:22px;font-weight:650;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stx-nav-side{width:72px;height:44px}
.stx-back,.stx-nav-text{min-height:44px;min-width:44px;border:0;background:transparent;color:var(--settingsAccent);font:inherit;font-size:16px;display:flex;align-items:center;gap:1px;padding:0 4px;cursor:pointer}
.stx-back{justify-self:start}.stx-nav-text{justify-self:end;font-weight:600}
.stx-back svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-left:-5px}
.stx-mobile-scroll{flex:1 1 auto;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;padding:10px max(16px,var(--sar,0px)) calc(22px + var(--sab,0px)) max(16px,var(--sal,0px))}
body.settings-deep .stx-mobile-scroll{padding-bottom:calc(22px + var(--sab,0px))}
.stx-mobile-search,.stx-desktop-search{position:relative;display:flex;align-items:center;background:color-mix(in srgb,var(--settingsSecondary) 12%,var(--settingsSectionBackground));border-radius:10px;color:var(--settingsSecondary)}
.stx-mobile-search{height:36px;margin-bottom:10px}
.stx-mobile-search svg,.stx-desktop-search svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;position:absolute;left:10px;pointer-events:none}
.stx-mobile-search input,.stx-desktop-search input{width:100%;height:100%;border:0;outline:0;background:transparent;color:var(--settingsPrimary);font:inherit;padding:0 12px 0 33px;appearance:none}
.stx-mobile-search input{font-size:16px}

/* Common sections */
.stx-route-content{width:100%;max-width:100%}
.stx-root{padding-top:2px}
.stx-section{margin:0 0 14px;background:var(--settingsSectionBackground);border-radius:11px;overflow:hidden}
.stx-section-cap{margin:18px 12px 6px;color:var(--settingsSecondary);font-size:12px;line-height:16px;font-weight:500;text-transform:uppercase;letter-spacing:.02em}
.stx-section-foot{margin:-8px 12px 16px;color:var(--settingsSecondary);font-size:12px;line-height:16px}
.stx-row{position:relative;width:100%;min-height:52px;padding:7px 12px;border:0;background:transparent;color:var(--settingsPrimary);display:flex;align-items:center;gap:11px;text-align:left;font:inherit;cursor:pointer}
button.stx-row:not(:disabled):active,.stx-search-result:active,.stx-profile-hero:active{background:var(--settingsSelected)}
.stx-row:not(:last-child)::after{content:"";position:absolute;left:51px;right:0;bottom:0;height:.5px;background:var(--settingsSeparator)}
.stx-row:disabled{opacity:.45;cursor:default}
.stx-row-copy{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1px}
.stx-row-label{font-size:16px;line-height:20px;font-weight:400;overflow:hidden;text-overflow:ellipsis}
.stx-row-sub{font-size:12px;line-height:16px;color:var(--settingsSecondary);white-space:normal}
.stx-row-value{flex:none;max-width:43%;font-size:14px;color:var(--settingsSecondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stx-chevron{width:15px;height:20px;display:grid;place-items:center;color:color-mix(in srgb,var(--settingsSecondary) 70%,transparent)}
.stx-chevron svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stx-danger,.stx-danger .stx-row-label{color:var(--settingsDestructive)}
.stx-icon{width:29px;height:29px;border-radius:7px;display:grid;place-items:center;flex:none;color:#fff}
.stx-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.stx-icon-blue{background:#3478f6}.stx-icon-cyan{background:#32ade6}.stx-icon-red{background:#ff453a}.stx-icon-green{background:#30d158}.stx-icon-purple{background:#bf5af2}.stx-icon-yellow{background:#ff9f0a}.stx-icon-orange{background:#ff9f0a}.stx-icon-gray{background:#8e8e93}.stx-icon-white{background:#fff;color:#4285f4;box-shadow:inset 0 0 0 .5px rgba(0,0,0,.08)}
.stx-icon-white svg{fill:currentColor;stroke:none}
.stx-check{width:22px;height:22px;color:var(--settingsAccent);display:grid;place-items:center}.stx-check svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.stx-empty{padding:20px 14px;text-align:center;color:var(--settingsSecondary);font-size:13px;line-height:18px}
.stx-version{text-align:center;color:var(--settingsSecondary);font-size:11px;padding:2px 0 14px}

/* Profile */
.stx-profile-hero{width:100%;margin:0 0 16px;padding:14px 4px 16px;border:0;background:transparent;color:var(--settingsPrimary);display:flex;flex-direction:column;align-items:center;text-align:center;cursor:pointer}
.stx-profile-copy{display:flex;flex-direction:column;align-items:center;margin-top:9px;min-width:0}.stx-profile-copy strong{font-size:21px;line-height:26px;font-weight:650;max-width:min(330px,90vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stx-profile-copy span{font-size:14px;line-height:20px;color:var(--settingsSecondary)}
.stx-profile-hero>.stx-chevron{display:none}
.stx-avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,var(--av-a),var(--av-b));color:#fff;font-weight:750;box-shadow:none}
.stx-avatar-large{width:88px;height:88px;font-size:34px}.stx-avatar-desktop{width:68px;height:68px;font-size:26px}
.stx-avatar-upload,.stx-avatar-remove{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 12px;border:0;border-radius:9px;background:var(--surface-secondary);color:var(--accent);font:inherit;font-size:13px;cursor:pointer}
.stx-avatar-remove{background:transparent;color:var(--label-secondary)}
.stx-profile-edit-avatar{display:flex;flex-direction:column;align-items:center;gap:8px;margin:10px 0 22px;color:var(--settingsAccent);font-size:14px}
.stx-form{display:flex;flex-direction:column;gap:12px}.stx-field{display:flex;flex-direction:column;gap:5px;color:var(--settingsSecondary);font-size:12px}.stx-field input,.stx-field textarea{width:100%;border:0;border-radius:11px;background:var(--settingsSectionBackground);color:var(--settingsPrimary);font:inherit;font-size:16px;padding:12px 13px;outline:0;resize:vertical}.stx-field input:focus,.stx-field textarea:focus{box-shadow:0 0 0 2px color-mix(in srgb,var(--settingsAccent) 36%,transparent)}
.stx-color-grid{display:flex;gap:10px;flex-wrap:wrap;padding:5px 0}.stx-color{width:36px;height:36px;border-radius:50%;border:2px solid transparent;background:linear-gradient(145deg,var(--av-a),var(--av-b));cursor:pointer}.stx-color.on{box-shadow:0 0 0 2px var(--settingsBackground),0 0 0 4px var(--settingsAccent)}
.stx-primary,.stx-danger-button{min-height:44px;border:0;border-radius:11px;font:inherit;font-size:16px;font-weight:600;padding:0 16px;cursor:pointer}.stx-primary{background:var(--settingsAccent);color:#fff}.stx-danger-button{background:var(--settingsSectionBackground);color:var(--settingsDestructive)}.stx-primary-inline{margin:0 auto 14px;display:flex;align-items:center;gap:7px}.stx-primary-inline svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.stx-form-separator{height:.5px;background:var(--settingsSeparator);margin:4px 0}.stx-auth-form{margin:0 0 16px;display:flex;flex-direction:column;gap:10px}

/* Switches and choices */
.stx-toggle-row{cursor:pointer}.stx-toggle-row input[type=checkbox]{position:absolute;opacity:0;pointer-events:none}.stx-switch{width:51px;height:31px;border-radius:999px;background:#39393d;padding:2px;flex:none;transition:background .18s}.stx-switch i{display:block;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s}.stx-toggle-row input:checked+.stx-switch{background:#34c759}.stx-toggle-row input:checked+.stx-switch i{transform:translateX(20px)}
.stx-checkbox{width:24px;height:24px;border:1.5px solid var(--settingsSecondary);border-radius:6px;display:grid;place-items:center;color:transparent}.stx-toggle-row input[data-folder-chat]{position:absolute;opacity:0}.stx-toggle-row input[data-folder-chat]:checked+.stx-checkbox{background:var(--settingsAccent);border-color:var(--settingsAccent);color:#fff}.stx-checkbox svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.4}

/* Search */
.stx-search-results{margin:0 0 12px;border-radius:11px;background:var(--settingsSectionBackground);overflow:hidden}.stx-search-result{position:relative;width:100%;min-height:49px;padding:7px 12px;border:0;background:transparent;color:var(--settingsPrimary);display:grid;grid-template-columns:minmax(0,1fr) 16px;text-align:left;cursor:pointer}.stx-search-result:not(:last-child)::after{content:"";position:absolute;left:12px;right:0;bottom:0;height:.5px;background:var(--settingsSeparator)}.stx-search-result span{font-size:15px;align-self:end}.stx-search-result small{grid-row:2;font-size:11px;color:var(--settingsSecondary);align-self:start}.stx-search-result .stx-chevron{grid-column:2;grid-row:1/3;align-self:center}

/* Storage / appearance / wallpaper */
.stx-storage-card{margin:2px 0 16px;padding:20px;border-radius:12px;background:var(--settingsSectionBackground);display:flex;flex-direction:column;gap:4px}.stx-storage-card strong{font-size:28px}.stx-storage-card span,.stx-storage-card small{color:var(--settingsSecondary);font-size:12px}.stx-progress{height:5px;border-radius:999px;background:color-mix(in srgb,var(--settingsSecondary) 18%,transparent);overflow:hidden;margin:9px 0 4px}.stx-progress i{display:block;height:100%;background:var(--settingsAccent);border-radius:inherit}
.stx-chat-preview{height:150px;margin:2px 0 18px;border-radius:13px;background:linear-gradient(150deg,color-mix(in srgb,var(--settingsAccent) 8%,var(--settingsSectionBackground)),var(--settingsSectionBackground));position:relative;overflow:hidden;padding:46px 15px 15px}.stx-preview-top{position:absolute;left:0;top:0;right:0;height:34px;background:color-mix(in srgb,var(--settingsSectionBackground) 88%,transparent);border-bottom:.5px solid var(--settingsSeparator)}.stx-preview-bubble{max-width:70%;padding:7px 10px;border-radius:12px;font-size:12px;margin:5px 0}.stx-preview-bubble.in{background:color-mix(in srgb,var(--settingsSecondary) 15%,var(--settingsSectionBackground))}.stx-preview-bubble.out{margin-left:auto;background:var(--settingsAccent);color:#fff}
.stx-text-size{height:64px;margin:0 0 18px;padding:8px;background:var(--settingsSectionBackground);border-radius:11px;display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.stx-text-size button{border:0;border-radius:8px;background:transparent;color:var(--settingsPrimary);font:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:2px}.stx-text-size button:nth-child(2){font-size:17px}.stx-text-size button:nth-child(3){font-size:19px}.stx-text-size button:nth-child(4){font-size:21px}.stx-text-size button.on{background:var(--settingsSelected);color:var(--settingsAccent)}.stx-text-size button span{font-size:10px;color:var(--settingsSecondary)}
.stx-wallpaper-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:2px 0 16px}.stx-wallpaper{position:relative;min-height:116px;border:2px solid transparent;border-radius:13px;background:var(--settingsSectionBackground);padding:0;overflow:hidden;color:var(--settingsPrimary);cursor:pointer}.stx-wallpaper>i{display:block;height:82px;background:linear-gradient(145deg,color-mix(in srgb,var(--settingsAccent) calc(6% + var(--wp-index,1)*1%),var(--settingsSectionBackground)),color-mix(in srgb,var(--settingsSecondary) 10%,var(--settingsSectionBackground)))}.stx-wallpaper span{display:block;padding:7px 9px;text-align:left;font-size:12px}.stx-wallpaper b{position:absolute;right:7px;top:7px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:var(--settingsAccent);color:#fff}.stx-wallpaper b svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.5}.stx-wallpaper.on{border-color:var(--settingsAccent)}

/* Block list / folders */
.stx-block-add{margin-bottom:14px}.stx-search-inline{height:38px;position:relative;display:flex;align-items:center;background:var(--settingsSectionBackground);border-radius:10px}.stx-search-inline svg{position:absolute;left:10px;width:17px;height:17px;fill:none;stroke:var(--settingsSecondary);stroke-width:2}.stx-search-inline input{width:100%;height:100%;border:0;background:transparent;color:var(--settingsPrimary);font:inherit;font-size:15px;padding:0 10px 0 34px;outline:0}.stx-candidates{margin-top:6px;border-radius:10px;background:var(--settingsSectionBackground);overflow:hidden}.stx-candidates button{width:100%;min-height:48px;border:0;background:transparent;color:var(--settingsPrimary);padding:7px 12px;display:flex;flex-direction:column;text-align:left}.stx-candidates button+button{border-top:.5px solid var(--settingsSeparator)}.stx-candidates small{color:var(--settingsSecondary)}
.stx-folder-row{padding:0;gap:0}.stx-folder-main{min-height:52px;flex:1;min-width:0;padding:7px 8px 7px 12px;border:0;background:transparent;color:inherit;display:flex;align-items:center;gap:11px;text-align:left;cursor:pointer}.stx-folder-reorder{display:flex;align-items:center;padding-right:7px}.stx-folder-reorder button{width:32px;height:40px;border:0;background:transparent;color:var(--settingsSecondary);display:grid;place-items:center}.stx-folder-reorder button:disabled{opacity:.25}.stx-folder-reorder svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}.stx-chat-checks{max-height:360px;overflow:auto}

/* Loading */
.stx-skeleton{display:flex;flex-direction:column;gap:14px;padding:10px 0}.stx-skeleton i{height:120px;border-radius:12px;background:linear-gradient(90deg,var(--settingsSectionBackground),color-mix(in srgb,var(--settingsSecondary) 13%,var(--settingsSectionBackground)),var(--settingsSectionBackground));background-size:200% 100%;animation:stx-shimmer 1.2s linear infinite}.stx-skeleton i+ i{height:190px}@keyframes stx-shimmer{to{background-position:-200% 0}}

/* Desktop — separate presentation, not a stretched phone screen */
.stx-desktop-shell{display:none}
@media (min-width:900px){
  #setScreen{inset:0;transform:none;opacity:0;transition:opacity .16s ease,visibility 0s linear .16s;background:color-mix(in srgb,var(--background-secondary,var(--settingsBackground)) 74%,#000 26%)}
  #setScreen.open{opacity:1;transition:opacity .16s ease,visibility 0s}
  .stx-mobile-shell{display:none}.stx-desktop-shell{height:100%;width:min(920px,100%);margin:0 auto;display:grid;grid-template-columns:280px minmax(0,1fr);background:var(--settingsBackground);box-shadow:0 0 40px rgba(0,0,0,.18)}
  .stx-desktop-sidebar{min-width:0;border-right:.5px solid var(--settingsSeparator);background:color-mix(in srgb,var(--settingsBackground) 92%,var(--settingsSectionBackground));padding:10px;overflow:auto}
  .stx-desktop-sidebar-head{height:45px;display:flex;align-items:center;justify-content:space-between;padding:0 5px 0 8px}.stx-desktop-title{min-width:0;display:flex;align-items:center;gap:9px}.stx-desktop-title>svg{width:20px;height:20px;flex:none;fill:none;stroke:var(--settingsAccent);stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.stx-desktop-sidebar-head h1{font-size:18px;font-weight:650;margin:0}.stx-close{width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--settingsSecondary);display:grid;place-items:center;cursor:pointer}.stx-close:hover{background:var(--settingsSelected);color:var(--settingsPrimary)}.stx-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
  .stx-desktop-search{height:34px;margin:5px 4px 10px}.stx-desktop-search input{font-size:13px}.stx-desktop-search+.stx-search-results{margin:0 4px 9px}.stx-desktop-nav{display:flex;flex-direction:column;gap:2px}.stx-desk-nav-row{width:100%;min-height:43px;border:0;border-radius:8px;background:transparent;color:var(--settingsPrimary);display:flex;align-items:center;gap:11px;padding:0 10px;text-align:left;font:inherit;font-size:14px;cursor:pointer}.stx-desk-nav-row:hover{background:color-mix(in srgb,var(--settingsSecondary) 9%,transparent)}.stx-desk-nav-row.active{background:var(--settingsSelected);color:var(--settingsAccent)}.stx-desk-nav-icon{width:20px;height:20px;display:grid;place-items:center}.stx-desk-nav-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
  .stx-desktop-pane{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--settingsBackground)}.stx-desktop-pane-head{height:54px;flex:0 0 54px;border-bottom:.5px solid var(--settingsSeparator);display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;padding:0 11px}.stx-desktop-pane-head h2{font-size:15px;font-weight:650;text-align:center;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stx-desk-back{width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--settingsAccent);display:grid;place-items:center;cursor:pointer}.stx-desk-back:hover{background:var(--settingsSelected)}.stx-desk-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2}.stx-desk-head-gap{width:34px}
  .stx-desktop-scroll{flex:1;min-height:0;overflow:auto;padding:24px 30px 40px}.stx-desktop-scroll>.stx-route-content{width:min(100%,560px);margin:0 auto}
  .stx-desktop-profile-page .stx-profile-hero{flex-direction:row;text-align:left;align-items:center;padding:5px 0 18px;margin:0}.stx-desktop-profile-page .stx-profile-copy{align-items:flex-start;margin:0 0 0 14px}.stx-desktop-profile-page .stx-profile-copy strong{font-size:18px}.stx-account-meta{font-size:12px;color:var(--settingsSecondary);padding:0 4px}
  .stx-section{border-radius:9px;margin-bottom:12px}.stx-section-cap{font-size:11px;margin:15px 10px 5px}.stx-section-foot{font-size:11px;line-height:15px;margin:-6px 10px 14px}.stx-row{min-height:47px;padding:6px 10px;gap:10px}.stx-row-label{font-size:14px;line-height:18px}.stx-row-sub{font-size:11px;line-height:14px}.stx-row-value{font-size:12px}.stx-icon{width:24px;height:24px;border-radius:6px;background:transparent;color:var(--settingsSecondary)}.stx-icon svg{width:18px;height:18px}.stx-row:not(:last-child)::after{left:44px}.stx-switch{width:40px;height:24px;padding:2px}.stx-switch i{width:20px;height:20px}.stx-toggle-row input:checked+.stx-switch i{transform:translateX(16px)}
  .stx-profile-edit-avatar{margin-top:0}.stx-field input,.stx-field textarea{font-size:14px;border-radius:9px;padding:10px 11px}.stx-primary,.stx-danger-button{font-size:14px;border-radius:9px}
  .stx-wallpaper-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.stx-wallpaper{min-height:105px}.stx-wallpaper>i{height:72px}
}

@media (prefers-reduced-motion:reduce){#setScreen,.stx-switch,.stx-switch i{transition:none}.stx-skeleton i{animation:none}}
html[data-power-transitions="0"] #setScreen,html[data-power-transitions="0"] .stx-switch,html[data-power-transitions="0"] .stx-switch i{transition:none}
html[data-power-transparency="0"] .stx-mobile-nav{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--settingsBackground)}
.animation-manual-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.48);color:#fff;display:grid;place-items:center;z-index:3}.animation-manual-play[hidden]{display:none}.animation-manual-play svg{width:20px;height:20px;fill:currentColor;stroke:none}
html[data-text-size="s"] .msg-text,html[data-text-size="s"] .msg-caption{font-size:14px!important}html[data-text-size="m"] .msg-text,html[data-text-size="m"] .msg-caption{font-size:16px!important}html[data-text-size="l"] .msg-text,html[data-text-size="l"] .msg-caption{font-size:18px!important}html[data-text-size="xl"] .msg-text,html[data-text-size="xl"] .msg-caption{font-size:20px!important}

.stx-danger-button.stx-safe-action{color:var(--settingsAccent);border:1px solid var(--settingsSeparator)}

/* Focused sign-in pages: one task per screen, using existing settings colors. */
.stx-auth-intro{display:flex;align-items:flex-start;gap:12px;margin:6px 0 22px;padding:4px 2px}
.stx-auth-intro>.stx-icon{width:40px;height:40px;border-radius:12px;background:var(--settingsSelected);color:var(--settingsAccent)}
.stx-auth-intro>.stx-icon svg{width:23px;height:23px}
.stx-auth-intro>div{min-width:0;flex:1}
.stx-auth-intro h2{margin:0 0 5px;font-size:19px;line-height:25px;font-weight:650;overflow-wrap:anywhere}
.stx-auth-intro p{margin:0;color:var(--settingsSecondary);font-size:13px;line-height:19px}
.stx-auth-note{margin:12px 2px 20px;color:var(--settingsSecondary);font-size:12px;line-height:18px}
.stx-auth-wide{width:100%}
.stx-auth-method-list .stx-row{min-height:68px;padding-top:12px;padding-bottom:12px}
.stx-auth-method-list .stx-row-label{font-weight:550;white-space:normal}
.stx-auth-method-list .stx-row-value{max-width:30%;font-size:12px}
.stx-auth-form{gap:16px}
.stx-auth-form .stx-field{gap:7px;font-size:13px}
.stx-auth-details{border:1px solid var(--settingsSeparator);border-radius:11px;padding:12px}
.stx-auth-details summary{color:var(--settingsAccent);font-size:13px;line-height:18px;cursor:pointer}
.stx-auth-details .stx-auth-note{margin:10px 0}
.stx-auth-intro+.stx-section-cap{margin-top:0}

/* Privacy and encryption share the normal settings navigation. */
.stx-security-intro{padding:12px 14px 22px;text-align:center}
.stx-security-symbol{display:grid;place-items:center;width:66px;height:66px;margin:0 auto 15px;border-radius:21px;background:color-mix(in srgb,var(--settingsAccent,var(--accent)) 12%,transparent);color:var(--settingsAccent,var(--accent))}
.stx-security-symbol svg{width:33px;height:33px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.stx-security-intro h2{margin:0 0 8px;font-size:22px;line-height:28px;font-weight:650;letter-spacing:-.4px;color:var(--settingsPrimary,var(--text))}
.stx-security-intro p{max-width:370px;margin:0 auto;font-size:14px;line-height:21px;color:var(--settingsSecondary,var(--muted))}
.stx-security-list .stx-row{min-height:72px;padding-top:13px;padding-bottom:13px}
.stx-security-list .stx-row-label{font-weight:550;white-space:normal}
.stx-security-list .stx-row-sub{margin-top:3px}
.stx-security-list .stx-icon{width:34px;height:34px;border-radius:10px}
.stx-security-list .stx-row:not(:last-child)::after{left:58px}
.stx-encryption-status{margin:0 0 20px;padding:11px 14px;border-radius:11px;background:color-mix(in srgb,var(--settingsSecondary,var(--muted)) 10%,transparent);color:var(--settingsSecondary,var(--muted));font-size:13px;line-height:19px;text-align:center}
.stx-encryption-status[data-ready=true]{background:color-mix(in srgb,#30a46c 12%,transparent);color:var(--settingsPrimary,var(--text))}
.stx-encryption-status[data-ready=true]::before{content:'✓';color:#30a46c;margin-right:8px;font-weight:700}
.stx-encryption-guide{padding:18px 16px 4px;border-radius:14px;background:var(--settingsSectionBackground,var(--surface-primary));margin-bottom:20px}
.stx-encryption-guide h3{margin:0 0 16px;font-size:16px;line-height:23px;font-weight:600}
.stx-encryption-step{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px}
.stx-encryption-step-icon{width:32px;height:32px;display:grid;place-items:center;flex:none;border-radius:9px;background:color-mix(in srgb,var(--settingsAccent,var(--accent)) 9%,transparent);color:var(--settingsAccent,var(--accent))}
.stx-encryption-step-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stx-encryption-step strong{display:block;font-size:14px;line-height:20px;font-weight:550}
.stx-encryption-step p{margin:4px 0 0;font-size:13px;line-height:19px;color:var(--settingsSecondary,var(--muted))}
.stx-encryption-details{border-radius:12px;margin:0 0 12px;background:var(--settingsSectionBackground,var(--surface-primary));overflow:hidden}
.stx-encryption-details summary{padding:16px;font-size:14px;line-height:20px;cursor:pointer;color:var(--settingsPrimary,var(--text));font-weight:500;list-style:none}
.stx-encryption-details summary::-webkit-details-marker{display:none}
.stx-encryption-details summary::after{content:'›';float:right;color:var(--settingsSecondary,var(--muted));font-size:22px;line-height:18px}
.stx-encryption-details[open] summary::after{transform:rotate(90deg)}
.stx-encryption-details p{margin:0;padding:0 16px 16px;color:var(--settingsSecondary,var(--muted));font-size:13px;line-height:20px}
.stx-encryption-fingerprint{white-space:pre-line;overflow-wrap:anywhere;font-family:inherit}
.stx-encryption-action{display:block;width:100%;min-height:48px;padding:12px 16px;text-align:left;border:0;border-top:.5px solid var(--settingsSeparator,var(--separator));background:transparent;color:var(--settingsAccent,var(--accent));font:inherit;font-size:14px;cursor:pointer}
.stx-encryption-action:disabled{opacity:.5;cursor:wait}
.stx-encryption-action:active{background:var(--settingsSelected)}
.stx-encryption-note{margin:18px 12px 10px;color:var(--settingsSecondary,var(--muted));font-size:12px;line-height:18px}
.stx-encryption details:focus-visible,.stx-encryption summary:focus-visible,.stx-encryption button:focus-visible{outline:2px solid var(--settingsAccent,var(--accent));outline-offset:-3px}
@media(min-width:900px){.stx-security-intro{padding-top:0}.stx-security-list .stx-icon{background:var(--settingsSelected);color:var(--settingsAccent)}.stx-security-intro h2{font-size:21px}}
.login-notice-card{min-width:0;max-width:360px;padding:4px 2px 8px}
.login-notice-card>strong{display:block;font-size:16px;line-height:23px;margin:0 0 14px}
.login-notice-card dl{display:grid;grid-template-columns:1fr;gap:3px;margin:0}
.login-notice-card dt{font-size:11px;color:var(--label-secondary,var(--muted));margin-top:9px}
.login-notice-card dd{margin:0;font-size:13px;line-height:19px;overflow-wrap:anywhere}
.login-notice-card>p{font-size:12px;line-height:18px;color:var(--label-secondary,var(--muted));margin:16px 0}
.login-notice-actions{display:flex;gap:8px;flex-wrap:wrap}.login-notice-actions[hidden]{display:none}
.login-notice-actions button{flex:1;min-height:42px;min-width:100px;border:0;border-radius:9px;padding:9px 12px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);font:inherit;font-size:13px;font-weight:550;cursor:pointer}
.login-notice-actions .login-notice-revoke{color:var(--danger,#e5484d);background:color-mix(in srgb,#e5484d 10%,transparent)}
.login-notice-actions button:disabled{opacity:.5;cursor:wait}

/* Cached media, measured by category; no browser quota is counted as cache. */
.stx-storage-overview{text-align:center;padding:6px 0 18px}
.stx-storage-ring{position:relative;width:min(270px,76vw);aspect-ratio:1;margin:0 auto 14px}
.stx-storage-ring>svg{display:block;width:100%;height:100%;overflow:visible}
.stx-storage-percent{fill:#fff;font-size:13px;font-weight:700;pointer-events:none}
.stx-storage-total{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;pointer-events:none}
.stx-storage-total strong{font-size:26px;font-weight:700;letter-spacing:-.7px;line-height:1.15}
.stx-storage-total span{font-size:12px;color:var(--settingsSecondary)}
.stx-storage-overview h2{font-size:20px;line-height:1.25;margin:0 0 8px;font-weight:600}
.stx-storage-overview>p{font-size:14px;line-height:1.4;color:var(--settingsSecondary);margin:0}
.stx-cache-list{border-radius:16px;background:var(--settingsSectionBackground);overflow:hidden;margin-bottom:14px}
.stx-cache-row{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:57px;padding:12px 16px;border:0;background:transparent;color:var(--settingsPrimary);text-align:left;font:inherit;cursor:pointer}
.stx-cache-row:after{content:'';position:absolute;left:54px;right:16px;bottom:0;height:1px;background:var(--settingsSeparator);transform:scaleY(.5);transform-origin:bottom}
.stx-cache-check{width:25px;height:25px;flex:none;border-radius:50%;border:1.5px solid var(--cache-color);box-sizing:border-box;display:grid;place-items:center;color:#fff}
.stx-cache-row.is-selected .stx-cache-check{background:var(--cache-color)}
.stx-cache-check svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stx-cache-name{min-width:0;flex:1;font-size:16px;line-height:1.3}
.stx-cache-name small{font-size:14px;color:var(--settingsSecondary);white-space:nowrap}
.stx-cache-bytes{font-size:15px;color:var(--settingsSecondary);white-space:nowrap;font-variant-numeric:tabular-nums}
.stx-cache-row:disabled{opacity:.42;cursor:default}
.stx-cache-row:focus-visible,.stx-cache-clear:focus-visible{outline:2px solid var(--settingsAccent);outline-offset:-3px}
.stx-cache-clear-wrap{padding:14px 16px 16px}
.stx-cache-clear{display:block;width:100%;min-height:48px;padding:12px;border:0;border-radius:11px;background:#2da536;color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.stx-cache-clear:disabled{opacity:.45;cursor:default}
.stx-cache-clear:active{filter:brightness(.9)}
.stx-storage-details{padding:6px 12px 18px;color:var(--settingsSecondary);font-size:12px;line-height:1.45}
.stx-storage-details p{margin:5px 0}
.stx-storage-details button{font:inherit;color:var(--settingsAccent);border:0;background:transparent;min-height:40px;padding:8px 0;cursor:pointer}
@media(max-width:380px){.stx-cache-row{padding-inline:12px;gap:9px}.stx-cache-name{font-size:14px}.stx-cache-name small,.stx-cache-bytes{font-size:12px}.stx-storage-ring{width:230px}}
