/* Course list (classes.html, 2026-11 redesign).
 * One filter row, plain section headers, and typographic covers generated by course-cover.js.
 * Uses the shared tokens from app-shell.css (--sh-*). Loaded last; older catalog layers
 * still carry !important rules, so selectors here are scoped under html body.pg-catalog. */
html body.pg-catalog{
 --cl-cover-bg:#f1efea;--cl-cover-ink:var(--sh-text);--cl-cover-sub:var(--sh-muted);--cl-accent:var(--sh-muted);
}
html body.pg-catalog .cl-cover[data-series=master]{--cl-cover-bg:#f4efe5;--cl-accent:#9a6a17}
html body.pg-catalog .cl-cover[data-series=tree]{--cl-cover-bg:#ebf2ee;--cl-accent:#2b7656}
html body.pg-catalog .cl-cover[data-series=cash]{--cl-cover-bg:#ecf0f5;--cl-accent:#3a6595}
html[data-pg-theme=dark] body.pg-catalog .cl-cover{--cl-cover-bg:#1a1c20}
html[data-pg-theme=dark] body.pg-catalog .cl-cover[data-series=master]{--cl-cover-bg:#1e1b16;--cl-accent:#dcb062}
html[data-pg-theme=dark] body.pg-catalog .cl-cover[data-series=tree]{--cl-cover-bg:#151c19;--cl-accent:#6cc29c}
html[data-pg-theme=dark] body.pg-catalog .cl-cover[data-series=cash]{--cl-cover-bg:#161a21;--cl-accent:#8fb3dc}

/* ---------- lead: title, one line, filter row ---------- */
html body.pg-catalog #gpCatalogLead.cl-lead{margin:22px 0 0!important;padding:0!important;background:none!important;border:0!important}
html body.pg-catalog .cl-head h1{margin:0!important;font:700 28px/1.25 var(--sh-font)!important;letter-spacing:-.5px!important;color:var(--sh-text)!important}
html body.pg-catalog .cl-intro{margin:8px 0 0!important;font:400 15px/1.55 var(--sh-font)!important;color:var(--sh-muted)!important}
html body.pg-catalog .cl-intro a{color:var(--sh-text)!important;font-weight:600;text-decoration:underline;text-decoration-color:var(--sh-line);text-underline-offset:3px;white-space:nowrap}
html body.pg-catalog .cl-intro a:hover{text-decoration-color:currentColor}
html body.pg-catalog .cl-filter{display:flex!important;gap:8px!important;margin:14px 0 0!important;padding:0 0 2px!important;overflow-x:auto;scrollbar-width:none;border:0!important;background:none!important}
html body.pg-catalog .cl-filter::-webkit-scrollbar{display:none}
html body.pg-catalog .cl-filter button{flex:none;min-height:36px!important;padding:0 16px!important;margin:0!important;border:1px solid var(--sh-line)!important;border-radius:var(--sh-radius-pill)!important;background:var(--sh-surface)!important;color:var(--sh-muted)!important;font:600 14px/1 var(--sh-font)!important;letter-spacing:-.2px;box-shadow:none!important;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
html body.pg-catalog .cl-filter button:hover{color:var(--sh-text)!important;border-color:var(--sh-muted)!important}
html body.pg-catalog .cl-filter button[aria-pressed=true]{background:var(--sh-text)!important;border-color:var(--sh-text)!important;color:var(--sh-bg)!important}
html body.pg-catalog .cl-filter button:focus-visible,html body.pg-catalog .cl-card a:focus-visible{outline:2px solid var(--sh-accent)!important;outline-offset:2px}

/* ---------- sections ---------- */
html body.pg-catalog #listing.cl-listing{margin:0!important;padding:0!important}
html body.pg-catalog #listing .status:empty{display:none}
html body.pg-catalog .cl-list{display:block!important;margin:8px 0 0!important}
html body.pg-catalog .cl-section{margin:0!important;padding:0!important}
html body.pg-catalog .cl-section-title{margin:24px 0 2px!important;padding:0!important;font:700 18px/1.3 var(--sh-font)!important;letter-spacing:-.3px!important;color:var(--sh-text)!important}
html body.pg-catalog .cl-empty{margin:20px 0!important;color:var(--sh-muted)!important;font:400 14px/1.5 var(--sh-font)!important}

/* phones: list rows, small cover on the left */
html body.pg-catalog .cl-grid{display:flex;flex-direction:column;margin:0;padding:0}
html body.pg-catalog .cl-card{position:relative;display:grid;grid-template-columns:112px 1fr;gap:14px;align-items:start;padding:16px 0;border-bottom:1px solid var(--sh-line);background:none;box-shadow:none;margin:0}
html body.pg-catalog .cl-section:not(:has(.cl-section-title)) .cl-card:first-child{padding-top:20px}
html body.pg-catalog .cl-card:last-child{border-bottom:0}
html body.pg-catalog .cl-cover-wrap{container-type:inline-size;width:100%;position:relative;aspect-ratio:4/3;border-radius:var(--sh-radius-sm);overflow:hidden;background:var(--sh-surface)}
html body.pg-catalog .cl-cover-img{display:block;width:100%;height:100%;object-fit:cover;margin:0;border-radius:0}
html body.pg-catalog .cl-card.is-soon .cl-cover{opacity:.6}

/* the typographic cover */
html body.pg-catalog .cl-cover{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:8cqw 8cqw 7cqw;background:var(--cl-cover-bg);color:var(--cl-cover-ink);font-family:var(--sh-font);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--sh-text) 6%,transparent);overflow:hidden}
html body.pg-catalog .cl-cover-series{font-size:max(10px,5.4cqw);font-weight:700;line-height:1.2;letter-spacing:-.01em;color:var(--cl-cover-sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.pg-catalog .cl-cover-no{margin-top:auto;font-size:38cqw;font-weight:700;line-height:.82;letter-spacing:-.05em;color:var(--cl-accent);font-variant-numeric:tabular-nums}
html body.pg-catalog .cl-cover-topic{margin-top:5cqw;font-size:5.2cqw;font-weight:600;line-height:1.3;color:var(--cl-cover-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.pg-catalog .cl-cover-no:has(+ .cl-cover-topic){font-size:30cqw}
@container (max-width:200px){
 html body.pg-catalog .cl-cover-topic{display:none}
 html body.pg-catalog .cl-cover-no,html body.pg-catalog .cl-cover-no:has(+ .cl-cover-topic){font-size:40cqw}
 html body.pg-catalog .cl-cover-series{font-size:max(9px,8.5cqw)}
}

html body.pg-catalog .cl-badge{position:absolute;top:6px;right:6px;z-index:1;padding:3px 7px;border-radius:var(--sh-radius-pill);background:var(--sh-surface);color:var(--sh-text);font:700 10.5px/1.3 var(--sh-font);letter-spacing:-.1px;box-shadow:0 0 0 1px var(--sh-line)}

/* card text */
html body.pg-catalog .cl-details-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;margin-top:2px}
html body.pg-catalog .cl-meta>span,html body.pg-catalog .cl-price{white-space:nowrap}
html body.pg-catalog .cl-foot{margin-inline-start:auto}
html body.pg-catalog .cl-details-row>.cl-foot:only-child{margin-inline-start:0}

html body.pg-catalog .cl-body{width:100%;box-sizing:border-box;min-width:0;display:flex;flex-direction:column;gap:4px}
html body.pg-catalog a.cl-title{color:var(--sh-text)!important;font:700 16px/1.35 var(--sh-font)!important;letter-spacing:-.3px;text-decoration:none!important}
html body.pg-catalog a.cl-title::after{content:'';position:absolute;inset:0;z-index:0}
html body.pg-catalog .cl-card:hover a.cl-title{text-decoration:underline!important;text-underline-offset:3px;text-decoration-thickness:1px!important}
html body.pg-catalog .cl-line{margin:0!important;color:var(--sh-muted)!important;font:400 13.5px/1.45 var(--sh-font)!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html body.pg-catalog .cl-meta{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;margin:0!important;color:var(--sh-muted)!important;font:500 12.5px/1.5 var(--sh-font)!important}
html body.pg-catalog .cl-rating{color:var(--sh-muted)}
html body.pg-catalog .cl-dot{opacity:.6}
html body.pg-catalog .cl-foot{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
html body.pg-catalog .cl-price{color:var(--sh-text);font:700 15px/1.3 var(--sh-font);letter-spacing:-.2px;font-variant-numeric:tabular-nums}
html body.pg-catalog .cl-note{color:var(--sh-muted)!important;font:500 12px/1.4 var(--sh-font)!important}
html body.pg-catalog a.cl-resume{position:relative;z-index:1;display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border-radius:var(--sh-radius-pill);background:var(--sh-accent-soft);color:var(--sh-accent)!important;font:700 13px/1 var(--sh-font);text-decoration:none!important}
html body.pg-catalog a.cl-resume::after{content:'→';margin-left:5px}

/* tablet and up: three-column grid, cover on top */
@media (min-width:700px){
 html body.pg-catalog .cl-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px}
 html body.pg-catalog .cl-head h1{font-size:32px!important}
 html body.pg-catalog .cl-intro{margin:0!important}
 html body.pg-catalog .cl-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px 20px;padding-top:10px}
 html body.pg-catalog .cl-card{display:flex;flex-direction:column;gap:10px;padding:0;border:0}
 html body.pg-catalog .cl-section:not(:has(.cl-section-title)) .cl-card:first-child{padding-top:0}
 html body.pg-catalog .cl-cover-wrap{aspect-ratio:16/10;border-radius:var(--sh-radius-md)}
 html body.pg-catalog .cl-badge{top:10px;right:10px;padding:4px 9px;font-size:11.5px}
 html body.pg-catalog .cl-section-title{margin-top:28px!important}
}
@media (min-width:1080px){html body.pg-catalog .cl-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ---------- course detail: same cover and calmer header ---------- */
html body.pg-catalog .gp-detail-visual{position:relative;container-type:inline-size}
html body.pg-catalog .gp-detail-visual>.cl-cover{position:relative;inset:auto;width:100%;aspect-ratio:16/10;border-radius:var(--sh-radius-lg)}
html body.pg-catalog .gp-detail-visual>.cl-cover~.gp-detail-mark{display:none!important}
@media (max-width:699.98px){html body.pg-catalog .cl-badge{top:auto;bottom:5px;right:5px;padding:2px 6px;font-size:10px}}
html body.pg-catalog .gp-highlight-chip.is-rating{background:var(--sh-surface)!important;color:var(--sh-text)!important;border:1px solid var(--sh-line)!important}
html body.pg-catalog .gp-highlight-quote{border-left-color:var(--sh-line)!important}

/* ---------- consult note under the list: a quiet line, not a banner ---------- */
html:root body.pg-catalog.pg-2026 main .contact-strip{display:flex!important;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;margin:56px 0 24px!important;padding:24px 0 0!important;background:none!important;border:0!important;border-top:1px solid var(--sh-line)!important;border-radius:0!important;box-shadow:none!important;color:var(--sh-text)!important}
html:root body.pg-catalog.pg-2026 main .contact-strip h2{margin:0!important;font:700 16px/1.4 var(--sh-font)!important;letter-spacing:-.2px!important;color:var(--sh-text)!important}
html:root body.pg-catalog.pg-2026 main .contact-strip p{margin:4px 0 0!important;font:400 14px/1.55 var(--sh-font)!important;color:var(--sh-muted)!important}
html:root body.pg-catalog.pg-2026 main .contact-strip a{display:inline-flex!important;align-items:center;min-height:40px!important;width:auto!important;padding:0 16px!important;border:1px solid var(--sh-line)!important;border-radius:var(--sh-radius-pill)!important;background:var(--sh-surface)!important;color:var(--sh-text)!important;font:600 14px/1 var(--sh-font)!important;text-decoration:none!important;box-shadow:none!important;margin:0!important;align-self:flex-start}

/* Course artwork is 16:9 (1344×756): a picture cover gets a 16:9 frame so titles are never cropped.
   Generated typographic covers keep the list's own proportions. */
html body.pg-catalog .cl-cover-wrap:has(.cl-cover-img){aspect-ratio:16/9!important}
html body.pg-catalog .cl-cover-wrap:has(.cl-cover-img) .cl-cover-img{object-fit:cover;object-position:center}
/* The card's one line is the course promise: give it the accent and weight of a reason to buy. */
html body.pg-catalog .cl-card .cl-line{color:var(--sh-accent,#1f7a55);font-weight:700}

/* ---------- phones: cover-first cards (2026-11-18) ----------
   The 112px side thumbnail made the course covers unreadable. On phones each course is now a
   full-width card: 16:9 cover on top, then title, promise, facts and price / 이어보기. */
@media (max-width:699.98px){
 html body.pg-catalog .cl-grid{gap:24px;padding-top:8px}
 html body.pg-catalog .cl-card{display:flex;flex-direction:column;gap:10px;padding:0;border:0}
 html body.pg-catalog .cl-section:not(:has(.cl-section-title)) .cl-card:first-child{padding-top:0}
 html body.pg-catalog .cl-cover-wrap{aspect-ratio:16/10;border-radius:var(--sh-radius-lg,16px);box-shadow:0 1px 2px #0000001f,0 14px 28px -20px #000000a6}
 html body.pg-catalog .cl-body{gap:5px;padding:0 2px}
 html body.pg-catalog a.cl-title{font-size:19px!important;line-height:1.3!important;letter-spacing:-.4px}
 html body.pg-catalog .cl-line{font-size:14.5px!important}
 html body.pg-catalog .cl-meta{font-size:13px!important}
 html body.pg-catalog .cl-price{font-size:18px}
 html body.pg-catalog a.cl-resume{min-height:38px;padding:0 16px;font-size:14px}
 html body.pg-catalog .cl-badge{top:10px;bottom:auto;right:10px;padding:4px 9px;font-size:11.5px}
 html body.pg-catalog .cl-section-title{margin-top:22px!important;font-size:18px!important}
}

/* These four chapters share one pass. Keep the note with the lesson count,
   and keep the existing detail and continue links independently operable. */
html body.pg-catalog .cl-card-series{gap:7px}
html body.pg-catalog .cl-card-series .cl-body{gap:2px}
html body.pg-catalog .cl-card-series a.cl-title{font:600 clamp(16px,1.4vw,18px)/1.35 var(--sh-font)!important;letter-spacing:-.025em}
html body.pg-catalog .cl-card-series .cl-line{font:400 13.5px/1.4 var(--sh-font)!important;letter-spacing:-.012em;word-break:keep-all}
html body.pg-catalog .cl-card-series .cl-details-row{gap:2px 8px;margin-top:0}
html body.pg-catalog .cl-card-series .cl-meta,
html body.pg-catalog .cl-card-series .cl-note{font:400 12px/1.35 var(--sh-font)!important}
html body.pg-catalog .cl-card-series .cl-note{word-break:keep-all}
html body.pg-catalog .cl-card-series a.cl-resume{min-height:32px;padding-inline:10px;font:600 12.5px/1 var(--sh-font)!important}
@media (max-width:699.98px){
 html body.pg-catalog .cl-card-series a.cl-title{font-size:17px!important}
 html body.pg-catalog .cl-card-series a.cl-resume{min-height:38px}
}

/* Mobile catalog only: make the course list visible sooner without smaller tap targets. */
@media (max-width:699.98px){
 html body.pg-catalog main.classroom-feed:has(> #gpCatalogLead:not(.hide):not([hidden])){
  padding-top:10px!important;
 }
 html body.pg-catalog #gpCatalogLead.cl-lead{margin-top:0!important}
 html body.pg-catalog #gpCatalogLead .cl-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;
 }
 html body.pg-catalog #gpCatalogLead .cl-head h1{font-size:25px!important}
 html body.pg-catalog #gpCatalogLead .cl-intro{margin:0!important;flex:none}
 html body.pg-catalog #gpCatalogLead .cl-intro-context{display:none}
 html body.pg-catalog #gpCatalogLead .cl-intro a{
  display:inline-flex;align-items:center;min-height:44px;font-size:13px;text-underline-offset:3px;
 }
 html body.pg-catalog #gpCatalogLead .cl-intro a:focus-visible{outline:2px solid var(--sh-accent);outline-offset:2px}
 html body.pg-catalog #gpCatalogLead .cl-filter{
  margin-top:2px!important;gap:5px!important;padding-bottom:2px!important;
 }
 html body.pg-catalog #gpCatalogLead .cl-filter button{
  min-height:44px!important;padding-inline:12px!important;font-size:13px!important;
 }
 html body.pg-catalog #listing .cl-list{margin-top:4px!important}
 html body.pg-catalog #listing .cl-game-tree-feature{
  min-height:56px;margin:0 0 6px;padding:5px 9px;gap:9px;
 }
 html body.pg-catalog #listing .cl-game-tree-feature img{width:82px;height:46px}
 html body.pg-catalog #listing .cl-game-tree-feature div{gap:0}
 html body.pg-catalog #listing .cl-game-tree-feature div>span{font-size:11px;line-height:1.2}
 html body.pg-catalog #listing .cl-game-tree-feature strong{font-size:15px;line-height:1.35}
 html body.pg-catalog #listing .cl-game-tree-feature small{font-size:11.5px;line-height:1.3}
 html body.pg-catalog #listing .cl-section:not(:has(.cl-section-title)) .cl-card:first-child{padding-top:2px}
}

/* Keep all four controls visible on the narrowest phones. */
@media (max-width:374px){
 html body.pg-catalog #gpCatalogLead .cl-filter button{padding-inline:9px!important}
}
