/* Reborn Lounge R1 — one shared Global Chat, compact activity dock */

[hidden] {
  display: none !important;
}

.lounge-page {
  width: min(1680px, calc(100% - 28px));
  min-height: calc(100svh - 104px);
  margin: 14px auto 26px;
}

.lounge-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  margin-bottom: 12px;
  padding: 8px 4px 14px;
  border-bottom: 1px solid rgba(93, 154, 184, 0.22);
}

.lounge-heading > div:first-child {
  min-width: 0;
}

.lounge-kicker,
.lounge-pane-head span,
.lounge-coming-badge {
  color: #69d4e7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.lounge-heading h1 {
  margin: 2px 0 0;
  color: #f2f6f8;
  font-size: clamp(27px, 2.2vw, 38px);
  line-height: 1.05;
}

.lounge-heading p {
  margin: 6px 0 0;
  color: #8ba0ab;
  font-size: 12px;
}

.lounge-status {
  display: grid;
  grid-template-columns: 10px auto;
  column-gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(91, 157, 183, 0.2);
  border-radius: 8px;
  background: rgba(4, 20, 30, 0.78);
}

.lounge-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63d7a6;
  box-shadow: 0 0 10px rgba(99, 215, 166, 0.48);
}

.lounge-status strong {
  color: #dce8ec;
  font-size: 11px;
}

.lounge-status small {
  grid-column: 2;
  color: #768e9a;
  font-size: 9px;
}

.lounge-status small b {
  color: #82e7ef;
}

.lounge-layout {
  display: grid;
  grid-template-columns: minmax(620px, 2.25fr) minmax(360px, 0.92fr);
  gap: 12px;
  min-height: 0;
  align-items: stretch;
}

.lounge-chat-column,
.lounge-activity {
  min-width: 0;
  min-height: 0;
}

.lounge-chat-column .chat-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: 100%;
  height: calc(100svh - 215px);
  min-height: 620px;
  max-height: 900px;
  margin: 0;
  padding: 14px;
  border-color: rgba(92, 153, 181, 0.24);
  border-radius: 10px;
  background-color: rgba(2, 13, 21, 0.88);
}

.lounge-chat-column .chat-panel .panel-head {
  margin-bottom: 8px;
}

.lounge-chat-column .chat-panel .panel-head h2 {
  color: #eef5f7;
  font-size: 18px;
}

.lounge-chat-column .chat-list {
  gap: 0;
  padding: 0;
  border-color: rgba(80, 143, 170, 0.18);
  border-radius: 6px;
  background: rgba(0, 8, 14, 0.82);
}

.lounge-chat-column .chat-ai-note {
  margin: 5px 3px 8px;
}

.lounge-activity {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: calc(100svh - 215px);
  min-height: 620px;
  max-height: 900px;
  padding: 10px;
  border: 1px solid rgba(92, 153, 181, 0.22);
  border-radius: 10px;
  background: rgba(2, 13, 21, 0.88);
}

.lounge-activity-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(87, 146, 173, 0.18);
  border-radius: 8px;
  background: rgba(0, 8, 14, 0.72);
}

.lounge-activity-tabs button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #899da8;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lounge-activity-tabs button:hover,
.lounge-activity-tabs button:focus-visible {
  border-color: rgba(94, 174, 198, 0.28);
  color: #dce8ed;
  outline: none;
}

.lounge-activity-tabs button.active {
  border-color: rgba(226, 178, 69, 0.58);
  color: #f3d177;
  background: rgba(73, 53, 17, 0.38);
  box-shadow: inset 0 0 18px rgba(226, 178, 69, 0.08);
}

.lounge-activity-tabs .ui-glyph {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.lounge-activity-tabs button > span:last-child {
  display: grid;
  min-width: 0;
}

.lounge-activity-tabs strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lounge-activity-tabs small {
  overflow: hidden;
  color: #6f8591;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lounge-activity-pane {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(88, 148, 176, 0.2);
  border-radius: 8px;
  background: rgba(4, 20, 30, 0.72);
  scrollbar-color: rgba(75, 213, 255, 0.35) rgba(0, 7, 14, 0.7);
  scrollbar-width: thin;
}

.lounge-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(96, 151, 176, 0.18);
}

