/* I9 (监军 06:24Z): phone layout of the live room. The host's face and upper body (the middle of the
   video) stay clear: the 「今日好物」 card sits low on the right, above the side actions, as a compact
   card. Every first-screen control gets a 44px touch target without changing how it looks (transparent
   border + negative margin), and every label is at least 12px. Phones only; desktop is unchanged.
   Loaded just before J8's contrast sheet (which stays last); the badge rule carries #shell to outrank it. */
@media (max-width: 767px) {
  html body.watch .watch .stage-wrap .room-deal-154 { top: auto !important; bottom: 204px !important; right: 8px !important; width: 104px !important; max-width: 104px !important; border-radius: 12px; }
  html body.watch .watch .room-deal-154 > :first-child { padding: 4px 8px; font-size: 12px; }
  html body.watch .watch .room-deal-154 .room-deal-body { gap: 4px; padding: 6px; }
  html body.watch .watch .room-deal-154 .room-deal-body > img { height: 52px !important; }
  html body.watch .watch .room-deal-154 .room-deal-body > strong { font-size: 12px; line-height: 1.25; }
  html body.watch .watch .room-deal-154 .room-deal-body > b { font-size: 14px; }
  html body.watch .watch .room-deal-154 .room-buy-154 { height: 44px !important; min-height: 44px !important; padding: 0 6px !important; font-size: 12px !important; }

  html body.watch .watch .side-actions .act, html body.watch .watch .side-actions .room-gift-toggle-221 { width: 44px !important; height: 44px !important; min-width: 44px; }
  /* the side actions are 44px: room-polish-264 sizes both them and the ask box's right edge from this */
  html body.watch, html body.watch .watch { --c264-action: 44px !important; }
  html body.watch .watch .room-product-open, html body.watch .watch .room-now-154 button { min-height: 44px; }

  html body.watch .watch #stage-wrap > .top .host-line { height: 44px !important; margin-block: -6px !important; }
  html body.watch .watch #stage-wrap #desktop-follow-btn { border: 12px solid transparent !important; margin: -12px; background-clip: padding-box !important; box-sizing: content-box; box-shadow: none !important; font-size: 12px; }
  html body.watch .watch #desktop-follow-label { font-size: 12px; }
  html body.watch #shell.watch #stage-wrap > .top .room-ai-badge-r4 { border: 15px solid transparent !important; border-inline-width: 7px !important; margin: -15px -7px; background-clip: padding-box !important; box-sizing: content-box; font-size: 12px; line-height: 16px; }
  html body.watch .watch .room-now-154 .room-now-label { font-size: 12px !important; }
}

/* Product sheet in the room (phones): a lower half-sheet, so the host's face and upper body stay in view
   above it. Its first view holds everything needed to buy: a small image beside the title and price, the
   options, then 「加入购物袋」 and 「立即购买」; trust lines and the long description follow when scrolled. */
@media (max-width: 767px) {
  html body.watch dialog#product-sheet.sheet { top: auto !important; bottom: 0 !important; height: 46dvh !important; max-height: 46dvh !important; }
  html body.watch #product-sheet .sheet-body { display: grid !important; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; row-gap: 10px; align-content: start; }
  html body.watch #product-sheet .sheet-body > * { grid-column: 1 / -1; margin-block: 0; order: 10; }  /* anything added later goes after the buy buttons */
  html body.watch #product-sheet #pdp-gallery, html body.watch #product-sheet #product-sheet-title, html body.watch #product-sheet .sheet-body > .price { order: 0; }
  html body.watch #product-sheet #pdp-gallery { grid-column: 1; grid-row: 1 / span 2; width: 96px; margin: 0; }
  html body.watch #product-sheet .pdp-track, html body.watch #product-sheet .pdp-slide { width: 96px !important; height: 96px !important; min-height: 0 !important; border-radius: 10px; }
  html body.watch #product-sheet .pdp-slide img { width: 100% !important; height: 100% !important; object-fit: contain; }
  html body.watch #product-sheet .pdp-thumbs, html body.watch #product-sheet .pdp-count { display: none !important; }
  html body.watch #product-sheet #product-sheet-title { grid-column: 2; grid-row: 1; align-self: end; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html body.watch #product-sheet .sheet-body > .price { grid-column: 2; grid-row: 2; align-self: start; }
  html body.watch #product-sheet .pdp-variant-box { order: 1; }
  html body.watch #product-sheet #sheet-add { order: 2; min-height: 48px; }
  html body.watch #product-sheet #buy-now { order: 3; min-height: 48px; }
  html body.watch #product-sheet .pdp-full-title { order: 4; }
  html body.watch #product-sheet #sheet-trust { order: 5; }
  html body.watch #product-sheet #product-sheet-close { order: 6; }
  html body.watch #product-sheet #pdp-sections { order: 7; }
  html body.watch #product-sheet .trust-returns-link { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
}

/* J20: a brand introduction's card in the room (js/room-trial-i17.js marks it): no price, no quantity. */
body.trial-brand-card #product-sheet .price, body.trial-brand-card .product-panel .price, body.trial-brand-card #product-sheet .qty, body.trial-brand-card #product-sheet [data-qty] { display: none !important; }
