:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #eef1f4;
  --ink: #111827;
  --muted: #667085;
  --subtle: #98a2b3;
  --border: #dfe3e8;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --green: #0f8f72;
  --green-soft: #e3f4ef;
  --coral: #df5a4a;
  --coral-soft: #fbe9e7;
  --amber: #d98212;
  --amber-soft: #fff2d8;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(8, 127, 245, 0.28);
  outline-offset: 2px;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

.is-hidden {
  display: none !important;
}

#app {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 88px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  background: rgba(246, 247, 249, 0.96);
  border-bottom: 1px solid rgba(223, 227, 232, 0.84);
  backdrop-filter: blur(18px);
}

.app-header h1,
.sheet-header h2,
.section-heading {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.due-indicator {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.due-indicator span {
  color: var(--coral);
  font-size: 1.25rem;
  font-weight: 800;
}

.due-indicator small {
  color: var(--muted);
  font-size: 0.78rem;
}

#view {
  min-height: calc(100vh - 164px);
  padding: 18px 16px calc(94px + env(safe-area-inset-bottom));
  outline: none;
}

.view-stack {
  display: grid;
  gap: 20px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 760px);
  min-height: 70px;
  margin: 0 auto;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  grid-template-rows: 26px 18px;
  place-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 2px;
  color: var(--subtle);
  background: transparent;
  border: 0;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  color: var(--blue);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.section-header p,
.supporting-copy,
.empty-state p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.icon-button.is-accent {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: transparent;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 15px;
  font-weight: 750;
  border: 1px solid transparent;
  border-radius: 8px;
}

.button-primary {
  color: #ffffff;
  background: var(--blue);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}

.button-success {
  color: #ffffff;
  background: var(--green);
}

.button-danger {
  color: var(--coral);
  background: var(--coral-soft);
}

.button:disabled {
  color: var(--subtle);
  background: var(--surface-muted);
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
}

.input-shell {
  position: relative;
}

.input-shell > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--subtle);
  transform: translateY(-50%);
}

.input-shell input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 44px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.input-shell input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.dictation-input:focus,
.data-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.capture-panel {
  display: grid;
  gap: 16px;
}

.lookup-result {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lookup-result h2 {
  margin: 0;
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.phonetic {
  color: var(--muted);
  font-size: 0.96rem;
}

.definition {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.example {
  margin: 0;
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  border-left: 3px solid var(--amber);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.quick-action {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.quick-action svg {
  color: var(--blue);
}

.quick-action strong,
.quick-action small {
  display: block;
}

.quick-action small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.word-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.word-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  padding: 13px 14px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.word-row:last-child {
  border-bottom: 0;
}

.word-main {
  min-width: 0;
}

.word-main strong {
  display: block;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-main span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.word-meta time {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #075e4c;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--green-soft);
  border-radius: 6px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.status-dot.mastered {
  background: var(--green);
}

.status-dot.archived {
  background: var(--subtle);
}

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

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 3px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.segmented button {
  min-height: 38px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  background: transparent;
  border: 0;
  border-radius: 6px;
  white-space: nowrap;
}

.segmented button.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(17, 24, 39, 0.09);
}

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

.metric-tile {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
}

.metric-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.metric-icon.coral {
  color: var(--coral);
  background: var(--coral-soft);
}

.metric-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-tile strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
}

.metric-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.review-launch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: var(--ink);
  color: #ffffff;
  border-radius: 8px;
}

.review-launch h2,
.review-launch p {
  margin: 0;
}

.review-launch h2 {
  font-size: 1.1rem;
}

.review-launch p {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.review-launch .button {
  color: var(--ink);
  background: #ffffff;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  border-radius: 4px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 4px;
}

.tag-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tag-row,
.settings-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.tag-row:last-child,
.settings-row:last-child {
  border-bottom: 0;
}

.tag-row > svg,
.settings-row > svg {
  color: var(--muted);
}

.tag-row strong,
.settings-row strong {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row span,
.settings-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  padding: 0;
  background: var(--surface-muted);
  border: 0;
  border-radius: 14px;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.24);
  transition: transform 160ms ease;
}

.toggle.is-on {
  background: var(--green);
}

.toggle.is-on::after {
  transform: translateX(20px);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--subtle);
}

.empty-state h2 {
  margin: 14px 0 0;
  font-size: 1.05rem;
}

dialog {
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 0;
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.54);
  backdrop-filter: blur(5px);
}

.sheet-dialog {
  width: min(calc(100% - 24px), 620px);
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sheet-dialog form {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.field input,
.field textarea,
.field select,
.data-textarea,
.dictation-input,
.schedule-row input,
.schedule-row select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.field textarea,
.data-textarea {
  min-height: 92px;
  resize: vertical;
}

.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
}

.schedule-fields {
  display: grid;
  gap: 8px;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 90px 100px;
  align-items: center;
  gap: 8px;
}

.schedule-row span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.data-textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.review-dialog {
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: none;
  margin: 0 auto;
  background: var(--bg);
}

.review-session {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
}

.review-topbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.review-progress {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.review-card {
  align-self: center;
  display: grid;
  gap: 20px;
  padding: 28px 18px;
  text-align: center;
}

.review-card h2 {
  margin: 0;
  font-size: clamp(2.6rem, 14vw, 5.2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.review-stage {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.review-definition {
  display: grid;
  gap: 10px;
  min-height: 90px;
  padding: 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.review-definition[hidden] {
  display: none;
}

.review-definition strong {
  font-size: 1.05rem;
  line-height: 1.5;
}

.review-definition p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.review-controls {
  display: grid;
  gap: 10px;
}

.review-controls .primary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.review-controls .secondary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dictation-input {
  min-height: 56px;
  font-size: 1.1rem;
  text-align: center;
}

.snackbar {
  position: fixed;
  right: 16px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 80;
  width: min(calc(100% - 32px), 520px);
  min-height: 0;
  margin: 0 auto;
  padding: 0 14px;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  background: var(--ink);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 160ms ease, transform 160ms ease, padding 160ms ease;
  pointer-events: none;
}

.snackbar.is-visible {
  min-height: 46px;
  padding-top: 12px;
  padding-bottom: 12px;
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  #view {
    padding-right: 24px;
    padding-left: 24px;
  }

  .quick-row,
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .schedule-row {
    grid-template-columns: 1fr 76px 86px;
  }

  .sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .review-controls .secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* 2026 monochrome interface */
:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-muted: #f3f3f6;
  --ink: #101114;
  --muted: #6f7178;
  --subtle: #9a9ca4;
  --border: #e7e7eb;
  --green: #2c9852;
  --green-soft: #e6f5e9;
  --coral: #df323b;
  --coral-soft: #fce9ea;
  --shadow: 0 10px 30px rgba(24, 25, 31, 0.055);
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--ink);
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.46;
}

#app {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  background: var(--bg);
}

#view {
  min-height: 100dvh;
  padding: 0 0 calc(70px + env(safe-area-inset-bottom));
}

.app-page {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - 70px - env(safe-area-inset-bottom));
  padding: calc(12px + env(safe-area-inset-top)) 14px 16px;
}

.side-brand,
.side-settings,
.desktop-screen-title,
.desktop-add-button,
.desktop-word-table,
.desktop-more-filter {
  display: none;
}

.bottom-nav {
  width: 100%;
  min-height: 70px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top-color: var(--border);
  box-shadow: 0 -8px 24px rgba(20, 21, 26, 0.035);
}

.nav-item {
  grid-template-rows: 25px 17px;
  min-height: 52px;
  color: #7d7f86;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
}

.nav-item.is-active {
  color: #050506;
}

.nav-item.is-active svg {
  fill: currentColor;
}

.product-header,
.page-header {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin-bottom: 8px;
}

.product-header h1,
.page-header h1 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.1;
  font-weight: 760;
}

.product-header p {
  margin: 3px 0 0;
  color: #4d4f55;
  font-size: 0.62rem;
}

.round-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.74);
  border: 0;
  border-radius: 50%;
}

