/* First cascade layer: important layout rules win over the legacy launch layers. */
@layer karta-log-dock-1511 {
 #karta-stadium-test .stadium-layout>.kr609-always-logs{padding:4px 7px!important;box-sizing:border-box!important;overflow:hidden!important;background:#171426f2!important;border:1px solid #80719c66!important;border-radius:9px!important;box-shadow:none!important;gap:2px!important}
 #karta-stadium-test .kr609-always-logs>header{display:none!important}
 #karta-stadium-test .kr609-logs-entries{display:flex!important;flex-direction:column!important;gap:4px!important;min-height:0!important;height:100%!important;overflow:auto!important;overscroll-behavior:contain!important;pointer-events:auto!important;scrollbar-width:thin!important}
 #karta-stadium-test .kr609-logs-entries .activity-log{display:flex!important;align-items:center!important;flex:0 0 auto!important;gap:6px!important;min-height:32px!important;padding:2px 0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important;direction:rtl!important}
 #karta-stadium-test .stadium-layout .activity-log-avatar{position:relative!important;display:grid!important;place-items:center!important;width:26px!important;height:26px!important;min-width:26px!important;max-width:26px!important;min-height:26px!important;max-height:26px!important;flex:0 0 26px!important;overflow:hidden!important;border:1px solid var(--log-ball-color,#9581b6)!important;border-radius:50%!important;background:#242036!important;box-sizing:border-box!important;font-size:12px!important;line-height:1!important}
 #karta-stadium-test .stadium-layout .activity-log-avatar :is(.wof-avatar-inline,.bot-avatar,.log-fallback-avatar){display:grid!important;place-items:center!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;overflow:hidden!important}
 #karta-stadium-test .stadium-layout .activity-log-avatar :is(img,svg){display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-width:0!important;min-height:0!important;object-fit:contain!important;margin:0!important}
 #karta-stadium-test .stadium-layout :is(.activity-log-avatar-ball,.activity-log-side){display:none!important}
 #karta-stadium-test .kr609-logs-entries .activity-log-copy{flex:1!important;min-width:0!important;overflow:hidden!important}
 #karta-stadium-test .kr609-logs-entries .activity-log-copy>b{display:none!important}
 #karta-stadium-test .kr609-logs-entries .activity-log-copy>strong{display:block!important;font-size:10px!important;line-height:1.3!important;color:#eee7fa!important;white-space:normal!important}
 #karta-stadium-test .kr609-logs-entries .activity-log-copy>p{display:block!important;font-size:10px!important;line-height:1.4!important;color:#c9c1d6!important;margin:1px 0 0!important;white-space:normal!important;overflow-wrap:anywhere!important}
}


/* KARTA v1.5.15 — three compact, readable live events in the reserved
   landscape gap (Chat → Events → Deal), without moving or covering the board.
   The portrait Events drawer and its full history are intentionally unchanged.
   Reuse the first !important cascade layer to override older dock styles. */
@layer karta-log-dock-1511 {
  #karta-stadium-test .stadium-layout.stadium-landscape > .kr609-always-logs {
    background:linear-gradient(145deg,#12273a,#071626)!important;
    border:1px solid rgba(114,151,188,.44)!important;
    border-radius:8px!important;
    box-shadow:inset 0 1px 1px #ffffff12,0 2px 5px #0007!important;
    padding:3px 7px!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .stadium-bottom-tools > .kf1500-launch {
    display:none!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries {
    display:grid!important;
    grid-template-rows:repeat(3,minmax(0,1fr))!important;
    gap:1px!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries > .activity-log {
    display:flex!important;
    align-items:center!important;
    min-height:0!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    gap:5px!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries > .activity-log:nth-child(n+4) {display:none!important;}
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-avatar {
    width:17px!important;height:17px!important;
    min-width:17px!important;min-height:17px!important;
    max-width:17px!important;max-height:17px!important;
    flex:0 0 17px!important;
    background:#0b1929!important;
    border-color:#69899c!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy {
    display:flex!important;align-items:center!important;gap:4px!important;
    flex:1 1 0!important;min-width:0!important;overflow:hidden!important;
    white-space:nowrap!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>strong {
    display:block!important;flex:0 1 auto!important;max-width:48%!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
    font-size:10px!important;line-height:1.2!important;color:#e9f4fb!important;
  }
  #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>p {
    display:block!important;flex:1 1 0!important;min-width:0!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
    margin:0!important;font-size:10px!important;line-height:1.2!important;color:#c4d7e4!important;
  }
  @media(max-width:980px) and (orientation:landscape) {
    #karta-stadium-test .stadium-layout.stadium-landscape>.kr609-always-logs{padding:2px 5px!important;}
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-avatar {
      width:12px!important;height:12px!important;min-width:12px!important;
      min-height:12px!important;max-width:12px!important;max-height:12px!important;
      flex:0 0 12px!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries>.activity-log{gap:4px!important;}
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy{gap:3px!important;}
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>strong,
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>p {
      font-size:9px!important;line-height:1!important;
    }
  }
}


/* KARTA v1.5.16 — give the landscape live logs more vertical room and let the
   match-start guidance read cleanly as a title + tip. Portrait remains unchanged. */
@layer karta-log-dock-1511 {
  @media(max-width:980px) and (orientation:landscape) {
    #karta-stadium-test .stadium-layout.stadium-landscape > .kr609-always-logs {
      height:82px!important;
      max-height:82px!important;
      padding:4px 6px!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries {
      gap:2px!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries > .activity-log {
      align-items:flex-start!important;
      padding:1px 0!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy {
      display:grid!important;
      grid-template-rows:auto auto!important;
      gap:1px!important;
      align-items:start!important;
      white-space:normal!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>strong {
      max-width:none!important;
      font-size:9px!important;
      line-height:1.05!important;
    }
    #karta-stadium-test .stadium-layout.stadium-landscape .kr609-logs-entries .activity-log-copy>p {
      display:-webkit-box!important;
      -webkit-box-orient:vertical!important;
      -webkit-line-clamp:2!important;
      line-clamp:2!important;
      white-space:normal!important;
      overflow:hidden!important;
      text-overflow:ellipsis!important;
      font-size:8.6px!important;
      line-height:1.08!important;
    }
  }
}
