/* =========================================================
   Shared stylesheet — every page links this file.
   Change something here and all 5 pages update at once.
   ========================================================= */

:root {
  --bg:     #faf6ec;   /* warm cream page background */
  --text:   #1c1c1c;
  --muted:  #5a5a5a;
  --faint:  #8a8a8a;
  --line:   #ded9cd;   /* hairline rules */
  --card:   #fffdf7;   /* card surface, a shade lighter than the page */
  --accent: #e8604f;   /* coral links */
  --serif:  'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans:   'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1660px; margin: 0 auto; padding: 0 40px 80px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------------- masthead + nav ---------------- */
.masthead {
  display: block;
  text-align: center;
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 26px 0 22px;
}

.nav { display: flex; justify-content: space-around; align-items: center; padding: 14px 0; }
.nav a { font-size: 20px; transition: color .15s ease; }
.nav a:hover,
.nav a.active { color: var(--accent); }

/* ---------------- intro (home page) ---------------- */
.intro-grid { display: grid; grid-template-columns: 1fr 460px; }
.intro-main { padding: 34px 60px 40px 0; }
.intro-side { padding: 34px 0 40px 46px; border-left: 1px solid var(--line); }

.portrait {
  float: left;
  width: 262px;
  margin: 6px 42px 20px 0;
  display: block;
  background: #e5e0d4;
}

h2 {
  font-family: var(--sans);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  line-height: 1.3;
}

p { margin: 0 0 26px; }
p:last-child { margin-bottom: 0; }

.intro-grid a { color: var(--accent); transition: opacity .15s ease; }
.intro-grid a:hover { opacity: .7; }

/* ---------------- big serif section headings ---------------- */
.section-title {
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  padding: 42px 0 34px;
  line-height: 1.1;
}

.lede {
  font-size: 21px;
  color: var(--muted);
  max-width: 780px;
  padding: 26px 0 6px;
}

/* ---------------- banner cards ---------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); }

.card {
  display: block;
  padding: 34px 30px 44px;
  border-left: 1px solid var(--line);
  transition: background .18s ease;
}
.card:first-child { border-left: 0; padding-left: 0; }
.card:last-child  { padding-right: 0; }
.card:hover { background: rgba(0,0,0,.022); }

.card img,
.card .ph {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  background: #e5e0d4;
}

.card .tag {
  font-size: 14px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.4;
}
.card .title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 9px 0 8px;
}
.card:hover .title { color: var(--accent); }
.card .desc { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0 0 14px; }
.card .date { font-size: 15px; color: var(--faint); }

/* ---------------- list rows (writing) ---------------- */
.row {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 22px 14px;
  margin: 0 -14px;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.row .rthumb {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: #e9e4d7;
  border: 1px solid var(--line);
}
.row .rbody { flex: 1 1 auto; min-width: 0; }
.row .date { flex: 0 0 auto; margin-left: auto; padding-left: 20px; }

.more-link {
  display: inline-block;
  font-size: 19px;
  font-weight: 700;
  padding: 26px 0 0;
  color: var(--accent);
}
.more-link:hover { opacity: .7; }
.row:hover { background: rgba(0,0,0,.022); }
.row:hover .rt { color: var(--accent); }
.row .rtag {
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.6;
}
.row .rt { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; }
.row .rd { font-size: 17px; color: var(--muted); line-height: 1.5; }
.row .date { font-size: 15px; color: var(--faint); white-space: nowrap; }

/* ---------------- work entries ---------------- */
.entry { padding: 34px 0; border-bottom: 1px solid var(--line); }
.entry:last-of-type { border-bottom: 0; }
.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.entry-role { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.entry-org  { font-size: 18px; color: var(--muted); }
.entry-when { font-size: 16px; color: var(--faint); white-space: nowrap; }
.entry ul { margin: 16px 0 0; padding-left: 22px; max-width: 950px; }
.entry li { margin-bottom: 12px; }
.entry li::marker { color: var(--accent); }

/* ---------------- photo gallery ---------------- */
.page-center { text-align: center; }
.page-center .lede { margin-left: auto; margin-right: auto; }

/* breaks out of .wrap so the gallery runs nearly edge to edge.
   Rows are built by JS — each row is scaled so photos keep their
   true shape and the row still fills the width exactly. */
.gallery {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 10px 22px 0;
}

.grow {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.shot {
  display: block;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #e9e4d7;
  transition: opacity .18s ease;
}
.shot:hover img { opacity: .86; }
.shot .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 10px 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity .18s ease;
}
.shot:hover .cap { opacity: 1; }

/* ---------------- scorecards ---------------- */
.sheets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
  padding-top: 14px;
}
/* each game sits on its own card, lifted slightly off the cream page */
.sheet {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 14px 14px 18px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.sheet:hover {
  border-color: #cdc6b5;
  box-shadow: 0 6px 22px rgba(60, 50, 30, .10);
  transform: translateY(-2px);
}

.sheet img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  background: #e9e4d7;
}
.sheet .st {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-top: 14px;
}
.sheet:hover .st { color: var(--accent); }
.sheet .sd { font-size: 15px; color: var(--faint); line-height: 1.5; margin-top: 2px; }

.sheet .noimg {
  aspect-ratio: 3 / 2;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--faint);
  text-align: center;
  padding: 12px;
}

/* ---------------- box score overlay ---------------- */
.bx {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  display: none;
}
.bx.open { display: block; }
.bx-inner { max-width: 1080px; margin: 0 auto; padding: 34px 26px 90px; }

.bx-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--bg);
  border: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1;
  padding: 4px 6px 10px;
  cursor: pointer;
  z-index: 2;
}
.bx-close:hover { color: var(--accent); }

