@media screen {
  body.studio-shell {
    --blue: #466f91;
    --ink: #253b4b;
    --muted: #62727c;
    --line: #e3e8e8;
    --bg: #f8f8f5;
    --sky: #edf3f8;
    --mint: #edf5ef;
    --radius: 18px;
    --shadow: 0 4px 18px #293d4c06;
    background: var(--bg);
  }
  body.studio-shell #sidebar {
    background: #fdfdfb;
    border-color: #e6e9e7;
  }
  body.studio-shell #nav button {
    font-weight: 600;
    border-radius: 10px;
  }
  body.studio-shell #nav button.active {
    background: #eaf1f7;
    color: #355e7e;
  }
  body.studio-shell #nav .nav-icon {
    opacity: 0.88;
  }
  body.studio-shell header {
    background: #ffffffdf;
    border-bottom: 1px solid #e5e9e8;
  }
  body.studio-shell .primary {
    background: #456e91;
    border-color: #456e91;
    box-shadow: 0 2px 4px #26435c0d;
  }
  body.studio-shell button {
    transition:
      background-color 0.16s,
      border-color 0.16s,
      box-shadow 0.16s;
  }
  body.studio-shell button:hover:not(:disabled) {
    box-shadow: 0 2px 8px #213c4d0a;
  }
  body.studio-shell .card {
    box-shadow: 0 3px 14px #29445805;
    border-color: #e2e7e7;
  }
  body.studio-shell .page-head h1 {
    letter-spacing: -0.8px;
  }
  body.studio-shell[data-audience="parent"] .welcome-illustration,
  body.studio-shell[data-audience="parent"] .spark {
    display: none;
  }
  body.studio-shell .pill {
    border-radius: 7px;
  }
  body.studio-shell .bar {
    height: 6px;
    background: #edf0ed;
  }
  body.studio-shell .bar i {
    background: #7eaa97;
    border-radius: 8px;
  }
  .studio-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin: 4px 0 28px;
  }
  .studio-head h1 {
    font-size: 34px;
    letter-spacing: -1px;
    margin: 6px 0 12px;
    line-height: 1.25;
  }
  .studio-head p {
    font-size: 16px;
    color: #62727c;
    margin: 0;
  }
  .studio-head .actions {
    margin: 0;
  }
  .studio-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #597365;
  }
  .studio-welcome.welcome-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 28px;
    border-radius: 18px;
    border: 1px solid #dfeae3;
    background: #eef5f0;
    margin-bottom: 22px;
    min-height: 0;
  }
  .studio-welcome h2 {
    font-size: 27px;
    margin: 6px 0 8px;
  }
  .studio-welcome p {
    font-size: 16px;
    margin: 0;
    color: #526d60;
  }
  .studio-avatar {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: grid;
    place-items: center;
    background: #fcfffc;
    border: 1px solid #dce9df;
    border-radius: 18px;
  }
  .studio-avatar > .ui-icon {
    width: 33px;
    height: 33px;
  }
  .studio-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 26px;
  }
  .studio-metrics > section {
    background: white;
    border: 1px solid #e1e6e5;
    border-radius: 16px;
    padding: 22px;
    min-width: 0;
  }
  .studio-metrics span {
    font-size: 14px;
    color: #62727c;
  }
  .studio-metrics strong {
    display: block;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.4;
    margin: 10px 0 8px;
    color: #2d485c;
  }
  .studio-metrics strong small {
    font-size: 16px;
    font-weight: 400;
    color: #71808a;
  }
  .studio-metrics section > small {
    font-size: 13px;
    line-height: 1.6;
    color: #697b85;
    display: block;
  }
  .studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 24px;
    align-items: start;
  }
  .studio-list-panel {
    background: #fff;
    border: 1px solid #e1e7e7;
    border-radius: 18px;
    overflow: hidden;
    min-width: 0;
  }
  .studio-list-head {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #edf0ef;
  }
  .studio-list-head h2 {
    font-size: 20px;
    margin: 0 0 18px;
  }
  .studio-list-head h2 > span {
    font-size: 13px;
    background: #f0f3f5;
    color: #5e7585;
    padding: 3px 8px;
    border-radius: 7px;
    margin-left: 8px;
  }
  .studio-filters {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
  }
  .studio-filters button {
    border: 0;
    background: transparent;
    color: #62737c;
    font-size: 14px;
    min-height: 48px;
    padding: 8px 13px;
  }
  .studio-filters button[aria-pressed="true"] {
    background: #edf3f8;
    color: #355e7e;
  }
  .studio-task-row {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #edf0ef;
    min-width: 0;
  }
  .studio-task-row:last-child {
    border-bottom: 0;
  }
  .studio-check {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    padding: 0;
    color: #6d8795;
  }
  .studio-check.is-done {
    color: #4c8b71;
  }
  .studio-empty-box {
    display: block;
    width: 22px;
    height: 22px;
    border: 1.5px solid #bdcbd0;
    border-radius: 6px;
  }
  .studio-check.is-done .ui-icon {
    background: #e8f3ed;
    border-radius: 6px;
    padding: 2px;
    width: 26px;
    height: 26px;
  }
  .studio-task-main {
    flex: 1;
    min-width: 0;
    text-align: left;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    white-space: normal;
  }
  .studio-task-main > strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c4354;
    line-height: 1.5;
  }
  .studio-task-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 9px;
    color: #78848a;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
  }
  .studio-subject {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border-radius: 6px;
    background: #f3f5f3;
    padding: 3px 7px;
    color: #597062;
    font-size: 12px;
  }
  .studio-subject .ui-icon {
    width: 16px;
    height: 16px;
  }
  .studio-row-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    max-width: 160px;
  }
  .studio-row-end .pill {
    font-size: 11px !important;
    line-height: 1.6;
    padding: 4px 7px;
  }
  .studio-row-end .pill .ui-icon {
    width: 13px;
    height: 13px;
  }
  .studio-row-end button {
    font-size: 13px;
  }
  .studio-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .studio-next,
  .studio-note {
    background: white;
    border: 1px solid #e1e7e7;
    border-radius: 16px;
    padding: 22px;
  }
  .studio-next {
    background: #edf3f9;
    border-color: #e0e9f0;
  }
  .studio-aside h3 {
    font-size: 18px;
    margin: 10px 0;
  }
  .studio-aside p {
    font-size: 14px;
    color: #637782;
    line-height: 1.8;
    margin: 10px 0;
  }
  .studio-next > span:not(.eyebrow) {
    font-size: 13px;
    color: #617b8c;
  }
  .studio-aside .actions {
    margin-top: 18px;
  }
  .studio-aside button {
    font-size: 14px;
  }
  .studio-note .eyebrow {
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1.8;
  }
  .studio-shortcuts {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .studio-empty {
    padding: 45px 24px;
    text-align: center;
  }
  .studio-empty > .ui-icon {
    width: 36px;
    height: 36px;
  }
  .studio-empty p {
    font-size: 16px;
    color: #697b85;
  }
  .studio-chart-card {
    background: white;
    border: 1px solid #e0e7e5;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
  }
  .studio-chart-card h2 {
    font-size: 22px;
  }
  .studio-chart-card .section-title > span {
    font-size: 14px;
    color: #6b7e89;
  }
  .studio-chart {
    height: 260px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
    margin: 30px 0;
  }
  .studio-chart-col {
    text-align: center;
    min-width: 0;
  }
  .studio-chart-col > strong {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    color: #587081;
  }
  .studio-chart-track {
    height: 150px;
    background: #f4f7f7;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
  }
  .studio-chart-track > i {
    display: block;
    width: 100%;
    background: #a4c5b6;
    border-radius: 8px 8px 0 0;
  }
  .studio-chart-col > span {
    display: block;
    font-size: 14px;
    font-weight: 600;
  }
  .studio-chart-col > small {
    font-size: 12px;
    color: #72828b;
  }
  .studio-chart-card > .muted {
    font-size: 14px;
    line-height: 1.8;
  }
  .studio-group-progress {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(100px, 2fr) 45px;
    gap: 22px;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid #edf1ef;
  }
  .studio-group-progress > span {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 16px;
  }
  .studio-group-progress strong {
    font-size: 14px;
    color: #6d818d;
  }
  .studio-profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    border: 1px solid #dfe8e1;
    border-radius: 20px;
    background: #edf5ef;
    margin: 0 0 24px;
  }
  .studio-profile-avatar {
    height: 100px;
    width: 100px;
    flex: 0 0 100px;
    background: #fff;
    border-radius: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #deeadf;
  }
  .studio-profile-avatar > .ui-icon {
    width: 55px;
    height: 55px;
  }
  .studio-profile-hero h2 {
    font-size: 30px;
    margin: 8px 0;
  }
  .studio-profile-hero p {
    font-size: 16px;
    color: #577263;
    margin: 5px 0;
  }
  .studio-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 22px 0 28px;
  }
  .studio-badge {
    display: flex;
    gap: 18px;
    background: #fff;
    border: 1px solid #e2e7e6;
    border-radius: 16px;
    padding: 24px;
  }
  .studio-badge > .ui-icon {
    width: 34px;
    height: 34px;
    opacity: 0.5;
  }
  .studio-badge.earned > .ui-icon {
    opacity: 1;
  }
  .studio-badge.earned {
    background: #f2f7f1;
  }
  .studio-badge h3 {
    font-size: 18px;
    margin: 0 0 8px;
  }
  .studio-badge p {
    font-size: 14px;
    color: #6c7d85;
    margin: 0 0 12px;
    line-height: 1.7;
  }
  .studio-badge span {
    font-size: 12px;
    font-weight: 600;
    color: #65777d;
  }
  .studio-badge.earned span {
    color: #477e63;
  }
  .studio-detail-progress {
    background: white;
    border: 1px solid #e2e7e7;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
  }
  .studio-detail-progress > div:first-child {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 12px;
  }
  .studio-detail-progress span {
    color: #6b7f8c;
  }
  .studio-resources {
    border: 1px solid #e1e8e7;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    background: #fff;
  }
  .studio-resources h3 {
    font-size: 20px;
  }
  .studio-resources p {
    font-size: 15px;
    color: #6c7f88;
  }
  .studio-resources ul {
    list-style: none;
    padding: 0;
  }
  .studio-resources li {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid #edf1ef;
  }
  .studio-resources a {
    font-size: 17px;
    color: #3c6c90;
    overflow-wrap: anywhere;
  }
  .studio-resources li .ui-icon {
    width: 22px;
    height: 22px;
  }
  .studio-shell .thinking-panel {
    background: #fafaf7;
  }
  .studio-shell .thinking-jump {
    background: #eff5f1;
  }
  .studio-shell .week-redesign .weekly-board {
    gap: 16px;
  }
  .studio-shell .week-redesign .week-day {
    box-shadow: none;
  }
  .studio-shell .week-summary {
    background: #edf3f8;
  }
  .studio-shell .task-edit-toolbar {
    background: #f0f4f7;
  }
  .studio-shell .achievement-garden {
    background: #f0f6ef;
    min-height: 0;
  }
  .studio-shell .achievement-garden .garden-mark {
    width: 70px;
    height: 70px;
  }
  .studio-shell .criteria {
    background: #f1f5f8;
  }
  .studio-shell .parent-summary {
    background: #f0f5f2;
    box-shadow: none;
  }
  .studio-shell .parent-summary h2 {
    font-size: 27px;
  }
  .studio-shell .parent-task-card {
    box-shadow: none;
  }
  .studio-shell .live-day-points {
    box-shadow: none;
    background: #f0f6f2;
  }
  .studio-shell .badge {
    box-shadow: none;
  }
  .studio-shell .reward-art {
    background: #f4f0e9;
  }
  .studio-shell .reward-card {
    box-shadow: none;
  }
  .studio-shell .ui-icon {
    filter: saturate(0.75);
  }
  @media (max-width: 1150px) {
    .studio-layout {
      grid-template-columns: minmax(0, 1fr);
    }
    .studio-aside {
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
    .studio-aside > section:last-child {
      grid-column: 1/-1;
    }
    .studio-head {
      flex-wrap: wrap;
    }
    .studio-task-row {
      padding: 18px;
    }
    .studio-row-end {
      max-width: 140px;
    }
  }
  @media (max-width: 760px) {
    .studio-head h1 {
      font-size: 29px;
    }
    .studio-head {
      gap: 16px;
      margin-bottom: 22px;
    }
    .studio-metrics {
      gap: 9px;
    }
    .studio-metrics > section {
      padding: 16px 12px;
    }
    .studio-metrics strong {
      font-size: 27px;
    }
    .studio-metrics span {
      font-size: 12px;
    }
    .studio-metrics strong small,
    .studio-metrics section > small {
      font-size: 11px;
    }
    .studio-welcome.welcome-strip {
      padding: 20px;
    }
    .studio-welcome h2 {
      font-size: 24px;
    }
    .studio-welcome p {
      font-size: 15px;
    }
    .studio-task-row {
      align-items: flex-start;
      gap: 10px;
      padding: 16px 12px;
      flex-wrap: wrap;
    }
    .studio-check {
      width: 40px;
      flex: 0 0 40px;
      min-height: 48px;
    }
    .studio-task-main > strong {
      font-size: 18px;
    }
    .studio-task-meta {
      font-size: 12px;
    }
    .studio-row-end {
      margin-left: 50px;
      max-width: none;
      flex-direction: row;
      align-items: center;
      flex-wrap: wrap;
    }
    .studio-list-head {
      padding: 20px 16px 12px;
    }
    .studio-filters button {
      font-size: 13px;
      padding: 8px 10px;
    }
    .studio-aside {
      grid-template-columns: 1fr;
    }
    .studio-aside > section:last-child {
      grid-column: auto;
    }
    .studio-profile-hero {
      padding: 22px;
      gap: 18px;
    }
    .studio-profile-avatar {
      width: 70px;
      height: 70px;
      flex-basis: 70px;
      border-radius: 20px;
    }
    .studio-profile-avatar > .ui-icon {
      width: 40px;
      height: 40px;
    }
    .studio-profile-hero h2 {
      font-size: 26px;
    }
    .studio-badges {
      grid-template-columns: 1fr;
    }
    .studio-chart-card {
      padding: 22px 16px;
    }
    .studio-chart-card .section-title {
      display: block;
    }
    .studio-chart {
      gap: 7px;
      height: 230px;
    }
    .studio-chart-col > small {
      font-size: 10px;
    }
    .studio-chart-track {
      height: 135px;
    }
    .studio-group-progress {
      grid-template-columns: 1fr 42px;
      gap: 12px;
    }
    .studio-group-progress .bar {
      grid-row: 2;
      grid-column: 1/-1;
    }
    .studio-group-progress > span {
      font-size: 15px;
    }
    .studio-profile-hero p {
      font-size: 14px;
    }
    .studio-head .actions button {
      font-size: 14px;
    }
    .studio-detail-progress {
      padding: 16px;
    }
    .studio-resources .section-title {
      display: block;
    }
    .studio-resources .section-title button {
      margin-top: 12px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body.studio-shell button {
      transition: none;
    }
  }
}
@media screen and (max-width: 760px) {
  .studio-task-row .studio-task-main {
    flex: 1 1 calc(100% - 55px);
  }
  .studio-task-row .studio-row-end {
    flex: 0 0 calc(100% - 50px);
  }
}
@media screen {
  body.studio-shell[data-theme="mint"] {
    --blue: #477766;
    --sky: #edf5ef;
  }
  body.studio-shell[data-theme="peach"] {
    --blue: #95644d;
    --sky: #faf0e9;
  }
  body.studio-shell[data-theme="simple"] {
    --blue: #526777;
    --sky: #eef1f4;
  }
  body.studio-shell .primary {
    background: var(--blue);
    border-color: var(--blue);
  }
  body.studio-shell #nav button.active {
    background: var(--sky);
    color: var(--blue);
  }
}
@media screen {
  .task-file-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .task-file {
    border: 1px solid #dfe7e6;
    border-radius: 14px;
    overflow: hidden;
    min-width: 0;
    background: #fff;
  }
  .task-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    background: #f1f5f7;
  }
  .task-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .task-file-preview > .ui-icon {
    width: 40px;
    height: 40px;
  }
  .task-file > div {
    padding: 14px;
  }
  .task-file strong {
    font-size: 16px;
    display: block;
    overflow-wrap: anywhere;
  }
  .task-file small {
    font-size: 13px;
    color: #637780;
    display: block;
    margin: 8px 0;
  }
  .task-file-download {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font-size: 15px;
    color: #3f6e91;
  }
  .uploaded-task-files {
    border-top: 1px solid #e2e9e6;
    margin-top: 20px;
    padding-top: 14px;
  }
  .uploaded-task-files h4 {
    font-size: 18px;
  }
  .upload-ok {
    color: #2b7558;
  }
  #task-upload-results p {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
  #task-upload-input {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
  .studio-resources .section-title {
    flex-wrap: wrap;
    gap: 10px;
  }
  @media (max-width: 600px) {
    .task-file-grid {
      grid-template-columns: 1fr;
    }
    .studio-resources .section-title button {
      width: 100%;
    }
  }
}
