/* The skin designer, drawn as on the skins canvas: Lumen dark chrome around previews in the skin's own colours. */
@font-face { font-family: Geist; src: url("/fonts/geist-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url("/fonts/geist-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url("/fonts/geist-semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-hyperlegible-next.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans.ttf") format("truetype"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

:root { color-scheme: dark; --lime: #d7ff3b; --blue: #5cc8ff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: #f4f4f5; font: 400 14px/20px Geist, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .3; }
a { color: var(--lime); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.muted { color: #a1a1aa; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 980px) { .app { height: 100vh; } }

header.top { flex: none; min-height: 64px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 16px 8px 24px; border-bottom: 1px solid #17171a; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: max-content; }
.brand img { border-radius: 8px; }
.brand b { font: 600 17px/24px Geist, sans-serif; letter-spacing: -0.02em; }
.brand .vr { width: 1px; height: 20px; background: #26262b; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who input { width: 16ch; max-width: 40vw; font: 600 15px/22px Geist, sans-serif; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; text-overflow: ellipsis; }
.who input:hover { border-color: #26262b; }
.who input:focus { border-color: #3f3f46; outline: none; }
.actions { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; justify-content: flex-end; flex-wrap: wrap; margin-left: auto; }
.sep { width: 1px; height: 20px; background: #26262b; margin: 0 8px; }

.ib { width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.ib:hover:not(:disabled) { background: #17171a; }
.btn { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #3f3f46; font: 600 14px/20px Geist, sans-serif; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; color: #f4f4f5; text-decoration: none; }
.btn:hover:not(:disabled) { background: #17171a; }
.btn.go { background: var(--lime); border-color: var(--lime); color: #000; }
.btn.go:hover { background: #e4ff7a; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; font-weight: 500; }
.kbd { font: 400 11px/16px "Geist Mono", monospace; color: #71717a; border: 1px solid #26262b; border-radius: 6px; padding: 1px 6px; }

.shared { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; min-height: 56px; padding: 8px 16px 8px 24px; background: #0e0e10; border-bottom: 1px solid #17171a; }
.shared p { flex: 1; min-width: 240px; margin: 0; }
.shared.bad p { color: #f4f4f5; }

.body { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; }
aside { flex: 0 0 380px; max-width: 100%; border-right: 1px solid #17171a; overflow: auto; }
@media (min-width: 980px) { aside { height: 100%; } }
main.preview { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; background: #08080a; }
@media (min-width: 980px) { main.preview { height: 100%; } }
.pad { padding: 24px; }
.sec { padding: 20px 24px; border-top: 1px solid #17171a; }
.sh { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 13px/18px Geist, sans-serif; color: #a1a1aa; }
.sh a, .sh button.link { display: flex; align-items: center; gap: 6px; font-weight: 400; color: #a1a1aa; text-decoration: none; }
.sh a:hover, .sh button.link:hover { color: #f4f4f5; }
.note { margin: 0; font: 400 13px/18px Geist, sans-serif; color: #a1a1aa; }

.seg { display: flex; min-height: 40px; border-radius: 20px; background: #17171a; border: 1px solid #26262b; padding: 3px; }
.seg > * { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 17px; font: 500 13px/18px Geist, sans-serif; color: #a1a1aa; white-space: nowrap; text-decoration: none; }
.seg > .on { background: #3f3f46; color: #f4f4f5; }
.seg > :hover:not(.on) { color: #f4f4f5; }

.role { display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px 52px; align-items: center; column-gap: 12px; height: 48px; border-radius: 12px; margin: 0 -8px; padding: 0 8px; }
.role:hover { background: #0e0e10; }
.role input[type=color] { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #3f3f46; padding: 0; background: none; cursor: pointer; overflow: hidden; }
.role input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.role input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.role input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.role .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role .nm small { display: block; font-size: 12px; line-height: 16px; color: #71717a; }
.role .hx { width: 96px; height: 32px; border-radius: 16px; background: #000; border: 1px solid #26262b; padding: 0 12px; font: 400 12px/16px "Geist Mono", monospace; }
.role .r { text-align: right; font: 400 12px/16px "Geist Mono", monospace; color: #a1a1aa; }
.role .r.low { color: #f4f4f5; text-decoration: underline dotted #71717a; }
.more { margin-top: 8px; height: 40px; width: 100%; display: flex; align-items: center; justify-content: space-between; font: 500 14px/20px Geist, sans-serif; color: #a1a1aa; }
.more:hover { color: #f4f4f5; }

input[type=range] { width: 100%; margin: 0; accent-color: var(--lime); }
.ticks { display: flex; justify-content: space-between; margin-top: 8px; font: 400 13px/18px Geist, sans-serif; color: #a1a1aa; }
.fld { display: flex; flex-direction: column; gap: 6px; font: 400 13px/18px Geist, sans-serif; color: #a1a1aa; }
.fld .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sel { height: 40px; border-radius: 20px; background: #000; border: 1px solid #26262b; padding: 0 14px; font: 400 14px/20px Geist, sans-serif; color: #f4f4f5; width: 100%; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.tile { min-height: 36px; padding: 6px 12px; border-radius: 12px; border: 1px solid #26262b; background: #0e0e10; display: flex; flex-direction: column; justify-content: center; font: 500 13px/18px Geist, sans-serif; color: #f4f4f5; text-align: left; }
.tile small { font-weight: 400; font-size: 12px; line-height: 16px; color: #71717a; }
.tile:hover { border-color: #3f3f46; }
.h3 { margin: 12px 0 8px; font: 500 12px/16px Geist, sans-serif; color: #71717a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #26262b; font: 500 13px/18px Geist, sans-serif; color: #f4f4f5; }
.chip:hover { border-color: #3f3f46; }
.tok { height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid #26262b; font: 400 12px/16px "Geist Mono", monospace; color: #f4f4f5; }
.tok.on { background: var(--lime); border-color: var(--lime); color: #000; font-family: Geist, sans-serif; font-weight: 500; }
.swrow { display: flex; align-items: center; justify-content: space-between; min-height: 40px; color: #f4f4f5; width: 100%; gap: 8px; }
.sw { flex: none; width: 44px; height: 26px; border-radius: 13px; background: #17171a; border: 2px solid #3f3f46; position: relative; }
.sw::after { content: ""; position: absolute; left: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #a1a1aa; }
.sw.on { background: var(--lime); border: 0; }
.sw.on::after { left: 21px; width: 20px; height: 20px; margin-top: -10px; background: #000; }

.bar { flex: none; min-height: 64px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 12px 24px; border-bottom: 1px solid #17171a; }
.stage { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 40px; padding: 32px; }
figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
figcaption { display: flex; align-items: center; gap: 12px; font: 400 12px/16px "Geist Mono", monospace; color: #a1a1aa; }
figcaption .swrow { min-height: 0; font: 400 13px/18px Geist, sans-serif; color: #a1a1aa; }
.foot { flex: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 24px; border-top: 1px solid #17171a; font: 400 13px/18px Geist, sans-serif; color: #a1a1aa; }
.foot .mono { font-size: 12px; color: #71717a; }

/* The previews: a screen laid out in dp, scaled into its frame. */
.frame { position: relative; overflow: hidden; flex: none; }
.screen { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: flex; flex-direction: column; box-sizing: border-box; font-family: var(--sans); --art: linear-gradient(160deg, #5b3c6e, #2f5466); --art2: linear-gradient(160deg, #2f5466, #3f6e5a); }
.np-ic { display: flex; align-items: center; justify-content: center; flex: none; }
.np-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-cover { aspect-ratio: 1; flex: none; display: flex; align-items: center; justify-content: center; }
.np-part { touch-action: none; user-select: none; -webkit-user-select: none; }
.editing .np-part { cursor: grab; }
.np-part.on { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 10px; z-index: 3; }
.np-tag { position: absolute; left: -6px; top: -34px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--blue); color: #000; font: 600 12px/24px Geist, sans-serif; white-space: nowrap; pointer-events: none; z-index: 9; }
.np-drop { position: absolute; border-radius: 2px; background: var(--blue); pointer-events: none; z-index: 10; }
.np-over { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 6px 12px; border-radius: 14px; background: #0e0e10; border: 1px solid #3f3f46; font: 500 12px/16px Geist, sans-serif; color: #f4f4f5; white-space: nowrap; pointer-events: none; }
.np-off { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(8,8,10,.92) 0 10px, rgba(24,24,28,.92) 10px 20px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.np-off span { padding: 10px 16px; border-radius: 16px; background: #0e0e10; border: 1px solid #3f3f46; text-align: center; font: 600 14px/20px Geist, sans-serif; color: #f4f4f5; }
.np-off small { font-weight: 400; font-size: 13px; line-height: 18px; color: #a1a1aa; }

/* Popovers: Share and the Quick guide. */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; }
.pop { position: fixed; z-index: 21; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 88px); overflow: auto; border-radius: 20px; background: #0e0e10; border: 1px solid #26262b; box-shadow: 0 12px 32px rgba(0,0,0,.8); }
.pop h2 { margin: 0; font: 600 20px/26px Geist, sans-serif; letter-spacing: -0.01em; }
.pop .in { padding: 24px 24px 0; }
.pop .qr { padding: 20px 24px; display: flex; justify-content: center; }
/* As wide as the box allows: a skin's code is dense, and a phone across the desk needs each square big. */
.pop .qr div { box-sizing: border-box; width: 100%; max-width: 392px; aspect-ratio: 1; padding: 16px; border-radius: 16px; background: #f4f4f5; }
.pop .qr svg { width: 100%; height: 100%; display: block; }
.pop .big { margin: 20px 24px 0; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: #000; border: 1px solid #26262b; }
.pop .big .dash { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 1px dashed #3f3f46; display: flex; align-items: center; justify-content: center; }
.pop .linkrow { display: flex; gap: 8px; }
.pop .linkrow input { flex: 1; min-width: 0; height: 40px; border-radius: 20px; background: #000; border: 1px solid #26262b; padding: 0 14px; font: 400 12px/16px "Geist Mono", monospace; }
.pop details { border-top: 1px solid #17171a; }
.pop summary { list-style: none; cursor: pointer; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font: 500 14px/20px Geist, sans-serif; color: #a1a1aa; }
.pop summary::-webkit-details-marker { display: none; }
.pop pre { margin: 0 24px 20px; max-height: 220px; overflow: auto; border-radius: 12px; background: #000; border: 1px solid #26262b; padding: 14px 16px; font: 400 12px/18px "Geist Mono", monospace; color: #a1a1aa; }
.pop .fine { margin: 0; padding: 16px 24px 20px; border-top: 1px solid #17171a; }
.guide .lv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: #000; border: 1px solid #26262b; font: 400 12px/16px Geist, sans-serif; color: #a1a1aa; }
.guide .lv b { font: 600 22px/28px Geist, sans-serif; }
.guide .paint { display: flex; align-items: center; gap: 12px; min-height: 32px; font: 400 13px/18px Geist, sans-serif; }
.guide .paint i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #3f3f46; }
.guide .paint span:first-of-type { flex: none; width: 96px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: 16px; background: #17171a; border: 1px solid #3f3f46; font: 500 13px/18px Geist, sans-serif; }
/* Narrow screens: the settings over the preview, full width. */
@media (max-width: 979px) { aside { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid #17171a; } .stage { padding: 24px 16px; } }
