.dms-stories {
    --dms-accent: #b29558;
    box-sizing: border-box;
    width: 90%;
    max-width: 1350px;
    margin: 0 auto 0 5%;
    padding: 32px 0 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--dms-accent) transparent;
    font-family: Montserrat, sans-serif;
}
.dms-stories .dms-list {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dms-stories .dms-item { flex: 0 0 148px; margin: 0; padding: 0; list-style: none; }
.dms-stories .dms-card {
    box-sizing: border-box;
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 148px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333;
    box-shadow: none;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.dms-stories .dms-card:hover, .dms-stories .dms-card:active { background: transparent; color: var(--dms-accent); box-shadow: none; }
.dms-stories .dms-ring {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    border: 2px solid var(--dms-accent);
    border-radius: 50%;
}
.dms-stories .dms-image, .dms-stories .dms-placeholder {
    box-sizing: border-box;
    display: block;
    width: 132px;
    height: 132px;
    max-width: none;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
}
.dms-stories .dms-placeholder { display: flex; align-items: center; justify-content: center; background: #f3efe7; color: var(--dms-accent); font-size: 26px; }
.dms-stories .dms-title {
    box-sizing: border-box;
    display: -webkit-box;
    width: 100%;
    max-height: 60px;
    margin: 10px 0 0;
    padding: 0 4px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-transform: uppercase;
    white-space: pre-line;
    overflow-wrap: anywhere;
    text-align: center;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.dms-stories .dms-card:focus-visible { outline: 2px solid #333; outline-offset: -2px; border-radius: 8px; }
.dms-modal, .dms-modal * { box-sizing: border-box; }
.dms-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: block;
    overflow: auto;
    background: rgba(0, 0, 0, .9);
    color: #fff;
    font-family: Montserrat, sans-serif;
    overscroll-behavior: contain;
}
.dms-modal[hidden], .dms-modal [hidden] { display: none !important; }
.dms-modal .dms-player {
    position: relative;
    width: min(330px, calc(100vw - 96px), calc((100vh - 100px) * 330 / 580));
    width: min(330px, calc(100vw - 96px), calc((100dvh - 100px) * 330 / 580));
    aspect-ratio: 330 / 580;
    margin: 80px auto 20px;
    background: #000;
}
.dms-modal .dms-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.dms-modal .dms-progress { position: absolute; inset: 0 0 auto; z-index: 2; height: 3px; overflow: hidden; background: rgba(255, 255, 255, .2); }
.dms-modal .dms-progress-fill { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.dms-modal .dms-control {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    box-shadow: none;
    color: #fff;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}
.dms-modal .dms-control:hover, .dms-modal .dms-control:active { background: rgba(178, 149, 88, .9); color: #fff; }
.dms-modal .dms-control:focus-visible, .dms-modal .dms-action:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dms-modal .dms-control svg { display: block; width: 24px; height: 24px; fill: currentColor; pointer-events: none; }
.dms-modal .dms-close { position: absolute; top: -40px; right: -40px; z-index: 5; background: transparent; }
.dms-modal .dms-controls { position: absolute; right: 8px; bottom: 8px; left: 8px; z-index: 3; display: flex; justify-content: space-between; gap: 8px; }
.dms-modal .dms-status { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 56px 20px; background: rgba(0, 0, 0, .4); text-align: center; }
.dms-modal .dms-status-text { margin: 0; color: #fff; font-size: 14px; line-height: 1.5; }
.dms-modal .dms-spinner { width: 36px; height: 36px; border: 4px solid rgba(255, 255, 255, .3); border-left-color: #fff; border-radius: 50%; animation: dms-spin 1s linear infinite; }
.dms-modal .dms-action { appearance: none; min-height: 44px; padding: 10px 16px; border: 1px solid #b29558; border-radius: 4px; background: #b29558; color: #111; font: 500 13px/1.4 Montserrat, sans-serif; text-transform: none; letter-spacing: normal; cursor: pointer; }
.dms-modal .dms-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@keyframes dms-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
    .dms-stories { width: calc(100% - 30px); margin: 0 15px; padding: 24px 0 12px; scrollbar-width: none; }
    .dms-stories::-webkit-scrollbar { display: none; }
    .dms-stories .dms-list { min-width: 0; gap: 12px; padding-right: 15px; }
    .dms-stories .dms-item { flex-basis: 120px; }
    .dms-stories .dms-card { width: 120px; }
    .dms-stories .dms-ring { width: 108px; height: 108px; }
    .dms-stories .dms-image, .dms-stories .dms-placeholder { width: 100px; height: 100px; }
    .dms-stories .dms-title { margin-top: 8px; font-size: 10px; }
}
@media (max-width: 600px), (max-height: 700px) {
    .dms-modal .dms-player { width: min(330px, calc(100vw - 30px), calc((100vh - 60px) * 330 / 580)); width: min(330px, calc(100vw - 30px), calc((100dvh - 60px) * 330 / 580)); margin-top: 30px; }
    .dms-modal .dms-close { top: 5px; right: 5px; background: rgba(0, 0, 0, .55); }
}
@media (prefers-reduced-motion: reduce) { .dms-modal .dms-spinner { animation-duration: 2s; } }
