:root {
  --bg: #eef3fa;
  --panel: #ffffff;
  --ink: #17213b;
  --muted: #8793aa;
  --line: #e9edf6;
  --primary: #6d63ff;
  --primary-2: #8973f7;
  --mint: #5ed7b0;
  --coral: #ff766d;
  --orange: #ffb256;
  --shadow: 0 18px 45px rgba(48, 62, 102, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(390px, 100vw);
  min-height: 844px;
  overflow: hidden;
  background: #f5f7fb;
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(40, 51, 85, 0.16);
}

.status-bar {
  height: 38px;
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #14203b;
  font-size: 12px;
  font-weight: 800;
}

.status-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  letter-spacing: 2px;
}

.status-dots i {
  width: 18px;
  height: 8px;
  border: 2px solid #14203b;
  border-radius: 6px;
}

.screen {
  display: none;
  height: calc(844px - 38px);
  overflow-y: auto;
  padding: 14px 20px 96px;
}

.screen::-webkit-scrollbar {
  width: 0;
}

.screen.is-active {
  display: block;
}

.page-header,
.page-title,
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-header p,
.page-title p,
.progress-line span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

h1,
h2,
p {
  margin-top: 0;
}

.home-header h1,
.page-title h1 {
  margin: 4px 0 0;
  font-size: 25px;
  line-height: 1.12;
}

#home-quote {
  max-width: 310px;
  font-size: 18px;
  line-height: 1.34;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffd09d;
  position: relative;
}

.avatar span,
.avatar::before,
.avatar::after {
  position: absolute;
  content: "";
  background: #4d3829;
  border-radius: 50%;
}

.avatar::before,
.avatar::after {
  width: 5px;
  height: 5px;
  top: 18px;
}

.avatar::before {
  left: 17px;
}

.avatar::after {
  right: 17px;
}

.avatar span {
  width: 16px;
  height: 8px;
  left: 18px;
  top: 30px;
  background: transparent;
  border-bottom: 2px solid #4d3829;
}

.hero-card,
.review-hero {
  margin-top: 20px;
  min-height: 142px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 50%, rgba(255,255,255,.28) 0 31px, transparent 32px),
    linear-gradient(135deg, #6964ff, #865ef1);
}

.hero-card h2,
.review-hero h2 {
  margin-bottom: 7px;
  font-size: 21px;
}

