/* 황제 발리볼 전용 스타일. 색 토큰은 style.css의 :root를 그대로 쓴다. */
.volley-shell{min-height:100vh;background:radial-gradient(120% 90% at 50% 0,#132a4c 0,#07111d 60%)}
.volley-main{max-width:1180px;margin:0 auto;padding:14px 16px 60px;display:flex;flex-direction:column;gap:12px}
.volley-rating-chip strong{color:var(--gold)}

.volley-scorebar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:10px 16px;border:1px solid var(--line);border-radius:14px;background:#0b1a30cc}
.vs-side{display:flex;flex-direction:column;gap:2px;min-width:0}
.vs-side.right{align-items:flex-end;text-align:right}
.vs-side b{font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vs-side small{font-size:11px;color:var(--muted)}
.vs-side.left b{color:var(--gold)}
.vs-side.right b{color:var(--cyan)}
.vs-score{display:flex;align-items:center;gap:14px}
.vs-score strong{font-family:"Black Han Sans",sans-serif;font-size:38px;line-height:1;font-weight:400}
.vs-score strong:first-child{color:var(--gold)}
.vs-score strong:last-child{color:var(--cyan)}
.vs-score i{font-style:normal;font-size:11px;font-weight:800;letter-spacing:1px;color:var(--muted)}

.volley-court-wrap{position:relative;display:flex;justify-content:center;border:1px solid var(--line);border-radius:16px;background:#050d18;overflow:hidden}
#court{display:block;max-width:100%;touch-action:none}

.court-overlay{position:absolute;inset:0;display:grid;place-items:center;padding:16px;background:#040b16d9;backdrop-filter:blur(4px);transition:opacity .25s ease}
.court-overlay.hidden{opacity:0;pointer-events:none}
.overlay-card{width:min(430px,100%);text-align:center;display:flex;flex-direction:column;gap:10px}
.overlay-card h2{margin:0;font-family:"Black Han Sans",sans-serif;font-size:30px;font-weight:400}
.overlay-card>p:not(.eyebrow){margin:0;font-size:13px;line-height:1.7;color:#b8c5d9}
.overlay-targets,.overlay-levels{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.overlay-levels{align-items:center;font-size:11px;color:var(--muted)}
.overlay-targets button,.overlay-levels button{padding:7px 13px;border:1px solid var(--line);border-radius:9px;background:#0d1c33;color:#cfdaea;font-size:12px;font-weight:700;cursor:pointer}
.overlay-targets button.active,.overlay-levels button.active{border-color:#ffd36a88;background:#ffd36a1f;color:var(--gold)}
.overlay-actions{display:flex;justify-content:center;gap:8px;margin-top:2px}
.overlay-status{min-height:18px;font-size:12px;color:var(--cyan)}

.volley-primary{padding:13px 30px;border:0;border-radius:11px;background:linear-gradient(135deg,#ffd36a,#e0a325);color:#231502;font-size:15px;font-weight:900;cursor:pointer;box-shadow:0 10px 26px #e0a32540}
.volley-primary:hover{filter:brightness(1.07)}
.volley-ghost{padding:13px 22px;border:1px solid var(--line);border-radius:11px;background:#0d1c33;color:#cfdaea;font-size:14px;font-weight:800;cursor:pointer}
.volley-ghost:hover{border-color:#41d9ee66;color:#fff}
.volley-ghost.small{padding:5px 11px;font-size:11px}

.volley-countdown{position:absolute;inset:0;display:grid;place-items:center;font-family:"Black Han Sans",sans-serif;font-size:clamp(70px,14vw,130px);color:#fff;text-shadow:0 0 30px #41d9ee,0 6px 22px #000;pointer-events:none}
.volley-countdown[hidden]{display:none}
.volley-toast{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);max-width:90%;padding:8px 16px;border:1px solid var(--line);border-radius:999px;background:#050d18e8;font-size:12px;font-weight:700;color:#e6eefb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.volley-toast[hidden]{display:none}

.volley-controls{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:#0b1a30aa}
.volley-keys{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
.volley-keys b{color:#dbe6f5;font-size:12px}
.volley-keys i{display:inline-grid;place-items:center;min-width:22px;height:20px;margin:0 1px;padding:0 5px;border:1px solid var(--line);border-radius:5px;background:#132542;color:#fff;font-style:normal;font-size:10px;font-weight:800}
.volley-touch{display:none;gap:6px}
.volley-touch button{width:52px;height:44px;border:1px solid var(--line);border-radius:10px;background:#132542;color:#fff;font-size:13px;font-weight:800;touch-action:none;user-select:none}
.volley-touch button.hit{background:linear-gradient(135deg,#ffd36a,#e0a325);color:#231502}
.volley-touch button.down{filter:brightness(1.35)}
.volley-net-info{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:800;color:var(--muted);white-space:nowrap}

.volley-panels{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.volley-panel{padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#0b1a30aa}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.panel-head b{font-size:13px}
.panel-head small{font-size:10px;color:var(--muted)}
.volley-empty{margin:6px 0;font-size:11px;color:var(--muted);list-style:none}

.volley-rank{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;max-height:230px;overflow-y:auto}
.volley-rank li{display:grid;grid-template-columns:22px 1fr auto auto;align-items:center;gap:8px;padding:5px 7px;border-radius:8px;background:#0e1e37;font-size:12px}
.volley-rank li i{font-style:normal;font-weight:900;color:var(--muted);text-align:center}
.volley-rank li:nth-child(1) i{color:#ffd36a}
.volley-rank li:nth-child(2) i{color:#dfe7f2}
.volley-rank li:nth-child(3) i{color:#e0a97a}
.volley-rank li b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.volley-rank li span{font-weight:900;color:var(--cyan)}
.volley-rank li small{font-size:10px;color:var(--muted)}

.volley-live{display:flex;flex-direction:column;gap:5px;max-height:230px;overflow-y:auto}
.volley-live button{display:flex;flex-direction:column;gap:2px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:#0e1e37;color:#dbe6f5;text-align:left;font-size:12px;cursor:pointer}
.volley-live button:hover{border-color:#41d9ee66}
.volley-live button b{color:var(--gold)}
.volley-live button small{font-size:10px;color:var(--muted)}

.volley-history{display:flex;flex-direction:column;gap:4px;max-height:230px;overflow-y:auto}
.volley-history div{display:grid;grid-template-columns:22px 1fr auto auto;align-items:center;gap:8px;padding:5px 7px;border-radius:8px;background:#0e1e37;font-size:12px}
.volley-history div b{font-weight:900;text-align:center}
.volley-history div.win b{color:#54e6d0}
.volley-history div.lose b{color:#ff5265}
.volley-history div span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.volley-history div i{font-style:normal;font-weight:800;color:#cfdaea}
.volley-history div small{font-size:10px;color:var(--muted)}

.volley-guide{padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:#0b1a30aa;font-size:12px;color:#b8c5d9}
.volley-guide summary{font-size:13px;font-weight:800;color:#fff;cursor:pointer}
.volley-guide ol{margin:10px 0 0;padding-left:20px;line-height:1.9}
.volley-guide b{color:var(--gold)}

@media (max-width:980px){
  .volley-panels{grid-template-columns:1fr}
  .volley-controls{grid-template-columns:1fr;justify-items:center}
  .volley-touch{display:flex}
  .volley-keys{display:none}
  .vs-score strong{font-size:30px}
}

/* 기술 안내 */
.volley-keys .key-group{margin-left:8px;padding-left:10px;border-left:1px solid var(--line);color:var(--gold)}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:12px}
.guide-grid>div>b{display:block;margin-bottom:6px;font-size:13px;color:var(--gold)}
.guide-grid p{margin:0 0 6px;line-height:1.7}
.guide-grid ul{margin:0;padding-left:16px;line-height:1.85}
.guide-grid li{margin-bottom:3px}
.guide-grid i{font-style:normal;font-weight:800;color:#fff}
.guide-grid em{font-style:normal;color:var(--cyan)}
.volley-net-info .stalled{color:#ff8b9a;animation:stallBlink 1s ease-in-out infinite}
@keyframes stallBlink{0%,100%{opacity:1}50%{opacity:.45}}


/* ===== 사이트 새 디자인 (2026-11) : 둥근 카드·알약 버튼·가는 테두리. 게임 고유 색(네이비/골드/시안)은 유지 ===== */
.volley-shell{min-height:100vh}
.volley-main{max-width:none;padding:12px 16px 12px}
.volley-scorebar,.volley-controls,.volley-panel,.volley-guide{border:1px solid #ffffff14;border-radius:20px;box-shadow:0 8px 24px #0004}
.volley-scorebar{padding:8px 20px;background:#0b1a30d9}
.volley-court-wrap{border:1px solid #ffffff14;border-radius:22px;box-shadow:0 14px 36px #0006}
.court-overlay{border-radius:22px;background:#040b16e6}
.overlay-card{gap:9px}
.overlay-card .eyebrow{white-space:nowrap}
.overlay-targets button,.overlay-levels button{padding:6px 16px;border-radius:999px;border-color:#ffffff14;white-space:nowrap}
.volley-primary,.volley-ghost{border-radius:999px;white-space:nowrap}
.volley-primary{padding:12px 32px}
.volley-ghost{padding:12px 24px;border-color:#ffffff1f}
.volley-ghost.small{padding:5px 12px}
.volley-toast{border-color:#ffffff14}
.volley-keys i{border-radius:6px;border-color:#ffffff1f}
.volley-keys span{white-space:nowrap}
.volley-touch button{border-radius:999px}
.volley-rank li,.volley-history div,.volley-live button{border-radius:12px;background:#0e1e37;border:1px solid #ffffff0d}
.volley-guide summary{white-space:nowrap}

@media (min-width:981px){
  /* 화면 높이에 맞춰 코트 폭을 정한다(캔버스는 volley.js 가 부모 폭 기준으로 크기를 잡는다). 250px = 헤더+점수판+조작줄+여백 */
  .volley-main{display:grid;grid-template-columns:min(960px,calc((100vh - 250px) * 1.4211)) minmax(280px,1fr);
    grid-template-rows:auto auto auto;gap:10px 14px;justify-content:center;align-content:start;max-width:1560px;margin:0 auto}
  .volley-scorebar{grid-column:1;grid-row:1}
  .volley-court-wrap{grid-column:1;grid-row:2}
  .volley-controls{grid-column:1;grid-row:3;padding:8px 14px;grid-template-columns:minmax(0,1fr) auto}
  .volley-keys{gap:6px 8px;font-size:10.5px}
  .volley-keys .key-group{margin-left:4px;padding-left:8px}
  .volley-keys small{font-size:10px}
  .volley-panels{grid-column:2;grid-row:1 / span 2;display:flex;flex-direction:column;gap:10px;min-height:0;min-width:0}
  .volley-panel{flex:1 1 0;min-height:0;display:flex;flex-direction:column;padding:12px 14px}
  .volley-rank,.volley-live,.volley-history{flex:1;min-height:0;max-height:none}
  .volley-panel .panel-head{flex:none}
  .volley-guide{grid-column:2;grid-row:3;position:relative;padding:10px 16px;align-self:stretch;display:flex;align-items:center}
  .volley-guide summary{list-style:none}
  .volley-guide summary::-webkit-details-marker{display:none}
  .volley-guide summary::after{content:" · 마우스를 올려 보기";font-weight:600;font-size:11px;color:var(--muted)}
  /* 기술 안내는 화면에 고정하지 않고, 올려 보거나 포커스하면 코트 위로 떠서 보인다(스크롤 없이 한 화면 유지) */
  .volley-guide .guide-grid{display:none;position:absolute;right:0;bottom:calc(100% + 10px);width:min(1000px,calc(100vw - 32px));max-height:calc(100vh - 100px);overflow-y:auto;margin:0;padding:18px 20px;
    border:1px solid #ffffff1f;border-radius:20px;background:#07101ef5;box-shadow:0 20px 60px #000a;z-index:30}
  .volley-guide:hover .guide-grid,.volley-guide:focus-within .guide-grid{display:grid}
}
@media (max-width:980px){
  .volley-main{padding-bottom:40px}
  .volley-rank,.volley-live,.volley-history{max-height:230px}
}

/* 조작 안내: 두 줄로 고정(1줄 기본 · 수비, 2줄 공중 공격). 묶음이 줄 사이에서 쪼개지지 않게 줄마다 줄바꿈하지 않는다 */
.volley-keys{flex-direction:column;align-items:stretch;gap:5px;flex-wrap:nowrap;min-width:0}
.volley-keys .key-row{display:flex;align-items:center;gap:6px 10px;flex-wrap:nowrap;white-space:nowrap;min-width:0;overflow:hidden}
.volley-keys .key-group.first{margin-left:0;padding-left:0;border-left:0}
.volley-keys .key-row small{min-width:0;overflow:hidden;text-overflow:ellipsis;opacity:.8}
@media(max-width:1360px){.volley-keys .key-row{gap:5px 7px}.volley-keys .key-row small{display:none}}
