.ml-library { --ml-border: #dfe4ee; --ml-muted: #56647b; --ml-blue: #3456c2; min-width: 0; }
.ml-heading { align-items: center; }
.ml-heading h1 { margin: 0; }
.ml-heading .ml-studio-btn, .ml-action {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem .95rem; border: 1px solid #d6ddef; border-radius: .65rem;
  background: #fff; color: #304a9e; font-size: .875rem; line-height: 1.4;
  font-weight: 650; text-decoration: none; white-space: normal; cursor: pointer;
}
.ml-studio-btn .lineicon, .ml-action .lineicon { width: 1.05rem; height: 1.05rem; }
.ml-studio-btn:hover, .ml-action:hover { background: #f3f5ff; border-color: #9eaee3; }
.ml-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ml-collection {
  cursor: pointer; text-align: start; padding: 0; min-width: 0; overflow: hidden;
  border: 1px solid #d8dfec; border-radius: 1rem; background: #fff;
  box-shadow: 0 2px 6px #162b6008; transition: border-color .17s, box-shadow .17s;
}
.ml-collection:hover { border-color: #a3afd3; box-shadow: 0 4px 14px #1c2f6515; }
.ml-collection[aria-pressed=true] { outline: 2px solid #5071d8; outline-offset: 1px; }
.ml-art { position: relative; display: block; height: clamp(105px, 12vw, 192px); overflow: hidden; }
.ml-book .ml-art { background: radial-gradient(ellipse at 65% 25%, #eaf0ff, #cfddf9 65%, #bccdf1); }
.ml-video .ml-art { background: radial-gradient(ellipse at 65% 25%, #eaf8f2, #cee8de 65%, #badbd3); }
.ml-podcast .ml-art { background: radial-gradient(ellipse at 65% 25%, #fff3df, #f6dec6 65%, #eac9ac); }
.ml-art img { display: block; width: 100%; height: 100%; object-fit: contain; padding: .2rem .5rem; transition: transform .25s ease; }
.ml-collection:hover img { transform: scale(1.035); }
.ml-collection-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .73rem 1rem; }
.ml-collection-foot strong { font-size: 1rem; font-weight: 680; color: #263553; }
.ml-count { padding: .12rem .47rem; border-radius: .4rem; background: #f1f3f8; color: var(--ml-muted); font-variant-numeric: tabular-nums; font-size: .775rem; }
.ml-toolbar { margin: 1.4rem 0 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.ml-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; padding: .22rem; background: #e9edf5; border-radius: .7rem; }
.ml-tabs button {
  border: 0; border-radius: .51rem; cursor: pointer; background: transparent; color: #55627a;
  display: inline-flex; white-space: nowrap; align-items: center; gap: .36rem; padding: .45rem .78rem; font-size: .85rem; font-weight: 620;
}
.ml-tabs .lineicon { width: .95rem; height: .95rem; }
.ml-tabs button[aria-pressed=true] { background: #fff; box-shadow: 0 1px 4px #2638671a; color: #334b9e; }
.ml-search {
  flex: 0 1 310px; max-width: 100%; min-width: 0; display: flex; align-items: center; gap: .55rem; padding-inline: .75rem;
  background: #fff; border: 1px solid #d4dbe9; border-radius: .65rem; color: #67748b;
}
.ml-search svg { width: 1rem; height: 1rem; flex: none; }
.ml-search input { width: 100%; color: #253653; margin: 0; border: 0; font: inherit; font-size: .875rem; background: none; padding: .62rem 0; }
.ml-search:focus-within { outline: 2px solid #7590e5; outline-offset: 2px; }
.ml-search input:focus { outline: none; }
.ml-shelf { margin-block: 1.3rem 2rem; }
.ml-shelf-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .7rem; gap: .65rem; }
.ml-shelf h2, .ml-guides h2 { margin: 0; font-size: 1.2rem; line-height: 1.4; }
.ml-view-all { background: none; border: 0; padding: .3rem 0; font-size: .825rem; font-weight: 650; color: var(--ml-blue); cursor: pointer; }
.ml-view-all:hover { text-decoration: underline; }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr)); gap: .85rem; }
.ml-card { display: flex; flex-direction: column; min-width: 0; text-align: start; background: #fff; border: 1px solid var(--ml-border); border-radius: .9rem; overflow: hidden; transition: border-color .15s,box-shadow .15s; }
.ml-card:hover { border-color: #aebcde; box-shadow: 0 3px 14px #283d7610; }
.ml-card-top { display: flex; align-items: center; justify-content: space-between; gap: .35rem; padding: .85rem .9rem 0 1rem; }
.ml-format { display: inline-flex; align-items: center; gap: .35rem; border-radius: .35rem; padding: .18rem .45rem; font-size: .73rem; font-weight: 650; }
.ml-format.ml-book { color: #425598; background: #ecf1ff; }
.ml-format.ml-video { color: #17614f; background: #e5f4ec; }
.ml-format.ml-podcast { color: #814b19; background: #fff0da; }
.ml-format .lineicon { width: .82rem; height: .82rem; }
.ml-save { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border: 0; border-radius: .5rem; color: #6a7690; cursor: pointer; background: transparent; }
.ml-save .lineicon { width: 1.07rem; height: 1.07rem; }
.ml-save:hover, .ml-save[aria-pressed=true] { background: #edf1fd; color: #3b55aa; }
.ml-card-link { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: stretch; padding: .62rem 1rem 0; text-align: start; background: transparent; border: 0; cursor: pointer; }
.ml-card-link h3 { margin: 0; font-size: 1.02rem; line-height: 1.38; font-weight: 685; color: #24314c; overflow-wrap: anywhere; letter-spacing: -.015em; }
.ml-card-link:focus-visible { outline-offset: -3px; }
.ml-author { display: block; margin-top: .34rem; color: #4c5a72; font-size: .825rem; }
.ml-description { display: block; color: var(--ml-muted); font-size: .88rem; line-height: 1.6; margin: .68rem 0 .95rem; }
.ml-card-foot { margin-top: auto; display: flex; gap: .5rem; align-items: center; justify-content: space-between; border-top: 1px solid #e9edf5; font-size: .75rem; font-weight: 600; color: #69768e; padding: .65rem 0; }
.ml-card-foot svg { width: .8rem; height: .8rem; }
[dir=rtl] .ml-card-foot svg { transform: rotate(180deg); }
.ml-empty { padding: 1.3rem; border: 1px dashed #c5cfe6; border-radius: .9rem; background: #fff; color: #44536d; }
.ml-guides { margin-block-start: 1.25rem; }
.ml-guides .learn-filters { margin-top: .85rem; }
.ml-detail { color: #33435b; font-size: .97rem; line-height: 1.65; }
.ml-detail p { margin: .7rem 0; }
.ml-detail-meta { display: flex; flex-wrap: wrap; gap: .55rem .85rem; align-items: center; color: #626e83; font-size: .82rem; }
.ml-detail-author { font-weight: 660; }
.ml-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin: 1rem 0 .25rem; }
.ml-actions .ml-primary { color: #fff; background: #3657c4; border-color: #3657c4; }
.ml-actions .ml-primary:hover { background: #2b48aa; }
.ml-embed { display: block; margin: 1rem auto; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: .7rem; background: #e9edf6; }
.ml-podcast-embed { min-height: 160px; max-height: 260px; }
.ml-audio { width: 100%; margin: .8rem 0 .3rem; }
.ml-player-error, .ml-detail .ml-offline { color: #58657a; font-size: .82rem; }
.ml-detail h3 { margin: 1rem 0 .35rem; font-size: .96rem; }
.ml-citations { margin: .25rem 0; padding-inline-start: 1.2rem; font-size: .87rem; }
.ml-citations a { color: #3456bd; text-decoration: underline; }
@media(min-width:1450px) { .ml-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) { .ml-search { flex: 1 1 100%; } .ml-collections { gap: .5rem; } .ml-collection-foot { padding: .6rem .55rem; } .ml-heading { flex-wrap: wrap; } }
@media(max-width:480px) { .ml-art { height: 72px; } .ml-collection-foot { padding: .52rem .43rem; gap: .2rem; align-items: start; } .ml-collection-foot strong { font-size: .79rem; } .ml-count { font-size: .7rem; padding: .06rem .23rem; } .ml-collection { border-radius: .65rem; } .ml-toolbar { margin-top: 1rem; } }
@media(prefers-reduced-motion:reduce) { .ml-collection, .ml-art img, .ml-card { transition: none; } }
.ml-insight { padding: .85rem 1rem; border: 1px solid #d9e4f8; background: #f1f5fd; border-radius: .8rem; margin: .95rem 0; }
.ml-insight > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ml-detail .ml-insight h3, .ml-detail .ml-insight p { margin: 0; }
.ml-detail .ml-insight p { margin-block-start: .45rem; font-size: .9rem; }
.ml-time { display: inline-flex; align-items: center; gap: .27rem; color: #354eab; padding: .2rem .48rem; background: white; border: 1px solid #c9d6ef; border-radius: .4rem; font-size: .8rem; cursor: pointer; }
.ml-time svg { width: .75rem; height: .75rem; }
