/* DOT MATGO — versus.css (versus agent): 'versus' (친구 대전 menu) and 'lobby' (online waiting room). Prefix: vs- */

/* ------------------------------------------------------------------ shared */
.vs-screen .hub-body { padding-top: 8px; }
.vs-foot { flex: none; padding: 6px 8px 8px; background: var(--night); box-shadow: 0 -2px 0 var(--ink), inset 0 2px 0 rgba(108, 242, 255, .15); position: relative; z-index: 3; }
.vs-foot::before {
  content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--hwaRed) 0 10px, var(--jade) 10px 20px, var(--hwaBlue) 20px 30px, var(--yellow) 30px 40px, var(--jade) 40px 50px);
}
.vs-go { font-family: var(--font-title) !important; font-size: 18px !important; min-height: 46px; }
.vs-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vs-k { margin: 6px 0 2px; font-family: var(--font-small); font-size: 10px; color: var(--brown); }
.vs-desc { margin-top: 6px; min-height: 1.45em; font-size: 11px; line-height: 1.45; word-break: keep-all; color: var(--brownD); }   /* every format text is one line: no jump between formats */
.vs-small { margin-top: 5px; font-family: var(--font-small); font-size: 10px; line-height: 1.45; color: var(--brown); word-break: keep-all; }
.vs-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.vs-chip { font-size: 11px; padding: 1px 6px; background: var(--white); box-shadow: 0 0 0 1px var(--ink); white-space: nowrap; }
.vs-chips .vs-chip:first-child { background: var(--yellowL); font-weight: 700; }
.vs-note { margin-top: 10px; }
.vs-note .hub-icon { align-self: flex-start; margin-top: 2px; }
.vs-legal { margin-bottom: 4px; }
.vs-name { font-size: 13px; padding: 4px 6px; text-align: center; width: calc(100% - 8px); max-width: 118px; margin: 6px auto 0; display: block; }
.vs-ptag {
  font-family: var(--font-num); font-size: 11px; padding: 0 6px 1px; color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 2px 0 var(--ink);
  background: var(--yellowL); align-self: center;
}
.vs-ptag.p2 { background: var(--dokFire); }

/* ------------------------------------------------------------------ mode tabs */
.vs-modes { display: flex; gap: 6px; margin: 4px 4px 2px; }
.vs-mode {
  flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 7px 9px; margin: 0; border: 0; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); background: var(--hanjiD);
  box-shadow: var(--px-border), inset 0 -3px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .35);
}
.vs-mode:active { transform: translateY(1px); }
.vs-mode.on { background: var(--yellow); transform: translateY(-2px); box-shadow: var(--px-border), 0 4px 0 var(--ink), inset 0 -3px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .45); }
.vs-mode-ic { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--night); box-shadow: 0 0 0 2px var(--ink); }
.vs-mode.on .vs-mode-ic { background: var(--hwaRed); }
.vs-mode-txt { display: flex; flex-direction: column; min-width: 0; }
.vs-mode-txt b { font-size: 12px; line-height: 1.2; white-space: nowrap; }
.vs-mode-txt small { font-family: var(--font-small); font-size: 10px; line-height: 1.3; color: var(--brownD); word-break: keep-all; }
.vs-pane { animation: px-fade-in .16s steps(3); }

/* ------------------------------------------------------------------ hot-seat duo */
.vs-duo { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; margin: 10px 4px 4px; padding: 10px 6px 12px; }
.vs-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vs-face { position: relative; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; }
.vs-face:active { transform: translateY(1px); }
.vs-face-edit {
  position: absolute; right: 2px; bottom: 6px; width: 18px; height: 18px; font-style: normal; font-size: 11px; line-height: 18px; text-align: center;
  background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 2px var(--ink);
}
.vs-face.small .vs-face-edit { right: 0; bottom: 3px; width: 15px; height: 15px; line-height: 15px; font-size: 10px; }
.vs-mark { flex: none; align-self: center; margin-top: -18px; filter: drop-shadow(0 2px 0 var(--ink)); }
.vs-mark .t-num { font-family: var(--font-title); font-size: 24px; color: var(--yellow); }
.vs-bankrow { margin-top: 2px; }
/* 대결용 엽전 only matters for 엽전 대결: for the other formats the row stays (same height) but is dimmed and locked */
.vs-bankrow.off { opacity: .4; filter: grayscale(1); pointer-events: none; }
.vs-bankrow.off .vs-k::after { content: ' · 엽전 대결일 때만'; }

