/* Shared media viewer; does not participate in workout state or shell layout. */
.exg-trigger { position: relative; padding: 0; cursor: pointer; font: inherit; }
.pe-equipment-poster { display: block; width: 100%; height: 100%; border: 0; background: none; }
.exg-count { position: absolute; right: 4px; bottom: 4px; padding: 2px 5px; border-radius: 5px; background: var(--t-bg); color: var(--t-text); font-size: 10px; font-weight: 600; line-height: 16px; }
.exg-link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 4px 0 10px; border: 0; background: none; color: var(--t-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pe-page .exg-link { color: var(--t-text); }
.exg-choice { display: flex; align-items: stretch; gap: 4px; }
.exg-choice > :first-child { flex: 1; min-width: 0; }
.exg-choice__preview { align-self: center; flex: 0 0 48px; min-height: 48px; border: 1px solid var(--t-border); border-radius: 10px; background: var(--t-card); color: var(--t-primary); font: inherit; font-size: 11px; cursor: pointer; }
.exg-scroll-lock { overflow: hidden !important; }
.exg-scroll-lock .app-content { overflow-y: hidden; }
.exg { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--t-bg); color: var(--t-text); z-index: 10000; overscroll-behavior: contain; }
.exg:not([open]) { display: none; }
.exg button:focus { outline: none; }
.exg[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) 56px auto; }
.exg::backdrop { background: var(--t-bg); }
.exg__header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 14px 12px; border-bottom: 1px solid var(--t-border); }
.exg__header > div { min-width: 0; }
.exg__header strong { display: block; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.exg__meta { margin-top: 5px; color: var(--t-text-muted); font-size: 12px; line-height: 1.4; }
.exg__button { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; padding: 0; border: 1px solid var(--t-border); border-radius: 50%; background: var(--t-card); color: var(--t-text); cursor: pointer; }
.exg__button[aria-pressed="true"] { color: var(--t-primary); border-color: var(--t-primary); }
.exg__button[hidden] { display: none; }
.exg__button:disabled { opacity: .35; }
.exg__stage { position: relative; overflow: hidden; min-width: 0; min-height: 0; touch-action: none; user-select: none; }
.exg__track { display: flex; width: 100%; height: 100%; transform: translateX(-100%); }
.exg__slide { position: relative; flex: 0 0 100%; min-width: 0; display: grid; place-items: center; padding: 16px; }
.exg__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; object-fit: contain; transform-origin: center; }
.exg__failure { color: var(--t-text-muted); padding: 24px; font-size: 14px; line-height: 1.7; text-align: center; }
.exg__failure button { display: block; margin: 16px auto; min-height: 44px; padding: 8px 16px; border: 1px solid var(--t-border); border-radius: 10px; background: var(--t-card); color: var(--t-text); font: inherit; }
.exg__controls { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.exg__rail { display: flex; align-items: center; gap: 10px; padding: 10px 16px max(20px, env(safe-area-inset-bottom)); overflow-x: auto; min-width: 0; justify-content: safe center; }
.exg__rail button { flex: 0 0 58px; width: 58px; height: 58px; padding: 2px; border: 2px solid transparent; border-radius: 10px; background: var(--t-card); cursor: pointer; }
.exg__rail button[aria-current="true"] { border-color: var(--t-primary); }
.exg__rail img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