.round-icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.input-shell {
  box-shadow: none;
}

/* Record */
.capture-screen {
  display: grid;
  grid-template-rows: auto minmax(310px, 1fr) auto;
}

.record-stage {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.record-empty {
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  min-height: 100%;
  padding-bottom: 32px;
  text-align: center;
}

.record-empty > svg {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  color: #8e9096;
}

.record-empty h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 500;
}

.record-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-search-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-top: 26px;
  color: #d6d9df;
}

.empty-search-illustration svg {
  width: 86px;
  height: 86px;
  stroke-width: 1.05;
}

.empty-search-illustration b {
  position: absolute;
  top: 2px;
  right: 4px;
  color: #d2d5dd;
  font-size: 1rem;
  font-weight: 400;
}

.record-result {
  align-self: flex-start;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.record-result > p,
.record-result > .dictionary-result-heading {
  margin-right: 14px;
  margin-left: 14px;
}

.record-result .dictionary-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.record-result h2 {
  margin: 0;
  font-size: 1.72rem;
  line-height: 1.1;
}

.record-result .phonetic {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  color: #575960;
  font-size: 0.74rem;
}

.record-result .phonetic button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
}

.record-result .phonetic svg {
  width: 15px;
  height: 15px;
}

.recorded-pill {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 4px 8px;
  color: #2b8a4d;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--green-soft);
  border-radius: 999px;
}

.record-result .definition {
  margin-top: 18px;
  color: #28292d;
  font-size: 0.78rem;
  line-height: 1.6;
}

.record-result .example {
  margin-top: 14px;
  color: #35363a;
  font-size: 0.78rem;
  line-height: 1.7;
}

.record-result .recorded-at {
  margin-top: 22px;
  margin-bottom: 14px;
  color: #989aa1;
  font-size: 0.62rem;
}

.record-result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.record-result-actions button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 62px;
  padding: 9px 4px;
  background: transparent;
  border: 0;
}

.record-result-actions button + button {
  border-left: 1px solid var(--border);
}

.record-result-actions svg {
  width: 18px;
  height: 18px;
}

.record-result-actions span {
  font-size: 0.68rem;
}

.record-query-panel {
  margin-top: 12px;
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.record-query-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 7px;
}

