
/* /library/css/korean-ui.css */
/* Korean UI typography and line-breaking rules shared by every main page. */
html[lang="ko"] body {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: normal;
}

html[lang="ko"] :where(h1, h2, h3, p, a, button, strong, b, span, small) {
  word-break: keep-all;
  line-break: strict;
}

html[lang="ko"] :where(.hero h1, .section h2) {
  text-wrap: balance;
}

html[lang="ko"] .side-label,
html[lang="ko"] .section-tag,
html[lang="ko"] .footer {
  font-size: 13px;
}

html[lang="ko"] .tiny-btn {
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
}

html[lang="ko"] .side-topic span,
html[lang="ko"] .sample small,
html[lang="ko"] .eyebrow {
  font-size: 13px;
}

html[lang="ko"] .hero-actions a,
html[lang="ko"] .focus-item b {
  font-size: 15px;
}

html[lang="ko"] .focus-item span,
html[lang="ko"] .section-copy,
html[lang="ko"] .status {
  font-size: 14px;
  line-height: 1.55;
}

html[lang="ko"] .learning-card strong {
  max-width: 100%;
  font-size: 17px;
  white-space: nowrap;
}

html[lang="ko"] :where(.hero-actions a, .topbar a) {
  white-space: nowrap;
  text-align: center;
}

