:root{font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,"Microsoft Yahei",sans-serif;background:#0b101c;color:#e7eaf2;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}a{color:#9ebcff;text-decoration:none}a:hover{text-decoration:underline}code,pre{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}code{font-size:.89em}pre{overflow:auto}.app-shell{display:flex;min-height:100vh}.sidebar{flex:0 0 245px;background:#0d1220;border-right:1px solid #20273a;display:flex;flex-direction:column;padding:29px 16px 20px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:11px;align-items:center;padding:0 12px 32px}.brand-icon{width:36px;height:36px;border:1px solid #8176ff;color:#a79eff;display:grid;place-items:center;border-radius:12px;font-size:29px;background:#201a43}.brand strong{letter-spacing:-.6px;font-size:17px}.brand strong span{color:#a69cff}.brand small{display:block;font-size:9px;letter-spacing:2px;color:#67748b;margin-top:4px}.nav-caption,.eyebrow{font-size:10px;font-weight:800;color:#7483a0;letter-spacing:1.7px;text-transform:uppercase}.nav-caption{padding:13px 13px}nav{display:grid;gap:7px}.nav-item{display:flex;align-items:center;gap:13px;background:transparent;border:0;color:#8693af;text-align:left;border-radius:11px;padding:13px 14px;font-weight:600}.nav-item span{font-size:20px;line-height:1;width:20px;text-align:center}.nav-item:hover,.nav-item.active{background:#272242;color:#dfd8ff}.nav-item.active{box-shadow:inset 2px 0 #a699ff}.side-spacer{flex:1}.aside-info{display:flex;align-items:center;gap:11px;padding:14px 12px;border:1px solid #2a3448;border-radius:12px;background:#141e2c}.live-dot{width:8px;height:8px;border-radius:50%;background:#50d39e;box-shadow:0 0 13px #50d39e}.aside-info b,.user-area b{font-size:11px;display:block}.aside-info small,.user-area small{font-size:10px;color:#8190aa;display:block;margin-top:4px}.user-area{display:flex;align-items:center;gap:10px;margin-top:20px;border-top:1px solid #20283a;padding:19px 7px 0}.user-area>div:nth-child(2){flex:1;min-width:0}.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#32305d;color:#d1c5ff;font-weight:700}.user-area button{color:#9da9ba;background:none;border:0;font-size:18px}.main-area{flex:1;min-width:0;background:radial-gradient(circle at 83% -6%,#25234a55 0,transparent 28%),#0b101c}.topbar{height:71px;border-bottom:1px solid #202739;display:flex;align-items:center;justify-content:space-between;padding:0 44px}.breadcrumb{font-size:12px;color:#8795ae}.breadcrumb span{margin:0 10px;color:#5b6682}.breadcrumb strong{color:#dde4f6}.topbar-actions{display:flex;align-items:center;gap:25px;font-size:12px}.pill{color:#7bcea9;background:#143025;border:1px solid #1f4e3a;border-radius:99px;padding:7px 11px;font-size:9px;font-weight:800;letter-spacing:1px}.view{padding:34px 44px 80px;max-width:1400px;margin:auto}.hero{display:flex;justify-content:space-between;align-items:center;min-height:180px;gap:10px}.hero h1,.page-title h1,.auth-panel h1{font-weight:780;font-size:clamp(32px,4vw,47px);letter-spacing:-1.8px;line-height:1.2;margin:14px 0}.hero p,.page-title p,.auth-panel p{color:#94a3bb;line-height:1.7;margin:0;font-size:14px}.mark{color:#a699ff}.hero-icon{color:#7e6cf4;font-size:104px;line-height:1;opacity:.65;transform:rotate(-18deg);margin-right:40px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:24px 0 47px}.stats>div{background:linear-gradient(135deg,#191e31,#161c2d);border:1px solid #293149;border-radius:15px;padding:23px 24px;min-height:144px}.stats small{display:block;color:#9aa7bf;font-size:12px}.stats b{display:block;font-size:33px;line-height:1.3;margin-top:7px;color:#e8eafa}.stats span{font-size:11px;color:#697a98}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;gap:20px}.section-title h2,.panel h3{margin:0;font-size:19px;letter-spacing:-.5px}.section-title p{margin:7px 0 0;font-size:12px;color:#7c8ba7}.primary,.secondary{border:1px solid transparent;border-radius:10px;background:#7566e7;color:white;padding:12px 18px;font-weight:650;font-size:12px;min-height:40px}.primary:hover{background:#8b7bf8}.secondary{background:#202844;border-color:#46506b;color:#d8e0fa}.secondary:hover{border-color:#8f83eb}.toolbar{display:flex;gap:14px;margin-bottom:18px}.toolbar input{flex:1}.toolbar select{min-width:190px}.toolbar input,.toolbar select,input:not([type=checkbox]):not([type=file]),select,textarea{border:1px solid #2c3550;background:#141d2e;border-radius:9px;padding:12px 14px;color:#e6ebf7;outline:none}.toolbar input:focus,input:focus,select:focus,textarea:focus{border-color:#8073ed}.skill-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.skill-card{display:flex;flex-direction:column;gap:12px;background:#141b2a;border:1px solid #252e42;border-radius:13px;padding:20px;text-align:left;min-height:194px;color:inherit;transition:transform .15s,border-color .15s}.skill-card:hover{transform:translateY(-2px);border-color:#796ad6}.card-head,.card-foot{display:flex;justify-content:space-between;align-items:center;gap:10px}.glyph{border-radius:10px;color:#a79bff;background:#282647;width:40px;height:40px;display:grid;place-items:center;font-size:23px}.visibility{font-size:10px;border:1px solid #38445b;color:#9aa8bc;border-radius:30px;padding:5px 8px}.visibility.public{color:#7dd0a6;border-color:#235744}.skill-card strong{font-size:15px}.skill-card p{color:#90a0b8;margin:0;line-height:1.6;font-size:12px;flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-foot{font-size:10px;color:#79869c;border-top:1px solid #283045;padding-top:13px;margin-top:3px}.card-foot b{font-weight:500;color:#b6c1d6}.empty{color:#94a4bc;padding:36px 18px;text-align:center;border:1px dashed #3a4560;border-radius:13px;grid-column:1/-1}.page-title{margin:26px 0 35px}.page-title h1{font-size:35px}.two-col{display:grid;grid-template-columns:1.1fr .9fr;gap:22px}.panel{padding:25px;background:#151d2d;border:1px solid #29344e;border-radius:14px;margin-bottom:20px}.panel h3{font-size:16px;margin-bottom:23px}.panel label{display:block;font-size:12px;color:#9eabc0;margin:18px 0 9px}.panel select,.panel input:not([type=file]):not([type=checkbox]),.panel textarea{width:100%}.wide{width:100%;margin-top:16px}.upload-row{display:flex;gap:10px;flex-wrap:wrap}.panel label.upload-btn{margin:0;flex:1;background:#222a41;color:#b9c7f0;border:1px dashed #526188;border-radius:10px;padding:19px 10px;text-align:center;cursor:pointer;white-space:nowrap;font-size:12px}.upload-btn:hover{border-color:#8e81ff}.upload-btn input{display:none}.pick-result{padding:15px 10px;color:#7f92b2;font-size:12px}.panel label.checkbox-row{display:flex;align-items:center;gap:10px;color:#a7b8cc;line-height:1.5}.panel input[type=checkbox]{accent-color:#897cf3}.helper pre,.command pre{background:#0e1522;border-radius:11px;padding:23px;color:#c4cbef;line-height:1.6;font-size:12px}.helper p,.panel p{color:#8493ae;font-size:12px;line-height:1.7}.rows{display:grid}.row-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #29354c;padding:14px 4px}.row-card:last-child{border-bottom:0}.row-card b{display:block;font-size:13px}.row-card small{display:block;font-size:11px;color:#8696af;margin-top:5px}.row-card button{border:1px solid #513f57;color:#ff9fae;background:#301c2a;padding:7px 9px;border-radius:8px;font-size:11px}.scope-picker{display:flex;gap:8px;flex-wrap:wrap}.scope-picker label{display:flex;align-items:center;gap:7px;background:#202a40;padding:9px;border-radius:7px;margin:0}.issued{background:#122d27;border:1px solid #28664e;border-radius:10px;margin-top:20px;padding:13px;word-break:break-all}.issued b{display:block;font-size:12px;margin-bottom:10px}.issued code{display:block;color:#a8f2d5}.issued button{margin-top:10px}.auth-panel{max-width:740px;margin:calc(10vh + 30px) auto;padding:40px 50px}.auth-panel h1{font-size:clamp(34px,5vw,56px)}.auth-panel h1 em{font-style:normal;background:linear-gradient(90deg,#baaaff,#72b9fe);color:transparent;background-clip:text}.auth-panel p{max-width:570px}.auth-form{display:grid;gap:12px;margin-top:38px;max-width:490px}.auth-form label{color:#b2c0d8;font-size:12px}.setup{max-width:490px;margin-top:38px;color:#8e9eb8;font-size:12px}.setup summary{cursor:pointer}.setup input{width:100%;margin-top:15px}.setup button{margin-top:12px}.auth-panel .primary{height:44px}#toast{position:fixed;right:24px;top:82px;z-index:30;max-width:400px;background:#29354d;border:1px solid #566887;color:white;padding:12px 16px;border-radius:12px;box-shadow:0 20px 80px #0007;font-size:13px;display:none}#toast.bad{background:#5c2835;border-color:#aa4657}dialog{border:1px solid #3b4663;color:#e5ebf7;border-radius:18px;background:#171e30;box-shadow:0 25px 100px #000a;width:min(760px,95vw);max-height:85vh;padding:25px}dialog::backdrop{background:#0009}.dialog-close{border:none;background:transparent;color:#bdc5d5;float:right;font-size:27px;cursor:pointer}.detail-meta{color:#8fa0bd;font-size:13px;line-height:1.6}.detail-actions{display:flex;gap:10px;margin:18px 0;flex-wrap:wrap}dialog textarea{width:100%;min-height:280px;background:#111826;border:1px solid #374361;padding:15px;color:#d7e1f6;border-radius:10px;font:12px/1.65 ui-monospace,monospace}.versions{display:flex;gap:7px;flex-wrap:wrap;margin-top:18px}.versions button{background:#1c2740;color:#d4dff2;border:1px solid #3b4868;border-radius:7px;padding:7px 10px;font-size:11px}@media(max-width:1120px){.skill-grid{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.sidebar{flex-basis:210px}.topbar,.view{padding-left:26px;padding-right:26px}}@media(max-width:680px){.app-shell{display:block}.sidebar{height:auto;position:relative;padding:14px 14px;display:block}.brand{padding:0 0 14px}.nav-caption,.aside-info,.user-area,.side-spacer{display:none}nav{display:flex;overflow:auto;gap:4px}.nav-item{white-space:nowrap;padding:9px 11px;font-size:11px}.nav-item span{display:none}.topbar{height:48px;padding:0 18px}.topbar-actions .pill{display:none}.view{padding:22px 17px 50px}.hero-icon{display:none}.stats{gap:7px;margin:18px 0 28px}.stats>div{padding:16px 12px;min-height:120px}.stats b{font-size:25px}.stats span{font-size:9px}.skill-grid{grid-template-columns:1fr}.toolbar{flex-direction:column}.toolbar select{min-width:0}.auth-panel{padding:45px 19px}.section-title{align-items:flex-start}.section-title .primary{white-space:nowrap;padding:9px}.hero{min-height:120px}}

[hidden]{display:none!important}

.device-item{border-bottom:1px solid #29354c}.device-item .row-card{border-bottom:0}.device-details{padding:0 5px 15px;font-size:11px;color:#8c9dbc}.device-details summary{cursor:pointer;color:#b4c3df}.device-skill{padding:8px 10px;border-left:2px solid #514c85;margin:7px 0 0 5px;background:#121a2c;border-radius:3px}

/* Upload feedback stays readable on narrow screens; no token is ever displayed here. */
.upload-feedback { margin-top: 1rem; overflow-wrap: anywhere; }
.upload-feedback progress { width: 100%; height: 12px; }
.upload-feedback p { white-space: pre-wrap; font-size: .875rem; }
#uploadLimits { font-size: .875rem; line-height: 1.7; }
.upload-row { flex-wrap: wrap; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* Grid children must be allowed to shrink below long command/filename min-content widths. */
.two-col > *, .panel, .upload-row > *, .row-card > div { min-width: 0; }
.panel pre { max-width: 100%; overflow-x: auto; }
.pick-result, .detail-meta, .row-card small, .device-skill { overflow-wrap: anywhere; }
#toast { max-width: min(400px, calc(100vw - 48px)); overflow-wrap: anywhere; }
@media (max-width: 1120px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .panel { padding: 18px; }
  .upload-row .upload-btn { white-space: normal; flex-basis: 110px; }
  .topbar { gap: 8px; }
  .breadcrumb { min-width: 0; overflow-wrap: anywhere; }
}

/* Password forms retain readable spacing and do not widen narrow screens. */
.auth-form{display:grid;gap:10px}.auth-form input,.setup form input,#passwordForm input,#reauthDialog input{width:100%;min-width:0;box-sizing:border-box}
.setup form,#passwordForm,#reauthForm{display:grid;gap:12px}#reauthDialog{width:min(420px,calc(100vw - 36px))}#authError,#reauthError{color:#f7a3a3;overflow-wrap:anywhere}#passwordForm{margin-top:20px}

.shared-page{max-width:1100px;margin:0 auto;padding:24px;min-width:0}.shared-page .hero{display:block}.shared-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto}.shared-page pre{white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:600px){.shared-page{padding:16px}}
