/* 로그인 버튼·로그인 창·계정 메뉴·안내 메시지 (login.js가 그림). 디자인은 시안/로그인 시안.html 기준.
   어느 페이지(/, /sim/)에 붙여도 겹치지 않게 클래스는 모두 dh- 로 시작하고, 색은 각 페이지 변수가 없으면 대합시 기본색 */
.dh-acct {
  --dh-accent: var(--accent, #1F2A56); --dh-accent-ink: var(--accent-ink, #FFFFFF); --dh-surface: var(--surface, #FFFFFF); --dh-surface-2: var(--surface-2, #EEF1F6);
  --dh-line: var(--line, #E1E5EC); --dh-fg: var(--fg, #141821); --dh-fg-2: var(--fg-2, #5B6475); --dh-fg-3: var(--fg-3, #8A93A3);
  --dh-point: #FFC531; --dh-shadow: var(--shadow, 0 1px 2px rgba(20,28,48,.04), 0 12px 36px rgba(20,28,48,.07));
  --dh-kakao: #FEE500; --dh-kakao-ink: #191919; --dh-naver: #03C75A; --dh-naver-ink: #FFFFFF;
  --dh-font: var(--font, "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif);
  font-family: var(--dh-font);
}
.dh-acct[hidden], .dh-acct [hidden] { display: none !important; }
#dh-account { position: relative; display: flex; align-items: center; }

/* 로그인 버튼 (PC: 글자 버튼 / 휴대폰: 사람 모양 동그라미) */
.dh-login-btn { height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--dh-accent); color: var(--dh-accent-ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dh-login-btn svg { width: 20px; height: 20px; display: none; }
.dh-login-btn:focus-visible, .dh-me-btn:focus-visible { outline: 3px solid var(--dh-point); outline-offset: 2px; }
/* 로그인 후: 이름 버튼 + 펼침 메뉴 */
.dh-me-btn { height: 52px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; background: var(--dh-surface); box-shadow: var(--dh-shadow); color: var(--dh-fg); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.dh-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--dh-accent); color: var(--dh-accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.dh-me-btn .dh-caret { width: 16px; height: 16px; color: var(--dh-fg-3); transition: transform .15s; }
.dh-me-btn[aria-expanded="true"] .dh-caret { transform: rotate(180deg); }
.dh-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px; border-radius: 16px; background: var(--dh-surface); box-shadow: 0 4px 10px rgba(20,28,48,.08), 0 18px 44px rgba(20,28,48,.14); z-index: 20; }
.dh-menu a, .dh-menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--dh-fg); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; text-decoration: none; box-sizing: border-box; }
.dh-menu a:hover, .dh-menu a:focus-visible, .dh-menu button:hover, .dh-menu button:focus-visible { background: var(--dh-surface-2); outline: none; }
.dh-menu svg { width: 18px; height: 18px; color: var(--dh-fg-3); }
.dh-menu hr { border: 0; border-top: 1px solid var(--dh-line); margin: 4px 6px; }

/* 로그인 창: PC는 가운데 창, 휴대폰은 아래에서 올라오는 시트 */
.dh-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10,14,24,.5); display: grid; place-items: center; padding: 20px; animation: dh-fade .18s ease; box-sizing: border-box; }
@keyframes dh-fade { from { opacity: 0; } }
@keyframes dh-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes dh-sheet-up { from { transform: translateY(100%); } }
.dh-sheet { position: relative; width: 100%; max-width: 420px; box-sizing: border-box; background: var(--dh-surface); color: var(--dh-fg); border-radius: 28px; padding: 40px 32px 28px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: dh-rise .22s ease; line-height: 1.6; word-break: keep-all; }
.dh-sheet .dh-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--dh-fg-3); cursor: pointer; display: grid; place-items: center; }
.dh-sheet .dh-x:hover { background: var(--dh-surface-2); color: var(--dh-fg); }
.dh-sheet .dh-x svg { width: 20px; height: 20px; }
.dh-sheet .dh-grip { display: none; }
.dh-sheet .dh-logo { width: 56px; height: 56px; }
.dh-sheet h2 { margin: 14px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--dh-fg); }
.dh-sheet .dh-sub { margin: 6px 0 0; color: var(--dh-fg-2); font-size: 15px; text-wrap: balance; }
.dh-sns { display: grid; gap: 10px; margin-top: 26px; }
/* 카카오·네이버 버튼은 각 회사 로그인 버튼 가이드의 색을 따름 */
.dh-sns button { height: 54px; border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; }
.dh-sns button svg { width: 22px; height: 22px; position: absolute; left: 18px; }
.dh-sns button:focus-visible { outline: 3px solid var(--dh-point); outline-offset: 2px; }
.dh-sns .dh-kakao { background: var(--dh-kakao); color: var(--dh-kakao-ink); }
.dh-sns .dh-naver { background: var(--dh-naver); color: var(--dh-naver-ink); }
.dh-sns button:hover { filter: brightness(.96); }
/* 로그인 상태 유지: 체크 안 하면(기본) 브라우저를 닫으면 로그인이 풀리고, 로그아웃할 때 카카오 계정까지 로그아웃 */
.dh-keep { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--dh-fg-2); cursor: pointer; }
.dh-keep input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--dh-line); background: var(--dh-surface); display: grid; place-items: center; cursor: pointer; }
.dh-keep input::after { content: ""; width: 9px; height: 5px; border: solid transparent; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.dh-keep input:checked { background: var(--dh-accent); border-color: var(--dh-accent); }
.dh-keep input:checked::after { border-color: var(--dh-accent-ink); }
.dh-keep input:focus-visible { outline: 3px solid var(--dh-point); outline-offset: 2px; }
.dh-keep-note { margin: 2px 0 0; font-size: 12px; color: var(--dh-fg-3); }
.dh-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; color: var(--dh-fg-3); font-size: 13px; }
.dh-or::before, .dh-or::after { content: ""; flex: 1; border-top: 1px solid var(--dh-line); }
.dh-browse { border: 0; background: none; color: var(--dh-fg); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px 12px; border-radius: 10px; }
.dh-browse:hover { background: var(--dh-surface-2); }
.dh-browse-note { margin: 0; font-size: 13px; color: var(--dh-fg-3); }
.dh-fine { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--dh-line); font-size: 12px; line-height: 1.6; color: var(--dh-fg-3); }
.dh-fine a { color: var(--dh-fg-2); }
body.dh-locked { overflow: hidden; }