/* Lift each theme color from the lower-left while keeping the image area white. */
.hero {
  background:
    linear-gradient(90deg, transparent 0 43%, #fff 54% 100%),
    radial-gradient(ellipse 72% 105% at 10% 100%, rgba(var(--accent-rgb), .24) 0%, rgba(var(--accent-rgb), .12) 40%, transparent 72%),
    #fff;
}

.hero::after {
  display: none;
}

html[lang="ko"] .hero-portrait-rotator,
html[lang="ko"] .hero-portrait-rotator::before {
  background: #fff;
}

/* One shared First Weekly logo across every edition. */
html[lang="ko"] .brand {
  min-width: 210px;
  height: 76px;
  display: block;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: none;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 266px 75px;
  box-shadow: none;
  color: transparent;
  filter: none;
  font-size: 0;
  mix-blend-mode: normal;
  overflow: hidden;
}

html[lang="ko"] .brand .brand-mark {
  display: none;
}

/* Phonics is a shared learning program, so distinguish it from age-level colors. */
html[lang="ko"] .topbar a[href^="phonics.php"]::before {
  background: #ef5350;
  box-shadow: 0 0 0 1px rgba(198, 40, 40, .14);
}

html[lang="ko"] .topbar a.active[href^="phonics.php"] {
  border-color: #d84343;
  background: linear-gradient(135deg, #ff8a80, #ef5350 58%, #e53935);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 40, 40, .22);
}

html[lang="ko"] .topbar a.active[href^="phonics.php"]::before {
  background: #fff;
  box-shadow: none;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-panel-toggle {
  background: linear-gradient(150deg, #eafbf1, #d4f5e2 54%, #bdecce);
  color: #173f2b;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-panel-toggle.is-open {
  background: #fff;
  color: #173f2b;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] {
  --phonics-rainbow: linear-gradient(110deg, #ff6b6b 0%, #ffd43b 34%, #51cf66 67%, #339af0 100%);
  --phonics-rainbow-soft: linear-gradient(110deg, rgba(255, 107, 107, .14), rgba(255, 212, 59, .16) 34%, rgba(81, 207, 102, .14) 67%, rgba(51, 154, 240, .14));
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .hero {
  background:
    linear-gradient(90deg, transparent 0 43%, #fff 55% 100%),
    radial-gradient(circle at 2% 100%, rgba(255, 107, 107, .2), transparent 34%),
    radial-gradient(circle at 24% 100%, rgba(255, 212, 59, .21), transparent 38%),
    radial-gradient(circle at 43% 100%, rgba(81, 207, 102, .18), transparent 36%),
    radial-gradient(circle at 56% 100%, rgba(51, 154, 240, .2), transparent 37%),
    #fff;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.sample, .hero-actions .primary) {
  border-color: transparent;
  background: var(--phonics-rainbow);
  color: #18223a;
  box-shadow: 0 9px 24px rgba(51, 154, 240, .18);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .sample {
  color: #fff;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .sample small {
  color: #fff;
  opacity: .92;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.tiny-btn, .hero-actions .secondary, .program-stage__external, .path-chooser__close, .program-stage__close) {
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--phonics-rainbow) border-box;
  color: #18223a;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.eyebrow, .path-chooser) {
  border-color: transparent;
  background: var(--phonics-rainbow-soft);
  color: #18223a;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.side-topic span, .focus-item b, .section-tag, .path-chooser__head span, .path-choice i) {
  background: var(--phonics-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.focus-item, .learning-card, .path-choice) {
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--phonics-rainbow-soft) border-box;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .learning-card:hover,
html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .path-choice:hover {
  background: linear-gradient(#fff, #fff) padding-box, var(--phonics-rainbow) border-box;
  box-shadow: 0 12px 26px rgba(51, 154, 240, .13);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .learning-card.is-selected {
  border-color: transparent;
  background: var(--phonics-rainbow-soft);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .program-stage__title span {
  background: conic-gradient(#ff6b6b 0 25%, #ffd43b 25% 50%, #51cf66 50% 75%, #339af0 75% 100%);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-toolbar {
  border: 1px solid transparent;
  background: linear-gradient(rgba(255, 255, 255, .97), rgba(255, 255, 255, .97)) padding-box, var(--phonics-rainbow) border-box;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-toolbar__status {
  background: conic-gradient(#ff6b6b 0 25%, #ffd43b 25% 50%, #51cf66 50% 75%, #339af0 75% 100%);
  box-shadow: 0 0 0 3px rgba(51, 154, 240, .12);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-toggle {
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--phonics-rainbow) border-box;
  color: #18223a;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-toolbar.is-drawing .fw-annotation-toggle {
  border-color: transparent;
  background: var(--phonics-rainbow);
  color: #18223a;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] :where(.fw-annotation-tool.is-active, .fw-annotation-size.is-active) {
  border-color: transparent;
  background: var(--phonics-rainbow-soft);
  color: #18223a;
  box-shadow: inset 0 0 0 1px rgba(24, 34, 58, .09);
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-color.is-active {
  outline: 2px solid #18223a;
  outline-offset: 1px;
  box-shadow: none;
}

html[lang="ko"] body.theme-kinder[style*="--accent:#2e5bff"] .fw-annotation-divider {
  background: var(--phonics-rainbow);
  opacity: .42;
}

@media (max-width: 460px) {
  html[lang="ko"] .hero h1 {
    font-size: clamp(30px, 9.2vw, 36px);
    line-height: 1.18;
    letter-spacing: -1.6px;
  }
}

/* Mobile: keep every menu logo optically consistent and make age tabs swipe cleanly. */
@media (max-width: 1180px) {
  html[lang="ko"] body .side > .brand {
    background-size: 174px auto;
  }
}

@media (max-width: 820px) {
  html[lang="ko"] .topbar {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  html[lang="ko"] .topbar::-webkit-scrollbar {
    display: none;
  }

  html[lang="ko"] .topbar > a {
    scroll-snap-align: start;
  }
}

/* Desktop: place the brand in the utility row and align account controls with
   the age-navigation controls. Mobile keeps the original stacked layout. */
@media (min-width: 1181px) {
  html[lang="ko"] body.has-top-utility .side > .brand {
    position: absolute;
    top: -56px;
    left: 0;
    width: 226px;
    height: 44px;
    background-size: 174px auto;
  }

  html[lang="ko"] body.theme-video.has-top-utility .side > .brand {
    background-size: 154px auto;
  }

  html[lang="ko"] body.theme-teens.has-top-utility .side > .brand {
    background-size: 145px auto;
  }

  html[lang="ko"] body.has-top-utility .side > .side-card:first-of-type {
    min-height: 73px;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
  }

  html[lang="ko"] body.has-top-utility .side > .side-card:first-of-type .side-label {
    display: none;
  }

  html[lang="ko"] body.has-top-utility .side > .side-card:first-of-type .account-row {
    width: 100%;
  }

  html[lang="ko"] body.has-top-utility .side > .side-card:first-of-type .tiny-btn {
    min-height: 50px;
    border-radius: 14px;
  }
}


/* /library/css/age-learning-menu.css */
/* Level-colored learning menu cards */
#learning-menu {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), .18);
  background:
    radial-gradient(circle at 96% 2%, rgba(var(--accent-rgb), .11), transparent 29%),
    #fff;
}

#learning-menu .section-head {
  position: relative;
  z-index: 1;
}

#learning-menu .section-tag {
  width: max-content;
  padding: 7px 11px;
  border: 1px solid rgba(var(--accent-rgb), .16);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .09);
  letter-spacing: .3px;
}

#learning-menu .learning-grid {
  position: relative;
  z-index: 1;
  counter-reset: level-menu-card;
}

#learning-menu .learning-card {
  --card: var(--accent);
  --card-rgb: var(--accent-rgb);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 184px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 23px;
  border: 1px solid rgba(var(--accent-rgb), .23);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff 18%, rgba(var(--accent-rgb), .065));
  box-shadow: 0 10px 26px rgba(var(--accent-rgb), .075);
  color: var(--ink);
  text-align: left;
  counter-increment: level-menu-card;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#learning-menu .learning-card::before {
  content: counter(level-menu-card, decimal-leading-zero);
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: rgba(var(--accent-rgb), .72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .8px;
  text-align: center;
}

#learning-menu .learning-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -42px;
  bottom: -54px;
  width: 128px;
  height: 128px;
  border: 20px solid rgba(var(--accent-rgb), .05);
  border-radius: 50%;
}

#learning-menu .icon-box {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  margin-bottom: 17px;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 18px;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(var(--accent-rgb), .22);
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

#learning-menu .icon-box svg {
  width: 29px;
  height: 29px;
  stroke-width: 2;
}

#learning-menu .learning-card strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

#learning-menu .status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .09);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

#learning-menu .status.stars {
  background: #fff6d8;
  color: #f2a600;
  font-size: 17px;
  letter-spacing: .6px;
}

#learning-menu .status.stars .off {
  color: #d6dce5;
}

#learning-menu .learning-card:hover,
#learning-menu .learning-card.is-selected {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), .56);
  background: linear-gradient(145deg, #fff 8%, rgba(var(--accent-rgb), .12));
  box-shadow: 0 17px 32px rgba(var(--accent-rgb), .16);
}

#learning-menu .learning-card:hover .icon-box,
#learning-menu .learning-card.is-selected .icon-box {
  transform: translateY(-2px) scale(1.035);
  box-shadow: 0 13px 24px rgba(var(--accent-rgb), .28);
}

#learning-menu .learning-card:active {
  transform: translateY(-1px);
}

#learning-menu .learning-card:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), .34);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  #learning-menu .learning-card {
    min-height: 172px;
    padding: 20px;
  }
}

@media (max-width: 460px) {
  #learning-menu .learning-card {
    min-height: 156px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #learning-menu .learning-card,
  #learning-menu .icon-box {
    transition: none;
  }
}


/* /library/css/learning-menu-icons.css */
/* Content-specific learning icons shared by every page and age level. */
#learning-menu .learning-card:is(
  [data-program-key="newspaper"],
  [data-program-key="reading-studio"],
  [data-program-key="word-learning"],
  [data-program-key="sentence-learning"],
  [data-program-key="listening-learning"],
  [data-program-key="speaking-learning"],
  [data-program-key="writing-learning"],
  [data-program-key="word-quiz"],
  [data-program-key="reading-quiz"]
) .icon-box svg {
  display: none;
}

