:root{color-scheme:dark;--canvas:#080d12;--raised:#101920;--text:#f1f3f4;--muted:#99a4ae;--faint:#6d7c88;--line:#ffffff20;--accent:#46d7d1;--inset:40px;--gap:28px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--canvas);color:var(--text)}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{border:0;border-radius:0;background:none;color:inherit;cursor:pointer;padding:0;text-align:inherit}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
button:hover{filter:brightness(1.1)}
button:active{opacity:.84}
button:disabled{cursor:wait;opacity:.5}
button,input,select{touch-action:manipulation}
input,select{color:var(--text);background:var(--raised);border:1px solid var(--line);padding:10px 12px;min-height:44px;max-width:100%}
input::placeholder{color:var(--faint)}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-weight:350}
button p{pointer-events:none}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#app{height:100dvh;display:flex;flex-direction:column}
.system-bar{height:68px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 var(--inset);gap:18px;background:var(--canvas);position:relative;z-index:5}
.system-brand{display:flex;gap:12px;align-items:center;min-height:44px;font-size:13px;letter-spacing:.08em;white-space:nowrap}
.brand-mark{font-size:25px;font-weight:200;color:#fff}
.system-actions{display:flex;gap:24px;align-items:center}
.system-date{font-size:12px;color:var(--muted)}
.system-action{min-height:44px;font-size:12px;color:var(--muted)}
.workspace{flex:1;min-height:0}
.app-stage{height:100%;position:relative;overflow:hidden;perspective:1400px;perspective-origin:left top}
.scene{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;background:var(--canvas)}
.scene-chrome{height:40px;flex:none;padding:0 var(--inset);display:flex;align-items:center;gap:13px}
.back-button{width:38px;height:38px;border:1px solid #ffffff65;border-radius:50%;font-size:23px;display:grid;place-items:center;line-height:1}
.scene-eyebrow{font-size:11px;color:var(--faint);letter-spacing:.15em}
.subtle-button{font-size:12px;color:var(--muted);min-height:40px}
.app-identity{padding:16px var(--inset) 26px;flex:none;overflow:hidden}
.app-title{font-size:clamp(34px,4.3vw,64px);font-weight:250;letter-spacing:-.04em;line-height:1.12;overflow-wrap:anywhere;max-width:1100px}
.app-subtitle{font-size:13px;color:var(--muted);margin-top:11px;line-height:1.6}
.reading{padding:10px var(--inset) 64px;overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#ffffff30 transparent}
.reading-inner{max-width:970px}
.reading>.state-notice{max-width:580px}
.meta{color:var(--muted);font-size:12px;line-height:1.7}
.eyebrow{font-size:11px;color:var(--accent);letter-spacing:.1em}
.body-text,.prose{font-size:15px;line-height:1.85;color:#d2dbe1;overflow-wrap:anywhere;white-space:pre-wrap}
.prose p{margin:0 0 16px}
.prose h2{font-size:23px;color:var(--text);margin:26px 0 12px}
.prose h3{font-size:19px;color:var(--text);margin:22px 0 10px}
.prose ul,.prose ol{padding-left:24px;margin:12px 0}
.prose li{margin-bottom:8px}
.prose pre{padding:16px;overflow:auto;background:#0006;white-space:pre;font:12px/1.7 ui-monospace,monospace}
.prose code{font-family:ui-monospace,monospace;font-size:.88em}
.prose blockquote{border-left:2px solid #58a5af;margin:16px 0;padding-left:16px;color:var(--muted)}
.section-label{color:var(--accent);font-size:13px;font-weight:500;margin:0 0 17px}
.content-section{margin:0 0 34px}
.content-section+.content-section{padding-top:6px}
.lead{font-size:21px;line-height:1.65;font-weight:350;color:var(--text);overflow-wrap:anywhere}
.fact-time{display:block;margin-top:10px;color:var(--faint);font-size:11px;font-variant-numeric:tabular-nums}
.empty-state{padding:24px 0;font-size:14px;line-height:1.8;color:var(--muted)}
.state-notice{padding:26px 0;line-height:1.8}
.state-notice h2{font-size:25px;margin-bottom:10px}
.state-notice p{font-size:14px;color:var(--muted);margin-bottom:15px}
.state-notice button,.text-action{color:var(--accent);font-size:13px;min-height:44px}
.loading-line{height:2px;width:72px;background:var(--accent);animation:loading-breathe 1s ease-in-out infinite;margin-bottom:20px}
@keyframes loading-breathe{50%{opacity:.22;transform:scaleX(.45);transform-origin:left}}
.inline-error{font-size:13px;color:#edb48c;padding:12px 0;line-height:1.7}
.load-more{font-size:13px;color:var(--accent);min-height:48px;padding:10px 0;display:block;width:100%}
.search-form{display:flex;gap:12px;margin-bottom:25px}
.search-form input{flex:1;min-width:0;background:transparent;border:0;border-bottom:1px solid #ffffff55;padding-left:0}
.search-form button{color:var(--accent);min-width:52px}
.filters{display:flex;gap:22px;align-items:center;overflow:auto;scrollbar-width:none;margin:0 0 24px;flex:none}
.filters button{min-height:42px;white-space:nowrap;color:var(--muted);font-size:13px;border-bottom:1px solid transparent}
.filters button[aria-pressed=true]{color:var(--accent);border-color:var(--accent)}
.apps-list{max-width:700px;display:grid;grid-template-columns:1fr 1fr;gap:16px 30px}
.app-list-row{display:flex;align-items:center;gap:18px;min-height:82px;font-size:23px;font-weight:300}
.app-list-icon{width:56px;height:56px;display:grid;place-items:center;background:var(--app-color);font-size:27px;flex:none}
.panorama{display:flex;gap:var(--gap);padding:0 var(--inset) 22px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scroll-padding-left:var(--inset);overscroll-behavior-x:contain;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#ffffff30 transparent}
.pane{flex:0 0 min(68vw,820px);min-width:420px;display:flex;flex-direction:column;scroll-snap-align:start;overflow:hidden}
.pane:last-child{margin-right:var(--inset)}
.pane-heading{flex:none;margin-bottom:23px}
.pane-heading h2,.pane-heading>button{font-size:31px;font-weight:300;line-height:1.2;min-height:42px;letter-spacing:-.025em;color:var(--text)}
.panel-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 8px 42px 0;scrollbar-width:thin;scrollbar-color:#ffffff30 transparent;overscroll-behavior-y:contain;overscroll-behavior-x:auto}
.project-directory .pane{flex-basis:min(66vw,760px)}
.object-row{display:block;width:100%;text-align:left;padding:19px 0;border-bottom:1px solid var(--line);position:relative;overflow-wrap:anywhere}
.object-row:first-child{padding-top:0}
.object-row .row-title{display:block;font-size:21px;font-weight:350;line-height:1.45;color:var(--text)}
.object-row .row-summary{display:block;font-size:14px;line-height:1.8;margin-top:9px;color:#afbfc8;white-space:pre-wrap}
.object-row .row-meta{display:flex;flex-wrap:wrap;gap:5px 14px;margin-top:11px;font-size:11px;line-height:1.6;color:var(--faint)}
.row-chevron{position:absolute;right:2px;top:23px;font-size:18px;color:var(--accent)}
.project-row{padding-right:27px}
.project-row .row-summary{-webkit-line-clamp:3;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.project-row .row-title{font-size:29px;letter-spacing:-.03em}
.project-directory .object-row{padding-bottom:26px;margin-bottom:9px}
.favorite-action{font-size:12px;color:var(--muted);min-height:44px}
.favorite-action[aria-pressed=true]{color:#edc883}
.project-count{font-size:12px;color:var(--faint);padding-bottom:18px}
.node-row{display:flex;gap:15px}
.node-dot{width:11px;height:11px;border:1px solid #739ab1;flex:none;margin-top:9px}
.node-row[data-status=completed] .node-dot{background:#4db398;border-color:#4db398}
.node-main{min-width:0}
.node-number{font-size:11px;letter-spacing:.04em;color:var(--faint);margin-bottom:4px}
.stage-select{width:100%;margin-bottom:23px;background:transparent;font-size:14px}
.all-done{font-size:55px;font-weight:250;color:#70cba4;line-height:1.1;letter-spacing:-.04em;margin:10px 0 18px}
.plan-resting{font-size:31px;font-weight:300;line-height:1.35;margin-bottom:20px}
.history-disclosure{margin:20px 0}
.history-disclosure summary{min-height:44px;cursor:pointer;color:var(--muted);font-size:13px;line-height:1.6;display:flex;align-items:center}
.history-disclosure summary:before{content:"›";margin-right:10px;font-size:18px}
.history-disclosure[open] summary:before{transform:rotate(90deg)}
.note-block{padding:18px 0;margin:0 0 22px;border-top:1px solid var(--line)}
.note-block h3{font-size:20px;line-height:1.5;margin-bottom:10px}
.metric-line{display:flex;gap:25px;flex-wrap:wrap;margin-bottom:27px}
.metric-line strong{display:block;font-size:39px;font-weight:250}
.metric-line small{font-size:11px;color:var(--muted)}
.list-intro{font-size:14px;color:var(--muted);line-height:1.8;margin-bottom:25px}
.architecture-map{width:100%;min-height:180px;background:#0d1820;border:1px solid var(--line);padding:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-bottom:22px}
.architecture-node{border:1px solid #43829a;background:#12323e;padding:16px 12px;min-height:72px;font-size:15px;line-height:1.5}
.relation-row{font-size:13px;color:var(--muted);padding:10px 0;border-bottom:1px solid var(--line);line-height:1.7}
.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:34px;max-width:1200px}
.asset-card{min-width:0;display:block;text-align:left}
.asset-preview{height:156px;background:#6e2a64;display:flex;align-items:flex-end;padding:23px;position:relative;overflow:hidden;margin-bottom:16px}
.asset-preview .sample-type{font-size:58px;font-weight:250;letter-spacing:-.06em;line-height:1}
.asset-preview .preview-kind{margin-left:auto;font-size:11px;color:#ffffffb0;align-self:flex-start}
.asset-card h2{font-size:23px;line-height:1.5;margin-bottom:7px}
.asset-card p{font-size:13px;line-height:1.8;color:var(--muted)}
.asset-card .meta{margin-top:9px;font-size:11px}
.asset-detail-preview{height:200px;max-width:700px;margin-bottom:32px}
.version-pair{display:flex;gap:50px;flex-wrap:wrap;margin:25px 0 30px}
.version-pair span{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
.version-pair strong{font-size:25px;font-weight:300}
.dossier-section{max-width:840px;margin:0 0 32px}
.dossier-section h2{font-size:25px;margin-bottom:17px}
.sms-list{max-width:950px}
.sms-message{max-width:760px;margin:0 0 29px;position:relative}
.sms-message.owner{margin-left:auto;width:88%}
.sms-message-meta{font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:20px;margin-bottom:8px}
.sms-bubble{background:#1b2330;padding:19px 21px;border-left:2px solid #735a9f}
.sms-message.owner .sms-bubble{background:#573288;border:0}
.sms-bubble .prose{color:#e5e5ed;font-size:15px}
.topic-summary{margin-bottom:35px;max-width:760px;padding:20px 22px;background:#191522;border-top:2px solid #9266c4}
.topic-summary h2{font-size:13px;color:#cbb2ee;margin-bottom:12px}
.topic-summary p{font-size:17px;line-height:1.8;white-space:pre-wrap}
.topic-project{min-height:44px;color:#c3a0ee;font-size:13px;margin:0 0 21px}
.timestamp-heading{font-size:11px;color:var(--faint);padding:8px 0 25px}
.operation-state{display:flex;gap:12px;align-items:center;font-size:15px;margin:12px 0 8px}
.status-dot{width:7px;height:7px;background:#8996a0;border-radius:50%;flex:none}
.status-dot.ok{background:#72c6a4}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 32px;margin:24px 0}
.detail-grid dt{font-size:11px;color:var(--faint);margin-bottom:6px}
.detail-grid dd{margin:0;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.source-link{display:block;margin:12px 0;font-size:13px;overflow-wrap:anywhere}
.empty-illustration{width:38px;height:38px;border:1px solid #ffffff40;margin-bottom:20px;position:relative}
.empty-illustration:before{content:"";position:absolute;inset:8px;border:1px solid #ffffff20}
@media(max-width:720px){:root{--inset:22px;--gap:20px}
.system-bar{height:59px;padding-top:env(safe-area-inset-top);gap:10px}
.system-brand{font-size:11px;gap:7px}
.brand-mark{font-size:21px}
.system-actions{gap:18px}
.system-date{display:none}
.system-action{font-size:11px}
.scene-chrome{height:40px}
.back-button{width:33px;height:33px;font-size:21px}
.app-identity{padding-top:14px;padding-bottom:22px}
.app-title{font-size:40px;line-height:1.23}
.app-subtitle{font-size:12px}
.apps-list{grid-template-columns:1fr;gap:2px}
.panorama{padding-bottom:24px;scroll-snap-type:x mandatory}
.pane,.project-directory .pane{flex-basis:calc(100vw - 83px);min-width:0}
.pane-heading{margin-bottom:18px}
.pane-heading h2{font-size:29px}
.object-row .row-title{font-size:20px}
.project-row .row-title{font-size:26px}
.object-row .row-summary{font-size:14px}
.panel-body{padding-right:0}
.lead{font-size:19px}
.reading{padding-bottom:calc(42px + env(safe-area-inset-bottom))}
.asset-grid{grid-template-columns:1fr;gap:29px}
.asset-preview{height:150px}
.sms-message{max-width:100%;width:93%}
.sms-message.owner{width:92%}
.sms-bubble{padding:16px}
.sms-message-meta{font-size:10px;gap:9px}
.sms-bubble .prose{font-size:15px}
.topic-summary{padding:18px}
.topic-summary p{font-size:16px}
.detail-grid{grid-template-columns:1fr}
.architecture-map{grid-template-columns:1fr}
.app-title.long-title{font-size:30px}
.version-pair{gap:30px}
.system-bar:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:#ffffff08}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.app-title{transform:none!important}
}
/* The current App shares one title/back row. Web controls stay in its command bar. */
:root{--canvas:#000;--raised:#111;--muted:#aaa;--faint:#737373;--line:#ffffff25}
#app[data-surface="application"]>.system-bar{display:none}
.scene-chrome{height:auto;min-height:116px;padding:21px var(--inset) 23px;align-items:center;gap:23px;position:relative;flex:none}
.scene-chrome .app-identity{padding:0;flex:1;min-width:0}
.scene-chrome .back-button{flex:none;margin-top:5px}
.scene-chrome .app-title{font-size:60px;font-weight:250;white-space:nowrap;max-width:none;will-change:transform}
.scene-chrome .app-title.long-title{font-size:40px;white-space:normal}
.project-directory .pane{flex-basis:calc(100vw - 218px);max-width:1100px;min-width:420px}
.project-directory .pane-heading h2{font-size:32px;font-weight:300}
.project-directory .object-row{padding:21px 0;margin:0}
.project-directory .project-row .row-title{font-size:18px;font-weight:550;letter-spacing:0}
.project-directory .project-row .row-summary{font-size:14px;-webkit-line-clamp:2;color:#a4a4a4;margin-top:10px}
.project-directory .project-hero{border-top:3px solid #47d58b;border-bottom:0;padding-top:15px;padding-bottom:22px}
.project-directory .project-hero .row-title{font-size:30px;font-weight:500;letter-spacing:-1px}
.project-directory .project-hero .row-summary{font-size:15px}
.catalog-tabs{display:flex;gap:25px;margin:0 0 25px}
.catalog-tabs button{min-height:44px;color:#aaa;font-size:15px;border-bottom:1px solid transparent}
.catalog-tabs button[aria-pressed=true]{color:var(--accent);border-color:var(--accent)}
@media(max-width:720px){.scene-chrome{min-height:98px;padding-top:20px;gap:15px}
.scene-chrome .app-title{font-size:42px}
.scene-chrome .app-title.long-title{font-size:28px}
.scene-chrome .back-button{margin-top:1px}
.project-directory .pane{flex-basis:calc(100vw - 83px);min-width:0}
.project-directory .project-hero .row-title{font-size:28px}
.project-directory .project-row .row-title{font-size:19px}
}
.asset-preview{isolation:isolate}
.asset-preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
.asset-preview-name{font-size:29px;font-weight:300;letter-spacing:-.03em;line-height:1.35;max-width:85%;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.asset-preview .preview-kind{position:absolute;right:12px;top:12px;background:#000b;padding:4px 8px;font-size:10px}
.design-cover{max-width:900px;margin:0 0 30px;border:1px solid var(--line);background:#101010}
.design-cover img{display:block;width:100%;max-height:420px;object-fit:contain}
.device-primary{padding:12px 20px;min-height:46px;background:#0a7776;color:white;font-size:14px}
.device-revoke{color:#e8a17f}
.device-feedback{font-size:14px;color:var(--accent);line-height:1.8;margin-top:18px}
.device-confirm{color:var(--text);background:#111;border:1px solid #ffffff35;padding:30px;width:min(510px,calc(100vw - 40px));max-height:85dvh;overflow:auto}
.device-confirm::backdrop{background:#000a;backdrop-filter:blur(6px)}
.device-confirm h2{font-size:28px;margin-bottom:22px}
.device-confirm .lead{margin-bottom:15px}
.device-confirm .body-text{font-size:14px}
.confirm-actions{display:flex;justify-content:flex-end;gap:20px;margin-top:28px}
.confirm-actions button{padding:10px 18px;min-height:44px;border:1px solid #ffffff45}
.confirm-actions [data-confirm]{background:#0a7776;border-color:#0a7776}
.confirm-feedback{font-size:13px;color:#edb48c;line-height:1.7;margin-top:17px}
@media(min-width:721px){.system-brand{font-size:24px;font-weight:300;letter-spacing:-.02em}
.brand-mark{font-size:29px}
}
/* A desktop title may pan with its columns; a phone still needs its full name. */
@media(max-width:720px){.scene-chrome .app-title{font-size:36px;white-space:normal;overflow-wrap:anywhere}
.scene-chrome .app-title.long-title{font-size:28px}
.scene-chrome{align-items:flex-start}
.scene-chrome .back-button{margin-top:5px}
}

/* Home retains tjyh.fun's wallpaper, typography and interaction. Its grid
   follows the owner's responsive layout; application readers keep their CSS. */
#app[data-surface="home"] { font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', sans-serif; }
#app[data-surface="home"] > .system-bar { width: min(1800px, calc(100% - 36px)); height: 36px; min-height: 36px; margin: calc(22px + env(safe-area-inset-top, 0px)) auto 0; padding: 0; gap: 16px; align-items: center; }
#app[data-surface="home"] .system-brand { min-height: 36px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; color: rgba(201, 214, 236, .58); }
#app[data-surface="home"] .brand-mark, #app[data-surface="home"] .system-date { display: none; }
#app[data-surface="home"] .system-actions { gap: 12px; }
#app[data-surface="home"] .system-action { min-height: 36px; font-size: .84rem; color: rgba(219, 229, 246, .82); }
.home-scene { --text-main: rgba(245, 248, 255, .97); --text-soft: rgba(219, 229, 246, .82); --text-dim: rgba(201, 214, 236, .58); --shadow-soft: 0 0 0 rgba(0, 0, 0, 0); }
.home-scene .start-scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 18px calc(28px + env(safe-area-inset-bottom, 0px)); scrollbar-width: thin; scrollbar-color: #ffffff30 transparent; }
.home-scene .desktop-scroll { max-width: 1800px; margin: 0 auto; padding: 0 0 18px; position: relative; z-index: 1; }
.home-scene .tile { text-align: left; font-family: inherit; width: auto; height: auto; min-width: 0; outline-offset: -3px; }
.home-scene .tile:hover, .home-scene .tile:active { filter: none; opacity: 1; }
@media (max-width: 768px) {
  #app[data-surface="home"] > .system-bar { width: calc(100% - 32px); margin-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .home-scene .start-scroller { padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .home-scene .desktop-scroll { max-width: 100%; padding: 0; }
}
.home-scene .tiles-grid {
            position: relative;
            display: grid;
            grid-auto-flow: row;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            grid-auto-rows: 1fr;
            gap: 8px;
            padding: 10px 0 34px;
            perspective: 1400px;
            perspective-origin: left top;
            background: #000;
        }

.home-scene .tile {
            aspect-ratio: 1 / 1;
            grid-column: span 1;
            border-radius: 2px;
            padding: 12px;
            color: var(--text-main);
            display: flex;
            flex-direction: column;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            transition: box-shadow 180ms ease, opacity 180ms ease;
            box-shadow: var(--shadow-soft);
            transform: perspective(1400px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1);
            transform-origin: 0 0;
            transform-style: preserve-3d;
            background:
                linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.08)),
                var(--wallpaper);
            background-size: var(--wallpaper-width, cover) var(--wallpaper-height, cover);
            background-repeat: no-repeat;
            background-position: var(--wallpaper-pos-x, center) var(--wallpaper-pos-y, center);
            border: 0;
        }

.home-scene .tile::before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
            pointer-events: none;
        }

.home-scene .tile.wide {
            grid-column: span 2;
            aspect-ratio: auto;
        }

.home-scene .tile.long-tile {
            grid-column: span 2 !important;
            aspect-ratio: auto !important;
            padding: 14px 16px;
        }

/* Interaction feedback stays inside the fixed box. Only navigation's existing
   Metro keyframes may move the outer tile; shared wallpaper stays aligned. */
.home-scene .tile::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            z-index: 4;
            box-shadow: inset 0 0 0 1px transparent;
            background-color: transparent;
            transition: box-shadow 140ms ease, background-color 140ms ease;
        }

@media (hover: hover) and (pointer: fine) {
  .home-scene .tile:hover::after {
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
            background-color: rgba(255, 255, 255, 0.035);
  }
}

.home-scene .tile:active::after {
            box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
            background-color: rgba(0, 0, 0, 0.12);
        }

.home-scene .tile-content {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 100%;
            margin-top: auto;
        }

.home-scene .tile-title {
            font-size: 0.98rem;
            font-weight: 700;
            line-height: 1.32;
            letter-spacing: -0.01em;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
        }

.home-scene .tile.long-tile .tile-title {
            font-size: 1rem;
            -webkit-line-clamp: 2;
        }

.home-scene .tile.utility-app {
            justify-content: flex-start;
        }

.home-scene .tile.utility-app .tile-content {
            justify-content: flex-end;
            gap: 0;
        }

.home-scene .tile.utility-app .tile-title {
            font-size: 0.82rem;
            -webkit-line-clamp: 2;
            margin-top: auto;
        }

.home-scene .app-icon {
            position: absolute;
            inset: 0;
            z-index: 2;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-main);
            pointer-events: none;
        }

.home-scene .app-icon svg {
            width: 48%;
            height: 48%;
            display: block;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
        }

@media (max-width: 768px) {
.home-scene .tiles-grid {
                gap: 8px;
                padding: 8px 0 28px;
            }

.home-scene .tile {
                grid-column: span 1;
                aspect-ratio: 1 / 1 !important;
                padding: 10px;
            }

.home-scene .tile.wide,
.home-scene .tile.long-tile {
                grid-column: span 2 !important;
                aspect-ratio: auto !important;
                padding: 10px 12px;
            }

.home-scene .tile-title,
.home-scene .tile.long-tile .tile-title {
                font-size: 0.74rem;
                -webkit-line-clamp: 2;
                line-height: 1.26;
            }

.home-scene .tile.utility-app {
                padding-top: 8px;
                padding-bottom: 18px;
            }

.home-scene .tile.utility-app .tile-content {
                justify-content: flex-end;
                min-height: auto;
            }

.home-scene .tile.utility-app .tile-title {
                margin-top: 0;
                transform: translateY(-6px);
                text-align: center;
            }

.home-scene .app-icon {
                inset: 0;
            }

.home-scene .app-icon svg {
                width: 44%;
                height: 44%;
            }
}

/* Two columns on narrow viewports; larger screens add columns naturally. */
@media (max-width: 899px) {
  .home-scene .tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The column title is the navigation control; keep it within the panorama. */
.pane-title{font:inherit;color:inherit;letter-spacing:inherit;line-height:inherit;min-height:44px;text-align:left}
.pane-title[aria-current="false"]{color:#888}
.pane-title:hover{color:var(--text)}
.pane-title:focus-visible{outline-offset:-2px}
.panorama:focus-visible{outline:none}
.panorama:focus-visible .pane-title[aria-current="true"]{outline:2px solid var(--accent);outline-offset:-2px}
.project-shortcuts{display:flex;flex-wrap:wrap;gap:0 20px;margin:8px 0 26px}
.project-detail .scene-chrome{min-height:86px;padding-top:12px;padding-bottom:14px}
.project-detail .scene-chrome .app-title{font-size:clamp(28px,3.7vw,46px)}
.project-detail .pane-heading{margin-bottom:12px}
.project-detail .pane-heading h2{font-size:29px}
.project-detail .pane-heading{display:flex;gap:10px 20px;align-items:center;flex-wrap:wrap}
.project-detail .pane-heading>h2{flex:none}
.project-detail .pane-heading>.project-stage-control,.project-detail .pane-heading>.project-material-controls{flex:1;min-width:200px;margin:0;padding:0}
.project-stage-control{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:0 0 12px}
.project-stage-control label{display:flex;align-items:center;gap:9px;min-width:0;flex:1;color:var(--muted);font-size:12px}
.project-stage-control select{min-width:0;flex:1;max-width:100%;font-size:13px;background:transparent;border-width:0 0 1px}
.project-plan-status,.project-material-status{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:12px}
.project-plan-status:empty,.project-material-status:empty{display:none}
.project-plan-group{border-top:1px solid var(--line);padding:0 0 20px}
.project-plan-heading{position:sticky;top:0;z-index:3;background:var(--canvas)}
.project-plan-heading>button{display:flex;align-items:center;gap:14px;width:100%;min-height:58px;padding:10px 0}
.project-plan-heading>button>span:first-child{font-size:20px;flex:1;min-width:0;line-height:1.4}
.project-plan-heading small{font-size:11px;color:var(--muted);white-space:nowrap}
.project-plan-summary{font-size:13px;line-height:1.8;color:var(--muted);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;margin-top:10px}
.project-node-track{display:flex;gap:18px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:10px 0 15px;background:var(--canvas)}
.project-node-track button{flex:0 0 130px;min-width:0;display:flex;flex-direction:column;gap:7px;align-items:flex-start;padding-bottom:8px;border-bottom:2px solid var(--line);color:var(--muted);font-size:13px;line-height:1.5}
.project-node-track button[aria-pressed=true]{border-bottom-color:var(--accent);color:var(--text)}
.project-node-track small{font-size:11px;color:var(--faint)}
.project-node-number{font-size:19px;font-weight:300;color:var(--accent)}
.project-node-body>h3{font-size:23px;line-height:1.5}
.project-node-body>.meta{margin:8px 0 12px}
.project-node-work{margin-top:15px}
.project-material-controls{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin:0 0 15px}
.project-material-controls input{flex:1 1 150px;min-width:0;background:transparent;border-width:0 0 1px;padding-left:0;font-size:14px}
.project-material-controls select{flex:0 1 135px;min-width:0;background:transparent;border-width:0 0 1px;padding-left:0;font-size:12px}
.project-material-row .row-title{font-size:20px}
.project-material-row .row-summary{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;margin-top:5px}
.project-material-row .row-meta{margin-top:6px}
.project-material-row[aria-current=true] .row-title{color:var(--accent)}
@media(max-width:720px){.project-detail .scene-chrome{min-height:76px}.project-detail .scene-chrome .app-title{font-size:29px}.project-detail .pane-heading h2{font-size:27px}.project-plan-heading>button>span:first-child{font-size:18px}.project-node-track button{flex-basis:112px}.project-material-controls{gap:5px 10px}.project-material-controls input{flex-basis:100px}.project-material-controls select{flex-basis:105px}.project-material-row .row-title{font-size:19px}}
.project-shortcuts button{min-height:36px;font-size:12px;color:var(--accent)}

.scene-menu{position:relative;flex:none;align-self:center;z-index:10}
.scene-menu>summary{list-style:none;cursor:pointer;font-size:28px;line-height:44px;width:44px;height:44px;text-align:center;color:#aaa}
.scene-menu>summary::-webkit-details-marker{display:none}
.scene-menu>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.scene-actions{position:absolute;right:0;top:48px;min-width:158px;padding:8px;background:#181818;border:1px solid #ffffff30;box-shadow:0 12px 30px #0008;display:grid}
.scene-actions button{font-size:14px;min-height:44px;padding:0 15px;text-align:left;color:var(--text);white-space:nowrap}
.scene-actions button:hover,.scene-actions button:focus-visible{background:#ffffff0d}
.content-editor{margin:0 0 18px}
.content-edit-feedback{font-size:13px;line-height:1.7;color:var(--muted);white-space:pre-wrap;margin:0}
.content-edit-feedback:empty{display:none}
.content-edit-feedback[data-error=true]{color:#efbb88}
.content-edit-form{display:grid;gap:16px;margin-top:12px}
.content-edit-form[hidden],.content-edit-arrangement[hidden],.content-edit-conflict[hidden]{display:none}
.content-edit-form label{display:grid;gap:8px;font-size:13px;color:var(--muted)}
.content-edit-form input,.content-edit-form textarea,.content-edit-form select{font:inherit;color:var(--text);background:transparent;border:1px solid var(--line);border-radius:0;padding:10px 12px;max-width:100%;min-width:0;box-sizing:border-box}
.content-edit-form input{font-size:20px}
.content-edit-form textarea{width:100%;min-height:18rem;line-height:1.8;resize:vertical;white-space:pre-wrap}
.content-edit-form textarea:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.content-edit-actions,.content-edit-arrangement{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center}
.content-edit-arrangement>label{flex:1 1 180px}
.content-edit-arrangement>p{flex-basis:100%;margin:0;font-size:13px;color:var(--muted)}
.content-edit-arrangement>p:empty{display:none}
.content-edit-conflict{border-left:2px solid var(--accent);padding:0 0 0 14px}
.content-edit-conflict>summary{min-height:44px;color:var(--accent);cursor:pointer}
.content-edit-conflict pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:20rem;overflow:auto;font:inherit;line-height:1.8}
.content-edit-conflict p{font-size:13px;color:var(--muted)}
.content-inline{box-sizing:border-box;width:100%;max-width:26rem;margin:4px 0 14px;padding:8px 14px 12px;background:var(--raised);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #0003}
.content-inline[hidden]{display:none}
.content-inline-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:500;line-height:1.5}
.content-inline-heading>button{flex:none;font-size:20px;min-width:32px;text-align:center}
.content-inline-reading{max-height:16rem;overflow:auto}
.content-inline-reading .prose p{font-size:14px;line-height:1.65;margin:0 0 8px}
.content-inline-reading .meta{font-size:12px;margin:4px 0 0}
.content-inline-feedback{font-size:12px;color:var(--accent);line-height:1.6;margin:0 0 6px}
.content-inline-feedback:empty{display:none}
.content-inline .content-editor{margin:0}
.content-inline .text-action{min-height:30px;margin:0;padding:4px 0;font-size:12px}
.content-inline>[data-inline-editor],.content-inline>[data-inline-footer]{display:inline-block;vertical-align:top;margin-right:16px}
.content-inline>[data-inline-editor]:has(.content-edit-form:not([hidden])){display:block;margin-right:0}
.content-inline .content-edit-form{margin-top:4px;gap:10px}
.content-inline .content-edit-form input{font-size:14px}
.content-inline .content-edit-form textarea{height:auto;min-height:4rem;max-height:12rem;line-height:1.65}
.content-inline .content-edit-arrangement{gap:8px 12px}
.scene-actions .favorite-action[aria-pressed=true]{color:#edc883}
/* Give the final column the same leading snap position, using native layout. */
.panorama{--pane-width:max(420px,min(68vw,820px))}
.project-directory .panorama{--pane-width:min(1100px,max(420px,calc(100vw - 218px)))}
.pane:last-child{margin-right:max(var(--inset),calc(100% - var(--pane-width)))}
@media(max-width:720px){.panorama,.project-directory .panorama{--pane-width:calc(100vw - 83px)}}
