/* Online alpha shell for the stable Status Zero v0.12.0 single-player core. */

.topbar {
  grid-template-columns: minmax(250px, 1fr) auto minmax(245px, auto) auto;
  gap: 10px;
}

.online-account-slot {
  display: grid;
  grid-template-columns: 11px minmax(128px, 1fr) auto;
  gap: 8px;
  min-width: 245px;
  min-height: 48px;
  align-items: center;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(192, 174, 132, .82);
  border-radius: 7px;
  color: #53636b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(239, 235, 222, .92)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(157, 132, 79, .04) 8px 9px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .92), 0 3px 9px rgba(52, 62, 63, .08);
}

.online-account-slot.is-authenticated {
  border-color: rgba(67, 128, 107, .62);
  background: linear-gradient(135deg, rgba(240, 250, 244, .9), rgba(226, 237, 229, .94));
}

.online-connection-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a1a49f;
  box-shadow: 0 0 0 4px rgba(99, 104, 102, .1);
}

.online-connection-dot.is-online {
  background: #278662;
  box-shadow: 0 0 0 4px rgba(39, 134, 98, .13), 0 0 10px rgba(39, 134, 98, .25);
}

.online-connection-dot.is-offline {
  background: #a65c4e;
  box-shadow: 0 0 0 4px rgba(166, 92, 78, .12);
}

.online-connection-dot.is-checking {
  background: #b7842f;
  box-shadow: 0 0 0 4px rgba(183, 132, 47, .13);
  animation: onlinePulse 1.25s ease-in-out infinite;
}

.online-account-copy {
  min-width: 0;
}

.online-account-copy small,
.online-account-copy strong,
.online-account-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-account-copy small {
  color: #8a6a32;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
}

.online-account-copy strong {
  margin-top: 1px;
  color: #274552;
  font: 700 14px/1.1 Georgia, "Times New Roman", serif;
}

.online-account-copy span {
  margin-top: 2px;
  color: #6d797e;
  font-size: 8px;
}

.online-account-actions {
  display: flex;
  gap: 4px;
}

