@import url('https://fonts.googleapis.com/css2?family=Baskervville&family=DM+Sans:wght@400;600;700&display=swap');

:root {
    color-scheme: dark;
    --paper: #111111;
    --card: #1b1b1b;
    --wash: #292929;
    --ink: #ffffff;
    --muted: #bdbdbd;
    --accent: #d90a12;
    --selected: #a91018;
    --brand-red: #ff4d53;
    font-family: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, .tour-link {
    border: 0;
    border-radius: 8px;
    min-height: 44px;
    padding: 0 16px;
    background: var(--wash);
    color: var(--ink);
    font-weight: 650;
    cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
button:hover:not(:disabled), .tour-link:hover { filter: brightness(1.18); }
:focus-visible { outline: 4px solid #ff6269; outline-offset: 4px; }
.room h2 { font-family: Baskervville, Georgia, serif; font-weight: 500; letter-spacing: -.045em; }
.top-inner, main { width: min(1050px, calc(100% - 48px)); margin-inline: auto; }
.top { position: sticky; top: 0; z-index: 2; padding-top: env(safe-area-inset-top); background: #090909; }
.top-inner { min-height: 80px; display: flex; align-items: center; gap: clamp(8px, 3vw, 20px); }
.brand { color: var(--brand-red); font-size: clamp(22px, 5.8vw, 36px); line-height: 1; font-weight: 700; letter-spacing: -.065em; white-space: nowrap; }
.header-search {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    flex: 1; max-width: 320px; min-width: 0; min-height: 46px; padding: 0 9px;
    border-radius: 22px; background: #202020; color: #e7e7e7;
    white-space: nowrap; font-size: clamp(12px, 3.3vw, 16px);
}
.search-icon { position: relative; width: 18px; height: 18px; border: 3px solid #bbb; border-radius: 50%; flex: none; }
.search-icon::after { content: ""; position: absolute; width: 8px; height: 3px; right: -6px; bottom: -3px; border-radius: 2px; background: #bbb; transform: rotate(45deg); }
.header-profile { min-width: 42px; padding: 0; background: transparent; }
.profile-icon { display: block; position: relative; width: 29px; height: 34px; margin-inline: auto; }
.profile-icon::before, .profile-icon::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: #eee; }
.profile-icon::before { width: 12px; height: 12px; top: 2px; border-radius: 50%; }
.profile-icon::after { width: 24px; height: 13px; top: 17px; border-radius: 12px 12px 7px 7px; }
.header-menu { position: relative; margin-left: auto; }
.header-menu summary {
    display: grid; place-items: center; width: 46px; height: 46px;
    list-style: none; border-radius: 50%; background: var(--accent); color: white; font-size: 22px; cursor: pointer;
}
.header-menu summary::-webkit-details-marker { display: none; }
.menu-links {
    position: absolute; z-index: 1; top: calc(100% + 8px); right: 0;
    display: grid; gap: 5px; width: 155px; padding: 7px; border-radius: 12px; background: #272727;
}
.menu-links a, .menu-links button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font: inherit; }
.menu-links button { background: transparent; }
.header-banner { background: radial-gradient(ellipse at 16% 130%, #591317 0, transparent 52%), #191919; }
.banner-inner { width: min(1050px, calc(100% - 32px)); min-height: 70px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; line-height: 1.35; }
.banner-inner button { min-width: 124px; min-height: 40px; background: var(--accent); color: white; border-radius: 15px; }
main { padding-block: 16px calc(105px + env(safe-area-inset-bottom)); }
#studio, #room, #demo-requests { scroll-margin-top: calc(158px + env(safe-area-inset-top)); }
.app-nav {
    position: fixed; inset: auto 0 0; z-index: 3;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px max(5px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    background: #090909;
}
.app-nav a, .app-nav button {
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    min-height: 64px; gap: 3px; padding: 0; background: transparent;
    color: #a1a1a1; font-size: clamp(10px, 3vw, 14px); font-weight: 700;
}
.app-nav [aria-current] { color: #f1f1f1; }
.app-nav [aria-disabled="true"] { opacity: .52; cursor: default; }
.app-nav-icon {
    display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 9px; color: inherit; font-size: 26px; line-height: 1; font-weight: 700;
}
.app-nav .upload-icon { background: #303030; color: white; font-size: 23px; }
.app-nav [aria-current] .upload-icon { background: var(--accent); color: white; }
.app-nav [data-privacy] .app-nav-icon { background: #401517; color: var(--brand-red); border-radius: 50%; font-size: 22px; }
.app-dialog { width: min(400px, calc(100% - 24px)); border: 0; padding: 16px; border-radius: 14px; background: var(--card); color: var(--ink); }
.app-dialog::backdrop { background: #000000c9; }
.app-dialog h2 { margin: 0 0 12px; font-size: 20px; }
.app-dialog form:not([method]) { display: flex; gap: 8px; margin-bottom: 8px; }
.app-dialog input { min-width: 0; flex: 1; border: 0; border-radius: 8px; padding: 0 8px; font: inherit; color: var(--ink); background: var(--wash); }
.step-label, .tour { max-width: 650px; margin-inline: auto; }
.step-label { margin-block: 0 10px; color: var(--muted); font-size: 14px; font-weight: 650; }
.panel { background: var(--card); border-radius: 16px; min-width: 0; }
.tour-body { padding: clamp(16px, 3vw, 24px); }
.tour h2 { font-size: clamp(25px, 5vw, 36px); line-height: 1.15; letter-spacing: -.035em; margin: 0; }
.tour p { color: var(--muted); line-height: 1.45; margin: 9px 0 21px; }
.tour-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tour-actions { margin-top: 16px; }
.tour-actions .primary { margin-left: auto; }
.tour-link { display: inline-flex; align-items: center; }
.primary { background: var(--accent); color: #fff; }
.choices { display: grid; gap: 8px; margin-top: 15px; }
#chat-age, #interests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices button { text-align: left; min-height: 53px; padding-inline: 16px; background: #262626; }
.tour .interest-count { margin: 10px 0 0; font-size: 13px; }
.choices button[aria-pressed="true"] { background: var(--selected); color: white; }
.choices button[aria-pressed="true"]::after { content: "✓"; float: right; color: #ffffff; }
.record-dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; background: #ffffff; border-radius: 50%; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(255px, 1fr); gap: 16px; align-items: start; }
.panel-head { min-height: 57px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-head .link { margin-left: auto; }
.preview { height: clamp(235px, 35vw, 365px); margin: 0 12px; border-radius: 9px; overflow: hidden; background: #090909; }
.preview video, .preview img { width: 100%; height: 100%; object-fit: contain; }
.drop { height: 100%; display: grid; align-content: center; justify-items: center; color: white; text-align: center; }
.drop h3, .drop p { margin: 4px; }
.dragover { outline: 4px solid #ff6269; outline-offset: -6px; }
.trim { padding: 10px 16px 17px; }
.trim-head, .times { display: flex; align-items: center; gap: 8px; }
.trim-head button:first-child { width: 40px; min-height: 38px; padding: 0; }
.trim-head #clock, .times { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.trim-label { margin-left: auto; color: var(--muted); font-size: 12px; }
.link { background: transparent; padding-inline: 6px; color: #ff9297; font-size: 13px; }
.timeline { --in: 0%; --out: 100%; --position: 0%; position: relative; height: 59px; margin: 8px 11px 10px; touch-action: none; isolation: isolate; }
.frames { height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); overflow: hidden; border-radius: 7px; background: var(--wash); }
.frames canvas { width: 100%; height: 100%; object-fit: cover; }
.selection { position: absolute; left: var(--in); right: calc(100% - var(--out)); inset-block: 0; box-shadow: 0 0 0 100vmax #000000b8; clip-path: inset(0 -100vmax); pointer-events: none; display: none; }
.timeline.ready .selection, .timeline.ready .playhead { display: block; }
.playhead { position: absolute; left: var(--position); width: 5px; inset-block: 0; background: white; border-radius: 3px; pointer-events: none; display: none; }
.handle { position: absolute; transform: translateX(-50%); top: 0; height: 100%; width: 36px; display: grid; place-items: center; cursor: ew-resize; touch-action: none; }
.handle span { width: 18px; height: 100%; border-radius: 5px; background: #ef3c45; display: grid; place-items: center; }
.handle span::after { content: ""; width: 5px; height: 16px; border-radius: 4px; background: #440608; }
.handle.start { left: var(--in); }
.handle.end { left: var(--out); }
.times { justify-content: space-between; }
.times b, .times #length { color: var(--ink); }
.compose-body { padding: 0 16px 17px; }
.custom-caption { margin-bottom: 12px; }
.custom-caption label { display: block; margin-bottom: 6px; font-weight: 650; }
.custom-caption textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: #111111;
    color: var(--ink);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    resize: vertical;
}
.post { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.capture-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.capture #camera-prompt { margin: 3px 0 12px; }
.capture-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.capture-actions #record { grid-column: 1 / -1; }
.capture #resume-review { width: 100%; margin-top: 8px; }
.capture .clip-privacy, .compose-body .clip-privacy { margin: 10px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
#status, .capture #capture-status { margin: 10px 0 0; font-size: 14px; color: #ff9297; }
#status:empty, .capture #capture-status:empty { display: none; }
#status.loading, .capture #capture-status.loading { font-weight: 650; }
.loading:not(:empty)::before {
    content: "↑";
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    margin-right: 7px;
    border-radius: 8px;
    background: var(--selected);
    color: white;
    animation: upload-pulse 1s ease-in-out infinite alternate;
}
.nearby-status { display: block; margin: 4px 0 0 32px; color: var(--muted); font-size: 12px; font-weight: 400; }
@keyframes upload-pulse { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .loading:not(:empty)::before { animation: none; }
}
#status.error, .capture #capture-status.error { color: #ffabbc; }
.room { max-width: 650px; margin: 17px auto 0; }
.room-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.room h2 { margin: 0; font-size: 31px; }
#feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.empty { grid-column: 1 / -1; color: var(--muted); margin: 0; }
.clip { overflow: hidden; }
.post-author { display: flex; align-items: center; gap: 7px; padding: 8px 9px; font-size: 13px; font-weight: 700; }
.post-author .request-avatar { flex-basis: 28px; height: 28px; }
.post-author .request-avatar::before { top: 5px; width: 7px; height: 7px; }
.post-author .request-avatar::after { top: 14px; width: 14px; height: 8px; }
.clip img { display: block; width: 100%; max-height: 660px; object-fit: contain; background: #090909; }
.clip video { display: block; width: 100%; aspect-ratio: 16 / 10; background: #090909; }
.clip-video { position: relative; }
.clip-counts {
    position: absolute;
    inset: 10px 10px auto auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
    max-width: calc(100% - 20px);
    padding: 6px 9px;
    border-radius: 8px;
    background: #1b1b1bed;
    color: white;
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.clip-hearts { color: #ffc1d6; }
.clip-copy { padding: 12px; }
.clip-copy p { margin: 0 0 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.clip time { font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
    .layout { grid-template-columns: 1fr; }
    .top-inner, main { width: calc(100% - 32px); }
    main { padding-top: 14px; }
    .tour-body { padding: 17px; }
    .choices button { min-height: 52px; }
    .capture-actions { grid-template-columns: 1fr; }
    .tour-actions .primary { flex: 1; }
    .preview { height: clamp(235px, 62vw, 355px); }
}
@media (max-width: 370px) {
    .header-search .search-icon { display: none; }
}

.example-video { display: grid; align-content: center; justify-items: center; gap: 6px; aspect-ratio: 16 / 10; background: #111111; color: var(--muted); font-size: 13px; }
.example-play { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--wash); color: #ff9297; }
.example-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.example-likes { color: #ffc1d6; font-weight: 650; }

.demo-progress { height: 9px; overflow: hidden; border-radius: 9px; background: var(--wash); margin-bottom: 13px; }
.demo-progress span { display: block; height: 100%; background: #ef3c45; transform-origin: left; animation: demo-progress var(--progress-duration, 5s) linear both; }
@keyframes demo-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.demo-requests h3 { margin: 0; font-size: 17px; }
#demo-sending p { margin: 4px 0 8px; font-size: 13px; }
#request-count:empty { display: none; }
.demo-requests #request-count { margin: 4px 0 8px; font-size: 13px; }
.demo-requests ul { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.demo-requests li { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px; background: var(--wash); font-size: 14px; }
.request-avatar { position: relative; flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--selected); }
.online-dot {
    position: absolute;
    z-index: 1;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #60eb91;
    box-shadow: 0 0 0 3px #1b1b1b;
}
.request-avatar::before, .request-avatar::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: #ffffff; }
.request-avatar::before { width: 9px; height: 9px; top: 7px; border-radius: 50%; }
.request-avatar::after { width: 17px; height: 9px; top: 18px; border-radius: 9px 9px 4px 4px; }
.demo-requests strong { display: block; color: #ff9297; margin-bottom: 2px; }
@media (prefers-reduced-motion: reduce) {
    .demo-progress span { width: 50%; animation: none; }
}

.request-body { min-width: 0; }
.request-respond { display: block; background: var(--selected); margin-top: 6px; }

.sample-chat {
    width: min(480px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #1b1b1b;
    color: white;
}
.sample-chat::backdrop { background: #000000c9; }
.chat-layout { height: min(520px, calc(100dvh - 24px)); display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 9px; padding: 12px; background: #242424; }
.chat-header h2 { margin: 0; font-size: 16px; }
.chat-header p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.chat-header button { margin-left: auto; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.chat-bubble {
    align-self: flex-start;
    flex-shrink: 0;
    max-width: 85%;
    margin: 0;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--wash);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.chat-bubble.outgoing { align-self: flex-end; background: var(--accent); }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 12px; background: #242424; }
.chat-form textarea {
    min-height: 44px;
    max-height: 120px;
    width: 100%;
    resize: vertical;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: #111111;
    color: white;
    font: inherit;
    font-size: 16px;
}

@media (max-width: 600px) {
    .sample-chat {
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-width: none;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }
    .chat-layout { height: 100%; }
    .chat-header { padding-top: max(12px, env(safe-area-inset-top)); }
    .chat-form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

.demo-requests .tip-message { padding: 0; background: #abf1bd; color: #102917; }
.tip-message a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 8px; }
.tip-message a:hover { background: #c4ffcf; }
.tip-message-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: #225936; color: white; font-size: 21px; font-weight: 800; }
.tip-message-copy > * { display: block; }
.tip-message-copy small { font-weight: 650; }
.demo-requests .tip-message strong { color: inherit; margin: 2px 0 4px; }
.tip-message-copy > span { font-weight: 700; }
@keyframes post-appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
    .incoming-post, .tip-message { animation: post-appear .3s ease-out both; }
}

.account-field { margin-bottom: 14px; }
.account-field small { display: block; margin-top: 6px; color: var(--muted); }
.account-field label { display: block; margin-bottom: 6px; font-weight: 650; }
.account-field input { width: 100%; min-height: 44px; padding: 9px 11px; border: 0; border-radius: 8px; background: #111111; color: var(--ink); font: inherit; }
.live-room-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-room-list a { overflow-wrap: anywhere; }
.live-player { min-height: 70vh; }
.policy-link { color: #ff9297; text-decoration: underline; text-underline-offset: .19em; }

.watch-page { height: 100dvh; overflow: hidden; background: #090909; }
.watch-header {
    position: fixed;
    z-index: 2;
    inset: 0 0 auto;
    width: min(500px, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: max(10px, env(safe-area-inset-top)) 15px 14px;
    background: linear-gradient(#000000f5, transparent);
}
.watch-header h1 { margin: 0; font-size: 17px; }
.watch-header .brand { justify-self: start; font-size: clamp(22px, 6vw, 32px); }
.watch-post { justify-self: end; padding: 9px 14px; border-radius: 10px; background: var(--accent); color: white; font-weight: 750; white-space: nowrap; }
.watch-feed {
    width: min(500px, 100%);
    height: 100dvh;
    margin: 0 auto;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}
.watch-card { position: relative; isolation: isolate; height: 100%; background: #151515; scroll-snap-align: start; scroll-snap-stop: always; }
.watch-card video { display: block; width: 100%; height: 100%; object-fit: cover; }
.watch-loading { height: 100%; margin: 0; display: grid; place-items: center; color: var(--muted); }
.watch-performer { background: radial-gradient(ellipse at 52% 37%, #501417, #171717 64%, #090909); }
.performer-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.performer-fallback { position: absolute; inset: 12% 0 25%; display: grid; place-items: center; color: #ad383d; font-size: clamp(94px, 30vw, 180px); font-weight: 700; text-transform: uppercase; }
.watch-card::after {
    content: "";
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(transparent, #050505);
    pointer-events: none;
}
.watch-copy, .watch-actions, .watch-playback { position: absolute; z-index: 1; }
.watch-copy { bottom: calc(92px + env(safe-area-inset-bottom)); left: 15px; right: 70px; }
.watch-author { display: flex; align-items: center; gap: 8px; }
.watch-copy p { margin: 8px 0 4px; font-size: 17px; }
.performer-copy h2 { margin: 8px 0 12px; font-size: clamp(26px, 7vw, 42px); letter-spacing: -.05em; overflow-wrap: anywhere; }
.performer-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; background: #a91018; color: white; font-size: 13px; font-weight: 700; }
.performer-live span { width: 7px; height: 7px; border-radius: 50%; background: white; }
.watch-join { min-height: 42px; }
.watch-copy small { color: #dedede; }
.watch-actions { display: grid; gap: 7px; bottom: calc(89px + env(safe-area-inset-bottom)); right: 12px; }
.watch-actions button, .watch-playback { background: #171717ed; color: white; }
.watch-actions button { display: grid; justify-items: center; align-content: center; width: 49px; min-height: 50px; padding: 4px; border-radius: 12px; }
.watch-actions button span { font-size: 22px; line-height: 1; }
.watch-like[aria-pressed="true"] span { color: #ff98ad; }
.watch-playback { right: 14px; top: max(67px, calc(67px + env(safe-area-inset-top))); width: 44px; padding: 0; border-radius: 50%; }
.watch-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(500px, 100%); margin-inline: auto; }
.watch-nav .upload-icon { background: var(--accent); }
.watch-status {
    position: fixed;
    z-index: 4;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 8px 12px;
    border-radius: 9px;
    background: #401517;
    color: white;
    white-space: nowrap;
}
