/* 813: landscape-only Nest/discard redesign.
   This is a presentation layer over the established 812 selection handlers.
   Portrait selectors intentionally absent. No rules, scoring or card IDs changed. */
@media (orientation: landscape) {
  body.in-game.angle-c-runtime #discardOverlay .discard-sheet.gh-landscape-discard-813 {
    --gh-813-face: clamp(90px, calc((100dvh - 340px) / 2), 190px);
    --gh-813-face-w: calc(var(--gh-813-face) * 0.690476);
    --gh-813-ornament: #d6b367;
    box-sizing: border-box !important;
    width: min(1500px, calc(100dvw - 16px)) !important;
    height: min(740px, calc(100dvh - 12px)) !important;
    max-height: calc(100dvh - 12px) !important;
    max-width: calc(100dvw - 16px) !important;
    padding: clamp(8px, 1.5dvh, 16px) clamp(10px, 1.45vw, 25px) !important;
    display: grid !important;
    grid-template-rows: minmax(54px, 76px) minmax(54px, 96px) minmax(0, 1fr) minmax(42px, 60px) !important;
    row-gap: clamp(5px, 1.3dvh, 10px) !important;
    border-radius: 18px !important;
    border: 2px solid #c7a45d !important;
    background: linear-gradient(
      145deg,
      #243541 0%,
      #0b1a28 22%,
      #101d2a 75%,
      #272a24 100%
    ) !important;
    box-shadow:
      0 0 0 3px #46341a,
      inset 0 0 0 1px #715a36,
      inset 0 0 20px #030b14,
      0 18px 75px #000b !important;
    overflow: hidden !important;
    isolation: isolate;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    padding: 0 4px !important;
    min-height: 0 !important;
    gap: 18px !important;
    border-bottom: 1px solid #c5a6636a !important;
    box-sizing: border-box !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-directions {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-overline {
    font:
      700 clamp(9px, 1.1vw, 12px) / 1.15 system-ui,
      sans-serif !important;
    letter-spacing: 0.22em !important;
    color: #bcab8a !important;
    white-space: nowrap !important;
    margin: 0 0 4px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-overline span {
    color: #e8ca77 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-title {
    font:
      700 clamp(19px, 3vw, 35px) / 1.05 Georgia,
      serif !important;
    letter-spacing: 0.012em !important;
    color: #ffebbc !important;
    white-space: nowrap !important;
    margin: 0 !important;
    text-shadow:
      0 2px 3px #000b,
      0 0 18px #aa7c2c42 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-instruction {
    font:
      500 clamp(10px, 1.15vw, 14px) / 1.18 system-ui,
      sans-serif !important;
    color: #d5cbad !important;
    margin: 4px 0 0 !important;
    white-space: nowrap !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-count {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: clamp(118px, 15vw, 182px) !important;
    min-height: 46px !important;
    padding: 5px 12px !important;
    margin: 0 !important;
    border-radius: 11px !important;
    border: 1px solid #bb9c5c !important;
    background: linear-gradient(180deg, #111f2c, #060f17) !important;
    box-shadow:
      inset 0 0 16px #0009,
      0 1px 4px #0008 !important;
    text-align: center !important;
    color: #f5daa0 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-n {
    font:
      700 clamp(18px, 2.45vw, 29px) / 1.05 Georgia,
      serif !important;
    color: #ffe6ac !important;
    font-variant-numeric: tabular-nums !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-label {
    color: #c9b997 !important;
    font:
      700 clamp(9px, 1vw, 11px) / 1.2 system-ui,
      sans-serif !important;
    letter-spacing: 0.03em !important;
    margin: 1px 0 0 !important;
    white-space: nowrap !important;
  }
  /* Two distinct physical zones: received kitty, and the six cards leaving the hand. */
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-trays {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(235px, 1fr) minmax(315px, 1.1fr) !important;
    gap: clamp(7px, 1vw, 15px) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-received {
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid #6f6144 !important;
    border-radius: 10px !important;
    background: linear-gradient(95deg, #19272f, #0a1a26) !important;
    box-shadow: inset 0 1px 6px #0006 !important;
    overflow: hidden !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-kitty {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(7px, 1vw, 15px) !important;
    padding: 4px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-label {
    font:
      700 clamp(10px, 1.25vw, 15px) / 1.2 Georgia,
      serif !important;
    color: #efd69e !important;
    white-space: nowrap !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-cards {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    gap: clamp(2px, 0.35vw, 5px) !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-cards .card-face {
    width: clamp(22px, 2.75vw, 40px) !important;
    height: clamp(30px, 4.05vw, 58px) !important;
    flex: 0 0 clamp(22px, 2.75vw, 40px) !important;
    min-width: 0 !important;
    box-shadow: 0 2px 5px #000b !important;
    filter: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-received-summary {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .gh-813-received-summary
    strong {
    font:
      700 clamp(12px, 1.35vw, 17px) Georgia,
      serif !important;
    color: #f0d397 !important;
    white-space: nowrap !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .gh-813-received-summary
    small {
    font:
      500 clamp(10px, 1vw, 13px) system-ui,
      sans-serif !important;
    color: #bfbcb1 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest {
    display: flex !important;
    align-items: center !important;
    gap: clamp(5px, 0.9vw, 15px) !important;
    padding: 5px clamp(6px, 0.9vw, 13px) !important;
    min-height: 0 !important;
    min-width: 0 !important;
    border: 1px solid #af8b4d !important;
    border-radius: 10px !important;
    background: linear-gradient(
      130deg,
      #493420,
      #342415 14%,
      #172e37 21%,
      #0d2632 80%,
      #6b4623 100%
    ) !important;
    box-shadow:
      inset 0 1px 6px #000b,
      inset 0 0 0 2px #aa793836,
      0 2px 5px #0006 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: clamp(52px, 5.9vw, 95px) !important;
    flex: 0 0 auto !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title span {
    font:
      800 clamp(13px, 1.5vw, 20px) / 1.1 Georgia,
      serif !important;
    color: #f6d88f !important;
    letter-spacing: 0.12em !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title small {
    font:
      500 clamp(9px, 0.85vw, 11px) / 1.15 system-ui,
      sans-serif !important;
    color: #d8c8a6 !important;
    max-width: 82px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-wells {
    min-width: 0 !important;
    display: grid !important;
    flex: 1 1 auto !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: clamp(3px, 0.45vw, 7px) !important;
    height: 100% !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-well {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    height: min(100%, 75px) !important;
    max-width: 65px !important;
    width: 100% !important;
    border: 1px dashed #bea274a0 !important;
    border-radius: 5px !important;
    background: #07121b99 !important;
    box-shadow: inset 0 0 8px #0008 !important;
    overflow: hidden !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-well-no {
    font:
      700 clamp(12px, 1.5vw, 20px) Georgia,
      serif !important;
    color: #ad966a !important;
    opacity: 0.75 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-well.filled {
    border: 1px solid #f4cc77 !important;
    background: #211d13 !important;
    box-shadow:
      0 0 9px #cca95a66,
      inset 0 1px 5px #0009 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-mini-face {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    aspect-ratio: 58 / 84 !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    /* Browser scales the same approved faces instead of painting substitutes. */
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: radial-gradient(ellipse at 47% 25%, #16457b, #0b2b50 65%, #08182c 100%) !important;
    padding: 5px 18px 8px !important;
    border: 1px solid #bda26f !important;
    border-radius: 10px !important;
    box-shadow:
      inset 0 0 30px #000b,
      inset 0 0 0 3px #173452,
      0 1px 2px #0008 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption {
    flex: none !important;
    min-height: 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    border-bottom: 1px solid #e0c08445 !important;
    padding: 0 5px 4px !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .gh-813-hand-caption
    strong {
    color: #f0d49a !important;
    font:
      700 clamp(11px, 1.25vw, 16px) / 1.1 Georgia,
      serif !important;
    letter-spacing: 0.14em !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption span {
    color: #c9cccd !important;
    font:
      500 clamp(10px, 1.05vw, 13px) / 1.1 system-ui,
      sans-serif !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-groups {
    box-sizing: border-box !important;
    display: grid !important;
    flex: 1 1 auto !important;
    width: min(100%, 1280px) !important;
    max-height: 100% !important;
    height: 100% !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, var(--gh-813-face)) !important;
    justify-items: center !important;
    align-items: center !important;
    align-content: center !important;
    gap: clamp(4px, 1vh, 12px) clamp(3px, 1vw, 12px) !important;
    padding: 0 !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot.discard-pick {
    box-sizing: border-box !important;
    width: max(41px, var(--gh-813-face-w)) !important;
    max-width: 100% !important;
    height: var(--gh-813-face) !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center !important;
    border: 0 !important;
    background: none !important;
    overflow: visible !important;
    touch-action: manipulation !important;
    position: relative !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art {
    width: var(--gh-813-face-w) !important;
    min-width: 0 !important;
    max-width: var(--gh-813-face-w) !important;
    height: var(--gh-813-face) !important;
    min-height: 0 !important;
    max-height: var(--gh-813-face) !important;
    border: 1px solid #e3c37d !important;
    border-radius: 5px !important;
    box-shadow:
      0 3px 10px #000a,
      0 0 0 2px #7b512777 !important;
    filter: none !important;
    opacity: 1 !important;
    transition:
      transform 0.13s ease,
      box-shadow 0.13s ease !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot.selected
    .discard-card-art {
    outline: 3px solid #ffdf85 !important;
    outline-offset: 2px !important;
    box-shadow:
      0 0 0 3px #33200c,
      0 0 13px 4px #f5c25a !important;
    transform: translateY(-3px) !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot.selected
    .gh-card-check {
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    top: -9px !important;
    right: -9px !important;
    border: 2px solid #fee1a0 !important;
    border-radius: 50% !important;
    color: #10282b !important;
    background: #f3cb76 !important;
    font:
      900 14px/1 Georgia,
      serif !important;
    text-shadow: none !important;
    box-shadow: 0 1px 5px #0009 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-actions {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 5px !important;
    border-top: 1px solid #a88b5969 !important;
    gap: 12px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep {
    display: flex !important;
    align-items: baseline !important;
    gap: 9px !important;
    font:
      500 clamp(12px, 1.35vw, 17px) / 1.15 system-ui,
      sans-serif !important;
    color: #d2d2cd !important;
    white-space: nowrap !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep strong {
    font:
      700 clamp(21px, 2vw, 29px) / 1 Georgia,
      serif !important;
    color: #dabb80 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 #confirmDiscard {
    flex: none !important;
    width: min(385px, 47%) !important;
    height: min(100%, 50px) !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 4px 16px !important;
    border-radius: 10px !important;
    border: 1px solid #e4c47d !important;
    background: linear-gradient(180deg, #37624b, #112f26) !important;
    color: #fff0c5 !important;
    font:
      700 clamp(13px, 1.6vw, 19px) / 1.2 Georgia,
      serif !important;
    box-shadow:
      inset 0 1px 0 #ffffff3b,
      0 3px 8px #0008 !important;
    text-align: center !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 #confirmDiscard:disabled {
    color: #d3c3a2 !important;
    border-color: #8f7854 !important;
    background: linear-gradient(180deg, #383c40, #222b33) !important;
    opacity: 0.76 !important;
    box-shadow: inset 0 1px 2px #0009 !important;
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  body.in-game.angle-c-runtime #discardOverlay .discard-sheet.gh-landscape-discard-813 {
    --gh-813-face: clamp(78px, calc((100dvh - 200px) / 2), 139px);
    grid-template-rows: 42px 44px minmax(0, 1fr) 40px !important;
    padding: 6px 10px !important;
    row-gap: 5px !important;
    border-radius: 12px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-overline {
    font-size: 9px !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 2px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-title {
    font-size: clamp(17px, 2.6vw, 23px) !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-instruction {
    font-size: 10px !important;
    margin-top: 1px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-count {
    min-width: 112px !important;
    min-height: 36px !important;
    padding: 3px 7px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-n {
    font-size: 20px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-label {
    font-size: 8px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-trays {
    grid-template-columns: minmax(150px, 1fr) minmax(265px, 1fr) !important;
    gap: 6px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-kitty {
    padding: 2px 7px !important;
    gap: 6px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-label {
    font-size: 10px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-cards .card-face {
    width: 22px !important;
    height: 31px !important;
    flex: 0 0 22px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest {
    padding: 2px 7px !important;
    gap: 5px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title {
    min-width: 44px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title span {
    font-size: 12px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title small {
    font-size: 8px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-well {
    max-height: 39px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand {
    padding: 3px 8px 5px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption {
    min-height: 17px !important;
    padding-bottom: 2px !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .gh-813-hand-caption
    strong {
    font-size: 11px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption span {
    font-size: 10px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-groups {
    gap: 4px 5px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 #confirmDiscard {
    width: 46% !important;
    height: 37px !important;
    font-size: 15px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep {
    font-size: 12px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep strong {
    font-size: 20px !important;
  }
}
@media (orientation: landscape) and (max-height: 350px) {
  body.in-game.angle-c-runtime #discardOverlay .discard-sheet.gh-landscape-discard-813 {
    --gh-813-face: clamp(61px, calc((100dvh - 154px) / 2), 88px);
    grid-template-rows: 31px 34px minmax(0, 1fr) 32px !important;
    padding: 5px 8px !important;
    row-gap: 3px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-overline {
    display: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-title {
    font-size: 16px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-instruction {
    font-size: 9px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-discard-count {
    min-height: 26px !important;
    min-width: 83px !important;
    padding: 1px 4px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-n {
    font-size: 15px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-count-label {
    display: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-trays {
    grid-template-columns: minmax(142px, 0.7fr) minmax(235px, 1.3fr) !important;
    gap: 4px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-cards {
    display: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-nest-title small {
    display: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-well {
    max-height: 25px !important;
    border-radius: 3px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand {
    padding: 2px 6px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption {
    min-height: 14px !important;
    padding-bottom: 0 !important;
    border: 0 !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption span {
    display: none !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-groups {
    gap: 3px 2px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep {
    font-size: 10px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-keep strong {
    font-size: 15px !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 #confirmDiscard {
    height: 27px !important;
    min-height: 25px !important;
    font-size: 12px !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot.selected
    .gh-card-check {
    width: 16px !important;
    height: 16px !important;
    right: -5px !important;
    top: -5px !important;
    font-size: 10px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art {
    transition: none !important;
  }
}
/* Owner visual QA: keep status lettering clear above the physical card faces. */
@media (orientation: landscape) {
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand {
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption {
    box-sizing: border-box !important;
    width: 100% !important;
    align-self: stretch !important;
    justify-content: space-between !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .discard-slot.selected {
    transform: none !important;
    box-shadow: none !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-kitty.kitty-flashing,
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-kitty
    .kitty-flash-card {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  body.in-game.angle-c-runtime #discardOverlay .discard-sheet.gh-landscape-discard-813 {
    --gh-813-face: clamp(78px, calc((100dvh - 214px) / 2), 132px);
  }
}
@media (orientation: landscape) and (max-height: 350px) {
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-hand-caption {
    display: none !important;
  }
}

/* 814 Nest card border safety: show the complete original printed card frame.
   Scoped exclusively to the 813 landscape Nest overlay, not portrait or table cards. */
@media (orientation: landscape) {
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art {
    box-sizing: border-box !important;
    border: 0 !important;
    padding: 3px !important;
    overflow: visible !important;
    background: #f6edd9 !important;
    border-radius: 6px !important;
    box-shadow:
      0 0 0 1px #f4ce81,
      0 3px 8px #000a !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art
    .c-stack.numbered-asset-stack,
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art
    .numbered-asset-stack {
    position: absolute !important;
    inset: 3px !important;
    left: 3px !important;
    right: 3px !important;
    top: 3px !important;
    bottom: 3px !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot
    .discard-card-art
    .numbered-card-img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    border-radius: 3px !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .discard-slot.selected
    .discard-card-art {
    box-shadow:
      0 0 0 3px #ffdf85,
      0 0 14px #f5c25a !important;
  }
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .kitty-cards .card-face,
  body.in-game.angle-c-runtime #discardOverlay .gh-landscape-discard-813 .gh-813-mini-face {
    box-sizing: border-box !important;
    padding: 2px !important;
    overflow: hidden !important;
    border: 1px solid #d6b36d !important;
    background: #f6edd9 !important;
  }
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .kitty-cards
    .card-face
    .numbered-asset-stack,
  body.in-game.angle-c-runtime
    #discardOverlay
    .gh-landscape-discard-813
    .gh-813-mini-face
    .numbered-asset-stack {
    inset: 2px !important;
    width: auto !important;
    height: auto !important;
  }
}