.lounge-pane-head > div {
  min-width: 0;
}

.lounge-pane-head h2 {
  margin: 2px 0 0;
  color: #e7eef1;
  font-size: 19px;
}

.lounge-coming-badge {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 5px 7px;
  border: 1px solid rgba(102, 169, 194, 0.22);
  border-radius: 999px;
  color: #95a8b1;
  letter-spacing: 0;
  text-align: center;
}

.lounge-duel-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 230px;
  padding: 20px 10px;
  border-radius: 7px;
  background-color: rgba(1, 10, 17, 0.76);
  background-image: url('/assets/hero-launch-v2.png');
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 999px rgba(0, 10, 18, 0.64);
}

.lounge-duelist {
  display: grid;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.lounge-duelist img {
  width: 84px;
  height: 84px;
  border: 2px solid #57d5e9;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(74, 202, 230, 0.25);
}

.lounge-duelist.red img {
  border-color: #db686d;
  box-shadow: 0 0 20px rgba(219, 104, 109, 0.22);
}

.lounge-duelist strong {
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: #dce9ed;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lounge-duelist small {
  color: #7f959f;
  font-size: 9px;
}

.lounge-duel-core {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #efc45e;
}

.lounge-duel-core img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(98, 219, 236, 0.3));
}

.lounge-duel-core strong {
  font-size: 22px;
}

.lounge-duel-core span {
  color: #849aa5;
  font-size: 8px;
  text-align: center;
}

.lounge-duel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.lounge-duel-summary span {
  display: grid;
  min-height: 48px;
  padding: 7px;
  place-content: center;
  border: 1px solid rgba(90, 148, 174, 0.16);
  border-radius: 6px;
  color: #708893;
  background: rgba(0, 10, 17, 0.56);
  font-size: 8px;
  text-align: center;
}

.lounge-duel-summary b {
  color: #dce8ed;
  font-size: 11px;
}

.lounge-duel-result {
  min-height: 36px;
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(93, 154, 184, 0.16);
  border-radius: 6px;
  color: #9db0b9;
  background: rgba(0, 9, 16, 0.56);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.lounge-duel-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.lounge-duel-actions button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 7px;
  border: 1px solid rgba(86, 170, 194, 0.3);
  border-radius: 6px;
  color: #dce9ed;
  background: rgba(6, 28, 40, 0.9);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.lounge-duel-actions button:hover,
.lounge-duel-actions button:focus-visible {
  border-color: rgba(236, 190, 81, 0.62);
  color: #f1ca66;
  outline: none;
}

.lounge-duel-actions button:disabled {
  cursor: wait;
  opacity: 0.48;
}

.lounge-duel-actions small {
  color: #708893;
  font-size: 8px;
  font-weight: 600;
}

.lounge-pane-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.lounge-pane-actions button,
.lounge-open-market,
.lounge-youtube-form button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(95, 159, 186, 0.28);
  border-radius: 6px;
  color: #c8d7de;
  background: rgba(7, 29, 42, 0.92);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.lounge-pane-actions .lounge-primary-action,
.lounge-youtube-form button {
  border-color: rgba(230, 183, 73, 0.6);
  color: #251704;
  background: #e0ad48;
}

.lounge-live-preview {
  display: grid;
  gap: 10px;
}

.lounge-live-empty {
  display: grid;
  gap: 5px;
}

.lounge-live-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(94, 155, 181, 0.2);
  border-radius: 6px;
  object-fit: cover;
}

.lounge-live-preview div {
  display: grid;
  gap: 3px;
}

.lounge-live-preview strong {
  color: #dbe7eb;
  font-size: 12px;
}

.lounge-live-preview span,
.lounge-youtube-form p {
  color: #7d929d;
  font-size: 9px;
  line-height: 1.5;
}