/* avatar picker */
.vs-avmodal { width: 300px; }
.vs-avgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 2px; max-height: 330px; overflow-y: auto; padding: 2px; }
.vs-av { display: flex; flex-direction: column; align-items: center; padding: 3px 0 4px; margin: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.vs-av.on { background: rgba(210, 35, 42, .12); box-shadow: 0 0 0 2px var(--hwaRed); }
.vs-av-name { font-size: 10px; font-weight: 700; line-height: 1.2; white-space: nowrap; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ online */
.vs-server { margin: 10px 4px 4px; padding: 8px 10px 9px; }
.vs-server.bad { background: #2a1420; }
.vs-st-row { display: flex; align-items: center; gap: 8px; }
.vs-st-text { font-size: 13px; color: var(--white); }
.vs-st-sub { margin: 2px 0 0 18px; font-size: 10px; color: var(--dokFire); opacity: .85; word-break: break-all; min-height: 14px; }
.vs-st-btns { margin-top: 6px; }
.vs-st-btns .px-btn { min-height: 28px; }
.vs-dot { flex: none; width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--ink); background: var(--gray); }
.vs-dot.ok { background: var(--green); box-shadow: 0 0 0 2px var(--ink), 0 0 6px var(--green); }
.vs-dot.bad { background: var(--red); }
.vs-dot.wait { background: var(--yellow); animation: px-blink .8s steps(1) infinite; }
.vs-addr { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.vs-addr .px-input { font-size: 12px; padding: 4px 6px; }
.vs-addr .px-btn { flex: none; min-height: 28px; }
.vs-me-row { display: flex; align-items: center; gap: 10px; }
.vs-me-col { flex: 1; min-width: 0; }
.vs-me-col .vs-name { width: 100%; margin: 0; text-align: left; }
.vs-join-row { flex-wrap: nowrap; }
.vs-code-in {
  flex: 1; font-size: 22px; letter-spacing: 10px; text-align: center; text-transform: uppercase; padding: 3px 4px 4px 14px; min-width: 0;
  font-family: var(--font-num);
}
.vs-join-btn { flex: none; min-width: 72px; min-height: 38px !important; }
.vs-inroom { margin: 10px 4px 4px; background: var(--yellowL); }
.vs-inroom-t { font-weight: 700; margin-bottom: 4px; }

/* ------------------------------------------------------------------ lobby */
.vs-empty { margin: 20px 4px; text-align: center; }   /* same edge line as the other hub panels and the foot button */
.vs-codecard { margin: 6px 4px 6px; padding: 8px 8px 10px; text-align: center; }
.vs-code-label { font-family: var(--font-small); font-size: 10px; color: var(--dokFire); letter-spacing: 2px; }
.vs-tiles { display: flex; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.vs-tile {
  width: 52px; height: 62px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 34px; line-height: 1; color: var(--ink); text-shadow: 2px 2px 0 var(--hanjiD), 1px 0 0 var(--ink);
  background: var(--hanji); box-shadow: var(--px-border), inset 0 -4px 0 var(--hanjiD), inset 0 2px 0 rgba(255, 255, 255, .7), 0 4px 0 var(--ink);
  animation: vs-tile-in .36s steps(4) both;
}
.vs-tile:nth-child(odd) { transform: rotate(-2deg); }
.vs-tile:nth-child(even) { transform: rotate(2deg); }
@keyframes vs-tile-in { 0% { opacity: 0; transform: translateY(-14px) scale(.7); } 70% { opacity: 1; transform: translateY(2px) scale(1.06); } 100% { opacity: 1; } }
.vs-code-hint { font-size: 11px; color: var(--grayL); margin-bottom: 6px; word-break: keep-all; }
.vs-code-btns { justify-content: center; }

.vs-pduo { display: flex; align-items: stretch; gap: 0; margin: 12px 0 2px; }
.vs-pcard {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 4px 8px; margin: 4px;
  position: relative; text-align: center;
}
.vs-pcard.me { background: #fff6dd; }
.vs-pcard.ready { box-shadow: var(--px-border), 0 0 0 4px var(--jade), inset 0 -3px 0 0 rgba(0, 0, 0, .12); }
.vs-pcard.off .vs-pface { filter: grayscale(1) brightness(.8); }
.vs-pcard.empty { background: rgba(244, 232, 207, .55); }
.vs-pcard .vs-ptag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); }
.vs-pname { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-pstate { font-size: 10px; padding: 0 6px 1px; box-shadow: 0 0 0 1px var(--ink); background: var(--grayL); white-space: nowrap; }
.vs-pstate.ok { background: var(--green); font-weight: 700; }
.vs-pstate.off { background: var(--red); color: var(--white); }
.vs-pstate.wait { background: var(--hanjiD); }
.vs-pwins { font-size: 10px; color: var(--brown); }
.vs-dots { font-style: normal; animation: px-blink 1s steps(1) infinite; }
.vs-wait-face {
  width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-size: 30px;
  color: var(--hanjiD); border: 3px dashed var(--brownL); border-radius: 50%; margin: 1px 0 4px; animation: px-float 1.6s steps(4) infinite;
}
.vs-stamp {
  position: absolute; right: 2px; top: 26px; padding: 2px 4px 3px; font-style: normal; font-family: var(--font-title); font-size: 13px; color: var(--hwaRed);
  border: 2px solid var(--hwaRed); transform: rotate(14deg); background: rgba(255, 244, 220, .8); animation: vs-stamp .3s steps(3) both;
}
@keyframes vs-stamp { 0% { transform: rotate(14deg) scale(1.8); opacity: 0; } 100% { transform: rotate(14deg) scale(1); opacity: 1; } }
.vs-pmid { flex: none; align-self: center; width: 22px; display: flex; justify-content: center; margin: 0 -6px; z-index: 1; }
.vs-pmid b { font-family: var(--font-title); color: var(--hwaRed); }

.vs-bubble {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 3px 6px;
  background: var(--white); box-shadow: var(--px-border); z-index: 5; white-space: nowrap; font-size: 11px; font-weight: 700;
  animation: vs-bubble 1.9s steps(6) both;
}
.vs-bubble::after { left: calc(50% - 5px); }   /* stepped pixel tail pointing down: shape in base.css (speech-bubble tail) */
@keyframes vs-bubble { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.6); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 20% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }

.vs-emotes { margin-top: 18px; }
.vs-emo-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.vs-emo {
  height: 38px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; cursor: pointer;
  background: var(--white); box-shadow: 0 0 0 2px var(--ink), inset 0 -3px 0 rgba(0, 0, 0, .15);
}
.vs-emo:active { transform: translateY(1px); background: var(--yellowL); }
.vs-status {
  margin: 10px 6px 4px; padding: 6px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--hwaRedD);
  background: rgba(255, 244, 220, .7); box-shadow: 0 0 0 2px var(--hanjiD); word-break: keep-all;
}
.vs-foot .vs-status { margin: 0 0 5px; padding: 0 4px; background: none; box-shadow: none; color: var(--yellowL); font-size: 11px; min-height: 16px; }
.vs-linkbox .px-input { font-size: 11px; margin-top: 6px; }