#learning-menu .learning-card:is(
  [data-program-key="newspaper"],
  [data-program-key="reading-studio"],
  [data-program-key="word-learning"],
  [data-program-key="sentence-learning"],
  [data-program-key="listening-learning"],
  [data-program-key="speaking-learning"],
  [data-program-key="writing-learning"],
  [data-program-key="word-quiz"],
  [data-program-key="reading-quiz"]
) .icon-box::before {
  content: "";
  width: 31px;
  height: 31px;
  background: currentColor;
  -webkit-mask: var(--learning-icon) center / contain no-repeat;
  mask: var(--learning-icon) center / contain no-repeat;
}

#learning-menu [data-program-key="newspaper"] {
  --learning-icon: url("/library/css/../img/icons/learning-newspaper.svg");
}

#learning-menu [data-program-key="reading-studio"] {
  --learning-icon: url("/library/css/../img/icons/learning-reading-studio.svg");
}

#learning-menu [data-program-key="word-learning"] {
  --learning-icon: url("/library/css/../img/icons/learning-words.svg");
}

#learning-menu [data-program-key="sentence-learning"] {
  --learning-icon: url("/library/css/../img/icons/learning-sentence.svg");
}

#learning-menu [data-program-key="listening-learning"] {
  --learning-icon: url("/library/css/../img/icons/learning-listening.svg");
}

#learning-menu [data-program-key="speaking-learning"] {
  --learning-icon: url("/library/css/../img/icons/learning-speaking.svg");
}

#learning-menu [data-program-key="writing-learning"] {
  --learning-icon: url("/library/css/../img/icons/learning-writing.svg");
}

