.tp-wrap { max-width: 620px; margin: 0 auto; width: 100%; }
.tp-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-name-field .input { border-width: 2px; border-color: var(--c); font-weight: 700; }
.tp-full { margin: 0 auto; }

/* 1:1 줄다리기 */
.tp-duel {
  --pos: 0;
  position: relative; display: flex; flex-direction: column; height: clamp(380px, 64vh, 620px);
  border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border);
  background: linear-gradient(to bottom,
    color-mix(in srgb, #FF5A36 15%, var(--surface)) 0 50%,
    color-mix(in srgb, #2F80ED 15%, var(--surface)) 50% 100%);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.game-shell.is-full .tp-duel-wrap { flex: 1; max-width: none; }
.game-shell.is-full .tp-duel { flex: 1; height: auto; min-height: 360px; }
.tp-half {
  position: relative; z-index: 2; flex: 1 1 0; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 16px 22px; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .3s;
}
.tp-top { transform: rotate(180deg); }
.tp-hinner { text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%; }
.tp-hname {
  font-weight: 800; font-size: 17px; padding: 2px 12px; border-radius: 999px; background: var(--c); color: #fff;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-hcount { font-family: var(--font-num); font-weight: 900; font-size: clamp(40px, 11vw, 60px); line-height: 1.05; color: var(--text); }
.tp-hmsg { font-weight: 800; font-size: 15px; color: var(--text-2); min-height: 1.4em; }
.tp-hmsg.is-count { font-size: 34px; color: var(--text); font-family: var(--font-num); }
.tp-hmsg.is-go { color: var(--c); font-size: 18px; }
.tp-hmsg.is-end { font-size: 24px; color: var(--text); }
.tp-half.is-win { background: color-mix(in srgb, var(--c) 28%, transparent); }
.tp-half.is-lose { filter: saturate(.4); }
.tp-rope-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tp-rope {
  position: absolute; left: 50%; top: 10px; bottom: 10px; width: 10px; margin-left: -5px; border-radius: 5px;
  background: repeating-linear-gradient(35deg, #c89b5e 0 6px, #a8773c 6px 12px); box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.tp-goal { position: absolute; left: 12%; right: 12%; height: 0; border-top: 3px dashed var(--c); opacity: .8; }
.tp-goal-top { top: 34px; }
.tp-goal-bot { bottom: 34px; }
.tp-center { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted var(--border-strong); }
.tp-marker {
  position: absolute; left: 50%; top: calc(50% + (50% - 34px) * var(--pos));
  width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); border: 3px solid #e5383b; box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
  font-size: 22px; transition: top .08s linear;
}
.tp-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tp-start:active { transform: translate(-50%, -50%) scale(.97); }
.tp-ripple {
  position: absolute; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; pointer-events: none;
  background: var(--c, var(--primary)); opacity: .35; animation: tp-ripple .45s ease-out forwards;
}
@keyframes tp-ripple { from { transform: scale(.2); opacity: .45; } to { transform: scale(1.4); opacity: 0; } }
.tp-ctrl .btn { min-width: 0; }
@media (hover: none) { .tp-keys { display: none; } }

/* 기록 도전 */
.tp-pad {
  --c: var(--primary);
  position: relative; min-height: clamp(260px, 44vh, 420px); border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px 16px;
  background: var(--surface-2); border: 2px dashed var(--border-strong); overflow: hidden; cursor: pointer; text-align: center;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.tp-pad.is-count { border-style: solid; }
.tp-pad.is-go { touch-action: none; border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.tp-pad.is-done { border-style: solid; border-color: var(--green); }
.tp-bar { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--border); }
.tp-bar i { display: block; height: 100%; background: var(--primary); transform-origin: left center; }
.tp-big { font-family: var(--font-num); font-weight: 900; font-size: clamp(64px, 20vw, 112px); line-height: 1; font-variant-numeric: tabular-nums; }
.tp-sub { font-weight: 700; color: var(--text-2); }
.tp-after .btn { min-width: 0; }
.tp-rank .panel-title { margin-bottom: 8px; }
.tp-table { display: grid; gap: 4px; }
.tp-tr {
  --c: var(--text-3);
  display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 700;
}
.tp-rk { font-family: var(--font-num); font-weight: 900; color: var(--text-3); }
.tp-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tp-nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.tp-tr b { font-family: var(--font-num); }
.tp-podium { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tp-pod { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; border: 2px solid var(--border); }
.tp-pod span { font-size: 13px; font-weight: 800; color: var(--text-2); }
.tp-pod b { font-size: 19px; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-pod small { font-size: 12.5px; color: var(--text-3); font-weight: 700; font-family: var(--font-num); }
.tp-pod.is-win { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.tp-pod.is-lose { border-color: var(--primary); background: var(--primary-soft); }
