@import url('../assets/vendor/katex/katex.min.css');
:root {
  --blue: #1269ff;
  --ink: #091841;
  --muted: #7885a4;
  --line: #dfe8f5;
  --green: #0cbd83;
  --purple: #7754eb;
  --pale: #edf5ff;
  --shadow: 0 7px 24px #265fbb09;
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    sans-serif;
  color: var(--ink);
  font-size: 15px;
  font-synthesis: none;
  background: #eef5fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 100% 0, #e4f3ff 0, transparent 42%),
    linear-gradient(130deg, #f9fcff, #f1f8ff);
  min-height: 100dvh;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.48;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #4ba5ff;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--blue);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -1px;
  line-height: 1.35;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.65px;
  line-height: 1.45;
}
h3 {
  font-size: 16px;
  line-height: 1.55;
}
p {
  line-height: 1.7;
}
#app {
  max-width: 600px;
  min-height: 100dvh;
  margin: 0 auto;
}
.screen {
  padding: calc(env(safe-area-inset-top) + 18px) 22px
    calc(102px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row.between {
  justify-content: space-between;
}
.row.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.muted,
.hint {
  color: var(--muted);
  font-size: 13px;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.25px;
  margin-bottom: 9px;
}
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin: 0 -7px 22px;
}
.page-header h1 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.page-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.icon-button {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  border-radius: 14px;
}
.icon-button:hover {
  background: #eaf2ff;
}
.card {
  background: #fff;
  border: 1px solid #fff;
  border-radius: 23px;
  padding: 21px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card .card {
  border-color: var(--line);
  box-shadow: none;
}
.screen > .stack > .card {
  margin-bottom: 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
  gap: 10px;
}
.section-title h2 {
  font-size: 19px;
}
.section-title button {
  font-size: 12px;
  color: var(--muted);
  padding: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 49px;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:active {
  transform: scale(0.985);
}
.button.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 12px #1670ff15;
}
.button.secondary {
  background: #f4f8ff;
  border-color: #cddbf4;
  color: var(--blue);
}
.button.ghost {
  background: #fff;
  border-color: var(--line);
  color: #647394;
}
.button.small {
  min-height: 35px;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}
.button.full {
  width: 100%;
}
.actions {
  margin-top: 18px;
}
.actions > .button {
  flex: 1;
}
.field {
  display: block;
  width: 100%;
  border: 1px solid #d5dfef;
  border-radius: 13px;
  background: #fff;
  padding: 14px;
  color: var(--ink);
  min-height: 49px;
  outline: none;
}
.field::placeholder {
  color: #a2abc0;
}
.field:focus {
  border-color: var(--blue);
}
textarea.field {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}
label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  background: #edf4ff;
  color: var(--blue);
  border-radius: 99px;
  padding: 6px 10px;
  white-space: nowrap;
}
.chip.green {
  background: #e6fbf1;
  color: #00a874;
}
.chip.purple {
  background: #f1ecff;
  color: var(--purple);
}
.chip.amber {
  background: #fff3de;
  color: #b57a15;
}
.chip.active {
  background: var(--blue);
  color: #fff;
}
.chips {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding: 3px 0 10px;
  scrollbar-width: none;
}
.chips button {
  padding: 9px 15px;
  border: 1px solid #e0e8f4;
  background: white;
  font-size: 12px;
  flex-shrink: 0;
}
.chips button.active {
  border-color: var(--blue);
  background: var(--blue);
}
.tabs {
  display: flex;
  gap: 4px;
  border: 1px solid #dfe8f4;
  background: #eaf2fc70;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 18px;
}
.tabs button {
  flex: 1;
  padding: 11px 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 10px;
}
.tabs .active {
  background: white;
  color: var(--blue);
  box-shadow: 0 2px 5px #3262a10c;
}
.progress-track {
  height: 7px;
  background: #e5edf8;
  border-radius: 99px;
  overflow: hidden;
  margin: 14px 0 18px;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
}
.progress-track.green > span {
  background: var(--green);
}
.tile-art {
  width: 49px;
  height: 49px;
  object-fit: contain;
  flex-shrink: 0;
}
.tile-art.small {
  width: 35px;
  height: 35px;
}
.tile-art.large {
  width: 85px;
  height: 85px;
}
.subject-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  background: #eef6ff;
  border-radius: 14px;
  flex-shrink: 0;
  color: var(--blue);
  font-size: 21px;
  font-weight: 800;
}
.subject-icon.green {
  background: #e4faf2;
  color: #07b57e;
}
.subject-icon.purple {
  background: #f0ebff;
  color: var(--purple);
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.subject-card {
  text-align: left;
  background: #fff;
  border: 1px solid white;
  padding: 18px;
  border-radius: 21px;
  box-shadow: var(--shadow);
  min-height: 132px;
}
.subject-card .row {
  gap: 10px;
}
.subject-card h3 {
  font-size: 15px;
}
.subject-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
.subject-card .icon-button {
  width: 24px;
  height: 26px;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  font-size: 19px;
  letter-spacing: -0.6px;
}
.brand-mark {
  display: inline-block;
  background: linear-gradient(150deg, #00c9ed 10%, #167dff 46%, #7945ff 80%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 1000;
  font-style: italic;
  font-family: Arial, sans-serif;
  font-size: 41px;
  line-height: 1;
  letter-spacing: -6px;
  padding-right: 6px;
}
.greeting {
  margin-bottom: 20px;
}
.greeting h1 {
  font-size: 27px;
  font-weight: 800;
}
.greeting p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.hero-card {
  background: linear-gradient(120deg, #fff 45%, #e9f4ff);
  border: 1px solid #fff;
  position: relative;
  padding: 22px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card h2 {
  font-size: 22px;
  line-height: 1.5;
  margin: 7px 0 10px;
  max-width: 75%;
}
.hero-card .tile-art {
  position: absolute;
  right: 16px;
  top: 35px;
  width: 83px;
  height: 83px;
  transform: rotate(-5deg);
}
.hero-card p {
  font-size: 12px;
  color: var(--muted);
  max-width: 75%;
}
.hero-card .button {
  margin-top: 20px;
  width: 100%;
  min-height: 43px;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px 3px;
  margin-top: 14px;
  background: #fff9;
  border-radius: 18px;
  border: 1px solid white;
}
.stat {
  text-align: center;
  border-right: 1px solid #e8eef5;
}
.stat:last-child {
  border: 0;
}
.stat strong {
  display: block;
  font-size: 23px;
  color: var(--blue);
  letter-spacing: -0.5px;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.shortcut {
  padding: 13px 2px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 650;
}
.shortcut svg {
  color: var(--blue);
}
.list-button {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid #edf1f7;
}
.list-button:last-child {
  border-bottom: 0;
}
.list-button > svg:last-child {
  margin-left: auto;
  color: #91a0be;
  width: 18px;
  flex-shrink: 0;
}
.list-button h3 {
  font-size: 14px;
}
.list-button p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.note-card {
  text-align: left;
  width: 100%;
  display: block;
  margin-bottom: 12px;
}
.note-card h2 {
  font-size: 17px;
  margin: 12px 0 8px;
}
.note-card p {
  font-size: 13px;
  color: #73809d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-card .row:last-child {
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
}
.unit-list {
  position: relative;
}
.unit-card {
  position: relative;
  display: flex;
  gap: 15px;
  padding: 17px 13px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 20px;
  margin-bottom: 13px;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow);
}
.unit-number {
  border-radius: 50%;
  height: 37px;
  min-width: 37px;
  background: #eaf3ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.unit-card.active {
  border-color: #8ebcff;
}
.unit-card h3 {
  font-size: 15px;
  margin-bottom: 3px;
}
.unit-card p {
  font-size: 11px;
  color: var(--muted);
}
.unit-card .chip {
  margin-top: 9px;
}
.unit-course {
  font-size: 13px;
  color: #7b8caf;
  margin: 22px 0 13px;
  font-weight: 750;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border-radius: 20px;
  padding: 18px 12px;
  text-align: left;
  border: 1px solid #e2eafa;
  min-height: 91px;
}
.tool-card .tile-art {
  width: 42px;
  height: 42px;
}
.tool-card h3 {
  font-size: 14px;
}
.tool-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.tool-card.selected {
  background: #eff6ff;
  border-color: var(--blue);
}
.tool-card input {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
}
.rich-text {
  line-height: 1.85;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.rich-text h3 {
  margin: 14px 0 6px;
}
.rich-text br + h3 {
  margin-top: 8px;
}
.rich-text img,
.question-visual {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto;
  border-radius: 12px;
}
.question {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.65;
  margin: 22px 0;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.choice {
  border: 1px solid #dfe6f2;
  background: white;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  padding: 15px;
  border-radius: 14px;
  line-height: 1.6;
  width: 100%;
}
.choice.selected {
  color: var(--blue);
  border-color: var(--blue);
  background: #f0f6ff;
}
.choice-number {
  width: 27px;
  height: 27px;
  border: 1px solid #dbe3f0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.choice.selected .choice-number {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.feedback {
  padding: 18px;
  border-radius: 17px;
  background: #e9f9f1;
  border: 1px solid #bcecd8;
  margin-top: 18px;
  line-height: 1.75;
  font-size: 14px;
}
.feedback.wrong {
  background: #fff4ef;
  border-color: #f6d6c7;
}
.feedback h3 {
  margin-bottom: 7px;
}
.flashcard {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  position: relative;
  background: linear-gradient(140deg, #fff, #f9fcff);
  border: 1px solid #d9e6fb;
  border-radius: 24px;
  box-shadow: 0 8px 22px #2a70ce0b;
}
.flashcard .question {
  font-size: 24px;
  margin: 23px 0;
}
.flashcard .chip {
  position: absolute;
  top: 17px;
  left: 18px;
}
.flashcard .answer {
  font-size: 23px;
  font-weight: 750;
  color: var(--blue);
  padding: 25px 10px 12px;
  line-height: 1.6;
}
.flashcard .hint {
  margin-top: 13px;
}
.grade-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 17px;
}
.grade-row button {
  border-radius: 15px;
  background: white;
  border: 1px solid var(--line);
  padding: 13px 3px;
  font-size: 12px;
  font-weight: 700;
}
.grade-row button:first-child {
  color: #e2774a;
  background: #fff8f1;
}
.grade-row button:last-child {
  color: #00a876;
  background: #f0fcf6;
}
.mini-section h2 {
  font-size: 18px;
  margin: 10px 0;
}
.formula {
  font-family: Georgia, serif;
  font-size: 23px;
  text-align: center;
  padding: 22px 10px;
  background: #eff6ff;
  border-radius: 16px;
  margin: 15px 0;
  overflow: auto;
  white-space: pre-wrap;
}
.strip-sentence {
  line-height: 3.3;
  font-size: 18px;
  padding: 20px 12px;
  background: #f5f9ff;
  border-radius: 17px;
  margin: 20px 0;
}
.slot-input {
  width: 105px;
  display: inline-block;
  text-align: center;
  border: 1px dashed #78a4ed;
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  padding: 8px;
  margin: 3px;
  font-weight: 700;
}
.slot-input:focus {
  border: 2px solid var(--blue);
}
.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.tray button {
  background: #fff;
  border: 1px solid #ceddf5;
  border-radius: 10px;
  padding: 10px 14px;
  color: #37578f;
}
.mindmap-scroll {
  overflow: auto;
  padding: 24px 7px;
  border-radius: 16px;
  background: #f4f8fd;
  min-height: 260px;
}
.pack-tree,
.pack-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: max-content;
}
.pack-tree ul {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  border-left: 2px solid #bccef0;
  padding-left: 20px;
}
.pack-tree li {
  display: flex;
  align-items: center;
  gap: 25px;
  position: relative;
}
.pack-tree ul > li:before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 21px;
  border-top: 2px solid #bccef0;
}
.pack-node {
  padding: 12px;
  border: 1px solid #bed1f0;
  background: #fff;
  border-radius: 12px;
  max-width: 175px;
  white-space: normal;
  font-size: 12px;
  line-height: 1.5;
}
.pack-node.central {
  background: var(--blue);
  color: white;
}
.pack-node .slot-input {
  margin: 0;
  max-width: 115px;
}
.result-ring {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 20px auto;
  background: conic-gradient(var(--blue) var(--angle, 0deg), #e5edfa 0);
  position: relative;
}
.result-ring:before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
}
.result-ring strong {
  font-size: 32px;
  z-index: 1;
}
.result-ring small {
  font-size: 14px;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 15px 0;
}
.chat-bubble {
  max-width: 90%;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid #e1eaf5;
  border-radius: 18px 18px 18px 4px;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: #e8f2ff;
  border-color: #cfe1fb;
  border-radius: 18px 18px 4px 18px;
}
.chat-bubble small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
.composer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  align-items: flex-end;
}
.composer textarea {
  min-height: 49px;
  max-height: 160px;
  resize: none;
}
.composer .button {
  min-width: 60px;
  padding: 12px;
}
.empty-state {
  text-align: center;
  padding: 38px 22px;
}
.empty-state p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 22px;
}
.empty-icon {
  color: var(--blue);
  display: block;
  margin: 8px auto 20px;
}
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 220px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #dfeafe;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-state {
  text-align: center;
  padding: 28px 20px;
}
.error-state h2 {
  font-size: 18px;
}
.error-state p {
  color: var(--muted);
  margin: 12px 0 20px;
}
.sample-banner {
  font-size: 11px;
  color: #506d99;
  text-align: center;
  background: #e1edfc;
  padding: 8px 12px;
}
.inline-warning {
  padding: 13px;
  background: #fff6e9;
  color: #927036;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
}
#app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 600px);
  background: #fffffff5;
  border-top: 1px solid #e5edf8;
  backdrop-filter: blur(16px);
  padding: 11px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -5px 20px #41639105;
}
#app-nav[hidden] {
  display: none;
}
#app-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: #a0abc0;
  font-size: 10px;
  font-weight: 600;
}
#app-nav button.active {
  color: var(--blue);
}
#app-nav svg {
  width: 23px;
  height: 23px;
}
#toast {
  position: fixed;
  bottom: calc(94px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 15px);
  background: #10234fed;
  color: white;
  border-radius: 14px;
  padding: 13px 19px;
  font-size: 13px;
  box-shadow: 0 5px 20px #1c356733;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.boot {
  min-height: 80dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  color: var(--muted);
}
.boot .brand-mark {
  font-size: 90px;
}
.login-screen {
  padding-top: calc(env(safe-area-inset-top) + 38px);
}
.login-logo {
  text-align: center;
  margin: 34px 0;
}
.login-logo .brand-mark {
  font-size: 90px;
}
.login-logo h1 {
  font-size: 30px;
  font-weight: 850;
  margin: 10px 0;
}
.login-logo p {
  color: var(--muted);
  font-size: 13px;
}
.login-form {
  padding: 24px;
  border: 1px solid #fff;
  background: #ffffffb8;
  border-radius: 24px;
}
.login-form .button {
  width: 100%;
  margin-top: 24px;
}
.login-foot {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin-top: 24px;
}
.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 28px;
}
.grade-grid button {
  border: 1px solid #d0ddee;
  background: #fff;
  border-radius: 13px;
  padding: 18px 5px;
  color: #5b6d91;
}
.grade-grid .active {
  color: var(--blue);
  background: #eaf3ff;
  border-color: var(--blue);
  font-weight: 750;
}
.onboarding-intro {
  text-align: center;
  margin: 35px 0;
}
.onboarding-intro .brand-mark {
  font-size: 70px;
}
.onboarding-intro h1 {
  margin: 20px 0 10px;
}
.reader-tabs {
  margin-top: 16px;
}
.camera-preview {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 16px;
  margin: 15px 0;
}
.camera-canvas {
  display: block;
  width: 100%;
  height: 280px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  touch-action: none;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed #aac8f1;
  background: #f4f9ff;
  border-radius: 20px;
  padding: 35px 15px;
  gap: 14px;
  min-height: 220px;
}
.upload-zone input {
  max-width: 100%;
  font-size: 12px;
}
.reader-section {
  margin: 0 0 16px;
  padding: 19px;
  background: white;
  border-radius: 20px;
}
.reader-section h2 {
  font-size: 18px;
  margin-bottom: 15px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, #2088ff, #7258ed);
  display: grid;
  place-items: center;
  color: white;
  font-size: 25px;
  font-weight: 800;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.search-box {
  position: relative;
  margin: 16px 0;
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 14px;
  color: #9aabc4;
}
.search-box .field {
  padding-left: 44px;
}
.box-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.box-track > div {
  border: 1px solid #d8e4f6;
  background: #f7faff;
  border-radius: 12px;
  padding: 12px 1px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.box-track .active {
  border-color: var(--blue);
  background: #eaf3ff;
  color: var(--blue);
}
.box-track strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}
@media (min-width: 700px) {
  body {
    background: #eaf1f9;
  }
  #app {
    box-shadow: 0 0 70px #19346e0d;
    background:
      radial-gradient(ellipse at 100% 0, #e4f3ff 0, transparent 42%), #f5faff;
  }
  .screen {
    padding-left: 30px;
    padding-right: 30px;
  }
  .subject-card {
    min-height: 145px;
  }
}
@media (max-width: 360px) {
  .screen {
    padding-left: 15px;
    padding-right: 15px;
  }
  .subject-card {
    padding: 13px;
  }
  .subject-card h3 {
    font-size: 13px;
  }
  .tool-card {
    padding: 14px 8px;
    gap: 7px;
  }
  .tool-card .tile-art {
    width: 32px;
    height: 32px;
  }
  .card {
    padding: 17px;
  }
  .greeting h1 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0s !important;
    transition: none !important;
  }
}
/* Keep native iOS focus zoom from obscuring the app navigation. */
input.field,
select.field,
textarea.field,
.slot-input {
  font-size: 16px;
}

.rich-text .katex-display{max-width:100%;overflow-x:auto;overflow-y:hidden;padding:5px 0}.rich-text{overflow-wrap:anywhere}
