/* Every cover filmed on one phone. A single column on a phone, which is
   where these links are opened; two from tablet width up.
   Colours come from the shop's own variables in styles.css — this shop is a
   white canvas with near-black ink, so a card invented with dark values of
   its own would print near-black text on a near-black card. */
.md-wrap { padding-bottom: 48px; }

.md-head { margin: 18px 0 20px; }
.md-title { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.25; }
.md-sub { margin: 0 0 14px; color: var(--ink-2); font-size: 0.95rem; }

/* The chooser, for whoever opened the link holding a different phone. */
.md-pick { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.md-pick > span { font-size: 0.85rem; color: var(--ink-2); }
/* 16px or iOS zooms the whole page when it is focused. */
.md-select {
  font-size: 16px;
  padding: 11px 12px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

.md-list { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .md-list { grid-template-columns: 1fr 1fr; } }

.md-card {
  border: 1px solid var(--line);
  border-radius: var(--radius, 16px);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

/* 16:9 by default; a Short is filmed upright, so it gets a tall box. The
   video itself is always on black, whatever the page around it is. */
.md-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.md-player.is-tall { aspect-ratio: 9 / 16; }
.md-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.md-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-color: #000;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}
.md-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  /* On top of a photo, so its own contrast cannot come from the theme. */
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.md-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.md-name { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.md-tag { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.md-price { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.md-price s { font-weight: 400; font-size: 0.9rem; color: var(--ink-3); }
/* Over the video, matching .card-pre in the grid so the same thing looks
   the same wherever the shop says it. Its own contrast, because what is
   behind it is a photo or a playing video, not the page. */
.md-flag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(12, 12, 16, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: .02em;
  /* Above the iframe, which otherwise paints over it. */
  z-index: 1;
  pointer-events: none;
}

.md-cod { margin: 26px 0 0; text-align: center; color: var(--ink-2); font-size: 0.9rem; }