.lounge-live-embed {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(94, 155, 181, 0.24);
  border-radius: 6px;
  background: #000;
}

.lounge-live-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
}

.reborn-live-mini {
  position: fixed;
  top: var(--reborn-mini-top, auto);
  right: var(--reborn-mini-right, 18px);
  bottom: var(--reborn-mini-bottom, 18px);
  left: var(--reborn-mini-left, auto);
  z-index: 44;
  width: min(380px, calc(100vw - 36px));
  padding: 9px;
  border: 1px solid rgba(83, 177, 205, 0.42);
  border-radius: 9px;
  background: rgba(4, 20, 30, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58), 0 0 24px rgba(35, 170, 204, 0.09);
}

.reborn-live-mini[hidden] {
  display: none;
}

.reborn-live-mini.is-full {
  top: var(--reborn-live-top);
  right: auto;
  bottom: auto;
  left: var(--reborn-live-left);
  width: var(--reborn-live-width);
  height: var(--reborn-live-height);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #000;
  box-shadow: none;
}

.reborn-live-mini.is-full .reborn-live-mini-head {
  display: none;
}

.reborn-live-mini.is-full .reborn-live-mini-embed {
  height: var(--reborn-live-height);
  aspect-ratio: auto;
}

.reborn-live-mini-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 0 2px 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.reborn-live-mini.is-dragging .reborn-live-mini-head {
  cursor: grabbing;
}

.reborn-live-mini-head > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.reborn-live-mini-head span {
  color: #63d8ef;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.reborn-live-mini-head strong {
  overflow: hidden;
  color: #dfeaed;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reborn-live-mini-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(230, 183, 73, 0.52);
  border-radius: 5px;
  color: #f3d88a;
  background: rgba(38, 30, 14, 0.94);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.reborn-live-mini-embed {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
}

.reborn-live-mini-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border: 0;
}

.lounge-live-now {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
}

.lounge-live-now strong {
  overflow: hidden;
  color: #dfeaed;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lounge-live-now > span {
  grid-column: 1;
}

.lounge-live-now > div {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 5px;
}

.lounge-live-now button,
.lounge-live-queue button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(88, 159, 185, 0.26);
  border-radius: 5px;
  color: #b9cbd2;
  background: rgba(5, 25, 37, 0.92);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.lounge-youtube-form {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.lounge-youtube-form label {
  color: #70d4e5;
  font-size: 9px;
  font-weight: 900;
}

.lounge-youtube-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 6px;
}

.lounge-youtube-form input {
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(92, 151, 177, 0.24);
  border-radius: 6px;
  color: #e7eef1;
  background: rgba(0, 8, 14, 0.78);
  outline: none;
}

.lounge-youtube-form input:focus {
  border-color: rgba(83, 206, 227, 0.56);
}

.lounge-live-gm-option {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(230, 183, 73, 0.28);
  border-radius: 6px;
  color: #d9bf77 !important;
  background: rgba(68, 48, 13, 0.22);
  cursor: pointer;
}

.lounge-live-gm-option input {
  width: 15px;
  height: 15px;
}

.lounge-live-queue {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.lounge-live-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(84, 146, 173, 0.18);
  border-radius: 6px;
  background: rgba(0, 10, 17, 0.54);
}

.lounge-live-queue-item strong {
  overflow: hidden;
  color: #cfdee3;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lounge-live-queue-item span {
  grid-column: 1;
  color: #718893;
  font-size: 8px;
}

.lounge-live-queue-item > div {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 5px;
}

.lounge-live-queue-item button.active {
  border-color: rgba(235, 188, 76, 0.58);
  color: #f0c866;
  background: rgba(71, 50, 13, 0.4);
}

.lounge-live-queue-empty {
  padding: 10px;
  border: 1px dashed rgba(84, 146, 173, 0.2);
  border-radius: 6px;
  color: #708893;
  font-size: 9px;
  text-align: center;
}

.lounge-market-pane .market-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lounge-market-pane .market-panel > .panel-head {
  display: none;
}

