:root {
  color-scheme: light;
  --ink: #172a3d;
  --muted: #607184;
  --line: #d7e0e6;
  --canvas: #eef3f5;
  --paper: #ffffff;
  --navy: #173149;
  --green: #1d745d;
  --gold: #a76e0d;
  --red: #ad433a;
  --blue: #3467a4;
  --plum: #725096;
  --teal: #16777c;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

button,
input,
a {
  font: inherit;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(52, 103, 164, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-copy strong {
  font-size: 21px;
  line-height: 1.1;
}

.brand-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account {
  display: grid;
  grid-template-columns: 38px minmax(0, auto) 16px;
  min-width: 178px;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 7px;
  color: #254151;
  text-align: left;
  background: #fff;
  border: 1px solid #c9d7df;
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(23, 49, 73, 0.07);
  cursor: pointer;
}

.header-account:hover {
  border-color: #7193ad;
  box-shadow: 0 5px 14px rgba(23, 49, 73, 0.11);
}

.header-account.is-online {
  color: #165747;
  background: #eff8f4;
  border-color: #9bc8b7;
}

.header-account-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
}

.is-online .header-account-icon {
  background: var(--green);
}

.header-account-icon > svg {
  width: 20px;
  height: 20px;
}

.account-presence {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 12px;
  height: 12px;
  background: #a8b6bf;
  border: 2px solid #fff;
  border-radius: 50%;
}

.is-online .account-presence {
  background: #1fb987;
}

.header-account-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.header-account-copy small,
.header-account-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.header-account-copy strong {
  max-width: 190px;
  font-size: 13px;
  line-height: 1.2;
}

.header-account-chevron {
  width: 16px;
  height: 16px;
  color: #758795;
}

.preview-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px max(22px, calc((100vw - 1236px) / 2), env(safe-area-inset-right)) 12px max(22px, calc((100vw - 1236px) / 2), env(safe-area-inset-left));
  color: #153d39;
  background: #e4f4ef;
  border-bottom: 1px solid #9fcbbb;
}

.is-owner-preview .preview-banner {
  color: #493b66;
  background: #f0ebf8;
  border-bottom-color: #c8b8dd;
}

.preview-banner-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
}

.is-owner-preview .preview-banner-icon {
  background: var(--plum);
}

.preview-banner-icon svg {
  width: 22px;
  height: 22px;
}

.preview-banner-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.preview-banner-copy small {
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.is-owner-preview .preview-banner-copy small {
  color: var(--plum);
}

.preview-banner-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.preview-banner-copy span {
  overflow: hidden;
  color: #516c68;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-owner-preview .preview-banner-copy span {
  color: #6d607f;
}

.preview-banner > a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: #174f45;
  background: #fff;
  border: 1px solid #9fcbbb;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.is-owner-preview .preview-banner > a {
  color: #57436e;
  border-color: #c8b8dd;
}

.preview-banner > a svg {
  width: 16px;
  height: 16px;
}

.workspace {
  width: min(1280px, 100%);
  min-height: calc(100vh - 138px);
  margin: 0 auto;
  padding: 24px max(22px, env(safe-area-inset-right)) 36px max(22px, env(safe-area-inset-left));
}

.subject-dashboard {
  display: grid;
  gap: 18px;
  transform-origin: 50% 0;
}

.subject-dashboard.is-exiting {
  pointer-events: none;
  animation: dashboard-out 240ms ease-in both;
}

.subject-dashboard.is-returning {
  animation: dashboard-in 320ms ease-out both;
}

.dashboard-heading {
  display: flex;
  min-height: 68px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-heading p,
.library-title p,
.subject-kicker {
  display: block;
  margin: 0 0 3px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
}

.dashboard-guidance {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dashboard-heading h1:focus,
.library-title h2:focus {
  outline: none;
}

.dashboard-heading > span {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.launcher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(292px, 340px);
  align-items: start;
  gap: 22px;
}

.subjects-panel {
  min-width: 0;
}

.launcher-section-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 78px;
  margin-bottom: 13px;
  padding: 8px 2px 13px;
  border-bottom: 2px solid #cfdce3;
}

.launcher-section-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 7px;
}

