/* Media picker sheet (js/media-sheet.js) */
.ms-sheet { position: fixed; inset: 0; z-index: 10400; display: flex; flex-direction: column; background: #0b0b0d; color: #fff; opacity: 0; transform: translateY(16px); transition: opacity .2s ease, transform .2s ease; }
.ms-sheet.show { opacity: 1; transform: none; }
body.ms-open #media-preview { display: none !important; }
.ms-bar { flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--safe-top)) 8px 8px; }
.ms-count { flex: 1; font-size: 16px; font-weight: 600; padding-left: 6px; }
.ms-ic { width: 42px; height: 42px; border: none; border-radius: 50%; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ms-ic:hover { background: rgba(255,255,255,.1); }
.ms-ic svg { width: 22px; height: 22px; }
.ms-view { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ms-view::-webkit-scrollbar { display: none; }
.ms-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 8px 12px; box-sizing: border-box; }
.ms-slide img, .ms-slide video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.ms-doc { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ms-doc small { opacity: .6; }
.ms-strip { flex-shrink: 0; display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
.ms-strip::-webkit-scrollbar { display: none; }
.ms-th { position: relative; flex: 0 0 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.08); cursor: pointer; color: #fff; transition: border-color .15s, opacity .15s; opacity: .6; }
.ms-th.on { border-color: #fff; opacity: 1; }
.ms-th img, .ms-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-th-v { position: absolute; left: 3px; bottom: 2px; font-size: 10px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.ms-th-doc { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.ms-th-doc svg { width: 20px; height: 20px; }
.ms-add { opacity: 1; border: 1.5px dashed rgba(255,255,255,.35); background: transparent; display: flex; align-items: center; justify-content: center; }
.ms-add svg { width: 22px; height: 22px; }
.ms-foot { flex-shrink: 0; padding: 4px 12px calc(12px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.ms-file { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: rgba(255,255,255,.75); font: inherit; font-size: 13px; cursor: pointer; }
.ms-file svg { width: 15px; height: 15px; }
.ms-file.on { background: #fff; color: #000; border-color: #fff; }
.ms-compose { display: flex; align-items: flex-end; gap: 8px; }
.ms-compose textarea { flex: 1; min-height: 44px; max-height: 120px; box-sizing: border-box; padding: 11px 16px; border: none; border-radius: 22px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 15px; line-height: 1.45; resize: none; outline: none; }
.ms-compose textarea::placeholder { color: rgba(255,255,255,.45); }
.ms-compose textarea:focus { background: rgba(255,255,255,.14); }
.ms-send { width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ms-send svg { width: 22px; height: 22px; }
.ms-ic:focus-visible, .ms-th:focus-visible, .ms-send:focus-visible, .ms-file:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 900px) { .ms-sheet { inset: 5vh 50% 5vh auto; width: 560px; transform: translateX(50%) translateY(16px); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.5); } .ms-sheet.show { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .ms-sheet { transition: opacity .01s; } }
