:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#333333;background:#ffffff;--review-canvas:#f2f2f2;--scroll-thumb:#b5b5b5;--scroll-track:#f3f3f3;--scroll-hover:#8b8b8b;--scroll-active:#666666;scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}
*{box-sizing:border-box;scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:8px}
::-webkit-scrollbar-track{background:var(--scroll-track)}
::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover)}
::-webkit-scrollbar-thumb:active{background:var(--scroll-active)}
body{margin:0}
button,select,a,input{font:inherit}
button,select,a,input[type=checkbox]{cursor:pointer}
button:hover,a:hover{filter:brightness(.94)}
button:active{transform:translateY(1px)}
:focus-visible{outline:3px solid #666666;outline-offset:3px}
a{color:inherit;text-decoration:none}
.studio{height:56px;border-bottom:1px solid #e5e5e5;display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:#ffffff;flex-shrink:0}
.brand{display:flex;gap:10px;align-items:center;font-size:19px;font-weight:650}
.brand-mark{width:32px;height:32px;display:grid;place-items:center;border:1px solid #aaaaaa;font-family:SimSun,serif;font-weight:400}
.brand small{font-size:10px;color:#777777;display:block;font-weight:400;letter-spacing:.7px;margin-top:1px}
.studio-actions{display:flex;align-items:center;gap:22px}
.readme{white-space:nowrap;font-size:12px;color:#555555}
.draft{font-size:11px;border:1px solid #dddddd;border-radius:20px;padding:5px 11px;color:#666666}
.compare-layout{display:grid;grid-template-columns:246px minmax(0,1fr);gap:16px;margin:0 auto;padding:14px 18px;max-width:2040px}
.scheme-library{min-width:0;min-height:0;display:flex;flex-direction:column}
.library-heading{display:flex;align-items:center;justify-content:space-between;padding:1px 3px 12px;gap:9px;flex-shrink:0}
.library-heading h1{font-size:15px;font-weight:600;margin:0}
.library-heading>span{font-size:11px;color:#777777}
.directions{display:flex;flex-direction:column;gap:8px;min-height:0;padding:2px 4px 4px 2px;overflow:auto;overscroll-behavior:contain}
.direction{display:grid;grid-template-columns:31px minmax(0,1fr);gap:3px 8px;position:relative;text-align:left;background:#ffffff;border:1px solid #e5e5e5;border-left:3px solid var(--accent);padding:11px 10px;border-radius:7px;min-width:0;flex-shrink:0;color:#3d3d3d;transition:background .12s}
.direction-top{display:contents}
.letter{grid-column:1;grid-row:1/3;font-size:25px;line-height:1.25;align-self:center;color:var(--accent);font-family:Arial,"Microsoft YaHei",sans-serif;font-variant-numeric:tabular-nums}
.direction strong{grid-column:2;grid-row:1;font-size:14px;font-weight:600;line-height:1.5;padding-right:22px}
.short{grid-column:2;grid-row:2;font-size:11px;line-height:1.5;color:#777777}
.direction>span:not(.direction-top){grid-column:1/-1;font-size:11px;line-height:1.5;color:#737373;margin-top:4px}
.direction.selected{border-color:#777777;background:#fff;box-shadow:0 0 0 1px #77777744}
.direction.compared:not(.selected){border-right:3px solid #aaaaaa;background:#ffffff}
.direction[data-side]:not([data-side=""]):after{content:attr(data-side);position:absolute;top:9px;right:8px;font-size:9px;color:#777777;background:#f2f2f2;border-radius:4px;padding:1px 4px;line-height:1.6}
.workspace{min-width:0;min-height:0;background:#ffffff;border:1px solid #e3e3e3;border-radius:10px;display:flex;flex-direction:column;overflow:hidden}
.controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 20px;padding:10px 17px;background:#ffffff;border-bottom:1px solid #e5e5e5;font-size:12px;flex-shrink:0;min-height:57px}
.control-group{display:flex;align-items:center;gap:8px}
.controls label{color:#6b6b6b}
select{min-height:34px;border:1px solid #d8d8d8;border-radius:5px;color:#444444;background:#fff;padding:5px 22px 5px 9px}
.controls #page{min-width:120px}
.compare-check{display:flex;gap:6px;align-items:center;white-space:nowrap}
.compare-check input{accent-color:#666666;width:16px;height:16px;margin:0}
.controls button{border:1px solid #dddddd;background:#ffffff;color:#666666;min-height:34px;padding:6px 12px;border-radius:5px}
.preview-area{background:var(--review-canvas);position:relative;min-height:0;min-width:0;flex:1;display:flex}
.preview-meta{position:absolute;top:16px;left:17px;width:334px;z-index:2;display:flex;flex-direction:column;gap:14px}
.stage-info{padding:11px;border:1px solid #dedede;border-left:3px solid var(--accent);border-radius:8px;background:#ffffff}
.preview-meta .stage-head{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:0}
.preview-meta .stage-head label{width:100%;gap:7px;font-size:10px;white-space:nowrap}
.preview-meta .stage-head select{width:100%;flex:1;min-width:0;padding-left:6px;font-size:11px}
.preview-meta .stage-head a{font-size:10px;align-self:flex-start;padding:5px 0}
.preview-meta .stage-desc{margin:8px 0 0;font-size:14px;line-height:1.8;color:#555555}
.preview-meta .stage-summary{display:block;white-space:nowrap}
.preview-meta .stage-page{display:block;margin-top:2px;font-size:12px;color:#777777}
.frames{min-height:0;min-width:0;flex:1;display:flex;justify-content:safe center;align-items:stretch;gap:28px;padding:14px 20px;overflow:auto;overscroll-behavior:contain}
.stage{width:var(--phone-width);flex:0 0 var(--phone-width);min-height:0;display:flex;flex-direction:column}
.stage-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;flex-shrink:0;min-height:35px}
.stage-head label{display:flex;gap:8px;align-items:center;color:#777777;min-width:0}
.stage-head select{font-size:12px;max-width:247px;min-width:0;min-height:34px}
.stage-head a{color:#555555;white-space:nowrap;font-size:11px;padding:6px 0}
.stage-desc{font-size:10px;line-height:1.6;color:#777777;margin:8px 0 12px;flex-shrink:0;min-height:16px}
.stage-desc span{color:#555555}
.device{background:#fff;border-radius:21px;box-shadow:0 8px 24px #00000012,0 0 0 1px #d6d6d6;overflow:hidden;min-height:0;max-height:920px;flex:1}
.device iframe{width:100%;height:100%;border:0;display:block;background:#fff}
/* Only the comparison tool is viewport-bound. Phones and the library own their scrolling. */
@media(min-width:1180px){body:has(.compare-layout){height:100dvh;overflow:hidden;display:flex;flex-direction:column}.compare-layout{height:calc(100dvh - 56px);width:100%;flex:1;min-height:0}}
@media(min-width:1180px) and (max-width:1749px){.preview-area{flex-direction:column}.preview-meta{position:static;width:auto;margin:12px 17px 0;flex-direction:row;gap:12px;flex-shrink:0;overflow-x:auto}.stage-info{width:334px;flex:0 0 334px;padding:9px 11px}.preview-meta .stage-head{flex-direction:row;align-items:center;gap:10px}.preview-meta .stage-head label{flex:1;min-width:0}.preview-meta .stage-head select{width:auto}.preview-meta .stage-head a{align-self:center}.preview-meta .stage-desc{margin-top:5px}.frames{padding:14px 20px}}
@media(min-width:1180px) and (max-height:900px){.directions{gap:6px}.direction{padding:8px 10px;gap:2px 8px}.direction strong{line-height:1.35}.direction>span:not(.direction-top){line-height:1.4;margin-top:2px}}
@media(max-width:1179px){.compare-layout{display:flex;flex-direction:column;padding:14px;gap:14px}.directions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;padding:2px;gap:8px}.library-heading{padding-bottom:9px}.direction{padding:9px;gap:2px 6px}.direction>span:not(.direction-top){margin-top:2px}.frames{justify-content:flex-start;gap:24px;min-height:0;padding:17px}.stage{height:860px;flex-shrink:0}.device{flex:1;max-height:780px}.controls{gap:10px 16px}}
@media(max-width:1179px){.preview-area{display:flex;flex-direction:column}.preview-meta{position:static;width:auto;display:flex;flex-direction:row;gap:12px;margin:13px 17px 0;overflow-x:auto;flex-shrink:0}.device{max-height:860px}}
@media(max-width:650px){.studio{height:56px;padding:0 14px}.brand{font-size:17px;gap:8px}.studio-actions{gap:12px}.readme{font-size:11px}.draft{font-size:10px;padding:4px 8px}.compare-layout{padding:12px;gap:12px}.directions{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.direction>span:not(.direction-top){display:none}.direction strong{font-size:12px}.letter{font-size:22px}.controls{padding:11px;gap:10px 12px}.controls #page{min-width:108px}.stage-head select{max-width:225px}}
@media(prefers-reduced-motion:reduce){*{transition:none;scroll-behavior:auto}}
@media(forced-colors:active){*{scrollbar-color:auto}.direction.selected{border:2px solid Highlight}.direction.compared{border-color:Highlight}}

.preview-meta .stage-info{flex-shrink:0}
@media(max-width:1179px){.preview-meta .stage-info{width:334px;flex-basis:334px}}

@media(max-width:650px){.studio{height:auto;min-height:56px;flex-wrap:wrap;gap:10px;padding-top:10px;padding-bottom:10px}.studio-actions{flex-wrap:wrap;gap:12px}}

.control-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}

.overview-mode #previewMeta{display:none}
.overview-mode .frames{gap:12px;padding:14px 12px;justify-content:safe center}
.overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:30px;margin-bottom:8px;flex-shrink:0;color:#555;font-size:12px}
.overview-heading strong{font-size:13px;font-weight:600}
.overview-heading a{font-size:11px;white-space:nowrap}
.overview-mode .direction.selected{box-shadow:0 0 0 1px #777}
.controls select:disabled{cursor:default;background:#f5f5f5;color:#888}
.direction.selected{box-shadow:0 0 0 1px #77777744}

.gallery-link{font-size:12px;color:#555;text-decoration:none;white-space:nowrap;padding:7px 0}.gallery-link:hover{text-decoration:underline}