.launcher-section-icon svg {
  width: 25px;
  height: 25px;
}

.launcher-section-heading small,
.saves-panel-header small {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.launcher-section-heading h2,
.saves-panel-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.launcher-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.saves-panel {
  position: sticky;
  top: 92px;
  min-width: 0;
  overflow: hidden;
  background: #f8fbfc;
  border: 1px solid #bfd2dc;
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(23, 49, 73, 0.07);
}

.saves-panel-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.saves-panel-header > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
}

.saves-panel-header > span svg {
  width: 21px;
  height: 21px;
}

.saves-panel-header small {
  color: var(--green);
}

.saves-panel-header h2 {
  font-size: 18px;
}

.saves-content {
  min-height: 188px;
  padding: 12px;
}

.saves-empty {
  display: grid;
  min-height: 164px;
  place-items: center;
  align-content: center;
  padding: 18px;
  color: #506776;
  text-align: center;
  background: #fff;
  border: 1px dashed #bdcdd6;
  border-radius: 7px;
}

.saves-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  place-items: center;
  color: var(--blue);
  background: #eaf1f8;
  border-radius: 6px;
}

.saves-empty-icon svg {
  width: 22px;
  height: 22px;
}

.saves-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.saves-empty p {
  max-width: 220px;
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.saves-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #3f6175;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.saves-count-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.saves-count-row svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.saves-count-row strong {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-size: 11px;
}

.saved-work-list {
  display: grid;
  gap: 8px;
}

.saved-work-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 24px;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d2dde3;
  border-radius: 7px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.saved-work-item:hover {
  border-color: #7ea6bf;
  transform: translateX(2px);
}

.saved-work-thumb {
  align-self: stretch;
  overflow: hidden;
  background: #e4ebef;
}

.saved-work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.saved-work-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.saved-work-copy small {
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.saved-work-copy strong,
.saved-work-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-work-copy strong {
  font-size: 12px;
}

.saved-work-copy span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.saved-work-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--blue);
}

.saved-work-arrow svg {
  width: 16px;
  height: 16px;
}

.more-saves-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.saves-manage-button {
  display: grid;
  width: calc(100% - 24px);
  min-height: 56px;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  margin: 0 12px 12px;
  padding: 8px 10px;
  color: #28495c;
  text-align: left;
  background: #eef4f7;
  border: 1px solid #c5d5dd;
  border-radius: 7px;
  cursor: pointer;
}

.saves-manage-button > svg {
  width: 19px;
  height: 19px;
}

.saves-manage-button > span {
  display: grid;
  gap: 1px;
}

.saves-manage-button strong {
  font-size: 11px;
}

.saves-manage-button small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.subject-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.collection-pilot-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f5f0fb;
  border: 1px dashed #bda8d1;
  border-radius: 8px;
  text-decoration: none;
}

.collection-pilot-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  background: var(--plum);
  border-radius: 6px;
}

.collection-pilot-icon svg {
  width: 22px;
  height: 22px;
}

.collection-pilot-link small,
.collection-pilot-link strong,
.collection-pilot-link span span {
  display: block;
}

