/* Luma V6: polished library navigation and a full learning-board workspace. */

/* Keep block controls in a real gutter so they never cover editor content. */
#blockEditor > .block-row,
#blockEditor > .block-row.active,
#blockEditor > .block-row.multi-selected,
#blockEditor > .block-row:not(.type-bullet):not(.type-numbered):not(.type-quote):not(.type-callout) {
  box-sizing: border-box;
  padding-right: 0 !important;
  padding-left: 54px !important;
  box-shadow: none !important;
}

#blockEditor > .block-row.type-bullet,
#blockEditor > .block-row.type-numbered { padding-left: 76px !important; }
#blockEditor > .block-row.type-quote { padding-left: 68px !important; }
#blockEditor > .block-row.type-callout { padding-left: 70px !important; }
#blockEditor > .block-row > .block-handle { right: auto !important; left: 2px !important; z-index: 2; }
#blockEditor > .block-row > .list-marker { left: 56px !important; }
#blockEditor > .block-row > .list-marker.numbered { left: 53px !important; }
#blockEditor > .block-row.type-quote::before { left: 56px !important; }
#blockEditor > .block-row > .special-block { min-width: 0; margin-left: 0; }

/* Refined document library. */
.main-panel { position: relative; }

@media (min-width: 921px) {
  .app-shell { grid-template-columns: 256px minmax(0, 1fr) 236px; }
  .app-shell.learning-view { grid-template-columns: 256px minmax(0, 1fr) 0; }
}

.sidebar {
  background: color-mix(in srgb, var(--chrome-bg) 96%, var(--surface));
}

.sidebar .brand-row {
  height: 58px;
  padding-inline: 16px 12px;
}

.sidebar .new-note-button {
  height: 40px;
  margin: 7px 12px 10px;
  border-radius: 10px;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 20%, transparent);
}

.sidebar .quick-actions { padding: 0 12px 8px; }
.sidebar .quick-actions button { height: 34px; border-radius: 8px; }
.sidebar .search-wrap { margin: 0 12px 10px; }
.sidebar .search-wrap input { height: 38px; padding-left: 34px; border-radius: 10px; }
.sidebar .search-wrap svg { left: 11px; }

