/* Shared Lernwerkstatt visual language. Loaded after online.css on purpose. */
#learningProjectDashboard {
  --lw-ink: #123b2f;
  --lw-muted: #4c6a5f;
  --lw-line: #91b5a5;
  --lw-line-soft: #b9cec4;
  --lw-surface: #ffffff;
  --lw-surface-soft: #edf4f0;
  --lw-tab: #dbe9e3;
  --lw-active: #17664e;
  --lw-active-dark: #10513d;
  --lw-focus: #d4a02f;
  --lw-danger: #a92d29;
}

/* A calm but clearly layered workspace: page, work card and inner controls are
   deliberately three different tones. */
#learningProjectDashboard {
  color: var(--lw-ink);
}

#learningProjectDashboard :is(.learning-audio-step,.learning-audio-layout>aside,.learning-understand-panel,.learning-understand-results,.learning-library-controls,.learning-library-layout,.learning-digitize-layout,.learning-flashcard-panel,.learning-assistant-history,.learning-assistant-main) {
  border-color: var(--lw-line);
  background: var(--lw-surface);
  box-shadow: 0 9px 25px rgba(18,59,47,.085);
}

#learningProjectDashboard :is(.learning-summary-upload,.learning-understand-upload,.learning-audio-upload,.learning-step2-intro,.learning-flashcard-manual-form,.learning-flashcard-deck-tools) {
  border-color: #9ebdad;
  background: var(--lw-surface-soft);
}

#learningProjectDashboard :is(.learning-audio-toolbar,.learning-understand-head,.learning-digitize-toolbar,.learning-library-toolbar),
#learningProjectDashboard :is(.learning-audio-step,.learning-audio-layout>aside,.learning-understand-panel,.learning-understand-results,.learning-library-controls,.learning-library-layout,.learning-digitize-layout) {
  border-color: var(--lw-line);
  box-shadow: 0 8px 24px rgba(18,59,47,.065);
}

#learningProjectDashboard :is(.learning-audio-tabs,.learning-understand-tabs,.learning-book-steps,.learning-library-origin-tabs,.learning-book-step2>nav,.learning-flashcard-tabs,.learning-practice-tabs) {
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--lw-line);
  border-radius: 14px;
  background: var(--lw-tab);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-library-origin-tabs button,.learning-book-step2>nav button,.learning-flashcard-tabs button) {
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255,255,255,.48);
  color: #285444;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  transition: background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-library-origin-tabs button,.learning-book-step2>nav button,.learning-flashcard-tabs button):not(:disabled):hover,
#learningProjectDashboard .learning-book-steps span[role="button"]:not([aria-disabled="true"]):hover {
  border-color: #8fb3a4;
  background: rgba(255,255,255,.72);
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-library-origin-tabs button,.learning-book-step2>nav button,.learning-flashcard-tabs button).active {
  border-color: #4e8b75;
  background: var(--lw-surface);
  color: var(--lw-ink);
  box-shadow: 0 4px 12px rgba(16,81,61,.12),inset 0 0 0 1px rgba(23,102,78,.08);
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-flashcard-tabs button).done {
  border-color: #b1cabe;
  background: #edf5f1;
  color: #235b47;
}

#learningProjectDashboard :is(.learning-audio-tabs button b,.learning-understand-tabs button b,.learning-book-steps span b,.learning-library-origin-tabs button b,.learning-flashcard-tabs button b) {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  min-width: 27px;
  width: 27px;
  height: 27px;
  padding: 0;
  border-radius: 50%;
  background: #c9ddd4;
  color: #31594a;
  font-size: 12px;
  font-weight: 800;
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-library-origin-tabs button,.learning-flashcard-tabs button).active b,
#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-flashcard-tabs button).done b {
  background: var(--lw-active);
  color: #fff;
}

#learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-step2>nav button,.learning-flashcard-tabs button):disabled,
#learningProjectDashboard .learning-book-steps span[aria-disabled="true"] {
  opacity: 1;
  border-color: transparent;
  background: rgba(242,246,244,.8);
  color: #71857c;
  cursor: not-allowed;
}

#learningProjectDashboard :is(button,a,input,select,textarea,[role="button"]):focus-visible {
  outline: 3px solid var(--lw-focus);
  outline-offset: 2px;
}

#learningProjectDashboard :is(input[type="text"],input[type="search"],input[type="number"],select,textarea) {
  border-color: #9ebcaf;
  background: #fff;
  color: #133c30;
}