.collection-pilot-link small {
  color: var(--plum);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.collection-pilot-link strong {
  margin-top: 2px;
  font-size: 16px;
}

.collection-pilot-link span span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.collection-pilot-link > svg {
  width: 19px;
  height: 19px;
  color: var(--plum);
}

.subject-tile {
  --accent: var(--navy);
  position: relative;
  display: grid;
  grid-template-rows: 136px minmax(0, 1fr);
  min-width: 0;
  min-height: 210px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(23, 49, 73, 0.07);
  cursor: pointer;
  animation: tile-rise 420ms ease-out both;
  animation-delay: calc(var(--order, 0) * 45ms);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.subject-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  box-shadow: 0 11px 24px rgba(23, 49, 73, 0.12);
}

.subject-tile.is-selected {
  z-index: 2;
  transform: translateY(-10px) scale(1.01);
}

.subject-english {
  --accent: #b74852;
}

.subject-science {
  --accent: var(--teal);
}

.subject-mathematics {
  --accent: var(--plum);
}

.subject-geography {
  --accent: var(--green);
}

.subject-history {
  --accent: var(--gold);
}

.subject-chinese-culture {
  --accent: var(--red);
}

.subject-art {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  min-width: 0;
  overflow: hidden;
  background: #dfe7eb;
}

.subject-art img,
.all-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-art img {
  min-width: 0;
  overflow: hidden;
  transition: transform 220ms ease;
}

.subject-art img + img {
  border-left: 2px solid rgba(255, 255, 255, 0.82);
}

.subject-tile:hover .subject-art img {
  transform: scale(1.025);
}

.subject-folder-flag,
.subject-count-badge {
  position: absolute;
  z-index: 1;
  top: 10px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(23, 49, 73, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  box-shadow: 0 3px 9px rgba(23, 42, 61, 0.2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-folder-flag {
  left: 10px;
  width: 28px;
  padding: 5px;
}

.subject-folder-flag svg {
  width: 14px;
  height: 14px;
}

.subject-count-badge {
  right: 10px;
  width: 28px;
  background: var(--accent);
}

.subject-icon {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(23, 42, 61, 0.22);
}

.subject-icon svg {
  width: 19px;
  height: 19px;
}

.subject-coming-soon {
  cursor: default;
  box-shadow: 0 5px 14px rgba(23, 49, 73, 0.045);
}

.subject-coming-soon:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 5px 14px rgba(23, 49, 73, 0.045);
}

.subject-placeholder-art {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 11%, #edf3f5);
}

.subject-placeholder-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 72%, #fff);
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(23, 49, 73, 0.08);
}

.subject-placeholder-icon svg {
  width: 38px;
  height: 38px;
}

.subject-coming-soon .subject-folder-flag {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
}

.subject-coming-soon .subject-icon {
  opacity: 0.88;
}

.subject-not-open {
  color: var(--muted);
}

.subject-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 2px 12px;
  min-width: 0;
  padding: 13px 14px 14px;
}

.subject-copy > span:first-child {
  min-width: 0;
}

.subject-kicker {
  color: var(--accent);
  font-size: 10px;
}

.subject-copy strong {
  display: block;
  font-size: 19px;
  line-height: 1.15;
}

.subject-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.subject-open {
  display: grid;
  min-width: 76px;
  align-content: center;
  justify-items: end;
  gap: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
}

.subject-open svg {
  width: 19px;
  height: 19px;
}

.subject-open span {
  white-space: nowrap;
}

.subject-all {
  grid-column: 1 / -1;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.5fr);
  grid-template-rows: 150px;
  min-height: 150px;
  border-bottom-color: var(--navy);
}

.subject-all .subject-copy {
  grid-row: 1;
  grid-column: 1;
  padding: 20px 22px;
}

.subject-all .subject-copy strong {
  font-size: 25px;
}

.subject-all .subject-copy small {
  max-width: 420px;
  font-size: 12px;
}

.all-collage {
  display: grid;
  grid-row: 1;
  grid-column: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.all-collage span {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.65);
}

.all-collage span:last-child {
  border-right: 0;
}

.library {
  min-width: 0;
}

.library.is-entering {
  animation: library-up 330ms ease-out both;
}

.library.is-exiting {
  pointer-events: none;
  animation: library-down 220ms ease-in both;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.library-heading-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.back-button {
  display: inline-flex;
  min-width: 104px;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #c9d5dd;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.back-button:hover {
  border-color: var(--navy);
}

.back-button svg {
  width: 17px;
  height: 17px;
}

.library-title {
  min-width: 0;
}

.library-title h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
}

.library-title > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-field {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
}

