:root{color-scheme:light;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#050505;background:#d60000;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}button,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation;color:inherit}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible{outline:3px solid #1466d0;outline-offset:3px}textarea:focus-visible{outline:3px solid #1466d0;outline-offset:-4px}[hidden]{display:none!important}
.screen{height:100vh;height:100dvh;min-height:460px;overflow:hidden;padding:10px 18px 18px 10px;position:relative;background:linear-gradient(116deg,rgba(255,211,25,.94) 0 12%,transparent 12%),repeating-linear-gradient(152deg,rgba(5,5,5,.88) 0 8px,rgba(213,0,0,.98) 8px 44px,rgba(244,23,23,.98) 44px 76px,rgba(255,211,25,.92) 76px 86px),#d60000}
.screen:before{background-image:radial-gradient(rgba(5,5,5,.4) 1px,transparent 1.4px);background-size:10px 10px;content:"";inset:0;opacity:.26;pointer-events:none;position:fixed}.shell{display:grid;gap:14px;grid-template-rows:auto minmax(0,1fr);height:100%;min-height:0;position:relative;z-index:1}
.header{align-items:center;background:#ffd319;border:5px solid #050505;border-radius:10px;box-shadow:inset 0 0 0 4px #fff8d7,7px 7px 0 #000e;display:flex;gap:16px;min-width:0;overflow:hidden;padding:10px 16px;position:relative}.header:after{background:#ef1616;bottom:12px;content:"";height:7px;left:88px;position:absolute;right:24px}.header img{display:block;flex:none;height:56px;object-fit:contain;width:56px;z-index:1}.brand-title{min-width:0;padding-bottom:9px;z-index:1}.header h1{font-size:clamp(26px,3.8vh,38px);font-style:italic;font-weight:1000;line-height:1.1;margin:0;padding:0 8px 5px 0;text-shadow:2px 2px 0 #fff,4px 4px 0 #0004;transform:skewX(-7deg);transform-origin:left center}
.layout{display:grid;gap:16px;grid-template-columns:minmax(0,.4fr) minmax(0,.6fr);min-height:0}.panel{border:5px solid #050505;border-radius:10px;box-shadow:7px 7px 0 #000c;background:#fffdf0;min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column}.panel-heading{background:#fff4d6;border-bottom:3px solid #050505;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:62px;flex:none}.panel-heading h2{font-size:17px;font-weight:950;border-left:5px solid #ef1616;margin:0;padding-left:10px}.code-panel h2{border-color:#1e73d6}.button,.small-button{border:2px solid #050505;border-radius:6px;font-size:13px;font-weight:850;min-height:36px;padding:6px 12px;background:#fffdf0}.button{border-width:3px;min-height:40px}.small-button:hover{background:#ffe476}.yellow{background:#ffd319}.yellow:hover:not(:disabled){background:#ffe15a}
textarea{border:0;flex:1;min-height:0;min-width:0;width:100%;padding:18px;font-family:ui-monospace,Consolas,"Microsoft YaHei",monospace;font-size:14px;line-height:1.8;resize:none;background:#fffdf8;tab-size:2;color:#25221b;scrollbar-width:thin}textarea::placeholder{color:#887b60}
.preview-viewport{flex:1;min-height:0;min-width:0;position:relative;overflow:hidden;background:#dcd7cb}.preview-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#fffdf0;color:#a29376;padding:20px;text-align:center;font-size:14px}.frame-stage{position:absolute;inset:0;overflow:hidden}.frame-stage iframe{border:0;background:white;display:block;position:absolute;transform-origin:top left}
.status{position:fixed;right:24px;bottom:24px;z-index:10;background:#fff4d6;border:3px solid #050505;border-radius:7px;box-shadow:4px 4px 0 #000b;padding:10px 14px;font-size:12px;line-height:1.6;margin:0;max-width:calc(100vw - 48px)}.status.error{background:#ffe6df;color:#a90000}
.preview-actions{display:flex;align-items:center;gap:8px}.text-editor{flex:none;padding:12px 14px;border-top:3px solid #050505;background:#fff4d6}.text-editor p{margin:0;color:#655d4b;font-size:13px}.text-editor label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}.text-controls{display:flex;align-items:center;gap:10px}.text-controls textarea{border:2px solid #050505;border-radius:5px;height:82px;min-height:60px;flex:1;padding:8px;font-family:inherit;line-height:1.5}.text-controls button{flex:none}#editButton[aria-pressed=true]{background:#ffd319}
@media(max-width:760px){.screen{height:auto;min-height:100dvh;overflow:visible;padding:8px 16px 20px 8px}.shell{height:auto;gap:14px}.header{border-width:4px;padding:10px 12px;gap:12px;box-shadow:inset 0 0 0 3px #fff8d7,4px 4px 0 #000e}.header img{width:44px;height:44px}.header:after{left:68px;bottom:9px;right:15px;height:5px}.header h1{font-size:clamp(20px,5.5vw,30px)}.layout{grid-template-columns:1fr;gap:16px}.panel{border-width:4px;box-shadow:4px 4px 0 #000c}.code-panel{height:320px}.preview-panel{height:470px}.panel-heading{min-height:56px;padding:8px 12px}.panel-heading h2{font-size:16px}textarea{font-size:16px;padding:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
