/* 로그인·대기실 화면: PC(넓은 화면)와 폰 가로 화면 모두 한 화면에 꽉 차게 (스크롤 없이, 칸 안에서만 스크롤) */
.hallwrap, .homewrap { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: #12301f; color: #f2efe4; overflow: hidden; }
.hhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hhead h1 { margin: 0; font-size: 28px; font-weight: 800; }
.hhead .hright { display: flex; align-items: center; gap: 10px; }
.hhead .htitle { font-size: 20px; font-weight: 800; color: #ffd76a; white-space: nowrap; }
.hhead button, .hhead a.rulebtn { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 10px; }
.hhead a.rulebtn { display: inline-flex; align-items: center; background: #2e7d5b; color: #fff; text-decoration: none; font-weight: 700; }
.hbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.25fr); gap: 14px; min-height: 0; }
.hcol { background: #1a4630; border: 1px solid #2f6a4b; border-radius: 14px; padding: 14px 16px; min-height: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 10px; }
.hcol h2 { margin: 0; font-size: 18px; }
.hcol h2 small { font-weight: 400; font-size: 13px; color: #cfe3d6; }
.hlist, .hrooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hlist li { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #0f2c1e; border-radius: 8px; font-size: 16px; }
.hlist li.me { outline: 2px solid #e6c15a88; }
.hlist .tag, .hrooms .tag { font-size: 12px; }
.startpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigstart { min-height: 76px; font-size: 20px; font-weight: 800; border-radius: 14px; line-height: 1.25; }
.bigstart small { display: block; font-size: 12px; font-weight: 500; opacity: .85; margin-top: 3px; }
.bigstart.quick { background: #e0a030; color: #2a1a00; }
.hrooms li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #0f2c1e; border-radius: 10px; }
.hrooms .rinfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hrooms .rname { font-size: 17px; font-weight: 800; }
.hrooms button { min-height: 42px; font-size: 15px; }
.hinv { border: 2px solid #e6c15a; border-radius: 12px; padding: 12px; background: #3a3213; }
.hinv .row { display: flex; gap: 8px; margin-top: 8px; }
.hfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #1a4630; border: 1px solid #2f6a4b; border-radius: 12px; padding: 10px 16px; font-size: 16px; }
.hfoot input { min-width: 0; flex: 1; font-size: 16px; padding: 8px 10px; }
.hfoot .fbtns { display: flex; gap: 8px; flex: none; }
.hfoot button { min-height: 40px; }
/* 명예의 전당 요약 (오른쪽 칸) */
.hfame .famet { margin: 0; font-size: 15px; }
.hfame .famet th, .hfame .famet td { padding: 6px 4px; }
.hfame .hint { font-size: 12px; color: #cfe3d6; }
.hfame .mine { background: #0f2c1e; border-radius: 10px; padding: 10px 12px; font-size: 15px; line-height: 1.6; margin-top: auto; }
.hfame .mine b { color: #ffd76a; }
.hfame button { min-height: 40px; }
/* 대기실 설정 창 */
.hmenuov { position: fixed; inset: 0; background: #000b; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 12px; }
.hmenu { background: #12301f; border: 2px solid #2f6a4b; border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 1fr; gap: 8px; width: min(420px, 92vw); }
.hmenu button { min-height: 48px; font-size: 17px; }

/* 로그인 화면 */
.homewrap { grid-template-rows: auto 1fr; }
.homebody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-content: center; max-width: 980px; width: 100%; margin: 0 auto; min-height: 0; }
.homecard { background: #1a4630; border: 1px solid #2f6a4b; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.homecard h2 { margin: 0; font-size: 20px; }
.homecard input { font-size: 18px; padding: 12px 14px; width: 100%; }
.homecard .row { display: flex; gap: 8px; }
.homecard .row button { flex: 1; min-height: 46px; font-size: 17px; }
.homecard .hint { font-size: 13px; color: #cfe3d6; }
.homecredit { text-align: center; font-size: 11px; opacity: .7; }

/* 폰 가로 화면(낮은 화면): 칸을 작게 */
@media (max-height: 520px) {
  .hallwrap, .homewrap { gap: 6px; padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .hhead h1 { font-size: 20px; }
  .hhead .htitle { font-size: 14px; }
  .hhead button, .hhead a.rulebtn { min-height: 34px; padding: 4px 10px; font-size: 13px; }
  .hbody { gap: 8px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1.1fr); }
  .hcol { padding: 8px 10px; gap: 6px; border-radius: 10px; }
  .hcol h2 { font-size: 14px; }
  .hlist li { padding: 4px 8px; font-size: 13px; }
  .startpair { gap: 6px; }
  .bigstart { min-height: 52px; font-size: 14px; }
  .bigstart small { font-size: 10px; }
  .hrooms li { padding: 6px 8px; }
  .hrooms .rname { font-size: 14px; }
  .hrooms button { min-height: 38px; font-size: 13px; }
  .hfoot { padding: 5px 10px; font-size: 13px; }
  .hfoot button { min-height: 34px; font-size: 13px; padding: 4px 10px; }
  .hfame .famet { font-size: 12px; }
  .hfame .famet tbody tr:nth-child(n+6):not(.me) { display: none; } /* 폰 가로에서는 상위 5명과 내 줄만 */
  .hfame .famet th, .hfame .famet td { padding: 3px 2px; }
  .hfame .mine { font-size: 12px; padding: 6px 8px; line-height: 1.4; }
  .hfame button { min-height: 34px; font-size: 13px; }
  .homebody { gap: 8px; }
  .homecard { padding: 10px 12px; gap: 6px; }
  .homecard h2 { font-size: 15px; }
  .homecard input { font-size: 15px; padding: 7px 10px; }
  .homecard .row button { min-height: 38px; font-size: 14px; }
  .homecard .hint { font-size: 11px; }
  .homecredit { display: none; }
}
/* 아주 좁은 PC 창 */
@media (max-width: 760px) and (min-height: 521px) {
  .hbody { grid-template-columns: 1fr; overflow-y: auto; }
  .homebody { grid-template-columns: 1fr; }
}

/* 폰을 세로로 들면(터치, 좁은 화면) 모든 화면에서 가로로 눕히라고 안내한다 (게임 화면은 따로 같은 안내를 쓴다) */
.rotcss { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 600px) { .rotcss { display: flex; } }

/* ───── 스플래시 화면과 이어지는 분위기: 검은 옻칠 + 금박 + 붉은 화투 (아래 규칙이 위의 색을 덮어쓴다. 되돌리려면 이 블록만 지우면 됨) ───── */
.hallwrap, .homewrap {
  background:
    linear-gradient(180deg, #0a0f0aee 0%, #0a0f0a99 38%, #0a0f0aee 100%),
    #0b1a10 url(splash-bg.webp) center / cover no-repeat;
  color: #f6ecd2;
}
.hhead h1, .hhead .htitle {
  font-family: 'Black Han Sans', 'Noto Sans KR', 'Malgun Gothic', sans-serif; font-weight: 400; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff2b0 0%, #ffd24d 45%, #d98a12 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #5a2200) drop-shadow(0 0 10px #ff9a0066);
}
.hhead h1 { font-size: 34px; }
.hhead .htitle { font-size: 24px; }
.hcol, .hfoot, .homecard {
  background: linear-gradient(180deg, #17120dcc, #0c0d0acc); border: 1.5px solid #b8892f; border-radius: 14px;
  box-shadow: inset 0 0 0 3px #0008, inset 0 0 0 4px #b8892f55, 0 6px 22px #000a; backdrop-filter: blur(3px);
}
.hcol h2, .homecard h2 { font-family: 'Black Han Sans', 'Noto Sans KR', sans-serif; font-weight: 400; color: #ffd76a; letter-spacing: .02em; text-shadow: 0 2px 0 #4a1c00; border-bottom: 1px solid #b8892f66; padding-bottom: 6px; }
.hcol h2 small { color: #d9c79a; font-family: inherit; text-shadow: none; }
.hlist li, .hrooms li { background: #00000066; border: 1px solid #b8892f33; }
.hlist li.me { outline: 2px solid #ffd76acc; background: #3a240a88; }
.hrooms .rname { color: #ffe9a8; }
.hhead button, .hhead a.rulebtn, .hfoot button, .hfame button, .hrooms button, .homecard .row button {
  background: linear-gradient(180deg, #a3262c, #66141a); color: #fff1cf; border: 1.5px solid #d9a441; box-shadow: 0 2px 0 #3a0a0d, 0 4px 10px #0008;
}
.hhead button.secondary, .hfoot button.secondary, .hfame button.secondary, .homecard .row button.secondary { background: linear-gradient(180deg, #3a3326, #1d1a13); color: #f0e2bd; border-color: #8a6a2a; }
.bigstart { background: linear-gradient(180deg, #b32b31, #6c151b); color: #fff1cf; border: 2px solid #e6b450; box-shadow: 0 3px 0 #3a0a0d, 0 8px 20px #000a, inset 0 1px 0 #ffffff33; font-family: 'Black Han Sans', 'Noto Sans KR', sans-serif; font-weight: 400; letter-spacing: .02em; text-shadow: 0 2px 0 #3a0a0d; }
.bigstart.quick { background: linear-gradient(180deg, #ffe58a, #e0a020 55%, #b8760f); color: #3a1800; text-shadow: 0 1px 0 #fff3b8; box-shadow: 0 3px 0 #6b3d00, 0 8px 20px #000a, 0 0 22px #ffb12266, inset 0 1px 0 #fff8; }
.bigstart small { font-family: 'Pretendard', 'Noto Sans KR', sans-serif; letter-spacing: 0; text-shadow: none; }
.hinv { background: #3a1a1288; border-color: #ffd76a; }
.hfame .mine { background: #00000066; border: 1px solid #b8892f55; }
.hfame .mine b { color: #ffd76a; }
.hfoot { border-radius: 12px; }
.homecard input, .hfoot input { background: #0b0d09; color: #fff1cf; border: 1.5px solid #8a6a2a; }
.homecard .hint, .hfame .hint { color: #cdbb8d; }
.hmenu { background: #17120d; border-color: #b8892f; }
@media (max-height: 520px) { .hhead h1 { font-size: 22px; } .hhead .htitle { font-size: 15px; } }
.hallwrap { background: linear-gradient(180deg, #080b08f2 0%, #080b08e0 50%, #080b08f2 100%), #0b1a10 url(splash-bg.webp) center / cover no-repeat; }
.homecard > button { background: linear-gradient(180deg, #ffe58a, #e0a020 55%, #b8760f); color: #3a1800; border: 1.5px solid #fff3b8; font-weight: 800; box-shadow: 0 3px 0 #6b3d00, 0 6px 14px #000a; }