.query-side-action {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  height: 48px;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.query-side-action svg {
  width: 17px;
  height: 17px;
}

.query-side-action span {
  font-size: 0.54rem;
}

.capture-input-shell {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  background: #fff;
  border: 1px solid #ddddE2;
  border-radius: 999px;
}

.capture-input-shell .search-submit,
.capture-input-shell .input-clear {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #7e8087;
  background: transparent;
  border: 0;
}

.capture-input-shell svg {
  width: 17px;
  height: 17px;
}

.capture-input-shell input {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  color: var(--ink);
  font-size: 0.76rem;
  background: transparent;
  border: 0;
  outline: 0;
}

.record-query-panel > p {
  margin: 7px 0 0;
  color: #989aa0;
  font-size: 0.58rem;
  text-align: center;
}

/* Library */
.library-screen,
.review-dashboard,
.manage-screen,
.more-screen {
  display: flex;
  flex-direction: column;
}

.library-search-shell {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid #dedfe4;
  border-radius: 10px;
}

.library-search-shell svg {
  width: 16px;
  height: 16px;
  color: #8b8d93;
}

.library-search-shell input {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  font-size: 0.72rem;
  background: transparent;
  border: 0;
  outline: 0;
}

.library-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.library-filter-bar::-webkit-scrollbar {
  display: none;
}

.library-filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 29px;
  padding: 0 11px;
  color: #505158;
  font-size: 0.65rem;
  white-space: nowrap;
  background: #efeff2;
  border: 0;
  border-radius: 999px;
}

.library-filter-bar button.is-active {
  color: #fff;
  background: #050506;
}

.library-filter-bar .sort-chip {
  gap: 3px;
  background: #f6f6f8;
  border: 1px solid var(--border);
}

.sort-chip svg {
  width: 13px;
  height: 13px;
}

.library-list-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mobile-word-list {
  display: grid;
}

.mobile-word-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 9px 11px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.mobile-word-row:last-child {
  border-bottom: 0;
}

.word-row-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.word-row-copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-row-copy small {
  overflow: hidden;
  color: #74767c;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-row-meta {
  display: grid;
  grid-template-columns: auto 16px;
  align-items: center;
  gap: 8px;
  color: #83858c;
}

.word-row-meta time {
  font-size: 0.58rem;
}

.word-row-meta svg {
  width: 15px;
  height: 15px;
}

.library-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 54px;
  padding: 8px 2px 0;
  border-top: 0;
}

.library-footer button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.62rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.library-footer button:last-child {
  justify-self: end;
}

.library-footer svg {
  width: 14px;
  height: 14px;
}

.library-footer strong {
  color: #74767d;
  font-size: 0.62rem;
  font-weight: 500;
}

.compact-options-menu {
  position: absolute;
  top: 58px;
  right: 14px;
  z-index: 12;
  width: min(230px, calc(100% - 28px));
  padding: 7px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(20, 21, 26, 0.14);
}

.compact-options-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.compact-options-menu button:hover,
.compact-options-menu button.is-active {
  background: var(--surface-muted);
}

.compact-options-menu svg {
  width: 16px;
  height: 16px;
}

/* Review plan */
.review-timeline-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 34px;
  margin-bottom: 10px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.review-timeline-tabs button {
  min-height: 28px;
  color: #686a70;
  font-size: 0.68rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.review-timeline-tabs button.is-active {
  color: #fff;
  background: #050506;
}

.review-summary-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 72px;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.review-summary-card > div {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 9px 5px;
}

.review-summary-card > div + div {
  border-left: 1px solid var(--border);
}

.review-summary-card span {
  color: #5e6066;
  font-size: 0.59rem;
}

.review-summary-card strong {
  font-size: 1rem;
}

.review-summary-card small {
  color: #8a8c93;
  font-size: 0.57rem;
  font-weight: 500;
}

.review-timeline-list {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: auto;
  border: 0;
}

.review-timeline-list h2 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 650;
}

.review-timeline-list h2 span {
  color: #64666d;
  font-weight: 500;
}

.timeline-word {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 55px;
  padding: 8px 11px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
}

.timeline-word:first-of-type {
  border-radius: 10px 10px 0 0;
}

.timeline-word:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
}

.timeline-word span {
  display: grid;
  gap: 4px;
}

.timeline-word strong {
  font-size: 0.72rem;
}

.timeline-word small {
  color: #878990;
  font-size: 0.58rem;
}

.timeline-word em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #575960;
  font-size: 0.58rem;
  font-style: normal;
}

.timeline-word em b {
  width: 4px;
  height: 4px;
  background: #17181b;
  border-radius: 50%;
}

.review-start-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.review-mode-label {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.review-mode-label span,
.review-mode-label strong {
  font-size: 0.61rem;
}

.review-mode-label strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-mode-label button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
}

.review-mode-label svg {
  width: 13px;
  height: 13px;
}

.review-start-button {
  min-height: 34px;
  color: #fff;
  font-size: 0.7rem;
  background: #050506;
  border: 0;
  border-radius: 999px;
}

.review-start-dock > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #94969d;
  font-size: 0.54rem;
  text-align: center;
}

.review-mode-menu .mode-menu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}

.review-mode-menu .mode-menu-title span {
  display: grid;
  gap: 2px;
}

.review-mode-menu .mode-menu-title small {
  color: var(--muted);
  font-size: 0.65rem;
}

/* Manage */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 2px;
}