#learningProjectDashboard :is(input[type="text"],input[type="search"],input[type="number"],select,textarea):hover {
  border-color: #769e8e;
}

#learningProjectDashboard :is(.learning-primary,button.primary) {
  border-color: var(--lw-active-dark);
  background: var(--lw-active);
  color: #fff;
  box-shadow: 0 5px 13px rgba(16,81,61,.16);
}

#learningProjectDashboard :is(.learning-primary,button.primary):not(:disabled):hover {
  background: var(--lw-active-dark);
}

#learningProjectDashboard button.secondary {
  border-color: #a8c0b5;
  background: #fff;
  color: #173f33;
}

#learningProjectDashboard :is(.learning-audio-toolbar,.learning-understand-head,.learning-digitize-toolbar,.learning-library-toolbar) {
  border-color: var(--lw-line);
  box-shadow: 0 8px 23px rgba(18,59,47,.07);
}

#learningProjectDashboard :is(.learning-audio-layout>aside,.learning-understand-results,.learning-summary-results,.learning-flashcard-panel) > header {
  border-color: var(--lw-line-soft);
}

#learningProjectDashboard :is(.learning-book-rail-head>span,.learning-library-folder-head>span,.learning-audio-library-head>span,.learning-understand-results header>span,.learning-summary-results-head>span) {
  background: #dbeae3;
  color: #174f3d;
}

#learningProjectDashboard button.secondary:not(:disabled):hover {
  border-color: #769e8e;
  background: #eef5f1;
}

#learningProjectDashboard :is(.learning-understand-scope label,.learning-understand-styles label,.learning-audio-voices label) {
  border-color: #aec7bb;
  background: #fff;
}

#learningProjectDashboard :is(.learning-understand-scope label,.learning-understand-styles label,.learning-audio-voices label):has(input:checked) {
  border-color: var(--lw-active);
  background: #e8f3ee;
  box-shadow: inset 0 0 0 1px var(--lw-active);
}

#learningProjectDashboard :is(.learning-audio-toolbar,.learning-understand-head,.learning-digitize-toolbar,.learning-library-toolbar) p,
#learningProjectDashboard :is(.learning-audio-step,.learning-understand-panel,.learning-understand-results,.learning-library-controls) p,
#learningProjectDashboard :is(.learning-audio-step,.learning-understand-panel,.learning-library-controls) small {
  color: var(--lw-muted);
}

@media (max-width: 640px) {
  #learningProjectDashboard :is(.learning-audio-tabs,.learning-understand-tabs,.learning-book-steps,.learning-flashcard-tabs) {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 5px;
    padding: 6px;
  }

  #learningProjectDashboard .learning-book-steps {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  #learningProjectDashboard :is(.learning-audio-tabs button,.learning-understand-tabs button,.learning-book-steps span,.learning-flashcard-tabs button) {
    justify-content: center;
    min-width: 0;
    min-height: 62px;
    padding: 7px 5px;
    font-size: 11px;
    text-align: center;
  }
}

