/* Vidmontagist: black, white and lime; one heavy grotesque */
:root { --bg: #111111; --surface: #1c1c1c; --hover: #262626; --ink: #fff; --lime: #dfff55; --dim: #8a8a8a; --line: #2a2a2a; color-scheme: dark; background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 500 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
b { color: var(--lime); font-weight: inherit; }
main { width: min(1280px, 100%); margin: 0 auto; padding: 24px 32px 80px; }
main[hidden], [hidden] { display: none !important; }
.drawing body { visibility: hidden; } /* until app.js has drawn the page (and put the scroll back): no frame of it empty */
/* the view and the header, as index.html's head sets them before the first paint */
html:not([data-view="land"]) #land, html:not([data-view="reels"]) #reels, html:not([data-view="reel"]) #reel { display: none; }
html:not(.in) :is(#new, #bell, #me, .tabs), .in #who, [data-view="reel"] .tabs { display: none; }

.top { display: flex; align-items: center; justify-content: space-between; width: min(1280px, 100%); height: 80px; margin: 0 auto; padding: 0 32px; }
.top .right { position: relative; display: flex; align-items: center; gap: 12px; }
.bell, .avatar { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; }
.bell[data-count]:not([data-count=""])::after { content: attr(data-count); position: absolute; top: -8px; right: -8px; box-sizing: border-box; min-width: 22px; height: 22px; padding: 0 4px; border: 3px solid var(--bg); border-radius: 999px; background: var(--lime); color: #101010; font-size: .7rem; font-weight: 800; line-height: 16px; text-align: center; }
.menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; display: grid; gap: 2px; min-width: 240px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #161616; }
.menu .item { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.menu .item:hover:not(:disabled) { background: var(--hover); }
.menu .item:disabled { cursor: default; }
.menu .item span { color: var(--dim); font-size: .85rem; }
.menu .item span:empty { display: none; }
.menu .item.fresh span { color: var(--lime); }
.menu .none { margin: 0; padding: 10px 12px; color: var(--dim); }
.top .go { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; font-size: .95rem; }
.mark { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.link { padding: 0; border: 0; background: none; color: var(--dim); text-decoration: none; cursor: pointer; }
.link:hover { color: var(--ink); }
.go { padding: 14px 26px; border: 0; border-radius: 999px; background: var(--lime); color: #101010; font-weight: 800; cursor: pointer; }
.go:disabled { opacity: .4; cursor: default; }

#land h1 { max-width: 16em; margin: 8vh 0 24px; font-weight: 800; font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -.035em; }
#land section { margin-top: 120px; } /* one rhythm: 120 between sections, 32 under each heading */
#land h2 { margin: 0 0 32px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.02em; }
#land h2 + .lead { margin: -20px 0 32px; }
#land .end { padding-bottom: 40px; text-align: center; }
#land .end .lead { margin: -20px auto 32px; }
.shows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: 24px; } /* five looks, one full row */
.shows figure { margin: 0; }
.shows video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--surface); object-fit: cover; }
.lead { max-width: 34em; margin: 0 0 28px; color: #cfcfcf; font-size: 1.1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; color: #bdbdbd; }
.facts b { display: block; margin-bottom: 4px; font-weight: 800; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.head h1 { margin: 0; font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: -.03em; }
.list { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: 24px; }
@media (max-width: 1023px) { .list { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.card { display: grid; color: var(--ink); text-decoration: none; cursor: pointer; }
.card.none { opacity: .5; }
.shot { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--surface); }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; opacity: 0; transition: opacity .15s; }
.card:hover .play, .card:focus-visible .play { opacity: 1; } /* shown on hover, not always */
.len { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.card .meta { position: relative; display: grid; grid-template-columns: 1fr auto auto; gap: 2px; padding: 10px 0 0; }
.card .meta strong { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; } /* the title, one line */
.card .meta span { grid-column: 1; color: var(--dim); font-size: .9rem; }
.edit, .bin { grid-row: 1 / 3; align-self: center; display: grid; place-items: center; width: 32px; height: 32px; margin: -6px; padding: 0; border: 0; background: none; color: var(--dim); cursor: pointer; }
.edit { grid-column: 2; }
.bin { grid-column: 3; }
.edit:hover { color: var(--ink); }
.bin:hover { color: #ff6b6b; }
.shot img.draft { opacity: .4; }
.bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--lime); transition: width .4s; }
.empty { color: var(--dim); }
.filters { display: flex; gap: 8px; margin: 0 0 24px; overflow-x: auto; scrollbar-width: none; } /* one row, swiped sideways */
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--dim); font: inherit; font-weight: 700; cursor: pointer; }
.filter:hover { background: var(--hover); color: var(--ink); }
.filter.on { background: var(--lime); color: #101010; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer; }
.shape { flex: none; box-sizing: border-box; border: 1.5px solid currentColor; border-radius: 2px; }
.chip.on { border-color: var(--lime); background: var(--lime); color: #101010; font-weight: 800; }
section { margin-top: 32px; }
section h2 { margin: 0 0 12px; font-weight: 800; font-size: 1.1rem; }
section h2 span { color: var(--dim); font-weight: 500; }

.clips { display: grid; grid-template-columns: repeat(auto-fill, 96px); align-items: start; gap: 8px; } /* the photos and videos, all in view, wrapping */
.clip, .add { flex: none; width: 100%; position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #1c1c1c; }
.clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip .v { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); font-size: .75rem; }
.clip .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); cursor: pointer; line-height: 1; }
.clip.up { opacity: .5; }
.tile { flex: none; width: 100%; display: flex; flex-direction: column; gap: 4px; }
.cap { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 22px; padding: 0 2px; border: 0; background: none; color: rgba(255, 255, 255, .55); font: inherit; font-size: .75rem; text-align: left; cursor: pointer; }
.cap span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.cap svg { flex: none; }
.cap.on { flex-direction: column; align-items: stretch; gap: 2px; cursor: auto; }
.cap input { width: 100%; min-width: 0; padding: 2px 4px; border: 1px solid var(--lime); border-radius: 6px; background: #1c1c1c; color: #fff; font: inherit; font-size: 16px; }
.cap small { align-self: flex-end; font-size: .7rem; }
.add { display: grid; place-content: center; justify-items: center; border: 1px dashed #444; background: none; color: var(--dim); cursor: pointer; }
.add span { font-size: 2rem; line-height: 1; color: var(--lime); }
.add.want { animation: want 1.2s ease 2; } /* where the clips go, when Craft video is pressed without them */
@keyframes want { 50% { border-color: var(--lime); background: rgba(223, 255, 85, .12); } }

.find { display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #161616; color: var(--dim); } /* Library: the search, its icon inside */
.find:focus-within { border-color: var(--lime); }
#q { flex: 1; min-width: 0; padding: 14px 0; border: 0; background: none; outline: 0; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 1px dashed #444; border-radius: 14px; color: var(--dim); text-align: center; cursor: pointer; } /* Upload: dropped on or tapped */
.drop strong { color: var(--ink); }
.drop:hover, .drop.over { border-color: var(--lime); }
#found { display: grid; gap: 4px; margin-top: 10px; }
.tune { display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.tune:hover { background: #1c1c1c; }
.tune img, .tune .cover { width: 44px; height: 44px; border-radius: 8px; flex: none; object-fit: cover; }
.tune .cover { display: grid; place-items: center; background: #2a2a2a; color: var(--dim); } /* the user's own audio, no cover */
.tune small { display: block; color: var(--dim); }
#song { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 16px 0 10px; } /* the picked songs, in play order */
#song .empty, .sel { grid-column: 1 / -1; }
.sel { display: flex; align-items: center; justify-content: space-between; color: var(--dim); } /* Selected tracks (n), Clear all */
.sel .link { color: var(--ink); }
#song .tune { width: 100%; border: 1px solid var(--line); cursor: default; }
#song .tune:hover { background: none; }
#song .tune > span { flex: 1; min-width: 0; }
#song .tune strong, #song .tune small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knob { display: grid; place-items: center; width: 36px; height: 36px; flex: none; } /* play and remove, a thumb's size */

.state { min-height: 1.5em; margin: 32px 0 12px; color: var(--dim); }
.field { display: block; width: 100%; margin-bottom: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #161616; outline: 0; resize: vertical; }
.field:focus { border-color: var(--lime); }
#styles, #music { margin-bottom: 12px; }

.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; align-content: center; gap: 16px; background: rgba(0, 0, 0, .92); }
.frame { overflow: hidden; border-radius: 12px; background: #000; }
.frame.full { width: 100vw; height: 100dvh; border-radius: 0; } /* while the video is made */
.frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.frame video { display: block; width: 100%; height: 100%; background: #000; }
.close { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 2.2rem; line-height: 1; cursor: pointer; }

.dlg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); }
.dlg form { display: grid; gap: 12px; width: min(360px, 100%); padding: 28px 24px; border: 1px solid var(--line); border-radius: 18px; background: #161616; }
.dlg h2 { margin: 0 0 4px; font-weight: 800; letter-spacing: -.02em; }
.dlg input { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #101010; outline: 0; }
.dlg input:focus { border-color: var(--lime); }
.dlg p { margin: 0; color: var(--dim); font-size: .9rem; }
.dlg .err { color: #ff8a7a; }
body:has(.dlg, .sheet:not([hidden])) { overflow: hidden; } /* the page holds still behind a popup */
.dlg .msg { color: var(--ink); font-size: 1rem; }
.dlg .row { justify-content: flex-end; gap: 20px; margin-top: 8px; }
.go.danger { background: #ff6b6b; }
.view .box { position: relative; display: grid; grid-template-columns: auto minmax(240px, 320px); align-items: center; gap: 32px; max-height: 92dvh; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: #161616; }
.view .player { position: relative; overflow: hidden; border-radius: 14px; background: #000; }
.view video { display: block; aspect-ratio: var(--ar); width: min(56vw, 480px, calc(76dvh * var(--ar))); max-width: min(56vw, 480px); max-height: 76dvh; }
.player.wait::after { content: ""; position: absolute; inset: 0; width: 36px; height: 36px; margin: auto; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; } /* the video on its way */
.player .controls { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px 20px; padding: 56px 20px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.player .pp, .player .vol, .player .fs { display: grid; place-items: center; width: 40px; height: 40px; margin: -10px -8px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; } /* a thumb-sized tap, the icon as it was */
.player .time { color: #fff; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .track { position: relative; grid-column: 1 / -1; margin: 0 8px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); cursor: pointer; touch-action: none; }
.player .track::before { content: ""; position: absolute; inset: -10px 0; }
.player .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--lime); }
.player .track i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--lime); } /* the handle */
.view .side { display: grid; gap: 12px; }
.view .vtop { display: flex; flex-wrap: wrap; gap: 12px; min-width: 0; } /* the title on its own line, its version under it */
.view .vname { flex: 1 0 100%; min-width: 0; margin: 0; padding-right: 32px; overflow: hidden; font-weight: 800; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; } /* one line, cut with … */
.view .meta { margin: 0 0 8px; padding-right: 32px; } /* only a video that couldn't load says so here */
.view .meta:empty { display: none; }
.view .go, .view .soft { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.view svg { flex: none; } /* icons keep their size, however long the word beside them */
.view .soft, .dlg .soft { padding: 12px 18px; border: 0; border-radius: 999px; background: #262626; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.view .vers { flex: none; }
.view .vers select { appearance: none; padding: 8px 36px 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a8a8a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.view .vers select:focus { border-color: var(--lime); outline: 0; }
.view .vers:empty { display: none; }
.view .act { display: flex; align-items: center; gap: 14px; padding: 8px 4px; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: none; text-align: left; cursor: pointer; }
.view .actions { display: grid; gap: 12px; }
.view .act:hover, .view .act.on { color: var(--lime); }
.view .act.on path { fill: currentColor; } /* starred: the star filled */
.view .act.danger:hover { color: #ff6b6b; }
@media (max-width: 700px) { /* phones: the whole screen, its name above the video, the four actions in a row at the foot, as the tabs are */
  .dlg.view { padding: 0; }
  .view .box { grid-template-columns: repeat(4, 1fr); align-content: start; gap: 12px; width: 100vw; height: 100dvh; max-height: none; padding: 16px 16px 12px; border: 0; border-radius: 0; overflow-y: auto; }
  .view .side { display: contents; }
  .view .box > *, .view .side > * { grid-column: 1 / -1; }
  .view .vtop { order: 1; }
  .view .vname { padding-right: 60px; font-size: 1.2rem; } /* clear of the close button */
  .view .meta { order: 2; margin: 0; font-size: 13px; }
  .view .player { order: 3; justify-self: center; }
  .view video { width: min(100%, calc(56dvh * var(--ar))); max-width: 100%; max-height: 56dvh; }
  .view .go, .view .soft { gap: 8px; padding-left: 12px; padding-right: 12px; } /* half-width on phones: room for the word */
  .view .go { order: 4; grid-column: span 2; }
  .view .go:has(+ .soft[hidden]) { grid-column: 1 / -1; }
  .view .soft { order: 5; grid-column: span 2; }
  .view .actions { order: 7; grid-template-columns: repeat(5, 1fr); gap: 4px; } /* the five actions in a row */
  .view .act { flex-direction: column; gap: 6px; font-size: .8rem; }
  .view .act .wide { display: none; }
  .view .close { top: 14px; right: 16px; font-size: 1.6rem; }
}
.clip.up::after { content: ""; position: absolute; inset: 0; width: 28px; height: 28px; margin: auto; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.acts { justify-content: center; gap: 24px; }
.takes { justify-content: center; flex-wrap: wrap; gap: 8px; }
.take { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: none; color: inherit; font: inherit; font-size: .85rem; cursor: pointer; }
.take.on { border-color: var(--lime); color: var(--lime); }
.load { display: grid; place-content: center; justify-items: center; gap: 8px; width: 100%; height: 100%; padding: 24px; text-align: center; }
.load span { color: var(--dim); font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 800; }
.load strong.retry { cursor: pointer; margin-top: 16px; padding: 16px 40px; border-radius: 999px; background: var(--lime); color: #101010; font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 800; line-height: 1; } /* a button, plainly */
.load strong.retry:hover { filter: brightness(1.08); }
.load strong { color: var(--lime); font-size: clamp(5rem, 22vw, 14rem); font-weight: 900; line-height: .9; font-variant-numeric: tabular-nums; }

/* phones: the tabs at the bottom (the videos, Create, the starred); a video's own page keeps Craft video there instead */
.tabs { display: none; }
@media (max-width: 700px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-around; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(17, 17, 17, .96); }
  .tabs a { display: grid; justify-items: center; gap: 2px; color: var(--dim); font-size: .75rem; text-decoration: none; }
  .tabs a.on { color: var(--lime); }
  main { padding-bottom: 120px; }
  #new { display: none; }
  #video { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; }
}

/* phones, last: these win over the rules above */
@media (max-width: 767px) { /* phones */
  main, .top { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 32px; }
  .mark { font-size: 22px; }
  .bell, .avatar { width: 40px; height: 40px; }
  .head h1 { font-size: 30px; }
  .filters { margin: 0 -16px 20px; padding: 0 16px; } /* to the screen's edges */
  .filter { height: 36px; font-size: 14px; }
  .list { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .card .meta { padding-top: 8px; }
  .card .meta span { font-size: 12px; }
  #land h1 { margin-top: 32px; }
  #land section { margin-top: 72px; }
  .shows { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; } /* a swipe row, no bar */
  .shows::-webkit-scrollbar { display: none; }
  .shows figure { scroll-snap-align: start; }
  .clips { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); } /* the tiles stretched to fill the row: no gap at its end */
  #music { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } /* the three modes in one row, even widths */
  #music .chip { justify-content: center; gap: 6px; padding: 8px 4px; font-size: 14px; }
}