.metric-tile {
  position: relative;
  display: grid;
  justify-items: start;
  min-height: 132px;
  padding: 15px 13px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.metric-label {
  color: #4e5056;
  font-size: 0.68rem;
  font-weight: 650;
}

.metric-tile > strong {
  align-self: end;
  font-size: 2rem;
  line-height: 1;
}

.metric-tile > small {
  color: #8b8d94;
  font-size: 0.56rem;
}

.metric-icon {
  position: absolute;
  top: 13px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #64666d;
  background: #f0f1f3;
  border-radius: 50%;
}

.metric-icon svg {
  width: 16px;
  height: 16px;
}

.metric-icon.violet {
  color: #8068d6;
  background: #eeeafd;
}

.metric-icon.green {
  color: #37955a;
  background: #e8f5eb;
}

.manage-tags {
  margin-top: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.manage-tags .section-header {
  min-height: 34px;
}

.manage-tags .section-header h2 {
  font-size: 0.76rem;
}

.manage-tags .section-header button {
  color: #6d6f76;
  font-size: 0.65rem;
  background: transparent;
  border: 0;
}

.tag-list {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tag-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 45px;
  padding: 8px 11px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.tag-row:last-child {
  border-bottom: 0;
}

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

.tag-row strong {
  font-size: 0.7rem;
}

.tag-row span {
  color: #6e7077;
  font-size: 0.65rem;
}

/* More */
.more-section {
  margin-top: 8px;
}

.more-section + .more-section {
  margin-top: 17px;
}

.more-section h2 {
  margin: 0 0 8px 3px;
  color: #66686f;
  font-size: 0.65rem;
  font-weight: 600;
}

.more-menu {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.more-menu-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 8px 11px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.more-menu-row:last-child {
  border-bottom: 0;
}

.more-menu-row > svg {
  width: 15px;
  height: 15px;
  color: #909299;
}

.more-menu-row strong {
  font-size: 0.7rem;
  font-weight: 520;
}

.more-menu-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #26272b;
  background: transparent;
  border-radius: 0;
}

.more-menu-icon svg {
  width: 15px;
  height: 15px;
}

.more-menu-icon.danger,
.more-menu-row:has(.danger) {
  color: var(--coral);
}

/* Review session */
.review-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  background: var(--bg);
  border: 0;
  border-radius: 0;
}

.review-dialog::backdrop {
  background: rgba(15, 16, 19, 0.22);
}

#review-session,
.review-session {
  min-height: 100dvh;
}

.review-session {
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.review-topbar {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  min-height: 52px;
}

.review-topbar .icon-button {
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.review-topbar .icon-button svg {
  width: 18px;
  height: 18px;
}

.review-progress {
  font-size: 0.72rem;
  font-weight: 650;
  text-align: center;
}

.review-top-actions {
  display: flex;
  justify-content: flex-end;
}

.review-card {
  min-height: 260px;
  margin-top: 8px;
  padding: 24px 17px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.review-card > h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
}

.review-phonetic {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0 0;
  color: #585a61;
  font-size: 0.72rem;
}

.review-phonetic button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 0;
}

.review-phonetic svg {
  width: 15px;
  height: 15px;
}

.review-definition {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.review-definition p,
.review-definition strong {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
}

.review-definition p + p {
  color: #34353a;
}

.review-stage {
  margin: 26px 0 0;
  color: #95979e;
  font-size: 0.6rem;
}

.review-controls {
  flex: 1;
  display: flex;
  align-items: flex-end;
  margin-top: 12px;
}

.review-controls > .button {
  width: 100%;
  min-height: 52px;
  color: #fff;
  background: #070708;
  border: 0;
  border-radius: 10px;
}

.review-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}

.review-answer {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 126px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.review-answer svg {
  width: 25px;
  height: 25px;
}

.review-answer strong {
  font-size: 0.86rem;
}

.review-answer small {
  color: #8b8d94;
  font-size: 0.58rem;
}

.review-answer.forgot svg {
  color: var(--coral);
  stroke-width: 2.8;
}

.review-answer.remembered svg {
  color: #2d9b50;
  stroke-width: 2.8;
}

/* Shared dialogs */
.sheet-dialog {
  border-color: var(--border);
}

.button-primary {
  background: #09090a;
}

.text-button,
.eyebrow {
  color: var(--ink);
}

.snackbar {
  color: #fff;
  background: #141519;
}

@media (max-width: 380px) {
  .app-page {
    padding-right: 11px;
    padding-left: 11px;
  }

  .record-query-row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 5px;
  }

  .compact-options-menu {
    right: 11px;
  }
}

@media (min-width: 900px) {
  body {
    background: #eef0f3;
  }

  #app {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 100vh;
    background: #fbfbfc;
  }

  #view {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 100vh;
    padding: 0;
    background: #fbfbfc;
    border-left: 1px solid var(--border);
  }

  .bottom-nav {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 112px;
    height: 100vh;
    min-height: 640px;
    margin: 0;
    padding: 18px 11px;
    background: #f6f6f8;
    border: 0;
    box-shadow: none;
  }

  .side-brand {
    display: grid;
    gap: 3px;
    min-height: 70px;
    padding: 3px 4px;
  }

  .side-brand strong {
    font-size: 1.08rem;
  }

  .side-brand span {
    color: #55575e;
    font-size: 0.56rem;
  }

  .nav-item,
  .side-settings {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-rows: 1fr;
    place-items: center start;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    color: #5c5e65;
    background: transparent;
    border: 0;
    border-radius: 8px;
  }

  .nav-item + .nav-item {
    margin-top: 4px;
  }

  .nav-item svg,
  .side-settings svg {
    width: 15px;
    height: 15px;
  }

  .nav-item span,
  .side-settings span {
    font-size: 0.66rem;
    font-weight: 500;
  }

  .nav-item.is-active {
    color: #08090a;
    background: #e9e9ed;
  }

  .side-settings {
    display: grid;
    margin-top: auto;
  }

  .app-page {
    min-height: 100vh;
    padding: 26px 30px 30px;
  }

  .page-header {
    min-height: 42px;
    margin-bottom: 12px;
  }

  .page-header h1,
  .desktop-screen-title {
    font-size: 1.42rem;
  }

  .capture-screen {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    gap: 12px 26px;
  }

  .product-header {
    display: none;
  }

  .desktop-screen-title {
    display: block;
    grid-column: 1 / -1;
    margin: 0 0 2px;
  }

  .record-stage {
    grid-column: 1;
    min-height: 430px;
  }

  .record-empty,
  .record-result {
    align-self: stretch;
  }

  .record-result {
    align-self: start;
  }

  .record-query-panel {
    grid-column: 1;
    margin: 0;
  }

  .library-screen {
    padding-right: 28px;
    padding-left: 28px;
  }

  .desktop-add-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    margin-left: 10px;
    padding: 0 15px;
    color: #fff;
    font-size: 0.66rem;
    background: #050506;
    border: 0;
    border-radius: 999px;
  }

  .desktop-add-button svg {
    width: 14px;
    height: 14px;
  }

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

  .library-filter-bar {
    margin: 12px 0;
  }

  .desktop-more-filter {
    display: inline-flex !important;
    margin-left: auto;
    background: #fff !important;
    border: 1px solid var(--border) !important;
  }

  .library-list-wrap {
    overflow: hidden;
  }

  .mobile-word-list {
    display: none;
  }

  .desktop-word-table {
    display: block;
    width: 100%;
    overflow: auto;
  }

  .word-table-row {
    display: grid;
    grid-template-columns: 30px minmax(100px, 0.8fr) minmax(210px, 1.45fr) minmax(120px, 0.75fr) 90px 88px 24px;
    align-items: center;
    min-width: 870px;
    min-height: 54px;
    padding: 0 10px;
    color: #505259;
    font-size: 0.66rem;
    border-bottom: 1px solid var(--border);
  }

  .word-table-row:not(.word-table-head) {
    cursor: pointer;
  }

  .word-table-row:last-child {
    border-bottom: 0;
  }

  .word-table-head {
    min-height: 42px;
    color: #37383d;
    font-weight: 650;
    background: #fafafb;
  }

  .word-table-row strong,
  .word-table-row span,
  .word-table-row time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .word-table-row input {
    width: 14px;
    height: 14px;
  }

  .word-table-row svg {
    width: 15px;
    height: 15px;
  }

  .library-footer {
    padding-top: 12px;
  }

  .review-dashboard,
  .manage-screen,
  .more-screen {
    max-width: 980px;
  }

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

  .metric-tile {
    min-height: 145px;
  }

  .more-screen {
    max-width: 680px;
  }

  .review-dialog {
    width: 430px;
    height: min(780px, calc(100vh - 40px));
    max-height: calc(100vh - 40px);
    margin: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
  }

  #review-session,
  .review-session {
    min-height: 100%;
  }
}

