/* The video guides preview page (DEC-058). Adds to /styles.css (Night Cabin, night). */
button:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.intro { padding: 34px 0 10px; }
.intro h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.2; }
.intro p { margin: 0 0 10px; color: var(--muted); max-width: 760px; }
.note {
  margin: 18px 0 8px; padding: 14px 18px; border-radius: 14px; max-width: 760px;
  background: linear-gradient(135deg, var(--surface), var(--glow)); border: 1px solid var(--quiet-line);
  color: var(--fg); font-size: 15px;
}

/* The 14 guides: 4 across on computers, 3 on tablets, 2 on phones */
.grid { list-style: none; margin: 22px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; } }

.card button {
  display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer; border-radius: var(--radius);
}
.thumb {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--quiet-line); background: var(--surface); aspect-ratio: 3 / 4;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
/* The see-through window over the picture, under the play button */
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,28,27,.15) 0%, rgba(15,28,27,.45) 55%, rgba(15,28,27,.85) 100%);
}
.play {
  position: absolute; z-index: 1; left: 50%; top: 46%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgba(15,28,27,.62); border: 2px solid rgba(156,203,184,.85);
  backdrop-filter: blur(4px); display: grid; place-items: center; transition: transform .2s ease, background .2s ease;
}
.play svg { width: 30px; height: 30px; margin-left: 5px; fill: var(--mint); }
.num, .len {
  position: absolute; z-index: 1; top: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: rgba(15,28,27,.78); border: 1px solid var(--quiet-line);
}
.num { left: 12px; color: var(--brass); }
.len { right: 12px; color: var(--fg); font-variant-numeric: tabular-nums; }
.over {
  position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px;
  font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--fg);
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.card p { margin: 10px 2px 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.card button:hover .play, .card button:focus-visible .play { transform: scale(1.08); background: rgba(29,58,51,.85); }
.card button:hover .thumb img { transform: scale(1.03); }
@media (max-width: 700px) {
  .play { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
  .play svg { width: 24px; height: 24px; }
  .over { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .thumb img, .play { transition: none; } }

/* The video window */
dialog {
  padding: 0; border: 1px solid var(--quiet-line); border-radius: 20px; background: var(--surface); color: var(--fg);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px); /* phones: the space left by the address bar */
}
dialog::backdrop { background: rgba(5,10,10,.82); }
.bar { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 18px; }
.bar h2 { margin: 0; flex: 1; font-size: 17px; line-height: 1.3; }
.bar .small { color: var(--brass); font-weight: 700; display: block; font-size: 13px; }
.btn {
  min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--quiet-line);
  background: var(--glow); color: var(--fg); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--mint); }
.btn.close { width: 44px; padding: 0; font-size: 22px; line-height: 1; }
.player { background: #000; }
.player video { display: block; width: 100%; height: auto; max-height: calc(100vh - 170px); aspect-ratio: 9 / 16; background: #000; }
.player video { max-height: calc(100dvh - 170px); }
.problem { margin: 0; padding: 10px 18px 0; color: var(--brass); font-size: 15px; }
.problem[hidden] { display: none; }
.nav { display: flex; justify-content: space-between; gap: 10px; padding: 12px; }
.btn:disabled { opacity: .4; cursor: default; border-color: var(--quiet-line); }