.search-field > svg {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 46px;
  padding: 9px 43px 9px 40px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d5dd;
  border-radius: 6px;
  font-size: 14px;
}

.search-field input::placeholder {
  color: #788797;
}

.search-field button {
  position: absolute;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.search-field button:hover {
  color: var(--ink);
  background: #edf2f5;
}

.search-field button svg {
  width: 17px;
  height: 17px;
}

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

.activity-grid.single-activity .activity-card {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(260px, auto);
  grid-column: 1 / -1;
}

.activity-grid.single-activity .activity-image {
  min-height: 260px;
  aspect-ratio: auto;
}

.activity-grid.single-activity .activity-content {
  min-height: 260px;
  padding: 22px;
}

.activity-grid.single-activity .activity-card h3 {
  font-size: 24px;
}

.activity-grid.single-activity .activity-card p {
  max-width: 620px;
  font-size: 14px;
}

.activity-card {
  --accent: var(--green);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(23, 49, 73, 0.07);
  animation: activity-rise 280ms ease-out both;
}

.activity-card:nth-child(2n) {
  animation-delay: 45ms;
}

.activity-card.subject-english {
  --accent: #b74852;
}

.activity-card.subject-science {
  --accent: var(--teal);
}

.activity-card.subject-mathematics {
  --accent: var(--plum);
}

.activity-card.subject-geography {
  --accent: var(--green);
}

.activity-card.subject-history {
  --accent: var(--gold);
}

.activity-card.subject-chinese-culture {
  --accent: var(--red);
}

.activity-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #e3e9ed;
}

.activity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.activity-image:hover img {
  transform: scale(1.02);
}

.saved-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(23, 49, 73, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
}

.saved-badge svg {
  width: 14px;
  height: 14px;
}

.activity-content {
  display: flex;
  min-width: 0;
  min-height: 218px;
  padding: 16px;
  flex-direction: column;
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.activity-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 7px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, white);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-card h3 {
  margin: 12px 0 7px;
  font-size: 20px;
  line-height: 1.18;
}

.activity-card p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.activity-footer {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e5ebef;
}

.focus {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.open-button {
  display: inline-flex;
  min-width: 92px;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.open-button svg {
  width: 16px;
  height: 16px;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  background: #fff;
  border: 1px dashed #bdcad3;
  border-radius: 8px;
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  color: var(--muted);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  font-size: 17px;
}

.empty-state span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.device-footer {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px max(20px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: #554a25;
  background: #fff9e7;
  border-top: 1px solid #d8ca90;
}

.device-footer svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.device-footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.device-footer a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 18px;
  padding: 0 12px;
  color: #1e5475;
  border: 1px solid #b8cbd7;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.device-footer a:hover {
  background: #f4f8fa;
}

.device-footer a svg {
  width: 16px;
  height: 16px;
}

.device-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(23, 42, 61, 0.26);
}

.device-dialog::backdrop {
  background: rgba(17, 34, 49, 0.5);
  backdrop-filter: blur(2px);
}

.device-dialog-frame {
  max-height: inherit;
  overflow-y: auto;
}

.storage-notice-dialog {
  width: min(680px, calc(100vw - 32px));
}

.device-dialog-frame.storage-notice-frame > header {
  grid-template-columns: 44px minmax(0, 1fr);
}

.storage-notice-icon {
  background: #176d61;
}

.storage-notice-summary {
  margin: 0;
  padding: 15px 16px;
  color: #314a5c;
  background: #edf5f7;
  border-bottom: 1px solid #cadce2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.storage-notice-languages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.storage-notice-languages section {
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #cbd7dd;
  border-top: 4px solid #1c6ab0;
  border-radius: 7px;
}

.storage-notice-languages section[lang="zh-Hant"] {
  border-top-color: #c87919;
}

.storage-language-label {
  display: block;
  color: #537080;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.storage-notice-languages h3 {
  margin: 5px 0 9px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.storage-notice-languages ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #435767;
  font-size: 11px;
  line-height: 1.5;
}

.storage-development-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 14px 14px;
  padding: 11px 12px;
  color: #6a4a19;
  background: #fff7e8;
  border: 1px solid #ead3a8;
  border-left: 4px solid #c87919;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.5;
}

