/* Friend Videos pages: sign-up (/invite), the video list (/friends/) and the grown-ups' page (/friends/admin/). */
:root {
  --navy: #0d1f2d; --navy2: #16314a; --line: #2c4c66; --yellow: #f5c518; --teal: #0ec4cc; --red: #ff6b61;
  --white: #ffffff; --soft: #b9cddc;
  font-family: 'Nunito', 'Trebuchet MS', sans-serif; font-weight: 700; color: var(--white); background: var(--navy);
  font-synthesis: none; -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: var(--navy); }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 900; text-decoration: none; }
.brand img { display: block; }
.brand:hover span { text-decoration: underline; }
.bar-links { display: flex; align-items: center; gap: 20px; font-size: 16px; font-weight: 800; }
.bar-links button { background: none; border: 0; padding: 4px 0; text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 24px 64px; }
.narrow { max-width: 520px; padding-top: clamp(24px, 9vh, 96px); }
h1 { font-size: clamp(42px, 8vw, 72px); font-weight: 900; line-height: 0.95; letter-spacing: -0.025em; }
h2 { font-size: 26px; font-weight: 900; letter-spacing: -0.01em; }
.lede { margin-top: 16px; max-width: 44ch; font-size: 18px; line-height: 1.5; color: var(--soft); }
.fine { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--soft); }

form.stack { display: grid; gap: 18px; margin-top: 28px; }
label.field { display: grid; gap: 7px; font-size: 16px; font-weight: 800; }
label.field small { font-size: 14px; font-weight: 700; color: var(--soft); }
input[type="text"], input[type="url"] { width: 100%; padding: 13px 15px; background: var(--white); color: var(--navy); border: 3px solid var(--white); border-radius: 14px; font-size: 17px; font-weight: 700; }
input::placeholder { color: #7d91a1; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.primary { justify-self: start; padding: 13px 26px; background: var(--yellow); color: var(--navy); border: 3px solid var(--yellow); border-radius: 14px; box-shadow: 0 5px 0 #a8850a; font-size: 18px; font-weight: 900; text-decoration: none; display: inline-block; }
.primary:hover { background: #ffd53d; border-color: #ffd53d; }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #a8850a; }
.primary:disabled { opacity: 0.6; cursor: default; }
.ghost { padding: 9px 16px; background: none; border: 3px solid var(--line); border-radius: 12px; font-size: 15px; font-weight: 800; text-decoration: none; }
.ghost:hover { border-color: var(--white); }
.error { margin-top: 16px; padding: 12px 16px; background: #47201f; border: 3px solid var(--red); border-radius: 14px; }
.panel { margin-top: 28px; padding: 22px; background: var(--navy2); border-radius: 20px; }
.panel p + p { margin-top: 10px; }
.panel p { line-height: 1.5; }
.panel .primary { margin-top: 18px; }

/* Video list */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 24px; margin-top: 36px; }
.video .frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; background: #000; border: 0; border-radius: 16px; overflow: hidden; }
.video .frame img, .video .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; display: grid; place-items: center; background: var(--yellow); border-radius: 50%; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }
.video .play svg { width: 30px; height: 30px; margin-left: 4px; fill: var(--navy); }
.video button.frame:hover .play { background: #ffd53d; transform: scale(1.06); }
.video h2 { margin-top: 12px; font-size: 19px; line-height: 1.25; }
.video a { display: inline-block; margin-top: 4px; font-size: 15px; color: var(--soft); }
.video a:hover { color: var(--white); }

/* Admin */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 32px; align-items: start; }
.rows { display: grid; gap: 10px; margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; background: var(--navy2); border-radius: 16px; }
.row.pending { outline: 3px solid var(--yellow); }
.row .who { flex: 1 1 200px; min-width: 0; }
.row .who b { display: block; font-size: 18px; font-weight: 900; overflow-wrap: anywhere; }
.row .who span { display: block; font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }
.row .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.row img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.small { padding: 7px 12px; background: none; border: 3px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 800; }
.small:hover { border-color: var(--white); }
.small.yes { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.add { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.add input { flex: 1 1 240px; }
.add .primary { box-shadow: none; padding: 11px 20px; }
.empty { margin-top: 16px; color: var(--soft); line-height: 1.5; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--line); }
.tag.pending { background: var(--yellow); color: var(--navy); }
.tag.approved { background: var(--teal); color: var(--navy); }

@media (max-width: 760px) {
  .bar { padding: 12px 16px; }
  .wrap { padding: 16px 16px 48px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .videos { grid-template-columns: minmax(0, 1fr); }
}
.row .who .tag { display: inline-block; font-size: 13px; color: var(--white); vertical-align: 2px; }
.row .who .tag.pending, .row .who .tag.approved { color: var(--navy); }
