:root {
  --ink: #18211c;
  --muted: #69736b;
  --paper: #f4f0e7;
  --card: #fffdf8;
  --green: #1f5a43;
  --green-soft: #dfe9df;
  --yellow: #f3c95b;
  --line: rgba(24, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: #d9ddd6;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.82), transparent 28%),
    #d9ddd6;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  overscroll-behavior-y: none;
}

button,
textarea,
input {
  font: inherit;
}

button,
input,
textarea,
a {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(243, 201, 91, .9);
  outline-offset: 3px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(96px, calc(72px + env(safe-area-inset-bottom)))
    max(18px, env(safe-area-inset-left));
  background:
    linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  box-shadow: 0 0 60px rgba(30, 50, 38, 0.12);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 38px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.week-chip {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.hero {
  padding: 0 4px;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0 14px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(42px, 10vw, 68px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
}

.hero > p:last-of-type {
  width: 82%;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #dedbcf;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #4b8967);
  transition: width .35s ease;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pace-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.pace-summary div {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.46);
}

.pace-summary strong {
  color: var(--green);
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
}

.pace-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.catalog-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 30px 0 14px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 16px;
  background: rgba(228, 226, 216, .86);
  backdrop-filter: blur(16px);
}

.tabs button {
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tabs button.active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 3px 12px rgba(35, 44, 38, .08);
}

.panel {
  display: grid;
  gap: 14px;
}

.study-grid {
  display: grid;
  gap: 14px;
}

.lesson-card,
.note-card,
.state-card,
.record-card,
.plan-list details {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,253,248,.9);
  box-shadow: 0 12px 32px rgba(40, 48, 42, .06);
}

.lesson-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.lesson-card::after {
  content: "";
  position: absolute;
  top: -55px;
  right: -45px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(243,201,91,.28);
}

.lesson-meta,
.record-topline {
  display: flex;
  justify-content: space-between;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.lesson-card h2 {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 18px 0 10px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.28;
}

.lesson-intent {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.primary-button,
.secondary-button,
.finish-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(31,90,67,.22);
}

.play-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: white;
  font-size: 9px;
  text-indent: 2px;
}

.link-note {
  margin: 10px 0 0;
  color: #8b918c;
  text-align: center;
  font-size: 9px;
}

.video-player {
  width: min(100%, 320px);
  margin: 0 auto 14px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(31, 90, 67, .18);
  border-radius: 17px;
  background: #111;
  box-shadow: 0 10px 26px rgba(18, 24, 20, .14);
}

.video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  color: var(--green);
  background: var(--green-soft);
  box-shadow: none;
}

.video-fallback .play-icon {
  color: white;
  background: var(--green);
}

.note-card {
  padding: 20px;
  transition: border-color .2s ease;
}

.note-card.ready {
  border-color: rgba(31,90,67,.35);
}

.note-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.note-heading h3 {
  margin: 5px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
}

.note-heading > span {
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 700;
}

.note-card label {
  display: block;
  margin-top: 13px;
}

.note-card label > span,
.result-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
}

textarea,
.result-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #f8f6ef;
  transition: border-color .2s ease, background .2s ease;
}

textarea {
  min-height: 78px;
  padding: 12px;
  resize: vertical;
  font-size: 16px;
  line-height: 1.55;
}

.single-note-input {
  min-height: 230px;
}

textarea:focus,
.result-field input:focus {
  border-color: rgba(31,90,67,.55);
  background: white;
}

.finish-button {
  margin-top: 17px;
  color: var(--ink);
  background: var(--yellow);
}

.finish-button:disabled {
  cursor: wait;
  opacity: .62;
}

.record-media {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.record-media > summary {
  min-height: 36px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.image-add-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.image-record-block {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.image-record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-record-heading > div {
  display: grid;
  gap: 3px;
}

.image-record-heading strong {
  font-size: 11px;
}

.image-record-heading small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.image-add-button {
  position: relative;
  display: grid;
  margin: 0;
  min-height: 44px;
  padding: 8px 11px;
  place-items: center;
  border-radius: 11px;
  color: var(--green);
  background: var(--green-soft);
  text-align: center;
  cursor: pointer;
}

.image-add-button span {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
}

.image-add-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.image-item {
  min-width: 0;
  margin: 0;
}

.image-placeholder {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 11px;
  color: var(--muted);
  background: #ebe8df;
  text-align: center;
}

.image-placeholder span {
  max-width: 90%;
  font-size: 8px;
  line-height: 1.35;
}

.image-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .2s ease;
}

.image-placeholder.loaded img {
  opacity: 1;
}

.image-placeholder.failed {
  color: #8a2d2d;
  background: #f4dddd;
}

.image-item > button {
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  text-decoration: underline;
  cursor: pointer;
}

.empty-images {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border-radius: 11px;
  color: var(--muted);
  background: #f3f0e8;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.media-status {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
}

.media-status.error {
  color: #8a2d2d;
  background: #f4dddd;
}

.message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  line-height: 1.5;
}

.state-card {
  padding: 28px 22px;
  text-align: center;
}

.state-card > span {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 22px;
}

.state-card h2 {
  margin: 14px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
}

.state-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.review-button {
  max-width: 320px;
  margin: 20px auto 0;
}

.review-prompts {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  text-align: left;
}

.review-prompts p {
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink);
  background: #f2efe6;
}

