﻿:root {
  --blue: #062ca1;
  --red: #ec214c;
  --ink: #252936;
  --muted: #8d92a0;
  --line: #e7eaf2;
  --bg: #f4f6fb;
  --soft: #eef2fb;
  --green: #2f9b4d;
  --danger: #e62942;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #dfe4ef;
  color: var(--ink);
}
button, a { -webkit-tap-highlight-color: transparent; }
button {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.app-shell {
  width: 100%;
  max-width: 393px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  padding-bottom: 88px;
}
.topbar {
  background: var(--blue);
  color: #fff;
  padding: 18px 24px 0;
}
.status-row, .title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.status-row {
  font-weight: 700;
  opacity: .88;
  font-size: 15px;
}
.title-row {
  margin-top: 38px;
  min-height: 56px;
  font-size: 22px;
  justify-content: center;
  position: relative;
}
.mini-pill {
  position: absolute;
  right: 0;
  top: 5px;
  padding: 8px 13px;
  border-radius: 24px;
  background: rgba(0, 0, 0, .18);
  letter-spacing: 2px;
}
.top-progress {
  height: 4px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  margin: 0 -24px;
}
.top-progress span:first-child { background: #fff; }
.top-progress span:last-child { background: var(--red); }
.view { display: none; }
.view.is-active { display: block; }
.hero {
  min-height: 182px;
  text-align: center;
  color: #fff;
  padding: 32px 24px 28px;
  background:
    radial-gradient(circle at 90% 30%, rgba(236,33,76,.95), transparent 38%),
    linear-gradient(135deg, #0737b6 0%, #04289a 58%, #c91855 100%);
}
.brand-logo {
  display: block;
  object-fit: cover;
  background: #fff;
}
.app-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 14px;
  padding: 3px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
h1, h2, h3, p { margin: 0; }
.hero h1 { font-size: 31px; }
.hero p { margin-top: 12px; color: rgba(255,255,255,.78); }
.date-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #fff;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-strip button {
  flex: 0 0 auto;
  border-radius: 22px;
  padding: 10px 18px;
  min-width: 108px;
  color: #6c707b;
  background: #f3f4f8;
  font-size: 15px;
}
.date-strip button.active {
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}
.section { padding: 20px 14px 0; }
.section h2 {
  font-size: 23px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section h2 span {
  width: 4px;
  height: 24px;
  background: var(--blue);
  border-radius: 5px;
}
.news-list {
  display: grid;
  gap: 14px;
}
.news-card, .quiz-card, .stats-card, .poster-wrap, .unlock-card, .about-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(10, 24, 70, .06);
}
.news-card {
  padding: 20px 18px;
}
.news-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.number {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}
.badge {
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--blue);
  background: #eef3ff;
  font-weight: 700;
  font-size: 14px;
}
.read, .deep {
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 14px;
  background: #eef3ff;
  color: var(--blue);
}
.deep { color: #c83355; background: #fff0f4; }
.fr-text {
  font-size: 21px;
  line-height: 1.8;
  font-style: italic;
  margin-left: 42px;
  overflow-wrap: anywhere;
}
.cn-text {
  margin: 12px 0 0 42px;
  color: #70737e;
  line-height: 1.7;
  font-size: 18px;
}
.cn-label {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  margin: 10px 0 6px 42px;
}
.page-heading { background: #fff; padding-bottom: 8px; }
.flash-zone, .quiz-zone { padding: 18px 14px 0; }
.flash-count { text-align: center; color: #666b76; margin-bottom: 14px; }
.tiny-progress {
  height: 4px;
  background: #e5e8ef;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}
.tiny-progress span {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--blue), var(--red));
}
.toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.toggle {
  padding: 13px 8px;
  border-radius: 7px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 5px 13px rgba(10,24,70,.08);
}
.toggle.active { background: var(--blue); color: #fff; }
.flash-card {
  background: var(--blue);
  color: #fff;
  border-radius: 13px;
  min-height: 306px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.part {
  background: rgba(255,255,255,.86);
  color: var(--blue);
  border-radius: 4px;
  padding: 6px 10px;
  font-weight: 700;
}
.flash-card h3 {
  align-self: center;
  margin: 32px 0 26px;
  font-size: 30px;
  text-align: center;
}
.meaning { margin-left: 14px; margin-bottom: 16px; }
.meaning span { opacity: .72; font-size: 14px; }
.meaning p { margin-top: 10px; font-size: 18px; font-style: italic; }
.meaning strong { display: block; margin-top: 10px; font-size: 22px; }
.speak {
  align-self: center;
  margin-top: auto;
  min-width: 98px;
  padding: 13px 22px;
  border-radius: 24px;
  color: #fff;
  background: rgba(255,255,255,.22);
}
.wide {
  width: 100%;
  color: var(--blue);
  background: #e9eefb;
  border-radius: 6px;
}
.study-actions {
  display: grid;
  grid-template-columns: 1fr .7fr .8fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.study-actions button, .poster-actions button, .unlock-card button {
  border-radius: 22px;
  padding: 12px 10px;
}
.soft { background: #fff; color: #555b68; box-shadow: 0 6px 16px rgba(10,24,70,.06); }
.success { background: #e8faeb; color: var(--green); }
.danger { background: #ffecee; color: var(--danger); }
.primary, .unlock-card button {
  color: #fff;
  background: linear-gradient(105deg, var(--blue), var(--red));
}
button:disabled { opacity: .42; cursor: default; }
.stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 16px 0;
  text-align: center;
}
.stats-card div + div { border-left: 1px solid var(--line); }
.stats-card strong {
  display: block;
  font-size: 28px;
}
.stats-card div:first-child strong { color: var(--green); }
.stats-card div:nth-child(2) strong { color: var(--danger); }
.stats-card span { color: var(--muted); font-size: 14px; }
.unlock-card {
  margin-top: 22px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.unlock-card > span { font-size: 27px; }
.unlock-card p { color: var(--muted); margin-top: 3px; font-size: 14px; }
.quiz-top {
  display: flex;
  justify-content: space-between;
  color: #777c86;
  margin: 10px 0 12px;
}
.quiz-top button { color: #979ba4; background: transparent; }
.score {
  text-align: center;
  margin: 20px 0;
  color: #969aa4;
}
.score strong {
  color: var(--blue);
  font-size: 34px;
}
.quiz-card {
  padding: 20px;
}
.prompt {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #a0a4ad;
}
.prompt span {
  background: var(--blue);
  color: #fff;
  padding: 7px 11px;
  border-radius: 5px;
  font-weight: 700;
}
.quiz-card h3 {
  text-align: center;
  font-size: 31px;
  font-style: italic;
  margin: 54px 0 28px;
}
.answers {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.answer {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: left;
  padding: 0 16px;
  font-size: 18px;
}
.answer span {
  display: inline-grid;
  place-items: center;
  width: 33px;
  height: 33px;
  margin-right: 18px;
  border-radius: 50%;
  background: #f4f6fa;
  color: #666b76;
  font-weight: 700;
}
.answer.correct { border-color: #9bdfaa; background: #f0fff3; }
.answer.wrong { border-color: #ffb9c0; background: #fff2f3; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-grid div {
  background: #fff;
  border-radius: 6px;
  min-height: 92px;
  text-align: center;
  padding: 13px 4px;
  box-shadow: 0 5px 14px rgba(10,24,70,.06);
}
.stat-grid span { font-size: 23px; }
.stat-grid strong {
  display: block;
  color: var(--blue);
  font-size: 23px;
  margin-top: 4px;
}
.stat-grid p { color: var(--muted); font-size: 13px; }
.poster-wrap { padding: 14px; }
.poster {
  color: #fff;
  min-height: 258px;
  border-radius: 8px;
  padding: 24px 15px;
  text-align: center;
  background:
    radial-gradient(circle at 92% 22%, rgba(236,33,76,.95), transparent 36%),
    linear-gradient(135deg, #062ca1, #31117e 52%, #ff263c);
}
.poster-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  text-align: left;
}
.poster-top strong { font-size: 24px; }
.poster-top span {
  border-radius: 18px;
  background: rgba(255,255,255,.2);
  padding: 7px 12px;
}
.poster b {
  display: block;
  font-size: 56px;
}
.poster-line {
  height: 1px;
  background: rgba(255,255,255,.28);
  margin: 26px 0 16px;
}
.poster-data {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}
.poster small { color: rgba(255,255,255,.72); }
.poster-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
blockquote {
  text-align: center;
  color: var(--blue);
  margin: 28px 10px;
  font-size: 20px;
  font-style: italic;
}
blockquote cite {
  display: block;
  color: #8d92a0;
  font-size: 15px;
  font-style: normal;
  margin-top: 12px;
}
.about p {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.7;
}
.about-card {
  margin-top: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.about-card span { color: #656a76; line-height: 1.5; }
.source-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.source-list a {
  color: var(--blue);
  background: #fff;
  border-radius: 8px;
  padding: 13px 16px;
  text-decoration: none;
}
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 393px;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
}
.tab {
  background: transparent;
  color: #9296a0;
  font-size: 19px;
}
.tab.is-active {
  color: var(--blue);
  font-weight: 700;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%) translateY(18px);
  background: rgba(0,0,0,.78);
  color: #fff;
  border-radius: 20px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 360px) {
  .fr-text, .cn-text, .cn-label { margin-left: 0; }
  .study-actions { grid-template-columns: repeat(2, 1fr); }
  .unlock-card { grid-template-columns: auto 1fr; }
  .unlock-card button { grid-column: 1 / -1; }
  .tab { font-size: 17px; }
}

.deep-reader {
  padding: 14px 14px 0;
}
.reader-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.reader-actions button {
  border-radius: 20px;
  padding: 10px 14px;
}
.reader-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 16px;
  box-shadow: 0 8px 18px rgba(10, 24, 70, .06);
}
.reader-kicker {
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.reader-card h2 {
  font-size: 24px;
  line-height: 1.28;
  margin-bottom: 12px;
}
.reader-card p {
  color: #626875;
  line-height: 1.65;
}
.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.reader-meta span,
.reader-vocab span {
  border-radius: 16px;
  padding: 6px 10px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 13px;
}
.reader-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.reader-body {
  display: grid;
  gap: 12px;
}
.parallel-block {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 18px 16px 18px 50px;
  box-shadow: 0 8px 18px rgba(10, 24, 70, .06);
}
.paragraph-index {
  position: absolute;
  left: 15px;
  top: 19px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.reader-fr {
  font-size: 18px;
  line-height: 1.78;
  font-style: italic;
  overflow-wrap: anywhere;
}
.reader-cn {
  margin-top: 12px;
  color: #666b76;
  font-size: 16px;
  line-height: 1.78;
}

.read.is-speaking, .speak.is-speaking {
  background: var(--red);
  color: #fff;
}

.news-group {
  display: grid;
  gap: 14px;
}
.news-group + .news-group {
  margin-top: 24px;
}
.news-group h3 {
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 20px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #062ca1 0%, #1236a6 45%, #ec214c 100%);
}
.login-screen.is-hidden {
  display: none;
}
.login-card {
  width: min(100%, 345px);
  border-radius: 14px;
  background: #fff;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
}
.login-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  border-radius: 22px;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(6, 44, 161, .18);
}
.login-card h1 {
  font-size: 28px;
  margin-bottom: 10px;
}
.login-card p {
  color: #666b76;
  line-height: 1.65;
  margin-bottom: 20px;
}
.login-card small {
  display: block;
  color: #9296a0;
  line-height: 1.5;
  margin-top: 14px;
}
.auth-card button {
  width: fit-content;
  padding: 9px 14px;
  border-radius: 18px;
}

.profile-form {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}
.nickname-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  text-align: center;
  color: var(--ink);
  background: #f8f9fd;
}
.nickname-input:focus {
  outline: 2px solid rgba(6, 44, 161, .18);
  border-color: var(--blue);
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 154px;
  overflow-y: auto;
  padding-right: 2px;
}
.avatar-choice {
  height: 48px;
  border-radius: 8px;
  background: #f1f4fb;
  font-size: 22px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.avatar-choice img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}
.avatar-choice.is-active {
  border-color: var(--blue);
  background: #eef3ff;
}
.avatar-upload {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px dashed #b8c2dd;
  border-radius: 8px;
  background: #f8f9fd;
  text-align: left;
  cursor: pointer;
}
.upload-preview {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef3ff;
  display: grid;
  place-items: center;
  font-size: 22px;
  overflow: hidden;
}
.upload-preview-img,
.avatar-img,
.rank-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.avatar-upload strong,
.avatar-upload small {
  display: block;
}
.avatar-upload strong {
  color: var(--blue);
  font-size: 14px;
}
.avatar-upload small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.profile-login {
  width: 100%;
  border-radius: 24px;
  padding: 13px 16px;
  color: #fff;
  background: linear-gradient(105deg, var(--blue), var(--red));
  font-weight: 700;
}
.ranking-panel {
  margin-top: 18px;
  background: #fff;
  border-radius: 8px;
  padding: 16px 14px;
  box-shadow: 0 8px 18px rgba(10, 24, 70, .06);
}
.ranking-panel h2 {
  font-size: 21px;
  margin-bottom: 6px;
}
.ranking-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.ranking-list {
  display: grid;
  gap: 8px;
}
.rank-empty {
  color: var(--muted);
  background: #f5f7fc;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  line-height: 1.5;
}
.rank-row {
  display: grid;
  grid-template-columns: 28px 36px 1fr 48px 54px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.rank-row.is-me {
  border-color: rgba(6, 44, 161, .45);
  background: #f3f6ff;
}
.rank-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.rank-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef3ff;
  font-size: 19px;
  overflow: hidden;
}
.rank-name { min-width: 0; }
.rank-name strong,
.rank-name small,
.rank-score strong,
.rank-score small { display: block; }
.rank-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-name small,
.rank-score small {
  color: var(--muted);
  font-size: 12px;
}
.rank-score { text-align: right; }
.rank-score strong {
  color: var(--blue);
  font-size: 18px;
}
