
/* Universal UI Lab — production baseline for Safari/iOS/iPadOS */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth;line-height:1.5}
body,h1,h2,h3,h4,h5,p,figure{margin:0} body{margin:0}
button,input,select,textarea{font:inherit;font-size:100%;line-height:1.5;margin:0;color:inherit}
button,input{overflow:visible} button,select{text-transform:none}
button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}
[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
img,svg{max-width:100%;display:block} a{color:inherit} details{display:block} summary{display:list-item}
:root{
 color-scheme:light dark;
 --bg:#f5f6f8;--surface:#fff;--surface2:#fafbfc;--surface3:#f1f3f5;
 --text:#17191d;--muted:#69707c;--muted2:#9299a3;--border:#dfe3e8;--border2:#cbd1d9;
 --primary:#2563eb;--primary2:#1d4ed8;--primarySoft:#eef4ff;
 --ok:#16834b;--okSoft:#edf8f2;--warn:#a56516;--warnSoft:#fff7e8;--bad:#c43e3e;--badSoft:#fff0f0;
 --shadow:0 1px 2px rgba(20,25,35,.03),0 8px 24px rgba(20,25,35,.04);
 --r8:8px;--r10:10px;--r12:12px;--r16:16px;--s4:4px;--s8:8px;--s12:12px;--s16:16px;--s24:24px;--s32:32px;
 --content:1440px;--control:44px;--buttonVisual:40px;--hitExpand:2px;
}
/* Theme system: Auto / Standard Light / Comfort Dark */
:root[data-theme="light"]{
 color-scheme:light;
 --bg:#f5f6f8;--surface:#ffffff;--surface2:#fafbfc;--surface3:#f1f3f5;
 --text:#17191d;--muted:#69707c;--muted2:#9299a3;--border:#dfe3e8;--border2:#cbd1d9;
 --primary:#2563eb;--primary2:#1d4ed8;--primarySoft:#eef4ff;
 --ok:#16834b;--okSoft:#edf8f2;--warn:#a56516;--warnSoft:#fff7e8;--bad:#c43e3e;--badSoft:#fff0f0;
 --shadow:0 1px 2px rgba(20,25,35,.03),0 8px 24px rgba(20,25,35,.04);
}
:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#17191e;--surface:#202329;--surface2:#1c1f24;--surface3:#282c33;
 --text:#eef1f5;--muted:#b3bac4;--muted2:#8f97a3;--border:#343941;--border2:#454b55;
 --primary:#7ea8ff;--primary2:#96b8ff;--primarySoft:#26344f;
 --ok:#5fca8a;--okSoft:#203329;--warn:#e1ac5a;--warnSoft:#362d20;--bad:#ef8181;--badSoft:#382426;
 --shadow:0 1px 2px rgba(0,0,0,.12),0 10px 28px rgba(0,0,0,.14);
}
@media(prefers-color-scheme:dark){
 :root:not([data-theme]){
  color-scheme:dark;
  --bg:#17191e;--surface:#202329;--surface2:#1c1f24;--surface3:#282c33;
  --text:#eef1f5;--muted:#b3bac4;--muted2:#8f97a3;--border:#343941;--border2:#454b55;
  --primary:#7ea8ff;--primary2:#96b8ff;--primarySoft:#26344f;
  --ok:#5fca8a;--okSoft:#203329;--warn:#e1ac5a;--warnSoft:#362d20;--bad:#ef8181;--badSoft:#382426;
  --shadow:0 1px 2px rgba(0,0,0,.12),0 10px 28px rgba(0,0,0,.14);
 }
}
body{min-width:320px;min-height:100vh;min-height:100svh;overflow-x:hidden;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;font-size:16px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,a,label,summary{-webkit-tap-highlight-color:transparent}:focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 30%,transparent);outline-offset:2px}
.container{width:min(calc(100% - 32px),var(--content));margin-inline:auto}
.topbar{position:sticky;top:0;z-index:100;padding-top:env(safe-area-inset-top);background:color-mix(in srgb,var(--bg) 94%,transparent);border-bottom:1px solid var(--border);-webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%)}
.top-main{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;gap:10px;align-items:center;min-width:0}.mark{width:36px;height:36px;border-radius:10px;background:var(--text);color:var(--bg);display:grid;place-items:center;font-size:11px;font-weight:800}.brand b{font-size:15px}.brand small{display:block;font-size:12px;color:var(--muted);margin-top:1px}.ready{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.ready::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--ok)}
.header-tools{display:flex;align-items:center;gap:10px}
.theme-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}
.theme-btn{min-height:32px;padding:0 9px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;cursor:pointer}
.theme-btn[aria-pressed="true"]{background:var(--surface);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.theme-btn:focus-visible{outline:2px solid color-mix(in srgb,var(--primary) 40%,transparent);outline-offset:1px}

.nav{display:flex;gap:0;overflow:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.nav::-webkit-scrollbar{display:none}.nav a{position:relative;flex:0 0 auto;min-height:44px;display:flex;align-items:center;padding:0 14px;text-decoration:none;color:var(--muted);font-size:13px;font-weight:600}.nav a:hover{color:var(--text)}.nav a:first-child{color:var(--text)}.nav a:first-child::after{content:"";position:absolute;left:14px;right:14px;bottom:0;height:2px;background:var(--primary);border-radius:2px}
main{padding:28px 0 calc(40px + env(safe-area-inset-bottom))}.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:end;padding:4px 0 26px}.hero h1{font-size:32px;line-height:1.15;letter-spacing:-.035em}.hero p{font-size:16px;color:var(--muted);line-height:1.65;max-width:690px}
.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metric{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.metric strong{font-size:22px;line-height:1.2;display:block}.metric span{font-size:12px;color:var(--muted);display:block;margin-top:4px}
.domain{margin-top:36px;scroll-margin-top:108px}.domain-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}.domain-title{display:flex;gap:9px;align-items:center}.domain-no{font-size:12px;color:var(--muted2)}.domain h2{font-size:22px;line-height:1.3;letter-spacing:-.02em}.domain-note{font-size:14px;color:var(--muted)}
.screen-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.screen-card{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:14px;box-shadow:var(--shadow)}.screen-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.screen-meta h3{font-size:16px;line-height:1.3}.screen-meta p{font-size:12px;color:var(--muted);margin-top:2px}.score{min-width:62px;height:30px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--ok) 30%,var(--border));border-radius:999px;background:var(--okSoft);color:var(--ok);font-size:12px;font-weight:700}
.screen{overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--surface2)}.screen-bar{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid var(--border);background:var(--surface);font-size:11px;color:var(--muted)}.screen-bar b{color:var(--text);font-size:12px}.screen-content{padding:12px}.app-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.app-head h4{font-size:18px;line-height:1.25}.app-head p{font-size:12px;color:var(--muted);margin-top:2px}
.actions,.toolbar-group{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.btn{position:relative;min-height:var(--buttonVisual);display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 14px;border:1px solid var(--border2);border-radius:10px;background:var(--surface);color:var(--text);font-size:13px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer}.btn::after{content:"";position:absolute;inset:calc(-1 * var(--hitExpand)) 0}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.soft{background:var(--surface2)}.btn.small{min-height:34px;padding-inline:10px;font-size:12px}.btn.icon{width:40px;padding:0}.btn:disabled{opacity:.45}.btn:active{transform:scale(.985)}
.field{display:grid;gap:6px;min-width:0}.field label{font-size:12px;font-weight:600}.control{width:100%;min-height:var(--control);padding:0 11px;border:1px solid var(--border2);border-radius:9px;background:var(--surface);color:var(--text);font-size:16px;outline:0}.control:focus{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent)}textarea.control{min-height:92px;padding:9px 11px;resize:vertical}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.four{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.stack{display:grid;gap:10px}
.panel{padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.soft-panel{background:var(--surface2)}.badge{min-height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--muted);font-size:10px;font-weight:600;white-space:nowrap}.badge.ok{color:var(--ok);background:var(--okSoft)}.badge.warn{color:var(--warn);background:var(--warnSoft)}.badge.bad{color:var(--bad);background:var(--badSoft)}.badge.primary{color:var(--primary);background:var(--primarySoft)}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0}.stat{padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}.stat strong{display:block;font-size:17px;line-height:1.2}.stat span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.list{display:grid}.list-item{min-height:50px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;border-bottom:1px solid var(--border)}.list-item:last-child{border-bottom:0}.icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:9px;background:var(--surface2);font-size:10px;font-weight:700}.avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:var(--primarySoft);color:var(--primary);font-size:10px;font-weight:700}.item-main{min-width:0}.item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-sub{font-size:10px;color:var(--muted);margin-top:1px}
.progress{height:5px;overflow:hidden;border-radius:999px;background:var(--border);margin-top:6px}.progress span{display:block;height:100%;background:var(--primary);border-radius:inherit}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.table-wrap{overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:9px}table{width:100%;min-width:580px;border-collapse:collapse;background:var(--surface)}th,td{padding:9px 10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle;font-size:11px}th{background:var(--surface2);color:var(--muted);font-size:9px;font-weight:600}tr:last-child td{border-bottom:0}
.hero-block{min-height:110px;border:1px solid var(--border);border-radius:10px;background:linear-gradient(135deg,var(--primarySoft),var(--surface));padding:12px;display:flex;flex-direction:column;justify-content:flex-end}.hero-block h5{font-size:15px}.hero-block p{font-size:10px;color:var(--muted);margin-top:2px}
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.product{padding:8px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.thumb{height:76px;border:1px solid var(--border);border-radius:8px;background:linear-gradient(145deg,var(--surface3),var(--surface));display:grid;place-items:center;color:var(--muted2);font-size:10px}.product h5{font-size:12px;margin-top:7px}.product p{font-size:10px;color:var(--muted);margin-top:2px}.price{font-size:13px;font-weight:700;margin-top:5px}
.post{padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);margin-top:8px}.post-head{display:flex;align-items:center;gap:8px}.post-copy{font-size:11px;margin-top:8px;line-height:1.5}.post-media{height:104px;margin-top:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface3)}.post-actions{display:flex;gap:14px;margin-top:8px;color:var(--muted);font-size:10px}
.message{padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface2);font-size:11px}.message b{display:block;margin-bottom:2px}.message.info{background:var(--primarySoft)}.message.ok{background:var(--okSoft)}.message.warn{background:var(--warnSoft)}.message.bad{background:var(--badSoft)}
.chart{height:120px;display:flex;align-items:end;gap:7px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.bar{flex:1;border-radius:5px 5px 2px 2px;background:var(--primarySoft);border:1px solid color-mix(in srgb,var(--primary) 25%,var(--border))}
.seat-map{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.seat{aspect-ratio:1;border-radius:4px;background:var(--surface3);border:1px solid var(--border)}.seat.sel{background:var(--primary)}.seat.busy{background:var(--border2)}
.car-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.car{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--surface)}.car-img{height:88px;background:linear-gradient(145deg,var(--surface3),var(--surface));display:grid;place-items:center;font-size:11px;color:var(--muted2)}.car-body{padding:9px}.car h5{font-size:12px}.car p{font-size:10px;color:var(--muted);margin-top:2px}
.compare{display:grid;grid-template-columns:130px repeat(3,1fr);border:1px solid var(--border);border-radius:10px;overflow:hidden}.compare>div{padding:8px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);font-size:10px;background:var(--surface)}.compare>div:nth-child(4n){border-right:0}.compare .head{background:var(--surface2);font-weight:700}
.timeline{display:grid}.timeline-row{display:grid;grid-template-columns:22px 1fr;gap:8px;min-height:54px}.timeline-mark{position:relative}.timeline-mark::after{content:"";position:absolute;left:7px;top:10px;width:8px;height:8px;border-radius:50%;background:var(--primary)}.timeline-mark::before{content:"";position:absolute;left:10px;top:18px;bottom:-8px;width:1px;background:var(--border)}.timeline-row:last-child .timeline-mark::before{display:none}.timeline-row b{font-size:11px}.timeline-row p{font-size:10px;color:var(--muted);margin-top:2px}
.kpi-ring{width:86px;height:86px;border-radius:50%;background:conic-gradient(var(--primary) 0 78%,var(--surface3) 78% 100%);display:grid;place-items:center}.kpi-ring::after{content:"78%";width:64px;height:64px;border-radius:50%;background:var(--surface);display:grid;place-items:center;font-size:14px;font-weight:700}
.audit{margin-top:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface2);overflow:hidden}.audit summary{min-height:40px;padding:0 10px;display:flex;align-items:center;cursor:pointer;font-size:11px;font-weight:600}.audit-body{padding:0 10px 10px}.audit-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:5px 0;border-bottom:1px solid var(--border);font-size:10px}.audit-row:last-child{border-bottom:0}.pass{color:var(--ok);font-weight:700}.note{color:var(--warn);font-weight:700}
.footer{padding:38px 0 10px;text-align:center;color:var(--muted);font-size:12px}
@media(max-width:1080px){.hero{grid-template-columns:1fr}.screen-grid{grid-template-columns:1fr}.summary{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.theme-btn{padding-inline:8px;font-size:11px}.ready{display:none}.header-tools{gap:6px}.container{width:min(calc(100% - 24px),var(--content))}.brand small{display:none}.hero h1{font-size:28px}.hero p{font-size:15px}.domain{margin-top:28px}.domain-head{align-items:flex-start;flex-direction:column;gap:4px}.summary,.two,.three,.four,.product-grid,.stat-grid,.car-grid{grid-template-columns:1fr}.screen-card{padding:10px}.screen-content{padding:10px}.compare{grid-template-columns:100px repeat(3,160px);overflow:auto}.toolbar,.toolbar-group{width:100%}.toolbar-group .btn{flex:1}.btn{min-height:40px}.btn::after{inset:-2px 0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
@media(hover:hover){.btn:hover{border-color:var(--primary)}.btn.primary:hover{background:var(--primary2)}}
