* {
  box-sizing: border-box;
}
:root {
  --bg: #faf8f6;
  --surface: #fff;
  --text: #302b31;
  --muted: #6d666d;
  --line: #e5dfdd;
  --soft: #f4f0ed;
  --accent: #a93e35;
  --plum: #563551;
  --peach: #f9e4db;
  --lilac: #ede5f2;
  --mint: #e0eee8;
  --sand: #faecd0;
  --blue: #e3ebf6;
  --family: #f7e9df;
  --nav: 72px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #201e22;
  --surface: #2c292e;
  --text: #f7f0f1;
  --muted: #c3b8be;
  --line: #453e46;
  --soft: #383139;
  --accent: #ffac9c;
  --peach: #57372f;
  --lilac: #46364f;
  --mint: #2d483e;
  --sand: #4e402b;
  --blue: #313f54;
  --family: #40312c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #201e22;
    --surface: #2c292e;
    --text: #f7f0f1;
    --muted: #c3b8be;
    --line: #453e46;
    --soft: #383139;
    --accent: #ffac9c;
    --peach: #57372f;
    --lilac: #46364f;
    --mint: #2d483e;
    --sand: #4e402b;
    --blue: #313f54;
    --family: #40312c;
    color-scheme: dark;
  }
}
html {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Apple SD Gothic Neo',
    'Malgun Gothic',
    sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  background: var(--bg);
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled,
select:disabled {
  cursor: default;
  opacity: 0.48;
}
button,
a,
select,
input,
summary {
  outline-offset: 3px;
}
:focus-visible {
  outline: 3px solid #bb7654;
}
header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  max-width: 1168px;
  padding: 0 40px;
  margin: auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand,
.settings-link,
.date,
.hero-tag,
.secondary,
.primary,
.hero-btn,
.review-link,
.text-link,
.ib,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand {
  min-height: 44px;
  gap: 10px;
  font-size: 24px;
  letter-spacing: -1.3px;
  font-weight: 770;
}
.brand-light {
  font-weight: 480;
}
.settings-link {
  min-height: 44px;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
main {
  max-width: 1168px;
  margin: 0 auto;
  padding: 30px 40px calc(var(--nav) + env(safe-area-inset-bottom) + 36px);
  outline: 0 !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.28;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 760;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 17px;
}
p {
  color: var(--muted);
}
small,
.hint {
  font-size: 14px;
  color: var(--muted);
}
.dash-heading,
.page-heading {
  margin-bottom: 22px;
}
.date {
  justify-content: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 7px;
}
.page-heading p {
  margin-top: 7px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.13fr) minmax(245px, 1fr);
  gap: 18px;
}
.hero,
.review-card,
.surface,
.metrics,
.mode-card,
.family-banner {
  border-radius: 20px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(112deg, #432a45, #5b3759 70%, #694266);
  min-height: 238px;
  color: #fff8f4;
  padding: 26px 30px;
}
.hero:before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 0 50%;
  background-image: radial-gradient(#f7cdb43a 1px, transparent 1px);
  background-size: 15px 15px;
  mask-image: linear-gradient(to right, transparent, #000);
}
.studio {
  position: absolute;
  right: 1%;
  width: 45%;
  height: 100%;
  max-height: 245px;
  top: 50%;
  transform: translateY(-50%);
  object-fit: contain;
  z-index: -1;
}
.hero-text {
  max-width: 58%;
}
.hero-tag {
  gap: 6px;
  color: #ffdfd2;
  font-size: 13px;
  font-weight: 600;
}
.lesson-no,
.kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.lesson-no {
  margin: 18px 0 3px;
  color: #f6bdae;
}
.hero h2 {
  font-size: clamp(23px, 2.45vw, 33px);
  line-height: 1.25;
}
.hero p {
  color: #e9d7e5;
  font-size: 15px;
  margin-top: 5px;
}
.hero-btn,
.primary,
.secondary,
.review-link {
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 650;
  gap: 6px;
}
.hero-btn {
  margin-top: 18px;
  background: #ffdfce;
  color: #4c2a38;
}
.primary {
  background: var(--plum);
  color: #fff8fc;
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}
.review-link {
  width: 100%;
  background: var(--soft);
  margin-top: auto;
}
.review-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 23px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-top h2 {
  font-size: 20px;
}
.review-top .badge {
  width: 35px;
  height: 35px;
  border-radius: 11px;
}
.review-count {
  letter-spacing: -0.06em;
  font-size: 44px;
  font-weight: 680;
  line-height: 1.2;
  margin: 14px 0 1px;
}
.review-count small {
  margin-left: 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.review-card p {
  font-size: 14px;
  margin: 0 0 15px;
}
main > section,
main > .two,
main > .family-banner {
  margin-top: 24px;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  min-height: 30px;
}
.title-row h2 {
  font-size: 21px;
}
.text-link {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
}
.title-row .text-link {
  margin-block: -7px;
}
.metrics {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 21px 0;
}
.metric {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 22px;
}
.metric + .metric {
  border-left: 1px solid var(--line);
}
.metric > div {
  display: flex;
  flex-direction: column;
}
.metric > div > span {
  font-size: 14px;
  color: var(--muted);
}
.metric strong {
  font-size: 26px;
  letter-spacing: -0.05em;
  line-height: 1.25;
}
.metric small {
  margin-left: 4px;
  font-weight: 500;
  letter-spacing: 0;
}
.badge {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  border-radius: 14px;
}
.peach {
  background: var(--peach);
  color: #a85240;
}
.lilac {
  background: var(--lilac);
  color: #80548d;
}
.mint {
  background: var(--mint);
  color: #437b69;
}
.blue {
  background: var(--blue);
  color: #526f99;
}
.sand {
  background: var(--sand);
  color: #906b2e;
}
.modes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.mode-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 17px;
}
.mode-card strong {
  margin: 12px 0 3px;
  font-size: 17px;
  letter-spacing: -0.045em;
}
.mode-card small,
.family-banner small {
  font-size: 13px;
}
.family-banner {
  display: flex;
  align-items: center;
  gap: 17px;
  background: var(--family);
  padding: 6px 23px;
  min-height: 83px;
}
.family-banner img {
  width: 80px;
  height: 68px;
}
.family-banner strong,
.family-banner small {
  display: block;
}
.family-banner strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}
.family-banner small {
  margin-top: 3px;
}
.family-open {
  margin-left: auto;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}
nav {
  position: fixed;
  z-index: 4;
  inset: auto 0 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav > div {
  margin: auto;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--nav);
  align-items: center;
}
nav a {
  justify-self: center;
  width: 81%;
  height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  border-radius: 14px;
}
nav a[aria-current='page'] {
  background: var(--peach);
  color: var(--accent);
  font-weight: 700;
}
.surface,
.info {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 23px;
}
.surface p + .toolbar,
.surface .hint {
  margin-top: 12px;
}
.lesson-list,
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.lesson-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kicker,
.group-label {
  color: var(--accent);
}
.lesson-card h2,
.lesson-card p {
  margin: 10px 0;
}
.progress {
  height: 6px;
  border-radius: 6px;
  background: var(--soft);
  overflow: hidden;
  margin: 12px 0 6px;
}
.progress i {
  display: block;
  height: 100%;
  background: #ba7269;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.group-label {
  font-weight: 630;
  font-size: 13px;
}
.info summary {
  font-weight: 700;
  min-height: 44px;
  align-content: center;
}
.info h3 {
  margin-top: 18px;
}
.info p {
  margin-top: 6px;
}
.structure {
  margin-top: 12px;
  padding: 14px;
  background: var(--lilac);
  border-radius: 10px;
  font-weight: 650;
}
.vocabulary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.vocabulary span,
.pill {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 14px;
}
.toolbar,
.filter-row,
.rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.toolbar {
  margin: 16px 0;
}
.group .title-row {
  margin-bottom: 10px;
}
.sentence {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.sent-copy {
  flex: 1;
  min-width: 0;
}
.sent-copy > * {
  display: block;
}
.sent-copy strong {
  font-size: 19px;
  font-weight: 620;
}
.sent-copy span {
  color: var(--muted);
  font-size: 15px;
}
.sent-copy small {
  font-size: 12px;
}
.ib {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
  background: transparent;
  border: 0;
  color: var(--muted);
}
.ib.marked {
  color: var(--accent);
}
.marked svg {
  fill: var(--peach);
}
.choose {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.choose input {
  width: 18px;
  height: 18px;
  accent-color: #814971;
}
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.field.inline {
  flex: 0 1 auto;
}
.field select {
  max-width: 100%;
  padding: 9px 33px 9px 12px;
  border: 1px solid var(--line);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m2 2 5 4 5-4' fill='none' stroke='%23888088' stroke-width='1.7'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--text);
  border-radius: 9px;
  min-height: 44px;
  appearance: none;
}
.filter-row {
  align-items: flex-end;
  gap: 12px;
  margin: 12px 0;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 47px;
  border-bottom: 1px solid var(--line);
}
.switch input {
  accent-color: #895279;
  width: 19px;
  height: 19px;
}
.hint {
  line-height: 1.6;
}
.flash {
  text-align: center;
  margin-top: 18px;
}
.flash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.flash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  gap: 12px;
  padding: 20px 0;
}
.english {
  font-size: clamp(26px, 3.8vw, 46px);
  letter-spacing: -0.04em;
}
.prompt {
  font-size: 25px;
  color: var(--text);
}
.hidden-text {
  color: var(--muted);
  font-size: 20px;
}
.rating,
.center {
  justify-content: center;
}
.rating {
  margin: 12px 0;
}
.rate {
  border: 0;
  border-radius: 10px;
  min-width: 82px;
  min-height: 44px;
  font-weight: 650;
  color: var(--text);
}
.r0 {
  background: var(--peach);
}
.r1 {
  background: var(--sand);
}
.r2 {
  background: var(--mint);
}
.empty {
  text-align: center;
  margin-top: 18px;
  padding: 38px 20px;
}
.empty h2 {
  margin: 10px;
}
.empty p {
  margin-bottom: 15px;
}
.empty button {
  margin: 4px;
}
.data {
  list-style: none;
  margin: 0;
  padding: 0;
}
.data li,
.data p {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.data strong {
  color: var(--text);
}
.data p:last-child,
.data li:last-child {
  border: 0;
}
#dock {
  position: fixed;
  z-index: 3;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  pointer-events: none;
}
.dock-inner {
  pointer-events: auto;
  background: var(--plum);
  color: #fff8fc;
  max-width: 900px;
  margin: 0 auto 6px;
  border-radius: 15px;
  padding: 9px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 4px 15px #28152725;
}
.dock-info {
  min-width: 0;
  flex: 1;
}
.dock-info small,
.dock-info strong {
  display: block;
  color: inherit;
}
.dock-info small {
  font-size: 13px;
  color: #f3d6e9;
}
.dock-controls {
  display: flex;
}
.dock-controls button {
  color: inherit;
}
.with-dock main {
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 160px);
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 19px;
  width: min(540px, 94vw);
  max-height: 85dvh;
  padding: 25px;
}
dialog::backdrop {
  background: #21162670;
}
dialog form {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}
dialog p {
  margin: 12px 0;
}
#notice {
  position: fixed;
  z-index: 9;
  bottom: calc(var(--nav) + 16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #352a36;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  width: max-content;
  max-width: 90vw;
  display: none;
  font-size: 14px;
}
#notice.visible {
  display: block;
}
.with-dock #notice {
  bottom: calc(var(--nav) + 120px + env(safe-area-inset-bottom));
}
.skip {
  position: fixed;
  left: -300px;
  top: 0;
}
.skip:focus {
  left: 0;
  background: var(--surface);
  padding: 12px;
  z-index: 10;
}
@media (hover: hover) {
  .mode-card:hover,
  .lesson-card:hover,
  .secondary:hover,
  .ib:hover,
  nav a:hover {
    background: var(--soft);
  }
  .hero-btn:hover {
    background: #fff0e6;
  }
  .family-banner:hover {
    outline: 1px solid var(--line);
  }
}
@media (max-width: 850px) {
  .header-inner,
  main {
    padding-left: 23px;
    padding-right: 23px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(200px, 1fr);
  }
  .metric {
    padding: 0 13px;
    gap: 8px;
  }
  .metric .badge {
    width: 35px;
    height: 35px;
  }
  .modes {
    gap: 8px;
  }
  .mode-card {
    padding: 15px 11px;
  }
  .mode-card small {
    font-size: 12px;
  }
  .lesson-list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  :root {
    --nav: 65px;
  }
  .header-inner {
    height: 56px;
  }
  .header-inner,
  main {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .brand {
    font-size: 21px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  main {
    padding-top: 22px;
  }
  .dash-heading,
  .page-heading {
    margin-bottom: 16px;
  }
  .hero-grid,
  .two,
  .lesson-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero {
    min-height: 210px;
    padding: 21px;
  }
  .hero-text {
    max-width: 62%;
  }
  .hero h2 {
    font-size: 25px;
  }
  .studio {
    width: 43%;
    right: -1%;
  }
  .hero-btn {
    margin-top: 14px;
  }
  .lesson-no {
    margin-top: 12px;
  }
  .review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    padding: 16px 18px;
  }
  .review-count {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 32px;
  }
  .review-count small {
    font-size: 14px;
  }
  .review-card p {
    margin: 0;
  }
  .review-link {
    grid-column: 2;
    font-size: 14px;
    padding: 4px 12px;
  }
  .review-top h2 {
    font-size: 18px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    padding: 3px 12px;
  }
  .metric,
  .metric + .metric {
    padding: 13px 4px;
    border-left: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metric strong {
    font-size: 23px;
  }
  .metric > div > span {
    font-size: 13px;
  }
  .metric .badge {
    width: 37px;
    height: 37px;
  }
  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .mode-card {
    padding: 14px;
    min-height: 105px;
  }
  .mode-card:last-child {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    align-items: center;
    min-height: 65px;
  }
  .mode-card:last-child .badge {
    grid-row: 1/3;
  }
  .mode-card:last-child strong,
  .mode-card:last-child small {
    margin: 0;
  }
  .family-banner {
    gap: 9px;
    padding: 8px 12px;
  }
  .family-banner img {
    width: 62px;
  }
  .family-open {
    display: none;
  }
  .surface {
    padding: 16px;
  }
  .sentence {
    gap: 1px;
  }
  .choose {
    width: 44px;
    flex-shrink: 0;
  }
  .sent-copy strong {
    font-size: 17px;
  }
  .ib {
    width: 44px;
  }
  .filter-row {
    flex-wrap: wrap;
  }
  .field {
    min-width: 90px;
  }
  .dock-inner {
    border-radius: 12px 12px 0 0;
    margin: 0;
    gap: 5px;
    padding: 6px 8px;
  }
  .dock-icon {
    display: none;
  }
  .dock-info strong {
    font-size: 14px;
  }
  .dock-controls .ib {
    width: 44px;
  }
  .dock-info small {
    font-size: 12px;
  }
  .flash-center {
    min-height: 215px;
  }
  nav a {
    height: 48px;
    width: 84%;
  }
  main > section,
  main > .family-banner {
    margin-top: 21px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .badge {
    color: #f0d4cb;
  }
}
:root[data-theme='dark'] .badge {
  color: #f0d4cb;
}