.online-account-button {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid #b7a77f;
  border-radius: 5px;
  color: #40555e;
  background: rgba(255, 253, 247, .9);
  box-shadow: 0 2px 5px rgba(49, 60, 62, .07);
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.online-account-button:hover {
  border-color: #8a6b34;
  color: #714e17;
  background: #fffaf0;
}

.online-account-button.is-quiet {
  width: 29px;
  padding: 4px;
  color: #267054;
  font-size: 15px;
}

.online-auth-overlay {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 24px;
  place-items: center;
  background: rgba(38, 49, 53, .55);
  backdrop-filter: blur(7px);
}

body.has-online-fighter-profile { overflow: hidden; }

.online-fighter-profile {
  position: fixed;
  z-index: 1380;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 24px;
  place-items: center;
  background: rgba(37, 48, 52, .62);
  backdrop-filter: blur(8px);
}

.online-fighter-profile-dialog {
  position: relative;
  width: min(100%, 760px);
  max-height: min(880px, calc(100vh - 34px));
  padding: 27px 30px 24px;
  overflow: auto;
  border: 1px solid #a4854b;
  border-radius: 11px;
  color: #344c56;
  background:
    radial-gradient(circle at 50% -10%, rgba(218, 188, 119, .26), transparent 42%),
    linear-gradient(145deg, #fffdf8, #eee7d8 64%, #f8f0dd);
  box-shadow: inset 0 0 0 4px rgba(255, 252, 242, .78), 0 30px 80px rgba(24, 35, 39, .38);
  animation: onlineDialogIn 180ms ease-out;
}

.online-fighter-profile-dialog::before,
.online-fighter-profile-dialog::after {
  position: absolute;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(158, 119, 53, .15);
  transform: rotate(45deg);
  content: '';
  pointer-events: none;
}

.online-fighter-profile-dialog::before { top: -78px; left: -78px; }
.online-fighter-profile-dialog::after { right: -78px; bottom: -78px; }

.online-fighter-profile-close {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 12px;
  width: 31px;
  height: 31px;
  border: 1px solid #c9b997;
  border-radius: 50%;
  color: #59686e;
  background: rgba(255, 253, 248, .86);
  cursor: pointer;
  font-size: 20px;
}

.online-fighter-profile-close:hover,
.online-fighter-profile-close:focus-visible {
  border-color: #9b793a;
  color: #7b561c;
  outline: 2px solid rgba(180, 138, 59, .22);
}

.online-fighter-profile-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 0 40px 17px 0;
  border-bottom: 1px solid rgba(161, 130, 71, .28);
}

.online-fighter-profile-avatar,
.online-fighter-profile-loader {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #98722f;
  border-radius: 50%;
  color: #f7e4b7;
  background: radial-gradient(circle at 35% 28%, #517480, #2e4b56 70%);
  box-shadow: 0 0 0 5px #eee0bc, 0 9px 20px rgba(41, 60, 65, .22);
  font-size: 21px;
}

.online-fighter-profile-head small {
  display: block;
  color: #9a6b20;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .13em;
}

.online-fighter-profile-head h2 {
  margin: 3px 0 2px;
  color: #2d4b57;
  font: 700 23px/1.12 Georgia, "Times New Roman", serif;
}

.online-fighter-profile-head p {
  margin: 0;
  color: #5f6e74;
  font-size: 9px;
}

.online-fighter-profile-rating {
  min-width: 92px;
  padding: 9px 13px;
  border: 1px solid #c9ae77;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff9e9, #eee1c3);
  text-align: center;
}

.online-fighter-profile-rating span { display: block; color: #91702e; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.online-fighter-profile-rating strong { display: block; margin-top: 2px; color: #2d505b; font: 700 18px/1 Georgia, serif; }

.online-fighter-profile-note {
  position: relative;
  z-index: 1;
  margin: 13px 0;
  padding: 9px 12px;
  border: 1px solid rgba(59, 111, 110, .2);
  border-left: 4px solid #4b7b7d;
  border-radius: 6px;
  color: #536c70;
  background: rgba(229, 241, 237, .7);
  font-size: 9px;
  line-height: 1.45;
}

.online-fighter-profile-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.online-fighter-profile-grid > section {
  padding: 11px;
  border: 1px solid rgba(173, 151, 105, .35);
  border-radius: 7px;
  background: rgba(255, 253, 247, .77);
}

.online-fighter-profile-grid h3 {
  margin: 0 0 8px;
  color: #8e6726;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.online-fighter-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.online-fighter-profile-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 5px;
  padding: 7px;
  border: 1px solid #dfd4bd;
  border-radius: 5px;
  background: #f8f3e9;
}

.online-fighter-profile-stat span { overflow: hidden; color: #6e7b7d; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.online-fighter-profile-stat strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #304f5b; font-size: 13px; }
.online-fighter-profile-stat small { color: #8f866f; font-size: 7px; }
.online-fighter-profile-stat small.is-positive { color: #2e7a59; font-weight: 900; }
.online-fighter-profile-stat small.is-negative { color: #a24c3f; font-weight: 900; }

.online-fighter-profile-weapons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.online-fighter-profile-weapon { padding: 8px; border: 1px solid #d9c9a8; border-radius: 5px; background: #fbf6e9; }
.online-fighter-profile-weapon span,
.online-fighter-profile-weapon strong,
.online-fighter-profile-weapon small { display: block; }
.online-fighter-profile-weapon span { color: #8d713d; font-size: 7px; text-transform: uppercase; }
.online-fighter-profile-weapon strong { margin-top: 3px; color: #354f59; font-size: 10px; }
.online-fighter-profile-weapon small { margin-top: 3px; color: #7d6843; font-size: 8px; }

.online-fighter-profile-total-damage {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 7px 9px;
  border: 1px solid #b99856;
  border-radius: 5px;
  color: #72551e;
  background: linear-gradient(90deg, #f9edcf, #fff8e9);
}
.online-fighter-profile-total-damage span { font-size: 8px; font-weight: 900; text-transform: uppercase; }
.online-fighter-profile-total-damage strong { color: #304f5a; font-size: 12px; }

.online-fighter-profile-armor { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.online-fighter-profile-armor > div { padding: 7px 3px; border: 1px solid #d8d1c3; border-radius: 5px; background: #f2f0e9; text-align: center; }
.online-fighter-profile-armor span,
.online-fighter-profile-armor strong { display: block; }
.online-fighter-profile-armor span { min-height: 18px; color: #758083; font-size: 6px; line-height: 1.2; text-transform: uppercase; }
.online-fighter-profile-armor strong { margin-top: 3px; color: #35515b; font-size: 12px; }

.online-fighter-profile-equipment { display: flex; gap: 5px; flex-wrap: wrap; }
.online-fighter-profile-equipment > span { padding: 5px 7px; border: 1px solid #d7c49c; border-radius: 999px; color: #665535; background: #f7ecd5; font-size: 7px; font-weight: 800; }
.online-fighter-profile-equipment > small { color: #829092; font-size: 9px; }

.online-fighter-profile-actions { position: relative; z-index: 1; display: flex; justify-content: flex-end; margin-top: 14px; }
.online-fighter-profile-actions .button { min-width: 130px; min-height: 36px; }

.online-fighter-profile-dialog.is-loading,
.online-fighter-profile-dialog.is-error {
  display: grid;
  min-height: 260px;
  gap: 9px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.online-fighter-profile-dialog.is-loading > strong,
.online-fighter-profile-dialog.is-error > strong { color: #304e58; font: 700 18px Georgia, serif; }
.online-fighter-profile-dialog.is-loading > span,
.online-fighter-profile-dialog.is-error > span { max-width: 390px; color: #69777b; font-size: 10px; line-height: 1.5; }
.online-fighter-profile-dialog.is-loading .online-fighter-profile-loader { animation: onlinePulse 1.2s ease-in-out infinite; }
.online-fighter-profile-dialog.is-error .online-fighter-profile-loader { color: #f7d8cb; border-color: #a65b49; background: #78483e; }

@media (max-width: 560px) {
  .online-fighter-profile { padding: 8px; }
  .online-fighter-profile-dialog { max-height: calc(100vh - 16px); padding: 24px 15px 18px; }
  .online-fighter-profile-head { grid-template-columns: 45px minmax(0, 1fr); padding-right: 30px; }
  .online-fighter-profile-avatar { width: 43px; height: 43px; }
  .online-fighter-profile-head h2 { font-size: 19px; }
  .online-fighter-profile-rating { grid-column: 1 / -1; justify-self: stretch; }
  .online-fighter-profile-grid { grid-template-columns: 1fr; }
  .online-fighter-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .online-fighter-profile-armor { grid-template-columns: repeat(5, minmax(42px, 1fr)); overflow-x: auto; }
}

.online-auth-dialog {
  position: relative;
  width: min(100%, 470px);
  padding: 34px 38px 28px;
  overflow: hidden;
  border: 1px solid #a88c54;
  border-radius: 11px;
  color: #344b55;
  background:
    radial-gradient(circle at 50% -20%, rgba(145, 193, 190, .24), transparent 42%),
    linear-gradient(145deg, #fffdf8, #eee8dc 62%, #f8f0df);
  box-shadow: inset 0 0 0 4px rgba(255, 252, 243, .76), 0 28px 75px rgba(27, 37, 41, .34);
  animation: onlineDialogIn 180ms ease-out;
}

.online-auth-dialog::before,
.online-auth-dialog::after {
  position: absolute;
  width: 115px;
  height: 115px;
  border: 1px solid rgba(169, 133, 64, .16);
  transform: rotate(45deg);
  content: '';
}

.online-auth-dialog::before { top: -72px; left: -72px; }
.online-auth-dialog::after { right: -72px; bottom: -72px; }

.online-auth-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #c9b997;
  border-radius: 50%;
  color: #59676d;
  background: rgba(255, 253, 248, .82);
  cursor: pointer;
  font-size: 20px;
}

.online-auth-sigil {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid #9d7834;
  transform: rotate(45deg);
  background: radial-gradient(circle, #e8d59f 0 14%, #345b67 16% 46%, #b98c40 48% 53%, #f7f1df 55%);
  box-shadow: 0 8px 18px rgba(48, 71, 76, .18);
}

.online-auth-sigil i {
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid #f6dfb0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.online-auth-kicker {
  color: #91651d;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .16em;
  text-align: center;
}

.online-auth-dialog h2 {
  margin: 5px 0 6px;
  color: #294755;
  font: 700 27px/1.15 Georgia, "Times New Roman", serif;
  text-align: center;
}

.online-auth-lead {
  margin: 0 auto 16px;
  color: #65747a;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.online-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d2c6ad;
  border-radius: 7px;
  background: rgba(228, 222, 210, .78);
}

.online-auth-tabs button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #6d777b;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.online-auth-tabs button.is-active {
  border-color: #bba36e;
  color: #36525e;
  background: #fffaf0;
  box-shadow: 0 3px 9px rgba(53, 64, 64, .09);
}

.online-auth-form {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.online-auth-form label > span {
  display: block;
  margin-bottom: 5px;
  color: #6b6354;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.online-auth-form input {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #c9bda4;
  border-radius: 6px;
  color: #2f454e;
  background: rgba(255, 254, 250, .9);
  box-shadow: inset 0 1px 4px rgba(70, 74, 67, .06);
  font: 600 13px/1.2 inherit;
}

.online-auth-form input:focus {
  border-color: #46829a;
  box-shadow: 0 0 0 3px rgba(70, 130, 154, .12);
}

.online-auth-error {
  padding: 9px 11px;
  border: 1px solid rgba(174, 66, 55, .28);
  border-radius: 6px;
  color: #963c33;
  background: #f9e5e1;
  font-size: 10px;
  line-height: 1.4;
}

.online-auth-submit {
  min-height: 46px;
  margin-top: 3px;
}

.online-auth-footnote {
  margin: 14px 8px 0;
  color: #7b8587;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.online-conflict {
  position: fixed;
  z-index: 1250;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  max-width: 980px;
  min-height: 70px;
  align-items: center;
  margin: auto;
  padding: 13px 15px;
  border: 1px solid #b57d35;
  border-radius: 9px;
  color: #4f4432;
  background: linear-gradient(135deg, #fff8e7, #efe0bd);
  box-shadow: 0 18px 45px rgba(53, 44, 28, .28);
}

.online-conflict strong,
.online-conflict span { display: block; }
.online-conflict strong { color: #694d20; font: 700 16px Georgia, serif; }
.online-conflict span { margin-top: 3px; font-size: 10px; }
.online-conflict button {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #a5834a;
  border-radius: 5px;
  color: #5a441d;
  background: #fffaf0;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}
.online-conflict button.is-danger { border-color: #bd7468; color: #8c3a31; background: #fae7e2; }

.live-arena-status.is-connected,
.live-arena-status.is-offline {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
}

.live-arena-status i.is-online {
  background: #278662;
  box-shadow: 0 0 0 5px rgba(39, 134, 98, .13), 0 0 12px rgba(39, 134, 98, .18);
}

.online-live-arena {
  gap: 12px;
}

.online-social-section {
  overflow: hidden;
  border: 1px solid #d0c2a5;
  border-radius: 9px;
  background: rgba(255, 253, 247, .66);
}

.online-social-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #ddd2bb;
  background: linear-gradient(90deg, rgba(235, 231, 219, .88), rgba(255, 251, 241, .75));
}

.online-social-heading span {
  color: #9b6d23;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .14em;
}

.online-social-heading h3 {
  margin: 2px 0 0;
  color: #304b57;
  font: 700 17px Georgia, serif;
}

.online-social-heading small {
  color: #758085;
  font-size: 8px;
}

.online-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #ded5c3;
}

.online-player-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 9px;
  min-width: 0;
  align-items: center;
  padding: 10px 11px;
  background: #fffdf8;
}

.online-player-card.is-self { background: linear-gradient(90deg, #edf5ef, #fffdf8); }

.online-player-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #a88950;
  border-radius: 50%;
  color: #f8e9c7;
  background: linear-gradient(145deg, #446776, #253e49);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
  font: 700 15px Georgia, serif;
}

.online-player-card > div:nth-child(2) { min-width: 0; }
.online-player-card > div:nth-child(2) strong,
.online-player-card > div:nth-child(2) span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-player-card > div:nth-child(2) strong { color: #334e5b; font-size: 11px; }
.online-player-card > div:nth-child(2) strong small { color: #3c765f; font-size: 8px; }
.online-player-card > div:nth-child(2) span { margin-top: 3px; color: #7b8588; font-size: 8px; }
.online-player-card > div:nth-child(2) i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #a9aaa4; }
.online-player-card.is-online > div:nth-child(2) i { background: #2b926b; box-shadow: 0 0 0 3px rgba(43, 146, 107, .1); }

.online-player-stats {
  display: flex;
  gap: 4px;
}
.online-player-stats b,
.online-player-stats em {
  padding: 3px 6px;
  border: 1px solid #d4c7aa;
  border-radius: 999px;
  color: #5c6870;
  background: #f4efe5;
  font-size: 8px;
  font-style: normal;
}
.online-player-stats em { color: #7c5a1f; background: #f6ecd4; }

.online-player-card > button {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid #a5854c;
  border-radius: 5px;
  color: #674b1f;
  background: #fff8e9;
  cursor: pointer;
  font-size: 8px;
  font-weight: 850;
}

.online-duel-list {
  display: grid;
  gap: 1px;
  background: #ded5c3;
}

.online-duel-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  min-width: 0;
  align-items: center;
  padding: 11px 13px;
  background: #fffdf8;
}

.online-duel-card.is-accepted { background: linear-gradient(90deg, #e8f3ed, #fffaf0); }

.online-duel-seal {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #ae8d51;
  transform: rotate(45deg);
  color: #8e6725;
  background: #f4e7c8;
  font-size: 15px;
}
.online-duel-seal::first-letter { transform: rotate(-45deg); }

.online-duel-copy { min-width: 0; }
.online-duel-copy span,
.online-duel-copy strong,
.online-duel-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-duel-copy span { color: #9a6b22; font-size: 7px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.online-duel-copy strong { margin-top: 3px; color: #304b58; font-size: 11px; }
.online-duel-copy small { margin-top: 3px; color: #748086; font-size: 8px; }

.online-duel-name-row {
  display: flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
}

.online-duel-name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-duel-name-row > small {
  min-width: 0;
  margin: 3px 0 0;
  overflow: hidden;
  color: #64787f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-duel-name-row > em {
  flex: none;
  padding: 3px 6px;
  border: 1px solid #d5c39e;
  border-radius: 999px;
  color: #79591f;
  background: #f6ecd3;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.online-duel-info {
  display: inline-grid;
  flex: none;
  width: 21px;
  height: 21px;
  padding: 0;
  place-items: center;
  border: 1px solid #9d7a3b;
  border-radius: 50%;
  color: #fff5d8;
  background: linear-gradient(180deg, #4f7580, #31505a);
  box-shadow: 0 0 0 2px rgba(220, 199, 151, .38);
  cursor: pointer;
  font: 900 11px/1 Georgia, serif;
}

.online-duel-info:hover,
.online-duel-info:focus-visible {
  color: #fff;
  background: linear-gradient(180deg, #658d95, #385d68);
  outline: 2px solid rgba(159, 120, 50, .25);
  outline-offset: 2px;
}

.online-duel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.online-duel-actions .button { min-height: 31px; padding: 5px 8px; font-size: 8px; }
.online-duel-response-badge {
  padding: 6px 8px;
  border: 1px solid rgba(43, 123, 91, .28);
  border-radius: 999px;
  color: #2f7358;
  background: #e5f2e8;
  font-size: 7px;
  font-weight: 900;
  white-space: nowrap;
}

.online-duel-response-badge.is-rejected {
  border-color: rgba(163, 71, 53, .3);
  color: #944738;
  background: #f7e3dc;
}

.online-duel-responses {
  grid-column: 1 / -1;
  display: grid;
  gap: 1px;
  margin: 2px -13px -11px;
  padding: 9px 13px 0;
  border-top: 1px solid #e1d6be;
  background: linear-gradient(180deg, rgba(246, 239, 222, .68), rgba(255, 253, 248, .95));
}

.online-duel-responses > header {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  padding: 1px 3px 7px;
}

.online-duel-responses > header strong { color: #856224; font-size: 8px; text-transform: uppercase; }
.online-duel-responses > header small { color: #778284; font-size: 7px; }

.online-duel-response {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid #dfd4bc;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 254, 250, .92);
}

.online-duel-response.is-new {
  border-color: #c69b4c;
  background: linear-gradient(90deg, #fff8df, rgba(255, 254, 250, .95));
  box-shadow: inset 3px 0 #c49742;
}

.online-duel-response-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #b09158;
  border-radius: 50%;
  color: #f8e8be;
  background: #3f626c;
  font: 700 13px Georgia, serif;
}

.online-duel-response-copy { min-width: 0; }
.online-duel-response-copy .online-duel-name-row strong { margin: 0; color: #304c57; font-size: 10px; }
.online-duel-new-response {
  padding: 3px 6px !important;
  border: 1px solid #d1ad65 !important;
  color: #805c1e !important;
  background: #fff0c7 !important;
  font-size: 6px !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.online-duel-response-copy > small { display: block; margin-top: 3px; overflow: hidden; color: #718083; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.online-duel-response-actions { display: flex; gap: 5px; }
.online-duel-response-actions .button { min-height: 29px; padding: 5px 7px; font-size: 7px; }
.online-room-badge { padding: 5px 8px; border: 1px solid rgba(45, 130, 97, .28); border-radius: 999px; color: #2d7158; background: #e5f3ea; font-size: 8px; font-weight: 850; }

.online-empty-state {
  grid-column: 1 / -1;
  padding: 17px;
  color: #7a8588;
  background: rgba(255, 253, 248, .94);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.online-pvp-profile-status {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(169, 79, 57, .3);
  border-left: 4px solid #aa533e;
  border-radius: 7px;
  background: linear-gradient(90deg, #f9e7df, #fff9ed);
  box-shadow: 0 5px 14px rgba(96, 62, 45, .08);
}

.online-pvp-profile-status-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid #b2604d;
  border-radius: 50%;
  color: #fff8e9;
  background: linear-gradient(#bd6955, #914738);
  box-shadow: 0 0 0 4px rgba(174, 81, 59, .1);
  font: 800 18px Georgia, serif;
}

.online-pvp-profile-status div { min-width: 0; }
.online-pvp-profile-status small,
.online-pvp-profile-status strong,
.online-pvp-profile-status p { display: block; margin: 0; }
.online-pvp-profile-status small { color: #9d4938; font-size: 7px; font-weight: 950; letter-spacing: .09em; }
.online-pvp-profile-status strong { margin-top: 2px; overflow-wrap: anywhere; color: #5f4640; font-size: 10px; }
.online-pvp-profile-status p { margin-top: 3px; color: #776b66; font-size: 8px; line-height: 1.35; }
.online-pvp-profile-status > .button { min-height: 35px; white-space: nowrap; }

@media (max-width: 620px) {
  .online-pvp-profile-status { grid-template-columns: 34px minmax(0, 1fr); }
  .online-pvp-profile-status > .button { grid-column: 1 / -1; width: 100%; }
}

.online-mvp-boundary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  padding: 12px 14px;
  border: 1px solid #c3b389;
  border-left: 4px solid #9a7739;
  border-radius: 7px;
  color: #657278;
  background: linear-gradient(90deg, rgba(245, 235, 210, .78), rgba(255, 253, 247, .72));
  font-size: 9px;
  line-height: 1.45;
}
.online-mvp-boundary strong { color: #765720; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }

@keyframes onlinePulse { 50% { transform: scale(1.14); opacity: .72; } }
@keyframes onlineDialogIn { from { transform: translateY(9px) scale(.985); opacity: 0; } }

@media (max-width: 1450px) {
  .topbar { grid-template-columns: minmax(240px, 1fr) auto minmax(225px, auto); }
  .top-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 6px; border-top: 1px solid rgba(199, 185, 148, .4); }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: minmax(220px, 1fr) auto; }
  .online-account-slot { grid-column: 1 / -1; width: 100%; }
  .top-actions { grid-column: 1 / -1; }
  .online-player-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .online-auth-overlay { padding: 8px; }
  .online-auth-dialog { padding: 29px 18px 20px; }
  .online-auth-dialog h2 { font-size: 23px; }
  .online-conflict { right: 8px; bottom: 8px; left: 8px; grid-template-columns: 1fr; padding: 11px; }
  .online-conflict button { width: 100%; }
  .live-arena-status.is-connected,
  .live-arena-status.is-offline { grid-template-columns: 12px minmax(0, 1fr); }
  .live-arena-status > .button { grid-column: 1 / -1; width: 100%; }
  .online-social-heading { align-items: start; flex-direction: column; gap: 3px; }
  .online-player-card { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .online-player-card > button { grid-column: 2 / -1; width: 100%; }
  .online-duel-card { grid-template-columns: 38px minmax(0, 1fr); }
  .online-duel-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .online-duel-response { grid-template-columns: 30px minmax(0, 1fr); }
  .online-duel-response-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .online-mvp-boundary { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { grid-template-columns: minmax(0, 1fr); }
  .online-account-slot,
  .time-block,
  .top-actions { grid-column: 1; }
  .online-account-slot { min-width: 0; }
  .online-account-copy span { max-width: 190px; }
  .online-account-actions { justify-self: end; }
  .online-player-card { grid-template-columns: 34px minmax(0, 1fr); }
  .online-player-stats { grid-column: 2; }
  .online-player-card > button { grid-column: 1 / -1; }
  .online-duel-copy strong,
  .online-duel-copy small { white-space: normal; }
  .online-duel-name-row { flex-wrap: wrap; }
  .online-duel-name-row > small { flex-basis: 100%; white-space: normal; }
  .online-duel-responses > header { align-items: flex-start; flex-direction: column; }
  .online-duel-response-copy > small { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .online-connection-dot.is-checking { animation: none; }
  .online-auth-dialog,
  .online-fighter-profile-dialog { animation: none; }
}

/* Player chat: a persistent, compact dock shared by every game location. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.has-online-chat { --online-chat-height: 44px; }
body.has-online-chat-open { --online-chat-height: 252px; }
body.has-online-chat .app-shell {
  padding-bottom: var(--online-chat-height);
  transition: padding-bottom 180ms ease;
}

.online-chat-dock {
  position: fixed;
  z-index: 1190;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 44px;
  overflow: hidden;
  border: 1px solid #9d875b;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: #334a55;
  background: #f7f1e4;
  box-shadow: 0 -12px 34px rgba(30, 44, 48, .18), inset 0 1px rgba(255, 255, 255, .85);
  transition: height 180ms ease;
}

.online-chat-dock.is-open { height: 252px; }

.online-chat-head {
  display: grid;
  grid-template-columns: minmax(185px, auto) auto minmax(90px, 1fr) 34px;
  min-height: 43px;
  align-items: stretch;
  border-bottom: 1px solid #cfc2a7;
  background:
    linear-gradient(90deg, rgba(47, 79, 91, .08), transparent 27%),
    linear-gradient(180deg, #fffdf8, #e9e2d4);
}

.online-chat-toggle,
.online-chat-collapse,
.online-chat-tabs button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.online-chat-toggle {
  position: relative;
  display: flex;
  gap: 9px;
  min-width: 0;
  align-items: center;
  padding: 5px 12px;
  text-align: left;
}

.online-chat-toggle > span:nth-child(2) { min-width: 0; }
.online-chat-toggle small,
.online-chat-toggle strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-chat-toggle small { color: #92671f; font-size: 7px; font-weight: 950; letter-spacing: .13em; }
.online-chat-toggle strong { color: #304c59; font: 700 15px/1.05 Georgia, serif; }

.online-chat-sigil {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 1px solid #9f7a39;
  transform: rotate(45deg);
  color: #f5d88c;
  background: #365966;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
  font-size: 10px;
}

.online-chat-sigil::first-letter { transform: rotate(-45deg); }

.online-chat-unread,
.online-chat-tabs i {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #b53f38;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.online-chat-unread { position: absolute; top: 4px; left: 34px; }

.online-chat-tabs {
  display: flex;
  gap: 3px;
  align-items: end;
  padding: 6px 3px 0;
}

.online-chat-tabs button {
  display: flex;
  gap: 6px;
  min-width: 82px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: #68777d;
  font-size: 9px;
  font-weight: 850;
}

.online-chat-tabs button:hover:not(:disabled) { color: #6d4c18; background: rgba(255, 250, 238, .72); }
.online-chat-tabs button.is-active { border-color: #c8b997; color: #34515e; background: #f8f4ea; }
.online-chat-tabs button:disabled { opacity: .4; cursor: not-allowed; }

.online-chat-connection {
  align-self: center;
  justify-self: end;
  margin-right: 8px;
  padding: 4px 8px 4px 18px;
  border: 1px solid #d0c5ad;
  border-radius: 999px;
  color: #6e797c;
  background: rgba(255, 253, 248, .75);
  font-size: 8px;
  font-weight: 800;
}

.online-chat-connection::before {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: 2px 0 0 -11px;
  border-radius: 50%;
  background: #a6a79f;
  content: '';
}
.online-chat-connection.is-online::before { background: #2c906b; box-shadow: 0 0 0 3px rgba(44, 144, 107, .11); }
.online-chat-connection.is-offline::before { background: #ae5147; }

.online-chat-collapse {
  border-left: 1px solid rgba(152, 133, 91, .2);
  color: #52666e;
  font-size: 18px;
}
.online-chat-collapse:hover { color: #815b20; background: rgba(255, 255, 255, .56); }

.online-chat-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 43px;
  height: 208px;
  background:
    linear-gradient(rgba(115, 102, 73, .055) 1px, transparent 1px) 0 0 / 100% 27px,
    linear-gradient(135deg, #f8f4ea, #eee7d9);
}

.online-chat-messages {
  padding: 5px 9px 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b5a47e transparent;
}

.online-chat-message {
  display: grid;
  grid-template-columns: 55px minmax(90px, 150px) minmax(0, 1fr);
  gap: 8px;
  min-height: 25px;
  align-items: baseline;
  padding: 4px 6px;
  border-bottom: 1px dotted rgba(107, 98, 78, .18);
  color: #344954;
  font-size: 10px;
  line-height: 1.35;
}
.online-chat-message:hover { background: rgba(255, 253, 247, .58); }
.online-chat-message time { color: #819096; font: 8px/1.2 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.online-chat-message strong { overflow: hidden; color: #176997; font: 700 10px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.online-chat-message > span { overflow-wrap: anywhere; white-space: pre-wrap; }
.online-chat-message.is-own { background: linear-gradient(90deg, rgba(214, 235, 242, .47), transparent 66%); }
.online-chat-message.is-own strong { color: #267256; }
.online-chat-message.is-system { color: #73541f; background: rgba(245, 232, 198, .55); font-style: italic; }
.online-chat-message.is-system strong { color: #936720; }

.online-chat-empty {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #748186;
  font-size: 9px;
  text-align: center;
}
.online-chat-empty strong { color: #3b5661; font: 700 14px Georgia, serif; }
.online-chat-empty button { margin-top: 4px; padding: 5px 13px; border: 1px solid #a68750; border-radius: 5px; color: #694d1f; background: #fff8e8; cursor: pointer; font-size: 8px; font-weight: 900; }
.online-chat-empty.is-error { color: #9d4037; }

.online-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 105px;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid #cabd9f;
  background: rgba(255, 253, 248, .92);
}
.online-chat-form input { width: 100%; height: 31px; padding: 5px 10px; border: 1px solid #c6b99d; border-radius: 5px; color: #2e454f; background: #fffefa; font: 10px/1.2 inherit; }
.online-chat-form input:focus { border-color: #4c8397; outline: 3px solid rgba(76, 131, 151, .11); }
.online-chat-form input:disabled { color: #8a8e8b; background: #eeeae1; }
.online-chat-form > span { color: #8a8171; font-size: 7px; font-variant-numeric: tabular-nums; }
.online-chat-form button { height: 31px; border: 1px solid #8d6a2e; border-radius: 5px; color: #fff9e9; background: linear-gradient(#b68835, #8f6722); box-shadow: 0 3px 8px rgba(77, 56, 23, .15); cursor: pointer; font-size: 8px; font-weight: 900; }
.online-chat-form button:disabled { border-color: #b7ad99; color: #898780; background: #ded9ce; box-shadow: none; cursor: not-allowed; }

.online-conflict { bottom: calc(var(--online-chat-height, 44px) + 12px); }

/* Server-authoritative PvP room. It deliberately never exposes probability rolls or pending enemy input. */
.online-pvp-overlay {
  position: fixed;
  z-index: 1180;
  inset: 0 0 var(--online-chat-height, 44px);
  overflow: auto;
  padding: 8px;
  background: rgba(36, 48, 52, .58);
  backdrop-filter: blur(7px);
}

.online-pvp-shell {
  width: min(100%, 1480px);
  min-height: 100%;
  margin: auto;
  overflow: hidden;
  border: 1px solid #9f8657;
  border-radius: 10px;
  color: #334a56;
  background:
    radial-gradient(circle at 50% -20%, rgba(107, 168, 170, .17), transparent 39%),
    linear-gradient(145deg, #fffdf7, #e8e1d3);
  box-shadow: inset 0 0 0 3px rgba(255, 253, 246, .62), 0 27px 70px rgba(22, 32, 35, .35);
}

.online-pvp-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  gap: 12px;
  min-height: 70px;
  align-items: center;
  padding: 9px 12px 8px 16px;
  border-bottom: 1px solid #c9b992;
  background: linear-gradient(90deg, rgba(45, 81, 93, .09), rgba(255, 253, 247, .75) 32%, rgba(153, 108, 34, .07));
}
.online-pvp-header > div:first-child small { color: #966a21; font-size: 7px; font-weight: 950; letter-spacing: .15em; }
.online-pvp-header h1 { margin: 2px 0 1px; color: #284753; font: 700 20px/1.1 Georgia, serif; }
.online-pvp-header > div:first-child span { color: #718085; font-size: 8px; }

.online-pvp-round { min-width: 150px; text-align: center; }
.online-pvp-round small,
.online-pvp-round strong,
.online-pvp-round span { display: block; }
.online-pvp-round small { color: #8e6b30; font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.online-pvp-round strong { color: #2e4c58; font: 700 24px/1 Georgia, serif; }
.online-pvp-round span { margin-top: 3px; color: #66777d; font-size: 8px; }

.online-pvp-header-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.online-pvp-header-actions button,
.online-pvp-loading button { min-height: 31px; padding: 5px 9px; border: 1px solid #aa8c55; border-radius: 5px; color: #684c20; background: #fff8e9; cursor: pointer; font-size: 8px; font-weight: 850; }
.online-pvp-header-actions button.is-danger { border-color: #ba756a; color: #973e36; background: #fae7e3; }
.online-pvp-header-actions .online-pvp-close,
.online-pvp-close { width: 32px; padding: 3px; border-radius: 50%; color: #566970; background: #f7f2e8; font-size: 18px; }

.online-pvp-main {
  display: grid;
  grid-template-columns: minmax(195px, 240px) minmax(510px, 1fr) minmax(195px, 240px);
  gap: 8px;
  padding: 8px;
}

.online-pvp-fighter {
  min-width: 0;
  padding: 10px;
  border: 1px solid #c8b99a;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255, 253, 247, .94), rgba(230, 225, 214, .87));
  box-shadow: inset 0 1px #fff, 0 5px 14px rgba(53, 60, 58, .08);
}
.online-pvp-fighter.is-local { border-top: 3px solid #3280a6; }
.online-pvp-fighter.is-opponent { border-top: 3px solid #b64b43; }

.online-pvp-fighter-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.online-pvp-avatar { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid #f7f0de; border-radius: 50%; color: #f4dfb3; background: linear-gradient(145deg, #416b7c, #253e49); box-shadow: 0 0 0 2px #9f7c42, 0 5px 10px rgba(39, 50, 52, .17); font: 700 16px Georgia, serif; }
.online-pvp-fighter.is-opponent .online-pvp-avatar { background: linear-gradient(145deg, #7c5148, #49312e); }
.online-pvp-fighter-head div { min-width: 0; }
.online-pvp-fighter-head small { color: #92671f; font-size: 6px; font-weight: 950; letter-spacing: .11em; }
.online-pvp-fighter-head h2 { margin: 2px 0 0; overflow: hidden; color: #2e4b57; font: 700 14px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.online-pvp-fighter-head em { padding: 4px 6px; border: 1px solid #cdbd99; border-radius: 999px; color: #805c1f; background: #f7edd5; font-size: 8px; font-style: normal; font-weight: 900; }

.online-pvp-vital { margin-top: 10px; }
.online-pvp-vital > span { display: flex; justify-content: space-between; margin-bottom: 3px; color: #66767c; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.online-pvp-vital > span b { color: #374e58; font-size: 8px; font-variant-numeric: tabular-nums; }
.online-pvp-vital > i { display: block; height: 7px; overflow: hidden; border: 1px solid rgba(93, 73, 50, .25); border-radius: 999px; background: #d7d3ca; }
.online-pvp-vital > i > u { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b43e39, #dd6a59); text-decoration: none; transition: width .25s ease; }
.online-pvp-vital.is-fury > i > u { background: linear-gradient(90deg, #a66e23, #e0a84a); }

.online-pvp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 9px; }
.online-pvp-stats span { padding: 4px 2px; border: 1px solid rgba(126, 111, 83, .18); border-radius: 4px; background: rgba(255, 255, 255, .61); text-align: center; }
.online-pvp-stats small,
.online-pvp-stats b { display: block; }
.online-pvp-stats small { overflow: hidden; color: #778388; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.online-pvp-stats b { margin-top: 1px; color: #304e5b; font: 700 11px Georgia, serif; }

.online-pvp-stage { min-width: 0; overflow: hidden; border: 1px solid #aa956b; border-radius: 7px; background: #e7e0d4; }
.online-pvp-board { position: relative; min-height: 330px; overflow: hidden; background: linear-gradient(rgba(23, 46, 51, .17), rgba(23, 46, 51, .17)), url('assets/battle-arena.webp') center / cover no-repeat #52686c; box-shadow: inset 0 0 55px rgba(17, 31, 34, .48); }
.online-pvp-board::after { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at center, transparent 25%, rgba(17, 31, 35, .26)); content: ''; pointer-events: none; }

.online-pvp-cell { position: absolute; z-index: 2; padding: 0; border: 0; background: transparent; }
.online-pvp-cell > span { position: absolute; inset: 3%; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(224, 235, 229, .17); box-shadow: inset 0 0 0 1px rgba(245, 249, 242, .24); transition: transform .15s ease, background .15s ease; }
.online-pvp-cell small { color: rgba(255, 255, 255, .42); font-size: 7px; }
.online-pvp-cell.is-reachable { cursor: pointer; }
.online-pvp-cell.is-reachable > span { background: rgba(166, 218, 195, .5); box-shadow: inset 0 0 0 2px rgba(228, 255, 242, .72), 0 0 14px rgba(65, 150, 115, .33); }
.online-pvp-cell.is-reachable:hover > span,
.online-pvp-cell.is-selected > span { transform: scale(.94); background: rgba(240, 207, 126, .8); box-shadow: inset 0 0 0 2px #9a681a, 0 0 20px rgba(240, 202, 105, .45); }
.online-pvp-cell.is-obstacle > span { background: rgba(39, 47, 47, .55); }

.online-pvp-token { position: absolute; z-index: 5; inset: 12%; display: grid; place-items: center; border: 2px solid #5eb3db; border-radius: 50%; color: #f8e9c7; background: radial-gradient(circle at 40% 30%, #527b89, #263e48 70%); box-shadow: 0 0 0 3px rgba(255, 253, 247, .9), 0 7px 17px rgba(21, 35, 39, .38), 0 0 17px rgba(67, 171, 222, .5); font: 700 clamp(12px, 1.5vw, 20px) Georgia, serif; }
.online-pvp-token.is-opponent { border-color: #df6a61; background: radial-gradient(circle at 40% 30%, #87594e, #4a302c 70%); box-shadow: 0 0 0 3px rgba(255, 253, 247, .9), 0 7px 17px rgba(21, 35, 39, .38), 0 0 17px rgba(219, 76, 68, .5); }

.online-pvp-effects { position: absolute; z-index: 12; inset: 0; overflow: hidden; pointer-events: none; }
.online-pvp-impact { --impact-color: #ffe0a2; position: absolute; top: var(--fx-y); left: var(--fx-x); width: 72px; height: 72px; transform: translate(-50%, -50%); color: var(--impact-color); font-style: normal; }
.online-pvp-impact.is-critical { --impact-color: #ff665d; }
.online-pvp-impact.is-dodge { --impact-color: #78d7a8; }
.online-pvp-impact.is-block { --impact-color: #e1ebef; }
.online-pvp-impact.is-lucky { --impact-color: #72c9ff; }
.online-pvp-impact.is-response { --impact-color: #e5a462; }
.online-pvp-impact b { position: absolute; z-index: 2; top: 15px; left: 50%; min-width: max-content; transform: translateX(-50%); color: var(--impact-color); font: 900 clamp(20px, 2.8vw, 38px)/1 Georgia, serif; letter-spacing: .03em; text-shadow: 0 3px 6px #000, 0 0 18px currentColor; animation: onlinePvpImpactFloat 1.05s ease-out both; }
.online-pvp-impact u { position: absolute; inset: 0; border: 3px solid var(--impact-color); border-radius: 50%; opacity: 0; box-shadow: 0 0 22px var(--impact-color), inset 0 0 17px var(--impact-color); text-decoration: none; animation: onlinePvpImpactBurst .72s ease-out both; }
.online-pvp-impact u::before,
.online-pvp-impact u::after { position: absolute; top: 50%; left: -14px; width: 94px; height: 3px; background: linear-gradient(90deg, transparent, var(--impact-color), #fff, var(--impact-color), transparent); content: ''; }
.online-pvp-impact u::after { transform: rotate(90deg); }
.online-pvp-impact.is-delayed b,
.online-pvp-impact.is-delayed u { animation-delay: .42s; }

.online-pvp-controls { display: grid; grid-template-columns: .85fr 1fr 1fr .85fr; gap: 6px; padding: 7px; border-top: 1px solid #c7b999; background: linear-gradient(180deg, #fbf7ed, #e5ded0); }
.online-pvp-controls section { min-width: 0; padding-right: 5px; border-right: 1px solid rgba(126, 103, 63, .19); }
.online-pvp-controls section:last-child { padding-right: 0; border-right: 0; }
.online-pvp-controls header { display: flex; gap: 4px; justify-content: space-between; margin-bottom: 4px; color: #394f5a; font-size: 7px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.online-pvp-controls header small { overflow: hidden; color: #788389; font-size: 6px; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.online-pvp-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.online-pvp-choice-grid.is-stances { grid-template-columns: repeat(3, 1fr); }
.online-pvp-choice-grid button { min-height: 28px; padding: 3px; border: 1px solid #c5b99f; border-radius: 4px; color: #4c5f67; background: rgba(255, 254, 250, .84); cursor: pointer; font-size: 7px; font-weight: 850; }
.online-pvp-choice-grid button:hover:not(:disabled) { border-color: #987536; color: #6a4b18; }
.online-pvp-choice-grid.is-stances button.is-selected { border-color: #a4772a; color: #725018; background: #f5e8ca; }
.online-pvp-choice-grid.is-attacks button.is-selected { border-color: #b63e38; color: #932e2a; background: #fae4e1; }
.online-pvp-choice-grid.is-blocks button.is-selected { border-color: #25739b; color: #1b658b; background: #dceef7; }
.online-pvp-choice-grid button:disabled { opacity: .42; cursor: not-allowed; }
.online-pvp-commit { display: flex; flex-direction: column; justify-content: center; }
.online-pvp-commit > button { min-height: 39px; border: 1px solid #8e6928; border-radius: 5px; color: #fff7e6; background: linear-gradient(#b88a37, #8c6421); cursor: pointer; font: 700 10px Georgia, serif; }
.online-pvp-commit > button:disabled { border-color: #aaa394; color: #85827b; background: #d8d3c9; cursor: not-allowed; }
.online-pvp-commit > small { display: block; min-height: 20px; margin-top: 4px; color: #69777c; font-size: 6px; line-height: 1.35; text-align: center; }
.online-pvp-controls.is-waiting { background: linear-gradient(90deg, #f3ead5, #e7eee9); }

.online-pvp-finished-controls { padding: 14px; border-top: 1px solid #c7b999; text-align: center; }
.online-pvp-finished-controls strong { display: block; color: #2e7659; font: 700 20px Georgia, serif; }
.online-pvp-finished-controls span { display: block; margin-top: 3px; color: #748084; font-size: 8px; }

.online-pvp-log-panel { margin: 0 8px 8px; padding: 8px; border: 1px solid #c7b99a; border-radius: 7px; background: linear-gradient(145deg, #fffaf0, #e9e1d1); }
.online-pvp-log-panel > header { display: flex; gap: 12px; align-items: end; justify-content: space-between; padding: 0 3px 6px; }
.online-pvp-log-panel header small { color: #966b23; font-size: 6px; font-weight: 950; letter-spacing: .13em; }
.online-pvp-log-panel h2 { margin: 1px 0 0; color: #2e4c58; font: 700 15px Georgia, serif; }
.online-pvp-log-panel header > span { color: #6b7c82; font-size: 7px; }
.online-pvp-log { max-height: 174px; overflow-y: auto; border: 1px solid #d0c4ac; border-radius: 4px; background: rgba(248, 244, 234, .86); }
.online-pvp-log-line { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 7px; min-height: 25px; align-items: center; padding: 4px 7px; border-bottom: 1px dotted rgba(117, 102, 72, .2); color: #314752; font-size: 9px; }
.online-pvp-log-line:last-child { border-bottom: 0; }
.online-pvp-log-line time { color: #74858c; font: 7px ui-monospace, Consolas, monospace; }
.online-pvp-log-line small { color: #96703a; font-size: 6px; }
.online-pvp-log-line.is-critical,
.online-pvp-log-line.is-critical-lucky { background: linear-gradient(90deg, rgba(250, 224, 220, .85), transparent 72%); }
.online-pvp-log-line.is-dodge { background: linear-gradient(90deg, rgba(219, 239, 226, .85), transparent 72%); }
.online-pvp-log-line.is-block { background: linear-gradient(90deg, rgba(222, 235, 241, .85), transparent 72%); }
.online-pvp-log-empty { padding: 18px; color: #7d888b; font-size: 8px; text-align: center; }

.online-pvp-loading { display: flex; min-height: calc(100vh - var(--online-chat-height, 44px) - 18px); flex-direction: column; gap: 5px; align-items: center; justify-content: center; color: #718085; text-align: center; }
.online-pvp-loading i { width: 34px; height: 34px; margin-bottom: 7px; border: 3px solid #d6c8aa; border-top-color: #39748b; border-radius: 50%; animation: onlinePvpSpin .8s linear infinite; }
.online-pvp-loading strong { color: #2d4b57; font: 700 19px Georgia, serif; }
.online-pvp-loading span { font-size: 9px; }
.online-pvp-loading.is-error strong { color: #9e4037; }
.online-pvp-shell.is-loading > .online-pvp-close { position: absolute; top: 18px; right: 20px; }

.online-pvp-summary-list { display: grid; gap: 1px; background: #ddd3bf; }
.online-pvp-summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: linear-gradient(90deg, #eaf3ed, #fffdf8); }
.online-pvp-summary.is-finished { background: #fffdf8; }
.online-pvp-summary > span { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid #a88345; border-radius: 50%; color: #8d6422; background: #f5e8ca; }
.online-pvp-summary div { min-width: 0; }
.online-pvp-summary small,
.online-pvp-summary strong,
.online-pvp-summary em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-pvp-summary small { color: #94661d; font-size: 6px; font-weight: 950; letter-spacing: .1em; }
.online-pvp-summary strong { margin-top: 2px; color: #304d59; font-size: 10px; }
.online-pvp-summary em { margin-top: 2px; color: #738085; font-size: 7px; font-style: normal; }
.online-pvp-summary > button { min-height: 31px; padding: 5px 9px; border: 1px solid #967234; border-radius: 5px; color: #694b1a; background: #fff7e6; cursor: pointer; font-size: 8px; font-weight: 900; }

@keyframes onlinePvpSpin { to { transform: rotate(360deg); } }
@keyframes onlinePvpImpactFloat { 0% { transform: translate(-50%, 12px) scale(.7); opacity: 0; } 22% { opacity: 1; } 100% { transform: translate(-50%, -42px) scale(1.08); opacity: 0; } }
@keyframes onlinePvpImpactBurst { 0% { transform: scale(.18); opacity: 0; } 18% { opacity: .95; } 100% { transform: scale(1.45); opacity: 0; } }

@media (max-width: 1100px) {
  .online-pvp-main { grid-template-areas: "local opponent" "stage stage"; grid-template-columns: 1fr 1fr; }
  .online-pvp-fighter.is-local { grid-area: local; }
  .online-pvp-fighter.is-opponent { grid-area: opponent; }
  .online-pvp-stage { grid-area: stage; }
  .online-pvp-board { min-height: 350px; }
}

@media (max-width: 760px) {
  body.has-online-chat-open { --online-chat-height: 300px; }
  .online-chat-dock.is-open { height: 300px; }
  .online-chat-head { grid-template-columns: minmax(120px, 1fr) auto 32px; }
  .online-chat-connection { display: none; }
  .online-chat-tabs button { min-width: 62px; padding: 4px 7px; }
  .online-chat-body { height: 256px; }
  .online-chat-message { grid-template-columns: 50px minmax(75px, 105px) minmax(0, 1fr); gap: 5px; }
  .online-chat-form { grid-template-columns: minmax(0, 1fr) 82px; }
  .online-chat-form > span { display: none; }

  .online-pvp-overlay { padding: 0; }
  .online-pvp-shell { border-right: 0; border-left: 0; border-radius: 0; }
  .online-pvp-header { grid-template-columns: minmax(0, 1fr) auto; padding-left: 10px; }
  .online-pvp-round { min-width: 75px; }
  .online-pvp-header-actions { grid-column: 1 / -1; justify-content: stretch; }
  .online-pvp-header-actions button:not(.online-pvp-close) { flex: 1; }
  .online-pvp-main { grid-template-areas: "local opponent" "stage stage"; gap: 5px; padding: 5px; }
  .online-pvp-fighter { padding: 7px; }
  .online-pvp-fighter-head { grid-template-columns: 34px minmax(0, 1fr); }
  .online-pvp-avatar { width: 32px; height: 32px; }
  .online-pvp-fighter-head em { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .online-pvp-stats { display: none; }
  .online-pvp-board { min-height: 260px; }
  .online-pvp-controls { grid-template-columns: 1fr 1fr; }
  .online-pvp-controls section:nth-child(2) { border-right: 0; }
  .online-pvp-log-panel { margin: 0 5px 5px; }
}

@media (max-width: 480px) {
  .online-chat-dock { right: 3px; left: 3px; }
  .online-chat-toggle { padding-right: 5px; padding-left: 8px; }
  .online-chat-toggle small { display: none; }
  .online-chat-toggle strong { font-size: 12px; }
  .online-chat-sigil { width: 23px; height: 23px; flex-basis: 23px; }
  .online-chat-tabs button { min-width: 52px; font-size: 8px; }
  .online-chat-message { grid-template-columns: 47px minmax(66px, 86px) minmax(0, 1fr); padding-right: 2px; padding-left: 2px; font-size: 9px; }
  .online-pvp-header h1 { font-size: 16px; }
  .online-pvp-header > div:first-child span { display: none; }
  .online-pvp-fighter-head h2 { font-size: 11px; }
  .online-pvp-vital { margin-top: 7px; }
  .online-pvp-board { min-height: 220px; }
  .online-pvp-controls { grid-template-columns: 1fr; }
  .online-pvp-controls section { padding: 0 0 5px; border-right: 0; border-bottom: 1px solid rgba(126, 103, 63, .19); }
  .online-pvp-controls section:last-child { padding-bottom: 0; border-bottom: 0; }
  .online-pvp-log-line { grid-template-columns: 47px minmax(0, 1fr); }
  .online-pvp-log-line small { display: none; }
  .online-pvp-summary { grid-template-columns: 34px minmax(0, 1fr); }
  .online-pvp-summary > button { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body.has-online-chat .app-shell { transition: none; }
  .online-chat-dock { transition: none; }
  .online-pvp-loading i { animation: none; }
  .online-pvp-impact b,
  .online-pvp-impact u { animation: none; opacity: 0; }
  .online-pvp-cell > span,
  .online-pvp-vital > i > u { transition: none; }
}

/* Live PvP uses the exact "Seal of Twilight" combat composition from PvE. */
body.has-online-pvp { overflow: hidden; }

.online-pvp-overlay {
  inset: 0 0 var(--online-chat-height, 44px);
  padding: 0;
  color: #263443;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 249, 224, .95), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(178, 211, 219, .65), transparent 38rem),
    linear-gradient(135deg, #e9e2d3, #dce7e6 52%, #eee5d4);
  backdrop-filter: none;
  scrollbar-color: #aa9d83 #eee7d9;
}

.pvp-seal-battle {
  min-height: calc(100vh - var(--online-chat-height, 44px));
}

.pvp-seal-fighter.is-enemy .seal-portrait img {
  transform: scaleX(-1);
}

.pvp-seal-stage .seal-turn.is-waiting i {
  background: #b7842f;
  box-shadow: 0 0 8px rgba(183, 132, 47, .5);
  animation: onlinePulse 1.25s ease-in-out infinite;
}

.pvp-server-calculation {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(37, 117, 85, .26);
  border-radius: 999px;
  color: #376551;
  background: #e7f2e8;
  font-size: 7px;
  font-weight: 850;
  white-space: nowrap;
}

.pvp-seal-equipment-lock {
  display: block;
  margin-bottom: 5px;
  color: #667483;
  font-size: 7px;
  font-weight: 800;
  text-align: center;
}

.pvp-seal-battle .seal-controls.pvp-is-waiting {
  background:
    linear-gradient(rgba(128,113,82,.035) 1px,transparent 1px) 0 0/100% 24px,
    linear-gradient(90deg,#f6ecd8,#e6efe9);
}

.pvp-seal-battle .seal-cell.is-obstacle .seal-hex {
  background: rgba(42, 51, 51, .54);
  box-shadow: inset 0 0 0 1px rgba(28, 38, 40, .42);
}

.pvp-seal-battle .seal-log-line.is-incoming::before {
  content: "ОН";
}

.pvp-seal-log-panel {
  margin-top: 0;
}

.pvp-seal-unranked {
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid #cdbb91;
  border-radius: 5px;
  color: #735720;
  background: #f6ecd3;
  font-size: 8px;
}

.online-pvp-loading {
  min-height: calc(100vh - var(--online-chat-height, 44px) - 18px);
}

.online-duel-level-range {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  min-width: 230px;
  gap: 3px;
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
}

.online-duel-level-range legend {
  grid-column: 1 / -1;
  padding: 0;
  color: #8a6a32;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.online-duel-level-range label {
  display: grid;
  gap: 2px;
}

.online-duel-level-range label span,
.online-duel-level-range > small {
  color: #728087;
  font-size: 7px;
}

.online-duel-level-range > i {
  align-self: center;
  padding-top: 12px;
  color: #9c8152;
  font-style: normal;
  font-weight: 900;
}

.online-duel-level-range > small {
  grid-column: 1 / -1;
  margin-top: 1px;
}

.online-duel-level-range select {
  width: 100%;
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  border: 1px solid #c5b898;
  border-radius: 5px;
  color: #334d5b;
  background: #fffdf7;
  font-size: 9px;
  font-weight: 800;
}

.online-duel-level-range select:disabled,
.online-duel-level-range:disabled select {
  color: #8a8c86;
  background: #e8e3d8;
}

.online-live-arena .live-arena-request {
  grid-template-columns: minmax(150px, .8fr) minmax(230px, 1.1fr) minmax(150px, .8fr) auto;
}

.online-player-card {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

@media (max-width: 1020px) {
  .pvp-seal-battle { width: min(100% - 10px, 820px); }
}

@media (max-width: 980px) {
  .online-live-arena .live-arena-request { grid-template-columns: 1fr 1fr; }
  .online-live-arena .live-arena-request > .button { width: 100%; }
}

@media (max-width: 620px) {
  .pvp-server-calculation { justify-self: start; }
  .online-live-arena .live-arena-request { grid-template-columns: 1fr; }
  .online-duel-level-range { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pvp-seal-stage .seal-turn.is-waiting i { animation: none; }
}
