/* 메인·글로벌·주니어의 휴대전화 화면과 터치 조작을 맞춥니다. */
.mobile-dock { display:none; }
.mobile-dock[hidden] { display:none!important; }

@media screen and (max-width:767px), screen and (max-width:1023px) and (max-height:500px) {
  html { -webkit-text-size-adjust:100%; scroll-padding-bottom:100px; }
  body.coco-responsive { --main-h:64px; --header-h:64px; --nav-h-m:64px; font-size:16px; overflow-wrap:break-word; }
  .coco-responsive *, .coco-responsive *::before, .coco-responsive *::after { box-sizing:border-box; }
  .coco-responsive :is(main,section,article,fieldset,form,.wrap,.grid,.feature,.tool-grid)>* { min-width:0; }
  .coco-responsive :is(input,textarea,select) { max-width:100%; font-size:16px!important; }
  .coco-responsive :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select) { min-height:48px; }
  .coco-responsive textarea { min-height:112px; line-height:1.6; }
  .coco-responsive :is(input[type=checkbox],input[type=radio]) { width:22px; height:22px; flex:none; }
  .coco-responsive :is(button,a,input,textarea,select) { touch-action:manipulation; }
  .coco-responsive :is(button,a):focus-visible { outline:3px solid var(--accent,#c42a21); outline-offset:3px; }
  .coco-responsive :is(button,a.btn,.btn):active { transform:scale(.98); }

  /* 공통 헤더와 메뉴 */
  .coco-responsive .hdr { min-height:64px; height:64px; }
  .coco-responsive .hdr__row--nav { display:none; }
  .coco-responsive .hdr__row--brand { width:calc(100% - 24px); height:64px; gap:6px; }
  .coco-responsive .hdr__logo { display:flex; align-items:center; min-height:44px; min-width:0; }
  .coco-responsive .hdr__search-btn, .coco-responsive .hdr__burger { width:44px; height:44px; min-height:44px; flex:none; }
  .coco-responsive .hdr__cta { height:44px; min-height:44px; padding-inline:10px; font-size:13px; }
  .coco-responsive .lang__btn { min-width:44px; min-height:44px; }
  .coco-responsive .lang__menu a { min-height:44px; font-size:14px; }
  .coco-responsive .fullmenu { height:calc(100svh - 64px); padding:8px 0 calc(24px + env(safe-area-inset-bottom)); overscroll-behavior:contain; }
  .coco-responsive .fullmenu__list, .coco-responsive .fullmenu.is-expanded .fullmenu__list { flex:none; width:calc(100% - 32px); max-height:none; }
  .coco-responsive .fullmenu__item, .coco-responsive .fullmenu.is-expanded .fullmenu__item { flex:none; }
  .coco-responsive .fullmenu__top, .coco-responsive .fullmenu.is-expanded .fullmenu__top { min-height:52px; height:auto; font-size:17px; line-height:1.45; padding-block:12px; }
  .coco-responsive .fullmenu__sub { display:flex; align-items:center; min-height:44px; padding:10px 12px; font-size:16px; line-height:1.5; }
  .coco-responsive .fullmenu__actions { grid-template-columns:1fr 1fr; gap:8px; }
  .coco-responsive .fullmenu__actions .fullmenu__top { min-height:48px; font-size:14px; white-space:normal; }
  .coco-responsive .fullmenu .lang-row { width:calc(100% - 32px); margin-inline:auto; }
  .coco-responsive .fullmenu .lang-row a { min-height:44px; font-size:14px; }
  .coco-responsive .search { max-height:calc(100svh - 64px); overflow:auto; overscroll-behavior:contain; }
  .coco-responsive .search__form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; width:calc(100% - 32px); }
  .coco-responsive .search__close { min-height:44px; font-size:14px; }
  .coco-responsive .study-search__kind { min-height:44px; grid-column:1 / -1; }
  .coco-responsive .study-home .search__form, .coco-responsive .study-interior .search__form { grid-template-columns:minmax(0,1fr) auto auto; }
  .coco-responsive.study-home .search__form, .coco-responsive.study-interior .search__form { grid-template-columns:minmax(0,1fr) auto auto; }

  /* 영상과 과정 이동은 원본을 사용하며 손가락으로 고르기 쉽게 만듭니다. */
  .coco-responsive:not(.coco-junior) .hero { height:82svh; min-height:500px; max-height:900px; }
  .coco-responsive .hero__inner { width:calc(100% - 40px); padding-top:80px; padding-bottom:112px; }
  .coco-responsive .hero__copy { width:100%; padding-right:0; }
  .coco-responsive .hero__kicker { font-size:14px; line-height:1.5; }
  .coco-responsive .hero__title { font-size:clamp(34px,10vw,48px); line-height:1.2; letter-spacing:-.035em; }
  .coco-responsive .hero__desc { font-size:16px; line-height:1.65; }
  .coco-responsive .hero__actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
  .coco-responsive .hero__btn { min-width:0; min-height:48px; margin:0; padding:12px; font-size:14px; line-height:1.45; }
  .coco-responsive .chapters { padding-bottom:14px; }
  .coco-responsive .chapters__list { width:calc(100% - 32px); gap:12px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; scroll-snap-type:x proximity; }
  .coco-responsive .chapters__list::-webkit-scrollbar { display:none; }
  .coco-responsive .chapters__item { flex:0 0 auto; min-width:60px; scroll-snap-align:start; }
  .coco-responsive .chapters__btn { min-height:48px; }
  .coco-responsive .chapters__label, html[lang=en] .coco-responsive .chapters__label { font-size:14px; padding:9px 2px; white-space:nowrap; }
  .coco-responsive .entry__cell { min-height:64px; padding:12px 6px; font-size:14px; line-height:1.4; }
  .coco-responsive .sec__inner, .coco-responsive .stories__inner { width:calc(100% - 32px); }
  .coco-responsive .sec__title { font-size:30px; line-height:1.3; }
  .coco-responsive .sec__en { font-size:14px; line-height:1.6; letter-spacing:.08em; }
  .coco-responsive .story-card__category { font-size:12px; }
  .coco-responsive .story-card__info { padding:16px 12px; min-height:148px; }
  .coco-responsive .story-card__title { font-size:18px; line-height:1.45; }
  .coco-responsive .story-card__more { font-size:14px; padding-top:20px; }
  .coco-responsive .story-dialog { width:calc(100% - 16px); max-height:calc(100svh - 16px); }
  .coco-responsive .story-dialog__close { width:48px; height:48px; }
  .coco-responsive .story-dialog__copy { padding:28px 20px; }
  .coco-responsive .story-dialog__body { font-size:17px; line-height:1.85; }
  .coco-responsive :is(.wrap,.page-head .wrap) { max-width:100%; }
  .coco-responsive :is(.teacher,.teacher__copy,.teacher__groups,.study-readable,.panel,.field) { min-width:0; overflow-wrap:anywhere; }
  .coco-responsive :is(.teacher__group,.teacher__list,.teacher__groups) { line-height:1.8; }
  .coco-responsive .ftr__inner { width:calc(100% - 32px); }
  .coco-responsive .ftr__nav { gap:8px 16px; }
  .coco-responsive .ftr__link { display:inline-flex; align-items:center; min-height:44px; font-size:14px; }
  .coco-responsive .ftr__legal { font-size:14px; line-height:1.8; overflow-wrap:anywhere; }

  /* 글로벌의 재생 버튼·검색·계산 화면 */
  .coco-responsive .study-brand { gap:5px; }
  .coco-responsive .study-brand img { width:88px; }
  .coco-responsive .study-brand>span { font-size:12px; }
  .coco-responsive.study-home .hero__inner { padding-bottom:154px; }
  .coco-responsive.study-home .hero__title { font-size:clamp(32px,9vw,44px); }
  .coco-responsive .study-hero__play { bottom:76px; min-height:44px; padding:8px 12px; font-size:14px; }
  .coco-responsive .study-hero__credit { bottom:132px; left:20px; right:20px; font-size:12px; line-height:1.5; text-align:left; }
  .coco-responsive :is(.study-actions .btn,.study-contacts a) { min-height:48px; display:inline-flex; align-items:center; justify-content:center; font-size:16px; }
  .coco-responsive :is(.study-tools .grid-2,.study-tools .grid-3,.study-tools .calc,.study-tools .feature,.study-quiz .w3) { grid-template-columns:minmax(0,1fr); }
  .coco-responsive :is(.study-tools .sheet,.study-quiz .sheet) { max-height:92svh; padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
  .coco-responsive .ctable { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }

  /* 스크롤 뒤에 필요한 다음 행동을 제공합니다. 입력 중에는 감춥니다. */
  body.coco-responsive.has-mobile-dock { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .coco-responsive .mobile-dock { position:fixed; z-index:80; inset:auto 0 0; display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); border-top:1px solid #dedede; background:#fffffff5; box-shadow:0 -4px 20px #0000000a; }
  .coco-responsive .mobile-dock a { display:flex; align-items:center; justify-content:center; min-height:52px; padding:10px; font-size:16px; font-weight:700; line-height:1.4; color:var(--ink,#191f28); border:1px solid currentColor; background:#fff; text-decoration:none; }
  .coco-responsive .mobile-dock a:last-child { color:#fff; border-color:var(--accent,#c42a21); background:var(--accent,#c42a21); }
  .coco-responsive .mobile-dock a:hover { filter:brightness(.94); }
  html.is-menu-open .mobile-dock, html.junior-menu-open .contact-dock { display:none!important; }

  /* 주니어의 기존 영상·국기·페이지 구성을 유지합니다. */
  body.coco-junior { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .coco-junior header .head { padding:10px 16px; gap:8px; }
  .coco-junior header .logo { font-size:23px; line-height:1.2; }
  .coco-junior header .logo small { font-size:13px; line-height:1.5; }
  .coco-junior .upgrade-menu { min-width:48px; min-height:48px; }
  .coco-junior .langs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:100%; gap:6px; }
  .coco-junior .langs button { min-width:0; min-height:44px; padding:7px 4px; font-size:13px; }
  .coco-junior .langs .flag { width:22px; height:16px; }
  .coco-junior header nav.is-open { position:fixed; top:var(--junior-header-height,124px); left:0; right:0; display:block; width:100%; max-height:calc(100svh - var(--junior-header-height,124px)); padding:8px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; background:#fff; border-top:1px solid #e5ddeb; box-shadow:0 12px 20px #0002; }
  .coco-junior header nav a { display:flex; align-items:center; min-height:52px; padding:12px 8px; font-size:17px; border-bottom:1px solid #eee; }
  html.junior-menu-open { overflow:hidden; }
  .coco-junior .upgrade-hero, body.coco-junior.force-mobile .upgrade-hero { height:calc(100svh - var(--junior-header-height,124px))!important; min-height:540px!important; max-height:850px; }
  .coco-junior .upgrade-hero .wrap, body.coco-junior.force-mobile .upgrade-hero .wrap { padding:48px 20px 156px; }
  .coco-junior .upgrade-hero h1, body.coco-junior.force-mobile .upgrade-hero h1 { font-size:clamp(30px,8.8vw,40px)!important; line-height:1.3!important; margin:16px 0!important; }
  .coco-junior .upgrade-hero .lead { font-size:17px; line-height:1.7; }
  .coco-junior .upgrade-hero .rowbtn { gap:8px; }
  .coco-junior .upgrade-hero .btn { min-height:48px; padding:11px 14px; font-size:14px; }
  .coco-junior .upgrade-video-toggle { min-height:44px; font-size:14px; bottom:76px; right:20px; padding:8px 12px; }
  .coco-junior .upgrade-chapters { left:20px; right:20px; bottom:14px; gap:8px; }
  .coco-junior .upgrade-chapters button { min-height:48px; font-size:14px; line-height:1.35; }
  .coco-junior .section { padding:48px 0; }
  .coco-junior .wrap { width:100%; max-width:100%; padding-inline:20px; }
  .coco-junior :is(.grid3,.brand-v6-profiles,.upgrade-process,.upgrade-roles,.timeline,.feature,.tool-grid,.tool-grid.three,.rubric-row) { grid-template-columns:minmax(0,1fr)!important; }
  .coco-junior :is(.section h2,.gallery-v4-detail h3) { font-size:28px; line-height:1.4; }
  .coco-junior :is(.card p,.profile ul,.profile small,.course-panel li,.upgrade-principle,.upgrade-private p) { font-size:16px; line-height:1.8; }
  .coco-junior :is(.note,.tool-note,.mini,.visual-action small,.gallery-v4-card small,.faq-v5-card small) { font-size:14px!important; line-height:1.65; }
  .coco-junior :is(.section-showcase,.gallery-v4-grid,.brand-v6-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .coco-junior :is(.visual-action strong,.gallery-v4-card strong,.faq-v5-card strong) { font-size:16px!important; line-height:1.45; }
  .coco-junior :is(.rowbtn button,.tool-action button,.gallery-v4-sub button,.gallery-v4-back,.faq-v5-toolbar button,.faq-v5-related a,.upgrade-modes a) { min-height:44px; font-size:14px; }
  .coco-junior :is(.course-img-tabs,.edu-visual-buttons) { gap:8px!important; }
  .coco-junior :is(.course-img-tabs button,.edu-visual-buttons button) { min-width:0; min-height:48px; font-size:14px!important; }
  .coco-junior .contact-dock { left:0; right:0; bottom:0; width:100%; max-width:none; transform:none; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); gap:8px; }
  .coco-junior .contact-dock[hidden] { display:none!important; }
  .coco-junior .contact-dock a { min-height:52px; font-size:16px; }
  .coco-junior .news-modal { padding:8px; }
  .coco-junior .news-sheet { max-height:calc(100svh - 16px); padding:20px; }
  .coco-junior .modal-close { min-height:44px; padding:8px 14px; }
}

@media screen and (max-width:359px) {
  .coco-responsive .hdr__row--brand { gap:2px; width:calc(100% - 16px); }
  .coco-responsive .hdr__logo img { max-width:92px; height:auto; }
  .coco-responsive .hdr__cta { padding-inline:7px; font-size:12px; }
  .coco-responsive .hdr__search-btn { width:40px; }
  .coco-responsive .study-brand img { max-width:76px; }
  .coco-responsive .study-brand>span { font-size:11px; }
  .coco-responsive .stories__track { grid-template-columns:minmax(0,1fr); }
  .coco-responsive .story-card__picture { aspect-ratio:16 / 10; }
  .coco-junior .langs button { flex-direction:column; font-size:12px; gap:2px; padding:4px; }
  .coco-junior .langs .flag { width:18px; }
  .coco-junior .upgrade-hero h1 { font-size:30px!important; }
  .coco-junior :is(.brand-v6-grid,.section-showcase,.gallery-v4-grid) { grid-template-columns:1fr; }
}

@media screen and (max-width:1023px) and (orientation:landscape) and (max-height:500px) {
  .coco-responsive:not(.coco-junior) .hero { min-height:440px; }
  .coco-junior .upgrade-hero, body.coco-junior.force-mobile .upgrade-hero { min-height:440px!important; }
  .coco-junior .upgrade-hero .wrap, body.coco-junior.force-mobile .upgrade-hero .wrap { padding-top:32px; padding-bottom:132px; }
  .coco-junior .upgrade-hero h1, body.coco-junior.force-mobile .upgrade-hero h1 { font-size:30px!important; }
}

@media (prefers-reduced-motion:reduce) {
  .mobile-dock a { transition:none; }
}
