/* kofix 2026-11-05: Korean typography + philosophy grid consistency */
html[lang=ko] :is(h1,h2,h3,h4,.pill,.sr-h1,.ep-h2,.mb-q,.mb-c,.svc-t,.btn-gold,.btn-pill,.m3-more,.nmore){letter-spacing:.01em!important;text-indent:0!important}
html[lang=ko] :is(p,li,h1,h2,h3,h4,.pill,span,a,b){word-break:keep-all;overflow-wrap:break-word}
@media (max-width:980px){
  /* six cells: same font/size/line-height/colour in every language */
  .m3 #philosophy .m3-grid .pcard p,
  .m3 #philosophy .m3-grid .pcard:nth-child(n) p{font-family:var(--sans,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","PingFang SC","Microsoft YaHei",sans-serif)!important;font-size:13px!important;line-height:1.7!important;color:#E9E3D6!important;opacity:.85!important;font-weight:400!important;letter-spacing:0!important;max-width:none!important;font-style:normal!important}
  html[lang=ko] .m3 #philosophy .m3-grid .pcard p{word-break:keep-all;line-break:strict;text-wrap:balance}
  .m3 #philosophy .m3-grid .pcard{align-self:stretch;justify-content:flex-start!important}
  /* never leave the grid invisible waiting for a scroll-reveal */
  .m3 #philosophy .m3-grid .pcard{opacity:1!important;transform:none!important}
}
@media (max-width:980px) and (max-width:380px){.m3 #philosophy .m3-grid .pcard p{font-size:12.5px!important;line-height:1.65!important}}
@media (max-width:767px){
.m3 #philosophy .pcards.m3-grid{grid-template-rows:auto!important;grid-auto-rows:auto!important;row-gap:0!important;height:auto!important;align-content:start}
.m3 #philosophy .m3-grid .pcard{padding-top:14px!important;padding-bottom:12px!important}
.m3 #philosophy .shead{margin-bottom:12px!important}
.m3 #philosophy .shead p{max-width:none!important;margin:8px 4px 0!important;padding-top:10px!important}
.m3 #philosophy .m3-grid .pill{letter-spacing:.04em!important;line-height:1.3!important}
.m3 .mp-philo{padding-bottom:calc(var(--mbh,65px) + 8px)!important}
}
/* k4: detail-page fixes */
.ep .sr-hero .njmap-b.in{color:#f3d292!important;background:rgba(11,21,40,.55)!important;white-space:normal!important;max-width:100%;text-align:center;justify-content:center;line-height:1.35;padding:8px 14px}
@media (max-width:980px){
 .ep-sr .sr-bar{grid-template-columns:minmax(0,1fr) auto auto!important;padding-right:56px!important}
 .ep-sr .sr-bar .ep-back{min-width:0;overflow:hidden;text-overflow:ellipsis}
}
@media (min-width:981px){
 .ep-sr .sr-bar .sr-bar-t{max-width:40vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media (min-width:768px) and (max-width:979px){
 .cg-btn{bottom:calc(var(--mbh,65px) + 14px + env(safe-area-inset-bottom,0px))!important}
}

/* herofix 2026-11-05: detail-page hero must never be clipped under the sticky .ep-bar */
@media (max-width:980px){
  .ep .ep-hero{height:auto!important;max-height:none!important;padding-top:calc(36px + env(safe-area-inset-top,0px));scroll-margin-top:calc(64px + env(safe-area-inset-top,0px))}
  .ep .ep-hero-in{max-width:100%;box-sizing:border-box}
  .ep .ep-h1,.ep .ep-hero .ep-eb,.ep .ep-sub{max-width:100%;overflow-wrap:anywhere}
  .ep .ep-hero .ep-eb{white-space:normal}
}
@media (max-width:640px){.ep .ep-hero{scroll-margin-top:calc(56px + env(safe-area-inset-top,0px))}}

/* phil-layout 2026-11-05: item 05 「追求共赢」 was overlapped by the panel scroll-cue chevron and its body wrapped to an orphan line */
@media (max-width:980px){
  .m3 .mp-philo::after,.m3 .mp-philo2::after{display:none!important}
  .m3 #philosophy .m3-grid .pcard{z-index:1}
  .m3 #philosophy .m3-grid .pcard .pill em{visibility:visible!important;opacity:1!important}
  .m3 #philosophy .m3-grid .pcard p{word-break:keep-all;overflow-wrap:break-word;text-wrap:pretty}
}
/* phil-layout k7: all six bodies full width (mobile3 L253 left 05 at 12.5em), wrap only at punctuation */
@media (max-width:980px){
  .m3 #philosophy .m3-grid .pcard p,.m3 #philosophy .m3-grid .pcard:nth-child(5) p{max-width:none!important;word-break:keep-all!important;overflow-wrap:break-word}
  .m3 .mp-philo2::after{display:none!important}
}
