/* Standalone styles: only md-page / md-desktop are styled; all styles are scoped to this desktop. */
.md-page { margin: 0; background: #0d192c; }
.md-desktop {
  --md-text: #edf4ff; --md-muted: #b1c3db; --md-line: rgb(223 236 255 / .17);
  --md-glass: rgb(20 35 58 / .88); --md-accent: #b0cdff;
  position: relative; isolation: isolate; width: 100%; min-height: 100vh; min-height: 100dvh;
  overflow: hidden; color: var(--md-text); font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: #12223b; font-size: 14px; -webkit-font-smoothing: antialiased;
}
.md-desktop *, .md-desktop *::before, .md-desktop *::after { box-sizing: border-box; }
.md-desktop [hidden] { display: none !important; }
.md-desktop button, .md-desktop input, .md-desktop a { font: inherit; -webkit-tap-highlight-color: transparent; }
.md-desktop button { cursor: pointer; color: inherit; border: 0; background: transparent; }
.md-desktop a { color: inherit; text-decoration: none; }
.md-desktop button:focus-visible, .md-desktop a:focus-visible, .md-desktop input:focus-visible, .md-viewport:focus-visible {
  outline: 2px solid #c8dcff; outline-offset: 4px;
}
.md-desktop h1, .md-desktop h2, .md-desktop h3, .md-desktop p { margin: 0; }
.md-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.md-wallpaper { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 12% 10%, #425c92 0, transparent 48%), radial-gradient(ellipse at 82% 80%, #355966 0, transparent 48%), linear-gradient(148deg, #273961, #12243e 48%, #0d1b32); }
.md-wallpaper i { position: absolute; width: 90vw; height: 78vh; border: 1px solid rgb(221 231 255 / .1); border-radius: 50%; transform: rotate(-27deg); box-shadow: inset 6px 28px 90px rgb(135 172 255 / .09), 0 -1px 65px rgb(217 237 255 / .05); }
.md-wallpaper i:nth-child(1) { left: -17%; top: 40%; }
.md-wallpaper i:nth-child(2) { left: 9%; top: 48%; }
.md-wallpaper i:nth-child(3) { left: 34%; top: 55%; }
.md-brand { position: absolute; left: 30px; top: max(24px, env(safe-area-inset-top)); display: flex; gap: 12px; align-items: center; z-index: 2; pointer-events: none; }
.md-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(150deg, #d0e3ff, #82b4fc); color: #16396f; font-size: 23px; font-weight: 850; box-shadow: 0 3px 12px #0c1c352e; letter-spacing: -3px; padding-right: 3px; }
.md-brand b { font-size: 19px; letter-spacing: -.5px; }
.md-brand small { display: block; margin-top: 3px; color: var(--md-muted); font-size: 11px; letter-spacing: 1.5px; }
.md-home-link { position: absolute; right: 26px; top: max(30px, env(safe-area-inset-top)); z-index: 3; padding: 8px 13px; font-size: 12px; border: 1px solid var(--md-line); border-radius: 20px; background: rgb(18 30 48 / .2); }
.md-home-link:hover { background: rgb(223 236 255 / .12); }
.md-viewport { position: absolute; inset: 104px 0 106px; overflow: hidden; touch-action: none; cursor: grab; user-select: none; overscroll-behavior: contain; display: none; }
.md-ready { height: var(--md-height, 100dvh); min-height: var(--md-height, 100dvh); }
.md-ready .md-viewport { display: block; }
.md-world { position: absolute; inset: 0; will-change: transform; }
.md-moving .md-viewport, .md-moving .md-world-site { cursor: grabbing; }
.md-world-site { position: absolute; }
.md-site { width: 96px; min-height: 110px; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 0 0 8px; border-radius: 16px; user-select: none; -webkit-user-drag: none; }
.md-icon-face {
  display: grid; place-items: center; flex: none; position: relative; width: 72px; height: 72px; border-radius: 22px;
  background: linear-gradient(155deg, hsl(var(--icon-hue, 210) 52% 86%), hsl(var(--icon-hue, 210) 38% 72%));
  border: 1px solid rgb(255 255 255 / .36); box-shadow: 0 8px 20px rgb(7 17 34 / .22), inset 0 1px 0 rgb(255 255 255 / .2);
  color: hsl(var(--icon-hue, 210) 46% 27%); transition: background .18s, box-shadow .18s;
}
.md-icon-face img { position: absolute; width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
.md-icon-letter { font-size: 30px; font-weight: 750; }
.md-icon-label { width: 100%; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; text-shadow: 0 1px 5px #10213c; }
.md-site:hover { background: rgb(233 241 255 / .09); }
.md-site:hover .md-icon-face { box-shadow: 0 9px 25px rgb(7 17 34 / .24), 0 0 0 3px rgb(219 236 255 / .13); }
.md-moving .md-site:hover { background: transparent; }
.md-moving .md-icon-face { transition: none; }
.md-empty { position: absolute; top: 43%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: min(90%, 400px); color: var(--md-muted); line-height: 2; }
.md-empty small { font-size: 12px; }
.md-glass { background: var(--md-glass); border: 1px solid var(--md-line); box-shadow: 0 20px 80px rgb(3 12 28 / .32), inset 0 1px 0 rgb(255 255 255 / .05); backdrop-filter: blur(32px) saturate(1.2); -webkit-backdrop-filter: blur(32px) saturate(1.2); }
.md-island { position: absolute; display: none; z-index: 20; top: auto; bottom: calc(90px + env(safe-area-inset-bottom)); left: 170px; width: min(560px, calc(100% - 28px)); border-radius: 20px; background: rgb(20 35 58 / .68); border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 8px 24px #020b212b; overflow: hidden; }
.md-island-trigger { width: 100%; height: 40px; display: none; place-items: center; }
.md-search-glyph { width: 19px; height: 19px; stroke: #c7d9f5; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.md-island-trigger:focus-visible { outline-offset: -5px !important; border-radius: 24px; }
.md-island-open { display: block; width: min(560px, calc(100% - 32px)); border-radius: 20px; background: rgb(12 23 40 / .97); max-height: calc(var(--md-height, 100dvh) - 204px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.md-island-open .md-island-trigger { display: none; }
.md-search-form { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.md-search-form > span { font-size: 28px; color: var(--md-muted); }
.md-search-form input { border: 0; outline: 0; background: transparent; color: var(--md-text); width: 100%; min-width: 0; font-size: 14px; padding: 6px 0; }
.md-search-form input::placeholder { color: #9cafcc; }
.md-search-form button { font-size: 22px; width: 28px; height: 28px; flex: none; }
.md-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.md-shortcuts button, .md-category-tabs button { border: 1px solid var(--md-line); padding: 7px 12px; border-radius: 13px; font-size: 12px; }
.md-shortcuts button:hover, .md-category-tabs button:hover, .md-category-tabs button[aria-pressed="true"] { background: #b4d2ff24; border-color: #b4d2ff77; }
.md-mobile .md-shortcuts button[aria-pressed="true"] { background: #b4d2ff24; border-color: #b4d2ff77; }
.md-mobile [data-island-more] { margin: 0 auto 16px; }
.md-results-meta { color: var(--md-muted); font-size: 11px; padding: 10px 20px; border-top: 1px solid var(--md-line); }
.md-search-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; padding: 10px 14px 16px; max-height: min(48vh, 350px); overflow-y: auto; overscroll-behavior: contain; }
.md-search-results:empty { display: none; }
.md-start { z-index: 12; position: absolute; left: 24px; bottom: calc(90px + env(safe-area-inset-bottom)); width: min(424px, calc(100% - 48px)); border-radius: 26px; padding: 24px; max-height: calc(var(--md-height, 100dvh) - 204px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.md-window-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.md-window-header small { display: block; font-size: 11px; margin-bottom: 7px; color: var(--md-muted); }
.md-window-header h2 { font-size: 22px; font-weight: 600; letter-spacing: -.7px; }
.md-window-header > button, .md-detail header button { border-radius: 12px; width: 30px; height: 30px; font-size: 23px; background: rgb(242 247 255 / .06); }
.md-window-header > button:hover, .md-detail header button:hover { background: rgb(242 247 255 / .14); }
.md-start-search { width: 100%; display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid var(--md-line) !important; border-radius: 13px; background: #07162a55 !important; color: var(--md-muted) !important; }
.md-start-search kbd { margin-left: auto; font-family: inherit; font-size: 10px; opacity: .7; }
.md-section-label { margin: 24px 0 14px; display: flex; justify-content: space-between; align-items: baseline; }
.md-section-label h3 { font-size: 13px; font-weight: 600; }
.md-section-label > span { font-size: 10px; color: var(--md-muted); }
.md-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; max-height: 205px; overflow-y: auto; padding: 4px; }
.md-site-compact { width: 100%; min-height: 76px; gap: 7px; }
.md-site-compact .md-icon-face { width: 48px; height: 48px; border-radius: 15px; }
.md-site-compact .md-icon-face img { width: 32px; height: 32px; border-radius: 8px; }
.md-site-compact .md-icon-letter { font-size: 22px; }
.md-site-compact .md-icon-label { font-size: 11px; padding: 0 3px; }
.md-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; max-height: 228px; overflow-y: auto; overscroll-behavior: contain; flex-shrink: 0; }
.md-menu-grid button { display: flex; align-items: center; gap: 8px; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .05); border-radius: 12px; padding: 12px 10px; font-size: 12px; }
.md-menu-grid button:hover, .md-menu-grid button[aria-expanded="true"] { background: rgb(177 208 255 / .16); border-color: rgb(177 208 255 / .3); }
.md-menu-grid button > span { font-size: 17px; color: var(--md-accent); }
.md-menu-grid button > b { margin-left: auto; color: var(--md-muted); font-weight: 400; }
.md-menu-grid button > .md-menu-label { min-width: 0; font-size: 12px; color: inherit; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.md-menu-glyph { flex: none; display: grid; place-items: center; }
.md-menu-glyph svg { width: 25px; height: 25px; }
.md-start-footer { border-top: 1px solid var(--md-line); margin-top: 24px; padding-top: 17px; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.md-start-footer .md-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 18px; }
.md-start-footer small { color: var(--md-muted); margin-left: 4px; }
.md-start-footer button { margin-left: auto; font-size: 11px; color: var(--md-muted); padding: 7px 0; }
.md-collection { position: absolute; z-index: 14; left: 464px; bottom: calc(90px + env(safe-area-inset-bottom)); width: min(450px, calc(100% - 32px)); max-height: calc(var(--md-height, 100dvh) - 204px - env(safe-area-inset-top)); overflow-y: auto; border-radius: 26px; padding: 24px; overscroll-behavior: contain; }
.md-collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; padding: 4px; }
.md-collection-grid .md-site { width: 100%; }
.md-category-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.md-filter-menu { position: absolute; z-index: 20; left: 250px; bottom: calc(90px + env(safe-area-inset-bottom)); width: min(480px, calc(100% - 28px)); padding: 24px; border-radius: 24px; max-height: calc(var(--md-height, 100dvh) - 204px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.md-filter-menu .md-category-tabs { margin-bottom: 0; }
.md-panel-empty { color: var(--md-muted); text-align: center; font-size: 12px; padding: 24px 12px; line-height: 1.7; }
.md-more { display: block; margin: 20px auto 0; padding: 9px 24px; background: rgb(177 208 255 / .12) !important; border-radius: 15px; font-size: 12px !important; }
.md-detail { z-index: 30; position: absolute; width: min(320px, calc(100% - 24px)); border-radius: 23px; padding: 18px; max-height: calc(var(--md-height, 100dvh) - 112px); overflow-y: auto; }
.md-detail header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 11px; color: var(--md-muted); }
.md-detail-identity { display: flex; align-items: center; gap: 14px; }
.md-detail-identity .md-icon-face { width: 56px; height: 56px; border-radius: 17px; }
.md-detail-identity .md-icon-face img { width: 38px; height: 38px; }
.md-detail-identity > div:last-child { min-width: 0; }
.md-detail-identity h2 { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.md-detail-identity p { color: var(--md-muted); font-size: 11px; margin-top: 7px; overflow-wrap: anywhere; }
.md-detail-description { color: #c6d4e9; font-size: 12px; line-height: 1.8; margin: 18px 0 !important; max-height: 108px; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-line; }
.md-detail-visit { display: flex; justify-content: space-between; padding: 11px 13px; border-radius: 12px; background: #bed8ff; color: #1b3459 !important; font-size: 12px !important; font-weight: 600 !important; }
.md-taskbar { position: absolute; z-index: 11; left: 24px; right: 24px; bottom: calc(18px + env(safe-area-inset-bottom)); height: 58px; border-radius: 20px; display: flex; align-items: center; padding: 8px 12px; gap: 15px; }
.md-start-button { display: flex; align-items: center; gap: 11px; padding: 4px 12px 4px 4px; border-radius: 13px; font-size: 13px !important; font-weight: 600 !important; }
.md-start-button:hover, .md-start-button[aria-expanded="true"] { background: rgb(215 232 255 / .1); }
.md-start-button .md-mark { width: 31px; height: 31px; border-radius: 10px; font-size: 20px; }
.md-task-button { display: flex; flex: none; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; }
.md-task-button > span:first-child { font-size: 22px; line-height: 1; }
.md-task-label { font-size: 12px; }
.md-task-button:hover, .md-task-button[aria-expanded="true"] { background: rgb(215 232 255 / .1); }
.md-start-button { flex: none; }
.md-taskbar-divider { width: 1px; height: 22px; background: var(--md-line); }
.md-hint { flex: 1; min-width: 0; font-size: 11px; color: var(--md-muted); letter-spacing: .6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-home-button, .md-fullscreen-button { flex: none; font-size: 23px !important; width: 32px; height: 32px; border-radius: 10px; color: var(--md-muted) !important; }
.md-home-button:hover, .md-fullscreen-button:hover { background: rgb(215 232 255 / .1); }
.md-clock { font-size: 12px; padding: 0 8px; color: #d0def1; font-variant-numeric: tabular-nums; }
.md-dock-mark, .md-dock-search, .md-dock-browse { display: none; }
/* The PC dock follows the approved reference. Mobile controls live in the island. */
.md-desktop:not(.md-mobile) .md-taskbar { left: 18px; right: 18px; bottom: 16px; height: 76px; gap: 18px; padding: 8px 14px; border-radius: 18px; border-color: #88b5ff65; background: linear-gradient(120deg,#517adc8c,#354595a3 44%,#7757a078); box-shadow: inset 0 1px 0 #c3dbff59,0 8px 30px #030b2844; backdrop-filter: blur(28px); }
.md-desktop:not(.md-mobile) .md-start-button { height: 48px; padding: 5px 13px 5px 8px; gap: 12px; border: 1px solid #74baff9c; border-radius: 12px; background: linear-gradient(145deg,#7a97ec5e,#1b3079a8); box-shadow: inset 0 1px 0 #d8e9ff4d,0 3px 12px #0715414d; font-size: 18px !important; }
.md-desktop:not(.md-mobile) .md-start-button:hover, .md-desktop:not(.md-mobile) .md-start-button[aria-expanded="true"] { background: linear-gradient(145deg,#8baaff80,#345598ad); border-color: #a4e1ff; }
.md-desktop:not(.md-mobile) .md-start-button .md-mark { display: none; }
.md-desktop:not(.md-mobile) .md-dock-mark { display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; width: 31px; height: 31px; flex: none; }
.md-dock-mark i { border-radius: 5px; background: linear-gradient(135deg,#c8fbff,#50baff 48%,#7257e9); box-shadow: inset 0 1px 2px #ffffff90,0 0 8px #35adff4d; position: relative; }
.md-dock-mark i:nth-child(2), .md-dock-mark i:nth-child(3) { background: linear-gradient(135deg,#b3a8ff,#6861ef 48%,#23c0ef); }
.md-dock-mark i::after { content: ''; position: absolute; inset: 4px; border-radius: 2px; background: #193178; }
.md-desktop:not(.md-mobile) .md-dock-search { display: flex; align-items: center; width: clamp(200px,27vw,390px); flex: none; margin-left: clamp(0px,8vw,116px); height: 46px; padding: 0 12px; gap: 10px; border-radius: 25px; background: linear-gradient(125deg,#6c8ceec2,#627ce691 65%,#9290d5a1); border: 1px solid #a5baff6b; box-shadow: inset 0 1px 2px #e1eaff35,0 3px 12px #10236c30; }
.md-dock-search:focus-within { outline: 2px solid #8ed9ff; outline-offset: 2px; }
.md-dock-search > button { flex: none; width: 25px; height: 32px; display: grid; place-items: center; padding: 0; }
.md-task-search-icon { width: 23px; height: 23px; stroke: #f0f7ff; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.md-dock-search input { min-width: 0; width: 100%; padding: 8px 0; color: #fff; border: 0; outline: 0; background: transparent; font-size: 13px; }
.md-dock-search input::placeholder { color: #d4e2ff; }
.md-dock-sparkle { color: #e6c9ff; font-size: 23px; text-shadow: 0 0 8px #66d8ff; }
.md-desktop:not(.md-mobile) .md-dock-browse { display: flex; flex: 1; align-items: center; margin-left: clamp(0px,2.8vw,40px); min-width: 0; gap: 3px; height: 62px; }
.md-dock-nav { display: flex; flex: 1; min-width: 0; height: 62px; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.md-dock-nav::-webkit-scrollbar { display: none; }
.md-dock-item { flex: none; width: 54px; height: 61px; padding: 0 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 11px; position: relative; }
.md-dock-item > span:last-child { display: block; width: 100%; color: #edf3ff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; line-height: 17px; }
.md-dock-tile { width: 44px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg,#bcdcff40,#6485d61c); border: 1px solid #c5e1ff26; box-shadow: inset 0 1px 0 #e8f5ff3d,0 2px 6px #12245938; }
.md-dock-tile svg { width: 25px; height: 25px; filter: drop-shadow(0 1px 3px #161c5077); }
.md-dock-item:hover .md-dock-tile, .md-dock-item[aria-pressed="true"] .md-dock-tile, .md-dock-item[aria-expanded="true"] .md-dock-tile { background: linear-gradient(145deg,#97c9ff66,#8c79f444); border-color: #99dbffad; }
.md-dock-item[aria-pressed="true"]::after, .md-dock-item[aria-expanded="true"]::after { content: ''; position: absolute; bottom: 0; width: 18px; height: 2px; background: #a9e7ff; border-radius: 2px; }
.md-dock-item:focus-visible { outline-offset: -2px !important; }
.md-dock-all { flex: none; }
.md-dock-scroll { flex: none; width: 17px; height: 40px; padding: 0; color: #dcf0ff !important; font-size: 25px !important; border-radius: 8px; }
.md-dock-scroll:hover:enabled { background: #a2c5ff24; }
.md-dock-scroll:disabled { opacity: .2; cursor: default; }
.md-desktop:not(.md-mobile) .md-taskbar-divider, .md-desktop:not(.md-mobile) .md-hint, .md-desktop:not(.md-mobile) .md-clock { display: none; }
.md-desktop:not(.md-mobile) .md-home-button, .md-desktop:not(.md-mobile) .md-fullscreen-button { width: 32px; height: 32px; border: 1px solid #c5dcff4d; background: #28468655; border-radius: 50%; }
.md-desktop:not(.md-mobile) .md-home-button { display: none; }
.md-desktop:not(.md-mobile) .md-viewport { bottom: 112px; }
.md-desktop:not(.md-mobile) .md-start, .md-desktop:not(.md-mobile) .md-collection, .md-desktop:not(.md-mobile) .md-filter-menu, .md-desktop:not(.md-mobile) .md-island-open { bottom: 108px; border-color: #61b3ff6e; background: linear-gradient(140deg,#213f87ed,#0f2344f5); box-shadow: inset 0 1px 0 #afd4ff21,0 16px 40px #020b244d; }
.md-desktop:not(.md-mobile) .md-start:not([hidden]) { display: flex; flex-direction: column; }
.md-desktop:not(.md-mobile) .md-start > .md-window-header { order: 0; }
.md-desktop:not(.md-mobile) .md-start-search { order: 1; border-radius: 24px; background: #6886cf45 !important; }
.md-desktop:not(.md-mobile) .md-label-discover { order: 2; }
.md-desktop:not(.md-mobile) .md-menu-grid { order: 3; }
.md-desktop:not(.md-mobile) .md-label-quick { order: 4; }
.md-desktop:not(.md-mobile) .md-quick-grid { order: 5; flex-shrink: 0; }
.md-desktop:not(.md-mobile) [data-quick-empty] { order: 6; }
.md-desktop:not(.md-mobile) .md-start-footer { order: 7; }
@media (max-width: 1100px) {
  .md-desktop:not(.md-mobile) .md-taskbar { gap: 10px; padding-inline: 10px; }
  .md-desktop:not(.md-mobile) .md-dock-search { width: 230px; margin-left: 0; }
  .md-desktop:not(.md-mobile) .md-dock-browse { margin-left: 0; }
  .md-dock-nav { gap: 5px; }
}
@media (max-width: 760px) {
  .md-desktop:not(.md-mobile) .md-start-button { padding: 5px 8px; }
  .md-desktop:not(.md-mobile) .md-dock-search { width: 46px; padding: 0; justify-content: center; }
  .md-dock-search input, .md-dock-sparkle { display: none; }
  .md-desktop:not(.md-mobile) .md-home-button { display: none; }
}
.md-source { position: relative; margin: 110px auto 100px; max-width: 900px; padding: 28px; background: #142640; border-radius: 20px; }
.md-source h2 { font-size: 17px; margin: 22px 0 12px; }
.md-source a { display: inline-block; margin: 8px; text-decoration: underline; }
.md-ready .md-source { display: none; }
.md-start, .md-collection, .md-detail { animation: md-appear .18s ease-out; }
@keyframes md-appear { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
/* Mobile identity is independent of window width. A narrow PC window keeps PC search. */
.md-mobile .md-island { display: block; top: max(25px, env(safe-area-inset-top)); bottom: auto; left: 50%; transform: translateX(-50%); width: 40px; border-radius: 50%; background: #0b1424; transition: width .24s ease, border-radius .24s ease; }
.md-mobile .md-island:not(.md-island-open) { height: 40px; }
.md-mobile .md-island-trigger { display: grid; height: 38px; }
.md-mobile .md-island-open { width: min(560px, calc(100% - 28px)); border-radius: 26px; max-height: calc(var(--md-height, 100dvh) - 100px - env(safe-area-inset-top)); }
.md-mobile .md-island-open .md-island-trigger { display: none; }
.md-mobile .md-task-button, .md-mobile .md-fullscreen-button { display: none; }
.md-mobile .md-brand { left: max(18px, calc(env(safe-area-inset-left) + 12px)); }
.md-mobile .md-home-link { right: max(16px, calc(env(safe-area-inset-right) + 12px)); }
.md-mobile .md-taskbar { left: max(14px, calc(env(safe-area-inset-left) + 12px)); right: max(14px, calc(env(safe-area-inset-right) + 12px)); }
.md-mobile .md-viewport { left: env(safe-area-inset-left); right: env(safe-area-inset-right); }
@media (max-width: 640px) {
  .md-brand { top: max(22px, env(safe-area-inset-top)); left: 18px; }
  .md-brand .md-mark { width: 31px; height: 31px; font-size: 20px; border-radius: 10px; }
  .md-brand b { font-size: 15px; }
  .md-brand small { display: none; }
  .md-home-link { top: max(27px, env(safe-area-inset-top)); right: 16px; font-size: 10px !important; padding: 5px 8px; }
  .md-mobile .md-island { top: max(21px, env(safe-area-inset-top)); }
  .md-island-open { width: calc(100% - 28px); }
  .md-island-open .md-search-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-search-form { padding: 15px 16px 10px; }
  .md-search-form input { font-size: 16px; }
  .md-shortcuts { gap: 5px; padding: 2px 14px 12px; }
  .md-shortcuts button { padding: 6px 10px; }
  .md-viewport { inset: 88px 0 95px; }
  .md-taskbar { left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); height: 56px; gap: 10px; border-radius: 20px; padding: 8px; }
  .md-hint { font-size: 9px; letter-spacing: 0; }
  .md-taskbar-divider { display: none; }
  .md-clock { font-size: 11px; padding-right: 3px; }
  .md-start { left: 14px; width: calc(100% - 28px); bottom: calc(80px + env(safe-area-inset-bottom)); padding: 20px; max-height: calc(var(--md-height, 100dvh) - 172px - env(safe-area-inset-top)); }
  .md-collection { width: calc(100% - 28px); left: 14px !important; bottom: calc(80px + env(safe-area-inset-bottom)); padding: 20px; max-height: calc(var(--md-height, 100dvh) - 172px - env(safe-area-inset-top)); }
  .md-collection-grid { gap: 14px 6px; }
  .md-quick-grid { gap: 12px 3px; }
  .md-menu-grid { gap: 6px; }
  .md-menu-grid button { padding: 12px 8px; gap: 6px; }
  .md-start-footer { gap: 7px; }
}
@media (max-height: 600px) {
  .md-brand { top: max(12px, env(safe-area-inset-top)); }
  .md-brand small { display: none; }
  .md-mobile .md-island { top: max(12px, env(safe-area-inset-top)); }
  .md-home-link { top: max(16px, env(safe-area-inset-top)); }
  .md-viewport { inset: 66px 0 78px; }
  .md-taskbar { bottom: calc(10px + env(safe-area-inset-bottom)); height: 52px; }
  .md-start, .md-collection, .md-filter-menu, .md-desktop:not(.md-mobile) .md-island-open { bottom: calc(74px + env(safe-area-inset-bottom)); max-height: calc(var(--md-height, 100dvh) - 146px - env(safe-area-inset-top)); padding: 18px; }
  .md-desktop:not(.md-mobile) .md-island-open { padding: 0; }
  .md-desktop:not(.md-mobile) .md-island-open { bottom: 108px; }
  .md-window-header { margin-bottom: 12px; }
  .md-section-label { margin-top: 16px; }
  .md-quick-grid { max-height: 140px; }
  .md-search-results { max-height: calc(var(--md-height, 100dvh) - 240px); }
}
@media (max-width: 760px) {
  .md-desktop:not(.md-mobile) .md-task-label, .md-desktop:not(.md-mobile) .md-start-button > span:last-child, .md-desktop:not(.md-mobile) .md-hint { display: none; }
  .md-desktop:not(.md-mobile) .md-taskbar { gap: 6px; }
  .md-desktop:not(.md-mobile) .md-taskbar-divider { display: none; }
  .md-desktop:not(.md-mobile) .md-task-button { padding: 0 8px; }
  .md-desktop:not(.md-mobile) .md-fullscreen-button { margin-left: auto; }
  .md-desktop:not(.md-mobile) .md-dock-all { width: 38px; }
  .md-desktop:not(.md-mobile) .md-dock-all .md-dock-tile { width: 32px; height: 40px; }
  .md-desktop:not(.md-mobile) .md-dock-scroll { display: none; }
}
@media (max-width: 380px) { .md-hint { display: none; } .md-fullscreen-button { margin-left: auto; } }
/* The canvas fills the browser; navigation floats above it without reserving a frame. */
.md-desktop:not(.md-mobile) .md-viewport, .md-desktop.md-mobile .md-viewport { inset: 0; }
/* Mobile has one search/navigation entry, leaving the full lower screen for swipes. */
.md-mobile .md-taskbar { display: none; }
.md-mobile { touch-action: pan-x pan-y; }
.md-mobile .md-site { min-height: 92px; gap: 8px; padding-bottom: 6px; }
.md-mobile .md-world-site { width: calc(76px * var(--md-mobile-scale,1)); min-height: calc(92px * var(--md-mobile-scale,1)); gap: calc(8px * var(--md-mobile-scale,1)); padding-bottom: calc(6px * var(--md-mobile-scale,1)); }
.md-mobile .md-icon-face { width: 56px; height: 56px; border-radius: 17px; }
.md-mobile .md-icon-face img { width: 40px; height: 40px; border-radius: 10px; }
.md-mobile .md-icon-letter { font-size: 26px; }
.md-mobile .md-icon-label { font-size: 11px; }
.md-mobile .md-world-site .md-icon-face { width: calc(56px * var(--md-mobile-scale,1)); height: calc(56px * var(--md-mobile-scale,1)); border-radius: calc(17px * var(--md-mobile-scale,1)); }
.md-mobile .md-world-site .md-icon-face img { width: calc(40px * var(--md-mobile-scale,1)); height: calc(40px * var(--md-mobile-scale,1)); }
.md-mobile .md-world-site .md-icon-label { font-size: calc(11px * var(--md-mobile-scale,1)); line-height: calc(18px * var(--md-mobile-scale,1)); }
.md-mobile .md-world-site .md-icon-letter { font-size: calc(26px * var(--md-mobile-scale,1)); }
.md-mobile.md-previewing .md-site:not(.md-preview-active) { filter: blur(3px) brightness(.65); opacity: .32; pointer-events: none; }
.md-mobile.md-previewing .md-site:not(.md-preview-active) .md-icon-face::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: #07152e77; pointer-events: none; }
.md-mobile.md-previewing .md-preview-active { filter: none; opacity: 1; }
.md-mobile .md-detail { animation: none; }
.md-mobile .md-search-results { grid-template-columns: repeat(4,minmax(0,1fr)); }
.md-island-home { display: none; }
.md-mobile .md-island-home { display: block; font-size: 24px; color: var(--md-muted); }
.md-mobile .md-shortcuts { flex-wrap: nowrap; padding-bottom: 10px; }
.md-mobile .md-shortcuts button { flex: none; }
.md-mobile [data-island-content] { width: min(558px,calc(100vw - 30px)); }
.md-mobile .md-search-form input:focus-visible { outline: none; }
.md-mobile .md-search-form:focus-within { box-shadow: inset 0 -1px 0 #99c9ff66; }
.md-search-categories { display: flex; gap: 7px; padding: 0 14px 12px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: thin; scrollbar-color: #93b9ed55 transparent; }
.md-search-categories button { flex: none; white-space: nowrap; border: 1px solid var(--md-line); padding: 7px 12px; border-radius: 13px; font-size: 12px; }
.md-search-categories button:hover, .md-search-categories button[aria-pressed="true"] { background: #b4d2ff24; border-color: #b4d2ff77; }
.md-mobile .md-category-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: thin; padding-bottom: 8px; }
.md-mobile .md-category-tabs button { flex: none; white-space: nowrap; }
.md-mobile .md-collection { bottom: max(16px, env(safe-area-inset-bottom)); max-height: calc(var(--md-height, 100dvh) - 100px - env(safe-area-inset-top)); }
.md-gesture-hint { position: absolute; z-index: 3; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); padding: 10px 12px; border-radius: 14px; color: #dce8f9; background: #10233de8; border: 1px solid var(--md-line); font-size: 11px; line-height: 1.7; }
.md-gesture-hint button { width: 28px; height: 28px; flex: none; font-size: 21px; }
@media (prefers-reduced-motion: reduce) {
  .md-desktop *, .md-desktop *::before, .md-desktop *::after { animation: none !important; transition: none !important; }
}
@supports not (backdrop-filter: blur(1px)) { .md-glass { background: #192e4b; } }
