/* 원티치 수학 소개(/subjects/math) 2026-11-06: 첫 화면에 실제 PDF, 가격 두 갈래, 모바일 하단 버튼. */
body[data-view="math"] .math-hero{position:relative;overflow:hidden;padding:64px 0 0!important;text-align:center;background:radial-gradient(70% 60% at 50% 0%,#fff1e9 0%,#fff8f3 38%,#fff 72%)!important}
body[data-view="math"] .math-hero .wrap{display:flex;flex-direction:column;align-items:center}
body[data-view="math"] .math-live{display:inline-flex;align-items:center;gap:8px;margin:0 0 18px;padding:7px 14px;border-radius:999px;background:#fff;box-shadow:0 1px 0 #ffd9c4 inset,0 0 0 1px #ffe2d2;color:#202a38;font-size:14px;font-weight:700}
body[data-view="math"] .math-live-dot{position:relative;width:8px;height:8px;border-radius:50%;background:#ff5100}
body[data-view="math"] .math-live-dot:after{content:"";position:absolute;inset:0;border-radius:50%;background:#ff5100;animation:math-ping 1.8s ease-out infinite}
body[data-view="math"] .math-hero h1{margin:0;font-size:clamp(34px,4.6vw,54px)!important;line-height:1.16;letter-spacing:-.045em;color:#202a38}
body[data-view="math"] .math-hero h1 em{font-style:normal;color:#ff5100}
body[data-view="math"] .math-hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:30px}
body[data-view="math"] .math-hero-actions .btn{min-height:54px;padding:0 26px;font-size:16.5px}
body[data-view="math"] .math-hero-actions .btn:not(.math-start){background:#fff;color:#202a38;border:1.5px solid #d7dfe9;font-weight:700}
body[data-view="math"] .math-hero-actions .btn:not(.math-start):hover{border-color:#ffb48f;color:#c43d00}
body[data-view="math"] .math-start .chev{width:13px;height:13px;animation:math-nudge 2.4s ease-in-out 1.2s 3}
body[data-view="math"] .math-hero-meta{margin:14px 0 0;color:#657286;font-size:14px}

/* 실제 PDF 세 장: 겹쳐 있다가 펼쳐진다. 누르면 확대(preview.js의 data-zoom). */
body[data-view="math"] .math-fan{--w:clamp(190px,22vw,290px);position:relative;width:min(100%,920px);height:calc(var(--w)*.92);margin:44px auto 0;
  -webkit-mask-image:linear-gradient(#000 62%,transparent);mask-image:linear-gradient(#000 62%,transparent)}
body[data-view="math"] .math-fan-page{position:absolute;top:18px;left:50%;width:var(--w);margin-left:calc(var(--w)/-2);padding:0;border:0;border-radius:12px;background:#fff;
  box-shadow:0 18px 44px -18px #1e344c55,0 0 0 1px #1e344c14;cursor:zoom-in;transform-origin:50% 120%;transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s}
body[data-view="math"] .math-fan-page img{display:block;width:100%;height:auto;border-radius:12px}
body[data-view="math"] .math-fan-tag{position:absolute;top:12px;left:12px;padding:4px 10px;border-radius:999px;background:#202a38;color:#fff;font-size:12.5px;font-weight:700;letter-spacing:-.01em}
body[data-view="math"] .math-fan-page.is-teacher .math-fan-tag{background:#ff5100}
body[data-view="math"] .math-fan-page.is-solutions .math-fan-tag{left:auto;right:12px}
body[data-view="math"] .math-fan-page.is-student{z-index:1;--to:translate(-82%,26px) rotate(-7deg);transform:var(--to);animation:math-fan .9s cubic-bezier(.2,.7,.2,1) .25s backwards}
body[data-view="math"] .math-fan-page.is-solutions{z-index:1;--to:translate(82%,26px) rotate(7deg);transform:var(--to);animation:math-fan .9s cubic-bezier(.2,.7,.2,1) .25s backwards}
body[data-view="math"] .math-fan-page.is-teacher{z-index:2;--to:translateY(0);transform:var(--to)}
body[data-view="math"] .math-fan-page:hover,body[data-view="math"] .math-fan-page:focus-visible{z-index:3;box-shadow:0 26px 60px -20px #1e344c70,0 0 0 2px #ff5100;transform:var(--to) translateY(-10px)}
body[data-view="math"] .math-fan-page:focus-visible{outline:none}
body[data-view="math"] .math-fan-notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:min(100%,760px);margin:4px auto 0;padding:0 0 56px;list-style:none;color:#657286;font-size:14px;line-height:1.5}
body[data-view="math"] .math-fan-notes b{display:block;color:#202a38;font-size:15px}

/* 단원·문항: 선 대신 옅은 면 */
body[data-view="math"] .math-unit,body[data-view="math"] .math-points div{border:0;background:#fff;box-shadow:0 1px 2px #1e344c0d}
body[data-view="math"] .section:not(.alt) .math-points div{background:#f5f7fa;box-shadow:none}
body[data-view="math"] .math-units-note{margin:22px 0 0;color:#657286;font-size:15px;line-height:1.7}

/* 가격: 두 갈래를 나란히. 칸마다 이름표·큰 금액·한 줄. */
body[data-view="math"] .math-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body[data-view="math"] .math-plans:not(:has(.math-plan.is-event li)){grid-template-columns:minmax(0,440px)}
body[data-view="math"] .math-plan.is-event:not(:has(li)){display:none}
body[data-view="math"] .math-plan{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:26px 28px;border-radius:20px;background:#fff;box-shadow:0 1px 2px #1e344c0d}
body[data-view="math"] .math-plan.is-event{background:#fff1e9;box-shadow:0 0 0 1.5px #ffb48f inset}
body[data-view="math"] .math-plan-name{margin:0;color:#c43d00;font-size:14px;font-weight:750}
body[data-view="math"] .math-plan-amount{margin:2px 0 0;color:#202a38;font-size:clamp(30px,3.2vw,38px);font-weight:800;letter-spacing:-.035em;line-height:1.2}
body[data-view="math"] .math-plan-line{margin:0;padding:0;list-style:none;color:#485668;font-size:15px}
body[data-view="math"] .math-plan .btn{margin-top:18px}
body[data-view="math"] .math-plan-note{margin:16px 0 0;color:#657286;font-size:14px}
body[data-view="math"] .math-price .section-head h2{white-space:normal}

/* 모바일 하단 버튼: 첫 화면 버튼이 사라지면 나타나고 가격·푸터에서는 숨는다(math-landing.js) */
body[data-view="math"] .math-sticky{display:none}

@keyframes math-fan{from{transform:translate(0,40px) rotate(0)}to{transform:var(--to)}}
@keyframes math-ping{0%{transform:scale(1);opacity:.55}80%,100%{transform:scale(2.8);opacity:0}}
@keyframes math-nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(4px)}}

@media(max-width:760px){
  body[data-view="math"] .math-hero{padding:40px 0 0!important;text-align:left}
  body[data-view="math"] .math-hero .wrap{align-items:flex-start}
  body[data-view="math"] .math-hero-actions{justify-content:flex-start;width:100%}
  body[data-view="math"] .math-hero-actions .math-start{flex:1 1 100%}
  body[data-view="math"] .math-hero-actions .btn:not(.math-start){flex:1 1 100%;min-height:50px}
  body[data-view="math"] .math-fan{--w:min(40vw,200px);height:calc(var(--w)*1.12);margin-top:32px;align-self:center}
  body[data-view="math"] .math-fan-page.is-student{--to:translate(-50%,20px) rotate(-6deg)}
  body[data-view="math"] .math-fan-page.is-solutions{--to:translate(50%,20px) rotate(6deg)}
  body[data-view="math"] .math-fan-tag{top:8px;left:8px;padding:3px 8px;font-size:11.5px}
  body[data-view="math"] .math-fan-page.is-solutions .math-fan-tag{left:auto;right:8px}
  body[data-view="math"] .math-fan-notes{gap:8px;padding-bottom:40px;font-size:12.5px;text-align:center}
  body[data-view="math"] .math-fan-notes b{font-size:13.5px}
  body[data-view="math"] .math-plans,body[data-view="math"] .math-plans:not(:has(.math-plan.is-event li)){grid-template-columns:minmax(0,1fr)}
  body[data-view="math"] .math-plan{padding:22px 20px}
  body[data-view="math"] .math-plan .btn{align-self:stretch}
  body[data-view="math"] .math-sticky{display:block;position:fixed;left:16px;right:16px;bottom:calc(14px + env(safe-area-inset-bottom));z-index:40;
    transform:translateY(140%);visibility:hidden;transition:transform .3s cubic-bezier(.2,.7,.2,1),visibility .3s}
  body[data-view="math"] .math-sticky.is-on{transform:none;visibility:visible}
  body[data-view="math"] .math-sticky .btn{width:100%;min-height:54px;box-shadow:0 12px 30px -10px #ff510080}
  body[data-view="math"] .csw-launch{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
  body[data-view="math"].math-sticky-on .csw-launch{transform:translateY(-70px)}
}
@media(prefers-reduced-motion:reduce){
  body[data-view="math"] .math-fan-page,body[data-view="math"] .math-live-dot:after,body[data-view="math"] .math-start .chev{animation:none!important}
  body[data-view="math"] .math-sticky{transition:none}
}