.lounge-market-pane .market-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.lounge-open-market {
  min-height: 34px;
}

.lounge-activity-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.lounge-activity-shortcuts button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(87, 146, 173, 0.16);
  border-radius: 7px;
  color: #9eb0b9;
  background: rgba(4, 20, 30, 0.62);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lounge-activity-shortcuts button:hover,
.lounge-activity-shortcuts button:focus-visible {
  border-color: rgba(85, 200, 220, 0.4);
  color: #dce8ed;
  outline: none;
}

.lounge-activity-shortcuts .ui-glyph {
  width: 24px;
  height: 24px;
  color: #6bd4e6;
}

.lounge-activity-shortcuts button > span:last-child {
  display: grid;
  min-width: 0;
}

.lounge-activity-shortcuts strong,
.lounge-activity-shortcuts small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lounge-activity-shortcuts strong {
  font-size: 10px;
}

.lounge-activity-shortcuts small {
  color: #6f8591;
  font-size: 8px;
}

body.view-lounge .server-strip {
  display: none;
}

body.view-lounge .footer {
  width: min(1680px, calc(100% - 28px));
  margin-top: 0;
}

body.lounge-duel-focus .lounge-layout {
  grid-template-columns: minmax(300px, 0.68fr) minmax(640px, 1.5fr);
}

body.lounge-duel-focus .lounge-chat-column .chat-panel {
  opacity: 0.82;
}

@media (max-width: 1180px) {
  .lounge-layout {
    grid-template-columns: minmax(520px, 1.7fr) minmax(330px, 1fr);
  }

  .lounge-activity-tabs button {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .lounge-activity-tabs .ui-glyph {
    display: none;
  }

  .lounge-activity-tabs small {
    display: none;
  }
}

@media (max-width: 920px) {
  .reborn-live-mini {
    --reborn-mini-right: 10px;
    --reborn-mini-bottom: 72px;
    width: min(350px, calc(100vw - 20px));
  }

  .lounge-page {
    width: min(100% - 16px, 760px);
    margin-top: 8px;
    padding-bottom: 70px;
  }

  .lounge-heading {
    min-height: 60px;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 4px 2px 10px;
  }

  .lounge-heading p,
  .lounge-status {
    display: none;
  }

  .lounge-layout,
  body.lounge-duel-focus .lounge-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lounge-chat-column .chat-panel {
    height: min(68svh, 680px);
    min-height: 520px;
    opacity: 1 !important;
  }

  .lounge-activity {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .lounge-activity-pane {
    max-height: 620px;
  }
}

@media (max-width: 620px) {
  .lounge-heading h1 {
    font-size: 24px;
  }

  .lounge-heading .lounge-kicker {
    font-size: 9px;
  }

  .lounge-chat-column .chat-panel {
    height: 65svh;
    min-height: 480px;
    padding: 8px;
  }

  .lounge-chat-column .chat-ai-note {
    font-size: 10px;
  }

  .lounge-activity {
    padding: 7px;
  }

  .lounge-activity-tabs button {
    min-height: 48px;
    padding: 6px;
  }

  .lounge-activity-pane {
    padding: 10px;
  }

  .lounge-duel-stage {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    min-height: 190px;
    padding: 14px 4px;
  }

  .lounge-duelist img {
    width: 62px;
    height: 62px;
  }

  .lounge-duel-core img {
    width: 42px;
    height: 42px;
  }

  .lounge-duel-summary {
    grid-template-columns: 1fr;
  }

  .lounge-duel-summary span {
    min-height: 38px;
  }

  .lounge-pane-actions,
  .lounge-activity-shortcuts {
    grid-template-columns: 1fr;
  }

  .lounge-youtube-fields {
    grid-template-columns: 1fr;
  }

  .lounge-duel-actions {
    grid-template-columns: 1fr;
  }

  .lounge-live-now {
    grid-template-columns: 1fr;
  }

  .lounge-live-now > div {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lounge-status > span,
  .lounge-duel-core img {
    box-shadow: none;
  }
}