/* 안내 메시지(준비 중, 로그인 실패 등) */
.dh-toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom, 0px)); z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); box-sizing: border-box; padding: 13px 20px; border-radius: 14px; background: #1B2030; color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; text-align: center; word-break: keep-all; }
.dh-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-color-scheme: dark) {
  .dh-acct { --dh-accent-ink: var(--accent-ink, #1F2A56); }
}
@media (max-width: 560px) {
  .dh-login-btn { width: 42px; height: 42px; padding: 0; justify-content: center; background: var(--dh-surface); color: var(--dh-fg); box-shadow: var(--dh-shadow); }
  .dh-login-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dh-login-btn svg { display: block; }
  /* 휴대폰은 이름 없이 동그라미만, 누르면 바로 내 정보 */
  .dh-me-btn { width: 42px; height: 42px; padding: 0; justify-content: center; background: none; box-shadow: none; }
  .dh-me-btn .dh-nm, .dh-me-btn .dh-caret { display: none; }
  .dh-me-btn .dh-avatar { width: 42px; height: 42px; }
  .dh-scrim { place-items: end center; padding: 0; }
  .dh-sheet { max-width: none; border-radius: 26px 26px 0 0; padding: 14px 22px max(22px, env(safe-area-inset-bottom, 0px)); animation: dh-sheet-up .26s cubic-bezier(.2,.8,.2,1); }
  .dh-sheet .dh-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--dh-line); margin: 0 auto 18px; }
  .dh-sheet .dh-x { display: none; }
  .dh-sheet .dh-logo { width: 48px; height: 48px; }
  .dh-sheet h2 { font-size: 21px; margin-top: 10px; }
  .dh-sheet .dh-sub { font-size: 14px; }
  .dh-sns { margin-top: 20px; }
}
