* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: #111; }
.layout { display: flex; height: 100vh; }
.sidebar { width: 240px; border-right: 1px solid #ddd; padding: 1rem; overflow-y: auto; }
.sidebar h1 { font-size: 1rem; margin: 0 0 1rem; }
.sidebar h3 { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #888; margin: 1rem 0 .25rem; }
.nav-item { display: block; width: 100%; text-align: left; padding: .4rem; border: 0; border-radius: 4px; background: none; cursor: pointer; font-size: .9rem; }
a.nav-item { color: inherit; text-decoration: none; }
.nav-item:hover { background: #f3f3f3; }
.nav-item.active { background: #111; color: #fff; }
.stage { flex: 1; display: flex; flex-direction: column; padding: 1rem; gap: .75rem; min-width: 0; }
.toolbar { display: flex; align-items: center; gap: 1rem; }
.toolbar #title { font-weight: 600; }
.toolbar #sizes { display: flex; gap: .25rem; }
.toolbar #sizes button { padding: .2rem .6rem; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: .8rem; }
.toolbar #sizes button.active { background: #111; color: #fff; border-color: #111; }
.toolbar #copy { margin-left: auto; padding: .3rem .8rem; border: 1px solid #111; background: #fff; border-radius: 4px; cursor: pointer; }
.preview-wrap { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; background: #f4f4f5; border: 1px solid #e3e3e3; border-radius: 6px; padding: 1rem; }
#preview { flex: none; border: 1px solid #ccc; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.controls { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.controls:empty { display: none; }
.controls button { padding: .2rem .6rem; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: .8rem; }
.controls button.active { background: #111; color: #fff; border-color: #111; }
details summary { cursor: pointer; font-size: .85rem; color: #555; }
textarea { width: 100%; height: 180px; margin-top: .5rem; font-family: ui-monospace, monospace; font-size: .8rem; padding: .5rem; border: 1px solid #ccc; border-radius: 6px; }
#usage { margin: .5rem 0 0; padding: .5rem; background: #f4f4f5; border: 1px solid #e3e3e3; border-radius: 6px; font-size: .8rem; overflow-x: auto; }
#bundle { max-height: 320px; overflow: auto; }
button.copy { float: right; margin: -1.6rem 0 0; padding: .2rem .6rem; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: .75rem; }
