/* The editor in the site's own dark palette and fonts. */
:root {
  color-scheme: dark;
  --void: #0C1012; --void-2: #151B1E; --void-3: #20282D;
  --blue: #02B0F5; --blue-deep: #027EB0; --sky: #8EDCFA;
  --cream: #F4F6F7; --ash: #D1D9DE; --ash-dim: #9BAAB3; --line: #303C44; --red: #FF8A8A; --green: #7EE2A8;
  font: 16px/1.5 "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif; color: var(--ash); background: var(--void);
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: var(--void); }
a { color: var(--sky); }
header { display: flex; align-items: center; gap: 24px; padding: 16px max(20px, calc((100% - 1080px) / 2)); border-bottom: 1px solid var(--line); background: var(--void-2); }
header a:first-child { color: var(--cream); font: 750 24px/1 "Gabarito", "Helvetica Neue", Arial, sans-serif; text-decoration: none; }
header span { color: var(--ash-dim); }
header .view { margin-left: auto; color: var(--blue); font-weight: 600; }
.logout { min-height: 34px; padding: 4px 12px; font-size: 14px; }
main { max-width: 1080px; margin: 28px auto 64px; padding: 0 20px; }
h1, h2, h3 { font-family: "Gabarito", "Helvetica Neue", Arial, sans-serif; color: var(--cream); }
h1 { font-size: 30px; margin: 0; }
h2 { font-size: 19px; margin: 28px 0 14px; }
h3 { font-size: 16px; margin: 22px 0 6px; color: var(--sky); }
.heading, .actions { display: flex; align-items: center; gap: 12px; }
.heading { justify-content: space-between; }
section { padding: 24px 0; border-top: 1px solid var(--line); margin-top: 24px; }
section.first { border-top: 0; margin-top: 0; padding-top: 8px; }
#editor { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--void-2); }
#editor h2 { margin-top: 0; }
#message { min-height: 24px; margin: 0 0 18px; color: var(--ash); }
#message.error { color: var(--red); }
.hint { color: var(--ash-dim); margin: 6px 0 14px; }
small { font-weight: 400; color: var(--ash-dim); }

button, input, select, textarea { font: inherit; color: var(--cream); background: var(--void-3); border: 1px solid var(--line); border-radius: 8px; }
button { min-height: 42px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
button:hover:not(:disabled) { border-color: var(--ash-dim); }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: wait; }
#newItem, #saveItem, #keyButton, #useClip, .upload { background: var(--blue); border-color: var(--blue); color: var(--void); }
#newItem:hover:not(:disabled), #saveItem:hover:not(:disabled), #keyButton:hover:not(:disabled), #useClip:hover:not(:disabled) { background: var(--sky); border-color: var(--sky); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
input, select, textarea { min-width: 0; width: 100%; padding: 10px 12px; }
input[type="checkbox"] { width: 20px; height: 20px; padding: 0; accent-color: var(--blue); flex-shrink: 0; }
input[type="range"] { padding: 0; background: none; border: 0; accent-color: var(--blue); height: 32px; }
input[type="file"] { padding: 8px; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--cream); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.wide { grid-column: 1 / -1; }
.check { flex-direction: row; align-items: center; font-weight: 500; }
.photo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.actions { margin-top: 22px; }

.menu-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.menu-row strong { display: block; font-weight: 600; color: var(--cream); overflow-wrap: anywhere; }
.menu-row small { display: block; }
.menu-row label { flex-direction: row; align-items: center; font-weight: 500; gap: 10px; }
.row-actions { display: flex; gap: 8px; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--void-3); }

/* "Add a video": the file input hides inside a big button; on a phone it opens the photo library. */
.upload { position: relative; display: inline-flex; flex-direction: row; align-items: center; min-height: 50px; padding: 10px 22px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.progress { height: 8px; max-width: 420px; margin-top: 14px; border-radius: 99px; background: var(--void-3); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .3s ease; }

/* Choosing the 15 seconds that play: a window over the page, for the top videos and the wall alike. */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 10, .78); overflow-y: auto; }
.trim { width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 22px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--void-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.trim__view { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #000; }
.trim__view video, .trim__view canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trim__controls h2 { margin-top: 0; }
.trim__time { font: 600 22px/1.2 "DM Mono", ui-monospace, Menlo, monospace; color: var(--cream); margin: 4px 0 10px; }
.trim__bar { position: relative; height: 10px; margin: 6px 0 2px; border-radius: 99px; background: var(--void-3); }
.trim__bar span { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--blue); }

.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 18px; }
.slot { display: grid; gap: 8px; align-content: start; }
.slot img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--void-3); }
.slot__name { font-weight: 700; color: var(--cream); }
.slot button { min-height: 38px; font-size: 14px; }
.upload--small { min-height: 42px; padding: 8px 14px; justify-content: center; font-size: 15px; border-radius: 8px; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.clip { display: grid; gap: 8px; align-content: start; font-weight: 400; font-size: 13px; color: var(--ash); }
.clip img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--void-3); }
.clip__show { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; color: var(--cream); }
.clip button { min-height: 36px; padding: 4px 10px; font-size: 14px; }

.key { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 0 0 24px; }
.key label { display: grid; gap: 6px; }
.key input { min-width: 260px; }
[hidden] { display: none !important; }

@media (max-width: 620px) {
  header { flex-wrap: wrap; gap: 6px 16px; }
  header span { order: 3; flex-basis: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .wide { grid-column: 1; }
  .menu-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .row-actions { grid-column: 2 / -1; }
  .upload { width: 100%; justify-content: center; }
  .trim { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .upload--small { width: 100%; padding: 8px 6px; font-size: 14px; }
  .slot button { padding: 4px 6px; font-size: 12px; }
  .trim__view { max-width: 220px; margin: 0 auto; }
  .key input { min-width: 0; }
}

/* Forgot password / change password. */
.forgot { margin: -12px 0 18px; }
.linkish { min-height: 0; padding: 0; border: 0; background: none; color: var(--sky); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.forgot__help { max-width: 560px; margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--void-2); }
.forgot__help p { margin: 0 0 12px; }
.forgot__help .actions { margin: 0; flex-wrap: wrap; }
.btnlike { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 8px; background: var(--blue); color: var(--void); font-weight: 700; text-decoration: none; }
.pass { margin-top: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--void-2); }
.pass .hint { flex-basis: 100%; margin: 4px 0 0; }
#passSave { background: var(--blue); border-color: var(--blue); color: var(--void); }

#recSave, #newCode { background: var(--blue); border-color: var(--blue); color: var(--void); }
.recovery { flex-basis: 100%; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.code { margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--void-3); color: var(--cream); font: 700 22px/1 "DM Mono", ui-monospace, Menlo, monospace; letter-spacing: .06em !important; user-select: all; }
#forgotForm .hint { flex-basis: 100%; margin: 0 0 6px; }