.storage-development-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 1px;
}

.storage-notice-acknowledge {
  min-width: 190px;
}

.device-dialog-frame > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.device-dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 6px;
}

.device-dialog-icon svg {
  width: 21px;
  height: 21px;
}

.device-dialog header small,
.device-dialog header h2 {
  display: block;
  margin: 0;
}

.device-dialog header small {
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.device-dialog header h2 {
  margin-top: 2px;
  font-size: 20px;
}

.device-dialog header > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.device-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.device-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.device-summary > div:last-child {
  border-right: 0;
}

.device-summary strong {
  font-size: 25px;
}

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

.device-saved {
  margin: 0 14px 14px;
}

.device-saved h3,
.device-backup-tools h3 {
  margin: 0;
  font-size: 13px;
}

.device-saved-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.device-saved-grid a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 62px;
  padding: 5px 8px 5px 5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
}

.device-saved-grid img {
  width: 56px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.device-saved-grid strong,
.device-saved-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-saved-grid strong {
  font-size: 11px;
}

.device-saved-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.device-saved-grid svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.device-backup-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  margin: 0 14px 14px;
  padding: 14px;
  background: #f3f6fb;
  border: 1px solid #cfd9e8;
  border-left: 4px solid #4f68b4;
  border-radius: 7px;
}

.device-backup-tools small {
  display: block;
  margin-bottom: 3px;
  color: #4c61a2;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.device-backup-tools p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.device-backup-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-content: center;
  gap: 7px;
}

.device-backup-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  color: #344773;
  background: #fff;
  border: 1px solid #b9c5dc;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.device-backup-actions button:hover {
  border-color: #536db7;
}

.device-backup-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.device-backup-actions svg {
  width: 16px;
  height: 16px;
}

.device-action-status {
  grid-column: 1 / -1;
  margin: 0 !important;
  padding: 9px 10px;
  color: #225c48 !important;
  background: #eaf6f1;
  border: 1px solid #b9d8cc;
  border-radius: 5px;
  font-size: 10px !important;
  font-weight: 750;
}

.device-action-status[data-type="error"],
.device-action-status.restore-error {
  color: #8f3a34 !important;
  background: #fff0ee;
  border-color: #e5b9b4;
}

.device-recent {
  margin: 0 14px 14px;
}

.device-recent h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.device-recent-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.device-recent-list a {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 6px 10px 6px 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.device-recent-list a:last-child {
  border-bottom: 0;
}

.device-recent-list img {
  width: 60px;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
}

.device-recent-list strong,
.device-recent-list small {
  display: block;
}

.device-recent-list strong {
  font-size: 12px;
}

.device-recent-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.device-recent-list svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.device-recent-empty {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 13px;
  color: var(--muted);
  background: var(--canvas);
  border-radius: 7px;
  font-size: 12px;
}

.device-recent-empty svg {
  width: 20px;
  height: 20px;
}

.device-dialog-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 14px 14px;
  padding: 11px;
  color: #265b4c;
  background: #edf7f3;
  border: 1px solid #bdd8ce;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
}

.device-dialog-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.device-dialog-frame > footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 14px max(11px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}

.clear-history-button,
.dialog-done-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.dialog-done-button svg {
  width: 16px;
  height: 16px;
}

.restore-dialog {
  width: min(520px, calc(100vw - 32px));
}

.restore-icon {
  background: #4f68b4;
}

.restore-backup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.restore-backup-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px;
  border-right: 1px solid var(--line);
}

.restore-backup-summary > div:nth-child(3) {
  border-right: 0;
}

