.app { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
/* Author display rules (e.g. block inputs) beat the UA [hidden] style —
 * without this, toggled inputs stay visible. */
[hidden] { display: none !important; }
.app-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.app-top a { color: inherit; text-decoration: none; font-size: 20px; }
.app-top strong { color: var(--primary-hover); }
.screen { padding: 32px 0; display: grid; gap: 16px; }
.screen h2 { font-size: 30px; }
.fscreen { display: grid; gap: 14px; }
.fscreen input, .fscreen textarea {
    width: 100%; padding: 12px; border-radius: 10px; font-size: 16px;
    border: 1px solid var(--line); background: #0a0a0c; color: var(--text);
}
.photo-pick {
    display: grid; place-items: center; min-height: 220px; border-radius: 14px;
    border: 1px dashed var(--line); background: var(--surface);
    font-size: 18px; color: var(--muted); cursor: pointer; overflow: hidden;
}
.photo-pick img { width: 100%; max-height: 320px; object-fit: cover; }
#cam-video { width: 100%; max-height: 320px; border-radius: 14px; background: #000; }
.avatar-card { text-align: center; }
.avatar-card img { display: block; width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; object-fit: cover; }
#avatar-mono {
    width: 140px; height: 140px; border-radius: 50%; margin: 0 auto;
    display: grid; place-items: center; font-size: 56px; font-weight: 700;
    background: var(--primary); color: #fff;
}
#avatar-name { font-size: 20px; font-weight: 600; }
#gen-video, #detail-video { width: 100%; max-height: 62vh; border-radius: 12px; background: #000; }
.row { display: flex; gap: 10px; align-items: center; }
.row button { flex: 1; }
.fscreen > button.cta { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.feed { position: relative; }
#feed-list { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; }
.reel { height: 100dvh; scroll-snap-align: start; position: relative; background: #000; display: grid; place-items: center; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel .cap { position: absolute; left: 12px; bottom: 24px; right: 12px; color: #fff; text-shadow: 0 1px 4px #000; }
.reel .cap button { margin-top: 8px; }
.reel .st { font-size: 13px; opacity: 0.85; }
.fab {
    position: fixed; bottom: 24px; right: max(24px, calc(50% - 280px + 24px));
    width: 60px; height: 60px; border-radius: 50%; font-size: 32px; line-height: 1;
    background: var(--primary); color: #fff; border: none; cursor: pointer;
}
.toast {
    position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
    background: var(--surface); border: 1px solid var(--primary); color: var(--text);
    border-radius: 10px; padding: 10px 16px; max-width: 90vw; z-index: 50;
}
.matrix { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.matrix .ok { color: var(--accent); }
.matrix .bad { color: #ff6b6b; }
@media (min-width: 700px) {
    .reel { height: 82dvh; border-radius: 16px; overflow: hidden; margin: 12px 0; }
    #feed-list { height: auto; overflow: visible; }
}
