.sml-public-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px; width: 100%; box-sizing: border-box; min-height: 100vh; }
.sml-public-wrap * { box-sizing: border-box; }

.sml-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; padding: 12px 16px; background: rgba(255,255,255,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; flex-wrap: wrap; }
.sml-toolbar-left { display: flex; gap: 4px; flex-wrap: wrap; }
.sml-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sml-tab { padding: 7px 14px; text-decoration: none; color: #0055ff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .2s; white-space: nowrap; }
.sml-tab:hover { color: #374151; background: #f3f4f6; }
.sml-tab.active { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.sml-upload-btn { padding: 7px 14px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); border-radius: 8px; text-decoration: none; transition: all .2s; box-shadow: 0 2px 8px rgba(37,99,235,0.2); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.sml-upload-btn:hover { box-shadow: 0 4px 14px rgba(37,99,235,0.3); transform: translateY(-1px); color: #fff; }
.sml-grid-user { font-size: 12px; color: #0055ff; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.sml-grid-logout { font-size: 12px; color: #ef4444; font-weight: 600; text-decoration: none; padding: 5px 10px; border-radius: 6px; transition: all .15s; white-space: nowrap; }
.sml-grid-logout:hover { background: #fef2f2; color: #dc2626; }

.sml-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; font-size: 15px; }

.sml-public-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.sml-public-item { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.04); position: relative; }
.sml-public-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.sml-public-item.hidden { display: none; }

.sml-public-preview { position: relative; background: linear-gradient(135deg, #1e1b4b, #0f172a); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; border-radius: 12px 12px 0 0; }
.sml-public-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.sml-public-item:hover .sml-public-preview img { transform: scale(1.05); }
.sml-public-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; color: #fff; opacity: 0.9; text-shadow: 0 2px 12px rgba(0,0,0,0.5); pointer-events: none; line-height: 1; z-index: 2; width: 48px; height: 48px; background: rgba(0,0,0,0.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.15); }
.sml-public-info { padding: 10px 12px 12px; }
.sml-public-title { display: block; font-weight: 600; font-size: 13px; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sml-item-menu { position: absolute; top: 8px; right: 8px; z-index: 10; }
.sml-menu-btn {
    width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.5); border-radius: 50%; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s, background .2s, transform .2s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    padding: 0; line-height: 1;
}
.sml-public-item:hover .sml-menu-btn { opacity: 1; }
.sml-menu-btn:hover { background: rgba(0,0,0,0.7); transform: scale(1.08); }
.sml-menu-btn svg { width: 18px; height: 18px; }
.sml-menu-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: rgba(255,255,255,0.98); border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    min-width: 200px; padding: 6px; z-index: 20;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    animation: sml-menu-in .15s ease-out;
}
@keyframes sml-menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sml-menu-dropdown.open { display: block; }
.sml-menu-dropdown::before {
    content: ''; position: absolute; top: -5px; right: 12px;
    width: 10px; height: 10px; background: rgba(255,255,255,0.98);
    transform: rotate(45deg); border-left: 1px solid rgba(0,0,0,0.06);
    border-top: 1px solid rgba(0,0,0,0.06);
}
.sml-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; font-weight: 500;
    color: #374151; text-decoration: none; border-radius: 10px;
    transition: background .12s; cursor: pointer; border: none; background: none;
    width: 100%; text-align: left;
}
.sml-menu-item:hover { background: #f3f4f6; color: #111827; }
.sml-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; color: #6b7280; }
.sml-menu-item:hover svg { color: #374151; }

.sml-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}
.sml-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.sml-modal-bg {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sml-modal-wrap {
    position: relative; z-index: 2;
    max-width: 920px; width: 100%;
    max-height: 90vh;
    background: #fff; border-radius: 18px;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    transform: scale(0.92) translateY(12px);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
    overflow: hidden;
}
.sml-modal.open .sml-modal-wrap { transform: scale(1) translateY(0); }
.sml-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}
.sml-modal-title {
    font-size: 15px; font-weight: 600; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 12px;
}
.sml-modal-close {
    flex-shrink: 0;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: none; background: none; cursor: pointer;
    color: #f90000; border-radius: 8px; font-weight: 600;
    transition: color .15s, background .15s;
}
.sml-modal-close:hover { color: #f90000; background: #f3f4f6; }
.sml-modal-body {
    flex: 1; min-height: 80px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}
.sml-modal-body :is(img, video) {
    max-width: 100%; width: auto; height: auto;
    #max-height: calc(100vh - 140px);
    border-radius: 12px; display: block;
    object-fit: contain;
}
.sml-modal-body video.sml-player { width: 100%; border-radius: 12px; }
.sml-modal-body .sml-player { width: 100%; border-radius: 12px; }
.sml-modal-body.sml-modal-video-pad { padding: 0; background: #000; }
.sml-modal-body.sml-modal-video-pad video,
.sml-modal-body.sml-modal-video-pad .sml-player { border-radius: 0; }
.sml-modal-footer {
    flex-shrink: 0;
    padding: 14px 20px;
    border-top: 1px solid #f3f4f6;
}
.sml-modal-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sml-modal-meta-item {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #6b7280; font-weight: 500;
}
.sml-modal-meta-item svg { flex-shrink: 0; }
.sml-loader { text-align: center; padding: 40px; color: #6b7280; }
.sml-spinner {
    width: 36px; height: 36px; margin: 0 auto 12px;
    border: 3px solid #e5e7eb; border-top-color: #2563eb;
    border-radius: 50%; animation: sml-spin .7s linear infinite;
}
@keyframes sml-spin { to { transform: rotate(360deg); } }

.sml-auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 70vh; padding: 20px; box-sizing: border-box; }
.sml-auth-card { width: 100%; max-width: 420px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04); padding: 40px 32px 32px; border: 1px solid rgba(255,255,255,0.5); transition: box-shadow .3s; }
.sml-auth-card:hover { box-shadow: 0 24px 80px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.04); }
.sml-auth-header { text-align: center; margin-bottom: 28px; }
.sml-auth-logo { width: 52px; height: 52px; margin: 0 auto 14px; background: linear-gradient(135deg, #2563eb, #7c3aed); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 24px rgba(37,99,235,0.25); }
.sml-auth-title { font-size: 22px; font-weight: 700; color: #111827; margin: 0 0 4px; letter-spacing: -0.3px; }
.sml-auth-subtitle { font-size: 14px; color: #6b7280; margin: 0; }
.sml-auth-notice { background: #fef3c7; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: #92400e; text-align: center; margin-bottom: 20px; }
.sml-auth-tabs { display: flex; gap: 4px; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.sml-atab { flex: 1; text-align: center; padding: 8px 12px; text-decoration: none; color: #6b7280; font-size: 14px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: all .2s; }
.sml-atab.active { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.sml-atab:hover:not(.active) { color: #374151; }
.sml-auth-form { display: block; }
.sml-auth-form p:last-child { margin-bottom: 0; }
.sml-field { margin-bottom: 18px; }
.sml-field-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; letter-spacing: -0.2px; }
.sml-field-wrap { position: relative; display: flex; align-items: center; }
.sml-field-icon { position: absolute; left: 14px; color: #9ca3af; pointer-events: none; flex-shrink: 0; transition: color .2s; }
.sml-field-wrap:focus-within .sml-field-icon { color: #2563eb; }
.sml-field-wrap input { width: 100%; padding: 11px 14px 11px 44px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: 14px; color: #111827; background: #f9fafb; outline: none; transition: all .2s; font-family: inherit; }
.sml-field-wrap input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.sml-field-wrap input::placeholder { color: #9ca3af; }
.sml-field-wrap input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #f9fafb inset !important; -webkit-text-fill-color: #111827 !important; }
.sml-pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: #9ca3af; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: color .2s, background .2s; z-index: 1; }
.sml-pw-toggle:hover { color: #6b7280; background: #f3f4f6; }
.sml-pw-toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.sml-user-status { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; line-height: 1; pointer-events: none; z-index: 1; }
.sml-pw-match { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); font-size: 16px; line-height: 1; pointer-events: none; z-index: 1; }
.sml-usr-ok { color: #16a34a; }
.sml-usr-no { color: #dc2626; }
.sml-usr-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e5e7eb; border-top-color: #9ca3af; border-radius: 50%; animation: sml-spin-btn .6s linear infinite; vertical-align: middle; }
.sml-auth-btn { position: relative; width: 100%; padding: 12px 20px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); cursor: pointer; transition: all .2s; box-shadow: 0 4px 14px rgba(37,99,235,0.3); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sml-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }
.sml-auth-btn:active { transform: translateY(0); }
.sml-auth-btn-text { transition: opacity .2s; }
.sml-auth-btn-loader { position: absolute; opacity: 0; transition: opacity .2s; }
.sml-auth-btn.loading .sml-auth-btn-text { opacity: 0; }
.sml-auth-btn.loading .sml-auth-btn-loader { opacity: 1; }
.sml-auth-btn-loader svg { animation: sml-spin-btn .8s linear infinite; stroke-dasharray: 31.4; stroke-dashoffset: 0; }
@keyframes sml-spin-btn { to { transform: rotate(360deg); } }
.sml-form-msg { font-size: 13px; font-weight: 500; text-align: center; margin: 14px 0 0; min-height: 20px; color: #dc2626; }
.sml-form-msg[style*="color: #46b450"] { color: #16a34a !important; }
.sml-form-msg[style*="color: #46b450"]::before { background: #dcfce7; }
.sml-btn { display: inline-block; padding: 10px 22px; background: #0073aa; color: #fff; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; font-size: 14px; transition: background .15s; }
.sml-btn:hover { background: #005a87; color: #fff; }

.sml-public-single { max-width: 900px; margin: 0 auto; padding: 0; }
.sml-view-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding: 12px 16px; background: rgba(255,255,255,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; flex-wrap: wrap; gap: 10px; }
.sml-view-back { color: #6b7280; text-decoration: none; font-size: 13px; font-weight: 500; transition: color .15s; display: flex; align-items: center; gap: 4px; }
.sml-view-back:hover { color: #2563eb; }
.sml-view-user { display: flex; align-items: center; gap: 10px; }
.sml-view-name { font-size: 13px; color: #9ca3af; font-weight: 500; }
.sml-view-logout { font-size: 12px; color: #ef4444; text-decoration: none; font-weight: 600; padding: 5px 10px; border-radius: 6px; transition: all .15s; }
.sml-view-logout:hover { background: #fef2f2; color: #dc2626; }

.sml-media-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.sml-media-body { padding: 0; }
.sml-media-body .sml-public-preview { border-radius: 0; aspect-ratio: unset; background: #111827; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.sml-media-body .sml-public-preview img { max-width: 100%; max-height: 75vh; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.sml-media-body .sml-player,
.sml-media-body video { width: 100%; max-width: 100%; max-height: 75vh; border-radius: 0; display: block; }
.sml-media-footer { padding: 20px 24px; }
.sml-media-title { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 4px; letter-spacing: -0.3px; }

.plyr__poster { background-size: cover; background-position: center; background-repeat: no-repeat; background-color: #000; }
.plyr--video .plyr__controls { background: transparent !important; background-image: linear-gradient(transparent 0%, rgba(0,0,0,0.15) 100%) !important; }

.sml-player-vertical .plyr { aspect-ratio: 9 / 16; max-height: 80vh; margin: 0 auto; }
.sml-player-vertical .plyr__video-wrapper { height: 100%; }
.sml-player-vertical .plyr__video-wrapper video { object-fit: contain; }
.sml-player-vertical.sml-modal-video-pad { background: #000; display: flex; align-items: center; justify-content: center; }
.sml-player-vertical.sml-modal-video-pad .plyr { max-height: 85vh; }
.sml-modal-body.sml-modal-video-pad.sml-player-vertical { padding: 0; }

/* Forgot / Reset password links */
.sml-forgot-link:hover, .sml-back-to-signin:hover { color: #2563eb !important; text-decoration: underline !important; }

/* Skip indicator animation */
.sml-skip-indicator { animation: sml-skip-pop .4s ease-out; }
@keyframes sml-skip-pop {
    0% { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
    30% { opacity: 0.9; transform: translate(-50%,-50%) scale(1.1); }
    60% { opacity: 0.9; transform: translate(-50%,-50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(0.9); }
}

/* Fullscreen portrait helper */
html.sml-fs-portrait { position: fixed; width: 100%; height: 100%; overflow: hidden; }

@media (orientation: landscape) {
    .sml-player-vertical .plyr { max-height: 80vh; max-width: 45vh; }
    .sml-player-vertical.sml-modal-video-pad .plyr { max-height: 85vh; max-width: 48vh; }
}
@media (max-width: 480px) {
    .sml-player-vertical .plyr { aspect-ratio: 9 / 16; max-height: 70vh; }
}

/* Fullscreen overrides — fill entire viewport, cover on all devices */
.plyr--fullscreen-active .plyr__video-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: flex; align-items: center; justify-content: center;
}
.plyr--fullscreen-active video {
    max-height: none !important;
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.plyr--fullscreen-active .plyr__poster { background-size: cover !important; }

/* Vertical video controls: bigger touch targets, compact layout */
.sml-player-vertical .plyr__controls {
    padding: 3px 8px !important;
    flex-wrap: nowrap !important;
}
.sml-player-vertical .plyr__controls .plyr__controls__item.plyr__progress__container {
    flex: 1 1 auto !important;
}
.sml-player-vertical .plyr__controls .plyr__control {
    padding: 6px !important;
}
.sml-player-vertical .plyr__controls .plyr__control svg {
    width: 16px; height: 16px;
}
.sml-player-vertical .plyr__controls .plyr__volume {
    display: none !important;
}
.sml-player-vertical .plyr__controls .plyr__time {
    font-size: 11px;
}
.sml-player-vertical .plyr__controls .plyr__progress__container .plyr__progress input[type=range] {
    height: 4px;
}
.sml-player-vertical .plyr--fullscreen-active .plyr__controls {
    padding: 8px 12px !important;
}
.sml-player-vertical .plyr--fullscreen-active .plyr__controls .plyr__control {
    padding: 10px !important;
}
.sml-player-vertical .plyr--fullscreen-active .plyr__controls .plyr__control svg {
    width: 20px; height: 20px;
}
.sml-player-vertical .plyr--fullscreen-active .plyr__controls .plyr__time {
    font-size: 14px;
}
@media (max-width: 480px) {
    .sml-player-vertical .plyr__controls .plyr__control { padding: 5px !important; }
    .sml-player-vertical .plyr__controls .plyr__control svg { width: 14px; height: 14px; }
    .sml-player-vertical .plyr__controls .plyr__time { font-size: 10px; }
    .sml-player-vertical.plyr--fullscreen-active .plyr__controls .plyr__control { padding: 8px !important; }
    .sml-player-vertical.plyr--fullscreen-active .plyr__controls .plyr__control svg { width: 18px; height: 18px; }
}

/* Large centered play button for vertical */
.sml-player-vertical .plyr__controls .plyr__control[data-plyr="play"] { order: -1; }
.sml-player-vertical .plyr__controls .plyr__controls__item[data-plyr="play-large"] {
    width: 60px; height: 60px;
}
@media (max-width: 480px) {
    .sml-player-vertical .plyr__controls .plyr__controls__item[data-plyr="play-large"] {
        width: 50px; height: 50px;
    }
}

.sml-upload-field { margin-bottom: 18px; }
.sml-upload-field .sml-input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    font-size: 14px; color: #111827; background: #f9fafb;
    outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
    font-family: inherit; box-sizing: border-box;
}
.sml-upload-field .sml-input:focus {
    border-color: #2563eb; background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.sml-upload-field .sml-input::placeholder { color: #9ca3af; }

.sml-dropzone {
    position: relative;
    border: 2px dashed #d1d5db; border-radius: 12px;
    padding: 28px 20px; text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #f9fafb; overflow: hidden;
}
.sml-dropzone:hover { border-color: #2563eb; background: #f0f5ff; }
.sml-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.sml-dropzone-content { transition: opacity .2s; }
.sml-has-file .sml-dropzone-content { display: none; }
.sml-dropzone-icon { margin-bottom: 10px; }
.sml-dropzone-text { display: flex; flex-direction: column; gap: 4px; }
.sml-dropzone-title { font-size: 14px; font-weight: 600; color: #374151; }
.sml-dropzone-hint { font-size: 12px; color: #9ca3af; }

.sml-file-selected { display: none; align-items: center; gap: 10px; text-align: left; }
.sml-has-file .sml-file-selected { display: flex; }
.sml-file-icon {
    width: 32px; height: 32px;
    background: #eef2ff; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #2563eb; flex-shrink: 0;
}
.sml-file-info { flex: 1; min-width: 0; }
.sml-file-name { display: block; font-size: 13px; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sml-file-size { display: block; font-size: 11px; color: #9ca3af; margin-top: 2px; }
.sml-file-change { font-size: 12px; color: #2563eb; text-decoration: none; font-weight: 600; flex-shrink: 0; }
.sml-file-change:hover { text-decoration: underline; }

.sml-upload-progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sml-progress-bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.sml-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #2563eb, #7c3aed); border-radius: 3px; transition: width .2s; }
.sml-progress-text { font-size: 12px; font-weight: 600; color: #6b7280; min-width: 34px; text-align: right; }

.sml-field-note { font-weight: 400; color: #9ca3af; font-size: 12px; }
.sml-thumb-upload { border: 1.5px dashed #d1d5db; border-radius: 10px; padding: 14px; background: #f9fafb; cursor: pointer; transition: border-color .2s, background .2s; position: relative; }
.sml-thumb-upload:hover { border-color: #2563eb; background: #f0f5ff; }
.sml-thumb-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.sml-thumb-placeholder { text-align: center; font-size: 13px; color: #9ca3af; padding: 6px; }
.sml-thumb-preview { display: flex; align-items: center; gap: 10px; }
.sml-thumb-preview img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; }
.sml-thumb-remove { font-size: 12px; color: #ef4444; text-decoration: none; font-weight: 600; }
.sml-thumb-remove:hover { text-decoration: underline; }

.sml-upload-submit {
    width: 100%; padding: 12px 20px; margin-top: 4px;
    border: none; border-radius: 10px;
    font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    cursor: pointer; transition: all .2s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit;
}
.sml-upload-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }
.sml-upload-submit:active { transform: translateY(0); }

@media (min-width: 769px) and (max-width: 1024px) {
    .sml-public-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

@media (max-width: 768px) {
    .sml-public-wrap { padding: 0; }
    .sml-public-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 0 12px 12px; }
    .sml-public-preview { aspect-ratio: 3 / 2; }
    .sml-toolbar { padding: 10px 12px; border-radius: 0; margin-bottom: 12px; }
    .sml-toolbar-left { gap: 3px; }
    .sml-tab { padding: 8px 12px; font-size: 14px; }
    .sml-grid-user { font-size: 14px; }
    .sml-grid-logout { font-size: 14px; padding: 6px 12px; }
    .sml-upload-btn { font-size: 14px; padding: 8px 16px; }

    .sml-modal { padding: 10px; align-items: center; }
    .sml-modal-wrap { max-height: 92vh; border-radius: 18px; max-width: 100%; transform: scale(0.92) translateY(12px); }
    .sml-modal.open .sml-modal-wrap { transform: scale(1) translateY(0); }
    .sml-modal-header { padding: 14px 18px; }
    .sml-modal-title { font-size: 14px; }
    .sml-modal-body { padding: 14px; }
    .sml-modal-body :is(img, video) { max-height: calc(92vh - 140px); }
    .sml-modal-footer { padding: 10px 16px; }

    .sml-auth-card { padding: 28px 24px 24px; border-radius: 18px; }
    .sml-auth-wrap { padding: 16px; min-height: 60vh; }
    .sml-auth-btn { padding: 14px 20px; font-size: 16px; min-height: 48px; }
    .sml-auth-btn:active { transform: scale(0.98); }
    .sml-field-wrap input { font-size: 16px; min-height: 44px; }
    .sml-pw-toggle { min-width: 44px; min-height: 44px; }
    .sml-atab { min-height: 40px; padding: 10px 14px; }

    .sml-item-menu { top: 6px; right: 6px; }
    .sml-menu-btn { width: 30px; height: 30px; opacity: 1; }
    .sml-menu-btn svg { width: 16px; height: 16px; }
    .sml-menu-dropdown { min-width: 180px; right: -4px; }
    .sml-menu-dropdown::before { right: 14px; }

    .sml-media-body .sml-public-preview { min-height: 200px; }
    .sml-media-body .sml-public-preview img { max-height: 55vh; }
    .sml-media-body video { max-height: 55vh; }
    .sml-media-footer { padding: 16px 18px; }
    .sml-media-title { font-size: 18px; }

    .sml-upload-field { margin-bottom: 14px; }
    .sml-dropzone { padding: 22px 16px; }
    .sml-dropzone-title { font-size: 13px; }
    .sml-upload-submit { padding: 11px 18px; font-size: 14px; }
    .sml-view-top { padding: 10px 14px; border-radius: 12px; }
}

@media (max-width: 480px) {
    .sml-public-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .sml-public-preview { aspect-ratio: 16 / 9; }
    .sml-public-info { padding: 8px 10px 10px; }
    .sml-public-title { font-size: 12px; }
    .sml-toolbar { flex-direction: column; align-items: stretch; gap: 8px; border-radius: 0; padding: 10px 12px; }
    .sml-public-grid { padding: 0 10px 10px; }
    .sml-toolbar-left { justify-content: center; }
    .sml-toolbar-right { justify-content: center; }

    .sml-modal { padding: 6px; }
    .sml-modal-wrap { max-height: 95vh; border-radius: 14px; }
    .sml-modal-header { padding: 12px 14px; }
    .sml-modal-title { font-size: 13px; }
    .sml-modal-body { padding: 8px; }
    .sml-modal-body :is(img, video) { max-height: calc(95vh - 120px); border-radius: 8px; }
    .sml-modal-footer { padding: 8px 12px; }
    .sml-modal-meta-item { font-size: 11px; }

    .sml-tab { padding: 7px 10px; font-size: 13px; }
    .sml-upload-btn { padding: 7px 14px; font-size: 13px; }
    .sml-grid-user { font-size: 13px; }
    .sml-grid-logout { font-size: 13px; padding: 6px 10px; }

    .sml-auth-card { padding: 24px 18px 20px; border-radius: 16px; }
    .sml-auth-title { font-size: 20px; }
    .sml-auth-subtitle { font-size: 13px; }
    .sml-auth-btn { padding: 14px 20px; font-size: 16px; min-height: 48px; }
    .sml-auth-btn:active { transform: scale(0.98); }
    .sml-field { margin-bottom: 14px; }
    .sml-field-wrap input { padding: 10px 12px 10px 40px; font-size: 16px; min-height: 44px; }
    .sml-pw-toggle { min-width: 44px; min-height: 44px; }

    .sml-media-body .sml-public-preview { min-height: 180px; }
    .sml-media-body .sml-public-preview img { max-height: 45vh; }
    .sml-media-body video { max-height: 45vh; }
    .sml-media-footer { padding: 14px 16px; }
    .sml-media-title { font-size: 16px; }

    .sml-item-menu { top: 4px; right: 4px; }
    .sml-menu-btn { width: 28px; height: 28px; opacity: 1; }
    .sml-menu-btn svg { width: 14px; height: 14px; }
    .sml-menu-dropdown { min-width: 160px; right: -2px; }
    .sml-menu-dropdown::before { right: 12px; }

    .plyr__volume input[type=range] { min-width: 10px; max-width: 25px; }

    .sml-upload-field { margin-bottom: 12px; }
    .sml-dropzone { padding: 18px 12px; border-radius: 10px; }
    .sml-dropzone-title { font-size: 12px; }
    .sml-dropzone-hint { font-size: 11px; }
    .sml-upload-submit { padding: 10px 16px; font-size: 13px; border-radius: 8px; }
    .sml-progress-bar { height: 5px; }
    .sml-upload-progress-wrap { gap: 8px; }
    .sml-view-top { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 10px; }
    .sml-view-user { width: 100%; justify-content: flex-end; }
}

@media (hover: none) and (pointer: coarse) {
    .sml-menu-btn { opacity: 1; }
    .sml-tab { padding: 8px 12px; }
    .sml-upload-btn { padding: 8px 14px; }
}

@media (orientation: portrait) and (max-width: 480px) {
    .sml-modal-body :is(video, img) { max-height: 45vh; }
    .sml-modal-body.sml-modal-video-pad :is(video, .sml-player) { max-height: 50vh; }
    .sml-media-body video { max-height: 35vh; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .sml-modal { padding: 0; align-items: flex-start; }
    .sml-modal-wrap { max-width: 100%; max-height: 100vh; border-radius: 0; transform: none; }
    .sml-modal-header { padding: 8px 12px; }
    .sml-modal-header .sml-modal-close { width: 28px; height: 28px; }
    .sml-modal-body { padding: 0; min-height: auto; }
    .sml-modal-body :is(video, img, .sml-player) { max-height: 100vh; border-radius: 0; object-fit: cover; }
    .sml-modal-body.sml-modal-video-pad { max-height: calc(100vh - 49px); }
    .sml-modal-footer { display: none; }
    .sml-media-body video,
    .sml-media-body .sml-player { max-height: 100vh; object-fit: cover; }

    .sml-public-wrap { padding: 12px 16px; }
    .sml-toolbar { margin-bottom: 16px; padding: 10px 14px; }
    .sml-public-grid { gap: 8px; }
}