.learning-assistant-view{display:grid;gap:18px}.learning-assistant-view.hidden{display:none}.learning-assistant-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}.learning-assistant-history,.learning-assistant-main{border:1px solid var(--lw-line);border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(18,59,47,.065)}.learning-assistant-history{position:sticky;top:18px;overflow:hidden}.learning-assistant-history>div:first-child{display:grid;gap:12px;padding:18px;border-bottom:1px solid var(--lw-line-soft)}.learning-assistant-history [data-chat-list]{display:grid;gap:6px;padding:10px}.learning-assistant-history [data-chat-list]>p{padding:12px;color:var(--lw-muted)}.learning-assistant-history [data-chat]{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:11px;border:1px solid transparent;border-radius:9px;background:#f3f7f5;color:var(--lw-ink);text-align:left}.learning-assistant-history [data-chat].active{border-color:#77aa97;background:#e8f3ee}.learning-assistant-history [data-chat] span{min-width:0}.learning-assistant-history [data-chat] strong,.learning-assistant-history [data-chat] small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.learning-assistant-history [data-chat] small{margin-top:3px;color:var(--lw-muted)}.learning-assistant-history [data-delete-chat]{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;color:#8f2f2b;font-style:normal;font-size:20px}.learning-assistant-history [data-delete-chat]:hover{background:#fae9e7}.learning-assistant-main{overflow:hidden}.learning-assistant-context{padding:18px;border-bottom:1px solid var(--lw-line-soft);background:#f3f7f5}.learning-assistant-context label{display:grid;gap:7px;font-weight:800}.learning-assistant-context select{min-height:46px;padding:9px 11px;border:1px solid #9ebcaf;border-radius:9px}.learning-assistant-context p{margin:8px 0 0;color:var(--lw-muted);font-size:13px}.learning-assistant-conversation{display:grid;gap:13px;min-height:360px;max-height:56vh;padding:22px;overflow-y:auto;background:linear-gradient(180deg,#fff,#f8fbf9)}.learning-assistant-empty{display:grid;place-items:center;align-content:center;min-height:300px;text-align:center}.learning-assistant-empty>span{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#e3eee9;color:var(--lw-active);font-size:24px}.learning-assistant-empty h3{margin:12px 0 5px;font:700 24px Georgia,serif;color:var(--lw-ink)}.learning-assistant-empty p{max-width:570px;margin:0;color:var(--lw-muted)}.learning-assistant-prompts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}.learning-assistant-prompts button{padding:9px 12px;border:1px solid #a8c4b7;border-radius:999px;background:#fff;color:#235342}.learning-assistant-message{max-width:min(82%,760px);padding:14px 16px;border:1px solid var(--lw-line-soft);border-radius:14px;line-height:1.55}.learning-assistant-message.user{justify-self:end;border-color:#88b3a2;background:#e7f2ed}.learning-assistant-message.assistant{justify-self:start;background:#fff}.learning-assistant-message-label{margin-bottom:5px;color:var(--lw-active);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.learning-assistant-message details{margin-top:12px;padding-top:10px;border-top:1px solid var(--lw-line-soft)}.learning-assistant-message summary{color:#1e5d48;font-weight:800;cursor:pointer}.learning-assistant-message details p{margin:7px 0 0;color:var(--lw-muted);font-size:13px}.learning-assistant-compose{display:grid;gap:12px;padding:18px;border-top:1px solid var(--lw-line);background:#fff}.learning-assistant-compose>label:first-child{display:grid;gap:7px;font-weight:800}.learning-assistant-compose textarea{width:100%;resize:vertical;padding:11px;border:1px solid #9ebcaf;border-radius:10px;font:inherit;line-height:1.45}.learning-assistant-quote{display:grid;gap:4px;padding:13px 15px;border-left:4px solid var(--lw-active);border-radius:10px;background:#edf5f1}.learning-assistant-quote.muted{border-left-color:#9db3aa;background:#f3f6f4}.learning-assistant-quote span,.learning-assistant-quote small{color:var(--lw-muted)}.learning-assistant-confirm{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;line-height:1.45;font-weight:700}.learning-assistant-confirm input{margin-top:3px}.learning-assistant-actions{display:flex;justify-content:flex-end;gap:10px}.learning-assistant-compose .learning-copy-reason{margin:0;padding:9px 11px;border-radius:8px;background:#f1f5f3;color:#48675b}.learning-assistant-compose button:disabled{cursor:not-allowed;opacity:.62;box-shadow:none}
@media(max-width:900px){.learning-assistant-layout{grid-template-columns:1fr}.learning-assistant-history{position:static}.learning-assistant-history [data-chat-list]{display:flex;overflow-x:auto}.learning-assistant-history [data-chat]{flex:0 0 230px}.learning-assistant-conversation{max-height:none}}
@media(max-width:560px){.learning-assistant-view .learning-understand-head{align-items:stretch;flex-direction:column;padding:18px}.learning-assistant-conversation{padding:14px}.learning-assistant-message{max-width:94%}.learning-assistant-compose{padding:14px}.learning-assistant-actions{align-items:stretch;flex-direction:column}.learning-assistant-actions button{width:100%}.learning-assistant-prompts{align-items:stretch;flex-direction:column}.learning-assistant-prompts button{border-radius:9px}.learning-assistant-confirm{font-size:14px}}
.learning-assistant-message details section+section{margin-top:10px;padding-top:8px;border-top:1px solid var(--lw-line-soft)}.learning-assistant-message blockquote{margin:7px 0 0;padding:9px 11px;border-left:3px solid #8fb5a5;border-radius:0 7px 7px 0;background:#f2f6f4;color:#345448;font-size:13px}