body {
  overflow: hidden;
}

#view {
  height: 100dvh;
  overflow: hidden;
}

.record-result .example {
  padding-left: 0;
  border-left: 0;
}

.library-filter-bar .desktop-more-filter {
  display: none;
}

.metric-tile {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
}

.review-card {
  align-self: stretch;
  width: 100%;
}

@media (min-width: 900px) {
  .library-filter-bar .desktop-more-filter {
    display: inline-flex;
  }
}

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

/* Video-led mobile shell */
:root {
  --bg: #f2f3f7;
  --surface: #ffffff;
  --surface-muted: #eceef2;
  --ink: #111318;
  --muted: #777b85;
  --subtle: #a5a9b2;
  --border: #e1e3e8;
  --blue: #087ff5;
  --blue-soft: #e8f3ff;
  --green: #12a88b;
  --green-soft: #e1f7f1;
  --coral: #f0645a;
  --coral-soft: #ffebe8;
  --amber: #f3a21a;
  --amber-soft: #fff2d9;
  --shadow: 0 14px 34px rgba(25, 31, 43, 0.12);
}

html,
body,
#app {
  min-height: 100%;
  background: var(--bg);
}

#app {
  position: relative;
  overflow-x: hidden;
}

#view {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 0 calc(76px + env(safe-area-inset-bottom));
}

.bottom-nav {
  min-height: 70px;
  padding: 7px 8px calc(5px + env(safe-area-inset-bottom));
  background: rgba(248, 248, 251, 0.98);
  border-top-color: #dddfe5;
}

.nav-item {
  grid-template-rows: 27px 18px;
  min-height: 54px;
  color: #8e9199;
}

.nav-item.is-active {
  color: var(--ink);
}

.nav-item.is-active svg {
  stroke-width: 2.7;
}

.text-button {
  min-height: 44px;
  padding: 6px 4px;
  color: var(--ink);
  font-weight: 650;
  background: transparent;
  border: 0;
}

.icon-button.is-plain {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

.header-spacer {
  width: 44px;
  height: 44px;
}

/* Capture */
.capture-screen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  height: calc(100vh - 76px - env(safe-area-inset-bottom));
  height: calc(100dvh - 76px - env(safe-area-inset-bottom));
  padding: calc(18px + env(safe-area-inset-top)) 22px 14px;
}

.dictionary-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 60px;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(225, 227, 232, 0.7);
  border-radius: 28px;
  box-shadow: 0 13px 30px rgba(32, 40, 58, 0.11);
}

.dictionary-card-body {
  min-height: 0;
  overflow: auto;
}

.dictionary-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100%;
  min-height: 280px;
  padding: 28px;
  color: var(--subtle);
  text-align: center;
}