.bx h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.bx .meta { color: var(--faint); font-size: 16px; margin-bottom: 26px; }
.bx .note {
  font-size: 18px;
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 16px;
  margin: 0 0 30px;
}
.bx h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 34px 0 10px;
}
.bx .card-img {
  width: 100%;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 6px;
  background: var(--card);
}

/* the two halves of a scorecard, stacked. Click either for full size. */
.bx .sheetpair { margin-bottom: 8px; }
.bx .sheetpair figure { margin: 0 0 22px; }
.bx .sheetpair figcaption {
  font-size: 14px;
  color: var(--faint);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 2px;
}

table.bt {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
table.bt th, table.bt td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
table.bt th:first-child, table.bt td:first-child { text-align: left; width: 100%; }
table.bt thead th {
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
table.bt tr.tot td { font-weight: 700; border-bottom: 2px solid var(--text); }
table.bt td .pos { color: var(--faint); font-size: 13px; padding-left: 6px; }

/* line score scrolls sideways on a phone rather than squashing */
.ln-wrap { overflow-x: auto; }
table.ln { border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.ln th, table.ln td {
  padding: 7px 11px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
table.ln th:first-child, table.ln td:first-child { text-align: left; padding-left: 0; }
table.ln thead th { font-size: 12px; color: var(--faint); font-weight: 700; }
table.ln .sep { border-left: 1px solid var(--line); }
table.ln .big { font-weight: 700; }

/* ---------------- lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20,18,14,.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.lightbox .lb-cap {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  text-align: center;
  color: #e6e0d2;
  font-size: 15px;
  padding: 0 40px;
}
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #e6e0d2;
  font-family: var(--sans);
  font-size: 34px;
  line-height: 1;
  padding: 14px 18px;
  cursor: pointer;
  opacity: .7;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 10px; }
.lb-prev  { left: 4px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------------- bookshelf (plain text list) ---------------- */
.booklist { max-width: 900px; padding-top: 10px; }
.booklist a {
  display: block;
  padding: 5px 0;
  line-height: 1.7;
  transition: color .15s ease;
}
.booklist a:hover { color: var(--accent); }
.booklist a.fav { font-weight: 700; }

/* ---------------- footer ---------------- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--faint);
}
footer a:hover { color: var(--accent); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3) { border-left: 0; padding-left: 0; }
  .card:nth-child(2) { padding-right: 0; }
  .shelf { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  .gallery { padding: 8px 10px 0; }
  .grow { gap: 6px; margin-bottom: 6px; }
  .sheets { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 820px) {
  body { font-size: 17px; line-height: 1.75; }
  .wrap { padding: 0 22px 60px; }
  .masthead { font-size: 34px; padding: 20px 0 16px; }
  .nav { flex-wrap: wrap; gap: 8px 26px; justify-content: center; }
  .nav a { font-size: 17px; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-main { padding: 26px 0 30px; }
  .intro-side { padding: 26px 0 30px; border-left: 0; border-top: 1px solid var(--line); }
  .portrait { width: 150px; margin: 4px 24px 12px 0; }
  .section-title { font-size: 34px; padding: 30px 0 22px; }
  .lede { font-size: 18px; }
  .cards { grid-template-columns: 1fr; }
  .card { border-left: 0; padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
  .row { flex-wrap: wrap; gap: 14px; }
  .row .rthumb { flex: 0 0 110px; width: 110px; }
  .row .rbody { flex: 1 1 200px; }
  .row .date { flex: 1 1 100%; margin-left: 0; padding-left: 0; }
  .entry-role { font-size: 21px; }
  .shelf { grid-template-columns: repeat(3, 1fr); gap: 22px 16px; }
}

/* ================= BOOKSHELF =================
   Covers face out on a shelf you scroll sideways. Real cover art, served
   from your own Cloudinary account. Books with no cover fall back to a
   drawn one so the row never has a hole in it. */

.shelf-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0 18px;
}
.shelf-count {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.shelf-hint {
  font-size: 14px;
  color: var(--faint);
  margin-left: auto;
}

/* breaks out of .wrap so the shelf runs to the window edges */
.shelf-scroll {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 26px 40px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cfc7b4 transparent;
}
.shelf-scroll::-webkit-scrollbar { height: 9px; }
.shelf-scroll::-webkit-scrollbar-track { background: transparent; }
.shelf-scroll::-webkit-scrollbar-thumb {
  background: #cfc7b4;
  border-radius: 6px;
}
.shelf-scroll::-webkit-scrollbar-thumb:hover { background: #b9ae95; }

/* A looping shelf hides its scrollbar — the thumb would visibly snap back
   every time the strip rewinds, which looks broken. Dragging replaces it. */
.shelf-scroll.looping {
  scrollbar-width: none;
  cursor: grab;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}
.shelf-scroll.looping::-webkit-scrollbar { height: 0; }
.shelf-scroll.looping.grabbing { cursor: grabbing; }
.shelf-scroll.looping .vol { scroll-snap-align: none; }
/* stop the browser turning a horizontal drag into a back-navigation */
.shelf-scroll.looping .shelf-strip { overscroll-behavior-x: contain; }

.shelf-strip {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  width: max-content;
  padding-bottom: 30px;
  position: relative;
}

/* the surface the books stand on */
.shelf-strip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 1px;
  background: rgba(120, 96, 52, .32);
}
/* fade the shelf out at both edges so the loop has no visible seam */
.shelf-scroll.looping {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.vol {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
}
.vol:hover      { transform: translateY(-14px); z-index: 2; }
.vol.is-open    { transform: translateY(-18px); z-index: 3; }
.vol:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* The browser wants to let you drag an image out of the page, which steals
   the pointer before the shelf can scroll. pointer-events:none sends every
   event straight to the button underneath, and the two -drag rules stop the
   ghost image appearing at all. */
.vol .art, .vol .art-none {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.vol .art {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  border-radius: 1px 3px 3px 1px;
  background: #e9e4d7;
  /* thin dark edge on the left reads as the spine of a book standing up */
  box-shadow:
    inset 3px 0 0 rgba(0,0,0,.22),
    0 10px 20px -10px rgba(60, 44, 20, .55),
    0 2px 4px rgba(60, 44, 20, .18);
  transition: box-shadow .22s ease;
}
.vol:hover .art, .vol.is-open .art {
  box-shadow:
    inset 3px 0 0 rgba(0,0,0,.22),
    0 20px 30px -12px rgba(60, 44, 20, .55),
    0 3px 6px rgba(60, 44, 20, .2);
}

/* drawn stand-in when a book has no cover */
.vol .art-none {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 1px 3px 3px 1px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 12px 14px 16px;
  text-align: left;
  color: rgba(255,255,255,.95);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  box-shadow:
    inset 3px 0 0 rgba(0,0,0,.3),
    0 10px 20px -10px rgba(60, 44, 20, .55);
}
.vol .art-none em {
  display: block;
  font-style: normal;
  font-weight: 400;
  opacity: .75;
  font-size: 11.5px;
  margin-top: 7px;
}

/* the gilt mark for books worth handing someone */
.vol.fav::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -7px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d9b25e, #f0d79a, #d9b25e);
}

/* ---- the opened book ---- */
.book-open {
  display: none;
  gap: 30px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px;
  margin: 8px 0 34px;
}
.book-open.show { display: flex; }

.book-open .cover, .book-open .cover-none {
  flex: 0 0 168px;
  width: 168px;
  border-radius: 1px 3px 3px 1px;
  background: #e9e4d7;
  box-shadow: inset 3px 0 0 rgba(0,0,0,.22), 0 12px 26px -10px rgba(60, 44, 20, .5);
  display: block;
}
.book-open .cover-none {
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  color: rgba(255,255,255,.95);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.book-open .cover-none em {
  display: block; font-style: normal; font-weight: 400;
  opacity: .75; margin-top: 8px; font-size: 12.5px;
}

.book-open .bmeta { min-width: 0; flex: 1 1 auto; }
.book-open h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  padding-right: 30px;
}
.book-open .byline { font-size: 18px; color: var(--muted); margin-bottom: 14px; }
.book-open .facts  { font-size: 14px; color: var(--faint); margin-bottom: 8px; }
.book-open .stars  { font-size: 17px; color: #c99a34; letter-spacing: .12em; margin-bottom: 12px; }
.book-open .stars .off { color: #ded6c2; }
.book-open .tag {
  display: inline-block;
  color: #a8863f;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-size: 11.5px;
  margin-bottom: 10px;
}
.book-open .bclose {
  float: right;
  background: none; border: 0;
  font-size: 26px; line-height: 1;
  color: var(--faint);
  cursor: pointer;
  padding: 0 0 0 14px;
}
.book-open .bclose:hover { color: var(--text); }

/* ---- suggestions ---- */
.suggest-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 22px 24px;
  margin: 4px 0 34px;
  max-width: 560px;
}
.suggest-form label {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 14px 0 5px;
}
.suggest-form label:first-of-type { margin-top: 0; }
.suggest-form input, .suggest-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 9px 11px;
}
.suggest-form input:focus, .suggest-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.suggest-form textarea { resize: vertical; min-height: 68px; }
.suggest-form button {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 700;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 2px;
  padding: 11px 22px; cursor: pointer;
}
.suggest-form button:hover { filter: brightness(1.06); }
.suggest-form .hp { position: absolute; left: -5000px; }
.suggest-note { font-size: 14px; color: var(--faint); margin-top: 12px; }

@media (max-width: 700px) {
  .shelf-scroll { padding: 22px 20px 0; }
  .shelf-strip { gap: 16px; }
  .vol { width: 108px; }
  .book-open { flex-direction: column; gap: 20px; }
  .book-open .cover, .book-open .cover-none { flex-basis: auto; width: 140px; }
  .shelf-hint { display: none; }
}

/* ================= VIDEOS =================
   Thumbnails come straight from i.ytimg.com, derived from the video id.
   Clicking opens YouTube, so nothing from Google loads until someone
   actually wants to watch something. */

.vidgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px 28px;
  padding-top: 16px;
}

.vid { display: block; }

.vshot {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background: #e9e4d7;
  border: 1px solid var(--line);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.vshot img {
  width: 100%;
  height: 100%;
  /* hqdefault arrives as 4:3 with black bars — cover crops them away */
  object-fit: cover;
  display: block;
}
.vid:hover .vshot {
  border-color: #cdc6b5;
  box-shadow: 0 8px 24px rgba(60, 50, 30, .14);
  transform: translateY(-2px);
}

/* a play button drawn in CSS, so there's no icon file to ship */
.vplay {
  position: absolute;
  left: 50%; top: 50%;
  width: 62px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: rgba(20, 18, 14, .62);
  transition: background .18s ease, transform .18s ease;
}
.vplay::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.vid:hover .vplay {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}

/* when even hqdefault is missing, don't leave a broken-image icon */
.vshot.noshot img { display: none; }
.vshot.noshot::after {
  content: "Thumbnail unavailable";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--faint);
}

.vid .vt {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-top: 14px;
}
.vid:hover .vt { color: var(--accent); }
.vid .vd { font-size: 15px; color: var(--faint); margin-top: 2px; }

@media (max-width: 1100px) {
  .vidgrid { grid-template-columns: repeat(2, 1fr); gap: 32px 22px; }
}
@media (max-width: 700px) {
  .vidgrid { grid-template-columns: 1fr; gap: 28px; }
  .vplay { width: 54px; height: 38px; }
}
