@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; }

:root { --accent: #1f6bff; --bg: #f3f3f1; --card: #fff; --ink: #17171a; --mute: #6b6b73; --line: #dedcd6; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 12px; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: #b3261e; }
.lbl { color: var(--mute); font-size: 13px; }
.hint { color: var(--mute); font-size: 12.5px; margin: 6px 0 0; }
.msg { margin: 6px 0 0; font-size: 13px; min-height: 0; }
.msg.warn { color: #b3261e; }
.mono { font-variant-numeric: tabular-nums; }

.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 3px solid var(--accent); padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.brandrow, .bgrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.appname { margin-right: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { border-radius: 999px; }
.pills button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--card); }
.seg button.on { background: var(--ink); color: #fff; }

main { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 16px; padding: 16px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 760px) { main { grid-template-columns: 1fr; } }
.left { position: sticky; top: 76px; align-self: start; }
@media (max-width: 760px) { .left { position: static; } }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tabs button { padding: 5px 10px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stage { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
#preview { width: 100%; height: 100%; display: block; touch-action: none; }
.drop { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--card); color: var(--mute); cursor: pointer; padding: 24px; }
.drop.over { outline: 3px dashed var(--accent); outline-offset: -10px; }
.drop[hidden] { display: none; }
.transport { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.transport input { flex: 1; min-width: 0; }

.right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.card h2, summary { font-size: 15px; font-weight: 650; margin: 0 0 8px; }
summary { cursor: pointer; margin: 0; }
details[open] summary { margin-bottom: 10px; }
textarea, input[type=text], input[type=number] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
textarea { resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.row input[type=text] { flex: 1; min-width: 160px; }
.row input[type=range] { flex: 1; min-width: 120px; }
.emojis { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; }
.emojis button { border: 0; background: transparent; padding: 2px 5px; font-size: 18px; }

.sublist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 360px; overflow: auto; }
.subrow { display: grid; grid-template-columns: 68px 68px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.subrow input { padding: 6px; }
.subrow button { padding: 5px 8px; }
.exportcard { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exportcard .msg, .exportcard progress { flex-basis: 100%; width: 100%; }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 18px; width: min(760px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.pagerow { display: grid; grid-template-columns: 1.2fr 1fr 44px auto auto auto auto; gap: 6px; align-items: center; margin-top: 8px; }
.pagerow input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pagerow img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 640px) { .pagerow { grid-template-columns: 1fr 1fr; } }

.ideas { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ideas button { text-align: left; }
.row .msg { margin: 0; flex: 1; min-width: 140px; }
#caption { margin-top: 8px; }
.linkcard { margin-top: 12px; }
.linkcard ol { padding-left: 18px; }
@font-face { font-family: "Archivo Black"; src: url("fonts/archivo-black-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; }