.dictionary-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.dictionary-empty p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.65;
}

.spin {
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dictionary-card-actions {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  padding: 0 12px;
  border-top: 1px solid rgba(225, 227, 232, 0.65);
}

.card-tool,
.dictionary-manager {
  min-height: 48px;
  background: transparent;
  border: 0;
}

.card-tool {
  display: grid;
  place-items: center;
}

.card-tool svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.5;
}

.card-tool:disabled {
  color: #c4c6cc;
}

.dictionary-manager {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dictionary-result {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 28px 28px 36px;
}

.dictionary-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 52px;
}

.dictionary-source {
  margin: 0;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 750;
}

.dictionary-result h2 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.6rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dictionary-result .phonetic {
  margin: 0;
}

.dictionary-result .definition {
  font-size: 1.05rem;
  line-height: 1.65;
}

.recorded-stamp {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: var(--coral);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: rotate(-8deg);
}

.recorded-stamp small {
  font-size: 0.66rem;
  font-weight: 700;
}

.capture-search {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 62px;
  gap: 10px;
  align-items: center;
}

.voice-button {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(8, 127, 245, 0.23);
}

.voice-button svg {
  width: 24px;
  height: 24px;
}

.capture-input-shell input {
  min-height: 56px;
  padding-left: 44px;
  padding-right: 42px;
  background: var(--surface);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 6px 18px rgba(35, 43, 59, 0.08);
}

.search-submit {
  position: absolute;
  top: 50%;
  left: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--subtle);
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

.search-submit svg {
  position: static;
  width: 19px;
  height: 19px;
  transform: none;
}

.capture-input-shell input:focus {
  border: 0;
  box-shadow: 0 0 0 3px rgba(8, 127, 245, 0.14), 0 6px 18px rgba(35, 43, 59, 0.08);
}

.input-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

.input-clear svg {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
}

.paste-button {
  min-height: 56px;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--surface);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 6px 18px rgba(35, 43, 59, 0.08);
}

/* Shared screen chrome */
.screen-toolbar,
.manage-toolbar,
.review-dashboard-header {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: center;
  min-height: calc(66px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: rgba(255, 255, 255, 0.97);
}

.screen-toolbar h1,
.manage-toolbar h1,
.review-dashboard-header h1 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  text-align: center;
}

.toolbar-actions,
.manage-toolbar > div {
  display: flex;
  justify-content: flex-end;
}

.toolbar-actions .icon-button,
.manage-toolbar .icon-button {
  width: 40px;
  min-width: 40px;
  height: 44px;
}

.floating-menu {
  position: absolute;
  z-index: 25;
  display: grid;
  min-width: 238px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(225, 227, 232, 0.9);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(24, 30, 43, 0.2);
  backdrop-filter: blur(18px);
}

.floating-menu button {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.floating-menu button.is-active {
  color: var(--blue);
  background: var(--blue-soft);
}

/* Library */
.library-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) 56px;
  height: calc(100vh - 76px - env(safe-area-inset-bottom));
  height: calc(100dvh - 76px - env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--surface);
}

.library-menu {
  top: calc(58px + env(safe-area-inset-top));
  right: 14px;
}

.library-menu > p {
  margin: 4px 10px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.library-search-shell {
  margin: 6px 16px 12px;
}

.library-search-shell input {
  min-height: 52px;
  background: #f0f1f4;
  border: 0;
  border-radius: 12px;
}

.library-search-shell input:focus {
  border: 0;
}

.library-list-wrap {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--border);
}

.library-list-wrap .word-list {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.word-row {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 44%);
  min-height: 64px;
  padding: 11px 16px;
}

.word-row > strong,
.word-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-row > strong {
  font-size: 1.02rem;
}

.word-row > span {
  color: var(--subtle);
  font-size: 0.9rem;
  text-align: right;
}

.library-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.library-footer button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
}

.library-footer button:last-child {
  justify-self: end;
}

.library-footer button.is-active {
  color: var(--blue);
}

.library-footer svg {
  width: 17px;
  height: 17px;
}

.library-footer strong {
  font-size: 0.92rem;
}

/* Review dashboard */
.review-dashboard {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  height: calc(100vh - 76px - env(safe-area-inset-bottom));
  height: calc(100dvh - 76px - env(safe-area-inset-bottom));
  overflow: hidden;
}

.review-dashboard-header {
  grid-template-columns: minmax(0, 1fr) 70px;
  background: var(--surface);
}

.review-dashboard-header h1 {
  text-align: left;
}

.review-dashboard-header .text-button {
  justify-self: end;
}

.review-mode-menu {
  top: calc(64px + env(safe-area-inset-top));
  right: 14px;
  width: min(320px, calc(100% - 28px));
}

.mode-menu-title {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
}

.mode-menu-title span,
.mode-menu-title strong,
.mode-menu-title small {
  display: block;
}

.mode-menu-title small {
  margin-top: 3px;
  color: var(--muted);
}

