/* Canonical phone UI. Loaded last so one mobile layer owns layout and hierarchy. */
@media (max-width: 899px) {
  :root {
    --phone-nav-height: 68px;
    --phone-pad: 16px;
    --phone-rule: #e2e3e7;
  }

  html,
  body,
  #app,
  #view {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: var(--color-canvas, #f8f8f9);
  }

  button,
  a,
  [role="button"] {
    touch-action: manipulation;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .today-screen,
  .capture-workspace,
  .memory-review-dashboard,
  .library-screen,
  .manage-screen,
  .more-screen {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 0;
    padding: calc(14px + env(safe-area-inset-top)) var(--phone-pad)
      calc(var(--phone-nav-height) + 28px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: auto;
    background: var(--color-canvas, #f8f8f9);
  }

  .bottom-nav,
  html:not(.is-standalone) .bottom-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    min-height: calc(var(--phone-nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    background: rgba(250, 250, 251, 0.97);
    border: 0;
    border-top: 1px solid var(--phone-rule);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(18px);
  }

  .side-brand,
  .side-settings {
    display: none;
  }

  .nav-item {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 56px;
    grid-template-rows: 27px 18px;
    place-items: center;
    padding: 4px 2px 1px;
    color: #777a82;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .nav-item::before {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 26px;
    height: 2px;
    background: transparent;
    border-radius: 1px;
    content: "";
    transform: translateX(-50%);
  }

  .nav-item.is-active {
    color: var(--color-ink, #111216);
    background: transparent;
  }

  .nav-item.is-active svg {
    fill: none;
    stroke-width: 2.5;
  }

  .nav-item.is-active::before {
    background: var(--color-ink, #111216);
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke-width: 2.1;
  }

  .nav-item span {
    overflow: hidden;
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-header,
  .today-header,
  .capture-workspace-header {
    min-height: 52px;
    margin-bottom: 20px;
  }

  .page-header h1 {
    font-size: 25px;
  }

  .system-kicker,
  .section-heading span,
  .section-heading > div > span {
    font-size: 12px;
  }

  .round-icon-button,
  .icon-button,
  .text-button,
  .section-header button {
    min-width: 44px;
    min-height: 44px;
  }

  /* Today: one decision, one action, one quiet proof strip. */
  .today-header {
    align-items: center;
  }

  .today-date {
    margin-top: 2px;
    font-size: 15px;
  }

  .today-focus {
    display: block;
    padding: 8px 0 0;
    border: 0;
  }

  .today-label {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .today-focus-copy h1 {
    max-width: 13ch;
    font-size: 30px;
    line-height: 1.2;
  }

  .today-focus-copy > p {
    margin-top: 12px;
    color: var(--color-ink-muted, #5e6169);
    font-size: 15px;
    line-height: 1.55;
  }

  .today-decision-trace {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--phone-rule);
  }

  .today-decision-trace span {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    color: var(--color-ink-muted, #5e6169);
    font-size: 12px;
    line-height: 1.4;
  }

  .today-decision-trace b {
    color: var(--color-ink, #111216);
    font-weight: 720;
  }

  .today-start-button {
    width: 100%;
    min-height: 52px;
    margin-top: 16px;
    border-radius: 7px;
  }

  .today-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
    border-top: 1px solid var(--phone-rule);
    border-bottom: 1px solid var(--phone-rule);
  }

  .today-proof > div {
    display: grid;
    min-height: 64px;
    align-content: center;
    justify-content: start;
    gap: 4px;
    padding: 9px 10px;
    border-right: 1px solid var(--phone-rule);
  }

  .today-proof > div:first-child {
    padding-left: 0;
  }

  .today-proof > div:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .today-proof dt {
    font-size: 11px;
  }

  .today-proof dd {
    font-size: 20px;
  }

  .today-insight-preview {
    margin-top: 24px;
  }

  .today-insight-preview .section-heading {
    display: none;
  }

  .today-insight-link {
    display: grid;
    min-height: 80px;
    grid-template-columns: 72px minmax(0, 1fr) 20px;
    gap: 12px;
    padding: 12px 0;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--phone-rule);
    border-radius: 0;
  }

  .today-insight-value strong {
    font-size: 27px;
  }

  .today-insight-value small,
  .today-insight-copy small {
    font-size: 11px;
  }

  .today-insight-copy strong {
    font-size: 13px;
    white-space: normal;
  }

  .today-insight-action {
    font-size: 0;
  }

  /* Persistent task surfacing. */
  .smart-resume-card {
    display: grid;
    width: 100%;
    min-height: 72px;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 11px;
    margin-top: 20px;
    padding: 12px 0;
    color: var(--color-ink, #111216);
    text-align: left;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--phone-rule);
    border-bottom: 1px solid var(--phone-rule);
    border-radius: 0;
  }

  .smart-resume-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    background: var(--color-ink, #111216);
    border-radius: 6px;
  }

  .smart-resume-icon svg,
  .smart-resume-card > svg {
    width: 18px;
    height: 18px;
  }

  .smart-resume-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .smart-resume-copy small,
  .smart-resume-copy em {
    overflow: hidden;
    color: var(--color-ink-muted, #62656d);
    font-size: 11px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .smart-resume-copy strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Capture: fast query first, long-document AI second. */
  .capture-workspace-header {
    margin-bottom: 12px;
  }

  .capture-lookup-section,
  .capture-primary,
  .capture-secondary-actions {
    margin-top: 0;
  }

  .capture-lookup-section .section-heading,
  .capture-primary .section-heading {
    margin-bottom: 10px;
  }

  .capture-lookup-section .section-heading h2,
  .capture-primary .section-heading h2 {
    font-size: 17px;
  }

  .capture-workspace .record-query-panel {
    margin: 0;
  }

  .capture-workspace .record-query-row {
    min-height: 58px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 5px;
    border-radius: 8px;
  }

  .capture-workspace .capture-input-shell input {
    min-height: 46px;
    padding: 0;
    font-size: 16px;
  }

  .capture-workspace .query-side-action,
  .capture-input-shell .search-submit,
  .capture-input-shell .input-clear {
    min-width: 44px;
    min-height: 44px;
  }

  .capture-workspace .record-stage {
    margin-top: 16px;
    overflow: visible;
  }

  .capture-primary {
    margin-top: 26px;
    padding: 22px 0 0;
    border-top: 1px solid var(--phone-rule);
    border-bottom: 0;
  }

  .capture-ai-action {
    min-height: 62px;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    padding: 8px 10px;
    color: var(--color-ink, #111216);
    background: var(--color-surface, #fff);
    border: 1px solid var(--phone-rule);
    border-radius: 8px;
  }

  .capture-ai-action small {
    color: var(--color-ink-muted, #62656d);
    opacity: 1;
  }

  .capture-ai-icon {
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--color-ink, #111216);
    border-radius: 6px;
  }

  .capture-secondary-actions {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 22px;
    padding-top: 0;
    border-top: 1px solid var(--phone-rule);
  }

  .capture-secondary-actions > button {
    min-height: 58px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--phone-rule);
    border-radius: 0;
  }

  /* Review planning: one session-sized decision, short evidence list. */
  .memory-review-dashboard {
    padding-bottom: calc(var(--phone-nav-height) + 28px + env(safe-area-inset-bottom));
  }

  .retrieval-hero {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
  }

  .retrieval-count strong {
    font-size: 42px;
  }

  .retrieval-count span,
  .retrieval-count small,
  .retrieval-hero-copy p {
    font-size: 12px;
  }

  .retrieval-hero-copy h2 {
    font-size: 17px;
  }

  .retrieval-plan-meta {
    display: grid;
    margin: 0 0 22px;
    border-bottom: 1px solid var(--phone-rule);
  }

  .retrieval-plan-meta span {
    display: grid;
    min-height: 44px;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
    border-bottom: 1px solid var(--phone-rule);
  }

  .retrieval-plan-meta span:last-child {
    border-bottom: 0;
  }

  .retrieval-plan-meta b {
    color: var(--color-ink, #111216);
  }

  .memory-queue-section {
    margin-top: 0;
    padding-bottom: 0;
  }

  .retrieval-queue-row {
    min-height: 62px;
  }

  .retrieval-queue-row strong {
    font-size: 14px;
  }

  .retrieval-queue-row small {
    font-size: 11px;
    white-space: normal;
  }

  .queue-rank {
    color: var(--color-ink-faint, #8b8e95);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .queue-overflow-note {
    margin: 10px 0 0;
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
    line-height: 1.5;
  }

  .memory-review-dashboard .review-start-dock {
    position: static;
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 20px 0 0;
    padding: 14px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--phone-rule);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .review-start-button {
    min-height: 50px;
    font-size: 14px;
    background: var(--color-ink, #111216);
    border-radius: 7px;
  }

  .memory-review-dashboard .review-start-dock > p {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
  }

  /* Library: two readable levels, no chip maze. */
  .library-screen {
    display: block;
  }

  .library-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .library-search-shell {
    min-height: 50px;
  }

  .library-search-shell input {
    min-height: 48px;
    font-size: 16px;
  }

  .library-filter-trigger {
    width: 44px;
    height: 50px;
    min-height: 50px;
  }

  .library-list-meta {
    min-height: 44px;
  }

  .library-list-wrap {
    margin-right: calc(-1 * var(--phone-pad));
    margin-left: calc(-1 * var(--phone-pad));
    padding-right: var(--phone-pad);
    padding-left: var(--phone-pad);
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .mobile-word-row {
    min-height: 68px;
    padding: 10px 0;
    border-bottom: 1px solid var(--phone-rule);
  }

  .word-row-copy {
    gap: 5px;
  }

  .word-row-copy strong {
    font-size: 15px;
  }

  .word-row-copy small,
  .word-row-meta time {
    font-size: 12px;
  }

  .word-row-menu-button {
    width: 44px;
    height: 44px;
  }

  /* Insight: one diagnosis, one recommendation, then supporting rows. */
  .insight-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 0 18px;
  }

  .insight-hero > strong {
    font-size: 48px;
  }

  .insight-hero > p {
    font-size: 12px;
  }

  .insight-hero > div {
    min-width: 78px;
  }

  .insight-hero > div strong {
    font-size: 17px;
  }

  .insight-next-step {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px 12px;
    margin-top: 22px;
    padding: 18px 0;
    border-top: 1px solid var(--phone-rule);
    border-bottom: 1px solid var(--phone-rule);
  }

  .insight-next-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    background: var(--color-ink, #111216);
    border-radius: 6px;
  }

  .insight-next-icon svg {
    width: 18px;
    height: 18px;
  }

  .insight-next-step small {
    color: var(--color-ink-muted, #62656d);
    font-size: 11px;
  }

  .insight-next-step h2 {
    margin: 3px 0 6px;
    font-size: 18px;
    line-height: 1.3;
  }

  .insight-next-step p {
    margin: 0;
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
    line-height: 1.5;
  }

  .insight-next-step .button {
    min-height: 48px;
    grid-column: 1 / -1;
    border-radius: 7px;
  }

  .insight-metric-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 24px;
    border-top: 1px solid var(--phone-rule);
  }

  .insight-metric {
    display: grid;
    min-height: 64px;
    grid-template-columns: 32px minmax(76px, auto) minmax(0, 1fr) 18px;
    align-items: center;
    align-content: center;
    gap: 10px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--phone-rule);
  }

  .insight-metric .metric-icon {
    position: static;
    width: 30px;
    height: 30px;
  }

  .insight-metric strong {
    font-size: 18px;
  }

  .insight-metric small,
  .insight-metric em {
    font-size: 12px;
  }

  .insight-metric em {
    justify-self: end;
    text-align: right;
  }

  .insight-metric > svg {
    width: 17px;
    height: 17px;
    color: var(--color-ink-faint, #8b8e95);
  }

  .insight-attention,
  .manage-tags {
    margin-top: 26px;
  }

  .insight-attention-row,
  .tag-row {
    min-height: 52px;
  }

  .tag-row strong,
  .tag-row span {
    font-size: 13px;
  }

  /* Top-level pages rely on the active tab; only real actions remain in the top bar. */
  .page-action-bar {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 10px;
  }

  .library-page-header {
    justify-content: space-between;
  }

  .library-selection-status {
    font-size: 15px;
    font-weight: 720;
  }

  .library-selection-status:empty {
    display: none;
  }

  .today-focus {
    padding-top: 6px;
  }

  /* AI document import is the primary capture task. */
  .capture-ai-hero {
    display: grid;
    gap: 18px;
    margin: 2px 0 26px;
    padding: 22px 18px 18px;
    color: #fff;
    background: #111216;
    border: 0;
    border-radius: 8px;
  }

  .capture-ai-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: #e6e7eb;
    font-size: 12px;
    font-weight: 720;
  }

  .capture-ai-kicker svg {
    width: 16px;
    height: 16px;
  }

  .capture-ai-copy h1 {
    max-width: 12ch;
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    text-wrap: balance;
  }

  .capture-ai-copy p {
    margin: 10px 0 0;
    color: #bfc1c8;
    font-size: 13px;
    line-height: 1.55;
  }

  .capture-ai-hero .capture-ai-action {
    min-height: 64px;
    padding: 8px 10px;
    color: #111216;
    background: #fff;
    border: 0;
  }

  .capture-ai-hero .capture-ai-icon {
    color: #fff;
    background: #111216;
  }

  .capture-ai-hero .capture-ai-action small {
    color: #666971;
  }

  .capture-lookup-section {
    margin-top: 0;
  }

  .capture-lookup-section .section-heading h2 {
    font-size: 18px;
  }

  .capture-secondary-actions {
    margin-top: 18px;
  }

  /* The scheduled review path has one method: active recall. */
  .retrieval-hero {
    padding-top: 8px;
  }

  .retrieval-hero-copy h1 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.3;
    text-wrap: balance;
  }

  /* Topics are semantic navigation; source, language and memory state remain separate facets. */
  .library-topic-overview {
    margin: 8px 0 20px;
    padding: 16px 0 0;
    border-top: 1px solid var(--phone-rule);
  }

  .library-topic-overview .section-header,
  .insight-topic-performance .section-header {
    margin-bottom: 10px;
  }

  .library-topic-overview .section-header h2,
  .insight-topic-performance .section-header h2 {
    font-size: 19px;
  }

  .library-topic-overview .section-header span {
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
  }

  .library-topic-overview .section-header button,
  .insight-topic-performance .section-header button {
    min-height: 36px;
    padding: 0 8px;
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
    font-weight: 700;
    background: transparent;
    border: 0;
  }

  .library-topic-list,
  .insight-topic-list {
    overflow: hidden;
    background: var(--color-surface, #fff);
    border: 1px solid var(--phone-rule);
    border-radius: 8px;
  }

  .library-topic-row,
  .insight-topic-row {
    display: grid;
    width: 100%;
    min-height: 56px;
    grid-template-columns: 30px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--color-ink, #111216);
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--phone-rule);
    border-radius: 0;
  }

  .library-topic-row:last-child,
  .insight-topic-row:last-child {
    border-bottom: 0;
  }

  .library-topic-row.is-active {
    background: #f1f2f4;
  }

  .library-topic-row > span:nth-child(2),
  .library-topic-row > strong,
  .insight-topic-row > strong {
    font-size: 14px;
  }

  .library-topic-row > strong,
  .insight-topic-row > strong {
    font-variant-numeric: tabular-nums;
  }

  .library-topic-row > svg,
  .insight-topic-row > svg {
    width: 17px;
    color: #8a8d94;
  }

  .topic-row-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #51545b;
    background: #f0f1f3;
    border-radius: 50%;
  }

  .topic-row-icon svg {
    width: 15px;
    height: 15px;
  }

  /* Insight starts with scan-friendly state, then explains memory health by topic. */
  .insight-page-header {
    min-height: 44px;
    margin-bottom: 8px;
  }

  .insight-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
  }

  .insight-status-card {
    display: grid;
    min-width: 0;
    min-height: 126px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    gap: 5px 8px;
    padding: 15px;
    color: var(--color-ink, #111216);
    text-align: left;
    background: var(--color-surface, #fff);
    border: 1px solid var(--phone-rule);
    border-radius: 8px;
  }

  .insight-status-card .insight-status-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: #3576d3;
    border-radius: 50%;
  }

  .insight-status-card.is-due .insight-status-icon {
    background: #db8a1e;
  }

  .insight-status-card.is-stable .insight-status-icon {
    background: #d14f4f;
  }

  .insight-status-card.is-archived .insight-status-icon {
    background: #686c73;
  }

  .insight-status-icon svg {
    width: 18px;
    height: 18px;
  }

  .insight-status-card > strong {
    align-self: center;
    font-size: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .insight-status-card > span:not(.insight-status-icon) {
    grid-column: 1 / -1;
    align-self: end;
    font-size: 15px;
    font-weight: 750;
  }

  .insight-status-card > small {
    grid-column: 1 / -1;
    color: var(--color-ink-muted, #62656d);
    font-size: 10px;
    line-height: 1.35;
  }

  .insight-readout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px 18px;
    padding: 20px 0 22px;
    border-top: 1px solid var(--phone-rule);
    border-bottom: 1px solid var(--phone-rule);
  }

  .insight-recall-main,
  .insight-target {
    display: grid;
    gap: 8px;
  }

  .insight-recall-main span,
  .insight-target span,
  .insight-coverage span {
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
  }

  .insight-recall-main strong {
    font-size: 52px;
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
  }

  .insight-target {
    justify-items: end;
    padding-bottom: 3px;
  }

  .insight-target strong {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
  }

  .insight-readout > p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--color-ink-muted, #62656d);
    font-size: 12px;
    line-height: 1.55;
  }

  .insight-coverage {
    display: flex;
    min-height: 42px;
    grid-column: 1 / -1;
    align-items: end;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--phone-rule);
  }

  .insight-coverage strong {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
  }

  .insight-topic-performance {
    margin-top: 28px;
  }

  .insight-topic-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .insight-topic-copy strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .insight-topic-copy small {
    overflow: hidden;
    color: var(--color-ink-muted, #62656d);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .insight-topic-empty {
    display: grid;
    min-height: 112px;
    place-items: center;
    gap: 8px;
    padding: 18px;
    color: var(--color-ink-muted, #62656d);
    text-align: center;
  }

  .insight-topic-empty svg {
    width: 22px;
    height: 22px;
  }

  .insight-topic-empty p {
    max-width: 25ch;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .insight-attention {
    margin-top: 28px;
  }

  .insight-attention .section-header h2 {
    font-size: 20px;
  }

  .insight-attention .section-header button {
    min-height: 38px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid var(--phone-rule);
    border-radius: 6px;
  }

  /* Task sheets are full-screen on the only supported form factor. */
  .feature-dialog,
  .smart-import-dialog,
  .sheet-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .smart-import-content,
  .dictionary-list,
  .settings-content {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .smart-candidate.is-ungrounded {
    border-color: #dca646;
  }

  .smart-candidate.is-ungrounded .smart-candidate-title em {
    color: #8a5a00;
  }

  .smart-import-engine,
  .smart-source,
  .smart-evidence,
  .smart-import-context-note {
    font-size: 12px;
  }

  .wechat-demo-boundary {
    position: fixed;
    z-index: 20;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 5px 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    background: rgba(17, 18, 22, 0.82);
    border-radius: 5px;
    pointer-events: none;
  }
}

@media (max-width: 359px) {
  :root {
    --phone-pad: 12px;
  }

  .today-focus-copy h1 {
    font-size: 27px;
  }

  .today-proof > div {
    padding-right: 6px;
    padding-left: 6px;
  }

  .retrieval-hero {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .retrieval-count strong {
    font-size: 37px;
  }
}
