/* Shared portrait-inspired HUD skin for landscape, tablet and desktop. */
@media (min-width: 621px) and (max-width: 1280px) and (min-height: 621px),
       (max-width: 1280px) and (max-height: 620px) and (orientation: landscape) {
  .online-game .left-rail > .hud-panel {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: none;
    box-shadow: none;
    isolation: isolate;
    pointer-events: auto;
  }
  .online-game .left-rail > .hud-panel::before,
  .online-game .left-rail > .hud-panel::after {
    display: none;
  }
  .online-game .left-rail > .hud-panel.enemy {
    background: transparent url("../../assets/ui/battle-hud-enemy-panel.svg") center / 100% 100% no-repeat;
  }
  .online-game .left-rail > .hud-panel.player {
    background: transparent url("../../assets/ui/battle-hud-player-panel.svg") center / 100% 100% no-repeat;
  }
  .online-game .left-rail .hud-title {
    position: absolute;
    inset: 0;
    height: auto;
    display: block;
  }
  .online-game .left-rail .hud-avatar {
    position: absolute;
    top: 0;
    width: 37.142857%;
    height: 100%;
    display: block;
    border: 0;
    color: transparent;
    background: none;
    clip-path: none;
    box-shadow: none;
  }
  .online-game .left-rail .enemy .hud-avatar {
    left: 0;
  }
  .online-game .left-rail .player .hud-avatar {
    right: 0;
  }
  .online-game .left-rail .hud-avatar::before,
  .online-game .left-rail .hud-avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
    border: 0;
    border-radius: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    box-shadow: none;
  }
  .online-game .left-rail .hud-avatar::before {
    clip-path: polygon(18.08% 0, 81.92% 0, 100% 17.76%, 100% 82.62%, 81.92% 100%, 18.08% 100%, 0 82.62%, 0 17.76%);
  }
  .online-game .left-rail .hud-avatar-profile {
    inset: 0;
    border-radius: 0;
    clip-path: polygon(18.08% 0, 81.92% 0, 100% 17.76%, 100% 82.62%, 81.92% 100%, 18.08% 100%, 0 82.62%, 0 17.76%);
  }
  .online-game .left-rail .enemy .hud-avatar::before {
    background-image: url("../../assets/ui/battle-hud-enemy-avatar.svg");
  }
  .online-game .left-rail .enemy .hud-avatar::after {
    background-image: url("../../assets/ui/battle-hud-enemy-avatar-frame.svg");
  }
  .online-game .left-rail .player .hud-avatar::before {
    background-image: url("../../assets/ui/battle-hud-player-avatar.svg");
  }
  .online-game .left-rail .player .hud-avatar::after {
    background-image: url("../../assets/ui/battle-hud-player-avatar-frame.svg");
  }
  .online-game .left-rail .hud-avatar-core,
  .online-game .left-rail .faction-mark,
  .online-game .left-rail .effects,
  .online-game .left-rail .hint-panel {
    display: none;
  }
  .online-game .left-rail .hud-identity {
    position: absolute;
    top: 16.666667%;
    min-width: 0;
  }
  .online-game .left-rail .enemy .hud-identity {
    left: 43.571429%;
    right: 5%;
  }
  .online-game .left-rail .player .hud-identity {
    left: 7.142857%;
    right: 43.571429%;
  }
  .online-game .left-rail .hud-name {
    color: #168cf2;
    font-family: Roboto, "Arial Narrow", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: none;
  }
  .online-game .left-rail .enemy .hud-name {
    color: #fa3039;
  }
  .online-game .left-rail .stats {
    position: absolute;
    bottom: 14.814815%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
  }
  .online-game .left-rail .enemy .stats {
    left: 43.571429%;
    right: 3.571429%;
  }
  .online-game .left-rail .player .stats {
    left: 7.142857%;
    right: 39.285714%;
  }
  .online-game .left-rail .stat {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 11px;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    background: transparent;
    box-shadow: none;
    clip-path: none;
  }
  .online-game .left-rail .stat-label {
    width: auto;
    height: 9px;
    display: block;
    font-size: 0;
    line-height: 0;
  }
  .online-game .left-rail .stat-icon {
    display: block;
    font-size: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: none;
  }
  .online-game .left-rail .hand-stat .stat-icon {
    width: 9px;
    height: 9px;
    background-image: url("../../assets/ui/battle-hud-hand.svg");
  }
  .online-game .left-rail .hull-stat .stat-icon {
    width: 10px;
    height: 9px;
    background-image: url("../../assets/ui/battle-hud-heart.svg");
  }
  .online-game .left-rail .stat-value {
    min-width: 0;
    margin: 0;
    color: #fff;
    font-family: Roboto, "Arial Narrow", Arial, sans-serif;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
  }
  .online-game .battle-round-hud {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: Roboto, "Arial Narrow", Arial, sans-serif;
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
  }
  .online-game .battle-round-label,
  .online-game .battle-round-value {
    font-size: 9px;
    line-height: 1.12;
    font-weight: 400;
  }
  .online-game .battle-round-value {
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
  }
  .online-game .battle-round-vs {
    margin-top: 3px;
    color: #55adff;
    font-size: 18px;
    line-height: 1.06;
    font-weight: 400;
    text-shadow: 0 0 8px rgba(70, 170, 255, .32);
  }
}
@media (max-width: 1280px) and (max-height: 620px) and (orientation: landscape) {
  .online-game .left-rail {
    grid-template-columns: 142px minmax(42px, 1fr) 142px;
    grid-template-rows: 66px;
    gap: 6px;
  }
  .online-game .left-rail > .hud-panel.enemy {
    grid-column: 1;
    grid-row: 1;
  }
  .online-game .left-rail > .hud-panel.player {
    grid-column: 3;
    grid-row: 1;
  }
  .online-game .battle-round-hud {
    grid-column: 2;
    grid-row: 1;
  }
  .online-game .left-rail .hud-name {
    font-size: 10px;
  }
  .online-game .left-rail .stats {
    gap: 5px;
  }
  .online-game .left-rail .stat-value {
    font-size: 9px;
  }
  .online-game .battle-round-label,
  .online-game .battle-round-value {
    font-size: 7px;
  }
  .online-game .battle-round-vs {
    font-size: 14px;
  }
}
@media (min-width: 621px) and (max-width: 1280px) and (min-height: 621px) {
  body.page-match.has-online-game {
    overflow: hidden;
  }
  .online-game.game {
    --wide-hand-height: clamp(154px, 21vh, 192px);
    height: 100dvh;
    min-height: 0;
    padding: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--wide-hand-height);
    gap: 8px;
    overflow: hidden;
  }
  .online-game .left-rail {
    position: absolute;
    z-index: 42;
    left: 50%;
    top: 8px;
    width: min(720px, calc(100% - 24px));
    height: clamp(76px, 9.5vh, 92px);
    min-height: 0;
    display: grid;
    grid-template-columns: 42.682927% 14.634146% 42.682927%;
    grid-template-rows: 1fr;
    gap: 0;
    align-content: stretch;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .online-game .left-rail > .hud-panel.enemy {
    grid-column: 1;
    grid-row: 1;
  }
  .online-game .left-rail > .hud-panel.player {
    grid-column: 3;
    grid-row: 1;
  }
  .online-game .battle-round-hud {
    grid-column: 2;
    grid-row: 1;
  }
  .online-game .center-stage {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    display: grid;
    grid-template-rows: clamp(88px, 10.5vh, 102px) minmax(0, 1fr);
    gap: 4px;
  }
  .online-game .battlefield {
    min-width: 0;
    min-height: 0;
    padding: 0 clamp(10px, 3vw, 44px) 6px;
    gap: 8px;
  }
  .online-game .right-rail {
    position: absolute;
    z-index: 44;
    top: clamp(104px, 13vh, 126px);
    right: 10px;
    bottom: calc(var(--wide-hand-height) + 18px);
    width: min(260px, 30vw);
    min-height: 0;
    display: block;
    pointer-events: none;
  }
  .online-game .top-actions,
  .online-game .log-panel {
    display: none;
  }
  .online-game .controls {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    display: grid;
    pointer-events: auto;
  }
  .online-game .mobile-action-row {
    position: relative;
    min-width: 0;
    min-height: 72px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
  }
  .online-game .mobile-action-menu-shell {
    position: relative;
    z-index: 65;
    min-width: 0;
    display: block;
    pointer-events: auto;
  }
  .online-game .mobile-action-menu-toggle {
    height: 100%;
    min-height: 72px;
  }
  .online-game .mobile-action-menu-panel {
    left: auto;
    right: 0;
    transform-origin: right bottom;
  }
  .online-game .primary-action-slot {
    min-width: 0;
    display: grid;
  }
  .online-game .primary-action-slot > .primary-button {
    width: 100%;
    height: 100%;
    min-width: 0;
  }
  .online-game .mobile-log-peek {
    position: fixed;
    z-index: 43;
    left: 50%;
    right: auto;
    bottom: calc(var(--wide-hand-height) + 14px);
    width: min(420px, 42vw);
    height: 42px;
    min-width: 0;
    padding: 5px 10px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    transform: translateX(-50%);
    border: 1px solid rgba(80, 200, 255, .56);
    background: linear-gradient(135deg, rgba(5, 18, 32, .94), rgba(3, 8, 15, .88));
    color: var(--text);
    box-shadow: 0 0 18px rgba(80, 200, 255, .2), 0 0 28px rgba(0, 0, 0, .45);
    clip-path: polygon(0 10px, 10px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
  }
  .online-game .mobile-log-peek.bot {
    border-color: rgba(255, 75, 67, .62);
    box-shadow: 0 0 18px rgba(255, 75, 67, .2), 0 0 28px rgba(0, 0, 0, .45);
  }
  .online-game .mobile-log-mark {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-left: 1px solid currentColor;
    border-right: 1px solid currentColor;
    color: var(--blue-soft);
    font-size: 11px;
    font-weight: 900;
  }
  .online-game .mobile-log-peek.bot .mobile-log-mark {
    color: var(--red-soft);
  }
  .online-game .mobile-log-main {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .online-game .mobile-log-label {
    color: var(--muted);
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
  }
  .online-game .mobile-log-text {
    min-width: 0;
    overflow: hidden;
    display: block;
    color: #eff9ff;
    font-size: 11px;
    line-height: 1.12;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .online-game .mobile-log-time {
    display: block;
    color: var(--blue-soft);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
  }
  .online-game .hand-dock {
    position: relative;
    z-index: 40;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 8px 64px;
  }
  .online-game .hand-scroll {
    height: 100%;
    padding-top: 8px;
    padding-bottom: 6px;
  }
  .online-game .hand-card-wrap,
  .online-game .card {
    max-height: calc(var(--wide-hand-height) - 24px);
  }
}
@media (min-width: 621px) and (max-width: 900px) and (min-height: 621px) {
  .online-game.game {
    --wide-hand-height: clamp(146px, 18vh, 176px);
  }
  .online-game .left-rail {
    height: 76px;
  }
  .online-game .center-stage {
    grid-template-rows: 84px minmax(0, 1fr);
  }
  .online-game .right-rail {
    top: 92px;
    width: 220px;
  }
  .online-game .mobile-log-peek {
    width: min(360px, 54vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  .online-game .mobile-log-peek,
  .online-game .mobile-action-menu-panel {
    transition: none;
  }
}