.review-summary-card {
  position: relative;
  min-height: 178px;
  margin: 10px 22px 0;
  padding: 28px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(112deg, #2caea0 0%, #3e90d6 54%, #f17a6f 100%);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 14px 30px rgba(43, 114, 134, 0.18);
}

.review-summary-card p,
.review-summary-card strong {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0;
}

.review-summary-card p {
  font-size: 0.9rem;
  opacity: 0.82;
}

.review-summary-card strong {
  margin-top: 20px;
  font-size: 3.6rem;
  font-weight: 500;
  line-height: 1;
}

.review-line {
  position: absolute;
  right: -8%;
  bottom: 20px;
  left: -8%;
  height: 58px;
  border-top: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.review-timeline-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
}

.review-timeline-tabs button {
  min-height: 56px;
  color: var(--subtle);
  font-weight: 750;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
}

.review-timeline-tabs button.is-active {
  color: var(--ink);
  border-bottom-color: var(--green);
}

.review-timeline-list {
  min-height: 0;
  padding: 12px 22px 110px;
  overflow: auto;
}

.timeline-count {
  margin: 0 0 12px;
  color: var(--subtle);
  font-size: 0.86rem;
  text-align: center;
}

.timeline-word {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 82px;
  margin-bottom: 10px;
  padding: 14px 18px;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(31, 38, 52, 0.04);
}

.timeline-word span,
.timeline-word strong,
.timeline-word small {
  display: block;
}

.timeline-word small {
  margin-top: 7px;
  color: var(--subtle);
}

.timeline-word em {
  color: var(--green);
  font-size: 0.82rem;
  font-style: normal;
}

.timeline-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--subtle);
}

.timeline-empty svg {
  width: 32px;
  height: 32px;
}

.review-start-dock {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 10px;
}

.review-start-button,
.schedule-shortcut {
  min-height: 54px;
  color: #ffffff;
  background: linear-gradient(100deg, var(--green), #3c94d8 58%, var(--coral));
  border: 0;
  box-shadow: 0 11px 24px rgba(49, 128, 149, 0.2);
}

.review-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  border-radius: 27px;
}

.schedule-shortcut {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

/* Manage */
.manage-screen {
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  padding-bottom: 22px;
}

.manage-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-right: 18px;
  padding-left: 22px;
  background: transparent;
}

.manage-toolbar h1 {
  text-align: left;
}

.metric-grid {
  padding: 10px 20px 18px;
}

.metric-tile {
  min-height: 112px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(31, 38, 52, 0.04);
}

.metric-tile > span:last-child {
  display: grid;
  justify-items: end;
  margin: 0;
}

.metric-tile > span:last-child > strong {
  color: var(--ink);
  font-size: 2rem;
}

.metric-tile > span:last-child > span {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.metric-icon {
  color: #ffffff;
  background: var(--blue);
  border-radius: 50%;
}

.metric-icon.blue {
  color: #ffffff;
  background: var(--blue);
}

.metric-icon.amber {
  color: #ffffff;
  background: var(--amber);
}

.metric-icon.coral {
  color: #ffffff;
  background: var(--coral);
}

.metric-icon.slate {
  color: #ffffff;
  background: #676c76;
}

.manage-tags {
  padding: 0 20px;
}

.manage-tags .section-header {
  min-height: 50px;
  padding: 0 8px;
}

.manage-tags .section-header h2 {
  font-size: 1.45rem;
}

.manage-tags .section-header > span {
  color: var(--muted);
}

.manage-tags .tag-list {
  border: 0;
  border-radius: 18px;
}

.tag-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 66px;
  padding: 8px 16px;
}

.tag-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff !important;
  background: linear-gradient(140deg, var(--coral), #3d9ed2);
  border-radius: 9px;
  transform: rotate(45deg);
}

.tag-icon svg {
  width: 18px;
  height: 18px;
  transform: rotate(-45deg);
}

/* More */
.more-screen {
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  background: #263b43;
}

.more-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 230px;
  padding: calc(24px + env(safe-area-inset-top)) 34px 80px;
  color: #ffffff;
}

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

.brand-mark > svg {
  width: 42px;
  height: 42px;
  color: #45c9b1;
}

.brand-mark span,
.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 1.35rem;
}

.brand-mark small {
  margin-top: 4px;
  color: #bdd1d4;
  font-size: 0.68rem;
  font-weight: 800;
}

.more-settings-button {
  color: #ffffff;
  background: transparent;
  border: 0;
}

.more-settings-button svg {
  width: 34px;
  height: 34px;
}

.more-menu {
  margin-top: -54px;
  padding: 22px 26px 30px;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
}

.more-menu-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 8px 4px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.more-menu-row:last-child {
  border-bottom: 0;
}

.more-menu-row > svg {
  color: var(--subtle);
}

.more-menu-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  border-radius: 50%;
}

.more-menu-icon.blue {
  background: var(--blue);
}

.more-menu-icon.lime {
  background: #8ebc12;
}

.more-menu-icon.teal {
  background: var(--green);
}

.more-menu-icon.coral {
  background: var(--coral);
}

.more-menu-icon.indigo {
  background: #6271a7;
}

.more-menu-icon.orange {
  background: #f49a4f;
}

.more-menu-icon.olive {
  background: #7f9d16;
}

/* Feature sheets */
.feature-dialog {
  width: min(100%, 620px);
  height: min(92vh, 920px);
  max-height: 92vh;
  margin: auto auto 0;
  border-radius: 24px 24px 0 0;
}

.feature-dialog-header {
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: center;
  min-height: 64px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.feature-dialog-header h2 {
  flex: 1;
  font-size: 1.1rem;
  text-align: center;
}

.dictionary-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dictionary-source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 14px;
  min-height: 138px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(31, 38, 52, 0.06);
}

.dictionary-source-card h3,
.dictionary-source-card p {
  margin: 0;
}

.dictionary-source-card h3 {
  margin-top: 8px;
  font-size: 1rem;
}

.dictionary-source-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.source-badge {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
}

