  :root{
    --ink:#0D1526; --ink-soft:#16233F; --gold:#FFB300; --gold-deep:#E89B00; --gold-bg:#FFF6E0;
    --paper:#F4F5F8; --card:#FFFFFF; --line:#E4E7EE;
    --txt:#1A1C20; --txt-sub:#6E7480;
    --red:#FF4D4D; --green:#12B76A; --blue:#2E5BDA;
    --r-lg:18px; --r-md:12px; --r-sm:8px;
    --shadow:0 4px 16px rgba(13,21,38,.07);
  }
  *{ box-sizing:border-box; margin:0; padding:0; }
  html,body{ min-height:100%; }
  body{
    font-family:'Pretendard Variable',Pretendard,-apple-system,'Apple SD Gothic Neo',sans-serif;
    background:var(--paper); color:var(--txt); letter-spacing:-0.01em;
  }
  button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
  input{ font-family:inherit; }
  .hidden{ display:none !important; }
  .li-ic{ stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }

  /* ══ 로그인 / 안내 ══ */
  .login-wrap{
    min-height:100dvh; background:var(--ink);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:calc(24px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
  }
  .logo{ text-align:center; color:#fff; margin-bottom:34px; }
  .logo .l1{ font-size:17px; font-weight:700; opacity:.85; }
  .logo .l2{ font-size:40px; font-weight:800; color:var(--gold); letter-spacing:10px; margin-top:4px; text-indent:10px; }
  .logo .l3{ font-size:13px; color:#8B93A5; margin-top:10px; font-weight:500; }
  .login-card{ width:100%; max-width:380px; background:#fff; border-radius:20px; padding:28px 24px; box-shadow:0 10px 40px rgba(0,0,0,.35); }
  .btn{ display:flex; align-items:center; justify-content:center; gap:9px; width:100%; height:52px;
    border-radius:14px; font-size:15.5px; font-weight:700; transition:transform .08s; }
  .btn:active{ transform:scale(.97); }
  .btn-google{ background:#fff; color:var(--txt); border:1.5px solid var(--line); }
  .btn-dark{ background:var(--ink); color:#fff; margin-top:10px; }
  .btn-gold{ background:var(--gold); color:var(--ink); margin-top:14px; }
  .email-area{ display:none; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
  .email-area.show{ display:block; }
  .email-area label{ display:block; font-size:12.5px; font-weight:700; color:var(--txt-sub); margin:10px 2px 5px; }
  .email-area input{ width:100%; height:48px; border:1.5px solid var(--line); border-radius:12px; padding:0 14px; font-size:15px; background:var(--paper); }
  .email-area input:focus{ outline:none; border-color:var(--ink); background:#fff; }
  .aux{ display:flex; justify-content:space-between; margin-top:14px; }
  .aux button{ font-size:13px; color:var(--txt-sub); font-weight:600; }
  .msg{ margin-top:12px; font-size:13.5px; font-weight:600; text-align:center; min-height:18px; line-height:1.5; }
  .msg.err{ color:#D6455D; } .msg.ok{ color:#1D8A5F; }
  .contact{ margin-top:22px; font-size:13px; color:#8B93A5; text-align:center; line-height:1.6; }
  .contact b{ color:#B9C0CE; font-weight:700; }
  .notice-wrap{ min-height:100dvh; background:var(--ink); display:flex; align-items:center; justify-content:center;
    padding:calc(24px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom)); }
  .notice-card{ width:100%; max-width:380px; background:#fff; border-radius:20px; padding:34px 26px; text-align:center; }
  .notice-card .ic{ color:var(--gold); margin-bottom:14px; }
  .notice-card h2{ font-size:19px; font-weight:800; margin-bottom:10px; }
  .notice-card p{ font-size:14px; color:var(--txt-sub); line-height:1.65; }
  .notice-card .btn{ margin-top:22px; }

  /* ══ 앱 셸 ══ */
  .shell{ min-height:100dvh; display:flex; flex-direction:column; background:var(--paper); }
  .shell-main{ flex:1; width:100%; max-width:760px; margin:0 auto; padding-bottom:86px; }
  /* 하단 탭바 */
  .tabbar{ position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--line);
    display:flex; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); z-index:50; }
  .tabbar .tabin{ display:flex; width:100%; max-width:760px; margin:0 auto; }
  .tab{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 0;
    color:#9AA3B8; font-size:10.5px; font-weight:600; }
  .tab svg{ width:23px; height:23px; stroke:#9AA3B8; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .tab.on{ color:var(--ink); font-weight:800; }
  .tab.on svg{ stroke:var(--ink); }

  /* ══ 홈 ══ */
  .m-top{ background:var(--ink); color:#fff; padding:calc(18px + env(safe-area-inset-top)) 20px 22px; }
  .m-top-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
  .m-logo{ display:flex; align-items:baseline; gap:6px; }
  .m-logo b{ font-size:17px; font-weight:800; }
  .m-logo span{ font-size:10px; font-weight:700; color:var(--gold); letter-spacing:.12em; }
  .m-out{ display:flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:#fff;
    background:rgba(255,255,255,.12); padding:7px 12px; border-radius:10px; }
  .m-out svg{ width:14px; height:14px; }
  .m-greet{ font-size:19px; font-weight:800; line-height:1.4; letter-spacing:-0.02em; }
  .m-greet em{ font-style:normal; color:var(--gold); }
  .m-greet small{ display:block; font-size:12.5px; font-weight:500; color:rgba(255,255,255,.55); margin-top:4px; }
  /* 이어보기 */
  .continue-card{ margin:14px 16px 0; background:linear-gradient(135deg,#1A2A4A,#101B33);
    border:1px solid rgba(255,255,255,.1); border-radius:18px; padding:16px; color:#fff;
    box-shadow:0 12px 28px rgba(13,21,38,.3); cursor:pointer; }
  .cc-top{ display:flex; gap:12px; align-items:center; margin-bottom:12px; }
  .cc-thumb{ width:104px; aspect-ratio:16/10; border-radius:10px; flex-shrink:0; position:relative;
    display:flex; align-items:flex-end; padding:8px; overflow:hidden; }
  .cc-thumb .deco{ position:absolute; right:-6px; top:-10px; font-size:44px; font-weight:900; color:rgba(255,255,255,.07); }
  .cc-thumb .nm{ font-size:11px; font-weight:800; line-height:1.3; position:relative; }
  .cc-play{ position:absolute; left:50%; top:40%; transform:translate(-50%,-50%); width:30px; height:30px;
    border-radius:99px; background:var(--gold); display:flex; align-items:center; justify-content:center;
    box-shadow:0 4px 12px rgba(255,179,0,.45); }
  .cc-info{ flex:1; min-width:0; }
  .cc-eyebrow{ font-size:10px; font-weight:800; color:var(--gold); letter-spacing:.1em; margin-bottom:5px; }
  .cc-info h3{ font-size:14.5px; font-weight:800; line-height:1.35; letter-spacing:-0.02em; margin-bottom:4px; }
  .cc-info .meta{ font-size:11.5px; color:rgba(255,255,255,.5); }
  .cc-bar{ height:5px; border-radius:99px; background:rgba(255,255,255,.14); overflow:hidden; margin-bottom:6px; }
  .cc-bar i{ display:block; height:100%; background:var(--gold); border-radius:99px; }
  .cc-foot{ display:flex; justify-content:space-between; font-size:11px; color:rgba(255,255,255,.5); }
  .cc-foot b{ color:var(--gold); }

  .m-body{ padding:26px 0 16px; }
  .m-section{ margin-bottom:26px; }
  .m-sec-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding:0 16px; }
  .m-sec-head h2{ font-size:16.5px; font-weight:800; letter-spacing:-0.02em; }
  .m-sec-head a, .m-sec-head button{ font-size:12px; font-weight:600; color:var(--txt-sub); text-decoration:none; }
  /* 검색 */
  .m-mock-search{ margin:0 16px 12px; display:flex; align-items:center; gap:9px; background:#fff;
    border:1.5px solid var(--line); border-radius:12px; padding:0 14px; }
  .m-mock-search svg{ width:15px; height:15px; stroke:#A6ADC0; flex-shrink:0; }
  .m-mock-search input{ flex:1; border:none; outline:none; font-size:13.5px; padding:12px 0; background:transparent; }
  .m-mock-search input::placeholder{ color:#A6ADC0; }
  /* 학년 필터 탭 */
  .g-tabs{ display:flex; gap:7px; padding:0 16px; margin-bottom:14px; }
  .g-tab{ font-size:12.5px; font-weight:700; color:var(--txt-sub); background:#fff; border:1.5px solid var(--line);
    padding:7px 14px; border-radius:99px; }
  .g-tab.on{ background:var(--ink); color:#fff; border-color:var(--ink); font-weight:800; }
  /* 가로 스크롤 + 문항 카드 */
  .h-scroll{ display:flex; gap:12px; overflow-x:auto; padding:2px 16px 8px; scrollbar-width:none; }
  .h-scroll::-webkit-scrollbar{ display:none; }
  .prob-m{ flex:0 0 168px; background:var(--ink); border-radius:14px; padding:15px; color:#fff;
    position:relative; overflow:hidden; cursor:pointer; text-align:left; }
  .prob-m::after{ content:""; position:absolute; right:-24px; bottom:-40px; width:100px; height:100px;
    border-radius:50%; background:radial-gradient(circle,rgba(255,179,0,.13),transparent 70%); }
  .prob-m .pr-round{ font-size:9.5px; font-weight:800; color:var(--gold); letter-spacing:.08em; }
  .prob-m .pr-no{ font-size:30px; font-weight:900; letter-spacing:-0.04em; line-height:1.15; margin:3px 0 1px; }
  .prob-m .pr-no small{ font-size:12px; font-weight:700; color:rgba(255,255,255,.5); margin-left:2px; }
  .prob-m .pr-unit{ font-size:10px; color:rgba(255,255,255,.55); margin-bottom:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .prob-m .pr-foot{ display:flex; justify-content:space-between; align-items:center; position:relative; z-index:1; }
  .prob-m .pr-dur{ font-size:9.5px; font-weight:700; color:rgba(255,255,255,.5); }
  .pr-done{ font-size:9px; font-weight:800; color:var(--green); background:rgba(18,183,106,.15); padding:2px 7px; border-radius:4px; }
  .pr-ing{ font-size:9px; font-weight:800; color:var(--gold); background:rgba(255,179,0,.15); padding:2px 7px; border-radius:4px; }
  /* 그리드(강의실 전체 목록) */
  .prob-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; padding:0 16px; }
  @media (min-width:560px){ .prob-grid{ grid-template-columns:repeat(3,1fr); } }
  @media (min-width:760px){ .prob-grid{ grid-template-columns:repeat(4,1fr); } }
  .prob-grid .prob-m{ flex:none; width:100%; }
  .list-empty{ padding:40px 16px; text-align:center; color:var(--txt-sub); font-size:13.5px; line-height:1.7; }
  .list-empty b{ display:block; font-size:15px; color:var(--txt); font-weight:800; margin-bottom:6px; }
  .loading{ padding:60px 0; text-align:center; color:var(--txt-sub); font-size:13px; }

  /* 페이지 헤더(강의실) */
  .page-top{ background:var(--ink); color:#fff; padding:calc(16px + env(safe-area-inset-top)) 20px 18px; margin-bottom:16px; }
  .page-top h1{ font-size:19px; font-weight:800; letter-spacing:-0.02em; }
  .page-top p{ font-size:12px; color:rgba(255,255,255,.55); margin-top:4px; }

  /* ══ 시청 화면 ══ */
  .watch{ min-height:100dvh; background:#0A101E; color:#fff; display:flex; flex-direction:column; }
  .w-top{ display:flex; align-items:center; gap:10px; padding:calc(10px + env(safe-area-inset-top)) 14px 10px; }
  .w-back{ width:36px; height:36px; border-radius:99px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.08); flex-shrink:0; }
  .w-back svg{ width:18px; height:18px; stroke:#fff; }
  .w-top h1{ font-size:14px; font-weight:700; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .w-player-wrap{ width:100%; max-width:960px; margin:0 auto; }
  .w-player{ position:relative; width:100%; aspect-ratio:16/9; background:#000; }
  .w-player iframe{ position:absolute; inset:0; width:100%; height:100%; }
  /* 커스텀 컨트롤 */
  .w-ctrl{ background:#0A101E; padding:8px 14px 6px; max-width:960px; margin:0 auto; width:100%; }
  .w-seek{ width:100%; height:22px; display:flex; align-items:center; cursor:pointer; }
  .w-seek .track{ position:relative; width:100%; height:5px; border-radius:99px; background:rgba(255,255,255,.15); }
  .w-seek .fill{ position:absolute; left:0; top:0; height:100%; border-radius:99px; background:var(--gold); width:0%; }
  .w-seek .knob{ position:absolute; top:50%; transform:translate(-50%,-50%); width:13px; height:13px; border-radius:99px; background:var(--gold); left:0%; box-shadow:0 1px 4px rgba(0,0,0,.5); }
  .w-btns{ display:flex; align-items:center; gap:14px; padding:4px 0 6px; }
  .w-btns .wb{ display:flex; align-items:center; justify-content:center; color:#fff; }
  .w-btns .wb svg{ width:22px; height:22px; }
  .w-time{ font-size:11.5px; color:rgba(255,255,255,.6); font-weight:600; font-variant-numeric:tabular-nums; }
  .w-spacer{ flex:1; }
  .w-speed{ font-size:12px; font-weight:800; color:#fff; background:rgba(255,255,255,.12); padding:5px 10px; border-radius:8px; }
  .w-speed.max{ color:var(--gold); }
  /* 정보 카드 */
  .w-info{ background:var(--paper); color:var(--txt); flex:1; padding:18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .w-info-in{ max-width:960px; margin:0 auto; }
  .w-chips{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
  .w-chip{ font-size:11px; font-weight:800; padding:4px 10px; border-radius:6px; background:var(--gold-bg); color:var(--gold-deep); }
  .w-chip.gray{ background:#EBEDF2; color:var(--txt-sub); }
  .w-info h2{ font-size:17px; font-weight:800; letter-spacing:-0.02em; line-height:1.4; }
  .w-info .memo{ margin-top:10px; font-size:13.5px; color:var(--txt-sub); line-height:1.65; }
  .w-prog-line{ margin-top:14px; display:flex; align-items:center; gap:10px; font-size:12px; color:var(--txt-sub); font-weight:600; }
  .w-prog-line .bar{ flex:1; height:6px; border-radius:99px; background:#E4E7EE; overflow:hidden; }
  .w-prog-line .bar i{ display:block; height:100%; background:var(--gold); border-radius:99px; }
  .w-prog-line b{ color:var(--gold-deep); font-variant-numeric:tabular-nums; }

  /* 강좌 카드 (목업 m-lec) */
  .m-lec{ flex:0 0 158px; background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 3px 12px rgba(13,21,38,.06); cursor:pointer; text-align:left; }
  .m-thumb{ aspect-ratio:16/10; position:relative; display:flex; flex-direction:column; justify-content:flex-end; padding:9px; color:#fff; overflow:hidden; }
  .m-thumb .deco{ position:absolute; right:-6px; top:-12px; font-size:42px; font-weight:900; color:rgba(255,255,255,.09); line-height:1; }
  .m-thumb .unit{ font-size:8.5px; font-weight:700; letter-spacing:.06em; opacity:.85; }
  .m-thumb .name{ font-size:12px; font-weight:800; letter-spacing:-0.02em; line-height:1.25; }
  .m-lec-body{ padding:9px 11px 12px; }
  .m-lec-body h4{ font-size:12px; font-weight:700; line-height:1.35; letter-spacing:-0.02em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:32px; }
  .m-lec-body .mt{ font-size:10.5px; color:var(--txt-sub); margin-top:4px; }
  /* 선생님이 보낸 코스 (목업 pl-card) */
  .pl-card{ background:var(--ink); border-radius:16px; padding:16px; color:#fff; position:relative; overflow:hidden; margin:0 16px 9px; cursor:pointer; }
  .pl-card::after{ content:""; position:absolute; right:-30px; top:-40px; width:140px; height:140px; border-radius:50%; background:radial-gradient(circle,rgba(255,179,0,.16),transparent 70%); }
  .pl-from{ display:inline-flex; align-items:center; gap:5px; font-size:10px; font-weight:800; color:var(--gold); letter-spacing:.08em; margin-bottom:8px; }
  .pl-card h3{ font-size:15.5px; font-weight:800; letter-spacing:-0.02em; margin-bottom:4px; position:relative; z-index:1; }
  .pl-card .pl-meta{ font-size:11.5px; color:rgba(255,255,255,.5); margin-bottom:12px; }
  .pl-bot{ display:flex; align-items:center; gap:10px; position:relative; z-index:1; }
  .pl-bar{ flex:1; height:5px; border-radius:99px; background:rgba(255,255,255,.14); overflow:hidden; }
  .pl-bar i{ display:block; height:100%; background:var(--gold); border-radius:99px; }
  .pl-pct{ font-size:11px; font-weight:800; color:var(--gold); }
  /* 강좌/코스 상세 행 */
  .crsv-row{ display:flex; align-items:center; gap:12px; background:#fff; border-radius:14px; box-shadow:var(--shadow); padding:14px; margin-bottom:10px; cursor:pointer; width:100%; text-align:left; }
  .crsv-round{ flex-shrink:0; min-width:44px; height:32px; border-radius:9px; background:var(--paper); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; color:var(--txt-sub); padding:0 8px; }
  .crsv-row.done .crsv-round{ background:#E6F7EF; color:#0E9C5C; }
  .crsv-tx{ flex:1; min-width:0; }
  .crsv-tx b{ font-size:14px; font-weight:700; letter-spacing:-0.02em; display:block; line-height:1.35; }
  .crsv-tx small{ font-size:11.5px; color:var(--txt-sub); }
  .crsv-st{ flex-shrink:0; font-size:11px; font-weight:800; }
  .crsv-st.done{ color:#0E9C5C; } .crsv-st.ing{ color:var(--gold-deep); } .crsv-st.no{ color:#B6BDCB; }

  /* 비밀코드 오버레이/현황/키패드 */
  .code-overlay{ position:absolute; top:10px; right:10px; z-index:5; background:rgba(13,21,38,.92);
    border:1.5px solid var(--gold); border-radius:14px; padding:12px 16px; color:#fff; text-align:center;
    box-shadow:0 8px 24px rgba(0,0,0,.5); }
  .co-label{ font-size:10px; font-weight:800; color:var(--gold); letter-spacing:.14em; }
  .co-code{ font-size:34px; font-weight:900; letter-spacing:.14em; margin:2px 0; font-variant-numeric:tabular-nums; }
  .co-foot{ font-size:11px; color:rgba(255,255,255,.65); font-weight:600; }
  .co-foot button{ margin-left:8px; background:var(--gold); color:var(--ink); font-size:11px; font-weight:800; padding:4px 10px; border-radius:7px; }
  .code-bar{ max-width:960px; margin:0 auto; width:100%; padding:9px 14px; display:flex; align-items:center; gap:10px;
    background:#101A2E; border-top:1px solid rgba(255,255,255,.07); }
  .cb-label{ font-size:10.5px; font-weight:800; color:var(--gold); letter-spacing:.1em; }
  .cb-chip{ display:inline-flex; align-items:center; justify-content:center; min-width:52px; height:28px;
    border-radius:8px; font-size:13px; font-weight:800; letter-spacing:.08em; margin-right:6px;
    background:rgba(255,255,255,.08); color:rgba(255,255,255,.4); font-variant-numeric:tabular-nums; }
  .cb-chip.got{ background:rgba(18,183,106,.18); color:#3BD68F; }
  .cb-chip.wait{ background:rgba(255,179,0,.15); color:var(--gold); cursor:pointer; }
  .cb-hint{ font-size:11px; color:rgba(255,255,255,.55); font-weight:600; margin-left:auto; }
  .cp-display{ display:flex; justify-content:center; gap:8px; margin:14px 0 12px; min-height:44px; }
  .cp-display i{ width:38px; height:44px; border-radius:10px; background:var(--paper); border:1.5px solid var(--line);
    font-style:normal; font-size:22px; font-weight:900; display:flex; align-items:center; justify-content:center; }
  .cp-display i.on{ border-color:var(--ink); background:#fff; }
  .cp-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
  .cp-grid button{ height:50px; border-radius:11px; background:var(--paper); font-size:18px; font-weight:800; }
  .cp-grid button:active{ transform:scale(.96); }
  .cp-grid button.dim{ color:var(--txt-sub); font-size:14px; }
  /* 과제 카드 */
  .shw-card{ background:#fff; border-radius:16px; box-shadow:var(--shadow); padding:16px; margin-bottom:12px; cursor:pointer; }
  .shw-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px; }
  .shw-top h3{ font-size:15px; font-weight:800; letter-spacing:-0.02em; line-height:1.35; }
  .shw-dday{ font-size:12px; font-weight:800; color:var(--red); flex-shrink:0; }
  .shw-dday.ok{ color:var(--txt-sub); }
  .shw-meta{ font-size:12px; color:var(--txt-sub); margin-bottom:10px; }
  .shw-status{ display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; }
  .shw-status .bar{ flex:1; height:6px; border-radius:99px; background:#E4E7EE; overflow:hidden; }
  .shw-status .bar i{ display:block; height:100%; background:var(--gold); border-radius:99px; }
  .shw-badge{ font-size:11px; font-weight:800; padding:4px 10px; border-radius:6px; }
  .shw-badge.done{ background:#E6F7EF; color:#0E9C5C; }
  .shw-badge.manual{ background:#E8F0FF; color:var(--blue); }
  .shw-badge.ing{ background:var(--gold-bg); color:var(--gold-deep); }
  .shw-badge.no{ background:#EBEDF2; color:var(--txt-sub); }

  /* 토스트 */
  .toast{ position:fixed; left:50%; bottom:calc(96px + env(safe-area-inset-bottom)); transform:translateX(-50%);
    background:rgba(13,21,38,.94); color:#fff; font-size:13px; font-weight:600; padding:11px 18px;
    border-radius:12px; z-index:99; opacity:0; transition:opacity .25s; pointer-events:none; white-space:nowrap; }
  .toast.show{ opacity:1; }

  /* 썸네일 그라디언트 */
  .t-navy{ background:linear-gradient(140deg,#2A3F6E,#131E38); }
  .t-blue{ background:linear-gradient(140deg,#1E4FA0,#0F2450); }
  .t-plum{ background:linear-gradient(140deg,#5B3A8E,#241540); }
  .t-teal{ background:linear-gradient(140deg,#0F6E6E,#0A2E33); }
  .t-rust{ background:linear-gradient(140deg,#A6522A,#3D1B0E); }
  .t-slate{ background:linear-gradient(140deg,#44506B,#1A2233); }

  /* 관리자 뼈대 */
  .app-empty{ text-align:center; color:var(--txt-sub); padding:80px 20px; }
  .app-empty .ic{ color:#C7CDD8; margin-bottom:12px; }
  .app-empty h3{ font-size:17px; font-weight:800; color:var(--txt); margin-bottom:8px; }
  .app-empty p{ font-size:14px; line-height:1.6; }
  .rolebadge{ display:inline-block; margin-top:14px; padding:6px 14px; border-radius:999px; background:var(--ink); color:var(--gold); font-size:12.5px; font-weight:800; letter-spacing:.5px; }
  .topbar{ background:var(--ink); color:#fff; padding:calc(14px + env(safe-area-inset-top)) 18px 14px;
    display:flex; align-items:center; justify-content:space-between; }
  .topbar .tlogo{ font-size:16px; font-weight:800; }
  .topbar .tlogo span{ color:var(--gold); letter-spacing:4px; margin-left:5px; }
  .topbar .tuser{ display:flex; align-items:center; gap:12px; font-size:13px; color:#B9C0CE; font-weight:600; }
  .topbar .tuser button{ color:#fff; display:flex; align-items:center; gap:5px; font-size:13px; font-weight:700; background:rgba(255,255,255,.12); padding:7px 12px; border-radius:10px; }

  /* ══ 관리자 ══ */
  /* ── 관리자 사이드바 셸 ── */
  .admin-shell{ min-height:100dvh; background:var(--paper); display:flex; }
  .admin-side{ width:236px; flex-shrink:0; background:#fff; border-right:1px solid var(--line);
    display:flex; flex-direction:column; position:sticky; top:0; height:100dvh; }
  .side-logo{ padding:20px 20px 14px; font-size:16px; font-weight:800; color:var(--ink); line-height:1.4; }
  .side-logo span{ display:block; font-size:11px; font-weight:700; color:var(--gold-deep); letter-spacing:.1em; margin-top:2px; }
  .side-nav{ flex:1; overflow-y:auto; padding:6px 12px; }
  .side-grp{ font-size:10.5px; font-weight:800; color:var(--gray2); letter-spacing:.08em; padding:14px 8px 6px; }
  .side-item{ display:flex; align-items:center; justify-content:space-between; width:100%; text-align:left;
    padding:10px 12px; border-radius:10px; font-size:13.5px; font-weight:700; color:var(--txt); margin-bottom:2px; }
  .side-item:hover{ background:var(--paper); }
  .side-item.on{ background:var(--ink); color:#fff; }
  .side-bdg{ min-width:20px; height:20px; padding:0 6px; border-radius:99px; background:var(--red); color:#fff;
    font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; }
  .side-item.on .side-bdg{ background:var(--gold); color:var(--ink); }
  .side-foot{ border-top:1px solid var(--line); padding:12px; }
  .side-user{ font-size:12px; color:var(--txt-sub); font-weight:700; padding:4px 8px 10px; }
  .side-foot button{ display:block; width:100%; text-align:left; padding:9px 12px; border-radius:9px;
    font-size:13px; font-weight:700; color:var(--txt-sub); }
  .side-foot button:hover{ background:var(--paper); color:var(--txt); }
  .admin-main{ flex:1; min-width:0; }
  .side-toggle{ display:none; align-items:center; gap:6px; margin:12px 0 0 16px; padding:8px 14px;
    background:var(--ink); color:#fff; border-radius:10px; font-size:13px; font-weight:700; }
  .side-backdrop{ display:none; }
  @media (max-width:820px){
    .admin-side{ position:fixed; left:0; top:0; z-index:60; transform:translateX(-100%); transition:transform .22s; box-shadow:0 0 40px rgba(0,0,0,.2); }
    .admin-shell.side-open .admin-side{ transform:translateX(0); }
    .admin-shell.side-open .side-backdrop{ display:block; position:fixed; inset:0; background:rgba(13,21,38,.4); z-index:55; }
    .side-toggle{ display:inline-flex; }
  }
  /* ── 대시보드 ── */
  .dash-hero{ padding:8px 2px 4px; }
  .dash-hero h1{ font-size:21px; font-weight:800; letter-spacing:-0.02em; }
  .dash-hero p{ font-size:13.5px; color:var(--txt-sub); margin-top:5px; }
  .dash-todo{ display:flex; flex-direction:column; gap:9px; margin:16px 0; }
  .todo-card{ display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--line);
    border-radius:14px; padding:15px 16px; cursor:pointer; transition:transform .08s; }
  .todo-card:active{ transform:scale(.99); }
  .todo-card.warn{ background:#FFF6E9; border-color:#F5D9A8; }
  .todo-ic{ width:38px; height:38px; border-radius:11px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
    background:var(--sky-bg,#EAF1FB); color:var(--blue); }
  .todo-card.warn .todo-ic{ background:#FCE9CC; color:var(--gold-deep); }
  .todo-tx{ flex:1; min-width:0; }
  .todo-tx b{ font-size:14.5px; font-weight:800; display:block; }
  .todo-tx small{ font-size:12px; color:var(--txt-sub); }
  .todo-n{ font-size:20px; font-weight:900; color:var(--ink); flex-shrink:0; }
  .todo-card.warn .todo-n{ color:var(--gold-deep); }
  .dash-empty{ text-align:center; color:var(--green); font-size:13.5px; font-weight:700; padding:24px; background:#EAF7F0; border-radius:14px; }
  .dash-kpi{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px; }
  .kpi{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; }
  .kpi .kn{ font-size:26px; font-weight:900; letter-spacing:-0.02em; }
  .kpi .kl{ font-size:12px; color:var(--txt-sub); font-weight:700; margin-top:3px; }
  .dash-quick{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
  .dash-quick button{ text-align:left; background:var(--ink); color:#fff; border-radius:14px; padding:15px 16px; }
  .dash-quick button b{ font-size:14.5px; font-weight:800; display:block; }
  .dash-quick button small{ font-size:11.5px; color:rgba(255,255,255,.55); }
  @media (max-width:560px){ .dash-kpi{ grid-template-columns:repeat(3,1fr); } .dash-quick{ grid-template-columns:1fr; } }

  /* ── 대상 지정 컴포넌트 ── */
  .tp{ border:1.5px solid var(--line); border-radius:12px; padding:14px; background:var(--paper); }
  .tp-sec{ margin-bottom:12px; }
  .tp-sec:last-child{ margin-bottom:0; }
  .tp-lbl{ font-size:11.5px; font-weight:800; color:var(--txt-sub); margin-bottom:6px; }
  .tp-row{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-bottom:5px; }
  .tp-row .band{ font-size:11px; font-weight:800; color:var(--gray2); width:34px; flex-shrink:0; }
  .tp-btn{ font-size:12.5px; font-weight:700; color:var(--txt-sub); background:#fff; border:1.5px solid var(--line); padding:6px 12px; border-radius:99px; }
  .tp-btn.on{ background:var(--ink); color:#fff; border-color:var(--ink); }
  .tp-btn.all{ color:var(--gold-deep); border-color:#F0D8A0; }
  .tp-btn.all.on{ background:var(--gold-deep); color:#fff; border-color:var(--gold-deep); }
  .tp-clear{ font-size:12px; font-weight:700; color:var(--red); background:none; padding:6px 4px; }
  .tp-classes{ max-height:180px; overflow-y:auto; border:1px solid var(--line); border-radius:10px; background:#fff; padding:6px; }
  .tp-cls{ display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:8px; font-size:13px; cursor:pointer; }
  .tp-cls:hover{ background:var(--paper); }
  .tp-cls input{ width:16px; height:16px; flex-shrink:0; }
  .tp-mix{ font-size:9.5px; font-weight:800; color:#7C3AED; background:#F1EAFE; padding:2px 6px; border-radius:5px; margin-left:auto; flex-shrink:0; }
  .tp-filt{ display:flex; gap:8px; margin-bottom:8px; }
  .tp-filt select{ flex:1; min-width:0; height:40px; border:1.5px solid var(--line); border-radius:9px; font-size:13.5px; padding:0 12px; background:#fff; font-family:inherit; color:var(--txt); }
  .tp-filt select:focus{ outline:none; border-color:var(--ink); }
  @media (max-width:520px){ .tp-filt{ flex-wrap:wrap; } .tp-filt select{ flex:1 1 100%; } }
  .tp-stu-res{ margin-top:6px; }
  .tp-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
  .tp-sum{ margin-top:12px; padding:11px 13px; background:#fff; border:1.5px solid var(--ink); border-radius:10px; font-size:13px; font-weight:700; }
  .tp-sum b{ color:var(--ink); font-size:15px; }
  .tp-sum .sub{ font-size:11.5px; color:var(--txt-sub); font-weight:600; margin-top:3px; }
  .tp-sum .auto{ font-size:11px; color:var(--gold-deep); font-weight:700; margin-top:4px; }
  .tp-warn{ margin-top:8px; padding:9px 12px; background:#FFF6E9; border:1px solid #F5D9A8; border-radius:9px; font-size:12px; font-weight:700; color:var(--gold-deep); }

  /* ── 유튜브 자동 인식 등록 행 ── */
  .yt-row{ display:flex; align-items:center; gap:9px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:9px 11px; margin-bottom:6px; }
  .yt-thumb{ width:56px; height:32px; border-radius:6px; object-fit:cover; flex-shrink:0; background:var(--paper); }
  .yt-tin{ flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:7px 10px; font-size:13px; font-family:inherit; }
  .yt-tin:focus{ outline:none; border-color:var(--ink); }
  .yt-bdg{ font-size:10px; font-weight:800; padding:3px 8px; border-radius:5px; flex-shrink:0; }
  .yt-bdg.auto{ background:#E7F8F0; color:#0E9F63; }
  .yt-bdg.manual{ background:#E8F0FF; color:var(--blue); }
  .yt-bdg.err{ background:#FDEBEB; color:var(--red); }
  .yt-dur{ font-size:11.5px; color:var(--txt-sub); font-weight:600; flex-shrink:0; min-width:42px; text-align:right; }

  /* ── 강좌 단원 그룹핑 ── */
  .crs-uhead td{ background:#F1F4F8 !important; padding:7px 12px !important; border-top:1px solid #E0E4EC; }
  .crs-uhead.un td{ background:#FFF6E9 !important; border-top:1px solid #F5DFA3; }
  .crs-uno{ display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px;
    background:var(--ink); color:#fff; font-size:10px; font-weight:800; border-radius:4px; margin-right:8px; }
  .crs-uhead.un .crs-uno{ background:var(--gold-deep); }
  .crs-unm{ font-size:12.5px; font-weight:800; letter-spacing:-0.02em; }
  .crs-uhead.un .crs-unm{ color:#8A6A1F; }
  .crs-ucnt{ font-size:10px; font-weight:700; color:var(--txt-sub); background:#fff; padding:1px 7px; border-radius:99px; border:1px solid var(--line); margin-left:8px; }
  .crs-utime{ font-size:10px; color:#98A1B3; font-weight:600; margin-left:8px; }
  .crs-uhint{ font-size:10.5px; color:#A98637; font-weight:600; margin-left:8px; }
  .crs-usel{ padding:5px 22px 5px 8px; border:1px solid var(--line); border-radius:7px; background:#fff; font-size:11.5px; font-weight:700; color:var(--txt); font-family:inherit; max-width:130px; }
  .crs-usel:focus{ outline:none; border-color:var(--ink); }
  .crs-usel.none{ background:#FFFBF0; border-color:#F5DFA3; color:var(--gold-deep); }
  .uch{ display:inline-flex; align-items:center; gap:6px; background:#fff; border:1px solid var(--line); border-radius:99px; padding:5px 6px 5px 10px; font-size:11.5px; font-weight:700; }
  .uch-n{ display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; background:var(--ink); color:#fff; font-size:9px; font-weight:800; border-radius:3px; }
  .uch button{ width:17px; height:17px; border-radius:4px; color:#C5CBD8; font-size:11px; }
  .uch button:hover{ background:#FFECEC; color:var(--red); }

  /* ── 플레이리스트 체크박스 ── */
  .pl-grid{ display:grid; grid-template-columns:1fr 320px; gap:14px; align-items:start; margin-bottom:14px; }
  @media (max-width:820px){ .pl-grid{ grid-template-columns:1fr; } }
  .pl-picklist{ border:1px solid var(--line); border-radius:10px; max-height:260px; overflow-y:auto; }
  .pl-pk{ display:flex; align-items:center; gap:9px; padding:9px 12px; border-bottom:1px solid #F7F8FA; font-size:12.5px; cursor:pointer; }
  .pl-pk:last-child{ border-bottom:none; }
  .pl-pk:hover{ background:#FAFBFD; }
  .pl-pk input{ width:15px; height:15px; flex-shrink:0; }
  .pl-ux{ font-size:9.5px; font-weight:800; color:var(--txt-sub); background:#F1F3F7; padding:2px 6px; border-radius:4px; flex-shrink:0; }
  .pl-lt{ flex:1; min-width:0; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pl-lm{ font-size:10.5px; color:var(--txt-sub); flex-shrink:0; }
  .pl-bi{ display:flex; align-items:center; gap:9px; padding:8px 12px; border-bottom:1px solid #F7F8FA; font-size:12px; }
  .pl-bi:last-child{ border-bottom:none; }
  .pl-n3{ width:19px; height:19px; border-radius:5px; background:var(--ink); color:var(--gold); font-size:9.5px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .pl-tx{ flex:1; min-width:0; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pl-ar{ display:flex; flex-direction:column; line-height:1; flex-shrink:0; }
  .pl-ar span{ font-size:8px; cursor:pointer; padding:1px; }
  .pl-rm{ width:20px; height:20px; border-radius:5px; background:#F4F5F8; color:var(--txt-sub); font-size:10px; flex-shrink:0; }
  .pl-rm:hover{ background:#FFECEC; color:var(--red); }

  .adm-wrap{ max-width:1020px; margin:0 auto; padding:18px 16px 60px; }
  .adm-tabs{ display:flex; gap:8px; margin-bottom:16px; }
  .adm-tab{ font-size:13.5px; font-weight:700; color:var(--txt-sub); background:#fff; border:1.5px solid var(--line); padding:9px 18px; border-radius:10px; }
  .adm-tab.on{ background:var(--ink); color:#fff; border-color:var(--ink); font-weight:800; }
  .adm-bar{ display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
  .adm-bar input{ flex:1; min-width:200px; height:44px; border:1.5px solid var(--line); border-radius:10px; padding:0 13px; font-size:13.5px; background:#fff; }
  .adm-bar input:focus{ outline:none; border-color:var(--ink); }
  .adm-bar select{ height:44px; border:1.5px solid var(--line); border-radius:10px; padding:0 10px; font-size:13.5px; background:#fff; font-family:inherit; }
  .adm-count{ font-size:12px; color:var(--txt-sub); font-weight:600; margin-bottom:8px; padding:0 2px; }
  .adm-tablewrap{ background:#fff; border:1px solid var(--line); border-radius:14px; overflow-x:auto; }
  .adm-table{ width:100%; border-collapse:collapse; font-size:13px; min-width:640px; }
  .adm-table th{ text-align:left; font-size:11.5px; color:var(--txt-sub); font-weight:700; padding:11px 12px; border-bottom:1px solid var(--line); background:#FAFBFD; white-space:nowrap; }
  .adm-table td{ padding:10px 12px; border-bottom:1px solid #F0F2F6; white-space:nowrap; vertical-align:middle; }
  .adm-table tr:last-child td{ border-bottom:none; }
  .adm-no{ font-weight:800; font-size:14px; }
  .adm-unclass{ color:var(--red); font-weight:700; }
  .adm-pub{ font-size:11px; font-weight:800; padding:4px 10px; border-radius:6px; background:#E6F7EF; color:#0E9C5C; }
  .adm-pub.off{ background:#FDEBEB; color:var(--red); }
  .adm-act{ display:flex; gap:6px; }
  .adm-act button{ font-size:11.5px; font-weight:700; padding:6px 11px; border-radius:8px; background:#F0F2F6; color:var(--txt); }
  .adm-act button.danger{ background:#FDEBEB; color:var(--red); }
  /* 폼 */
  .adm-form{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px 18px; max-width:560px; }
  .adm-form label{ display:block; font-size:12px; font-weight:700; color:var(--txt-sub); margin:14px 2px 6px; }
  .adm-form label:first-child{ margin-top:0; }
  .adm-form input:not([type=checkbox]):not([type=radio]), .adm-form select, .adm-form textarea{ width:100%; border:1.5px solid var(--line); border-radius:10px; padding:11px 13px; font-size:14px; background:var(--paper); font-family:inherit; }
  .adm-form input:not([type=checkbox]):not([type=radio]):focus, .adm-form select:focus, .adm-form textarea:focus{ outline:none; border-color:var(--ink); background:#fff; }
  .adm-form input[type=checkbox]{ width:16px; height:16px; padding:0; margin:0; flex-shrink:0; }
  .adm-form .row2{ display:flex; gap:10px; }
  .adm-form .row2 > div{ flex:1; }
  .adm-parse{ margin-top:8px; font-size:12.5px; font-weight:600; line-height:1.6; }
  .adm-parse.ok{ color:#0E9C5C; } .adm-parse.err{ color:var(--red); }
  .adm-preview{ margin-top:14px; padding:12px 14px; background:var(--gold-bg); border-radius:10px; font-size:13px; font-weight:700; color:var(--gold-deep); }
  .adm-submit{ margin-top:18px; width:100%; height:50px; border-radius:12px; background:var(--ink); color:#fff; font-size:15px; font-weight:800; }
  .adm-submit:disabled{ opacity:.4; }
  .adm-check{ display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; margin-top:12px; }
  .adm-check input{ width:17px; height:17px; }
  /* 수정 모달 */
  .adm-modal{ position:fixed; inset:0; background:rgba(13,21,38,.55); z-index:80; display:flex; align-items:center; justify-content:center; padding:18px; }
  .adm-modal-card{ background:#fff; border-radius:16px; width:100%; max-width:480px; max-height:88dvh; overflow-y:auto; padding:22px 20px; }
  .adm-modal-card h3{ font-size:16px; font-weight:800; margin-bottom:4px; }
  .adm-modal-card .sub{ font-size:12px; color:var(--txt-sub); margin-bottom:8px; }
  .adm-modal-btns{ display:flex; gap:8px; margin-top:18px; }
  .adm-modal-btns button{ flex:1; height:48px; border-radius:11px; font-size:14.5px; font-weight:800; }
  .adm-modal-btns .save{ background:var(--ink); color:#fff; }
  .adm-modal-btns .cancel{ background:#F0F2F6; color:var(--txt); }