.restore-backup-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.restore-backup-summary strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.restore-backup-summary > p {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 10px 13px;
  color: var(--muted);
  background: var(--canvas);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.restore-backup-summary > p svg {
  width: 15px;
  height: 15px;
}

.restore-backup-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 14px 14px;
  padding: 12px;
  color: #725120;
  background: #fff7e7;
  border: 1px solid #e9d1a3;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
}

.restore-backup-warning svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.restore-dialog .restore-error {
  margin: 0 14px 14px !important;
}

.clear-history-button {
  margin-right: auto;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.clear-history-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.clear-history-button svg {
  width: 16px;
  height: 16px;
}

.dialog-done-button {
  min-width: 86px;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
}

.save-companion-fallback {
  display: grid;
  width: 86px;
  height: 86px;
  align-self: center;
  place-items: center;
  color: #fff;
  background: #177968;
  border: 7px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(23, 79, 71, 0.18);
}

.save-companion-fallback svg {
  width: 37px;
  height: 37px;
}

.save-companion-fallback small {
  margin-top: -18px;
  font-size: 8px;
  font-weight: 900;
}

.profile-account-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 11px;
  color: #254151;
  background: #fff;
  border: 1px solid #cbd9df;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.profile-account-actions button:hover {
  border-color: #6ea99c;
}

.profile-account-actions button.profile-primary {
  color: #fff;
  background: #177968;
  border-color: #177968;
}

.profile-account-actions button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.work-profile-dialog {
  width: min(680px, calc(100vw - 32px));
}

.profile-icon,
.cloud-restore-icon {
  background: #177968;
}

#workProfileContent {
  min-height: 260px;
}

.profile-welcome {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 20px 14px;
}

.profile-welcome-visual {
  display: grid;
  height: 112px;
  place-items: center;
  background: #eaf5f3;
  border-radius: 7px;
}

.profile-welcome-visual img {
  width: 106px;
  height: 106px;
  object-fit: contain;
}

.profile-welcome-visual .save-companion-fallback {
  width: 78px;
  height: 78px;
}

.profile-welcome h3,
.profile-form-heading h3,
.profile-delete-warning h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.profile-welcome p,
.profile-form-heading p,
.profile-delete-warning p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 20px 14px;
}

.profile-choice-grid button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 86px;
  padding: 13px;
  color: var(--ink);
  text-align: left;
  background: #f8fafb;
  border: 1px solid #cedbe0;
  border-radius: 7px;
  cursor: pointer;
}

.profile-choice-grid button:hover {
  border-color: #3c9584;
  background: #f2f9f7;
}

.profile-choice-grid button > svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  color: #177968;
  background: #e1f2ed;
  border-radius: 5px;
  box-sizing: content-box;
}

.profile-choice-grid button span {
  display: grid;
  gap: 4px;
}

.profile-choice-grid strong {
  font-size: 13px;
  line-height: 1.25;
}

.profile-choice-grid small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.profile-boundary-card,
.profile-shared-ipad-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 20px 18px;
  padding: 11px 12px;
  color: #5e4d28;
  background: #fff8e8;
  border: 1px solid #e7d4aa;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.45;
}

.profile-boundary-card svg,
.profile-shared-ipad-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.profile-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.profile-back-button,
.profile-text-button,
.profile-danger-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  color: #496171;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.profile-back-button svg,
.profile-danger-link svg {
  width: 16px;
  height: 16px;
}

.profile-form-heading small,
.profile-delete-warning small,
.profile-account-hero small {
  display: block;
  margin-bottom: 4px;
  color: #177968;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field {
  display: grid;
  gap: 6px;
  color: #344d5c;
  font-size: 10px;
  font-weight: 850;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdccd3;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}

.profile-field input:focus,
.profile-field textarea:focus {
  border-color: #177968;
  outline: 3px solid rgba(23, 121, 104, 0.16);
}

.profile-agreement {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px;
  color: #50636f;
  background: #f3f7f8;
  border: 1px solid #d4e0e4;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.profile-agreement input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #177968;
}

.profile-submit-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  color: #fff;
  background: #177968;
  border: 1px solid #177968;
  border-radius: 6px;
  font-weight: 850;
  cursor: pointer;
}