.sidebar .library-heading {
  padding: 11px 14px 7px 17px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-variation-settings: "wght" 650;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.sidebar .note-list {
  padding: 0 9px 14px;
}

.sidebar .tree-group {
  height: 34px;
  margin-top: 2px;
  padding-inline: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.sidebar .tree-group.shared-group {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.sidebar .tree-folder {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, #d89219 12%, transparent);
  color: #bd7b0b;
  font-size: 11px;
}

.sidebar .shared-folder {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar .note-item {
  height: 36px;
  margin: 2px 0;
  padding-right: 9px;
  border-radius: 9px;
  font-size: 12px;
}

.sidebar .note-item::before { left: 19px; }
.sidebar .note-item .note-icon { color: var(--text-tertiary); }

.sidebar .note-item.active {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 78%, transparent);
  color: var(--accent);
}

.sidebar .note-item.active .note-icon { color: var(--accent); }
.sidebar .group-empty { padding-block: 7px 10px; color: var(--text-tertiary); }

.learning-nav {
  display: grid;
  width: calc(100% - 18px);
  min-height: 58px;
  flex: 0 0 auto;
  grid-template-columns: 34px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 9px;
  margin: 0 9px 10px;
  padding: 7px 8px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  text-align: left;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.learning-nav:hover,
.learning-nav.active {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.learning-nav-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #7457ff, #3c9df2);
  color: #fff;
  box-shadow: 0 5px 12px rgba(80, 101, 245, 0.22);
}

.learning-nav-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-nav > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.learning-nav strong { font-size: 12px; font-variation-settings: "wght" 650; font-weight: 650; }
.learning-nav small { overflow: hidden; color: var(--text-tertiary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.learning-nav em { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; }
.learning-nav-arrow { width: 16px; height: 16px; color: var(--text-tertiary); stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-nav.active .learning-nav-arrow { color: var(--accent); transform: translateX(2px); }

/* Full learning workspace. */
.learning-page {
  position: absolute;
  z-index: 24;
  inset: 52px 0 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 30%),
    var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.learning-page[hidden] { display: none; }

.learning-page-inner {
  width: min(100%, 1280px);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 56px) clamp(24px, 4.5vw, 68px) 80px;
}

.learning-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 26px;
}

.learning-hero-copy { display: flex; align-items: flex-start; gap: 15px; }
.learning-hero-copy > div { display: grid; gap: 5px; }
.learning-hero-copy > div > span { color: var(--accent); font-size: 10px; font-variation-settings: "wght" 700; font-weight: 700; letter-spacing: 0.14em; }
.learning-hero h1 { margin: 0; color: var(--text); font-family: var(--font-document); font-size: clamp(34px, 4vw, 52px); font-variation-settings: "wght" 740; font-weight: 740; letter-spacing: -0.045em; line-height: 1.1; }
.learning-hero p { margin: 2px 0 0; color: var(--text-tertiary); font-size: 13px; }

.learning-back {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.learning-back:hover { border-color: var(--border); background: var(--surface-hover); color: var(--text); }
.learning-back svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.learning-stats { display: flex; flex: 0 0 auto; gap: 8px; }
.learning-stats div { display: grid; min-width: 88px; gap: 1px; padding: 10px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035); }
.learning-stats strong { color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.learning-stats span { color: var(--text-tertiary); font-size: 10px; }

.learning-create-form {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 5px 0 34px;
  padding: 8px 9px 8px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.learning-create-icon { color: var(--accent); font-size: 21px; line-height: 1; }
.learning-create-form input { width: 100%; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--text); font: 13px var(--font-ui); }
.learning-create-form input::placeholder { color: var(--text-tertiary); }
.learning-create-form button { height: 44px; padding: 0 18px; cursor: pointer; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-variation-settings: "wght" 650; font-weight: 650; box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 20%, transparent); }
.learning-create-form button:hover { background: var(--accent-hover); }
.learning-create-form button:disabled { cursor: wait; opacity: 0.55; }

.learning-page-toolbar { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.learning-page-toolbar > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.learning-page-toolbar strong { color: var(--text); font-size: 15px; font-variation-settings: "wght" 670; font-weight: 670; }
.learning-page-toolbar span { color: var(--text-tertiary); font-size: 10px; }
.learning-filters { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-soft); }
.learning-filters button { height: 30px; padding: 0 12px; cursor: pointer; border: 0; border-radius: 7px; background: transparent; color: var(--text-tertiary); font-size: 10px; }
.learning-filters button:hover { color: var(--text); }
.learning-filters button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08); font-weight: 620; }

.learning-page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

.learning-card { min-width: 0; }
.learning-card-cover { position: relative; aspect-ratio: 1.08; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: linear-gradient(150deg, #22242b, #0f1015); box-shadow: 0 12px 28px rgba(8, 12, 24, .18); transition: transform .2s ease, box-shadow .2s ease; }
.learning-card:hover .learning-card-cover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(8, 12, 24, .24); }
.learning-card-cover::before { position: absolute; top: -32%; left: 16%; width: 68%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 12px rgba(255,255,255,.035), 0 0 0 28px rgba(255,255,255,.025), 0 0 0 48px rgba(255,255,255,.018); content: ""; }
.learning-card[data-tone="1"] .learning-card-cover { background: linear-gradient(145deg, #2b234d, #141425 62%, #0d0e13); }
.learning-card[data-tone="2"] .learning-card-cover { background: linear-gradient(145deg, #193d43, #102226 62%, #0c1012); }
.learning-card[data-tone="3"] .learning-card-cover { background: linear-gradient(145deg, #4a2720, #201614 62%, #0f0e0e); }
.learning-card[data-tone="4"] .learning-card-cover { background: linear-gradient(145deg, #263959, #131c2b 62%, #0c0f14); }
.learning-card.done .learning-card-cover { filter: saturate(.45); opacity: .64; }

.learning-cover-mark { position: absolute; top: 17px; left: 17px; display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 10px; color: rgba(255,255,255,.9); font-size: 15px; }
.learning-cover-mark svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.learning-cover-disc { position: absolute; top: 50%; left: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -42%); border: 4px solid rgba(255,255,255,.88); border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,.04); }
.learning-cover-disc::before { position: absolute; top: 50%; left: 50%; width: 33%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #ff4d3f; box-shadow: 0 0 0 5px rgba(255,77,63,.13); content: ""; }
.learning-cover-disc::after { position: absolute; top: 50%; left: 50%; width: 6px; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #17181e; content: ""; }
.learning-card.done .learning-cover-disc::before { background: #52c985; }

.learning-card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.learning-card:hover .learning-card-actions, .learning-card:focus-within .learning-card-actions { opacity: 1; }
.learning-card-actions button { display: grid; width: 30px; height: 30px; cursor: pointer; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(11,12,17,.62); color: rgba(255,255,255,.82); backdrop-filter: blur(10px); }
.learning-card-actions button:hover { background: rgba(11,12,17,.9); color: #fff; }
.learning-card-actions button:focus-visible, .learning-check:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 2px; }
.learning-card-actions svg, .learning-check svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.learning-check { position: absolute; right: 14px; bottom: 14px; display: grid; width: 32px; height: 32px; cursor: pointer; place-items: center; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; background: rgba(12,14,20,.45); color: transparent; font-size: 15px; backdrop-filter: blur(8px); }
.learning-check:hover { background: rgba(255,255,255,.16); }
.learning-card.done .learning-check { border-color: #5ee394; background: #2eb872; color: #fff; }

.learning-card-copy { display: grid; gap: 4px; padding: 13px 2px 0; }
.learning-card-title { display: -webkit-box; overflow: hidden; color: var(--text); font-size: 14px; font-variation-settings: "wght" 650; font-weight: 650; line-height: 1.42; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.learning-card.done .learning-card-title { color: var(--text-tertiary); text-decoration: line-through; }
.learning-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-tertiary); font-size: 10px; }
.learning-card-status { color: var(--accent); }
.learning-card.done .learning-card-status { color: #2eb872; }
.learning-card-edit { width: 100%; min-height: 64px; resize: none; padding: 9px; border: 1px solid var(--accent); border-radius: 9px; background: var(--surface); color: var(--text); font: 12px/1.5 var(--font-ui); box-shadow: 0 0 0 3px var(--accent-soft); }

.learning-page-empty { display: grid; min-height: 270px; place-content: center; justify-items: center; color: var(--text-tertiary); text-align: center; }
.learning-page-empty[hidden] { display: none; }
.learning-page-empty > span { display: grid; width: 56px; height: 56px; margin-bottom: 12px; place-items: center; border-radius: 18px; background: linear-gradient(145deg, #7457ff, #3c9df2); color: #fff; box-shadow: 0 12px 24px rgba(80,101,245,.22); font-size: 24px; }
.learning-page-empty > span svg { width: 27px; height: 27px; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.learning-page-empty strong { color: var(--text); font-size: 15px; }
.learning-page-empty p { margin: 6px 0 0; font-size: 11px; }
.learning-error { margin: 15px 0 0; color: var(--danger); font-size: 11px; text-align: center; }
.learning-error:empty { display: none; }

.app-shell.learning-view .topbar-actions { visibility: hidden; pointer-events: none; }
.app-shell.learning-view .outline-panel { visibility: hidden; }

@media (max-width: 1180px) {
  .learning-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .learning-page { top: 52px; }
  .learning-page-inner { padding-inline: clamp(20px, 5vw, 44px); }
}

@media (max-width: 720px) {
  .learning-hero { align-items: flex-start; flex-direction: column; }
  .learning-stats { width: 100%; }
  .learning-stats div { flex: 1; }
  .learning-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-page-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  #blockEditor > .block-row,
  #blockEditor > .block-row.active,
  #blockEditor > .block-row.multi-selected,
  #blockEditor > .block-row:not(.type-bullet):not(.type-numbered):not(.type-quote):not(.type-callout) { padding-left: 40px !important; }
  #blockEditor > .block-row.type-bullet,
  #blockEditor > .block-row.type-numbered { padding-left: 58px !important; }
  #blockEditor > .block-row.type-quote { padding-left: 52px !important; }
  #blockEditor > .block-row.type-callout { padding-left: 62px !important; }
  #blockEditor > .block-row.type-callout > .callout-mark { left: 32px !important; width: 24px; height: 24px; }
  #blockEditor > .block-row > .list-marker,
  #blockEditor > .block-row > .list-marker.numbered { left: 39px !important; }
  #blockEditor > .block-row.type-quote::before { left: 42px !important; }
  .learning-page-inner { padding: 26px 16px 60px; }
  .learning-hero-copy { gap: 9px; }
  .learning-back { width: 44px; height: 44px; flex-basis: 44px; }
  .learning-hero h1 { font-size: 32px; }
  .learning-create-form { grid-template-columns: 18px minmax(0,1fr); padding: 7px 12px; }
  .learning-create-form button { grid-column: 1 / -1; width: 100%; }
  .learning-page-grid { gap: 18px 12px; }
  .learning-card-cover { border-radius: 15px; }
  .learning-card-title { font-size: 12px; }
}

@media (hover: none) {
  .learning-card-actions { opacity: 1; }
  .learning-card-actions button { width: 44px; height: 44px; }
  .learning-check { width: 44px; height: 44px; }
  .learning-filters button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .learning-nav, .learning-card-cover, .learning-card-actions { transition: none; }
}

/* V6.2: quiet white learning cards with note links and a focused editor dialog. */
.learning-hero-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.learning-add-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.learning-add-button:hover { background: var(--accent-hover); box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 26%, transparent); transform: translateY(-1px); }
.learning-add-button svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.learning-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(15, 23, 42, .055);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.learning-card:hover { border-color: color-mix(in srgb, var(--accent) 26%, var(--border)); box-shadow: 0 12px 30px rgba(15, 23, 42, .09); transform: translateY(-2px); }
.learning-card.done { opacity: .72; }
.learning-card-head { display: flex; min-height: 34px; align-items: center; gap: 8px; }
.learning-card-state { padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 650; }
.learning-card.done .learning-card-state { background: color-mix(in srgb, #32b879 12%, var(--surface)); color: #23855a; }
.learning-card-actions { position: static; display: flex; gap: 2px; margin-left: auto; opacity: 1; transition: none; }
.learning-card-actions button { display: grid; width: 34px; height: 34px; cursor: pointer; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-tertiary); backdrop-filter: none; }
.learning-card-actions button:hover { background: var(--surface-hover); color: var(--text); }
.learning-card-actions button:last-child:hover { background: var(--danger-bg); color: var(--danger); }
.learning-card-actions button:focus-visible, .learning-check:focus-visible, .learning-note-link:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.learning-card-actions svg, .learning-check svg, .learning-note-link svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.learning-check { position: static; display: grid; width: 32px; height: 32px; flex: 0 0 32px; cursor: pointer; place-items: center; border: 1.5px solid var(--border); border-radius: 9px; background: var(--surface); color: transparent; font-size: 0; backdrop-filter: none; }
.learning-check:hover { border-color: var(--accent); background: var(--accent-soft); }
.learning-card.done .learning-check { border-color: #2eb872; background: #2eb872; color: #fff; }
.learning-card-title { display: -webkit-box; min-height: 52px; margin: 19px 0 18px; overflow: hidden; color: var(--text); font-family: var(--font-document); font-size: 17px; font-variation-settings: "wght" 680; font-weight: 680; line-height: 1.52; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.learning-card.done .learning-card-title { color: var(--text-tertiary); text-decoration: line-through; }
.learning-note-link { display: flex; width: 100%; min-height: 40px; align-items: center; gap: 8px; margin-top: auto; padding: 0 10px; cursor: pointer; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-soft); color: var(--text-secondary); text-align: left; }
.learning-note-link:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); background: var(--accent-soft); color: var(--accent); }
.learning-note-link.empty { border-style: dashed; color: var(--text-tertiary); }
.learning-note-link span { min-width: 0; flex: 1; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.learning-note-link svg:last-child { width: 14px; height: 14px; flex: 0 0 14px; }
.learning-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; color: var(--text-tertiary); font-size: 9px; }

.learning-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(15, 23, 42, .24); }
.learning-dialog::backdrop { background: rgba(12, 15, 22, .48); backdrop-filter: blur(3px); }
.learning-dialog form { display: block; }
.learning-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 22px 18px; border-bottom: 1px solid var(--border-soft); }
.learning-dialog-head span { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.learning-dialog-head h2 { margin: 5px 0 4px; font-family: var(--font-document); font-size: 22px; letter-spacing: -.025em; }
.learning-dialog-head p { margin: 0; color: var(--text-tertiary); font-size: 11px; }
.learning-dialog-head > button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; cursor: pointer; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text-tertiary); font-size: 22px; }
.learning-dialog-head > button:hover { background: var(--surface-hover); color: var(--text); }
.learning-dialog-body { display: grid; gap: 8px; padding: 20px 22px 8px; }
.learning-dialog-body label { margin-top: 3px; color: var(--text-secondary); font-size: 11px; font-weight: 650; }
.learning-dialog-body textarea, .learning-dialog-body select { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 13px/1.6 var(--font-ui); }
.learning-dialog-body textarea { min-height: 92px; resize: vertical; padding: 11px 12px; }
.learning-dialog-body select { min-height: 44px; padding: 0 11px; cursor: pointer; }
.learning-dialog-body textarea:focus, .learning-dialog-body select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.learning-dialog-hint { margin: -1px 0 2px; color: var(--text-tertiary); font-size: 10px; }
.learning-dialog-error { min-height: 18px; margin: 0; color: var(--danger); font-size: 10px; }
.learning-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.learning-dialog-actions button { min-width: 78px; height: 44px; cursor: pointer; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-secondary); font-size: 12px; }
.learning-dialog-actions button[type="submit"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.learning-dialog-actions button:disabled { cursor: wait; opacity: .56; }

@media (max-width: 720px) {
  .learning-hero-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .learning-add-button { justify-content: center; }
}
@media (max-width: 620px) {
  .learning-page-grid { grid-template-columns: minmax(0, 1fr); }
  .learning-card { min-height: 178px; }
  .learning-dialog-head, .learning-dialog-body { padding-inline: 18px; }
  .learning-dialog-actions { padding-inline: 18px; }
}
@media (hover: none) {
  .learning-card-actions button, .learning-check { width: 44px; height: 44px; }
  .learning-check { flex-basis: 44px; }
  .learning-note-link { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .learning-add-button, .learning-card { transition: none; }
}
