.mobile-my-tabs {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --mobile-x: clamp(16px, 4.8vw, 22px);
    --mobile-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    --mobile-green: #2f7669;
    --mobile-text: #263832;
    --mobile-muted: #75817c;
    --mobile-line: rgba(220, 224, 217, 0.86);
    --mobile-card: rgba(255, 254, 250, 0.92);
  }

  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: #f7f5ee;
  }

  body {
    color: var(--mobile-text);
    background:
      radial-gradient(circle at 16% -10%, rgba(255, 255, 255, 0.96), transparent 34%),
      radial-gradient(circle at 88% 4%, rgba(230, 239, 234, 0.72), transparent 34%),
      linear-gradient(180deg, #fbfaf5 0%, #f5f2ea 56%, #f8f6ef 100%);
  }

  main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 10px 0 var(--mobile-bottom);
    background: transparent;
  }

  header {
    display: none;
  }

  .header-spacer,
  .header-right .points,
  #themeToggle,
  #deskTop {
    display: none !important;
  }

  .header-right {
    position: absolute;
    top: calc(28px + env(safe-area-inset-top, 0px));
    right: var(--mobile-x);
    display: flex;
    gap: 0;
    width: min(164px, calc(100vw - 212px));
    max-width: 164px;
  }

  .countdown-wrap {
    width: 100%;
  }

  .countdown {
    width: 100%;
    height: 40px;
    min-height: 40px;
    padding: 0 10px !important;
    gap: 6px;
    border: 1px solid var(--mobile-line) !important;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.82);
    box-shadow: 0 8px 20px rgba(43, 55, 50, 0.055);
    white-space: nowrap;
  }

  .countdown-dot {
    width: 7px !important;
    height: 7px !important;
    flex: 0 0 7px;
    background: #f0a27d !important;
  }

  .countdown span {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 4px;
    flex: 1;
    overflow: hidden;
    color: #76827d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .countdown span b {
    color: var(--mobile-green);
    font-size: 19px;
    font-weight: 850;
    line-height: 1;
  }

  .countdown .ui-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-color: #7f8b86;
  }

  .countdown-panel {
    position: fixed;
    top: calc(74px + env(safe-area-inset-top, 0px));
    right: var(--mobile-x);
    left: var(--mobile-x);
    width: auto;
    max-height: calc(100dvh - 108px);
    overflow: auto;
    border-radius: 24px;
  }

  .sidebar {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  .sidebar::before {
    content: "";
    position: fixed;
    right: var(--mobile-x);
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: var(--mobile-x);
    height: 82px;
    border: 1px solid rgba(229, 231, 223, 0.82);
    border-radius: 28px;
    background: rgba(255, 254, 250, 0.94);
    box-shadow: 0 18px 46px rgba(43, 55, 50, 0.12);
    backdrop-filter: blur(18px);
  }

  .brand {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top, 0px));
    left: var(--mobile-x);
    z-index: 72;
    display: none;
    width: 176px;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .brand::before,
  .brand::after {
    display: none;
  }

  .brand-figure {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 17px;
    background: #fffefa;
    box-shadow: 0 9px 24px rgba(43, 55, 50, 0.09);
  }

  .brand-figure img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    object-position: center 58%;
    transform: translate(-11px, -8px) scale(1.02);
  }

  .brand-copy b {
    color: var(--mobile-text);
    font-size: 20px;
    font-weight: 850;
    line-height: 1.16;
    letter-spacing: 0;
  }

  .brand-copy small {
    margin-top: 5px;
    color: #6f7a75;
    font-size: 10.5px;
    line-height: 1.15;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .sidebar nav {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: var(--mobile-x);
    display: grid;
    width: calc((100vw - var(--mobile-x) * 2) * 0.8);
    height: 82px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    pointer-events: auto;
  }

  .sidebar .nav-item[data-page="analytics"],
  .sidebar .nav-item[data-page="library"],
  .desk-link {
    display: none !important;
  }

  .sidebar-bottom {
    position: fixed;
    right: var(--mobile-x);
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: block;
    width: calc((100vw - var(--mobile-x) * 2) * 0.2);
    height: 82px;
    margin: 0;
    min-width: 0;
    pointer-events: auto;
  }

  .sidebar .nav-item,
  .profile.account-entry {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #747f7a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
  }

  .sidebar .nav-item:hover,
  .profile.account-entry:hover {
    background: transparent;
  }

  .sidebar .nav-icon,
  .sidebar .nav-item span.nav-icon,
  .profile .avatar {
    display: grid;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    place-items: center;
    border-radius: 50%;
    color: currentColor;
    background: transparent;
  }

  .sidebar .nav-item svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
  }

  .sidebar .nav-item.active {
    color: var(--mobile-green);
    background: transparent;
  }

  .sidebar .nav-item.active .nav-icon {
    color: #fffefa;
    background: var(--mobile-green);
    box-shadow: 0 7px 14px rgba(47, 118, 105, 0.22);
  }

  .profile.account-entry {
    width: 100%;
    border-top: 0;
  }

  .profile.account-entry div,
  .profile.account-entry i {
    display: none;
  }

  .profile.account-entry::after {
    content: "我的";
    display: block;
    color: currentColor;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
  }

  .profile .avatar {
    position: relative;
    color: transparent;
    background: transparent;
  }

  .profile .avatar::before,
  .profile .avatar::after {
    content: "";
    position: absolute;
    border: 2px solid #747f7a;
  }

  .profile .avatar::before {
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
  }

  .profile .avatar::after {
    bottom: 7px;
    width: 18px;
    height: 11px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 0;
  }

  body:has(#analytics.active) .profile.account-entry,
  body:has(#library.active) .profile.account-entry {
    color: var(--mobile-green);
  }

  body:has(#analytics.active) .profile .avatar,
  body:has(#library.active) .profile .avatar {
    background: var(--mobile-green);
    box-shadow: 0 8px 16px rgba(47, 118, 105, 0.24);
  }

  body:has(#analytics.active) .profile .avatar::before,
  body:has(#analytics.active) .profile .avatar::after,
  body:has(#library.active) .profile .avatar::before,
  body:has(#library.active) .profile .avatar::after {
    border-color: #fffefa;
  }

  #dashboard {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 8px var(--mobile-x) var(--mobile-bottom);
    overflow-x: hidden;
  }

  .today-toolbar {
    display: flex;
    margin: 6px 0 14px;
  }

  .today-date-block {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid rgba(224, 226, 217, 0.72);
    border-radius: 16px;
    background: rgba(255, 254, 250, 0.56);
    box-shadow: 0 10px 24px rgba(43, 55, 50, 0.045);
  }

  .today-date-block::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background:
      linear-gradient(#466f66, #466f66) 5px 7px / 14px 2px no-repeat,
      linear-gradient(#466f66, #466f66) 7px 3px / 2px 5px no-repeat,
      linear-gradient(#466f66, #466f66) 15px 3px / 2px 5px no-repeat;
    border: 2px solid #466f66;
    border-radius: 6px;
  }

  .today-back-today,
  .today-actions {
    display: none !important;
  }

  .today-date-nav {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-color: rgba(214, 221, 214, 0.9);
    background: rgba(255, 254, 250, 0.78);
  }

  .today-date-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
  }

  .today-date-copy::before {
    content: "今日 ·";
    color: var(--mobile-green);
    font-size: 18px;
    font-weight: 820;
    line-height: 1;
  }

  .today-date-block b {
    order: 1;
    color: var(--mobile-green);
    font-size: 18px;
    font-weight: 820;
    line-height: 1;
    letter-spacing: 0;
  }

  .today-date-block span {
    order: 2;
    color: #6f7975;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }

  .today-notebook {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .today-notebook::before,
  .notebook-spine,
  .notebook-page::before {
    display: none;
  }

  .notebook-page {
    width: 100%;
    min-width: 0;
    padding: 28px 16px 16px;
    border: 1px solid rgba(229, 231, 223, 0.82);
    border-radius: 28px;
    background: var(--mobile-card);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.085);
  }

  .memo-page,
  .plan-page {
    border-radius: 28px;
  }

  .notebook-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
  }

  .notebook-page-head > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .notebook-page-head b {
    color: var(--mobile-text);
    font-size: 22px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
  }

  .notebook-page-head small {
    color: #68746f;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
  }

  .notebook-date-line {
    display: none;
  }

  .memo-page .notebook-page-head::after {
    content: none;
  }

  .plan-page .notebook-page-head::after {
    content: none;
  }

  .notebook-inkbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
  }

  .notebook-inkbar button {
    height: 32px;
    padding: 0 12px;
    border-color: var(--mobile-line);
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.82);
    color: #4c5753;
    font-size: 14px;
    font-weight: 700;
  }

  .notebook-inkbar i {
    width: 12px;
    height: 12px;
  }

  .notebook-writing {
    color: var(--note-ink);
    font-family: "Noto Sans SC", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: var(--notebook-memo-line, 32px);
  }

  .memo-writing {
    --notebook-memo-line: 32px;
    min-height: 220px;
    padding: 0 2px 8px;
    overflow: hidden;
    scrollbar-width: none;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0 calc(var(--notebook-memo-line) - 1px),
      rgba(213, 217, 210, 0.86) calc(var(--notebook-memo-line) - 1px) var(--notebook-memo-line)
    );
  }

  .memo-writing::-webkit-scrollbar {
    display: none;
  }

  .notebook-writing::placeholder {
    color: #a7aea9;
    font-size: 16px;
  }

  .notebook-feeling {
    margin-top: 18px;
    border-radius: 16px;
    background: rgba(255, 254, 250, 0.54);
  }

  .notebook-feeling span {
    padding: 14px 14px 0;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 800;
  }

  .notebook-feeling textarea {
    min-height: 52px;
    padding: 4px 14px 14px;
    color: #909a95;
    font-size: 15px;
    line-height: 26px;
  }

  .daily-sheet-head {
    display: none;
  }

  .daily-sheet {
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 254, 250, 0.42);
    overflow: hidden;
  }

  .daily-note-row {
    grid-template-columns: 62px 38px minmax(0, 1fr) 36px;
    height: 48px;
    border-top: 1px solid var(--mobile-line);
    background: transparent;
  }

  .daily-note-row:first-child {
    border-top: 0;
  }

  .daily-note-row time {
    color: var(--mobile-green);
    font-size: 15px;
    font-weight: 800;
  }

  .daily-note-check::before {
    width: 16px;
    height: 16px;
    border-color: #cfd6d1;
    border-radius: 5px;
  }

  .daily-note-input {
    height: 47px;
    padding: 11px 4px 0;
    color: #8d9792;
    font-size: 15px;
    line-height: 24px;
  }

  .daily-note-open {
    color: #68746f;
    background: transparent;
    font-size: 20px;
    font-weight: 400;
  }

  body:has(#planner.active) .brand,
  body:has(#bank.active) .brand,
  body:has(#analytics.active) .brand,
  body:has(#library.active) .brand {
    display: none;
  }

  body:has(#planner.active) main > header::before,
  body:has(#bank.active) main > header::before,
  body:has(#analytics.active) main > header::before,
  body:has(#library.active) main > header::before {
    content: none;
  }

  body:has(#planner.active) main > header::before {
    content: "计划";
  }

  body:has(#bank.active) main > header::before {
    content: "题库";
  }

  body:has(#analytics.active) main > header::before {
    content: "数据复盘";
  }

  body:has(#library.active) main > header::before {
    content: "留言板";
  }

  body:has(#planner.active) main,
  body:has(#bank.active) main,
  body:has(#analytics.active) main,
  body:has(#library.active) main {
    padding-top: 10px;
  }

  #planner,
  #bank,
  #analytics,
  #library {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0 var(--mobile-x) var(--mobile-bottom);
    overflow-x: hidden;
  }

  #planner .planner-toolbar {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 16px;
    margin: 0 0 18px;
  }

  #planner .view-tabs,
  #bank .bank-mode-tabs {
    display: grid;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: rgba(255, 254, 250, 0.68);
    box-shadow: 0 10px 28px rgba(43, 55, 50, 0.045);
  }

  #planner .view-tabs {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #planner .view-tabs button,
  #bank .bank-mode-tabs button {
    min-width: 0;
    height: 44px;
    padding: 0 4px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #4e5d57;
    font-size: 15px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #planner .view-tabs button.active,
  #bank .bank-mode-tabs button.active {
    background: #e7f0eb;
    color: var(--mobile-green);
    box-shadow: inset 0 0 0 1px rgba(199, 216, 208, 0.44);
  }

  #planner .planner-toolbar-right {
    display: contents;
  }

  #planner .date-control {
    display: none;
  }

  #planner .planner-main-actions {
    position: absolute;
    z-index: 3;
    right: calc(var(--mobile-x) + 14px);
    top: 113px;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  #planner #openModuleModal {
    display: none;
  }

  #planner #openPlanModal {
    height: 38px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--mobile-green);
    color: #fffefa;
    box-shadow: 0 10px 22px rgba(47, 118, 105, 0.22);
    font-size: 14px;
    font-weight: 800;
  }

  #planner .gantt-card,
  #planner .plan-table,
  #bank .essay-paper-card,
  #bank .essay-detail-card,
  #bank .essay-filter-card {
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 24px;
    background: var(--mobile-card);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.08);
    overflow: hidden;
  }

  #planner .gantt-card {
    position: relative;
    margin: 0 0 18px;
    padding: 18px 12px 12px;
  }

  #planner[data-plan-view="week"] .gantt-card,
  #planner[data-plan-view="today"] .gantt-card {
    padding-right: 4px;
    padding-left: 4px;
  }

  #planner .gantt-card > .section-head {
    display: block;
    margin-bottom: 8px;
    padding-right: 0;
  }

  #planner[data-plan-view="week"] .gantt-card > .section-head,
  #planner[data-plan-view="today"] .gantt-card > .section-head {
    padding-inline: 10px;
  }

  #planner .gantt-card > .section-head > div:first-child {
    min-width: 0;
  }

  #planner .gantt-card h2 {
    max-width: 190px;
    white-space: nowrap;
  }

  #planner .gantt-card h2,
  #planner .plan-table h2 {
    color: var(--mobile-text);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0;
  }

  #planner .gantt-card h2::before {
    content: none;
  }

  #planner .gantt-actions {
    display: block;
    margin-top: 10px;
  }

  #planner #openDailyTask {
    display: none !important;
  }

  #planner .legend {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 9px;
    margin: 0;
    color: #61716b;
    font-size: 10px;
  }

  #planner[data-plan-view="week"] .legend,
  #planner[data-plan-view="today"] .legend {
    padding-inline: 10px;
  }

  #planner .drag-hint {
    display: none;
  }

  #planner .gantt {
    --planner-axis-label: 90px;
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: var(--planner-axis-label) repeat(12, minmax(0, 1fr)) !important;
    margin-top: 4px;
    overflow: hidden;
    font-size: 10px;
  }

  #planner[data-plan-view="month"] .gantt {
    grid-template-columns: var(--planner-axis-label) repeat(5, minmax(0, 1fr)) !important;
  }

  #planner[data-plan-view="month"][data-plan-cols="4"] .gantt {
    grid-template-columns: var(--planner-axis-label) repeat(4, minmax(0, 1fr)) !important;
  }

  #planner[data-plan-view="month"][data-plan-cols="6"] .gantt {
    grid-template-columns: var(--planner-axis-label) repeat(6, minmax(0, 1fr)) !important;
  }

  #planner .gantt > div {
    min-height: 25px;
    padding: 4px 3px;
    border-color: rgba(224, 228, 220, 0.7);
  }

  #planner .gantt .day {
    color: #64736d;
    font-size: 10px;
    text-align: center;
  }

  #planner[data-plan-view="month"] .gantt .day {
    min-height: 26px;
    padding: 7px 2px 4px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #planner .range-label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 2px 4px !important;
    overflow: hidden;
    color: var(--mobile-text);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.25;
  }

  #planner .range-label strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  #planner .range-dates {
    display: none !important;
  }

  #planner .gantt-range-row {
    position: relative;
    min-height: 25px !important;
    min-width: 0;
  }

  #planner[data-plan-view="month"] .gantt-range-row {
    background: repeating-linear-gradient(
      to right,
      transparent,
      transparent calc(20% - 1px),
      rgba(224, 228, 220, 0.76) calc(20% - 1px),
      rgba(224, 228, 220, 0.76) 20%
    );
  }

  #planner[data-plan-view="month"][data-plan-cols="4"] .gantt-range-row {
    background: repeating-linear-gradient(
      to right,
      transparent,
      transparent calc(25% - 1px),
      rgba(224, 228, 220, 0.76) calc(25% - 1px),
      rgba(224, 228, 220, 0.76) 25%
    );
  }

  #planner[data-plan-view="month"][data-plan-cols="6"] .gantt-range-row {
    background: repeating-linear-gradient(
      to right,
      transparent,
      transparent calc(16.666% - 1px),
      rgba(224, 228, 220, 0.76) calc(16.666% - 1px),
      rgba(224, 228, 220, 0.76) 16.666%
    );
  }

  #planner .gantt-range-bar {
    top: 8px;
    height: 9px;
    min-width: 3px;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
    color: transparent;
    font-size: 0;
  }

  #planner .now-marker {
    border-left-color: #ff2a22;
  }

  #planner .now-marker span {
    transform: translate(-50%, -100%);
    border-radius: 10px;
    background: #ff2a22;
    color: #fff;
    font-size: 10px;
  }

  #planner .week-parent-summary {
    display: none;
  }

  #planner[data-plan-view="week"] .gantt.week-calendar-mode {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  #planner[data-plan-view="week"] .week-calendar {
    display: grid;
    width: 100%;
    height: 638px;
    grid-template-columns: 22px minmax(0, 1fr);
    margin-top: 6px;
    padding-bottom: 0;
    overflow: hidden;
    border-top: 1px solid rgba(224, 228, 220, 0.76);
  }

  #planner[data-plan-view="week"] .week-time-axis {
    margin-top: 28px;
    border-right: 1px solid rgba(224, 228, 220, 0.76);
    color: #84908c;
    font-size: 9px;
  }

  #planner[data-plan-view="week"] .week-time-axis span {
    right: 2px;
    font-size: 7px;
  }

  #planner[data-plan-view="week"] .week-day-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  #planner[data-plan-view="week"] .week-day-column {
    min-width: 0;
    border-right: 1px solid rgba(224, 228, 220, 0.76);
  }

  #planner[data-plan-view="week"] .week-day-column header {
    display: flex;
    height: 28px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 1px;
    overflow: hidden;
    background: rgba(255, 254, 250, 0.56);
    color: #6b7772;
    text-align: center;
  }

  #planner[data-plan-view="week"] .week-day-column header b {
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
  }

  #planner[data-plan-view="week"] .week-day-column header small {
    font-size: 8px;
    line-height: 1;
  }

  #planner[data-plan-view="week"] .week-day-column.is-today header {
    background: rgba(231, 240, 235, 0.8);
    color: var(--mobile-green);
  }

  #planner[data-plan-view="week"] .week-day-body {
    position: relative;
    height: 610px;
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent calc(8.333% - 1px),
      rgba(224, 228, 220, 0.76) calc(8.333% - 1px),
      rgba(224, 228, 220, 0.76) 8.333%
    );
  }

  #planner[data-plan-view="week"] .week-event {
    min-height: 18px;
    padding: 3px 2px 2px;
    border-left-width: 2px;
    border-radius: 6px;
    box-shadow: none;
  }

  #planner[data-plan-view="week"] .week-event b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 8.5px;
    line-height: 1.15;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #planner[data-plan-view="week"] .week-event small {
    margin-top: 2px;
    overflow: hidden;
    font-size: 7px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #planner[data-plan-view="today"] .gantt {
    --planner-axis-label: 48px;
    grid-template-columns: var(--planner-axis-label) repeat(12, minmax(0, 1fr)) !important;
  }

  #planner[data-plan-view="today"] .today-time-axis {
    min-height: 28px !important;
    overflow: visible;
    color: #64736d;
  }

  #planner[data-plan-view="today"] .today-time-axis span {
    top: 8px;
    font-size: 10px;
    line-height: 1;
  }

  #planner[data-plan-view="today"] .gantt-empty {
    min-height: 178px !important;
    margin-left: calc(-1 * var(--planner-axis-label));
    padding: 38px 12px !important;
  }

  #planner .plan-table {
    margin: 0;
    padding: 20px 12px 14px;
  }

  #planner .plan-table .section-head {
    margin-bottom: 12px;
  }

  #planner .plan-table .eyebrow {
    display: none;
  }

  #planner .plan-table h2::before {
    content: none;
  }

  #planner .plan-table .week-total {
    color: #68756f;
    font-size: 13px;
  }

  #planner .plan-table .week-total b {
    color: var(--mobile-green);
    font-size: 16px;
  }

  #planner .plan-table table,
  #planner .plan-table thead,
  #planner .plan-table tbody,
  #planner .plan-table tr,
  #planner .plan-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #planner .plan-table thead {
    display: none;
  }

  #planner .plan-table tbody {
    display: grid;
    gap: 8px;
  }

  #planner .plan-table tr {
    position: relative;
    display: block;
    min-height: 98px;
    padding: 13px;
    border: 1px solid var(--mobile-line);
    border-radius: 14px;
    background: rgba(255, 254, 250, 0.64);
    cursor: pointer;
  }

  #planner .plan-table td {
    padding: 0;
    border: 0;
    color: #5e6c66;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
  }

  #planner .plan-table td:first-child {
    display: block;
    max-height: 44px;
    padding-right: 0;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.45;
  }

  #planner .plan-table td:first-child .subject {
    margin-right: 9px;
    vertical-align: 1px;
  }

  #planner .plan-table td:nth-child(2) {
    display: inline;
    color: #63716b;
    font-size: 13px;
  }

  #planner .plan-table td:nth-child(3) {
    display: inline;
    color: #63716b;
    font-size: 13px;
  }

  #planner .plan-table td:nth-child(4) {
    display: none;
  }

  #planner .plan-table td:nth-child(5) {
    display: block;
    margin-top: 5px;
    color: #6f7c76;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #planner .plan-table td:last-child {
    display: none;
  }

  #planner .task-manage,
  #planner .plan-table .more-btn {
    color: transparent;
    font-size: 0;
  }

  #planner .task-manage::before,
  #planner .plan-table .more-btn::before {
    content: "•••";
    color: #51625b;
    font-size: 18px;
    letter-spacing: 2px;
  }

  #planner .subject,
  #planner .status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
  }

  #bank {
    display: none;
  }

  #bank.active {
    display: block;
  }

  #bank > .hero,
  #bank > .category-row,
  #bank > .bank-layout {
    display: none !important;
  }

  #bank .bank-page-shell {
    display: grid;
    gap: 16px;
  }

  #bank .bank-compact-toolbar {
    display: grid;
    gap: 16px;
    width: 100%;
  }

  #bank .essay-search {
    order: 1;
    width: calc(100vw - 38px) !important;
    max-width: none;
    justify-self: stretch;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.76);
    box-shadow: 0 10px 28px rgba(43, 55, 50, 0.045);
  }

  #bank .essay-search span {
    color: #7d9088;
    font-size: 20px;
  }

  #bank .essay-search input {
    color: var(--mobile-text);
    font-size: 15px;
  }

  #bank .essay-search input::placeholder {
    color: #7f8f88;
  }

  #bank .bank-mode-tabs {
    order: 2;
    width: min(180px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #bank .essay-filter-card {
    display: block;
    margin: 6px 0 4px !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  #bank .essay-filter-summary {
    display: none;
  }

  #bank .essay-filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
  }

  #bank .essay-filter-card .pretty-select,
  #bank .essay-filter-card select {
    min-width: 0;
  }

  #bank .essay-filter-card .pretty-select-trigger,
  #bank .essay-filter-card select {
    width: 100%;
    min-height: 48px !important;
    height: 48px !important;
    border: 1px solid var(--mobile-line) !important;
    border-radius: 14px !important;
    background: rgba(255, 254, 250, 0.78) !important;
    color: var(--mobile-text);
    font-size: 14px;
    box-shadow: 0 8px 22px rgba(43, 55, 50, 0.035);
  }

  #bank .essay-paper-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin: 0 !important;
  }

  #bank .essay-paper-card {
    position: relative;
    min-height: 0;
    padding: 22px 14px 16px;
    gap: 10px;
  }

  #bank .essay-paper-card::before {
    display: none;
  }

  #bank .essay-card-top {
    align-items: center;
    justify-content: space-between;
  }

  #bank .essay-type-chip {
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    background: #fbebe4;
    color: #b45d3d;
    font-size: 14px;
    font-weight: 850;
  }

  #bank .essay-star {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
  }

  #bank .essay-star::before {
    content: "☆";
    color: #7f9089;
    font-size: 28px;
    line-height: 1;
  }

  #bank .essay-star.active::before {
    content: "★";
    color: var(--mobile-green);
  }

  #bank .essay-card-body h2 {
    margin: 8px 0 9px;
    color: var(--mobile-text);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0;
  }

  #bank .essay-card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 0;
    color: #6c7974;
    font-size: 15px;
    line-height: 1.72;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  #bank .essay-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  #bank .essay-meta-row span,
  #bank .essay-meta-row em {
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f2f1eb;
    color: #72807a;
    font-size: 13px;
  }

  #bank .essay-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
  }

  #bank .essay-card-stats span {
    display: block;
    min-width: 0;
    padding: 12px 12px;
    border-radius: 16px;
    background: rgba(248, 247, 241, 0.86);
  }

  #bank .essay-card-stats b {
    color: var(--mobile-green);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
  }

  #bank .essay-card-stats small {
    margin-top: 6px;
    color: #68766f;
    font-size: 14px;
  }

  #bank .essay-card-foot {
    margin-top: 4px;
    padding-top: 11px;
    color: var(--mobile-green);
    font-size: 15px;
    font-weight: 850;
  }

  #bank .essay-card-foot i {
    font-size: 21px;
  }

  #bank .essay-pagination {
    width: 100%;
    flex-wrap: wrap;
    border-radius: 18px;
  }

  #bank .essay-detail-card {
    padding: 18px 14px;
  }

  #bank .essay-detail-head,
  #bank .essay-detail-grid,
  #bank .essay-reading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #bank .essay-question-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: static;
  }

  #bank .essay-materials,
  #bank .essay-question-panel,
  #bank .essay-answer-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .mobile-my-tabs {
    display: none;
  }

  #analytics .analytics-toolbar {
    justify-content: center;
    margin: 0 0 20px;
  }

  #analytics .analytics-range-tabs {
    display: grid;
    width: min(260px, 100%);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.74);
    box-shadow: 0 10px 28px rgba(43, 55, 50, 0.055);
  }

  #analytics .analytics-range-tabs button {
    height: 38px;
    border-radius: 999px;
    color: #4e5d57;
    font-size: 14px;
    font-weight: 800;
  }

  #analytics .analytics-range-tabs button.active {
    background: var(--mobile-green);
    color: #fffefa;
    box-shadow: 0 7px 16px rgba(47, 118, 105, 0.2);
  }

  #analytics .analytics-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  #analytics .stat-card {
    min-height: 128px;
    padding: 16px 10px 12px;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 18px;
    background: var(--mobile-card);
    box-shadow: 0 14px 34px rgba(43, 55, 50, 0.07);
  }

  #analytics .stat-card span {
    margin-bottom: 16px;
    color: #53645e;
    font-size: 12px;
    font-weight: 750;
  }

  #analytics .stat-card b {
    color: var(--mobile-green);
    font-size: clamp(20px, 6.2vw, 28px);
    font-weight: 900;
    letter-spacing: 0;
  }

  #analytics .stat-card small {
    margin-top: 14px;
    color: #60716a;
    font-size: 10px;
    line-height: 1.45;
    white-space: normal;
  }

  #analytics .analytics-main-grid,
  #analytics .analytics-chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }

  #analytics .analytics-heatmap-card,
  #analytics .analytics-trend-card,
  #analytics .analytics-pie-card,
  #analytics .sankey-card {
    width: 100%;
    max-width: 100%;
    padding: 18px 14px 16px;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 22px;
    background: var(--mobile-card);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.08);
    overflow: hidden;
  }

  #analytics .section-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  #analytics .section-head .eyebrow {
    display: none;
  }

  #analytics .section-head h2 {
    color: var(--mobile-text);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
  }

  #analytics .week-total {
    color: #66746e;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
  }

  #analytics .heatmap-frame {
    overflow: hidden;
    padding-top: 0;
  }

  #analytics .heatmap-months {
    grid-template-columns: repeat(53, 4.9px) !important;
    grid-auto-columns: 4.9px !important;
    gap: 1.45px;
    width: max-content;
    margin-left: 24px;
    margin-bottom: 6px;
    color: #66746e;
    font-size: 10px;
    line-height: 12px;
  }

  #analytics .heatmap-months span {
    min-width: 22px;
  }

  #analytics .heatmap-shell {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 7px;
  }

  #analytics .heatmap-weekdays {
    grid-template-rows: repeat(7, 5px);
    gap: 1.45px;
    color: #6d7a74;
    font-size: 9px;
    line-height: 5px;
  }

  #analytics .heatmap {
    grid-template-columns: repeat(53, 4.9px) !important;
    grid-template-rows: repeat(7, 5px);
    grid-auto-columns: 4.9px !important;
    gap: 1.45px;
    width: max-content;
  }

  #analytics .heatmap i {
    width: 5px;
    height: 5px;
    border-radius: 1.8px;
  }

  #analytics .heatmap-foot {
    margin: 10px 4px 0 24px;
    gap: 8px;
    color: #6d7a74;
    font-size: 10px;
  }

  #analytics .heatmap-foot > span {
    display: none;
  }

  #analytics .heatmap-legend {
    width: 100%;
    justify-content: flex-end;
    gap: 5px;
    font-size: 11px;
  }

  #analytics .heatmap-legend i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
  }

  #analytics .analytics-bar-chart {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 230px;
    padding: 0;
  }

  #analytics .trend-y-axis {
    padding: 0 8px 24px 0;
    font-size: 11px;
  }

  #analytics .trend-bars {
    gap: 10px;
  }

  #analytics .trend-bar-item span {
    width: min(20px, 72%);
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #6da58f, #a9d0c1);
  }

  #analytics .analytics-pie-top {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 18px;
  }

  #analytics .analytics-pie {
    width: 118px;
  }

  #analytics .analytics-pie-summary b {
    color: var(--mobile-green);
    font-size: 28px;
  }

  #analytics .analytics-pie-legend {
    gap: 7px;
  }

  #analytics .pie-legend-row {
    min-height: 32px;
    border-radius: 12px;
  }

  #analytics .sankey-card {
    overflow-x: auto;
    padding-bottom: 18px;
  }

  #analytics .sankey-chart {
    min-width: 720px;
    min-height: 318px;
    grid-template-columns: minmax(150px, .9fr) minmax(64px, .28fr) minmax(160px, .8fr) minmax(64px, .28fr) minmax(220px, 1.1fr);
    overflow: visible;
  }

  #analytics .sankey-node {
    min-height: 50px;
    border-radius: 13px;
  }

  #library {
    display: none;
  }

  #library.active {
    display: block;
  }

  #library .mobile-my-tabs {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    justify-content: space-between;
    gap: 12px;
    margin: 38px 0 22px;
    overflow-x: auto;
    padding: 0 2px 8px;
    scrollbar-width: none;
  }

  #library .mobile-my-tabs::-webkit-scrollbar {
    display: none;
  }

  #library .mobile-my-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #747f7a;
    font-size: 15px;
    font-weight: 750;
    white-space: nowrap;
  }

  #library .mobile-my-tabs button.active {
    color: var(--mobile-green);
    border-bottom-color: var(--mobile-green);
  }

  #library .mobile-my-tabs span {
    color: currentColor;
    font-size: 17px;
  }

  #library .board-shell {
    display: grid;
    max-width: none;
    gap: 14px;
    margin: 0;
  }

  #library .board-composer-card,
  #library .board-post,
  #library .board-state {
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 24px;
    background: var(--mobile-card);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.08);
  }

  #library .board-composer-card {
    padding: 24px 14px 22px;
  }

  #library .board-composer {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  #library #boardComposerAvatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: transparent;
    background: #fffefa;
    background-image: url("assets/frog-brand.png");
    background-size: 94px 94px;
    background-position: center 57%;
    box-shadow: 0 9px 22px rgba(43, 55, 50, 0.08);
  }

  #library .board-composer-main {
    gap: 12px;
  }

  #library .board-composer textarea {
    min-height: 128px;
    padding: 20px 18px;
    border-radius: 20px;
    background: rgba(255, 254, 250, 0.72);
    font-size: 16px;
    resize: none;
  }

  #library .board-composer-actions {
    align-items: center;
    padding-left: 0;
  }

  #library .board-composer-actions span {
    color: #87918d;
    font-size: 14px;
  }

  #library .board-composer-actions .primary-btn {
    min-width: 90px;
    height: 58px;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 850;
  }

  #library .board-feed {
    gap: 14px;
  }

  #library .board-post {
    padding: 22px 14px 18px;
  }

  #library .board-post-head {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  #library .board-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dcefe7;
    color: var(--mobile-green);
    font-size: 18px;
    font-weight: 900;
  }

  #library .board-author {
    gap: 12px;
  }

  #library .board-author b {
    color: var(--mobile-text);
    font-size: 18px;
    font-weight: 900;
  }

  #library .board-author small {
    margin-top: 8px;
    color: #7c8782;
    font-size: 13px;
  }

  #library .board-post-head time {
    padding-top: 7px;
    color: #7f8984;
    font-size: 13px;
  }

  #library .board-post-content {
    margin: 0 0 16px;
    padding-left: 64px;
    color: #283b34;
    font-size: 16px;
    line-height: 1.9;
  }

  #library .board-post-actions {
    margin-left: 64px;
    gap: 10px;
  }

  #library .board-action {
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.72);
    color: #52625b;
    font-size: 14px;
  }

  #library .board-action b {
    font-size: 14px;
  }

  #library .board-comments:has(.board-empty-comments:only-child) {
    display: none;
  }

  #library .board-comments {
    margin-left: 64px;
  }

  #library .board-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    margin: 18px 0 0 64px;
  }

  #library .board-comment-form textarea {
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.68);
    font-size: 14px;
    resize: none;
  }

  #library .board-comment-form button {
    height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.82);
    font-size: 14px;
  }

  body:has(#focus.active) header {
    display: none !important;
  }

  body:has(#library.active) header {
    display: none !important;
  }

  body:has(#library.active) main > header::before {
    content: none !important;
    display: none !important;
  }

  body:has(#focus.active) .header-right {
    display: none !important;
  }

  #focus,
  #library {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: calc(22px + env(safe-area-inset-top, 0px)) var(--mobile-x) var(--mobile-bottom);
    overflow-x: hidden;
  }

  #focus,
  #library {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  #focus::before,
  #library::before {
    display: block;
    margin: 0 0 18px;
    color: var(--mobile-text);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0;
  }

  #focus::before {
    content: none;
    display: none;
  }

  #library::before {
    content: none;
    display: none;
  }

  #focus .focus-layout {
    display: block;
    margin: 0;
  }

  #focus .focus-main {
    min-height: 540px;
    padding: 0 0 18px;
    border: 0;
    background: radial-gradient(circle at 50% 48%, rgba(226, 238, 233, 0.84), rgba(255, 254, 250, 0.38) 48%, transparent 72%);
    box-shadow: none;
    overflow: visible;
  }

  #focus .focus-main::before {
    width: 320px;
    height: 320px;
    left: calc(50% - 160px);
    top: 200px;
    border-color: rgba(102, 143, 132, 0.1);
  }

  #focus .focus-main::after {
    width: 268px;
    height: 268px;
    left: calc(50% - 134px);
    top: 226px;
    border-color: rgba(102, 143, 132, 0.13);
  }

  #focus .focus-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    margin: 0;
  }

  #focus .focus-mode-switch {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.74);
  }

  #focus .focus-mode-switch button {
    height: 42px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 850;
  }

  #focus .focus-top .pretty-select {
    width: 100% !important;
    margin: 0;
  }

  #focus .focus-top .pretty-select-trigger {
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(255, 254, 250, 0.8);
    color: #2f443e;
    font-size: 16px;
    font-weight: 800;
  }

  #focus .focus-duration-row {
    height: 48px;
    margin: 14px auto 0;
    padding: 0 18px;
    gap: 8px;
    border-radius: 16px;
    background: rgba(255, 254, 250, 0.82);
  }

  #focus .focus-duration-row > span {
    display: none;
  }

  #focus .focus-duration-row label {
    gap: 8px;
    color: var(--mobile-green);
    font-size: 15px;
    font-weight: 850;
  }

  #focus .focus-duration-row input {
    width: 48px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--mobile-green);
    font-size: 19px;
    font-weight: 900;
  }

  #focus .timer-ring {
    width: min(260px, 72vw);
    height: min(260px, 72vw);
    margin: 20px auto 18px !important;
  }

  #focus .timer-ring::before {
    inset: 17px;
  }

  #focus .timer-ring::after {
    inset: 34px;
  }

  #focus .timer-ring b {
    font-size: 48px;
    letter-spacing: 1px;
  }

  #focus .timer-ring small {
    margin-top: 8px;
    font-size: 13px;
    letter-spacing: 0;
  }

  #focus .timer-actions {
    display: grid;
    width: 100%;
    max-width: 352px;
    grid-template-columns: 1fr 1.34fr 1fr;
    gap: 10px;
    margin: 0 auto;
  }

  #focus .timer-actions button {
    height: 54px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 18px;
    font-size: 15px;
    white-space: nowrap;
  }

  #focus .timer-actions .timer-btn {
    min-width: 0;
  }

  #focus .focus-note {
    display: none;
  }

  #focus .focus-side {
    position: static;
    display: flex;
    justify-content: center;
    width: auto;
    margin: 10px auto 0;
  }

  #focus .focus-side > .card:first-child {
    display: none !important;
  }

  #focus .focus-side > .card:last-child {
    display: inline-flex;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #focus .sound-grid {
    display: flex;
    justify-content: center;
  }

  #focus .sound-grid button {
    height: 42px;
    min-width: 96px;
    padding: 0 17px;
    border-radius: 16px;
  }

  #focus .focus-plan-card,
  #focus .focus-record-table-card {
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 24px;
    background: var(--mobile-card);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.08);
    overflow: hidden;
  }

  #focus .focus-plan-card {
    margin-top: 18px;
    padding: 20px 12px 14px;
  }

  #focus .focus-plan-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }

  #focus .focus-plan-head h2,
  #focus .focus-record-table-card h2 {
    color: var(--mobile-text);
    font-size: 24px;
    font-weight: 900;
  }

  #focus .focus-plan-head p,
  #focus .focus-record-table-card p {
    display: none;
  }

  #focus .focus-plan-context {
    display: block !important;
    margin: 0 0 10px;
  }

  #focus .focus-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #707d77;
    font-size: 10px;
  }

  #focus .focus-legend span {
    display: inline-flex;
    align-items: center;
    height: 22px;
    gap: 4px;
    white-space: nowrap;
  }

  #focus .focus-legend i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
  }

  #focus .focus-today-gantt {
    --focus-axis-label: 48px;
    display: grid;
    grid-template-columns: var(--focus-axis-label) repeat(12, minmax(0, 1fr)) !important;
    width: 100%;
    min-width: 0;
    margin-top: 2px;
    border-top: 1px solid rgba(224, 228, 220, 0.78);
    overflow: visible;
  }

  #focus .focus-today-gantt .today-time-axis {
    height: 28px !important;
    min-height: 28px !important;
    overflow: visible;
    color: #64736d;
  }

  #focus .focus-today-gantt .today-time-axis span {
    top: 8px;
    font-size: 10px;
    line-height: 1;
  }

  #focus .focus-today-gantt .today-time-axis span:nth-child(even) {
    display: inline-block;
  }

  #focus .focus-today-gantt .gantt-empty {
    min-height: 178px !important;
    margin-left: calc(-1 * var(--focus-axis-label));
    padding: 38px 12px !important;
    background: transparent;
  }

  #focus .focus-range-label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 2px 4px !important;
    overflow: hidden;
    color: var(--mobile-text);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.25;
  }

  #focus .focus-range-label strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  #focus .focus-range-label .range-dates {
    display: none !important;
  }

  #focus .focus-gantt-row {
    position: relative;
    min-height: 25px !important;
    min-width: 0;
    background: repeating-linear-gradient(
      to right,
      transparent,
      transparent calc(8.333% - 1px),
      rgba(224, 228, 220, 0.76) calc(8.333% - 1px),
      rgba(224, 228, 220, 0.76) 8.333%
    );
  }

  #focus .focus-gantt-row .gantt-range-bar {
    top: 8px;
    height: 9px;
    min-width: 3px;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
    color: transparent;
    font-size: 0;
  }

  #focus .focus-now-marker {
    top: 28px;
    bottom: 30px;
  }

  #focus .focus-now-marker span {
    top: -6px;
    bottom: auto;
    transform: translate(-50%, -100%);
  }

  #focus .focus-record-table-card {
    margin-top: 18px;
    padding: 20px 12px 14px;
  }

  #focus .focus-record-table-wrap {
    overflow: visible;
    margin-top: 12px;
  }

  #focus .focus-record-table,
  #focus .focus-record-table thead,
  #focus .focus-record-table tbody,
  #focus .focus-record-table tr,
  #focus .focus-record-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #focus .focus-record-table thead {
    display: none;
  }

  #focus .focus-record-table tbody {
    display: grid;
    gap: 8px;
  }

  #focus .focus-record-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
    font-size: 12px;
  }

  #focus .focus-record-table tr {
    position: relative;
    display: block;
    min-height: 98px;
    padding: 13px;
    border: 1px solid var(--mobile-line);
    border-radius: 14px;
    background: rgba(255, 254, 250, 0.64);
    cursor: pointer;
  }

  #focus .focus-record-table td {
    padding: 0;
    border: 0;
    color: #5e6c66;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
  }

  #focus .focus-record-table td:first-child {
    display: block;
    max-height: 44px;
    padding-right: 0;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.45;
  }

  #focus .focus-record-table td:first-child .subject {
    margin-right: 9px;
    vertical-align: 1px;
  }

  #focus .focus-record-table td:nth-child(2),
  #focus .focus-record-table td:nth-child(3) {
    display: inline;
    color: #63716b;
    font-size: 13px;
  }

  #focus .focus-record-table td:nth-child(4) {
    display: none;
  }

  #focus .focus-record-table td:nth-child(5) {
    display: block;
    width: max-content;
    height: 26px;
    margin-top: 10px;
    line-height: 26px;
    position: static;
    overflow: visible;
  }

  #focus .focus-record-table th:nth-child(6),
  #focus .focus-record-table td:nth-child(6) {
    display: none;
  }

  #focus .focus-record-table .subject,
  #focus .focus-record-table .status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    height: 26px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
  }

  #focus .focus-record-empty-row td {
    padding: 28px 8px;
    color: #87938e;
    text-align: center;
  }

  #focus .focus-record-empty-row td b,
  #focus .focus-record-empty-row td span {
    display: block;
  }

  #focus .focus-record-empty-row td b {
    color: var(--mobile-text);
    font-size: 16px;
  }

  #focus .focus-record-empty-row td span {
    margin-top: 8px;
    font-size: 12px;
  }

  #library .mobile-my-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px;
    margin: 0 0 18px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: rgba(255, 254, 250, 0.74);
    box-shadow: 0 10px 28px rgba(43, 55, 50, 0.055);
  }

  #library .mobile-my-tabs button {
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    font-size: 14px;
  }

  #library .mobile-my-tabs button.active {
    border-bottom-color: transparent;
    background: #e7f0eb;
    box-shadow: inset 0 0 0 1px rgba(199, 216, 208, 0.44);
  }

  #library .mobile-my-tabs span {
    font-size: 14px;
  }

  #library .board-composer-card {
    padding: 22px 14px 20px;
  }

  /* Unified mobile rhythm: page top, block gaps, card spacing and shared controls. */
  :root {
    --mobile-page-top: calc(24px + env(safe-area-inset-top, 0px));
    --mobile-section-gap: 18px;
    --mobile-inner-gap: 14px;
    --mobile-card-radius: 24px;
    --mobile-card-pad: 20px 14px 16px;
    --mobile-control-height: 54px;
    --mobile-segment-height: 56px;
  }

  main {
    padding-top: 0 !important;
  }

  body:has(#planner.active) main,
  body:has(#bank.active) main,
  body:has(#analytics.active) main,
  body:has(#library.active) main {
    padding-top: 0 !important;
  }

  #dashboard,
  #planner,
  #bank,
  #analytics,
  #focus,
  #library {
    padding: var(--mobile-page-top) var(--mobile-x) var(--mobile-bottom) !important;
  }

  .today-toolbar,
  #planner .planner-toolbar,
  #analytics .analytics-toolbar {
    margin-top: 0 !important;
    margin-bottom: var(--mobile-section-gap) !important;
  }

  .today-notebook {
    gap: var(--mobile-section-gap) !important;
  }

  #planner .planner-toolbar,
  #bank .bank-page-shell,
  #bank .bank-compact-toolbar,
  #library .board-shell,
  #library .board-feed,
  #analytics .analytics-main-grid,
  #analytics .analytics-chart-grid {
    gap: var(--mobile-section-gap) !important;
  }

  #focus .focus-layout {
    margin-bottom: var(--mobile-section-gap) !important;
  }

  #planner .gantt-card,
  #planner .plan-table,
  #focus .focus-plan-card,
  #focus .focus-record-table-card,
  #library .mobile-my-tabs,
  #library .board-composer-card,
  #library .board-post,
  #analytics .analytics-stat-grid,
  #analytics .analytics-main-grid,
  #analytics .analytics-chart-grid {
    margin-top: 0 !important;
    margin-bottom: var(--mobile-section-gap) !important;
  }

  #planner .gantt-card:last-child,
  #planner .plan-table:last-child,
  #focus .focus-plan-card:last-child,
  #focus .focus-record-table-card:last-child,
  #library .mobile-my-tabs:last-child,
  #library .board-composer-card:last-child,
  #library .board-post:last-child,
  #analytics .analytics-main-grid:last-child,
  #analytics .analytics-chart-grid:last-child {
    margin-bottom: 0 !important;
  }

  #bank .essay-filter-card {
    margin: 0 0 var(--mobile-section-gap) !important;
  }

  #bank .bank-compact-toolbar,
  #library .board-composer-card,
  #library .board-post {
    margin-bottom: 0 !important;
  }

  #bank .essay-paper-grid {
    gap: var(--mobile-section-gap) !important;
  }

  .notebook-page,
  #planner .gantt-card,
  #planner .plan-table,
  #bank .essay-paper-card,
  #bank .essay-detail-card,
  #library .board-composer-card,
  #library .board-post,
  #library .board-state,
  #focus .focus-plan-card,
  #focus .focus-record-table-card,
  #analytics .stat-card,
  #analytics .analytics-heatmap-card,
  #analytics .analytics-trend-card,
  #analytics .analytics-pie-card,
  #analytics .sankey-card {
    border-radius: var(--mobile-card-radius) !important;
  }

  #planner .view-tabs,
  #bank .bank-mode-tabs,
  #library .mobile-my-tabs,
  #analytics .analytics-range-tabs,
  #focus .focus-mode-switch {
    min-height: var(--mobile-segment-height);
    padding: 5px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: rgba(255, 254, 250, 0.74);
    box-shadow: 0 10px 28px rgba(43, 55, 50, 0.055);
  }

  #planner .view-tabs button,
  #bank .bank-mode-tabs button,
  #library .mobile-my-tabs button,
  #analytics .analytics-range-tabs button,
  #focus .focus-mode-switch button {
    height: 44px;
    min-height: 44px;
    border-radius: 14px;
  }

  #planner .view-tabs button.active,
  #bank .bank-mode-tabs button.active,
  #library .mobile-my-tabs button.active,
  #analytics .analytics-range-tabs button.active {
    background: #e7f0eb;
    color: var(--mobile-green);
    box-shadow: inset 0 0 0 1px rgba(199, 216, 208, 0.44);
  }

  #bank .essay-search,
  #bank .essay-filter-card .pretty-select-trigger,
  #bank .essay-filter-card select,
  #focus .focus-top .pretty-select-trigger {
    min-height: var(--mobile-control-height) !important;
    height: var(--mobile-control-height) !important;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  #dashboard {
    padding: 22px 20px 48px;
    overflow-x: hidden;
  }

  #dashboard .today-toolbar {
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
  }

  #dashboard .today-notebook {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  #dashboard .today-notebook::before,
  #dashboard .notebook-spine,
  #dashboard .notebook-page::before {
    display: none;
  }

  #dashboard .notebook-page {
    min-height: 420px;
    padding: 30px 34px;
    border: 1px solid rgba(229, 231, 223, 0.86);
    border-radius: 24px;
    background: rgba(255, 254, 250, 0.9);
    box-shadow: 0 16px 40px rgba(43, 55, 50, 0.08);
  }

  #dashboard .notebook-page-head {
    flex-wrap: nowrap;
  }

  #dashboard .notebook-page-head > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  #dashboard .notebook-date-line {
    flex: 0 0 auto;
  }

  #dashboard .daily-note-row {
    grid-template-columns: 68px 36px minmax(0, 1fr) 42px;
  }

  #planner {
    padding-inline: 20px;
    overflow-x: hidden;
  }

  #planner .planner-toolbar {
    display: grid;
    gap: 12px;
    align-items: stretch;
  }

  #planner .view-tabs {
    width: 100%;
    overflow-x: auto;
  }

  #planner .planner-toolbar-right {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #planner .date-control {
    flex: 1 1 240px;
  }

  #planner .planner-main-actions {
    margin-left: auto;
  }

  #planner .gantt-card,
  #planner .plan-table {
    overflow-x: auto;
  }

  #planner .gantt,
  #planner .plan-table table {
    min-width: 720px;
  }

  #analytics {
    padding-inline: 20px;
    overflow-x: hidden;
  }

  #analytics .analytics-chart-grid {
    grid-template-columns: 1fr;
  }

  #analytics .analytics-heatmap-card,
  #analytics .sankey-card {
    max-width: 100%;
    overflow-x: auto;
  }

  #analytics .heatmap-frame {
    min-width: 720px;
  }

  #analytics .sankey-chart {
    min-width: 720px;
  }

  #dashboard,
  #planner,
  #bank,
  #analytics,
  #focus,
  #library {
    padding-top: 22px !important;
  }

  .today-toolbar,
  #planner .planner-toolbar,
  #analytics .analytics-toolbar {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
  }

  #bank .bank-compact-toolbar {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .today-notebook,
  #planner .planner-toolbar,
  #bank .bank-page-shell,
  #library .board-shell,
  #library .board-feed,
  #analytics .analytics-main-grid,
  #analytics .analytics-chart-grid {
    gap: 18px !important;
  }

  #focus .focus-layout {
    margin-bottom: 18px !important;
  }

  #planner .gantt-card,
  #planner .plan-table,
  #focus .focus-plan-card,
  #focus .focus-record-table-card {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
  }

  #planner .plan-table:last-child,
  #focus .focus-record-table-card:last-child {
    margin-bottom: 0 !important;
  }

  #bank .essay-filter-card {
    margin-bottom: 18px !important;
  }

  #library .board-composer-card,
  #library .board-post {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 380px) {
  .brand {
    width: 170px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
  }

  .brand-figure {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

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

  .brand-copy small {
    font-size: 10px;
  }

  .header-right {
    max-width: 154px;
  }

  .countdown {
    height: 40px;
    min-height: 40px;
    padding-inline: 10px !important;
  }

  .countdown span {
    font-size: 12px;
  }

  .countdown span b {
    font-size: 18px;
  }

  .today-date-copy::before,
  .today-date-block b {
    font-size: 20px;
  }

  .notebook-page {
    padding-inline: 14px;
  }

  .daily-note-row {
    grid-template-columns: 58px 34px minmax(0, 1fr) 32px;
  }
}