.profile-submit-button.danger {
  background: #a83d38;
  border-color: #a83d38;
}

.profile-submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.profile-submit-button svg {
  width: 18px;
  height: 18px;
}

.profile-text-button {
  justify-self: center;
  color: #315f88;
}

.profile-form-status {
  margin: 0 20px 16px;
  padding: 10px 11px;
  color: #8f3a34;
  background: #fff0ee;
  border: 1px solid #e5b9b4;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.profile-form .profile-form-status,
.profile-account .profile-form-status {
  margin: 0;
}

.profile-form-status[data-type="success"] {
  color: #225c48;
  background: #eaf6f1;
  border-color: #b9d8cc;
}

.profile-form-status[data-type="warning"],
.profile-form-status[data-type="working"] {
  color: #725120;
  background: #fff7e7;
  border-color: #e9d1a3;
}

.profile-account {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.profile-account-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 100px;
  padding: 10px 14px 10px 8px;
  background: #ecf6f3;
  border: 1px solid #c2ded6;
  border-radius: 7px;
}

.profile-account-hero img {
  width: 82px;
  height: 88px;
  object-fit: contain;
}

.profile-account-hero > .save-companion-fallback {
  width: 68px;
  height: 68px;
  justify-self: center;
}

.profile-account-hero h3,
.profile-account-hero p {
  margin: 0;
}

.profile-account-hero h3 {
  font-size: 20px;
}

.profile-account-hero p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.profile-account-hero > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: #176a59;
  background: #fff;
  border: 1px solid #b5d7ce;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
}

.profile-account-hero > span svg {
  width: 16px;
  height: 16px;
}

.profile-continue-work {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid #bcd8d0;
  border-radius: 7px;
  cursor: pointer;
}

