:root { color-scheme: light; font-family: "Avenir Next",system-ui,sans-serif; color: #1d2637; background: #f2f4f7; --navy: #1c3565; --muted: #516378; --line: #c5ceda; --paper: #fff; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
p { margin: 0; }
input, select, button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #001f68; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 42px)); margin: auto; }
header { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { text-decoration: none; font-size: .92rem; font-weight: 750; }
.brand { display: inline-flex; gap: 9px; align-items: center; }
.intro { padding: 35px 0 23px; }
h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.07em; line-height: 1.04; }
.intro p { margin-top: 9px; font-size: 1.03rem; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(265px, 330px) minmax(0,1fr); gap: 14px; align-items: start; }
.panel { background: var(--paper); min-width: 0; padding: 18px; border-radius: 13px; border: 1px solid var(--line); }
h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.026em; }
.muted { font-size: .81rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.45; }
.controls > label, #pixels > label { display: block; margin-top: 12px; font-size: .84rem; font-weight: 670; }
.picker { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 5px; position: relative; }
#file { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.picker:has(#file:focus-visible) label { outline: 2px solid var(--navy); outline-offset: 4px; }
button, .button { border-radius: 7px; border: 1px solid var(--line); color: inherit; background: #edf2f7; font-size: .83rem; font-weight: 690; padding: 8px 10px; min-height: 37px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
button:hover, .button:hover { background: #dbe6f4; }
button:disabled, .picker:has(#file:disabled) label { opacity: .5; cursor: default; }
.accent { background: var(--navy); color: white; border-color: var(--navy); }
.accent:hover { background: #304e86; }
select, input[type=number] { display: block; width: 100%; margin-top: 4px; min-height: 39px; color: inherit; border-radius: 7px; border: 1px solid var(--line); background: #f5f8fb; padding: 6px 9px; }
.row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.row label { font-size: .83rem; font-weight: 670; }
.note { margin-top: 12px; padding: 9px; font-size: .83rem; line-height: 1.4; color: #193861; background: #eef4fc; border-radius: 7px; }
.note[data-error=true] { color: #813314; background: #fff0e7; }
.preview-head { display: flex; align-items: baseline; justify-content: space-between; gap: 7px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.stage { background: #e7ecf3; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; min-height: 185px; padding: 9px; overflow: hidden; }
#preview { display: block; max-width: 100%; max-height: 438px; width: auto; height: auto; object-fit: contain; cursor: crosshair; background-color: white; background-image: conic-gradient(#d2dbe7 25%,#fff 0 50%,#d2dbe7 0 75%,#fff 0); background-size: 16px 16px; }
#empty { color: var(--muted); font-size: .86rem; }
.tile-details { display: flex; gap: 7px 11px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.tile-details label { font-size: .82rem; font-weight: 690; }
.tile-details select { width: auto; min-width: 84px; margin: 0; }
.exports { border-top: 1px solid var(--line); padding-top: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.buttons { display: flex; gap: 6px; flex-wrap: wrap; }
progress { width: 100%; margin: 4px 0 0; }
footer { display: flex; gap: 15px; padding: 19px 0; font-size: .85rem; color: var(--muted); }
.policy { max-width: 720px; padding-top: 30px; line-height: 1.65; }
.policy h1 { font-size: 2.4rem; }
.policy h2 { margin: 18px 0 6px; }
.policy p { margin-bottom: 8px; }
@media (max-width: 740px) { .workspace { grid-template-columns: minmax(0,1fr); } .intro { padding: 25px 0 19px; } }
@media (max-width: 430px) { .shell { width: calc(100% - 24px); } .panel { padding: 12px; } }