.secondary-button {
  color: var(--green);
  background: var(--green-soft);
}

.plan-list details {
  overflow: hidden;
}

.plan-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  list-style: none;
  cursor: pointer;
}

.plan-list summary::-webkit-details-marker {
  display: none;
}

.plan-list summary span {
  display: grid;
  gap: 3px;
}

.plan-list summary small {
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .18em;
}

.plan-list summary strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
}

.plan-list summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.plan-list ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 18px 14px;
  list-style: none;
}

.plan-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.plan-list li > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #edeae1;
  font-size: 9px;
  font-weight: 800;
}

.plan-list li.done > span {
  color: white;
  background: var(--green);
}

.plan-list li div {
  display: grid;
  gap: 4px;
}

.plan-list li strong {
  font-size: 11px;
  line-height: 1.4;
}

.plan-list li small {
  color: var(--muted);
  font-size: 9px;
}

.notes-list {
  gap: 12px;
}

.record-card {
  padding: 19px;
}

.record-topline time {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

.record-card h3 {
  margin: 12px 0 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
  line-height: 1.35;
}

.record-card dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.record-card dl div {
  padding-left: 11px;
  border-left: 2px solid var(--yellow);
}

.record-card dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.record-card dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.result-field {
  display: block;
  margin-top: 15px;
}

.result-field input {
  padding: 11px 12px;
  font-size: 11px;
}

.record-media {
  margin-top: 14px;
}

.record-media .image-record-block {
  padding-bottom: 2px;
}

.record-media > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.record-media > summary em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.record-media .image-record-block {
  margin-top: 4px;
  border-top: 0;
}

.record-media .image-add-button {
  width: 100%;
}

footer {
  flex-wrap: wrap;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  color: #929890;
  font-family: Georgia, "Songti SC", serif;
  font-size: 10px;
}

.selection-card,
.up-next-card,
.plan-intro,
.backup-card,
.sync-card,
.review-hub {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 12px 32px rgba(40, 48, 42, .06);
}

.review-hub {
  display: grid;
  gap: 16px;
  padding: 21px;
  border-color: rgba(31, 90, 67, .24);
}

.review-hub.active {
  background: linear-gradient(145deg, rgba(225, 239, 230, .92), rgba(255, 253, 248, .96));
}

.review-hub h2 {
  margin: 6px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
}

.review-hub p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.selection-card,
.up-next-card,
.plan-intro,
.backup-card,
.sync-card {
  padding: 20px;
}

.selection-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.selection-heading h2,
.section-heading h2,
.plan-intro h2,
.backup-card h2,
.sync-card h2 {
  margin: 5px 0 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 24px;
  line-height: 1.2;
}

.priority-badge,
.section-heading > span {
  flex: none;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 800;
}

.selection-copy,
.plan-intro > p:last-child,
.backup-card > div > p:last-child,
.sync-card > div > p:last-child {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.category-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-choice {
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #f6f3eb;
  text-align: left;
  cursor: pointer;
}

.category-choice span,
.category-choice small {
  display: block;
}

.category-choice span {
  font-size: 12px;
  font-weight: 800;
}

.category-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.category-choice.selected {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.category-choice.selected small {
  color: rgba(255, 255, 255, .75);
}

.category-choice.featured:not(.selected) {
  border-color: rgba(243, 201, 91, .75);
  background: rgba(243, 201, 91, .17);
}

.series-finished {
  margin-top: 0;
}

.up-next-card {
  margin-top: 0;
}

.up-next-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.up-next-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.up-next-list li > span {
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.up-next-list li div {
  display: grid;
  gap: 4px;
}

.up-next-list strong {
  font-size: 11px;
  line-height: 1.4;
}

.up-next-list small {
  color: var(--muted);
  font-size: 9px;
}

.up-next-list button,
.series-actions button,
.plan-list li button,
.plan-list li a {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.plan-panel,
.notes-panel {
  gap: 14px;
}

.plan-intro h2 {
  margin-top: 7px;
}

.plan-intro > p:last-child {
  margin-bottom: 0;
}

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

.plan-list summary span i {
  display: block;
  max-width: 410px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
}

.series-actions {
  padding: 0 18px 10px;
}

.series-actions button {
  width: 100%;
  min-height: 42px;
}

.plan-list li {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.plan-list li.chosen {
  margin: 0 -8px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 12px;
  background: rgba(243, 201, 91, .14);
}

.plan-list li b {
  color: var(--green);
  font-size: 9px;
}

.archive-details {
  opacity: .82;
}

.plan-list li.archived > span {
  color: var(--ink);
  background: #e2ded2;
}

.backup-card {
  display: grid;
  gap: 15px;
}

.backup-card h2,
.sync-card h2 {
  margin-top: 6px;
}

.backup-card > div > p:last-child,
.sync-card > div > p:last-child {
  margin-bottom: 0;
}

.sync-card {
  display: grid;
  gap: 14px;
}

.sync-card .primary-button {
  min-height: 48px;
}

.sync-card .sync-create {
  margin-top: 0;
}

.sync-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sync-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 3px solid #bcd4c5;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 90, 67, .1);
}

.sync-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.sync-divider::before,
.sync-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.sync-connect-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sync-connect-row input,
.sync-key-label input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #f8f6ef;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  letter-spacing: .04em;
}

.sync-connect-row input:focus,
.sync-key-label input:focus {
  border-color: rgba(31, 90, 67, .55);
  background: white;
}

.sync-connect-row button {
  min-height: 46px;
  padding: 10px 13px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.sync-security-note,
.sync-status {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sync-status {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 700;
}

.sync-key-label {
  display: grid;
  gap: 7px;
}

.sync-key-label > span {
  font-size: 10px;
  font-weight: 800;
}

.sync-key-label input {
  text-align: center;
  letter-spacing: .08em;
}

.sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sync-actions .secondary-button {
  min-height: 46px;
  margin: 0;
  font-size: 11px;
}

.sync-disconnect {
  min-height: 40px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.message.error {
  color: #8a2d2d;
  background: #f4dddd;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.backup-actions .secondary-button,
.import-button {
  min-height: 46px;
  padding: 12px;
  border: 0;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
}

.import-button {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  text-align: center;
  cursor: pointer;
}

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

.install-help {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.install-help summary {
  min-height: 34px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.install-help p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

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

noscript {
  display: block;
  padding: 20px;
  text-align: center;
}

@media (hover: hover) {
  .category-choice:hover,
  .up-next-list button:hover,
  .plan-list li button:hover,
  .plan-list li a:hover,
  .series-actions button:hover {
    filter: brightness(.97);
    transform: translateY(-1px);
  }
}

@media (max-width: 390px) {
  .brand small {
    display: none;
  }

  .week-chip {
    padding: 7px 9px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .tabs button {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
  }

  .up-next-list li {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .up-next-list li button {
    grid-column: 2;
    justify-self: start;
  }

  .plan-list li {
    grid-template-columns: 27px minmax(0, 1fr);
  }

  .plan-list li button,
  .plan-list li b,
  .plan-list li a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (min-width: 700px) {
  .app-shell {
    margin: 24px auto;
    padding: 26px 30px 96px;
    min-height: calc(100vh - 48px);
    border-radius: 28px;
  }

  .topbar {
    margin-bottom: 48px;
  }

  .hero {
    max-width: 820px;
  }

  .hero h1 {
    font-size: 72px;
    letter-spacing: -0.055em;
  }

  .hero > p:last-of-type {
    max-width: 620px;
  }

  .tabs {
    max-width: 430px;
    margin-top: 36px;
  }

  .study-grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
  }

  .category-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .selection-card,
  .up-next-card,
  .plan-intro,
  .backup-card,
  .sync-card {
    padding: 26px;
  }

  .lesson-card {
    position: sticky;
    top: 76px;
    padding: 28px;
  }

  .lesson-card h2 {
    font-size: 32px;
  }

  .note-card {
    padding: 26px;
  }

  .notes-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .plan-list .state-card,
  .notes-list .state-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .plan-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (display-mode: standalone) {
  .app-shell {
    min-height: 100dvh;
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media (min-width: 1050px) {
  .app-shell {
    padding-right: 48px;
    padding-left: 48px;
  }

  .pace-summary {
    max-width: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