.profile-continue-work:hover { border-color: #177968; }
.profile-continue-work > span:first-child { display: grid; width: 44px; height: 44px; place-items: center; color: #fff; background: #177968; border-radius: 6px; }
.profile-continue-work > span:nth-child(2) { display: grid; gap: 3px; }
.profile-continue-work strong { font-size: 14px; }
.profile-continue-work small { color: var(--muted); font-size: 10px; }
.profile-continue-work svg { width: 18px; height: 18px; }
.profile-work-list { display: grid; gap: 8px; }
.profile-work-list > a { display: grid; grid-template-columns: 58px minmax(0, 1fr) 20px; align-items: center; gap: 11px; min-height: 70px; padding: 7px 10px 7px 7px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 7px; }
.profile-work-list > a:hover { border-color: #177968; background: #f3faf8; }
.profile-work-list img { width: 58px; height: 56px; object-fit: cover; border-radius: 5px; }
.profile-work-list a > span { display: grid; gap: 3px; }
.profile-work-list small { color: var(--muted); font-size: 10px; }
.profile-work-list svg { width: 18px; height: 18px; }
.profile-work-empty { display: grid; justify-items: center; gap: 5px; padding: 30px 16px; color: var(--muted); text-align: center; border: 1px dashed #c7d5da; border-radius: 7px; }
.profile-work-empty svg { width: 28px; height: 28px; color: #177968; }
.profile-work-empty strong { color: var(--ink); }

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

.profile-account-actions button {
  justify-content: center;
}

.profile-shared-ipad-note {
  margin: 0;
  color: #3f5967;
  background: #f2f6f8;
  border-color: #cfdce1;
}

.profile-danger-link {
  color: #9a3b36;
}

.profile-delete-warning {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  color: #713833;
  background: #fff1ef;
  border: 1px solid #e6bdb8;
  border-radius: 7px;
}

.profile-delete-warning > svg {
  width: 24px;
  height: 24px;
  padding: 8px;
  color: #a83d38;
  background: #fff;
  border-radius: 6px;
  box-sizing: content-box;
}

@media (max-width: 680px) {
  .preview-banner {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }

  .preview-banner-icon {
    width: 40px;
    height: 40px;
  }

  .preview-banner-copy span {
    white-space: normal;
  }

  .preview-banner > a {
    grid-column: 2;
    width: fit-content;
    min-height: 36px;
  }

  .device-footer {
    flex-wrap: wrap;
  }

  .device-footer a {
    margin-left: 0;
  }

  .device-saved-grid,
  .device-backup-tools,
  .restore-backup-summary {
    grid-template-columns: 1fr;
  }

  .device-backup-actions {
    grid-template-columns: 1fr;
  }

  .restore-backup-summary > div,
  .restore-backup-summary > div:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .restore-backup-summary > div:nth-child(3) {
    border-bottom: 0;
  }

  .profile-choice-grid,
  .profile-field-grid,
  .profile-account-actions {
    grid-template-columns: 1fr;
  }

  .profile-field-wide {
    grid-column: auto;
  }

  .profile-account-hero {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .profile-account-hero > span {
    grid-column: 1 / -1;
    justify-content: center;
  }

}

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

@keyframes tile-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dashboard-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-30px); }
}

@keyframes dashboard-in {
  from { opacity: 0; transform: translateY(-22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes library-up {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes library-down {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(28px); }
}

@keyframes activity-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1220px) {
  .activity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .launcher-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .saves-panel {
    position: static;
  }

  .saves-content {
    min-height: 0;
  }

  .saved-work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 20px max(18px, env(safe-area-inset-right)) 30px max(18px, env(safe-area-inset-left));
  }

  .subject-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-all {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr);
  }

  .library-toolbar {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .library-title h2 {
    font-size: 24px;
  }

  .activity-image {
    aspect-ratio: 16 / 6;
  }
}

@media (max-width: 680px) {
  .header-account {
    grid-template-columns: 36px minmax(0, 1fr);
    min-width: 150px;
    min-height: 46px;
    padding: 5px 8px 5px 5px;
  }

  .header-account-icon {
    width: 36px;
    height: 36px;
  }

  .header-account-chevron {
    display: none;
  }

  .header-account-copy strong {
    max-width: 116px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-heading h1 {
    font-size: 28px;
  }

  .subject-board,
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .saved-work-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .subject-all {
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 132px auto;
  }

  .subject-all .subject-copy {
    grid-row: 2;
    grid-column: 1;
  }

  .all-collage {
    grid-row: 1;
    grid-column: 1;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 13px;
  }

  .library-heading-row {
    align-items: flex-start;
  }

  .activity-image {
    aspect-ratio: 16 / 7;
  }

  .activity-grid.single-activity .activity-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .activity-grid.single-activity .activity-image {
    min-height: 0;
    aspect-ratio: 16 / 7;
  }

  .activity-grid.single-activity .activity-content {
    min-height: 205px;
    padding: 16px;
  }

  .activity-grid.single-activity .activity-card h3 {
    font-size: 20px;
  }

  .activity-grid.single-activity .activity-card p {
    font-size: 13px;
  }

  .activity-content {
    min-height: 205px;
  }
}

@media (max-width: 430px) {
  .app-header {
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy span {
    display: none;
  }

  .header-account {
    min-width: 128px;
  }

  .header-account-copy small {
    font-size: 8px;
  }

  .header-account-copy strong {
    max-width: 78px;
    font-size: 12px;
  }

  .subject-copy strong {
    font-size: 18px;
  }

  .library-heading-row {
    gap: 10px;
  }

  .back-button {
    min-width: 46px;
    width: 46px;
    padding: 0;
  }

  .back-button span {
    display: none;
  }

  .activity-footer {
    align-items: flex-end;
  }

  .device-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .device-summary > div:last-child {
    border-bottom: 0;
  }

  .device-dialog-frame > footer {
    flex-wrap: wrap;
  }

  .storage-notice-languages {
    grid-template-columns: minmax(0, 1fr);
  }

  .storage-notice-acknowledge {
    width: 100%;
  }

  .focus {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