.dictionary-source-card button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 64px;
  padding: 8px;
  color: var(--blue);
  font-size: 0.72rem;
  background: var(--blue-soft);
  border: 0;
  border-radius: 10px;
}

.dictionary-source-card button.is-installed {
  color: var(--green);
  background: var(--green-soft);
}

.settings-content {
  padding-bottom: 26px;
  background: var(--bg);
}

.settings-group {
  margin: 0 0 18px;
  background: var(--surface);
}

.settings-group-title {
  margin: 0;
  padding: 22px 18px 8px;
  color: var(--muted);
  font-size: 0.76rem;
  background: var(--bg);
}

.settings-switch-row,
.settings-link-row,
.settings-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 18px;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border);
}

.settings-link-row {
  text-align: left;
}

.settings-link-row strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--blue);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-value-row input[type="number"] {
  width: 74px;
  min-height: 40px;
  text-align: right;
  background: transparent;
  border: 0;
}

.settings-value-row input[type="range"] {
  width: 130px;
}

/* Review session additions */
.audio-prompt {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(8, 127, 245, 0.22);
}

.audio-prompt svg {
  width: 36px;
  height: 36px;
}

.review-card .listening-title {
  font-size: 1.6rem;
}

.review-card .meaning-prompt {
  font-size: clamp(1.45rem, 7vw, 2.4rem);
  line-height: 1.4;
}

@media (max-width: 380px) {
  .capture-screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .capture-search {
    grid-template-columns: 52px minmax(0, 1fr) 56px;
    gap: 7px;
  }

  .voice-button {
    width: 52px;
    height: 52px;
  }

  .capture-input-shell input,
  .paste-button {
    min-height: 52px;
  }

  .screen-toolbar {
    grid-template-columns: 70px minmax(0, 1fr) 82px;
  }

  .review-summary-card {
    min-height: 152px;
    margin-right: 14px;
    margin-left: 14px;
    padding: 22px;
  }

  .review-timeline-list {
    padding-right: 14px;
    padding-left: 14px;
  }
}

/* Keep the design layer authoritative over the legacy component rules above. */
.capture-screen {
  grid-template-rows: 54px minmax(310px, 1fr) auto;
  gap: 12px;
  width: 100%;
  height: calc(100dvh - 70px - env(safe-area-inset-bottom));
  min-height: 0;
  padding: calc(12px + env(safe-area-inset-top)) 14px 16px;
}

.library-screen,
.review-dashboard {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100dvh - 70px - env(safe-area-inset-bottom));
  min-height: 0;
  padding: calc(12px + env(safe-area-inset-top)) 14px 16px;
  overflow: hidden;
  background: var(--bg);
}

.library-search-shell {
  margin: 0;
}

.library-search-shell input {
  min-height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.library-list-wrap {
  min-height: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.review-summary-card {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 72px;
  margin: 0 0 12px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.review-summary-card strong {
  margin: 0;
  font-size: 1rem;
}

.review-timeline-tabs {
  min-height: 34px;
  margin-bottom: 10px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.review-timeline-tabs button {
  min-height: 28px;
  color: #686a70;
  font-size: 0.68rem;
  font-weight: 500;
  border: 0;
  border-radius: 999px;
}

.review-timeline-tabs button.is-active {
  color: #fff;
  background: #050506;
  border: 0;
}

.review-timeline-list {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: auto;
}

.timeline-word {
  min-height: 55px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.timeline-word:first-of-type {
  border-radius: 10px 10px 0 0;
}

.timeline-word:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
}

.timeline-word small {
  margin-top: 0;
}

.timeline-word em {
  color: #575960;
  font-size: 0.58rem;
}

.review-start-dock {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding: 7px 8px;
}

.review-start-button {
  min-height: 34px;
  color: #fff;
  font-size: 0.7rem;
  background: #050506;
  border-radius: 999px;
  box-shadow: none;
}

.manage-screen,
.more-screen {
  min-height: calc(100dvh - 70px - env(safe-area-inset-bottom));
  padding: calc(12px + env(safe-area-inset-top)) 14px 16px;
  background: var(--bg);
}

.metric-grid {
  padding: 0;
}

.metric-tile {
  min-height: 132px;
  padding: 15px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.metric-icon,
.metric-icon.slate {
  color: #64666d;
  background: #f0f1f3;
}

.metric-tile > strong {
  color: var(--ink);
  font-size: 2rem;
}

.manage-tags {
  margin-top: 16px;
  padding: 0;
}

.manage-tags .section-header {
  min-height: 34px;
  padding: 0;
}

.manage-tags .section-header h2 {
  font-size: 0.76rem;
}

.manage-tags .tag-list {
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tag-row {
  grid-template-columns: 20px minmax(0, 1fr) auto 16px;
  min-height: 45px;
  padding: 8px 11px;
}

.more-menu {
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.more-menu-row {
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 8px;
  min-height: 46px;
  padding: 8px 11px;
}

.more-menu-icon {
  width: 22px;
  height: 22px;
  color: #26272b;
  background: transparent;
  border-radius: 0;
}

@media (min-width: 900px) {
  .capture-screen {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    gap: 12px 26px;
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 26px 30px 30px;
  }

  .library-screen,
  .review-dashboard,
  .manage-screen,
  .more-screen {
    height: auto;
    min-height: 100vh;
    padding: 26px 30px 30px;
  }

  .library-screen {
    display: flex;
  }

  .review-dashboard {
    display: flex;
    max-width: 980px;
  }

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