
:root {
  --paper: #f6f7fa;
  --white: #fff;
  --ink: #191f28;
  --muted: #6b7684;
  --line: #edf0f4;
  --green: #2763e7;
  --primary: #2763e7;
  --primary-soft: #eaf1ff;
  --pale: #eef3fb;
  --gold: #ffc94f;
  --softgold: #fff6da;
  --shadow: 0 6px 24px #1c315807;
  font-family: 'Apple SD Gothic Neo', 'Thonburi', 'Hiragino Sans', 'PingFang TC', 'Kohinoor Devanagari', Arial, sans-serif;
  color: var(--ink);
  background: #e9edf3;
  font-synthesis: weight style;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #2465eb;
  outline-offset: 4px;
}
a { color: inherit; }
img { max-width: 100%; }
svg, .ui-icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.ui-icon { object-fit: contain; display: inline-block; }
.ui-icon-back { transform: rotate(180deg); }
.brand-icon { width: 22px; height: 22px; display: inline-block; }
button { touch-action: manipulation; }
button:not(:disabled), a { transition: background-color .16s, box-shadow .16s, transform .16s; }
button:active:not(:disabled) { transform: scale(.985); }

#app {
  max-width: 520px;
  min-height: 100dvh;
  margin: auto;
  background: var(--paper);
  box-shadow: 0 16px 80px #1e2f4812;
  position: relative;
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 22px;
  position: sticky;
  top: 0;
  z-index: 25;
  background: #f6f7faf2;
  backdrop-filter: blur(18px);
}
.logo {
  background: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1.1px;
  line-height: 1;
  min-height: 46px;
  padding: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}
