/* ===== Base ===== */
:root{
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
  
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
  
    --danger-bg: #fff1f2;
    --danger-text: #b91c1c;
    --danger-line: #fecdd3;
  
    --radius: 16px;
    --shadow: 0 12px 30px rgba(0,0,0,0.10);
  }
  
  /* hidden helper */
  .hidden{ display:none !important; }
  
  *{ box-sizing:border-box; }
  html, body{ height:100%; }
  body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 500px at 20% 0%, #eef2ff 0%, transparent 55%),
                radial-gradient(1000px 600px at 80% 10%, #e0f2fe 0%, transparent 55%),
                var(--bg);
  }
  
  /* ===== Layout ===== */
  .wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px 16px;
  }
  
  .card{
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px 18px;
  }
  
  /* ===== Titles ===== */
  .card h1{
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: -0.2px;
  }
  .card .sub{
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.35;
  }
  
  /* ===== Form ===== */
  .field{
    margin: 12px 0;
  }
  .field label{
    display:block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .field input{
    width:100%;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    outline: none;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .field input:focus{
    border-color: rgba(37,99,235,0.55);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  }
  
  /* ===== Rows / Buttons ===== */
  .row{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap: wrap;
    margin-top: 14px;
  }
  
  button{
    appearance:none;
    border:1px solid var(--line);
    background:#fff;
    color: var(--text);
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
    cursor:pointer;
    transition: transform .05s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  }
  button:active{ transform: translateY(1px); }
  button:disabled{ opacity:.6; cursor:not-allowed; }
  
  button.primary{
    background: var(--primary);
    border-color: var(--primary);
    color:#fff;
  }
  button.primary:hover{ background: var(--primary-hover); border-color: var(--primary-hover); }
  
  .btn.btn--ghost{
    background: transparent;
    border-color: var(--line);
    color: var(--text);
  }
  .btn.btn--ghost:hover{
    background: #f3f4f6;
  }
  
  /* 로그인 버튼은 가로로 넓게 */
  #btnLogin{
    width: 100%;
  }
  
  /* 메뉴 선택 버튼은 2~3개가 깔끔히 배치되도록 */
  #choiceBox .row button{
    flex: 1 1 30%;
    min-width: 120px;
  }
  
  /* ===== Error Message ===== */
  .msg{
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--danger-line);
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 13px;
    line-height: 1.35;
  }
  
  /* ===== Choice Box (로그인 성공/세션 유지 시 메뉴 영역) ===== */
  .choice{
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
  }
  
  .choice p{
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text);
  }
  .choice p b{
    font-weight: 800;
  }
  
  /* 메뉴 영역을 패널처럼 보이게(첨부 이미지처럼 분리감) */
  #choiceBox{
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 14px 12px;
  }
  
  /* ===== Responsive ===== */
  @media (max-width: 420px){
    .card{ padding: 18px 16px 14px; }
    .card h1{ font-size: 20px; }
    #choiceBox .row button{ flex: 1 1 100%; min-width: 0; }
    
  }


  /* 모달 공통 */
.modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}
.modal-backdrop.show{ display:flex; }

.modal{
    width: min(560px, 100%);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
.modal-title{ font-weight: 900; }
.icon-btn{
    border:0;
    background: transparent;
    cursor:pointer;
    font-size: 16px;
}
.modal-body{ padding: 16px; }
.modal-footer{
    display:flex;
    justify-content:flex-end;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #eee;
}
  