:root {
  --text: #fff;
  --muted: rgba(255, 255, 255, .52);
  --shadow: 0 16px 48px rgba(0, 0, 0, .25);
  --dim: .86;
  --blur: 0px;
  --icon-size: 58px;
  --global-icon-size: 58px;
  --icon-radius: 16px;
  --icon-opacity: .88;
  --label-size: 13px;
  --search-height: 48px;
  --search-radius: 8px;
  --layout-cols: 6;
  --grid-cell: 88px;
  --screen-scale: 1;
  --sidebar-scale: 1;
  --sidebar-visual-height: 100vh;
  --ui-title-lg: 18px;
  --ui-title: 16px;
  --ui-subtitle: 14px;
  --ui-label: 13px;
  --ui-body: 12px;
  --ui-meta: 11px;
  --ui-button: 12px;
  --ui-input: 13px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
body.app-booting .center-stage,
body.app-booting .topbar,
body.app-booting .site-footer,
body.app-booting .drawer,
body.app-booting .edit-panel,
body.app-booting .todo-panel {
  opacity: 0;
  visibility: hidden;
}
body.app-booting .wallpaper { opacity: 0; }
html.app-ready .center-stage,
html.app-ready .topbar,
html.app-ready .site-footer,
html.app-ready .drawer {
  transition: opacity .18s ease, visibility .18s ease;
}
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.desktop { position: relative; min-height: 100%; color: var(--text); isolation: isolate; }
.desktop.reduce-motion *, .desktop.reduce-motion *::before, .desktop.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.desktop.reduce-motion .tile:hover .icon::after, .desktop.reduce-motion .tile.is-hovering .icon::after { opacity: .62; transform: scale(.96); }
.wallpaper, .shade { position: fixed; inset: 0; z-index: -2; }
.wallpaper { filter: blur(var(--blur)); transform: scale(1.02); transition: background .32s cubic-bezier(.22,1,.36,1), filter .2s ease, opacity .22s ease; }
.desktop[data-theme="beach"] .wallpaper { background: linear-gradient(180deg, #d9b8a7 0 18%, #9db6c5 18.5% 34%, #35414b 34.5% 45%, #161616 45.5% 100%); }
.desktop[data-theme="blue"] .wallpaper { background: linear-gradient(145deg, #cde9ff 0 25%, #7aa5c5 25.5% 42%, #31536b 42.5% 64%, #10171d 64.5% 100%); }
.desktop[data-theme="green"] .wallpaper { background: linear-gradient(145deg, #b4d17a 0 28%, #52765b 28.5% 48%, #203f41 48.5% 100%); }
.shade { z-index: -1; background: rgba(0, 0, 0, var(--dim)); }
.site-footer { position: fixed; left: 50%; bottom: 12px; z-index: 4; color: rgba(255,255,255,.52); font-size: 12px; transform: translateX(-50%); pointer-events: auto; }
.site-footer[hidden] { display: none; }
.site-footer a { color: inherit; text-decoration: none; text-shadow: 0 1px 2px rgba(0,0,0,.28); }

.topbar { position: fixed; top: 18px; right: 24px; display: flex; gap: 24px; z-index: 8; transition: right .22s ease; }
.desktop.hide-global-add .ai-btn, .desktop.hide-home-entry .home-btn, .desktop.hide-random-wallpaper [data-global-entry="random-wallpaper"] { display: none !important; }
.drawer-open .topbar { right: 474px; opacity: .35; }
.round-btn { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; background: rgba(0,0,0,.18); border-radius: 50%; backdrop-filter: blur(10px); }
.round-btn:hover { background: rgba(0,0,0,.34); }

.organize-bar { position: fixed; top: 20px; left: 50%; z-index: 18; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 8px 0 18px; color: #222; background: rgba(255,255,255,.96); border: 1px solid rgba(0,0,0,.06); border-radius: 8px; box-shadow: 0 14px 36px rgba(0,0,0,.18); transform: translateX(-50%); backdrop-filter: blur(14px); }
.organize-bar[hidden] { display: none; }
.organize-bar strong { font-size: 15px; }
.organize-bar span { color: #777; font-size: 13px; }
.organize-bar button { height: 32px; padding: 0 18px; color: #fff; background: #333; border-radius: 6px; }

.exit-drawer { position: fixed; top: 17px; right: 26px; z-index: 18; display: none; width: 34px; height: 34px; color: #fff; background: transparent; font-size: 34px; line-height: 1; }
.drawer-open .exit-drawer { display: block; right: 438px; }

.center-stage { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 54px 24px 50px; transform: scale(var(--screen-scale)); transform-origin: center; transition: width .22s ease, transform .22s ease; }
.drawer-open .center-stage { width: calc(100% - 420px); }
.search-panel { position: relative; width: min(620px, 58vw); min-width: 300px; margin-top: -24px; animation: zoomIn .35s ease both; }
.search-tabs { display: flex; gap: 38px; padding-left: 12px; margin-bottom: 12px; }
.tab { color: var(--muted); background: transparent; font-size: 14px; font-weight: 300; }
.tab.active { color: rgba(255,255,255,.85); }
.search-card { display: flex; height: var(--search-height); overflow: hidden; border-radius: var(--search-radius); background: #fff; box-shadow: 0 2px 2px rgba(0,0,0,.12); }
.engine, .search-submit { display: flex; align-items: center; justify-content: center; flex: 0 0 50px; background: #fff; color: #b6b6b6; }
.engine span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 5px; color: #2456e8; font-size: 12px; font-weight: 800; }
.engine span img { display: block; width: 30px; height: 30px; object-fit: contain; border-radius: 7px; }
.engine svg { width: 10px; }
.search-card input { min-width: 0; flex: 1; border: 0; outline: 0; color: #333; padding: 0 12px; font-size: 14px; }
.search-card input::placeholder { color: #aaa; }
.search-submit { color: #4b68ff; }
.desktop.hide-search .search-panel { visibility: hidden; }
.desktop.hide-search-button .search-submit { display: none; }
.engine-menu { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); overflow: hidden; background: rgba(255,255,255,.96); border: 1px solid rgba(20,24,32,.08); border-radius: 10px; box-shadow: 0 18px 42px rgba(0,0,0,.2); backdrop-filter: blur(16px) saturate(1.1); transform-origin: top left; animation: engineMenuIn .18s cubic-bezier(.22,1,.36,1) both; }
.engine-menu[hidden] { display: none; }
.engine-option { display: grid; min-height: 70px; place-items: center; align-content: center; gap: 6px; color: #444; background: transparent; border-right: 1px solid rgba(20,24,32,.07); font-size: 12px; transition: background .16s ease, transform .16s ease; }
.engine-option:last-child { border-right: 0; }
.engine-option:hover, .engine-option.active { background: rgba(47,111,237,.08); }
.engine-option img, .engine-option .engine-glyph { display: grid; width: 28px; height: 28px; place-items: center; object-fit: contain; border-radius: 7px; color: #2f6fed; font-size: 22px; font-weight: 800; }

.quick-grid-shell { position: relative; width: min(calc(var(--layout-cols) * var(--grid-cell) + 112px), 94vw); margin: 102px auto 0; touch-action: pan-y; }
.quick-grid { display: grid; width: min(calc(var(--layout-cols) * var(--grid-cell)), 86vw); grid-template-columns: repeat(var(--layout-cols), minmax(0, var(--grid-cell))); justify-content: center; justify-items: center; align-content: center; gap: 46px 16px; margin: 0 auto; animation: zoomIn .35s .06s ease both; transition: width .2s ease, gap .2s ease, transform .34s cubic-bezier(.2,.9,.18,1), opacity .24s ease, filter .24s ease; will-change: transform, opacity; }
.page-arrow { position: absolute; top: 50%; z-index: 5; display: grid; width: 42px; height: 58px; place-items: center; color: rgba(255,255,255,.86); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 38px; line-height: 1; opacity: 0; transform: translateY(-50%) scale(.92); box-shadow: 0 12px 28px rgba(0,0,0,.18); transition: opacity .18s ease, transform .22s cubic-bezier(.22,1,.36,1), background .18s ease, color .18s ease; backdrop-filter: blur(14px) saturate(1.12); }
.quick-grid-shell.has-pages .page-arrow { opacity: .72; }
.quick-grid-shell.has-pages:hover .page-arrow { opacity: .95; transform: translateY(-50%) scale(1); }
.page-arrow-left { left: -50px; }
.page-arrow-right { right: -50px; }
.page-arrow:hover { color: #fff; background: rgba(255,255,255,.22); }
.page-arrow:disabled { opacity: .16 !important; cursor: default; transform: translateY(-50%) scale(.88) !important; }
.page-arrow[hidden], .desktop.hide-pager .page-arrow { display: none; }
.quick-grid-shell.page-turning { min-height: var(--page-turn-height, auto); overflow: visible; }
.quick-grid-shell.page-live-from-right > .quick-grid:not(.page-transition-layer) { opacity: 0; transform: translate3d(58px,0,0) scale(.992); filter: blur(.3px); }
.quick-grid-shell.page-live-from-left > .quick-grid:not(.page-transition-layer) { opacity: 0; transform: translate3d(-58px,0,0) scale(.992); filter: blur(.3px); }
.page-transition-layer { position: absolute !important; z-index: 8; margin: 0 !important; pointer-events: none; animation: none !important; transition: transform .48s cubic-bezier(.16,1,.3,1), opacity .38s ease, filter .38s ease; will-change: transform, opacity; }
.page-transition-layer .tile { pointer-events: none; }
.tile.page-hidden { display: none; }
.tile { position: relative; display: grid; width: var(--grid-cell); min-height: 92px; place-items: center; gap: 8px; padding: 4px; color: #fff; background: transparent; border-radius: 8px; transition: transform .22s cubic-bezier(.2,.8,.2,1), background .18s ease, box-shadow .18s ease, opacity .18s ease; --tile-glow: rgba(76, 142, 255, .72); }
.tile:hover, .tile.is-hovering { transform: translateY(-2px); }
.tile.long-pressing .icon { transform: scale(.98); }
.tile.long-pressing .icon::before { content: ""; position: absolute; inset: -7px; z-index: -1; border-radius: calc(var(--icon-radius) + 10px); border: 2px solid rgba(255,255,255,.7); opacity: .88; animation: longPressRing 3s linear forwards; pointer-events: none; }
.tile.long-press-right .icon::before { border-color: rgba(255,219,118,.9); }
.tile.dragging { cursor: grabbing; }
.tile.drag-placeholder { opacity: .04; transform: scale(.74); filter: saturate(.7) blur(.3px); transition: opacity .2s ease, transform .28s cubic-bezier(.22,1,.36,1), filter .18s ease; }
.tile.drag-over { background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.11); }
.tile.folder-drop-target { background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 0 28px var(--tile-glow); transform: scale(1.05); }
.drag-preview { position: fixed !important; z-index: 80; pointer-events: none; margin: 0 !important; opacity: .985; animation: none !important; will-change: transform; filter: drop-shadow(0 24px 38px rgba(0,0,0,.32)); transform-origin: center; }
.drag-preview .tile-delete, .drag-preview .tile-edit, .drag-preview .widget-config { display: none !important; }
.drag-preview .icon { box-shadow: 0 0 0 1px rgba(255,255,255,.32), 0 16px 34px rgba(0,0,0,.3), 0 0 28px var(--tile-glow); }
.page-eject-preview { position: fixed !important; z-index: 70; pointer-events: none; margin: 0 !important; animation: none !important; will-change: transform, opacity; filter: drop-shadow(0 18px 28px rgba(0,0,0,.25)); }
.page-eject-preview .tile-delete, .page-eject-preview .tile-edit, .page-eject-preview .widget-config { display: none !important; }
.icon { position: relative; display: grid; width: var(--global-icon-size); height: var(--global-icon-size); place-items: center; overflow: visible; color: #fff; border-radius: var(--icon-radius); opacity: var(--icon-opacity); box-shadow: 1px 1px 5px rgba(0,0,0,.24); font-weight: 700; letter-spacing: 0; line-height: 1; text-align: center; white-space: nowrap; transition: box-shadow .22s ease, transform .22s ease, filter .22s ease; }
.icon::after { content: ""; position: absolute; inset: -11px; z-index: -1; border-radius: calc(var(--icon-radius) + 14px); background: radial-gradient(circle, var(--tile-glow) 0%, rgba(255,255,255,.22) 36%, rgba(255,255,255,0) 72%); opacity: 0; filter: blur(10px); transform: scale(.78); transition: opacity .22s ease, transform .22s ease, filter .22s ease; pointer-events: none; }
.tile:hover .icon::after, .tile.is-hovering .icon::after { opacity: .9; transform: scale(1); animation: iconBreathingGlow 1.8s ease-in-out infinite; }
.tile:hover .icon, .tile.is-hovering .icon { box-shadow: 0 0 0 1px rgba(255,255,255,.32), 0 0 18px var(--tile-glow), 0 0 38px color-mix(in srgb, var(--tile-glow) 70%, transparent); filter: saturate(1.12) brightness(1.06); transform: scale(1.03); }
.desktop.no-icon-shadow .icon { box-shadow: none; }
.desktop.no-icon-shadow .tile:hover .icon, .desktop.no-icon-shadow .tile.is-hovering .icon { box-shadow: 0 0 18px var(--tile-glow); }
.icon > * { position: relative; z-index: 1; }
.icon > .icon-face { position: absolute; inset: 0; z-index: 0; display: grid; width: 100%; height: 100%; place-items: center; overflow: hidden; border-radius: inherit; background: inherit; color: inherit; }
.icon-text-fit { display: block; max-width: 86%; overflow: hidden; line-height: 1; text-align: center; text-overflow: clip; white-space: nowrap; }
.label { max-width: 96px; overflow: hidden; color: rgba(255,255,255,.9); font-size: var(--label-size); white-space: nowrap; text-overflow: ellipsis; text-shadow: 1px 1px 2px rgba(0,0,0,.35); }
.desktop.hide-names .label { visibility: hidden; }
.tile[data-color="blue"] { --tile-glow: rgba(62, 138, 255, .78); }
.tile[data-color="green"] { --tile-glow: rgba(49, 210, 123, .76); }
.tile[data-color="red"] { --tile-glow: rgba(255, 86, 92, .78); }
.tile[data-color="violet"] { --tile-glow: rgba(132, 119, 255, .78); }
.tile[data-color="light"] { --tile-glow: rgba(255, 255, 255, .72); }
.tile[data-color="dark"] { --tile-glow: rgba(160, 170, 190, .7); }
.tile[data-color="blue"] .icon { background: #116fe5; }
.tile[data-color="green"] .icon { background: #0a8c3e; }
.tile[data-color="red"] .icon { background: #d91f26; }
.tile[data-color="violet"] .icon { background: #27306e; }
.tile[data-color="light"] .icon { background: #e9e9e9; color: #111; }
.tile[data-color="dark"] .icon { background: #111; }
.tile.selected-for-edit { background: rgba(255,255,255,.12); }
.custom-icon { font-size: 20px; }
.text-icon { font-size: 23px; }
.image-icon { background: transparent; }
.image-icon .image-fill-surface { background: var(--icon-fill-base, #f4f6f8); }
.image-icon .image-fill-surface::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 50% 44%, rgba(255,255,255,.18), rgba(255,255,255,0) 58%), var(--icon-fill-base, #f4f6f8); }
.image-icon .icon-fill-blur { position: absolute; inset: -14%; z-index: 1; display: block; width: 128%; height: 128%; object-fit: cover; opacity: .72; filter: blur(11px) saturate(1.28) brightness(1.03); transform: scale(1.04); image-rendering: auto; }
.image-icon .icon-image-main { position: relative; z-index: 2; display: block; width: var(--favicon-scale, 90%); height: var(--favicon-scale, 90%); object-fit: contain; image-rendering: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.08)); }
.folder-icon { display: grid; overflow: visible; background: transparent; box-shadow: 1px 1px 5px rgba(0,0,0,.24); }
.folder-face { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-areas: "stack"; overflow: hidden; border-radius: inherit; background: linear-gradient(145deg, rgba(48,62,82,.92), rgba(20,28,40,.9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.folder-face > * { grid-area: stack; }
.folder-face-text { place-items: center; background: linear-gradient(145deg, rgba(52,72,104,.94), rgba(23,30,44,.92)); }
.folder-cover-text { display: grid; width: 82%; height: 82%; place-items: center; overflow: hidden; color: #fff; font-weight: 900; line-height: 1; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.26); word-break: break-all; }
.folder-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; width: 72%; height: 72%; place-self: center; }
.folder-mini-icon { display: grid; min-width: 0; min-height: 0; place-items: center; overflow: hidden; color: var(--mini-fg); background: var(--mini-bg); border-radius: 8px; font-size: 10px; font-weight: 800; line-height: 1; }
.folder-mini-icon img { display: block; width: 92%; height: 92%; object-fit: contain; }
.folder-mini-icon.empty { background: rgba(255,255,255,.14); }
.folder-text-badge { display: none; }
.small-logo img { display: block; width: 72%; height: 72%; object-fit: contain; }
.huawei-icon { color: #111; background: #f4f4f4; }
.cloud-icon::before { content: ""; width: 25px; height: 17px; border-radius: 999px; background: #d7e6ed; box-shadow: -7px 2px 0 -1px #d7e6ed; }
.note-icon::before { content: ""; width: 22px; height: 26px; border-radius: 4px; background: #20a726; box-shadow: inset 0 7px #24c931; }
.book-icon::before { content: ""; width: 22px; height: 25px; border-radius: 3px; background: linear-gradient(90deg,#2684df 0 42%,#c9d5df 42% 58%,#2684df 58%); }
.link-icon::before { content: "∞"; font-size: 38px; }
.panda-icon::before { content: "☯"; font-size: 30px; color: #111; }
.dolphin-icon::before { content: "◔"; font-size: 30px; }
.add-icon { color: rgba(255,255,255,.84); background: rgba(255,255,255,.18); font-size: 36px; font-weight: 200; }
.pager { display: flex; gap: 20px; margin-top: 34px; }
.desktop.hide-pager .pager { display: none; }
.pager span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.38); }
.pager .active { background: #fff; }

.desktop.editing .tile:not(.add-tile) { cursor: grab; }
.desktop.editing .tile:not(.add-tile), .desktop.icon-editor-active .tile:not(.add-tile) { animation: iconJiggle .46s ease-in-out infinite alternate; }
.desktop.dragging-icons .tile:not(.add-tile), .desktop.dragging-icons .tile:not(.add-tile) .icon { animation: none !important; }
.desktop.dragging-icons .tile:not(.dragging):not(.add-tile) { transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .22s ease, background .22s ease, box-shadow .22s ease; }
.desktop.dragging-icons .tile:not(.dragging):not(.add-tile) .icon { transition: transform .42s cubic-bezier(.22,1,.36,1), box-shadow .22s ease, filter .22s ease; }
.desktop.editing .tile:nth-child(2n), .desktop.icon-editor-active .tile:nth-child(2n) { animation-delay: -.18s; }
.desktop.editing .tile:nth-child(3n), .desktop.icon-editor-active .tile:nth-child(3n) { animation-delay: -.31s; }
.desktop.editing .tile:not(.add-tile):active { cursor: grabbing; }
.tile-delete, .tile-edit { position: absolute; z-index: 4; display: none; place-items: center; color: #222; border: 1px solid rgba(255,255,255,.56); border-radius: 999px; opacity: .72; box-shadow: 0 8px 20px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.42); transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease, opacity .2s ease, background .2s ease, filter .2s ease; backdrop-filter: blur(14px) saturate(1.2); }
.tile-delete { top: -5px; right: 12px; width: 24px; height: 24px; overflow: hidden; background: rgba(255,255,255,.48); padding: 0; }
.tile-delete img { display: block; width: 62%; height: 62%; object-fit: contain; border-radius: inherit; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.1)); }
.tile-edit { top: 50%; left: 50%; width: 31px; height: 31px; overflow: hidden; color: rgba(35,35,35,.82); background: rgba(255,255,255,.46); padding: 0; transform: translate(-50%, -50%); }
.tile-edit img { display: block; width: 60%; height: 60%; object-fit: contain; border-radius: inherit; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.1)); }
.desktop.editing .tile:not(.add-tile) .tile-delete, .desktop.editing .tile:not(.add-tile) .tile-edit { display: grid; }
.tile-delete:hover { opacity: .96; background: rgba(255,255,255,.82); transform: scale(1.08); box-shadow: 0 12px 28px rgba(217,65,65,.22), inset 0 1px 0 rgba(255,255,255,.62); }
.tile-edit:hover { opacity: .96; background: rgba(255,255,255,.84); transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 12px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.62); }
.tile.dragging { z-index: 6; animation: none !important; }
.tile.layout-flip { transition: transform .34s cubic-bezier(.22,1,.36,1) !important; will-change: transform; }
.todo-badge { position: absolute; top: -5px; right: 18%; z-index: 1; display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; color: #fff; background: #ff4e50; border-radius: 999px; font-size: 12px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

.drawer { position: fixed; top: 0; right: 0; z-index: 14; width: 420px; height: var(--sidebar-visual-height); max-height: none; overflow: hidden; color: #333; background: #f3f3f3; transform: translateX(100%) scale(var(--sidebar-scale)); transform-origin: top right; transition: transform .22s ease, height .18s ease; box-shadow: -2px 0 10px rgba(0,0,0,.08); }
.drawer.open { transform: translateX(0) scale(var(--sidebar-scale)); }
.drawer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); height: 90px; background: #fff; border-bottom: 1px solid #ededed; }
.drawer-tabs:has(.drawer-tab.admin-only:not([hidden])) { grid-template-columns: repeat(4, 1fr); }
.drawer-tab { display: grid; place-items: center; align-content: center; gap: 5px; color: #aaa; background: #fff; }
.drawer-tab[hidden] { display: none; }
.drawer-tab.active { color: #222; }
.drawer-tab svg { width: 24px; height: 24px; }
.drawer-tab span { font-size: 12px; }
.drawer-page { display: none; height: calc(100% - 90px); overflow-y: auto; padding: 14px 30px 32px; }
.drawer-page.active { display: block; }
.drawer-page h2 { color: #222; font-size: var(--ui-title-lg); line-height: 1.25; letter-spacing: 0; }
.drawer-page h3 { color: #222; font-size: var(--ui-title); line-height: 1.3; letter-spacing: 0; }
.drawer-page p,
.drawer-page small,
.drawer-page .helper-text { color: #7b8490; font-size: var(--ui-body); line-height: 1.55; }
.drawer-page label { font-size: var(--ui-label); line-height: 1.35; }
.drawer-page input,
.drawer-page select,
.drawer-page textarea { font-size: var(--ui-input); }
.drawer-page button { font-size: var(--ui-button); }
.drawer-search { display: grid; grid-template-columns: 30px 1fr 42px; gap: 8px; align-items: center; margin: 6px -10px 18px; }
.drawer-search input { height: 40px; border: 0; border-radius: 6px; padding: 0 10px; outline: 0; }
.drawer-search button { height: 40px; border-radius: 6px; background: #fff; color: #444; }
.add-site-form { display: grid; gap: 10px; margin: 0 -10px 18px; padding: 16px; background: #fff; border-radius: 8px; }
.add-site-form h2 { margin: 0 0 2px; color: #222; font-size: var(--ui-title-lg); }
.add-site-form input { height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #e4e4e4; border-radius: 6px; outline: 0; }
.add-site-form button { height: 40px; color: #fff; background: #333; border-radius: 6px; }
.add-form-row { display: grid; grid-template-columns: 1fr 48px; gap: 10px; }
.add-form-row input[type="color"] { padding: 2px; }
.icon-mode-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.icon-mode-choice label { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; color: #444; background: #f6f6f6; border: 1px solid #ececec; border-radius: 6px; font-size: 12px; }
.icon-mode-choice input { width: auto; height: auto; margin: 0; accent-color: #333; }
.favicon-preview { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; min-height: 46px; color: #777; font-size: 12px; line-height: 1.35; }
.favicon-preview .small-logo { position: static; }
.favicon-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 12px 14px; margin: 4px 0 12px; padding: 2px 0; }
.favicon-choice-grid[hidden] { display: none; }
.favicon-choice { position: relative; display: grid; gap: 7px; justify-items: center; min-width: 0; color: #8a8a8a; background: transparent; border-radius: 8px; }
.add-site-form .favicon-choice, .edit-panel .favicon-choice { height: auto; padding: 0; color: #8a8a8a; background: transparent; border-radius: 8px; }
.favicon-choice .choice-box { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; color: #fff; background: #116fe5; border: 2px solid rgba(255,255,255,.9); border-radius: 7px; box-shadow: 0 7px 18px rgba(0,0,0,.12); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease; }
.favicon-choice img { display: block; width: 90%; height: 90%; object-fit: contain; }
.favicon-choice strong { max-width: 76px; overflow: hidden; color: #898989; font-size: 12px; font-weight: 400; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.favicon-choice:hover .choice-box { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.17); }
.favicon-choice.selected .choice-box { border-color: #2f62d8; box-shadow: 0 0 0 3px rgba(47,98,216,.13), 0 10px 22px rgba(0,0,0,.17); }
.favicon-choice.selected::after { content: "✓"; position: absolute; top: -5px; right: 5px; display: grid; width: 19px; height: 19px; place-items: center; color: #fff; background: #2f62d8; border: 2px solid #fff; border-radius: 50%; font-size: 11px; line-height: 1; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.favicon-choice.is-broken { opacity: .42; }
.favicon-choice.is-broken .choice-box { filter: grayscale(1); }
.store-layout { display: grid; grid-template-columns: 130px 1fr; gap: 20px; margin: 0 -18px; }
.category-list { margin: 0; padding: 0; list-style: none; }
.category-list li { min-height: 42px; color: #9a9a9a; }
.category-list button { width: 100%; min-height: 38px; padding: 0 14px 0 18px; color: #8a8a8a; background: transparent; border-radius: 6px; text-align: left; transition: background .16s ease, color .16s ease; }
.category-list button:hover { color: #333; background: rgba(255,255,255,.6); }
.category-list button.active { color: #333; background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.site-cards { display: grid; gap: 16px; }
.site-result-summary { display: grid; gap: 5px; padding: 14px 16px; color: #777; background: rgba(255,255,255,.78); border: 1px solid rgba(0,0,0,.04); border-radius: 8px; font-size: var(--ui-body); }
.site-result-summary strong { color: #222; font-size: var(--ui-subtitle); }
.site-card { position: relative; min-height: 136px; padding: 24px 14px 60px 66px; background: #fff; border-radius: 8px; }
.site-card h3 { margin: 0 0 10px; font-size: var(--ui-subtitle); }
.site-card p { margin: 0; color: #888; font-size: var(--ui-body); line-height: 1.55; }
.site-card-meta { display: inline-flex; margin-top: 10px; padding: 3px 8px; color: #777; background: #f3f3f3; border-radius: 999px; font-size: var(--ui-meta); line-height: 1.2; }
.site-card-actions { position: absolute; right: 12px; bottom: 12px; left: 66px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.site-card button { min-width: 58px; height: 32px; padding: 0 10px; color: #555; background: #fff; border: 1px solid #e8e8e8; border-radius: 6px; font-size: var(--ui-button); }
.site-card button:disabled { color: #aaa; background: #f6f6f6; cursor: default; }
.site-card .admin-feature { color: #226b44; }
.site-card .admin-edit { color: #3156a4; }
.site-card .admin-delete { color: #d74343; }
.small-logo { position: absolute; top: 24px; left: 22px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; }
.small-logo.red { background: #ef233c; } .small-logo.blue { background: #0b5ea8; } .small-logo.sky { background: #2bb8ff; } .small-logo.gold { background: #191919; color: #ffc800; }
.small-logo.cat { background: #111; } .small-logo.cat::before { content: "⌾"; color: #36ef60; }
.site-empty { display: grid; gap: 8px; padding: 22px; color: #888; background: #fff; border-radius: 8px; line-height: 1.6; }
.site-empty strong { color: #222; font-size: var(--ui-title); }

.share-submit, .admin-recommended, .widget-picker { margin: 18px -10px 26px; padding: 16px; color: #333; background: #fff; border-radius: 8px; }
.admin-recommended[hidden] { display: none; }
.admin-recommended h2 { margin: 0 0 12px; font-size: var(--ui-title-lg); }
.share-submit h2, .widget-picker h2 { margin: 0 0 8px; font-size: var(--ui-title-lg); }
.share-submit p, .admin-recommended p { margin: 0 0 12px; color: #888; font-size: var(--ui-body); line-height: 1.5; }
.share-submit form, .admin-recommended form { display: grid; gap: 10px; }
.admin-edit-form[hidden] { display: none; }
.share-submit input, .admin-recommended input, .admin-recommended select { height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #e4e4e4; border-radius: 6px; outline: 0; background: #fff; color: #333; }
.share-submit button, .admin-recommended button { height: 40px; color: #fff; background: #333; border-radius: 6px; }
.admin-edit-form { margin-top: 14px; padding: 12px; background: #f8f8f8; border: 1px solid #ececec; border-radius: 8px; }
.admin-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.admin-edit-head strong { color: #222; font-size: 14px; }
.admin-edit-head button { width: 64px; height: 30px; color: #555; background: #fff; border: 1px solid #e2e2e2; }
.widget-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.widget-options button { min-height: 40px; color: #333; background: #f5f5f5; border: 1px solid #e5e5e5; border-radius: 6px; }
.admin-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 6px -10px 18px; padding: 20px; color: #fff; background: linear-gradient(135deg,#242424,#595959); border-radius: 8px; box-shadow: 0 14px 28px rgba(0,0,0,.14); }
.admin-hero span { display: block; margin-bottom: 6px; color: rgba(255,255,255,.66); font-size: 12px; }
.admin-hero strong { display: block; font-size: 22px; letter-spacing: 0; }
.admin-hero small { color: rgba(255,255,255,.72); font-size: 12px; text-align: right; }
.admin-section-tabs { position: sticky; top: -14px; z-index: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; margin: 0 -10px 16px; padding: 10px; background: rgba(243,244,246,.92); border: 1px solid rgba(20,24,32,.06); border-radius: 12px; backdrop-filter: blur(14px); }
.admin-section-tabs button { min-width: 0; min-height: 38px; padding: 0 8px; overflow: hidden; color: #4c5563; background: transparent; border: 1px solid transparent; border-radius: 10px; font-size: var(--ui-label); white-space: nowrap; text-overflow: ellipsis; transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.admin-section-tabs button:hover { color: #202733; background: rgba(255,255,255,.72); transform: translateY(-1px); }
.admin-section-tabs button.active { color: #17202f; background: #fff; border-color: rgba(20,24,32,.08); box-shadow: 0 8px 20px rgba(20,24,32,.08), inset 0 1px 0 rgba(255,255,255,.9); }
.admin-panel { margin: 18px -10px 26px; padding: 16px; color: #333; background: #fff; border-radius: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.admin-panel-title { margin-bottom: 14px; }
.admin-panel-title h2 { margin: 0 0 7px; color: #222; font-size: var(--ui-title-lg); }
.admin-panel-title p { margin: 0; color: #888; font-size: var(--ui-body); line-height: 1.55; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-field { display: grid; gap: 7px; color: #333; font-size: var(--ui-label); }
.admin-field.wide, .admin-form .wide { grid-column: 1 / -1; }
.admin-field input, .admin-field textarea, .admin-form input, .admin-form textarea, .admin-form select { width: 100%; min-width: 0; padding: 0 10px; color: #333; background: #fff; border: 1px solid #e4e4e4; border-radius: 6px; outline: 0; }
.admin-field input, .admin-form input, .admin-form select { height: 38px; }
.admin-field textarea, .admin-form textarea { min-height: 76px; padding-top: 10px; resize: vertical; line-height: 1.5; }
.admin-form button, .admin-panel > form button { min-height: 40px; color: #fff; background: #333; border-radius: 6px; }
.admin-protocol-field { min-width: 0; margin: 2px 0; padding: 13px; border: 1px solid #e4e7ec; border-radius: 8px; }
.admin-protocol-field legend { padding: 0 6px; color: #333; font-size: var(--ui-label); font-weight: 700; }
.admin-protocol-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-protocol-options label { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1px 9px; align-items: center; min-height: 56px; padding: 9px 11px; border: 1px solid #dfe3e8; border-radius: 7px; cursor: pointer; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.admin-protocol-options label:has(input:checked) { border-color: #3b82f6; background: #f5f9ff; box-shadow: 0 0 0 2px rgba(59,130,246,.1); }
.admin-protocol-options input { grid-row: 1 / 3; width: 16px; height: 16px; margin: 0; accent-color: #2563eb; }
.admin-protocol-options span { color: #20252d; font-size: var(--ui-body); font-weight: 800; }
.admin-protocol-options small { color: #7a818c; font-size: 11px; }
.admin-protocol-note { margin: 9px 1px 0; color: #8a5b00; font-size: 12px; line-height: 1.55; }
.admin-https-confirm { display: grid; gap: 7px; margin-top: 10px; padding: 10px; color: #8b1e1e; background: #fff7f7; border: 1px solid #f0cccc; border-radius: 7px; font-size: 12px; }
.admin-https-confirm[hidden] { display: none; }
.admin-https-confirm input { height: 36px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.admin-ops-panel { display: grid; gap: 14px; }
.admin-ops-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-ops-actions button, .admin-backup-import { display: grid; min-height: 40px; place-items: center; padding: 0 12px; color: #fff; background: #2b313d; border: 1px solid rgba(20,24,32,.08); border-radius: 8px; font-size: var(--ui-button); font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(20,24,32,.08); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.admin-ops-actions button:hover, .admin-backup-import:hover { background: #171d28; transform: translateY(-1px); box-shadow: 0 12px 22px rgba(20,24,32,.12); }
.admin-backup-import input { display: none; }
.admin-diagnostics { display: grid; gap: 10px; min-height: 76px; padding: 12px; color: #354052; background: #f7f9fc; border: 1px solid #e5eaf2; border-radius: 10px; }
.admin-diagnostics p { margin: 0; color: #697586; font-size: var(--ui-body); line-height: 1.55; }
.diagnostic-grid { display: grid; gap: 8px; }
.diagnostic-row { display: grid; grid-template-columns: minmax(88px, .6fr) minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; background: #fff; border: 1px solid rgba(20,24,32,.06); border-radius: 8px; }
.diagnostic-row strong { color: #202733; font-size: var(--ui-label); }
.diagnostic-row span { min-width: 0; color: #5b6676; font-size: var(--ui-body); line-height: 1.45; word-break: break-word; }
.diagnostic-row.ok strong { color: #178347; }
.diagnostic-row.warn strong { color: #b54708; }
.diagnostic-row.bad strong { color: #b42318; }
.diagnostic-log { display: grid; gap: 7px; margin-top: 2px; padding: 10px; background: #fff; border: 1px solid rgba(20,24,32,.06); border-radius: 8px; }
.diagnostic-log strong { color: #202733; font-size: var(--ui-label); }
.diagnostic-log code { display: block; overflow: hidden; color: #6b7280; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.admin-link-editor { display: grid; gap: 9px; padding: 12px; background: #f7f7f7; border: 1px solid #ededed; border-radius: 8px; }
.admin-link-editor strong { color: #222; font-size: var(--ui-label); }
.admin-link-editor label { display: grid; grid-template-columns: 92px 1fr; gap: 8px; min-height: 0; }
.admin-template-actions { display: grid; gap: 10px; padding: 12px; background: #f7f9fb; border: 1px solid #edf0f3; border-radius: 12px; }
.admin-template-actions button { justify-self: start; min-height: 38px; padding: 0 16px; color: #fff; background: #2f6fed; border-radius: 999px; box-shadow: 0 8px 18px rgba(47,111,237,.18); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.admin-template-actions button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(47,111,237,.22); }
.admin-template-actions button:disabled { opacity: .58; cursor: default; transform: none; }
.admin-template-actions span { color: #6d7480; font-size: var(--ui-body); line-height: 1.55; }
.admin-user-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-bottom: 12px; }
.admin-user-tools input { height: 36px; min-width: 0; padding: 0 10px; color: #222; background: #f9fafb; border: 1px solid #e2e7ee; border-radius: 8px; outline: 0; }
.admin-user-tools button { min-height: 36px; padding: 0 14px; color: #fff; background: #202733; border-radius: 999px; }
.admin-users-list { display: grid; gap: 7px; }
.admin-user-item { display: grid; gap: 8px; padding: 8px 10px; background: #f8fafc; border: 1px solid #e8edf3; border-radius: 10px; }
.admin-user-item.banned { border-color: rgba(196,50,43,.22); background: #fff8f7; }
.admin-user-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; }
.admin-user-avatar { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; background: linear-gradient(135deg,#35475f,#8fb0dd); border-radius: 50%; font-size: 12px; font-weight: 900; }
.admin-user-head strong { display: block; overflow: hidden; color: #20242b; font-size: var(--ui-label); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-head small { display: block; margin-top: 2px; color: #7b8490; font-size: var(--ui-meta); line-height: 1.25; word-break: break-all; }
.admin-user-edit-toggle { min-height: 28px; padding: 0 11px; color: #26303d; background: #fff; border: 1px solid rgba(20,24,32,.08); border-radius: 999px; font-size: 12px; box-shadow: 0 4px 12px rgba(20,24,32,.05); transition: transform .16s ease, box-shadow .16s ease; }
.admin-user-edit-toggle:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,24,32,.08); }
.admin-user-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-user-fields[hidden], .admin-user-actions[hidden] { display: none; }
.admin-user-fields label { display: grid; gap: 6px; color: #555f6d; font-size: var(--ui-body); }
.admin-user-fields input, .admin-user-fields select { width: 100%; height: 34px; min-width: 0; padding: 0 9px; color: #222; background: #fff; border: 1px solid #dfe5ec; border-radius: 8px; outline: 0; }
.admin-user-fields input.is-invalid { border-color: rgba(207,63,54,.72); box-shadow: 0 0 0 3px rgba(207,63,54,.1); }
.admin-user-actions { display: flex; gap: 9px; justify-content: flex-end; }
.admin-user-actions button { min-height: 34px; padding: 0 13px; color: #fff; background: #202733; border-radius: 999px; }
.admin-user-actions button:disabled { opacity: .55; cursor: default; }
.admin-user-actions .danger { background: #cf3f36; }
.admin-user-validate { min-height: 16px; margin: -2px 0 0; color: #c3342b; font-size: var(--ui-body); line-height: 1.45; }
.admin-switch-grid { display: grid; gap: 8px; padding: 10px; background: #f7f7f7; border: 1px solid #ededed; border-radius: 8px; }
.admin-toggle-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 36px; color: #333; font-size: var(--ui-label); }
.admin-save-status { min-height: 18px; margin: 0; color: #777; font-size: var(--ui-body); }
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 14px; }
.admin-stats span { display: grid; gap: 4px; min-height: 68px; padding: 12px; color: #777; background: #f6f6f6; border: 1px solid #ededed; border-radius: 8px; font-size: var(--ui-body); }
.admin-stats strong { color: #222; font-size: 22px; line-height: 1; }
.admin-store-tools { display: grid; grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(98px, 132px)); gap: 8px; margin: 0 0 12px; }
.admin-store-tools input, .admin-store-tools select { width: 100%; height: 34px; min-width: 0; padding: 0 9px; color: #333; background: #f9f9f9; border: 1px solid #e2e2e2; border-radius: 6px; outline: 0; font-size: var(--ui-body); }
.admin-store-tools button { min-height: 34px; padding: 0 13px; color: #fff; background: #202733; border-radius: 999px; font-size: var(--ui-button); box-shadow: 0 7px 16px rgba(22,30,44,.12); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.admin-store-tools button:hover { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(22,30,44,.16); }
.admin-review-list { display: grid; gap: 10px; margin-top: 14px; }
.review-item { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; background: #f7f7f7; border: 1px solid #ececec; border-left: 3px solid #d6d6d6; border-radius: 8px; }
.review-item.pending { border-left-color: #f0a500; }
.review-item.approved { border-left-color: #2b9f68; }
.review-item.rejected { border-left-color: #c84b4b; opacity: .82; }
.review-main { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; min-width: 0; }
.review-logo { position: static; display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; color: #fff; background: #116fe5; border-radius: 50%; font-weight: 700; }
.review-logo img { display: block; width: 72%; height: 72%; object-fit: contain; }
.review-item strong { display: block; color: #222; font-size: var(--ui-subtitle); }
.review-item span { display: block; margin-top: 4px; color: #666; font-size: var(--ui-body); line-height: 1.45; }
.review-item .review-logo { margin-top: 0; }
.review-item small { display: block; margin-top: 6px; color: #999; font-size: var(--ui-meta); word-break: break-all; }
.review-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.review-actions button { min-width: 0; height: 30px; padding: 0 8px; overflow: hidden; font-size: var(--ui-button); white-space: nowrap; text-overflow: ellipsis; }
.review-actions button:disabled { color: #aaa; background: #ececec; cursor: default; }
.review-actions .danger { color: #fff; background: #d74343; }
.admin-store-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 34px; margin-top: 12px; color: #777; font-size: var(--ui-body); }
.admin-store-pager span { margin-right: auto; }
.admin-store-pager button { min-width: 62px; height: 30px; padding: 0 10px; color: #333; background: #f2f2f2; border: 1px solid #e2e2e2; border-radius: 6px; }
.admin-store-pager button:disabled { color: #aaa; cursor: default; opacity: .6; }
.admin-empty { padding: 14px; color: #888; background: #f7f7f7; border-radius: 8px; font-size: var(--ui-body); }
.admin-ticket-list { display: grid; gap: 11px; margin-top: 14px; }
.admin-ticket-item { display: grid; gap: 12px; padding: 13px; background: linear-gradient(135deg,#fbfcfd,#f5f7fa); border: 1px solid #e7ebf0; border-left: 3px solid #d8dde5; border-radius: 12px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.admin-ticket-item:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(20,24,32,.07); }
.admin-ticket-item.open { border-left-color: #f0a500; }
.admin-ticket-item.processing { border-left-color: #2f6fed; }
.admin-ticket-item.closed { border-left-color: #2faf5c; opacity: .86; }
.admin-ticket-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; min-width: 0; }
.admin-ticket-main strong { display: inline-flex; width: max-content; max-width: 100%; min-height: 24px; align-items: center; padding: 3px 9px; color: #1b2a40; background: #fff; border: 1px solid rgba(20,24,32,.07); border-radius: 999px; font-size: var(--ui-body); box-shadow: 0 4px 10px rgba(20,24,32,.04); }
.admin-ticket-main span { display: block; margin-top: 8px; color: #303844; font-size: var(--ui-label); line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.admin-ticket-main .ticket-summary span { margin: 0; font-size: var(--ui-body); line-height: 1.45; white-space: nowrap; }
.admin-ticket-main small { display: block; margin-top: 8px; color: #7d8794; font-size: var(--ui-meta); line-height: 1.5; word-break: break-all; }
.admin-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.admin-ticket-actions button { min-height: 32px; padding: 0 12px; color: #26303d; background: #fff; border: 1px solid rgba(20,24,32,.08); border-radius: 999px; font-size: var(--ui-button); box-shadow: 0 4px 12px rgba(20,24,32,.05); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.admin-ticket-actions button:hover { background: #f8fafc; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,24,32,.08); }
.admin-ticket-actions .danger { color: #b42318; background: #fff8f7; border-color: rgba(180,35,24,.16); }
.admin-ticket-reply, .ticket-reply-form { display: grid; gap: 9px; margin-top: 10px; padding: 10px; background: rgba(255,255,255,.72); border: 1px solid #e6ebf2; border-radius: 12px; }
.admin-ticket-reply textarea, .ticket-reply-form textarea { width: 100%; min-width: 0; padding: 10px; color: #222; background: #fff; border: 1px solid #dde5ee; border-radius: 10px; outline: 0; resize: vertical; line-height: 1.55; }
.admin-ticket-reply div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.admin-ticket-reply select { height: 36px; min-width: 0; padding: 0 10px; color: #26303d; background: #fff; border: 1px solid #dde5ee; border-radius: 999px; outline: 0; }
.admin-ticket-reply button, .ticket-reply-form button { justify-self: start; min-height: 36px; padding: 0 15px; color: #fff; background: #202733; border-radius: 999px; box-shadow: 0 8px 16px rgba(22,30,44,.12); }
.admin-ticket-reply button { justify-self: stretch; }

.section-card, .profile-card { margin: 16px 0 30px; padding: 20px; background: #fff; border: 1px solid rgba(20,24,32,.06); border-radius: 14px; box-shadow: 0 1px 2px rgba(20,24,32,.04), 0 10px 28px rgba(20,24,32,.06); }
.section-card h2 { display: flex; justify-content: space-between; margin: 0 0 18px; font-size: var(--ui-title-lg); line-height: 1.25; }
.section-card p, .sync-card span, .list-row small { color: #888; font-size: var(--ui-body); }
.sync-card { display: grid; gap: 14px; }
.sync-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.sync-card > div, .sync-card-head > div { min-width: 0; }
.sync-card strong { display: block; margin-bottom: 8px; font-size: var(--ui-title); }
.sync-card span { display: block; line-height: 1.5; }
.sync-card-controls { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.sync-advanced-toggle { min-height: 30px; padding: 0 12px; color: #344054; background: #f6f8fb; border: 1px solid rgba(20,24,32,.08); border-radius: 999px; font-size: var(--ui-button); box-shadow: 0 2px 8px rgba(20,24,32,.05); transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.sync-advanced-toggle:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 7px 16px rgba(20,24,32,.08); }
.sync-advanced-toggle[hidden] { display: none; }
.manual-sync-panel { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(20,24,32,.08); }
.manual-sync-panel[hidden] { display: none; }
.manual-sync-panel p { margin: 0; color: #767d88; font-size: var(--ui-body); line-height: 1.55; }
.sync-choice-summary.compact { grid-template-columns: 1fr; margin: 0; }
.sync-choice-summary.compact article { min-height: 64px; padding: 12px; border-radius: 10px; }
.manual-sync-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.manual-sync-actions button { min-height: 38px; padding: 0 10px; color: #26303d; background: #f7f9fb; border: 1px solid #e7eaee; border-radius: 10px; font-size: var(--ui-button); transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.manual-sync-actions button:hover { background: #fff; border-color: #ccd6e2; transform: translateY(-1px); }
.manual-sync-actions button[data-manual-sync="merge"] { grid-column: 1 / -1; color: #1e6b42; background: rgba(47,175,92,.09); border-color: rgba(47,175,92,.18); }
.profile-merge-panel { margin-top: 0; }
.profile-card { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; min-height: 116px; font-size: 18px; }
.profile-card strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-main { display: grid; gap: 8px; min-width: 0; }
.profile-uid { display: inline-flex; width: max-content; max-width: 100%; min-height: 24px; align-items: center; padding: 3px 10px; overflow: hidden; color: #24364f; background: linear-gradient(135deg,#f9fbff,#dceaff); border: 1px solid rgba(64,111,190,.18); border-radius: 999px; font-size: var(--ui-body); font-weight: 900; letter-spacing: .5px; text-shadow: 0 1px 0 #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 8px 18px rgba(55,96,160,.16), 0 1px 0 rgba(26,42,70,.18); text-overflow: ellipsis; white-space: nowrap; }
.profile-card .account-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 14px; }
.profile-card.signed-in .account-actions { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin: 14px 0 0; }
.profile-card .account-actions button { height: 34px; padding: 0 15px; color: #23272f; background: #fff; border: 1px solid rgba(20,24,32,.1); border-radius: 999px; box-shadow: 0 2px 8px rgba(20,24,32,.07); transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.profile-card .account-actions button:hover { background: #f7f8fa; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,24,32,.1); }
.profile-card .account-actions button.danger { color: #b42318; }
.avatar { display: grid; width: 52px; height: 52px; place-items: center; color: #fff; background: linear-gradient(135deg,#34b45b,#c6e23b); border-radius: 50%; font-weight: 800; }
.qr { position: absolute; top: 8px; right: 8px; background: transparent; }
.sync-card footer { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eee; }
.sync-card footer button { background: #fff; }
.list-row { position: relative; display: block; padding: 14px 0; color: #333; border-bottom: 1px solid #eee; text-decoration: none; }
.list-row span { float: right; font-size: 28px; }
.list-row small { display: block; margin-top: 8px; }
.ticket-card { display: grid; gap: 15px; background: linear-gradient(145deg,#ffffff 0%,#f8fbff 100%); }
.ticket-card h2 { margin-bottom: 0; }
.ticket-form { display: grid; gap: 12px; }
.ticket-form label { display: grid; gap: 7px; color: #333b46; font-size: var(--ui-label); font-weight: 700; }
.ticket-form select, .ticket-form textarea { width: 100%; min-width: 0; color: #222; background: #fff; border: 1px solid #dfe6ef; border-radius: 10px; outline: 0; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.ticket-form select { height: 40px; padding: 0 11px; }
.ticket-form textarea { min-height: 118px; padding: 12px; resize: vertical; line-height: 1.6; white-space: pre-wrap; }
.ticket-form select:focus, .ticket-form textarea:focus { border-color: #6b9dff; box-shadow: 0 0 0 3px rgba(75,132,255,.12); }
.ticket-upload { padding: 12px; background: rgba(255,255,255,.78); border: 1px dashed #cbd6e4; border-radius: 12px; }
.ticket-upload input { width: 100%; min-width: 0; color: #4a5565; font-size: var(--ui-body); }
.ticket-upload span { color: #778292; font-size: var(--ui-body); line-height: 1.5; font-weight: 400; }
.ticket-form button[type="submit"] { justify-self: start; min-height: 40px; padding: 0 18px; color: #fff; background: linear-gradient(135deg,#202733,#3c4656); border-radius: 999px; box-shadow: 0 10px 20px rgba(22,30,44,.14); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.ticket-form button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(22,30,44,.18); }
.ticket-form button[type="submit"]:disabled { opacity: .58; cursor: default; transform: none; }
.ticket-form p { min-height: 18px; margin: 0; color: #6e7785; line-height: 1.5; }
.ticket-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.ticket-history-head strong { color: #1f2937; font-size: var(--ui-subtitle); }
.ticket-history-head span { color: #7b8490; font-size: var(--ui-body); text-align: right; }
.ticket-list { display: grid; gap: 10px; }
.ticket-empty { padding: 15px; color: #858e9a; background: rgba(255,255,255,.74); border: 1px solid rgba(20,24,32,.06); border-radius: 12px; font-size: var(--ui-body); line-height: 1.55; }
.ticket-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; background: rgba(255,255,255,.86); border: 1px solid #e7ebf0; border-left: 3px solid #d8dde5; border-radius: 12px; box-shadow: 0 6px 16px rgba(20,24,32,.04); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.ticket-item:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(20,24,32,.07); }
.ticket-item.open { border-left-color: #f0a500; }
.ticket-item.processing { border-left-color: #2f6fed; }
.ticket-item.closed { border-left-color: #2faf5c; opacity: .86; }
.ticket-item-main { min-width: 0; }
.ticket-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ticket-item-main strong { display: inline-flex; min-height: 23px; align-items: center; padding: 3px 9px; color: #21344f; background: #f4f8ff; border: 1px solid rgba(75,132,255,.12); border-radius: 999px; font-size: 12px; }
.ticket-title-row em { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 8px; color: #506075; background: #eef3fa; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 800; }
.ticket-item-main span { display: block; margin-top: 8px; color: #303844; font-size: 13px; line-height: 1.58; word-break: break-word; white-space: pre-wrap; }
.ticket-item-main small { display: block; margin-top: 8px; color: #7d8794; font-size: 11px; }
.ticket-summary { display: grid; gap: 5px; margin-top: 9px; padding: 9px 11px; color: #303844; background: rgba(246,248,251,.88); border: 1px solid #e7ecf2; border-radius: 10px; font-size: 12px; line-height: 1.45; }
.ticket-summary span { display: block; margin: 0; overflow: hidden; color: inherit; font-size: inherit; line-height: inherit; text-overflow: ellipsis; white-space: nowrap; }
.ticket-summary i { display: block; margin: -3px 0; color: #9aa3ae; font-style: normal; line-height: 1; text-align: center; }
.ticket-expand-toggle { justify-self: start; min-height: 28px; margin-top: 7px; padding: 0 12px; color: #26303d; background: #fff; border: 1px solid rgba(20,24,32,.08); border-radius: 999px; font-size: 12px; box-shadow: 0 4px 10px rgba(20,24,32,.04); }
.ticket-full-thread[hidden] { display: none; }
.ticket-thread { display: grid; gap: 8px; margin-top: 10px; }
.ticket-message { max-width: 94%; padding: 10px 12px; background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 4px 12px rgba(20,24,32,.04); }
.ticket-message.admin { justify-self: end; background: linear-gradient(135deg,#f3f7ff,#ffffff); border-color: rgba(47,111,237,.16); }
.ticket-message.user { justify-self: start; }
.ticket-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #7d8794; font-size: 11px; }
.ticket-message-meta b { color: #27354a; font-size: 12px; }
.ticket-message-meta span { display: inline; margin-top: 0; color: #7d8794; font-size: 11px; line-height: normal; white-space: nowrap; }
.ticket-message p { margin: 0; color: #303844; font-size: 13px; line-height: 1.58; white-space: pre-wrap; word-break: break-word; }
.ticket-message-image { display: block; width: 72px; height: 72px; margin-top: 8px; overflow: hidden; border-radius: 10px; border: 1px solid #e2e8f0; }
.ticket-message-image img { width: 100%; height: 100%; object-fit: cover; }
.ticket-closed-note { margin-top: 10px; padding: 9px 11px; color: #758195; background: #f2f5f8; border: 1px solid #e4eaf1; border-radius: 10px; font-size: 12px; }
.ticket-thumb { display: block; width: 54px; height: 54px; overflow: hidden; background: #f3f6fa; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.85); }
.ticket-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ticket-pager { display: flex; min-height: 32px; align-items: center; justify-content: flex-end; gap: 8px; color: #7b8490; font-size: 12px; }
.ticket-pager span { margin-right: auto; }
.ticket-pager button { min-width: 62px; height: 30px; padding: 0 10px; color: #26303d; background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; box-shadow: 0 4px 10px rgba(20,24,32,.04); }
.ticket-pager button:disabled { color: #a8b0bb; background: #f3f5f7; cursor: default; box-shadow: none; }
.robot-art, .wallpaper-preview { height: 180px; border-radius: 4px; background: linear-gradient(160deg,#e7b9ad,#f7e0d1 45%,#95aec1 45.5%,#d8e0e4); }
.wallpaper-preview { position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.wallpaper-preview::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.1); opacity: 0; transition: opacity .18s ease; }
.wallpaper-preview:hover::after { opacity: 1; }
.wallpaper-change { min-width: 86px; height: 40px; padding: 0 18px; color: #fff; background: rgba(48,48,48,.72); border-radius: 6px; opacity: 0; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease, background .16s ease; backdrop-filter: blur(8px); }
.wallpaper-preview:hover .wallpaper-change { opacity: 1; transform: translateY(0); }
.wallpaper-change:hover { background: rgba(35,35,35,.9); }
.wallpaper-download { position: absolute; top: 10px; right: 10px; display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: rgba(0,0,0,.28); border-radius: 50%; font-size: 22px; line-height: 1; backdrop-filter: blur(8px); transition: background .16s ease, transform .16s ease; }
.wallpaper-download:hover { background: rgba(0,0,0,.48); transform: translateY(-1px); }
.robot-art { height: 150px; background: linear-gradient(135deg,#f1d1d2,#b88d8d); }
.reset-btn { display: block; width: 122px; height: 42px; margin: 16px auto 0; color: #444; background: #eee; border-radius: 6px; }
.social div, .links { display: flex; gap: 24px; flex-wrap: wrap; }
.social a { display: grid; width: 42px; height: 42px; place-items: center; color: white; background: #e94444; border-radius: 6px; text-decoration: none; }
.account-security-form { display: grid; gap: 12px; }
.account-security-form label { display: grid; gap: 7px; color: #333; font-size: var(--ui-label); }
.account-identity-grid { display: grid; grid-template-columns: minmax(108px, .82fr) minmax(0, 1fr); gap: 10px; min-width: 0; }
.account-security-form input, .share-key-card input, .share-key-card select { width: 100%; height: 38px; min-width: 0; padding: 0 11px; color: #222; background: #fff; border: 1px solid #e1e6ee; border-radius: 8px; outline: 0; }
.account-security-form .readonly-field input { color: #39465a; background: linear-gradient(135deg,#f8fbff,#edf4ff); border-color: rgba(68,112,190,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.95); cursor: default; }
.account-security-form .uid-field input { color: #253a5c; font-weight: 900; letter-spacing: .4px; text-shadow: 0 1px 0 rgba(255,255,255,.9); }
.account-security-form input:disabled { color: #9aa2ad; background: #f4f6f9; border-color: #e4e9f0; cursor: not-allowed; opacity: .92; }
.share-key-card input, .share-key-card select { font-size: var(--ui-body); }
.share-key-card select { min-width: 94px; padding: 0 7px; }
.share-key-card input::placeholder { color: #9aa2ae; font-size: var(--ui-body); }
.account-security-form input:focus, .share-key-card input:focus, .share-key-card select:focus { border-color: #6b9dff; box-shadow: 0 0 0 3px rgba(75,132,255,.12); }
.account-security-form button, .share-key-generate button, .share-key-import button { min-height: 38px; padding: 0 14px; color: #fff; background: #202733; border-radius: 999px; box-shadow: 0 8px 16px rgba(22,30,44,.12); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.share-key-generate button, .share-key-import button { padding: 0 12px; font-size: var(--ui-button); line-height: 1.1; white-space: nowrap; }
.account-security-form button:hover, .share-key-generate button:hover, .share-key-import button:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(22,30,44,.16); }
.account-security-form p, .share-key-card p, .share-key-card #shareKeyStatus { margin: 0; color: #767d88; font-size: var(--ui-body); line-height: 1.55; }
.share-key-card { display: grid; gap: 13px; }
.share-key-generate, .share-key-import { display: grid; grid-template-columns: minmax(94px, 1fr) auto auto; gap: 9px; align-items: center; }
.share-key-import { grid-template-columns: minmax(0, 1fr) auto; }
.share-key-output { min-height: 46px; padding: 12px; color: #1b2d46; background: linear-gradient(135deg,#f8fbff,#eef5ff); border: 1px solid rgba(57,111,200,.14); border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.5; word-break: break-all; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.share-key-generate button[data-action="disable-share-key"] { color: #b42318; background: #fff; border: 1px solid rgba(180,35,24,.14); box-shadow: 0 6px 14px rgba(180,35,24,.08); }

.mode-toggle { position: sticky; top: -14px; z-index: 2; display: flex; justify-content: center; gap: 0; padding: 13px 0; background: #f3f3f3; }
.mode-toggle button { width: 94px; height: 31px; color: #333; background: #e9e9e9; border-radius: 7px; }
.mode-toggle .active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.settings-tier-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 18px; padding: 6px; background: #e9edf2; border: 1px solid rgba(20,24,32,.06); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.68); }
.settings-tier-switch button { min-height: 34px; color: #667085; background: transparent; border-radius: 9px; font-size: var(--ui-button); font-weight: 800; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.settings-tier-switch button.active { color: #1f2937; background: #fff; box-shadow: 0 5px 14px rgba(20,24,32,.08), inset 0 1px 0 rgba(255,255,255,.9); }
.settings-tier-switch button:not(.active):hover { color: #344054; background: rgba(255,255,255,.5); transform: translateY(-1px); }
.settings-page > [data-settings-tier="advanced"] { display: none; }
.settings-page.show-advanced > [data-settings-tier="basic"] { display: none; }
.settings-page.show-advanced > [data-settings-tier="advanced"] { display: block; animation: settingsCardIn .2s ease both; }
.settings-page:not(.show-advanced) > [data-settings-tier="basic"] { animation: settingsCardIn .2s ease both; }
.settings-page label { display: grid; grid-template-columns: 1fr 256px 46px; gap: 12px; align-items: center; min-height: 46px; color: #333; font-size: var(--ui-label); }
.settings-page label:has(input[type="range"]) { grid-template-columns: 1fr 46px; grid-template-areas: "text value" "range range"; gap: 8px 12px; align-items: center; padding: 8px 0; }
.settings-page label:has(input[type="range"]) input[type="range"] { grid-area: range; }
.settings-page label:has(input[type="range"]) b { grid-area: value; text-align: right; }
.settings-page input[type="range"] { width: 100%; accent-color: #333; }
.setting-line { grid-template-columns: 1fr auto !important; }
.weather-settings { background: linear-gradient(145deg,#ffffff 0%,#f6fbff 100%); }
.weather-city-line { grid-template-columns: 1fr 150px 68px !important; }
.weather-city-line input { width: 100%; height: 36px; padding: 0 12px; color: #222; background: #fff; border: 1px solid #dce5ef; border-radius: 6px; outline: 0; }
.weather-city-line input:focus { border-color: #6aa9ff; box-shadow: 0 0 0 3px rgba(84,153,255,.14); }
.weather-city-line button { height: 36px; color: #fff; background: #333; border-radius: 6px; font-weight: 700; }
.weather-location-status, .weather-settings p { margin: 6px 0 0; color: #6c7280; font-size: var(--ui-body); line-height: 1.5; }
.switch { display: inline-grid; place-items: center; cursor: pointer; }
.switch input { display: none; }
.switch span, .switch i { position: relative; display: block; width: 39px; height: 22px; border-radius: 999px; background: #cfd2d6; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); transition: background .18s ease, box-shadow .18s ease; }
.switch span::after, .switch i::after { content: ""; position: absolute; top: 3px; left: 3px; display: block; width: 16px; height: 16px; margin: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .18s ease; }
.switch input:checked + span, .switch input:checked + i { background: #2faf5c; box-shadow: inset 0 0 0 1px rgba(19,121,61,.12), 0 0 0 3px rgba(47,175,92,.1); }
.switch input:checked + span::after, .switch input:checked + i::after { transform: translateX(17px); box-shadow: 0 2px 6px rgba(0,0,0,.24); }
.layout-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px 20px; }
.layout-options button { height: 54px; color: #888; background: linear-gradient(90deg,#eee 0 24%,#f7f7f7 24% 50%,#eee 50% 74%,#f7f7f7 74%); border-radius: 7px; border: 1px solid transparent; }
.layout-options .active { color: #333; border-color: #333; background: #fafafa; }
.custom-layout { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 16px; }
.custom-layout label { display: block; min-height: 0; color: #333; font-weight: 700; }
.custom-layout input { display: block; width: 100%; height: 38px; margin-top: 8px; padding: 0 10px; border: 1px solid #ddd; border-radius: 6px; outline: 0; }
.color-row { display: flex; gap: 20px; }
.color-row button { width: 18px; height: 18px; border-radius: 50%; }
.color-row button:nth-child(1){background:#ddd}.color-row button:nth-child(2){background:#e95b46}.color-row button:nth-child(3){background:#f4a12d}.color-row button:nth-child(4){background:#f5e15a}.color-row button:nth-child(5){background:#70b05b}.color-row button:nth-child(6){background:#55bcd2}.color-row button:nth-child(7){background:#5ba0e8}.color-row button:nth-child(8){background:#6746b6}

.context-menu { position: fixed; z-index: 30; width: 188px; padding: 7px; color: #222; background: rgba(255,255,255,.98); border: 1px solid rgba(0,0,0,.06); border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.22); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px) scale(.96); transform-origin: top left; transition: opacity .16s ease, transform .16s cubic-bezier(.2,.8,.2,1), visibility 0s linear .16s; backdrop-filter: blur(12px); }
.context-menu.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); transition-delay: 0s; }
.context-menu button { display: flex; width: 100%; height: 36px; align-items: center; justify-content: space-between; padding: 0 12px; color: #222; background: transparent; border-radius: 6px; text-align: left; }
.context-menu button:hover { background: #f3f4f6; }
.context-menu button.danger { color: #d94141; }
.context-menu span { color: inherit; }
.context-menu kbd { color: #a9a9a9; font-size: 13px; font-family: inherit; }

.wallpaper-modal, .wallpaper-source-modal { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.58); backdrop-filter: blur(2px); animation: modalFade .18s ease both; }
.wallpaper-source-modal { z-index: 62; background: rgba(0,0,0,.46); }
.wallpaper-modal[hidden], .wallpaper-source-modal[hidden] { display: none; }
.wallpaper-dialog, .wallpaper-source-dialog { position: relative; width: min(700px, calc(100vw - 36px)); max-height: min(520px, calc(100vh - 48px)); overflow: hidden; color: #222; background: #fff; border-radius: 8px; box-shadow: 0 26px 70px rgba(0,0,0,.32); animation: modalRise .22s cubic-bezier(.22,1,.36,1) both; }
.wallpaper-dialog { display: flex; flex-direction: column; height: min(520px, calc(100vh - 48px)); min-height: min(520px, calc(100vh - 48px)); }
.wallpaper-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 28px; height: 28px; color: #b5b5b5; background: transparent; font-size: 28px; line-height: 1; transition: color .16s ease, transform .16s ease; }
.wallpaper-close:hover { color: #555; transform: rotate(90deg); }
.wallpaper-dialog-head { display: flex; gap: 28px; height: 72px; align-items: flex-end; padding: 0 30px 0; border-bottom: 1px solid #e8e8e8; }
.wallpaper-dialog-head button { position: relative; height: 42px; color: #a0a0a0; background: transparent; font-size: 18px; font-weight: 800; }
.wallpaper-dialog-head button.active { color: #222; }
.wallpaper-dialog-head button.active::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 26px; height: 3px; background: #333; transform: translateX(-50%); }
.wallpaper-single-view, .wallpaper-source-view { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.wallpaper-single-view { display: flex; flex-direction: column; }
.wallpaper-subtabs { flex: 0 0 auto; display: flex; gap: 8px; padding: 18px 30px 10px; }
.wallpaper-subtabs button { height: 28px; padding: 0 10px; color: #333; background: #f3f3f3; border-radius: 4px; font-size: 13px; transition: background .16s ease, color .16s ease; }
.wallpaper-subtabs button.active { color: #fff; background: #5f5f5f; }
.wallpaper-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 30px 24px; scrollbar-color: #9c9c9c #eeeeee; scrollbar-width: thin; }
.wallpaper-content::-webkit-scrollbar, .wallpaper-source-view::-webkit-scrollbar, .wallpaper-source-detail-grid::-webkit-scrollbar { width: 10px; }
.wallpaper-content::-webkit-scrollbar-track, .wallpaper-source-view::-webkit-scrollbar-track, .wallpaper-source-detail-grid::-webkit-scrollbar-track { background: #eeeeee; border-radius: 999px; }
.wallpaper-content::-webkit-scrollbar-thumb, .wallpaper-source-view::-webkit-scrollbar-thumb, .wallpaper-source-detail-grid::-webkit-scrollbar-thumb { background: #9c9c9c; border: 2px solid #eeeeee; border-radius: 999px; }
.wallpaper-cloud-layout { display: grid; grid-template-columns: 188px 1fr; gap: 28px; min-height: 100%; }
.wallpaper-filter { display: grid; align-content: start; gap: 10px; color: #333; font-size: 13px; }
.wallpaper-filter strong { margin-top: 4px; font-size: 13px; }
.wallpaper-color-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.wallpaper-color-filter button { width: 18px; height: 18px; background: var(--swatch); border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease; }
.wallpaper-color-filter button.active { transform: translateY(-1px) scale(1.08); box-shadow: 0 0 0 2px #333; }
.wallpaper-tag-filter { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.wallpaper-tag-filter button { height: 30px; padding: 0 12px; color: #333; background: #f4f4f4; border-radius: 5px; font-size: 13px; }
.wallpaper-tag-filter button.active { color: #fff; background: #5f5f5f; }
.wallpaper-results { min-width: 0; }
.wallpaper-results-head { display: flex; justify-content: space-between; align-items: center; height: 28px; margin-bottom: 8px; }
.wallpaper-results-head button { color: #333; background: transparent; font-size: 13px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.wallpaper-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 12px; }
.wallpaper-thumb { min-width: 0; }
.wallpaper-thumb-main { display: block; width: 100%; height: 116px; overflow: hidden; background: #eee; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); transition: transform .18s ease, box-shadow .18s ease; }
.wallpaper-thumb-main span { display: block; width: 100%; height: 100%; background-size: cover !important; background-position: center !important; transition: transform .28s cubic-bezier(.22,1,.36,1); }
.wallpaper-thumb:hover .wallpaper-thumb-main { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.wallpaper-thumb:hover .wallpaper-thumb-main span { transform: scale(1.04); }
.wallpaper-thumb.selected .wallpaper-thumb-main { box-shadow: 0 0 0 3px #333, 0 10px 24px rgba(0,0,0,.14); }
.wallpaper-thumb footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding-top: 7px; }
.wallpaper-thumb strong { min-width: 0; overflow: hidden; color: #333; font-size: 12px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.wallpaper-thumb footer button { width: 28px; height: 26px; color: #f1a200; background: transparent; font-size: 18px; line-height: 1; }
.wallpaper-local { display: grid; gap: 18px; padding-top: 8px; }
.wallpaper-upload-card { display: grid !important; grid-template-columns: 46px 1fr !important; grid-template-areas: "icon title" "icon text" !important; width: 100%; min-height: 92px !important; padding: 18px; color: #444; background: #fafafa; border: 1px dashed #cfcfcf; border-radius: 6px; cursor: pointer; }
.wallpaper-upload-card input { display: none; }
.wallpaper-upload-card span { grid-area: icon; display: grid; width: 38px; height: 38px; place-items: center; color: #777; background: #fff; border-radius: 6px; font-size: 24px; }
.wallpaper-upload-card strong { grid-area: title; align-self: end; font-size: 15px; }
.wallpaper-upload-card small { grid-area: text; color: #888; font-size: 12px; }
.wallpaper-color-panel { display: grid; gap: 24px; padding-top: 8px; }
.wallpaper-color-panel strong { display: block; margin-bottom: 14px; color: #333; font-size: 13px; }
.wallpaper-custom-color { display: grid !important; grid-template-columns: 1fr !important; place-items: center; width: 204px; height: 116px; min-height: 116px !important; color: #333; background: #fff; border: 1px dashed #d6d6d6; border-radius: 4px; cursor: pointer; }
.wallpaper-custom-color input { width: 42px; height: 34px; padding: 0; border: 0; background: transparent; }
.wallpaper-custom-color span { font-weight: 700; }
.wallpaper-color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
.wallpaper-color-grid button { height: 114px; background: var(--solid); border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); transition: transform .16s ease, box-shadow .16s ease; }
.wallpaper-color-grid button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.wallpaper-empty { display: grid; min-height: 300px; place-items: center; align-content: center; gap: 8px; color: #999; text-align: center; }
.wallpaper-empty span { color: #444; font-size: 54px; line-height: 1; }
.wallpaper-empty strong { font-size: 13px; font-weight: 400; }
.wallpaper-empty small { font-size: 12px; }
.wallpaper-source-view { overflow: auto; padding: 38px 30px 24px; scrollbar-width: thin; }
.wallpaper-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.wallpaper-source-helper { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 12px 14px; color: #333; background: #f7f7f7; border: 1px solid #ececec; border-radius: 6px; }
.wallpaper-source-helper strong { display: block; margin-bottom: 4px; font-size: 14px; }
.wallpaper-source-helper span { display: block; color: #777; font-size: 12px; line-height: 1.35; }
.wallpaper-source-helper button { flex: 0 0 auto; height: 32px; padding: 0 12px; color: #fff; background: #4f4f4f; border-radius: 6px; font-size: 13px; }
.wallpaper-source-card { display: grid; min-width: 0; height: 142px; align-content: start; overflow: hidden; color: #222; background: #fff; border: 1px solid #f0f0f0; border-radius: 4px; text-align: left; box-shadow: 0 1px 0 rgba(0,0,0,.03); transition: transform .16s ease, box-shadow .16s ease; }
.wallpaper-source-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.12); }
.wallpaper-source-card i { display: grid; height: 74px; place-items: center; color: #fff; font-size: 34px; font-style: normal; font-weight: 900; }
.wallpaper-source-card strong, .wallpaper-source-card small { min-width: 0; margin: 0 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wallpaper-source-card strong { margin-top: 12px; font-size: 14px; }
.wallpaper-source-card small { margin-top: 6px; font-size: 12px; }
.wallpaper-source-card.add-source { place-items: center; align-content: center; gap: 10px; color: #888; border-style: dashed; }
.wallpaper-source-card.add-source span { font-size: 42px; line-height: 1; opacity: .45; }
.wallpaper-source-dialog { display: flex; flex-direction: column; width: min(652px, calc(100vw - 48px)); max-height: min(480px, calc(100vh - 56px)); }
.wallpaper-source-dialog header { padding: 20px 30px 16px; border-bottom: 1px solid #ededed; }
.wallpaper-source-dialog h2 { display: inline-block; margin: 0 8px 4px 0; font-size: 20px; }
.wallpaper-source-dialog p { margin: 0; color: #555; font-size: 12px; }
.wallpaper-source-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; min-height: 0; overflow: auto; padding: 16px 30px 22px; scrollbar-width: thin; }
.wallpaper-source-detail-grid .wallpaper-thumb-main { height: 106px; }
.wallpaper-source-footer { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 16px 30px; border-top: 1px solid #efefef; background: #fff; }
.wallpaper-source-footer label { color: #333; font-size: 14px; }
.wallpaper-source-footer select { height: 34px; border: 0; color: #333; background: transparent; outline: 0; }
.wallpaper-source-footer button { width: 80px; height: 40px; color: #fff; background: #606060; border-radius: 6px; }

.edit-panel, .todo-panel { position: fixed; top: 0; right: 0; z-index: 24; width: 424px; height: 100%; padding: 28px 30px; overflow-y: auto; color: #333; background: #f4f4f4; transform: translateX(100%); transition: transform .22s ease; box-shadow: -2px 0 18px rgba(0,0,0,.12); }
.edit-panel.open, .todo-panel.open { transform: translateX(0); }
.edit-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.edit-head span { display: block; color: #777; font-size: 13px; margin-bottom: 4px; }
.edit-head strong { display: block; max-width: 300px; overflow: hidden; color: #222; font-size: 28px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.edit-close { width: 34px; height: 34px; color: #555; background: #fff; border-radius: 50%; font-size: 24px; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.edit-preview { display: grid; place-items: center; min-height: 142px; margin-bottom: 18px; background: linear-gradient(145deg, #171717, #303030); border-radius: 8px; }
.preview-tile { pointer-events: none; min-height: 96px; }
.form-field { display: block; margin-bottom: 14px; color: #333; font-weight: 700; }
.form-field input { display: block; width: 100%; height: 42px; margin-top: 8px; border: 0; border-bottom: 1px solid #e1e1e1; outline: 0; background: #fff; padding: 0 10px; color: #333; font-weight: 400; border-radius: 4px 4px 0 0; }
.edit-icon-choice { margin: 6px 0 14px; }
.edit-favicon-preview { grid-template-columns: 1fr; margin: -4px 0 12px; }
.icon-src-field[hidden] { display: none; }
.favicon-alert { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; min-height: 38px; margin: -2px 0 12px; padding: 8px 10px; color: #c82828; background: #fff5f5; border: 1px solid #ffd4d4; border-radius: 6px; font-size: 12px; line-height: 1.45; }
.favicon-alert[hidden] { display: none; }
.favicon-alert button { height: 30px; padding: 0 10px; color: #fff; background: #c82828; border-radius: 6px; }
.form-field input:disabled { color: #aaa; background: #f3f3f3; border-bottom-color: #e8e8e8; cursor: not-allowed; }
.color-edit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 12px; }
.color-edit label { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 12px; background: #fff; border-radius: 6px; color: #333; font-weight: 700; }
.color-edit input { width: 34px; height: 28px; padding: 0; border: 0; background: transparent; }
.edit-swatches { display: flex; gap: 10px; margin: 10px 0 18px; }
.edit-swatches button { width: 30px; height: 30px; background: var(--swatch); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.12); }
.widget-edit-panel { margin: 16px 0 18px; padding: 14px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; }
.widget-edit-panel[hidden], [data-icon-only][hidden] { display: none; }
.widget-edit-panel h3 { margin: 0 0 12px; color: #222; font-size: 16px; }
.widget-edit-panel select { display: block; width: 100%; height: 40px; margin-top: 8px; padding: 0 10px; color: #333; background: #f8f8f8; border: 1px solid #ddd; border-radius: 6px; outline: 0; }
.widget-type-settings { margin: 4px 0 14px; padding: 12px; background: #f7f7f7; border: 1px solid #ececec; border-radius: 8px; }
.widget-type-settings[hidden], .widget-type-settings .form-field[hidden] { display: none; }
.widget-type-settings .form-field { margin-bottom: 12px; }
.widget-type-settings .form-field:last-child { margin-bottom: 0; }
.widget-help { margin: -2px 0 0; color: #777; font-size: 12px; line-height: 1.45; }
.widget-align-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 14px; }
.widget-align-choice label { display: flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; color: #333; background: #f6f6f6; border: 1px solid #e5e5e5; border-radius: 6px; font-size: 13px; }
.widget-align-choice input { width: auto; height: auto; margin: 0; accent-color: #333; }
.widget-size-grid { display: grid; gap: 10px; }
.widget-size-grid .range-field, .widget-edit-panel > .range-field { display: block; min-height: auto; }
.widget-size-grid .range-field input, .widget-edit-panel > .range-field input { display: block; width: 100%; margin-top: 8px; }
.widget-size-grid .range-field b, .widget-edit-panel > .range-field b { float: right; margin-top: -20px; color: #666; font-weight: 400; }
.widget-cell-summary { margin: 10px 0 0; padding: 9px 10px; color: #555; background: #f5f5f5; border-radius: 6px; font-size: 12px; line-height: 1.4; }
.range-field { display: grid; grid-template-columns: 76px 1fr 50px; gap: 12px; align-items: center; min-height: 42px; color: #333; font-weight: 700; }
.range-field input { width: 100%; accent-color: #333; }
.range-field b { color: #666; font-weight: 400; text-align: right; }
.corner-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 8px; }
.corner-presets button { height: 36px; color: #333; background: #fff; border: 1px solid #dedede; border-radius: 6px; }
.radius-all-field { margin: 8px 0 10px; padding: 10px 0; border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; }
.corner-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.edit-actions { display: grid; gap: 12px; margin-top: 22px; }
.confirm, .cancel { display: block; width: 220px; height: 40px; margin: 0 auto; border-radius: 6px; }
.confirm { color: #fff; background: #565656; }
.confirm:hover { background: #3f3f3f; }
.cancel { color: #555; background: #e8e8e8; }
.cancel:hover { background: #dedede; }

.todo-panel { padding: 0; background: #fff; }
.todo-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 88px; padding: 0 30px; background: #fff; border-bottom: 1px solid #eee; }
.todo-head strong { display: block; color: #333; font-size: 26px; line-height: 1.2; }
.todo-head .edit-close { grid-column: 2; }
.todo-form { display: block; padding: 30px 30px 14px; background: #fff; }
.todo-form input { width: 100%; height: 52px; padding: 0 14px; color: #333; background: #fff; border: 1px solid #9f9f9f; border-radius: 6px; outline: 0; font-size: 14px; transition: border-color .16s ease, box-shadow .16s ease; }
.todo-form input:focus { border-color: #555; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.todo-clear-completed { display: block; width: calc(100% - 60px); height: 30px; margin: 0 30px 20px; color: #333; background: transparent; text-align: left; font-size: 14px; }
.todo-clear-completed:hover { color: #000; text-decoration: underline; }
.todo-list { display: grid; gap: 0; margin: 0 30px 28px; }
.todo-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 68px; padding: 20px 0; color: #444; background: transparent; border-bottom: 1px solid #eee; }
.todo-item.done { color: #aaa; }
.todo-item.done .todo-title { color: #aaa; text-decoration: line-through; }
.todo-check { position: relative; width: 16px; height: 16px; margin: 3px 0 0; appearance: none; border: 2px solid #30343b; border-radius: 5px; background: #fff; cursor: pointer; }
.todo-check:checked { border-color: #9da1a6; background: #fff; }
.todo-check:checked::after { content: ""; position: absolute; left: 3px; top: 0; width: 5px; height: 9px; border: solid #9da1a6; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.todo-title { color: #444; font-size: 14px; line-height: 1.65; word-break: break-word; }
.todo-empty { min-height: 68px; padding: 20px 0; color: #999; border-bottom: 1px solid #eee; font-size: 14px; }
.reminder-toast { position: fixed; right: 28px; bottom: 28px; z-index: 40; max-width: 320px; padding: 14px 16px; color: #222; background: #fff; border-radius: 8px; box-shadow: 0 14px 38px rgba(0,0,0,.24); }
.reminder-toast strong { display: block; margin-bottom: 4px; }

.folder-modal { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; padding: 24px; background: rgba(4,6,10,.28); animation: modalFade .18s ease both; backdrop-filter: blur(8px); }
.folder-modal[hidden] { display: none; }
.folder-modal.folder-collapsing { opacity: 0; transition: opacity .19s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.folder-modal.folder-item-drag-outside { pointer-events: none; }
.folder-modal.folder-item-drag-outside .folder-dialog { pointer-events: auto; }
.folder-dialog { position: relative; display: grid; gap: 18px; width: min(520px, calc(100vw - 36px)); max-height: min(680px, calc(100vh - 44px)); overflow: auto; padding: 22px; color: #222; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.62); border-radius: 18px; box-shadow: 0 26px 70px rgba(0,0,0,.28); animation: modalRise .22s cubic-bezier(.22,1,.36,1) both; }
.folder-close { position: absolute; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; place-items: center; color: #555; background: rgba(245,246,248,.88); border-radius: 999px; font-size: 22px; line-height: 1; transition: transform .16s ease, background .16s ease; }
.folder-close:hover { background: #fff; transform: scale(1.05); }
.folder-head { display: grid; grid-template-columns: minmax(0, 1fr) 128px 126px; gap: 12px; padding-right: 38px; }
.folder-head label { display: grid; gap: 7px; color: #777; font-size: 12px; }
.folder-head input, .folder-head select { width: 100%; height: 38px; min-width: 0; padding: 0 12px; color: #222; background: #f7f8fa; border: 1px solid rgba(20,24,32,.08); border-radius: 10px; outline: 0; }
.folder-head input:focus, .folder-head select:focus { border-color: rgba(47,111,237,.45); box-shadow: 0 0 0 3px rgba(47,111,237,.1); }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 18px 12px; padding: 12px 4px 4px; }
.folder-item { position: relative; display: grid; justify-items: center; gap: 8px; min-width: 0; padding: 10px 4px; color: #333; background: transparent; border-radius: 12px; transition: transform .24s cubic-bezier(.22,1,.36,1), background .18s ease, box-shadow .18s ease, opacity .18s ease; touch-action: none; }
.folder-item:hover { background: rgba(47,111,237,.08); transform: translateY(-2px); }
.folder-item .icon { width: 52px !important; height: 52px !important; }
.folder-item-label { max-width: 82px; overflow: hidden; color: #333; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.folder-item-controls { position: absolute; inset: 2px 2px auto 2px; z-index: 2; display: flex; justify-content: center; gap: 4px; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .16s ease, transform .16s ease; }
.folder-item:hover .folder-item-controls, .folder-item:focus-visible .folder-item-controls { opacity: .92; pointer-events: auto; transform: translateY(0); }
.folder-item-action { display: grid; width: 21px; height: 21px; place-items: center; color: rgba(32,38,48,.82); background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.72); border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.12); backdrop-filter: blur(10px); font-size: 11px; font-weight: 800; line-height: 1; transition: transform .16s cubic-bezier(.22,1,.36,1), background .16s ease, opacity .16s ease; }
.folder-item-action img { display: block; width: 58%; height: 58%; object-fit: contain; pointer-events: none; }
.folder-item-action:hover { background: #fff; transform: scale(1.1); }
.folder-item-action.danger { color: #d83a3a; }
.folder-item-dragging { opacity: .72; background: rgba(47,111,237,.12); box-shadow: 0 14px 30px rgba(30,64,122,.18); transform: scale(1.04); }
.folder-item-placeholder { opacity: .08; transform: scale(.78); filter: saturate(.72) blur(.2px); }
.folder-item-drop { background: rgba(47,111,237,.14); box-shadow: inset 0 0 0 1px rgba(47,111,237,.22); }
.folder-drag-preview { position: fixed !important; z-index: 82; display: grid; justify-items: center; gap: 8px; margin: 0 !important; padding: 10px 4px; pointer-events: none; opacity: .985; border-radius: 12px; will-change: transform; filter: drop-shadow(0 24px 38px rgba(0,0,0,.32)); transform-origin: center; }
.folder-drag-preview .folder-item-controls { display: none !important; }
.folder-drag-preview .icon { box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 16px 34px rgba(0,0,0,.26), 0 0 28px var(--tile-glow); }
.folder-edit-proxy { position: fixed !important; left: -9999px !important; top: -9999px !important; pointer-events: none !important; }

@media (max-width: 620px) {
  .folder-head { grid-template-columns: 1fr; padding-right: 38px; }
}

.auth-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0,0,0,.34); backdrop-filter: blur(4px); }
.auth-modal[hidden] { display: none; }
.auth-card { width: min(380px, calc(100vw - 32px)); padding: 24px; color: #222; background: #fff; border-radius: 8px; box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.auth-card h2 { margin: 0 0 8px; font-size: 26px; }
.auth-card p { margin: 0 0 18px; color: #777; line-height: 1.55; }
.auth-card input { width: 100%; height: 42px; margin-bottom: 12px; padding: 0 12px; border: 1px solid #ddd; border-radius: 6px; outline: 0; }
.auth-card button { width: 100%; height: 40px; margin-top: 8px; border-radius: 6px; }
#authSubmit { color: #fff; background: #333; }
.auth-link, .auth-close { color: #555; background: #f1f1f1; }
.auth-error { min-height: 18px; color: #d83a3a; font-size: 13px; }

.sync-choice-modal { position: fixed; inset: 0; z-index: 64; display: grid; place-items: center; padding: 24px; background: rgba(8,12,18,.42); backdrop-filter: blur(8px); animation: modalFade .18s ease both; }
.sync-choice-modal[hidden] { display: none; }
.sync-choice-card { width: min(760px, calc(100vw - 34px)); max-height: min(720px, calc(100vh - 44px)); overflow-y: auto; padding: 24px; color: #20242b; background: rgba(255,255,255,.98); border: 1px solid rgba(20,24,32,.08); border-radius: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.28); animation: modalRise .22s cubic-bezier(.22,1,.36,1) both; }
.sync-choice-card header { margin-bottom: 18px; }
.sync-choice-card header span { display: inline-flex; margin-bottom: 8px; padding: 4px 10px; color: #237348; background: rgba(47,175,92,.1); border-radius: 999px; font-size: 12px; font-weight: 800; }
.sync-choice-card h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; }
.sync-choice-card p { margin: 0; color: #737985; font-size: 13px; line-height: 1.6; }
.sync-choice-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sync-choice-summary article { display: grid; gap: 6px; min-height: 78px; padding: 14px; background: #f7f9fb; border: 1px solid #edf0f3; border-radius: 12px; }
.sync-choice-summary strong { color: #20242b; font-size: 14px; }
.sync-choice-summary span { color: #68707c; font-size: 12px; line-height: 1.5; }
.sync-choice-actions { display: grid; gap: 10px; }
.sync-choice-actions button { display: grid; gap: 5px; min-height: 68px; padding: 13px 16px; color: #20242b; background: #fff; border: 1px solid #e7eaee; border-radius: 14px; text-align: left; box-shadow: 0 2px 8px rgba(20,24,32,.04); transition: transform .18s cubic-bezier(.22,1,.36,1), border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.sync-choice-actions button:hover { background: #fbfcfd; border-color: #cdd6e0; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(20,24,32,.08); }
.sync-choice-actions strong { font-size: 15px; }
.sync-choice-actions small { color: #737985; font-size: 12px; line-height: 1.45; }
.sync-merge-panel { display: grid; gap: 10px; margin-top: 14px; padding: 14px; background: #f7f9fb; border: 1px solid #e7eaee; border-radius: 14px; }
.sync-merge-panel[hidden] { display: none; }
.sync-merge-panel strong { font-size: 14px; }
.sync-merge-panel label { display: flex; align-items: center; gap: 9px; min-height: 28px; color: #303640; font-size: 13px; }
.sync-merge-panel input { width: 16px; height: 16px; accent-color: #2faf5c; }
.sync-merge-panel button { justify-self: start; min-width: 150px; height: 38px; padding: 0 16px; color: #fff; background: #2faf5c; border-radius: 999px; box-shadow: 0 8px 18px rgba(47,175,92,.22); }

.homepage-guide-modal { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 24px; background: rgba(8,12,18,.44); backdrop-filter: blur(10px) saturate(1.08); animation: modalFade .18s ease both; }
.homepage-guide-modal[hidden] { display: none; }
.homepage-guide-card { position: relative; display: grid; gap: 18px; width: min(720px, calc(100vw - 34px)); max-height: min(720px, calc(100vh - 44px)); overflow-y: auto; padding: 24px; color: #20242b; background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.68); border-radius: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.3); animation: modalRise .22s cubic-bezier(.22,1,.36,1) both; }
.homepage-guide-close { position: absolute; top: 16px; right: 16px; display: grid; width: 32px; height: 32px; place-items: center; color: rgba(32,36,43,.56); background: rgba(32,36,43,.06); border-radius: 50%; font-size: 22px; line-height: 1; transition: background .16s ease, color .16s ease, transform .16s ease; }
.homepage-guide-close:hover { color: #20242b; background: rgba(32,36,43,.1); transform: scale(1.04); }
.homepage-guide-card header { padding-right: 38px; }
.homepage-guide-card header span { display: inline-flex; margin-bottom: 8px; padding: 4px 10px; color: #2456e8; background: rgba(36,86,232,.1); border-radius: 999px; font-size: 12px; font-weight: 800; }
.homepage-guide-card h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.2; }
.homepage-guide-card p { margin: 0; color: #697180; font-size: 13px; line-height: 1.6; }
.homepage-url-box { display: grid; gap: 8px; padding: 14px; background: linear-gradient(180deg, #f8fbff, #f4f7fb); border: 1px solid #e4eaf2; border-radius: 14px; }
.homepage-url-box label { color: #303745; font-size: 13px; font-weight: 800; }
.homepage-url-box div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.homepage-url-box input { min-width: 0; height: 42px; padding: 0 12px; color: #20242b; background: #fff; border: 1px solid #dde5ef; border-radius: 10px; outline: 0; font-size: 13px; }
.homepage-url-box button, .homepage-guide-card footer button { min-height: 42px; padding: 0 18px; color: #fff; background: #2456e8; border-radius: 10px; font-size: 13px; font-weight: 800; box-shadow: 0 10px 22px rgba(36,86,232,.2); transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease, background .18s ease; }
.homepage-url-box button:hover, .homepage-guide-card footer button:hover { background: #1d49c8; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(36,86,232,.26); }
.homepage-url-box small { min-height: 18px; color: #68707c; font-size: 12px; line-height: 1.5; }
.homepage-url-box small.success { color: #1e8d53; }
.homepage-url-box small.error { color: #d83a3a; }
.homepage-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.homepage-guide-grid article { display: grid; align-content: start; gap: 8px; min-height: 156px; padding: 14px; background: #fff; border: 1px solid #e8edf3; border-radius: 14px; box-shadow: 0 3px 14px rgba(20,24,32,.04); }
.homepage-guide-grid strong { color: #20242b; font-size: 14px; }
.homepage-guide-grid ol { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #68707c; font-size: 12px; line-height: 1.48; }
.homepage-guide-card footer { display: flex; justify-content: flex-end; gap: 10px; }
.homepage-guide-card footer button:last-child { color: #303640; background: #eef2f7; box-shadow: none; }
.homepage-guide-card footer button:last-child:hover { background: #e3e8ef; box-shadow: none; }

.add-page .add-site-form h2,
.add-page .share-submit h2,
.add-page .widget-picker h2,
.me-page .section-card h2,
.settings-page .section-card h2,
.admin-page .admin-panel-title h2,
.admin-page .admin-recommended h2 { font-size: var(--ui-title-lg); line-height: 1.25; }
.add-page .share-submit p,
.me-page .section-card > p,
.settings-page .section-card > p,
.admin-page .admin-panel-title p,
.site-empty,
.admin-empty,
.ticket-empty { font-size: var(--ui-body); line-height: 1.55; }
.settings-page label,
.admin-page label,
.me-page label,
.add-page label { font-size: var(--ui-label); line-height: 1.35; }
.category-list button,
.layout-options button,
.widget-options button,
.manual-sync-actions button,
.admin-section-tabs button,
.admin-store-tools button,
.review-actions button,
.ticket-expand-toggle,
.ticket-pager button,
.admin-store-pager button { font-size: var(--ui-button); }
.drawer-page small,
.drawer-page .site-card-meta,
.drawer-page .review-item small,
.drawer-page .admin-ticket-main small,
.drawer-page .ticket-item-main small { font-size: var(--ui-meta); }

.widget-tile { width: 100%; min-height: calc(92px * var(--widget-height-scale, 1)); align-content: center; justify-items: var(--widget-align-items, start); gap: 5px; padding: 12px 14px; overflow: hidden; color: #fff; text-align: var(--widget-text-align, left); background: linear-gradient(145deg, var(--widget-bg), rgba(0,0,0,.36)); border: 1px solid rgba(255,255,255,.16); border-radius: var(--widget-radius, 12px); box-shadow: 0 12px 28px rgba(0,0,0,.2); --tile-glow: rgba(120, 224, 255, .7); }
.widget-config { position: absolute; top: 7px; right: 7px; z-index: 5; display: grid; width: 26px; height: 26px; place-items: center; color: rgba(255,255,255,.86); background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.24); border-radius: 50%; opacity: 0; transform: scale(.86); transition: opacity .16s ease, transform .16s ease, background .16s ease; backdrop-filter: blur(8px); font-size: 14px; line-height: 1; }
.widget-tile:hover .widget-config, .widget-tile.is-hovering .widget-config { opacity: .82; transform: scale(1); }
.desktop.editing .widget-config { opacity: 0; pointer-events: none; transform: scale(.72); }
.widget-config:hover { opacity: 1; background: rgba(0,0,0,.38); }
.widget-tile[data-material="light"] .widget-config { color: rgba(32,38,51,.78); background: rgba(255,255,255,.54); border-color: rgba(32,38,51,.12); }
.widget-tile::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: calc(100% + 18px); height: calc(100% + 18px); border-radius: calc(var(--widget-radius-tl, 12px) + 10px) calc(var(--widget-radius-tr, 12px) + 10px) calc(var(--widget-radius-br, 12px) + 10px) calc(var(--widget-radius-bl, 12px) + 10px); background: radial-gradient(circle, var(--tile-glow) 0%, rgba(255,255,255,.18) 38%, rgba(255,255,255,0) 72%); opacity: 0; filter: blur(12px); transform: translate(-50%, -50%) scale(.82); transition: opacity .22s ease, transform .22s ease, filter .22s ease; pointer-events: none; }
.widget-tile:hover::before, .widget-tile.is-hovering::before { opacity: .82; transform: translate(-50%, -50%) scale(1); animation: iconBreathingGlow 1.8s ease-in-out infinite; }
.widget-tile:hover, .widget-tile.is-hovering { background: linear-gradient(145deg, var(--widget-bg), rgba(0,0,0,.24)); }
.widget-tile[data-material="auto"] { background: linear-gradient(145deg, color-mix(in srgb, var(--widget-bg) 86%, #fff), rgba(8,12,18,.42)); backdrop-filter: blur(12px) saturate(1.18); }
.widget-tile[data-material="frosted"] { background: linear-gradient(145deg, rgba(18,23,32,.8), color-mix(in srgb, var(--widget-bg) 48%, rgba(0,0,0,.7))); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.18); }
.widget-tile[data-material="light"] { color: #202633; background: linear-gradient(145deg, rgba(255,255,255,.78), color-mix(in srgb, var(--widget-bg) 18%, rgba(255,255,255,.82))); border-color: rgba(255,255,255,.62); box-shadow: 0 14px 30px rgba(0,0,0,.14); }
.widget-tile[data-material="metal"] { background: linear-gradient(135deg, color-mix(in srgb, var(--widget-bg) 58%, #778395), rgba(21,25,32,.88) 46%, color-mix(in srgb, var(--widget-bg) 72%, #fff)); border-color: rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 14px 32px rgba(0,0,0,.24); }
.widget-kicker { max-width: 100%; overflow: hidden; color: rgba(255,255,255,.72); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.widget-tile strong { display: -webkit-box; max-width: 100%; overflow: hidden; color: currentColor; font-size: 18px; line-height: 1.18; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.widget-tile small { display: block; max-width: 100%; overflow: hidden; color: rgba(255,255,255,.72); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.widget-tile[data-material="light"] .widget-kicker, .widget-tile[data-material="light"] small { color: rgba(32,38,51,.64); }
.widget-tile[data-widget-type="weather"] { align-content: start; justify-items: stretch; gap: 6px; padding: 10px 12px; overflow: visible; isolation: isolate; }
.widget-tile[data-widget-type="weather"] > :not(.weather-detail-popover):not(.widget-config):not(.tile-delete):not(.tile-edit),
.widget-tile[data-widget-type="news"] > :not(.news-detail-popover):not(.widget-config):not(.tile-delete):not(.tile-edit) { max-width: 100%; min-width: 0; }
.widget-tile[data-widget-type="weather"] > .widget-kicker, .widget-tile[data-widget-type="weather"] > strong, .widget-tile[data-widget-type="weather"] > small { display: none; }
.widget-tile[data-weather-tone="sunny"] { --tile-glow: rgba(255, 204, 92, .72); }
.widget-tile[data-weather-tone="cloudy"], .widget-tile[data-weather-tone="overcast"] { --tile-glow: rgba(170, 206, 226, .72); }
.widget-tile[data-weather-tone="rain"], .widget-tile[data-weather-tone="storm"] { --tile-glow: rgba(82, 178, 255, .74); }
.widget-tile[data-weather-tone="snow"] { --tile-glow: rgba(222, 246, 255, .82); }
.widget-tile[data-weather-tone="fog"] { --tile-glow: rgba(204, 214, 218, .7); }
.weather-widget-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.weather-city-line-mini { min-width: 0; overflow: hidden; color: rgba(255,255,255,.8); font-size: 11px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.weather-aqi { flex: 0 0 auto; max-width: 70px; overflow: hidden; padding: 2px 6px; color: #fff; background: rgba(255,255,255,.18); border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.weather-aqi-good { background: rgba(41, 176, 109, .9); }
.weather-aqi-moderate { background: rgba(246, 181, 65, .92); }
.weather-aqi-light, .weather-aqi-medium, .weather-aqi-heavy, .weather-aqi-severe { background: rgba(232, 91, 76, .92); }
.weather-widget-main { display: grid; grid-template-columns: 28px auto minmax(0, 1fr); gap: 7px; align-items: center; min-width: 0; }
.weather-symbol { display: grid; width: 26px; height: 26px; place-items: center; color: rgba(255,255,255,.94); background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; font-size: 13px; font-weight: 900; box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.weather-temp { display: block !important; overflow: visible !important; font-size: 26px !important; line-height: .95 !important; white-space: nowrap; }
.weather-condition { min-width: 0; overflow: hidden; color: rgba(255,255,255,.76); font-size: 12px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.weather-widget-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.weather-chip { display: grid; min-width: 0; gap: 2px; padding: 4px 6px; color: rgba(255,255,255,.86); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; line-height: 1.15; }
.weather-chip i { overflow: hidden; color: rgba(255,255,255,.58); font-size: 9px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.weather-chip b { overflow: hidden; font-size: 11px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.weather-hourly-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; width: 100%; min-width: 0; }
.weather-hourly-strip span { display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 4px 2px; background: rgba(255,255,255,.1); border-radius: 6px; }
.weather-hourly-strip i, .weather-hourly-strip em { overflow: hidden; max-width: 100%; color: rgba(255,255,255,.58); font-size: 9px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.weather-hourly-strip b { color: rgba(255,255,255,.94); font-size: 12px; line-height: 1; }
.weather-days-mini { display: grid; gap: 3px; width: 100%; min-width: 0; }
.weather-days-mini span { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 5px; align-items: center; min-width: 0; color: rgba(255,255,255,.78); font-size: 10px; line-height: 1.25; }
.weather-days-mini i, .weather-days-mini b, .weather-days-mini em { overflow: hidden; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.weather-days-mini b { color: rgba(255,255,255,.92); }
.weather-detail-popover { position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 22; display: grid; gap: 10px; width: min(330px, calc(100vw - 36px)); padding: 14px; color: #fff; background: rgba(20,24,32,.94); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.35); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 8px) scale(.96); transition: opacity .18s ease, transform .18s cubic-bezier(.22,1,.36,1), visibility 0s linear .18s; backdrop-filter: blur(16px) saturate(1.2); }
.weather-detail-popover::before { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 18px; background: transparent; }
.weather-detail-popover::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; border-right: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); transform: translateX(-50%) rotate(45deg); }
.widget-tile[data-widget-type="weather"]:hover .weather-detail-popover, .widget-tile[data-widget-type="weather"].is-hovering .weather-detail-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
.weather-detail-top { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; align-items: end; }
.weather-detail-top span { min-width: 0; overflow: hidden; color: rgba(255,255,255,.76); font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.weather-detail-top b { grid-row: 1 / 3; grid-column: 2; font-size: 34px; line-height: .9; }
.weather-detail-top em { min-width: 0; overflow: hidden; color: rgba(255,255,255,.58); font-size: 11px; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.weather-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.weather-detail-days { display: grid; gap: 5px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.12); }
.weather-detail-days span { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; font-size: 12px; }
.weather-detail-days i, .weather-detail-days b, .weather-detail-days em { overflow: hidden; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.weather-detail-days i, .weather-detail-days em { color: rgba(255,255,255,.62); }
.widget-tile[data-widget-type="weather"][data-weather-rich="false"] .weather-widget-meta { grid-template-columns: 1fr; }
.widget-tile[data-widget-type="weather"][data-weather-rich="false"] .weather-temp { font-size: 24px !important; }
.widget-tile[data-widget-type="weather"][data-weather-inline="false"] { align-content: center; }
.widget-tile[data-widget-type="weather"][data-weather-inline="false"] .weather-widget-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.widget-tile[data-widget-type="weather"][data-weather-inline="false"] .weather-chip:nth-child(n+3) { display: none; }
.widget-tile[data-widget-type="weather"][data-weather-inline="false"] .weather-temp { font-size: 25px !important; }
.widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-hourly-strip, .widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-days-mini { display: none !important; }
.widget-tile[data-material="light"] .weather-city-line-mini, .widget-tile[data-material="light"] .weather-condition, .widget-tile[data-material="light"] .weather-days-mini span { color: rgba(32,38,51,.72); }
.widget-tile[data-material="light"] .weather-symbol, .widget-tile[data-material="light"] .weather-chip, .widget-tile[data-material="light"] .weather-hourly-strip span { color: #202633; background: rgba(255,255,255,.56); border-color: rgba(32,38,51,.08); }
.widget-tile[data-material="light"] .weather-chip i, .widget-tile[data-material="light"] .weather-hourly-strip i, .widget-tile[data-material="light"] .weather-hourly-strip em { color: rgba(32,38,51,.52); }
.widget-tile[data-material="light"] .weather-hourly-strip b, .widget-tile[data-material="light"] .weather-days-mini b { color: #202633; }
.widget-tile[data-widget-type="news"] { overflow: visible; isolation: isolate; }
.widget-tile[data-widget-type="news"][data-news-inline="false"] { align-content: center; }
.widget-tile[data-widget-type="news"][data-news-inline="false"] .widget-kicker { padding-right: 22px; }
.widget-tile[data-widget-type="news"][data-news-inline="false"] strong { -webkit-line-clamp: 1; font-size: 17px; }
.widget-tile[data-widget-type="news"][data-widget-rows="1"] > .news-widget-list { display: none !important; }
.widget-tile[data-widget-type="news"] > .news-widget-link { cursor: pointer; }
.widget-tile[data-widget-type="news"] > .news-widget-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-widget-list { display: grid; width: 100%; max-width: 100%; gap: 4px; margin-top: 4px; }
.news-widget-item { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; gap: 6px; align-items: center; width: 100%; min-width: 0; height: 22px; padding: 0 2px; color: inherit; background: transparent; border-radius: 5px; text-align: left; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.news-widget-item:hover { background: rgba(255,255,255,.12); transform: translateX(1px); }
.news-widget-rank { display: grid; width: 16px; height: 16px; place-items: center; color: rgba(255,255,255,.92); background: rgba(255,255,255,.16); border-radius: 5px; font-size: 10px; font-weight: 800; line-height: 1; }
.news-widget-item:nth-child(1) .news-widget-rank { background: #ff4d4f; }
.news-widget-item:nth-child(2) .news-widget-rank { background: #ff8a2a; }
.news-widget-item:nth-child(3) .news-widget-rank { background: #f6c343; color: #3a2a00; }
.news-widget-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 650; line-height: 1.2; }
.news-widget-hot { min-width: 30px; color: rgba(255,255,255,.62); font-size: 10px; text-align: right; white-space: nowrap; }
.widget-tile[data-material="light"] .news-widget-item:hover { background: rgba(32,38,51,.08); }
.widget-tile[data-material="light"] .news-widget-rank { color: #fff; background: rgba(32,38,51,.28); }
.widget-tile[data-material="light"] .news-widget-hot { color: rgba(32,38,51,.52); }
.news-detail-popover { position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 22; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); padding: 13px; color: #fff; background: rgba(22,20,28,.95); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; box-shadow: 0 20px 52px rgba(0,0,0,.36); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 8px) scale(.96); transition: opacity .18s ease, transform .18s cubic-bezier(.22,1,.36,1), visibility 0s linear .18s; backdrop-filter: blur(16px) saturate(1.16); }
.news-detail-popover::before { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 18px; background: transparent; }
.news-detail-popover::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; border-right: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); transform: translateX(-50%) rotate(45deg); }
.widget-tile[data-widget-type="news"]:hover .news-detail-popover, .widget-tile[data-widget-type="news"].is-hovering .news-detail-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
.news-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
.news-detail-head span { min-width: 0; overflow: hidden; color: rgba(255,255,255,.9); font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.news-detail-head b { flex: 0 0 auto; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 700; }
.news-detail-popover .news-widget-list { gap: 5px; margin-top: 0; }
.news-detail-popover .news-widget-item { height: 25px; padding: 0 4px; }
.news-detail-popover .news-widget-title { font-size: 12px; }
.preview-tile.widget-tile { width: min(240px, 100%); }

@keyframes zoomIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalRise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes engineMenuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes settingsCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageSlideRight {
  0% { opacity: 0; transform: translate3d(46px,0,0) scale(.986); filter: blur(.4px); }
  58% { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}
@keyframes pageSlideLeft {
  0% { opacity: 0; transform: translate3d(-46px,0,0) scale(.986); filter: blur(.4px); }
  58% { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}
@keyframes iconBreathingGlow {
  0%, 100% { opacity: .58; filter: blur(9px); }
  50% { opacity: 1; filter: blur(15px); }
}
@keyframes longPressRing {
  from { clip-path: inset(0 100% 0 0 round 999px); }
  to { clip-path: inset(0 0 0 0 round 999px); }
}
@keyframes iconJiggle {
  0% { transform: rotate(-1.8deg) translateY(-1px); }
  100% { transform: rotate(1.8deg) translateY(1px); }
}

@media (max-width: 900px) {
  .drawer { width: min(420px, 100vw); }
  .drawer-open .center-stage { width: 100%; opacity: .35; }
  .quick-grid-shell { width: calc(100vw - 32px); }
  .quick-grid { grid-template-columns: repeat(4,1fr); gap: 34px 18px; width: calc(100vw - 40px); }
  .page-arrow { width: 36px; height: 48px; font-size: 30px; }
  .page-arrow-left { left: -6px; }
  .page-arrow-right { right: -6px; }
  .search-panel { width: calc(100vw - 48px); }
  .engine-menu { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
  .engine-option { min-height: 62px; font-size: 12px; }
  .engine-option img, .engine-option .engine-glyph { width: 24px; height: 24px; font-size: 19px; }
  .drawer-open .exit-drawer { right: min(438px, calc(100vw - 48px)); }
  .admin-section-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-store-tools { grid-template-columns: 1fr 1fr; }
  .wallpaper-dialog { min-height: auto; }
  .wallpaper-cloud-layout { grid-template-columns: 1fr; }
  .wallpaper-filter { gap: 8px; }
  .wallpaper-grid, .wallpaper-grid.wide, .wallpaper-source-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallpaper-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallpaper-dialog-head { padding-left: 20px; }
  .wallpaper-subtabs, .wallpaper-content, .wallpaper-source-view { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 700px) {
  .widget-tile[data-widget-type="weather"][data-widget-rows="1"] { align-content: center; gap: 5px; padding-top: 8px; padding-bottom: 8px; }
  .widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-widget-meta { display: none; }
  .widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-widget-main { grid-template-columns: 24px auto minmax(0, 1fr); gap: 5px; }
  .widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-symbol { width: 23px; height: 23px; }
  .widget-tile[data-widget-type="weather"][data-widget-rows="1"] .weather-temp { font-size: 22px !important; }
}

@media (max-width: 560px) {
  .sync-choice-modal { padding: 14px; }
  .sync-choice-card { padding: 18px; border-radius: 14px; }
  .sync-choice-summary { grid-template-columns: 1fr; }
  .sync-choice-card h2 { font-size: 20px; }
  .homepage-guide-modal { padding: 14px; }
  .homepage-guide-card { padding: 18px; border-radius: 14px; }
  .homepage-guide-card h2 { font-size: 20px; }
  .homepage-url-box div, .homepage-guide-grid { grid-template-columns: 1fr; }
  .homepage-guide-card footer { align-items: stretch; flex-direction: column; }
  .profile-card.signed-in .account-actions { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin: 14px 0 0; }
  .admin-store-tools, .admin-section-tabs { grid-template-columns: 1fr; }
  .ticket-history-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .ticket-history-head span { text-align: left; }
  .ticket-item, .admin-ticket-main { grid-template-columns: 1fr; }
  .ticket-thumb { width: 64px; height: 64px; }
  .admin-ticket-actions { justify-content: flex-start; }
  .admin-ticket-reply div { grid-template-columns: 1fr; }
  .admin-ticket-reply button { justify-self: start; }
  .folder-head { grid-template-columns: 1fr; padding-right: 38px; }
  .wallpaper-dialog-head { gap: 16px; height: 64px; }
  .wallpaper-dialog-head button { font-size: 16px; }
  .wallpaper-subtabs { overflow-x: auto; white-space: nowrap; }
  .wallpaper-grid, .wallpaper-grid.wide, .wallpaper-source-grid, .wallpaper-source-detail-grid, .wallpaper-color-grid { grid-template-columns: 1fr; }
  .wallpaper-source-helper { align-items: stretch; flex-direction: column; }
  .wallpaper-source-helper button { width: 100%; }
  .wallpaper-source-footer { align-items: stretch; flex-direction: column; }
  .wallpaper-source-footer button { width: 100%; }
}