.hero-card p,
.review-hero p,
.ai-card p {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.primary-pill,
.review-hero button {
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.progress-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#fff 0 68%, rgba(255,255,255,.25) 68%);
  position: relative;
  text-align: center;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #7b63f5;
}

.progress-ring span,
.progress-ring small {
  position: relative;
  display: block;
  color: #fff;
}

.progress-ring span {
  font-size: 22px;
  font-weight: 900;
}

.progress-ring small {
  margin-top: -20px;
  font-size: 10px;
}

.overview-grid,
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.overview-grid article,
.stats-grid article,
.book-item,
.heat-card,
.chart-card,
.ability-card,
.settings-card,
.review-list article {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.overview-grid article,
.stats-grid article {
  min-height: 76px;
  padding: 17px;
}

.metric-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 18px;
  border-radius: 10px;
  background: #fff0df;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.metric-badge.mint {
  border: 3px solid #69dbb6;
  background: #eafbf5;
}

.overview-grid strong,
.stats-grid strong {
  font-size: 20px;
}

.overview-grid p,
.stats-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.score-card {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.score-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-card strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.score-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.score-card button {
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 13px;
  background: linear-gradient(90deg, #6462ff, #8f63f4);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.score-card button:disabled {
  background: #e6ebf5;
  color: #9aa5b7;
  cursor: default;
}

.section-head {
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
}

.section-head button,
.section-head span {
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.book-list,
.review-list,
.rank-list {
  display: grid;
  gap: 12px;
}

.book-item {
  min-height: 68px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
}

.book-item.is-selected {
  outline: 2px solid rgba(109, 99, 255, 0.22);
}

.book-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8068ff, #a686ff);
  position: relative;
}

.book-icon::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid rgba(255,255,255,.8);
  border-top: 0;
  border-left-width: 0;
  transform: rotate(45deg);
}

.book-icon.coral {
  background: #ffdda8;
}

.book-icon.mint {
  background: linear-gradient(135deg, #50d2a7, #a7f0d5);
}

.book-icon.custom {
  background: linear-gradient(135deg, #4f9cff, #5ed7b0);
}

.book-icon.coral::after {
  border-color: #f47d50;
  transform: none;
  border-left-width: 3px;
  border-top-width: 3px;
}

.book-item strong,
.review-list strong {
  font-size: 13px;
}

.book-item p,
.review-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.book-item button {
  padding: 7px 11px;
  border-radius: 10px;
  background: #f0efff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.ai-card {
  margin-top: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, #111936, #493990);
}

.ai-orb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 5%, transparent 7%),
    radial-gradient(circle at 50% 45%, #89f5ff 0 22%, #7d77ff 24% 48%, transparent 51%);
  box-shadow: 0 0 18px #8e86ff;
}

.ai-card p {
  margin: 5px 0 0;
}

.top-nav {
  height: 48px;
}

.top-nav strong {
  font-size: 14px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #65728c;
  background: #fff;
  font-size: 32px;
  line-height: 1;
}

.bookmark::before {
  content: "";
  width: 14px;
  height: 19px;
  border: 2px solid #b3bfd1;
  border-bottom-color: transparent;
  border-radius: 3px 3px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.progress-line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 4px;
  padding-bottom: 12px;
}

.progress-line strong {
  color: var(--primary);
  font-size: 11px;
}

.progress-line i {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) var(--value), #dee5f2 var(--value));
}

.word-card {
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  background: #d9e7ff;
  box-shadow: var(--shadow);
}

.classroom-illustration {
  position: relative;
  height: 178px;
  background: linear-gradient(#d7e5ff 0 65%, #eadcc9 66%);
}

.board {
  position: absolute;
  left: 56px;
  top: 58px;
  width: 184px;
  height: 58px;
  border: 5px solid #9fb0c5;
  border-bottom: 0;
}

.board::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 16px;
  width: 112px;
  height: 3px;
  background: #b8c7da;
}

.sun {
  position: absolute;
  right: 48px;
  top: 36px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffd980;
}

.student {
  position: absolute;
  left: 132px;
  bottom: 20px;
  width: 76px;
  height: 92px;
  background: #536fb7;
  clip-path: polygon(50% 0, 82% 30%, 100% 100%, 0 100%, 18% 30%);
}

.student::before {
  content: "";
  position: absolute;
  top: 0;
  left: 23px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #ffc993;
  box-shadow: 0 -9px 0 #263451;
}

.student::after {
  content: "";
  position: absolute;
  top: 48px;
  left: 29px;
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: #eef4ff;
}

.bag {
  position: absolute;
  right: 68px;
  bottom: 20px;
  width: 52px;
  height: 65px;
  border-radius: 9px 9px 5px 5px;
  background: #fb7766;
}

.bag::before {
  content: "";
  position: absolute;
  left: 15px;
  top: -16px;
  width: 20px;
  height: 20px;
  border: 4px solid #df5f58;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.desk {
  position: absolute;
  inset: auto 0 0;
  height: 34px;
  background: repeating-linear-gradient(0deg, #d7c5ae 0 2px, #eadcc9 2px 13px);
}

.word-panel {
  padding: 18px;
  border-radius: 20px 20px 0 0;
  background: #fff;
}

.word-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.word-line h1 {
  margin: 0;
  font-size: 33px;
}

.word-line p {
  margin: 4px 0 0;
  color: #9aa5b7;
  font-size: 13px;
}

.word-unit {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0efff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.sound-button,
.example-sound-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f0efff;
  color: var(--primary);
  font-weight: 900;
}

.sound-button.is-speaking,
.example-sound-button.is-speaking {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(109, 99, 255, 0.14);
}

.hint,
.meaning {
  margin: 18px 0 0;
  padding: 17px;
  border-radius: 14px;
  background: #f5f6fb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.meaning {
  background: #f2efff;
  color: #60708d;
}

.meaning span {
  color: var(--primary);
  font-weight: 900;
}

.meaning h2 {
  margin: 5px 0 8px;
  color: #17213b;
  font-size: 23px;
}

.example-line {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  gap: 10px;
}

.example-line p {
  margin: 0;
}

.example-sound-button {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.reveal-button {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  border-radius: 13px;
  background: linear-gradient(90deg, #6462ff, #8f63f4);
  color: #fff;
  font-weight: 900;
}

.answer-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.answer-actions button {
  min-height: 43px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}

.danger { color: #f26868; background: #ffeded; }
.warn { color: #cf8b23; background: #fff4df; }
.success { color: #34a983; background: #eaf9f3; }
.is-hidden { display: none; }

.review-hero {
  display: block;
  background: linear-gradient(135deg, #ff965e, #ff5f79);
}

.heat-card,
.chart-card,
.ability-card,
.settings-card {
  padding: 16px;
}

.tight {
  margin-top: 0;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 7px;
}

.heat-grid i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #dcf5ec;
}

.heat-grid .mid { background: #91e4ca; }
.heat-grid .hot { background: #48cfa5; }

.review-list article {
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 9px;
}

.review-list b {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f0efff;
  color: var(--primary);
  font-size: 12px;
}

.review-list span {
  color: #a8b2c4;
  font-size: 28px;
}

.rank-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding: 5px;
  border-radius: 14px;
  background: #e9eef8;
}

.rank-tabs button {
  height: 36px;
  border-radius: 11px;
  background: transparent;
  color: #8793aa;
  font-size: 13px;
  font-weight: 900;
}

.rank-tabs button.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 22px rgba(48, 62, 102, 0.08);
}

.my-rank-card {
  margin-top: 16px;
  padding: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #111936, #493990);
  box-shadow: var(--shadow);
}

.my-rank-card span,
.my-rank-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.my-rank-card strong {
  display: block;
  margin: 4px 0;
  font-size: 25px;
}

.my-rank-card p {
  margin: 0;
}

.my-rank-card button {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.rank-item,
.rank-empty {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-empty {
  display: block;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.rank-item b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f0efff;
  color: var(--primary);
  font-size: 13px;
}

.rank-item b.top {
  color: #fff;
  background: linear-gradient(135deg, #ffb256, #ff766d);
}

.rank-item strong {
  font-size: 14px;
}

.rank-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.rank-item span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.chart-card {
  position: relative;
  margin-top: 20px;
}

.chart-card strong {
  font-size: 14px;
}

.chart-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.chart-card > span {
  position: absolute;
  right: 18px;
  top: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0efff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.weekly-bars {
  height: 150px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
}

.weekly-bars span {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.weekly-bars i {
  width: 100%;
  height: max(8px, var(--bar));
  border-radius: 999px 999px 7px 7px;
  background: linear-gradient(180deg, #6968ff, #9c8cff);
}

.ability-layout {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 75%, #e6ebf5 75%);
  position: relative;
  text-align: center;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
}

.donut strong,
.donut span {
  position: relative;
  display: block;
}

.donut strong {
  font-size: 25px;
}

.donut span {
  margin-top: -28px;
  color: var(--muted);
  font-size: 10px;
}

.bars {
  display: grid;
  gap: 13px;
}

.bars label {
  color: var(--muted);
  font-size: 11px;
}

.bars i {
  display: block;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) var(--bar), #e7ecf5 var(--bar));
}

.bars label:nth-child(2) i {
  background: linear-gradient(90deg, var(--mint) var(--bar), #e7ecf5 var(--bar));
}

.bars label:nth-child(3) i {
  background: linear-gradient(90deg, var(--orange) var(--bar), #e7ecf5 var(--bar));
}

.profile-top {
  justify-content: flex-start;
  gap: 18px;
  margin-top: 26px;
}

.avatar.large {
  width: 66px;
  height: 66px;
}

.profile-top h1 {
  font-size: 22px;
}

.profile-top span {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef0ff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.settings-card {
  display: grid;
  padding: 8px 16px;
}

.sync-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.guest-id-row {
  margin-bottom: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 13px;
  background: #f7f9fd;
}

.guest-id-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guest-id-row strong {
  color: var(--primary);
  font-size: 18px;
  letter-spacing: 1px;
}

.sync-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sync-card input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #f7f9fd;
  font: inherit;
  font-size: 14px;
}

.sync-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(109, 99, 255, 0.1);
}

.sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.sync-actions button {
  min-height: 40px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.sync-actions button:first-child {
  background: linear-gradient(90deg, #6462ff, #8f63f4);
  color: #fff;
}

.sync-actions button:last-child {
  background: #f0efff;
  color: var(--primary);
}

.sync-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.my-book-list {
  display: grid;
  gap: 12px;
}

.my-book-card {
  width: 100%;
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.my-book-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.my-book-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.my-book-card em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.book-detail-hero {
  margin-top: 18px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.book-detail-hero h1 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.book-detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.book-progress-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.book-progress-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-progress-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.book-progress-card strong {
  color: var(--primary);
  font-size: 24px;
}

.book-progress-card i {
  display: block;
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) var(--value), #e7ecf5 var(--value));
}

.book-stat-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.book-stat-grid article {
  min-height: 86px;
  padding: 15px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.book-stat-grid span {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.book-stat-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.book-detail-action {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(90deg, #6462ff, #8f63f4);
  font-weight: 900;
}

.import-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.import-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.import-card input,
.import-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: #f7f9fd;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.import-card input {
  height: 44px;
  padding: 0 13px;
  margin-bottom: 14px;
}

.import-card textarea {
  min-height: 180px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.photo-picker {
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #cfd6e8;
  border-radius: 16px;
  background: #f7f9fd;
  text-align: center;
  cursor: pointer;
}

.photo-picker span {
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.photo-picker small,
.import-help,
#ocr-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

#ocr-status[data-tone="success"] {
  color: #18a678;
}

#ocr-status[data-tone="error"] {
  color: #ec625f;
}

.import-preview {
  width: 100%;
  max-height: 220px;
  margin-top: 12px;
  object-fit: contain;
  border-radius: 14px;
  background: #f7f9fd;
}

.import-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}

.import-actions button {
  min-height: 42px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.import-actions button:first-child {
  color: #fff;
  background: linear-gradient(90deg, #6462ff, #8f63f4);
}

.import-actions button:last-child {
  color: var(--primary);
  background: #f0efff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sync-card p[data-tone="success"] {
  color: #34a983;
  font-weight: 800;
}

.sync-card p[data-tone="error"] {
  color: #f26868;
  font-weight: 800;
}

.settings-card button {
  height: 56px;
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.settings-card button:last-child {
  border-bottom: 0;
}

.settings-card b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f0efff;
  color: #8d92aa;
  font-size: 12px;
}

.settings-card span {
  font-size: 13px;
  font-weight: 800;
}

.settings-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.toggle {
  width: 41px;
  height: 23px;
  padding: 3px;
  border-radius: 999px;
  background: #dbe2ef;
}

.toggle::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(18px);
}

.toggle.on {
  background: var(--primary);
}

.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 73px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--line);
}

.tab-bar button {
  display: grid;
  justify-items: center;
  gap: 5px;
  background: transparent;
  color: #a8b2c4;
  font-size: 10px;
  font-weight: 800;
}

.tab-bar button.is-active {
  color: var(--primary);
}

.tab-icon {
  width: 24px;
  height: 24px;
  position: relative;
}

.tab-icon::before,
.tab-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.tab-icon.home::before {
  inset: 7px 4px 3px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 3px;
}

.tab-icon.home::after {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-left: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: rotate(45deg);
}

.tab-icon.review::before {
  inset: 5px;
  border: 3px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.tab-icon.stats::before,
.tab-icon.stats::after {
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: currentColor;
}

.tab-icon.stats::before {
  left: 6px;
  height: 10px;
  box-shadow: 7px -5px 0 currentColor, 14px -1px 0 currentColor;
}

.tab-icon.user::before {
  left: 8px;
  top: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tab-icon.user::after {
  left: 5px;
  bottom: 3px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
}

.tab-icon.rank::before {
  left: 4px;
  bottom: 4px;
  width: 4px;
  height: 9px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 7px -5px 0 currentColor, 14px -9px 0 currentColor;
}

.tab-icon.rank::after {
  left: 8px;
  top: 3px;
  width: 8px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 6px 6px 0 0;
}

.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 26, 49, 0.32);
  backdrop-filter: blur(5px);
}

.modal-layer.is-hidden {
  display: none;
}

.confirm-dialog {
  width: 100%;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(40, 51, 85, 0.24);
}

.confirm-dialog h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.confirm-dialog p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-actions button {
  min-height: 43px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.confirm-actions .ghost {
  background: #f0efff;
  color: var(--primary);
}

.confirm-actions .solid {
  background: linear-gradient(90deg, #6462ff, #8f63f4);
  color: #fff;
}

@media (max-width: 430px) {
  body {
    display: block;
    background: #f5f7fb;
  }

  .phone-shell {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    height: calc(100vh - 38px);
  }
}
