/* 쇼츠 가로 레일·카드 — 운영서비스 상세 관련 쇼츠 (resources/views/services/partials/related-shorts.blade.php, resources/views/shorts/item.blade.php)
   다크 모드는 사이트 공통 규칙대로 상위 요소의 .dark 클래스를 따른다. ← → 버튼 동작은 public/assets/js/shorts.js */
:root {
    --shorts-text: #111827;
    --shorts-text-muted: #6b7280;
    --shorts-radius: .75rem;
    --shorts-gutter: 1rem;
}
.dark {
    --shorts-text: #f3f4f6;
    --shorts-text-muted: #9ca3af;
}
.shorts-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shorts-break { overflow-wrap: anywhere; word-break: keep-all; }
.shorts-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

.shorts-hint { margin: 0; font-size: var(--fs-xs, .75rem); color: var(--shorts-text-muted); }
.shorts-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: .75rem; margin: 0; padding: 0 0 .5rem; list-style: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
/* 가로 스크롤바는 숨기고 ← → 버튼(마우스 화면)이나 손가락으로 넘긴다. */
.shorts-track::-webkit-scrollbar { display: none; }
.shorts-arrows { display: flex; gap: .25rem; margin-left: auto; }
.shorts-arrows[hidden] { display: none; }
/* 넘기기 버튼은 보조 조작이라 테두리·배경 없이 연한 회색 화살표만, 마우스를 올리면 진해진다 */
.shorts-arrow { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 0; border-radius: 9999px; background: transparent; color: #6b7280; font-size: .875rem; line-height: 1; cursor: pointer; transition: background-color .15s, color .15s; }
.shorts-arrow:hover:not(:disabled) { background: #f3f4f6; color: #111827; }
.shorts-arrow:disabled { opacity: .35; cursor: default; }
.shorts-arrow:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.dark .shorts-arrow { color: #9ca3af; }
.dark .shorts-arrow:hover:not(:disabled) { background: #374151; color: #f9fafb; }
/* 마우스 화면: 버튼을 쓰고 안내 문구는 숨김 / 터치 화면: 안내 문구만 */
@media (hover: hover) and (pointer: fine) { .shorts-hint { display: none; } }
@media (hover: none), (pointer: coarse) { .shorts-arrows { display: none !important; } }
@media (min-width: 640px) { .shorts-track { grid-auto-columns: 26%; } }
@media (min-width: 1024px) { .shorts-track { grid-auto-columns: calc((100% - 4.5rem) / 7); } }
/* 폰: 레일을 화면 가장자리까지 넓히고 첫 카드는 본문 여백에 맞춘다. */
@media (max-width: 639.98px) {
    .shorts-track { margin-inline: calc(var(--shorts-gutter) * -1); padding-inline: var(--shorts-gutter); scroll-padding-inline: var(--shorts-gutter); }
}

.short { min-width: 0; scroll-snap-align: start; }
.short-link { display: block; border-radius: var(--shorts-radius); color: inherit; text-decoration: none; }
.short-media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--shorts-radius); background: #111827; }
.short-media.is-loaded { background: transparent; }
/* 이미지를 사방 1px 넓혀 둥근 모서리·소수점 폭 가장자리에서 어두운 배경이 비치는 실선을 없앤다. */
.short-media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; transition: transform .4s ease; }
.short-link:hover .short-media img { transform: scale(1.04); }
.short-play { position: absolute; left: .625rem; bottom: .625rem; display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: rgb(0 0 0 / .6); color: #fff; }
.short-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .5rem;
    font-size: var(--fs-sm, .875rem); line-height: 1.25rem; font-weight: 500; color: var(--shorts-text); }
.short-link:hover .short-title { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .short-media img { transition: none; }
}