.logo-mark { width: 31px; height: 31px; object-fit: contain; }
.brand-app-icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; object-fit: contain; }
.brand-wordmark { width: 103px; height: 32px; flex: 0 0 103px; object-fit: contain; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.balance {
  background: #fff;
  box-shadow: 0 2px 10px #243a5a06;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px 8px 9px;
  min-height: 42px;
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.coin { width: 27px; height: 27px; object-fit: contain; }
.language-button {
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.language-button :is(svg,.ui-icon) { width: 25px; height: 25px; }
.preview {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 2px 23px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #8b95a1;
  line-height: 1.6;
}
.preview:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #8fb2fb; flex: 0 0 auto; }
.banner {
  margin: 0 22px;
  min-height: 40px;
  background: #e9edf3;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  border-radius: 12px;
  color: #8b95a1;
  font-size: 10px;
  line-height: 1.5;
  padding: 6px 12px;
  text-align: center;
}
.banner strong { font-size: 11px; font-weight: 500; }
.page { padding: 0 22px; }

.home-intro { padding: 26px 1px 22px; }
.eyebrow { color: #5681d7; font-size: 12px; font-weight: 700; letter-spacing: .02em; margin: 0 0 10px; }
.home-intro h1 {
  font-size: 32px;
  line-height: 1.36;
  letter-spacing: -1.4px;
  margin: 0 0 12px;
  font-weight: 800;
  white-space: pre-line;
}
.home-intro p:last-child { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 0; max-width: 370px; }
.feature {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  background: #eaf0ff;
  min-height: 190px;
  box-shadow: 0 5px 18px #364c7a05;
  margin: 0 0 15px;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 23px 24px;
}
.feature.saju { background: #e7f6f1; }
.feature-art { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 140px; height: 158px; object-fit: contain; z-index: -2; }
.feature:after { position: absolute; content: ''; inset: 0; background: linear-gradient(90deg,#eaf0ff 7%,#eaf0fff5 28%,#eaf0ff9c 47%,#eaf0ff00 68%); z-index: -1; pointer-events: none; }
.feature.saju:after { background: linear-gradient(90deg,#e7f6f1 7%,#e7f6f1f5 28%,#e7f6f19c 47%,#e7f6f100 68%); }
.feature-content { width: calc(100% - 128px); max-width: 208px; min-width: 0; position: relative; z-index: 1; }
.feature-kind { display: inline-flex; align-items: center; background: #ffffffc7; color: #5a7bc2; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.saju .feature-kind { color: #2a8c72; }
.feature h2 { font-size: 23px; font-weight: 800; line-height: 1.4; letter-spacing: -.8px; margin: 0 0 7px; max-width: 190px; }
.feature p { font-size: 13px; line-height: 1.6; margin: 0 0 13px; color: #6b7b98; max-width: 175px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.feature.saju p { color: #69847b; }
.feature-bottom { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; line-height: 1.6; }
.round-arrow { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%; background: #fff9; color: var(--primary); display: grid; place-items: center; }
.round-arrow :is(svg,.ui-icon) { width: 23px; height: 23px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 31px 1px 15px; gap: 12px; }
.section-heading h2 { font-size: 21px; font-weight: 800; letter-spacing: -.6px; margin: 0; }
.text-link { background: none; color: var(--muted); font-size: 13px; padding: 12px 0; line-height: 1.7; }
.empty-recent { border-radius: 20px; padding: 27px 18px; color: #8b95a1; font-size: 14px; line-height: 1.8; text-align: center; background: #fff; }
.login-card { margin: 22px 0 0; padding: 21px 0 4px; }
.login-message { font-size: 13px; color: #7b8693; line-height: 1.85; text-align: center; margin: 0 5px 16px; white-space: pre-line; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social { background: #fff; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 15px 8px; min-height: 52px; border-radius: 16px; font-size: 13px; font-weight: 700; line-height: 1.6; box-shadow: 0 3px 12px #273e5e04; }
.social :is(svg,.ui-icon) { width: 20px; height: 20px; }
.account-card { border-radius: 20px; padding: 20px; margin-top: 24px; background: #fff; }
.account-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.small { font-size: 13px; color: var(--muted); line-height: 1.85; }
.tiny { font-size: 12px; color: var(--muted); line-height: 1.8; }
.foot-note { margin: 24px 6px 5px; text-align: center; font-size: 11px; line-height: 1.9; color: #929ca9; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px,100%);
  min-height: 84px;
  padding: 9px 23px max(12px,env(safe-area-inset-bottom));
  display: flex;
  background: #ffffffed;
  backdrop-filter: blur(24px);
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -4px 25px #1b2f4d05;
  z-index: 40;
  justify-content: space-around;
  align-items: flex-start;
}
.nav-item { background: none; display: flex; align-items: center; flex-direction: column; gap: 3px; font-size: 11px; min-height: 61px; width: 92px; padding: 4px 8px; position: relative; color: #8b95a1; line-height: 1.6; border-radius: 17px; }
.nav-item :is(svg,.ui-icon) { width: 32px; height: 32px; object-fit: contain; z-index: 1; }
.nav-item.active { color: var(--primary); font-weight: 800; }
.nav-item.active:before { content: ''; position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 58px; height: 37px; border-radius: 13px; background: #eaf1ff; }
.nav-item span { position: relative; }

.subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
.back { display: flex; gap: 5px; align-items: center; background: none; color: #687482; font-size: 13px; min-height: 42px; padding: 7px 0; }
.back :is(svg,.ui-icon) { width: 20px; height: 20px; }
.pill { font-size: 11px; line-height: 1.6; padding: 6px 10px; border-radius: 99px; color: #7f8a99; background: #e9edf3; text-align: right; }
.page-title { font-size: 30px; font-weight: 800; line-height: 1.45; letter-spacing: -1.15px; margin: 15px 0 12px; white-space: pre-line; overflow-wrap: break-word; }
.page-description { font-size: 15px; line-height: 1.85; color: var(--muted); margin: 0 0 23px; }
.notice { border-radius: 17px; background: #eef1f6; padding: 16px 17px; font-size: 12px; line-height: 1.9; color: #7b8695; margin: 18px 0; overflow-wrap: break-word; }
.notice.green { background: #eaf6f0; color: #668a7e; }
.notice strong { color: #576578; }
.reader-cover { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.reader-cover-wrap { position: relative; overflow: hidden; margin: 24px 0 27px; border-radius: 26px; }
.reading-overview { padding: 24px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); margin: 23px 0; }
.reading-overview strong { font-size: 21px; font-weight: 800; line-height: 1.6; letter-spacing: -.5px; display: block; margin-bottom: 10px; }
.primary, .secondary, .gold-button { width: 100%; border-radius: 16px; padding: 17px 16px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 9px; line-height: 1.6; min-height: 56px; }
.primary { background: var(--primary); color: #fff; box-shadow: 0 5px 16px #2763e712; }
.primary :is(svg,.ui-icon), .secondary :is(svg,.ui-icon), .gold-button :is(svg,.ui-icon) { width: 22px; height: 22px; }
.primary .ui-icon { width: 25px; height: 25px; padding: 2px; border-radius: 8px; background: #fffffff0; }
.secondary { background: var(--primary-soft); color: var(--primary); }
.gold-button { background: #ffd66c; color: #694b09; }
.muted-button { background: none; padding: 15px 8px; font-size: 13px; line-height: 1.8; color: var(--muted); text-align: center; width: 100%; min-height: 48px; }
.reader-card { background: #fff; border-radius: 25px; overflow: hidden; margin: 25px 0; box-shadow: var(--shadow); scroll-margin-top: 93px; }
.reader-card .reader-image { width: 100%; height: auto; max-height: none; object-fit: contain; display: block; }
.reader-body { padding: 25px 24px 27px; }
.section-index { font-size: 12px; font-weight: 700; color: #8ba8e5; letter-spacing: .03em; display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 14px; }
.reader-body h2 { font-size: 25px; font-weight: 800; line-height: 1.5; letter-spacing: -.8px; margin: 0 0 16px; }
.reader-body p { font-size: 17px; line-height: 1.9; color: #4e5968; white-space: pre-line; overflow-wrap: break-word; }
.teaser { font-size: 19px !important; color: #323f53 !important; font-weight: 700; line-height: 1.8 !important; letter-spacing: -.35px; }
.tag { font-size: 11px; display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; background: #edf4ff; padding: 5px 8px; color: #5986de; letter-spacing: 0; font-family: inherit; line-height: 1.6; }
.tag.gold { color: #a77a22; background: #fff4d4; }
.tag :is(svg,.ui-icon) { width: 16px; height: 16px; }
.blur-lock { position: relative; overflow: hidden; margin: 22px 0 10px; border-radius: 20px; padding: 24px 16px; background: #f1f4f9; text-align: center; min-height: 180px; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 10px; }
.blur-lines { position: absolute; inset: 20px; opacity: .35; filter: blur(7px); background: repeating-linear-gradient(0deg,#9eacc244 0 9px,transparent 9px 28px); pointer-events: none; }
.blur-lock>*:not(.blur-lines) { z-index: 1; position: relative; }
.blur-lock p { font-size: 13px; line-height: 1.8; margin: 0 0 4px; color: #7d8a9e; }
.blur-lock .primary, .blur-lock .secondary { font-size: 14px; min-height: 50px; padding: 13px; }
.blur-lock .secondary { background: #ffffffdf; }
.hint-box { background: #f4f7fc; border-radius: 17px; padding: 18px; margin-top: 18px; font-size: 15px; line-height: 1.9; color: #6b7789; white-space: pre-line; }
.hint-box strong { display: block; color: #5380d5; font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.ask-link { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px; background: #edf3ff; color: var(--primary); border-radius: 15px; width: 100%; min-height: 53px; font-weight: 700; font-size: 14px; line-height: 1.7; text-align: left; }
.ask-link :is(svg,.ui-icon) { width: 23px; height: 23px; }
.shinsal-card { margin: 20px 0; border-radius: 20px; overflow: hidden; background: #f6f8fc; }
.shinsal-card img { width: 100%; display: block; }
.shinsal-card>div { padding: 21px; }
.shinsal-card h3 { font-size: 23px; font-weight: 800; margin: 0 0 9px; letter-spacing: -.5px; }
.shinsal-card p { font-size: 16px; margin: 0; }
.shinsal-card small { font-size: 11px; color: #939dac; display: block; margin-top: 12px; line-height: 1.85; }
.reader-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 19px 0 0; }
.reader-summary a { background: #f2f5fa; color: #7b899b; border-radius: 9px; text-decoration: none; font-size: 12px; padding: 9px 11px; line-height: 1.7; }
.sticky-unlock { position: fixed; bottom: calc(83px + env(safe-area-inset-bottom,0px)); width: min(520px,100%); left: 50%; transform: translateX(-50%); padding: 12px 22px; background: #f6f7faed; backdrop-filter: blur(18px); z-index: 35; }
.has-unlock { padding-bottom: 86px !important; }

.shop-hero { text-align: center; padding: 23px 0 18px; }
.shop-coin { width: 100px; height: 100px; object-fit: contain; filter: drop-shadow(0 10px 18px #d09b2420); }
.shop-hero h1 { font-size: 30px; font-weight: 800; line-height: 1.5; letter-spacing: -1px; margin: 18px 0 10px; }
.shop-hero p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.balance-card { background: var(--primary); color: #fff; border-radius: 23px; padding: 25px 23px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; box-shadow: 0 8px 24px #2763e71a; }
.balance-card span { font-size: 13px; color: #c7d9ff; line-height: 1.8; }
.balance-card strong { font-size: 31px; letter-spacing: -1px; white-space: nowrap; }
.balance-card strong small { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.pack { position: relative; padding: 25px 15px 16px; background: #fff; border-radius: 23px; text-align: center; box-shadow: var(--shadow); }
.pack.featured { background: #edf3ff; box-shadow: inset 0 0 0 2px #c8dafa; }
.pack-label { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #5687ee; color: #fff; font-size: 10px; font-weight: 700; padding: 5px 11px; border-radius: 99px; white-space: nowrap; }
.pack img { width: 51px; height: 51px; object-fit: contain; margin-bottom: 10px; }
.pack .amount { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.pack .amount small { font-size: 11px; font-weight: 500; display: block; letter-spacing: 0; color: #9aa3af; margin-top: 3px; }
.pack h3 { font-size: 12px; line-height: 1.7; margin: 9px 0 5px; font-weight: 500; color: #8c96a4; }
.pack .price { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.pack-bonus { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; margin-top: 11px; padding: 4px 8px; border-radius: 8px; background: #fff0d0; color: #946017; font-size: 11px; font-weight: 700; line-height: 1.6; }
.pack-bonus.no-bonus { visibility: hidden; }
.pack-total { margin: 10px 0 5px; min-height: 37px; font-size: 12px; font-weight: 700; line-height: 1.55; color: #4b596c; }
.pack-unit { margin: 0; min-height: 34px; font-size: 10.5px; line-height: 1.6; color: #7c8796; overflow-wrap: anywhere; }
.pack-breakdown { font-size: 13px; line-height: 1.8; color: #627083; }
.pack button { width: 100%; font-size: 13px; line-height: 1.7; padding: 13px 6px; min-height: 47px; background: #eef3fe; color: var(--primary); border-radius: 13px; margin-top: 17px; font-weight: 700; }
.pack.featured button { background: var(--primary); color: #fff; }
.use-grid { margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.use-grid div { padding: 19px 12px; border-radius: 18px; text-align: center; font-size: 12px; background: #fff; color: #8792a2; line-height: 1.8; }
.use-grid strong { display: block; font-size: 16px; color: #526580; margin-top: 5px; }

.form-label { display: block; font-size: 16px; font-weight: 800; margin: 26px 1px 14px; letter-spacing: -.3px; }
.topic-grid { display: flex; gap: 9px; flex-wrap: wrap; }
.topic-choice { padding: 13px 15px; min-height: 47px; background: #fff; color: #8792a1; border-radius: 13px; font-size: 13px; line-height: 1.6; }
.topic-choice.selected { background: #e6efff; box-shadow: inset 0 0 0 1.5px #a5c2fb; color: var(--primary); font-weight: 700; }
.question-textarea { width: 100%; border: 0; border-radius: 20px; resize: vertical; min-height: 208px; padding: 20px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.9; box-shadow: var(--shadow); }
.question-textarea::placeholder { color: #a8b0bb; }
.input-meta { font-size: 12px; line-height: 1.7; display: flex; gap: 14px; justify-content: space-between; color: #8b95a1; margin: 10px 3px 22px; }
.input-meta span:last-child { white-space: nowrap; }
.question-hero { width: 100%; margin: 18px 0 24px; height: 225px; border-radius: 24px; object-fit: cover; object-position: center; display: block; }
.question-checkout { border-radius: 23px; background: #eaf1ff; padding: 24px; margin-top: 24px; }
.question-checkout strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 9px; }
.question-checkout p { font-size: 14px; line-height: 1.85; color: #7a8aa5; margin-bottom: 19px; }
.waiting-visual { width: 160px; height: 160px; margin: 37px auto 28px; border-radius: 40px; display: grid; place-items: center; position: relative; background: #e8f0ff; box-shadow: 0 15px 40px #4170c517; }
.waiting-visual img { width: 136px; height: 136px; object-fit: cover; border-radius: 32px; }
.waiting-visual:before { content: ''; position: absolute; inset: -10px; border-radius: 48px; background: #eaf1ff; z-index: -1; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.055); opacity: .45; } }
.center { text-align: center; }
.job-progress { height: 8px; background: #e7edf7; border-radius: 9px; overflow: hidden; margin: 28px 0 12px; }
.job-progress span { display: block; height: 100%; background: #6493ef; border-radius: inherit; transition: width 1s linear; }
.your-question { padding: 22px; border-radius: 20px; background: #fff; margin: 23px 0; }
.your-question strong { display: block; font-size: 12px; color: #8b9bb3; margin-bottom: 12px; line-height: 1.8; }
.your-question p { font-size: 16px; line-height: 1.9; white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }

.history-group { margin: 26px 1px 15px; color: #929dad; font-size: 12px; line-height: 1.8; }
.record { border-radius: 22px; padding: 21px 19px; margin: 13px 0; background: #fff; box-shadow: var(--shadow); display: block; width: 100%; text-align: left; }
.record-top { display: flex; gap: 13px; align-items: center; }
.record-icon { width: 49px; height: 49px; background: #f0f4fb; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto; }
.record-icon :is(svg,.ui-icon) { width: 35px; height: 35px; object-fit: contain; }
.record-name { flex: 1; min-width: 0; }
.record-name strong { font-size: 15px; font-weight: 700; display: block; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-name small { font-size: 11px; color: #9ca6b4; line-height: 1.8; display: block; margin-top: 3px; }
.record-cost { font-size: 16px; font-weight: 800; white-space: nowrap; letter-spacing: -.4px; }
.record-cost small { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0; text-align: right; color: #a1aab5; margin-top: 2px; }
.record-footer { font-size: 11px; line-height: 1.8; color: #8e9bac; padding-top: 15px; margin-top: 14px; display: flex; justify-content: space-between; gap: 10px; background: linear-gradient(#f0f3f8,#f0f3f8) top / 100% 1px no-repeat; }
.record-footer>span:last-child { display: inline-flex; align-items: center; gap: 4px; }
.record-footer .ui-icon { width: 17px; height: 17px; }
.detail-metadata { display: grid; grid-template-columns: minmax(85px,30%) minmax(0,1fr); gap: 0 17px; background: #fff; border-radius: 23px; padding: 10px 22px; margin: 25px 0; }
.detail-metadata dt, .detail-metadata dd { margin: 0; padding: 15px 0; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.detail-metadata dt { color: #98a2af; }
.detail-metadata dd { color: #596878; font-weight: 500; }
.record-question { font-size: 15px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }

.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 25px 1px 16px; font-size: 13px; color: #9aa4b2; line-height: 1.8; }
.quiz-top strong { font-size: 16px; color: #566984; white-space: nowrap; }
.quiz-progress { height: 7px; background: #e7edf7; border-radius: 10px; margin-bottom: 26px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: #7ba4f5; border-radius: 10px; transition: width .2s; }
.quiz-domain { font-size: 12px; font-weight: 600; border-radius: 9px; display: inline-flex; padding: 7px 10px; color: #648de1; background: #eaf1ff; margin-bottom: 18px; line-height: 1.7; }
.quiz-prompt { font-size: 24px; font-weight: 800; line-height: 1.65; letter-spacing: -.6px; margin: 0 0 23px; }
.quiz-stem { font-size: 26px; font-weight: 600; line-height: 1.85; white-space: pre-wrap; text-align: center; padding: 28px 20px; background: #fff; border-radius: 24px; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.quiz-stem.many-lines { font-size: 17px; font-weight: 500; text-align: left; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 25px 0; }
.option { background: #fff; border-radius: 19px; padding: 20px 15px; text-align: center; font-size: 22px; min-height: 78px; line-height: 1.7; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.option.long { font-size: 15px; }
.option.selected { background: #eaf1ff; color: var(--primary); box-shadow: inset 0 0 0 2px #8eb3f9; font-weight: 700; }
.quiz-note { font-size: 12px; line-height: 1.9; color: #95a0af; margin: 25px 1px; }
.quiz-result-orb { width: 168px; height: 168px; border-radius: 48px; margin: 30px auto; background: #e6efff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; box-shadow: 0 12px 30px #5c8ae51a; }
.quiz-result-orb strong { font-size: 47px; font-weight: 800; color: #4478dc; letter-spacing: -2px; line-height: 1.2; }
.quiz-result-orb span { font-size: 12px; color: #8c9fbd; line-height: 1.7; }
.metric-card { border-radius: 20px; background: #fff; padding: 21px; margin: 14px 0; }
.metric-card strong { font-size: 19px; font-weight: 800; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; font-size: 15px; color: #63748c; line-height: 1.8; }
.metric-bar { height: 8px; background: #eaf0f8; border-radius: 8px; overflow: hidden; }
.metric-bar span { display: block; height: 100%; background: #82a8f0; border-radius: 8px; }
.solution-card { border-radius: 20px; padding: 21px; margin: 15px 0; background: #fff; }
.solution-card summary { cursor: pointer; font-size: 15px; font-weight: 700; line-height: 1.9; }
.solution-card p { font-size: 14px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }
.solution-card .right { color: #4488b3; }
.solution-card .wrong { color: #d08c6e; }
.solution-card summary .ui-icon { width: 19px; height: 19px; margin-right: 3px; }
.rotation-visual { display: flex; align-items: center; justify-content: center; gap: 23px; margin: 23px auto 27px; }
.rotation-visual>span { width: 84px; height: 84px; border-radius: 25px; display: grid; place-items: center; background: #fff; font-size: 49px; line-height: 1; color: #5a8be9; box-shadow: var(--shadow); }
.rotation-visual>small { font-size: 21px; line-height: 1.6; color: #9cb6e8; white-space: nowrap; }
.diagram-stem { font-family: ui-monospace,'SFMono-Regular',Consolas,monospace; letter-spacing: 0; font-size: 14px !important; line-height: 1.9; }

.modal { border: 0; border-radius: 29px; background: #fff; padding: 28px; max-width: calc(100% - 32px); width: 424px; color: var(--ink); box-shadow: 0 25px 100px #1b2f4d25; max-height: 86dvh; overflow: auto; }
.modal::backdrop { background: #19284159; backdrop-filter: blur(6px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal h2 { font-size: 25px; font-weight: 800; line-height: 1.5; letter-spacing: -.8px; margin: 0 0 15px; }
.modal .x { background: #f4f6fa; padding: 0; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 24px; line-height: 1; color: #a0aab8; }
.modal .x .ui-icon { width: 22px; height: 22px; }
.modal p { font-size: 14px; line-height: 1.9; color: var(--muted); }
.modal .primary, .modal .secondary, .modal .gold-button { margin-top: 14px; }
.modal .social { width: 100%; margin: 12px 0; font-size: 14px; padding: 17px; background: #f5f7fb; }
.modal-line { display: flex; justify-content: space-between; padding: 16px 0; font-size: 14px; line-height: 1.8; gap: 12px; color: #8b96a5; }
.modal-line strong { text-align: right; color: #4d607a; }
.language-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; margin: 19px 0; }
.language-list button { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; padding: 15px 9px; min-height: 52px; background: #f5f7fb; border-radius: 15px; font-size: 14px; line-height: 1.7; }
.language-list button.selected { color: var(--primary); background: #eaf1ff; box-shadow: inset 0 0 0 1.5px #b5cdfa; font-weight: 700; }
.ad-counter { font-size: 55px; font-weight: 800; line-height: 1.5; text-align: center; margin: 24px auto; color: #6393ed; letter-spacing: -2px; }
.transaction-label { background: #f0f5ff; color: #5984d2; border-radius: 17px; padding: 19px; text-align: center; font-size: 20px; font-weight: 800; line-height: 1.7; margin: 19px 0; }
.error-message { color: #cc745c; font-size: 13px; line-height: 1.9; }
#toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom,0px)); transform: translate(-50%,20px); background: #263852f0; color: #fff; border-radius: 17px; padding: 15px 20px; z-index: 80; max-width: calc(100% - 40px); width: max-content; font-size: 13px; box-shadow: 0 10px 35px #18365c1c; opacity: 0; pointer-events: none; transition: .2s; line-height: 1.8; text-align: center; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }
.resume-banner { background: #e7f0ff; color: #5d83c7; border-radius: 20px; padding: 19px; margin: 22px 0; display: flex; gap: 15px; justify-content: space-between; align-items: center; font-size: 13px; line-height: 1.8; width: 100%; text-align: left; }
.resume-banner strong { color: #3b69bc; font-size: 15px; }
.resume-banner :is(svg,.ui-icon) { width: 26px; height: 26px; }
.currency-note { font-size: 11px; color: #9aa4b2; margin-top: 8px; line-height: 1.8; }
.error-page { padding: 30px; line-height: 1.9; }

html:lang(th) :is(h1,h2,h3,.logo,.amount,.quiz-prompt,.page-title,.feature-kind,.eyebrow,.balance-card strong),
html:lang(hi) :is(h1,h2,h3,.logo,.amount,.quiz-prompt,.page-title,.feature-kind,.eyebrow,.balance-card strong) { letter-spacing: normal; }
html:lang(th) :is(.feature h2,.page-title,.reader-body h2,.quiz-prompt),
html:lang(hi) :is(.feature h2,.page-title,.reader-body h2,.quiz-prompt) { line-height: 1.65; }
html:lang(th) .feature-art { width: 120px; height: 140px; }
html:lang(th) .feature-content { width: calc(100% - 110px); }

@media (min-width:700px) {
  #app { margin: 24px auto 0; border-radius: 32px 32px 0 0; overflow: clip; min-height: calc(100dvh - 24px); }
  .topbar { top: 0; }
}
@media (max-width:370px) {
  .page { padding: 0 17px; }
  .topbar { padding: 14px 17px; height: 72px; }
  .logo { font-size: 21px; gap: 4px; }
  .logo-mark { width: 27px; height: 27px; }
  .brand-app-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .brand-wordmark { width: 98px; height: 30px; flex-basis: 98px; }
  .balance { font-size: 14px; padding: 8px 10px 8px 7px; min-height: 40px; gap: 4px; }
  .coin { width: 24px; height: 24px; }
  .language-button { width: 37px; height: 37px; }
  .language-button :is(svg,.ui-icon) { width: 23px; height: 23px; }
  .top-actions { gap: 5px; }
  .preview { padding-left: 18px; padding-right: 18px; font-size: 10px; }
  .banner { margin-left: 17px; margin-right: 17px; }
  .home-intro { padding-top: 23px; padding-bottom: 21px; }
  .home-intro h1 { font-size: 29px; letter-spacing: -1.2px; }
  .home-intro p:last-child { font-size: 13px; }
  .feature { padding: 21px; min-height: 190px; border-radius: 23px; }
  .feature h2 { font-size: 23px; }
  .feature p { font-size: 12px; max-width: 160px; }
  .feature-art { width: 120px; height: 140px; right: 5px; }
  .feature-content { width: calc(100% - 110px); }
  .feature-bottom { font-size: 10px; }
  .reader-body { padding: 22px 20px 24px; }
  .reader-body h2 { font-size: 23px; }
  .reader-body p { font-size: 16px; }
  .page-title { font-size: 27px; }
  .social { font-size: 12px; gap: 6px; }
  .primary,.secondary,.gold-button { font-size: 14px; }
  .quiz-prompt { font-size: 22px; }
  .quiz-stem { font-size: 23px; padding: 24px 17px; }
  .option { font-size: 20px; padding: 19px 12px; }
  .option.long { font-size: 14px; }
  .pack { padding-left: 12px; padding-right: 12px; }
  .pack .amount { font-size: 27px; }
  .record { padding: 18px 16px; }
  .record-top { gap: 10px; }
  .record-icon { width: 43px; height: 43px; border-radius: 14px; }
  .record-icon :is(svg,.ui-icon) { width: 31px; height: 31px; }
  .record-name strong { font-size: 14px; }
  .record-cost { font-size: 14px; }
  .modal { padding: 25px 22px; }
  .modal h2 { font-size: 23px; }
  .sticky-unlock { padding-left: 17px; padding-right: 17px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* Keep Korean words intact on compact home captions. */
html[lang="ko"] .feature-content > p { word-break: keep-all; overflow-wrap: normal; }

/* Written question stems stay readable without breaking Korean words. */
.quiz-stem:not(.diagram-stem):not(.many-lines) { font-size: 20px; line-height: 1.8; }
html[lang="ko"] .quiz-stem:not(.diagram-stem) { word-break: keep-all; overflow-wrap: break-word; }
/* Production inputs, connection status and accessible server locks. */
.form-label{display:block;font-size:17px;font-weight:700;margin:22px 0 12px}.form-label input,.form-label select{display:block;width:100%;margin-top:10px;padding:15px;border:1px solid #d8dfe7;border-radius:14px;background:#fff;color:#10253a;font:inherit;min-height:54px}.consent{display:flex;gap:12px;align-items:flex-start;margin:22px 0;font-size:15px;line-height:1.7}.consent input{flex:none;width:22px;height:22px;margin:3px 0;accent-color:#3080f7}.chart-pills{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:20px 0}.chart-pills>div{background:#edf2f7;border-radius:16px;padding:14px 6px;text-align:center;display:flex;flex-direction:column;gap:7px}.chart-pills strong{font-size:23px}.chart-pills small{font-size:11px;overflow-wrap:anywhere}.element-row{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}.server-error{margin:12px 20px;padding:16px;border-radius:16px;background:#fff0ed;color:#83382e;font-size:14px;overflow-wrap:anywhere}.server-error p{margin:0 0 7px}.server-error small{font-size:11px}.request-status{position:fixed;top:70px;left:50%;transform:translateX(-50%);z-index:50;padding:11px 20px;background:#10253a;color:white;border-radius:30px;box-shadow:0 5px 20px #10253a30}.app-legal{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin:32px 0;font-size:13px}.app-legal a{color:#607187}.locked-content{position:relative;min-height:190px;margin:20px 0;overflow:hidden;border-radius:18px;background:#f0f3f8}.blurred{filter:blur(7px);padding:16px;user-select:none;pointer-events:none}.lock-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:14px;background:#ffffff45}.lock-overlay button{width:100%;font-size:15px}.live-status{display:flex;gap:10px;align-items:center;margin:25px 0;padding:20px;background:#edf5fe;border-radius:16px}.status-dot{width:12px;height:12px;border-radius:50%;background:#3983f9;animation:breathe 1.4s ease-in-out infinite}.live-status.attention{background:#fff3dd}.live-status.attention .status-dot{background:#bc8620;animation:none}@keyframes breathe{50%{opacity:.3}}.shinsal-story{margin:18px 0;padding:15px;background:#f4f7f4;border-radius:20px}.shinsal-art{width:100%;height:auto;border-radius:14px}.shinsal-story small{font-size:13px;color:#60736b}.reader-card .reader-image{max-height:none;height:auto;object-fit:contain}.reader-copy .primary{font-size:16px}.coin-pack{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.coin-pack>div{flex:1;min-width:140px}.coin-pack .primary{min-width:130px}.coin-pack .pack-art{width:72px;height:72px;object-fit:contain}#question-input{min-height:180px}.history-card{display:flex;width:100%;text-align:left;align-items:center;gap:12px}.history-main{flex:1;min-width:0}.history-main strong,.history-main small{display:block}.history-main strong{overflow-wrap:anywhere}.history-cost{font-size:13px}.history-icon{width:35px}.topic-picker{display:flex;flex-wrap:wrap;gap:8px}.topic-chip{padding:10px 13px;border:0;border-radius:18px;background:#edf1f6;color:#3b5065}.topic-chip.selected{background:#dbeaff;color:#2865bf}.solution-card p{white-space:pre-wrap;overflow-wrap:anywhere}button:disabled{opacity:.45;cursor:not-allowed}@media(prefers-reduced-motion:reduce){.status-dot{animation:none}} 
.feature>.ui-icon{position:absolute;left:24px;bottom:20px;width:20px;height:20px}.feature-content{padding-bottom:15px}.reader-copy{padding:24px}.reader-copy h2{font-size:25px;line-height:1.5}.reader-copy p{font-size:17px;line-height:1.9;overflow-wrap:anywhere}.reader-copy .tiny{font-size:12px}.wallet-card{display:flex;position:relative;min-height:140px;flex-direction:column;justify-content:center;background:#edf3ff;border-radius:26px;padding:25px;margin:26px 0;overflow:hidden}.wallet-card>strong{font-size:38px;z-index:1}.wallet-card>span{font-size:14px;z-index:1}.wallet-art{position:absolute;right:12px;top:10px;width:120px;height:120px;object-fit:contain}.coin-packs{display:grid;gap:14px}.coin-pack{border:0;background:#fff;border-radius:24px;padding:18px;box-shadow:0 6px 25px #21446b08}.coin-pack h2{font-size:21px;margin:0 0 4px}.coin-pack p{font-size:13px;margin:0 0 5px}.coin-pack small{font-size:12px;color:#63768c}.coin-pack.recommended{background:#e9f1ff;box-shadow:inset 0 0 0 2px #cbdfff}.coin-pack .primary{min-height:46px;width:auto;font-size:15px;padding:10px 15px}.history-card{background:#fff;border:0;border-radius:20px;padding:20px 15px;margin:12px 0}.history-main small{font-size:12px;color:#7b8b9d;margin-top:6px}.history-cost .ui-icon{display:block;margin-top:8px;width:20px;height:20px;margin-left:auto}#question-input{display:block;width:100%;border:1px solid #d5deeb;border-radius:20px;padding:18px;font:inherit;font-size:17px;line-height:1.7;resize:vertical;background:#fff}.question-hero{display:block;width:170px;height:170px;object-fit:contain;margin:25px auto}.history-card:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #448af7;outline-offset:3px}.page{padding-bottom:120px}.page-title{overflow-wrap:anywhere}input[type=date],input[type=time]{min-width:0;box-sizing:border-box}.form-label select{font-size:16px}@media(max-width:350px){.coin-pack .pack-art{width:55px;height:55px}.coin-pack>div{min-width:130px}.reader-copy{padding:20px}.reader-copy h2{font-size:23px}}
.review-mode{padding:10px 20px;background:#fff3cf;color:#755a15;font-size:12px;text-align:center;line-height:1.6}

/* Daily reading uses the existing vertical card and cached illustration system. */
.feature.daily{background:linear-gradient(135deg,#eeebff,#f5f0ff);border:0}.feature.daily:after{background:linear-gradient(90deg,#eeebff 7%,#eeebfff5 28%,#eeebff9c 47%,#eeebff00 68%)}.feature.daily .feature-kind{color:#6650ba}.daily-home-timezone{margin:-.25rem .25rem 1.4rem;color:#69677a}.daily-timezone{font-weight:600}.daily-date{font-size:1.1rem;margin:1.4rem 0}.daily-basis{margin-top:1.5rem;background:#f5f4fa;border-radius:18px;padding:1rem}.daily-basis summary{font-weight:700;cursor:pointer}.daily-basis .detail-metadata{overflow-wrap:anywhere}.daily-locked .reader-image{max-height:260px;object-fit:cover}

.month-entry{display:grid;gap:6px;padding:16px 0;border-top:1px solid #e8edf2}.month-entry time{font-weight:700}.month-entry p{margin:0}.month-status{font-size:14px;line-height:1.7;color:#607185}.month-status.matches{color:#176b54;font-weight:700}.month-status.uncertain{color:#745d27}

/* Optional account profile; gated by the server catalogue. */
.profile-current{padding:18px;background:#edf5fe;border-radius:18px;font-size:18px;line-height:1.7}.profile-current small{display:block;color:var(--muted);font-size:13px;margin-top:6px}.profile-status{padding:16px;background:#edf7f1;border-radius:16px;font-size:17px;line-height:1.7}.profile-page .tiny{font-size:14px;line-height:1.8}.profile-page select:disabled{opacity:.6}.profile-page .notice{font-size:15px;line-height:1.8}

.account-card{display:flex;flex-wrap:wrap;column-gap:24px;row-gap:6px}.account-card>header{width:100%;min-width:0}.account-card>.text-link{max-width:100%;text-align:left;overflow-wrap:anywhere}

.birth-profile-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;padding:20px;margin:22px 0;border-radius:20px;background:#edf5fe;align-items:center}.birth-profile-summary p{grid-column:1/-1;font-size:16px;font-weight:700;margin:0}.birth-profile-summary strong{font-size:21px;overflow-wrap:anywhere}.birth-profile-summary .secondary{margin:0;padding:12px 16px;font-size:15px}.birth-profile-summary small{grid-column:1/-1;font-size:14px;line-height:1.8;color:var(--muted)}@media(max-width:360px){.birth-profile-summary{grid-template-columns:minmax(0,1fr)}.birth-profile-summary .secondary{width:100%}}
