#library-app,
.clinic-video-dialog {
  --library-ink: #242823;
  --library-muted: #657064;
  --library-olive: #374936;
  --library-border: #d9ddd4;
  --library-paper: #f6f4ef;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--library-ink);
}
#library-app *, .clinic-video-dialog * { box-sizing: border-box; }
#library-app [hidden], .clinic-video-dialog [hidden] { display: none !important; }
#library-app button, #library-app input, .clinic-video-dialog button { font: inherit; }
#library-app button, .clinic-video-dialog button { cursor: pointer; }
#library-app :focus-visible { outline: 2px solid var(--library-olive); outline-offset: 5px; }
.clinic-video-dialog :focus-visible { outline: 2px solid #9aa993; outline-offset: 4px; }
.clinic-library-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 23px; }
.clinic-library-search-group { flex: 1; max-width: 520px; }
.clinic-library-search-label { display: block; margin-bottom: 10px; color: var(--library-ink); font-size: 13px; font-weight: 600; line-height: 1.45; }
.clinic-library-search-wrap { display: flex; align-items: center; position: relative; border: 1px solid #ccd1c6; border-radius: 4px; background: transparent; }
.clinic-library-search-wrap:focus-within { border-color: var(--library-olive); }
.clinic-library-search-icon { display: flex; align-items: center; flex: none; padding-left: 16px; width: 37px; color: #576451; }
.clinic-library-search-icon svg { width: 20px; height: 20px; }
#library-app .clinic-library-search { width: 100%; min-width: 0; min-height: 52px; padding: 13px 12px; border: 0; border-radius: 0; color: var(--library-ink); background: transparent; font-size: 16px; line-height: 1.5; appearance: none; }
#library-app .clinic-library-search::-webkit-search-cancel-button { display: none; }
#library-app .clinic-library-search::placeholder { color: #657064; opacity: 1; }
#library-app .clinic-library-search:focus-visible { outline: 0; }
#library-app .clinic-library-search-wrap:has(.clinic-library-search:focus-visible) { outline: 2px solid var(--library-olive); outline-offset: 3px; }
#library-app .clinic-library-clear { min-width: 50px; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: var(--library-olive); font-size: 12px; text-decoration: underline; }
.clinic-library-count { flex-shrink: 0; margin: 0 0 15px; color: var(--library-muted); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.clinic-library-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; }
#library-app .clinic-library-filter { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 1px solid var(--library-border); border-radius: 40px; background: transparent; color: #515d4e; font-size: 12px; line-height: 1.35; white-space: nowrap; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
#library-app .clinic-library-filter:hover { border-color: #8c9c82; background: #eaede5; }
#library-app .clinic-library-filter[aria-pressed="true"] { color: #fff; background: var(--library-olive); border-color: var(--library-olive); }
.clinic-library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
#library-app .clinic-video-card { display: block; position: relative; isolation: isolate; width: 100%; max-width: 100%; min-width: 0; min-height: 345px; aspect-ratio: 4/5; padding: 0; overflow: hidden; border: 0; border-radius: 7px; background: #20271f; color: #fff; text-align: left; box-shadow: none; }
.clinic-video-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(16, 22, 17, .04) 8%, rgba(16, 22, 17, .05) 25%, rgba(16, 22, 17, .32) 47%, rgba(16, 22, 17, .92) 78%, #151d17 100%); }
.clinic-video-poster { position: absolute; z-index: -2; display: block; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 350ms ease; }
.clinic-video-duration { position: absolute; top: 14px; right: 14px; display: inline-flex; justify-content: center; align-items: center; min-width: 43px; padding: 5px 8px; border: 1px solid #ffffff45; border-radius: 4px; background: #152219c7; color: white; font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.clinic-video-caption { position: absolute; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; }
.clinic-video-play { width: 41px; height: 41px; display: flex; align-items: center; justify-content: center; margin-bottom: 21px; border: 1px solid #ffffff8c; border-radius: 50%; color: #fff; background: #16231740; transition: color 180ms ease, background-color 180ms ease; }
.clinic-video-play svg { width: 17px; height: 17px; margin-left: -2px; }
.clinic-video-category { display: block; margin-bottom: 9px; color: #d7dfd3; font-size: 10px; font-weight: 500; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; }
.clinic-video-title { display: block; color: #fff; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.35; font-weight: 500; letter-spacing: -.02em; text-wrap: pretty; }
#library-app .clinic-video-card:hover .clinic-video-poster { transform: scale(1.035); }
#library-app .clinic-video-card:hover .clinic-video-play { color: #233521; background: #fff; }
.clinic-library-foot { display: flex; flex-direction: column; align-items: center; gap: 15px; padding-top: 31px; }
#library-app .clinic-library-more, #library-app .clinic-library-reset { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; gap: 24px; padding: 12px 22px; border: 1px solid #a9b3a1; border-radius: 3px; color: var(--library-olive); background: transparent; font-size: 13px; line-height: 1.5; transition: background-color 160ms ease; }
#library-app .clinic-library-more:hover, #library-app .clinic-library-reset:hover { background: #e7ebdf; }
.clinic-library-arrow { width: 19px; height: 19px; display: inline-flex; flex: none; }
.clinic-library-arrow svg { width: 100%; height: 100%; }
.clinic-library-educational { margin: 0; color: var(--library-muted); font-size: 12px; line-height: 1.5; text-align: center; }
.clinic-library-empty { padding: 50px 20px; border: 1px solid var(--library-border); border-radius: 6px; text-align: center; }
.clinic-library-empty h3 { margin: 0 0 12px; font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.clinic-library-empty p { max-width: 400px; margin: 0 auto 24px; color: var(--library-muted); font-size: 15px; line-height: 1.6; }
.clinic-video-dialog { width: min(910px, calc(100% - 48px)); max-height: calc(100dvh - 48px); padding: 0; margin: auto; border: 1px solid #d9ddd4; border-radius: 10px; background: var(--library-paper); overflow: auto; box-shadow: 0 30px 110px #0007; }
.clinic-video-dialog::backdrop { background: #152017cf; backdrop-filter: blur(7px); }
body:has(.clinic-video-dialog[open]) { overflow: hidden; }
.clinic-player-controls { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; height: 0; }
.clinic-player-shell { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); position: relative; }
.clinic-player-media { display: flex; align-items: center; justify-content: center; min-height: 520px; background: #101610; }
.clinic-player-video { display: block; width: 100%; height: 100%; max-height: calc(100dvh - 50px); object-fit: contain; background: #101610; }
.clinic-player-close { position: relative; right: 12px; top: 12px; display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #d9ddd4; border-radius: 50%; background: var(--library-paper); color: var(--library-ink); }
.clinic-player-close svg { width: 22px; height: 22px; }
.clinic-player-content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 70px 36px 38px; }
.clinic-player-topic { margin: 0 0 20px; color: #5e6a57; font-size: 11px; font-weight: 600; letter-spacing: .1em; line-height: 1.5; text-transform: uppercase; }
.clinic-player-title { margin: 0 0 22px; color: #263425; font-family: inherit; font-size: clamp(24px, 2.5vw, 34px); font-weight: 500; letter-spacing: -.045em; line-height: 1.18; text-wrap: balance; }
.clinic-player-note { margin: 0 0 27px; color: #5f6a58; font-size: 13px; line-height: 1.65; }
.clinic-player-guide { display: inline-flex; align-items: center; min-height: 44px; gap: 12px; margin-bottom: 18px; color: var(--library-olive); font-size: 13px; text-decoration: underline; text-underline-offset: 5px; }
.clinic-player-start { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 48px; padding: 13px 18px; border: 1px solid var(--library-olive); border-radius: 4px; color: #fff; background: var(--library-olive); font-size: 13px !important; }
.clinic-player-error { margin: 0 0 15px; padding: 12px; border: 1px solid #b9c2b3; font-size: 13px; line-height: 1.5; }
@media (max-width: 1000px) {
  .clinic-library-grid { gap: 12px; }
  #library-app .clinic-video-card { min-height: 310px; }
  .clinic-video-caption { padding: 16px; }
}
@media (max-width: 760px) {
  .clinic-library-toolbar { align-items: stretch; flex-direction: column; gap: 13px; padding-bottom: 18px; }
  .clinic-library-search-group { max-width: none; }
  .clinic-library-count { margin: 0; }
  .clinic-library-filters { flex-wrap: wrap; gap: 7px; padding-bottom: 22px; }
  #library-app .clinic-library-filter { padding: 10px 13px; font-size: 12px; }
  .clinic-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #library-app .clinic-video-card { aspect-ratio: auto; min-height: 310px; }
  .clinic-video-title { font-size: 15px; }
  .clinic-video-category { font-size: 10px; margin-bottom: 7px; }
  .clinic-video-caption { padding: 14px; }
  .clinic-video-duration { right: 10px; top: 10px; }
  .clinic-video-play { width: 35px; height: 35px; margin-bottom: 15px; }
  .clinic-video-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 8px; }
  .clinic-player-shell { display: block; }
  .clinic-player-media { min-height: 0; }
  .clinic-player-video { width: 100%; height: 47dvh; max-height: none; }
  .clinic-player-content { padding: 25px 22px 28px; }
  .clinic-player-topic { margin-bottom: 12px; }
  .clinic-player-title { font-size: 24px; margin-bottom: 16px; }
  .clinic-player-note { margin-bottom: 12px; }
  .clinic-player-start { width: 100%; }
  .clinic-player-close { right: 10px; top: 10px; }
}
@media (max-width: 359px) {
  .clinic-library-grid { grid-template-columns: 1fr; gap: 16px; }
  #library-app .clinic-video-card { aspect-ratio: 4/5; min-height: 330px; }
  .clinic-video-caption { padding: 22px; }
  .clinic-video-title { font-size: 20px; }
  .clinic-video-category { font-size: 10px; }
  .clinic-library-search::placeholder { font-size: 13px; }
  .clinic-library-filter { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #library-app *, .clinic-video-dialog * { transition: none !important; scroll-behavior: auto !important; }
}