#learning-menu [data-program-key="word-quiz"] {
  --learning-icon: url("/library/css/../img/icons/learning-word-quiz.svg");
}

#learning-menu [data-program-key="reading-quiz"] {
  --learning-icon: url("/library/css/../img/icons/learning-reading-quiz.svg");
}


/* /library/css/top-utility-menu.css */
.top-utility-wrap {
  width: 100%;
  max-width: 1500px;
  min-height: 52px;
  margin: 0 auto;
  padding: 6px 22px 0;
}

.top-utility-menu {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 8px 6px;
}

.top-utility-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.top-utility-menu button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5f6d82;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.top-utility-language {
  flex: 0 0 auto;
  padding-inline: 14px !important;
  background: rgba(49, 86, 216, .08) !important;
  color: #3156d8 !important;
}

.top-utility-language svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-utility-language:hover {
  background: rgba(49, 86, 216, .15) !important;
}

.top-utility-menu button:hover {
  background: #eaf0ff;
  color: #2e5bff;
}

.top-utility-menu button:active {
  transform: translateY(1px);
}

.top-utility-menu button:focus-visible {
  outline: 3px solid rgba(46, 91, 255, .28);
  outline-offset: 1px;
}

.top-utility-menu button[data-utility-action="free-sample"] {
  margin-left: 4px;
  padding-inline: 13px;
  background: #3156d8;
  color: #fff;
  box-shadow: 0 5px 13px rgba(49, 86, 216, .2);
}

.top-utility-menu button[data-utility-action="free-sample"]:hover {
  background: #2449c7;
  color: #fff;
}

body.has-top-utility .shell {
  padding-top: 12px;
}

@media (max-width: 640px) {
  .top-utility-wrap {
    min-height: 0;
    padding: 8px 12px 0;
  }

  .top-utility-menu {
    min-height: 0;
    display: block;
    overflow: visible;
    padding: 0 0 8px;
  }

  .top-utility-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-left: 0;
  }

  .top-utility-language-picker,
  .top-utility-language {
    width: 100%;
  }

  .top-utility-menu button {
    min-height: 33px;
    min-width: 0;
    padding: 7px 4px;
    font-size: 11px;
  }

  .top-utility-menu button[data-utility-action="free-sample"] {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-utility-menu button {
    transition: none;
  }
}

.top-utility-language-picker {
  position: relative;
  z-index: 220;
}

.top-utility-language > b {
  margin-left: 2px;
  font-size: 10px;
  transition: transform .18s ease;
}

.top-utility-language[aria-expanded="true"] > b {
  transform: rotate(180deg);
}

.top-utility-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 230;
  width: 220px;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #dce4f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(28, 53, 88, .18);
  backdrop-filter: blur(16px);
}

.top-utility-language-menu[hidden] {
  display: none !important;
}

.top-utility-menu .top-utility-language-menu button {
  width: 100%;
  min-height: 40px;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  color: #34435a;
  font-size: 13px;
  text-align: left;
}

.top-utility-menu .top-utility-language-menu button b {
  color: #3156d8;
  opacity: 0;
}

.top-utility-menu .top-utility-language-menu button:hover {
  background: #eef3ff;
}

.top-utility-menu .top-utility-language-menu button.is-active {
  background: #eaf0ff;
  color: #2449c7;
}

.top-utility-menu .top-utility-language-menu button.is-active b {
  opacity: 1;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .brand {
  direction: ltr;
}

html[dir="rtl"] .top-utility-actions {
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] .top-utility-language-menu {
  right: auto;
  left: 0;
}

html[dir="rtl"] .top-utility-menu .top-utility-language-menu button {
  text-align: right;
}

html[dir="rtl"] :where(.section-head, .category-news-intro, .video-curriculum-head) {
  direction: rtl;
}

/* Keep the age banner artwork on the right while Arabic copy reads RTL on the
   colored left side. Inheriting RTL on the flex container swapped both zones. */
html[dir="rtl"] .common-news-banner {
  direction: ltr;
}

html[dir="rtl"] .common-news-banner__copy {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .common-news-banner__copy > * {
  direction: rtl;
  text-align: right;
}

@media (max-width: 640px) {
  .top-utility-language-menu {
    position: fixed;
    top: 48px;
    right: 12px;
    left: auto;
    width: min(260px, calc(100vw - 24px));
  }

  html[dir="rtl"] .top-utility-language-menu {
    right: auto;
    left: 12px;
  }
}

