/* 이지 시리즈 공통 프레임: 상단 바, 메뉴바, 세부 설정 줄, 알림, 팝업 */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --line: #d9dee8;
  --text: #1f2633;
  --muted: #6b7486;
  --primary: #2563c9;
  --primary-weak: #e6eefb;
  --accent: #f08a24;
  --danger: #d93a3a;
  --key: #ffffff;
  --key-fn: #e9edf4;
  --radius: 10px;
  --math: "Cambria Math", "STIX Two Math", "Times New Roman", "Nanum Myeongjo", serif;
  --ui: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--ui); color: var(--text); background: var(--bg); font-size: 16px; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }

.ez-app { display: flex; flex-direction: column; height: 100%; }
.ez-top { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px; background: var(--primary); color: #fff; flex: none; }
.ez-top .ez-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ez-top .ez-logo { margin: 0 auto; background: none; border: 0; color: #fff; font-weight: 800; letter-spacing: -.02em; font-size: 18px; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.ez-top .ez-logo:hover { background: rgba(255,255,255,.15); }
.ez-tools { display: flex; gap: 4px; }
.ez-ibtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #fff; justify-content: center; }
.ez-ibtn:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.ez-ibtn.on { background: #fff; color: var(--primary); }
.ez-ibtn svg { width: 20px; height: 20px; flex: none; }
.ez-sub { display: none; align-items: center; gap: 6px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.ez-sub.show { display: flex; }
.ez-sub .sep { width: 2px; align-self: stretch; background: var(--text); opacity: .55; margin: 2px 4px; flex: none; }
.ez-btn { height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; white-space: nowrap; flex: none; }
.ez-btn:hover:not(:disabled) { border-color: var(--primary); }
.ez-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ez-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.ez-sub select, .ez-sub input[type=number] { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; background: #fff; flex: none; }
.ez-sub label { white-space: nowrap; color: var(--muted); font-size: 14px; flex: none; }

.ez-body { flex: 1; display: flex; min-height: 0; position: relative; }
.ez-menu { width: 230px; background: var(--panel); border-right: 1px solid var(--line); flex: none; display: flex; flex-direction: column; }
.ez-menu.hide { display: none; }
.ez-menu header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; font-weight: 800; }
.ez-menu header button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.ez-menu header button:hover { background: var(--bg); }
.ez-menu .item { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; background: none; border-left: 4px solid transparent; }
.ez-menu .item:hover { background: var(--bg); }
.ez-menu .item.sel { background: var(--primary-weak); border-left-color: var(--primary); font-weight: 700; color: var(--primary); }
.ez-menu .group { padding: 12px 16px 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.ez-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

@media (max-width: 820px) {
  .ez-ibtn .lbl { display: none; }
  .ez-ibtn { padding: 0 6px; }
  .ez-top .ez-title { display: none; }
  .ez-top { gap: 2px; padding: 0 4px; }
  .ez-top .ez-logo { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; padding: 6px 4px; font-size: 16px; }
  .ez-tools { gap: 0; flex: none; }
  .ez-ibtn { min-width: 34px; height: 36px; padding: 0 5px; }
  .ez-menu { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; box-shadow: 4px 0 18px rgba(0,0,0,.18); }
}

.ez-themes { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ez-themes button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.ez-themes button.on { box-shadow: 0 0 0 3px var(--text); }
/* 미개발 기능(추후 서비스 예정)은 UI에 노출하지 않는다. 다시 보이려면 이 규칙을 지운다 */
[data-soon] { display: none !important; }
.ez-toast { position: fixed; left: 50%; bottom: 14%; transform: translateX(-50%); background: rgba(25,30,40,.92); color: #fff; padding: 12px 20px; border-radius: 24px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; }
.ez-toast.show { opacity: 1; }
.ez-dim { position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ez-pop { background: #fff; border-radius: 14px; min-width: 280px; max-width: min(560px, 100%); max-height: 100%; overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,.3); }
.ez-pop > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 800; border-bottom: 1px solid var(--line); }
.ez-pop > header button { border: 0; background: none; font-size: 22px; line-height: 1; border-radius: 6px; padding: 2px 6px; }
.ez-pop > .content { padding: 16px; }
.ez-pop > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }

.ez-intro { position: fixed; inset: 0; z-index: 80; background: linear-gradient(160deg, var(--primary), #153d82); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 24px; }
.ez-intro h1 { font-size: clamp(32px, 7vw, 60px); margin: 0; letter-spacing: -.03em; }
.ez-intro .tag { font-size: 18px; opacity: .9; }
.ez-intro .start { height: 54px; padding: 0 44px; border-radius: 27px; border: 0; background: #fff; color: var(--primary); font-weight: 800; font-size: 20px; }
.ez-intro .foot { position: absolute; bottom: 24px; left: 0; right: 0; opacity: .85; font-size: 14px; padding: 0 16px; }

/* 누를 수 없는 프로그램 이름(프로그램 정보 팝업 삭제) */
.ez-top span.ez-logo, .ez-top span.ez-logo:hover { background: none; cursor: default; }
