:root {
  --bg: #0b0b0f;
  --bg2: #16161d;
  --bg3: #22222c;
  --fg: #f2f2f5;
  --fg2: #a3a3b0;
  --accent: #ff4d6d;
  --accent2: #ffb84d;
  --nav-h: 60px;
  --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font-family: -apple-system, "Pretendard", "Noto Sans KR", "Segoe UI", Roboto, sans-serif; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }
svg { width: 24px; height: 24px; fill: currentColor; display: block; }

/* 로고: 원형 그라데이션 + 음파 */
.logo-mark { width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent), var(--accent2), var(--accent));
  position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 8px 6px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #0b0b0f 0 2px, transparent 2px 5px); }
.logo-mark.big { width: 72px; height: 72px; margin: 0 auto 12px; }
.logo-mark.big::after { inset: 22px 16px; background: repeating-linear-gradient(90deg, #0b0b0f 0 5px, transparent 5px 12px); }

/* 로그인 */
.login { position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, #2a1220, var(--bg) 60%); }
.login-box { width: min(320px, 86vw); text-align: center; }
.login h1 { margin: 0 0 24px; font-size: 28px; letter-spacing: -0.5px; }
.login input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--bg3);
  background: var(--bg2); color: var(--fg); outline: none; }
.login input:focus { border-color: var(--accent); }
.login button { width: 100%; margin-top: 12px; padding: 14px; border-radius: 12px;
  background: var(--fg); color: #000; font-weight: 700; }
.err { color: var(--accent); min-height: 1.2em; font-size: 14px; }

/* 상단바 / 탭 */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: linear-gradient(var(--bg) 70%, transparent); }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 19px; letter-spacing: -0.4px; }
#view { padding: 0 0 calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 16px); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: flex; background: #101016; border-top: 1px solid #1d1d26; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--fg2); }
.tabs button.active { color: var(--fg); }
.tabs .ti svg { width: 24px; height: 24px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--fg); }
.icon-btn:active { background: #ffffff14; }
.icon-btn.big svg { width: 34px; height: 34px; }

/* 섹션 / 카드 */
.section { margin: 8px 0 24px; }
.section h2 { font-size: 20px; margin: 0 16px 12px; letter-spacing: -0.3px; }
.section .sub { color: var(--fg2); font-size: 13px; margin: -8px 16px 12px; }
.shelf { display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-auto-columns: 88%;
  gap: 4px 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf .row { scroll-snap-align: start; }
.cards { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: 0 0 140px; text-align: left; }
.card img { width: 140px; height: 140px; border-radius: 8px; object-fit: cover; background: var(--bg3); }
.card .t1 { margin-top: 8px; }
.empty { color: var(--fg2); text-align: center; padding: 48px 24px; line-height: 1.6; }

/* 곡 목록 */
.list { list-style: none; margin: 0; padding: 0 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; min-width: 0; }
.row:active { background: #ffffff0d; }
.row img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: var(--bg3); flex: none; }
.row .meta { flex: 1; min-width: 0; }
.t1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2 { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row.now .t1 { color: var(--accent); }
.badge { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent2);
  margin-right: 6px; vertical-align: middle; }
.row .more { color: var(--fg2); }

/* 검색 */
.searchbar { position: sticky; top: 56px; z-index: 4; padding: 4px 16px 12px; background: var(--bg); }
.searchbar form { display: flex; align-items: center; gap: 8px; background: var(--bg2); border-radius: 999px; padding: 0 6px 0 16px; }
.searchbar input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); padding: 12px 0; outline: none; font-size: 16px; }
.chips { display: flex; gap: 8px; padding: 0 16px 12px; }
.chip { padding: 7px 14px; border-radius: 8px; background: var(--bg2); font-size: 14px; }
.chip.active { background: var(--fg); color: #000; }
.hist { padding: 0 8px; }
.hist button { display: flex; width: 100%; gap: 14px; align-items: center; padding: 12px; color: var(--fg2); text-align: left; }

/* 보관함 */
.lib-head { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; }
.lib-actions { display: flex; gap: 10px; padding: 0 16px 12px; }
.pill { padding: 10px 18px; border-radius: 999px; background: var(--fg); color: #000; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.pill.ghost { background: var(--bg2); color: var(--fg); }
.pill svg { width: 18px; height: 18px; }

/* 미니 플레이어 */
.mini { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 9;
  height: var(--mini-h); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 12px; background: #1b1b23; }
.mini img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--bg3); }
.mini-meta { flex: 1; min-width: 0; }
.mini-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #ffffff1a; }
#mini-bar { height: 100%; width: 0; background: var(--fg); }

/* 전체 플레이어 */
.player { position: fixed; inset: 0; z-index: 20; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  background: var(--bg); overflow: hidden; }
.player.open { transform: translateY(0); }
.player-bg { position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(60px) saturate(1.4) brightness(.45); transform: scale(1.2); transition: background-image .4s; }
.player-inner { position: relative; height: 100%; display: flex; flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 24px calc(24px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
.player-top { display: flex; align-items: center; justify-content: space-between; }
.spacer { width: 44px; }
.seg { display: flex; gap: 4px; background: #00000040; border-radius: 999px; padding: 4px; }
.seg button { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--fg2); }
.seg button.active { background: #ffffff26; color: var(--fg); }
.pane { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 16px 0; }
#pane-queue, #pane-lyrics { align-items: stretch; overflow-y: auto; margin: 16px -24px; }
#pane-queue .list { width: 100%; }
.art-wrap { position: relative; width: min(100%, 52vh); aspect-ratio: 1; }
.art-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 20px 60px #0009; background: var(--bg3); }
.spinner { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%;
  border: 4px solid #ffffff40; border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.p-meta { display: flex; align-items: center; gap: 12px; }
.p-titles { flex: 1; min-width: 0; }
.pt1 { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.3px; }
.pt2 { font-size: 16px; color: var(--fg2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like.on { color: var(--accent); }
.seek { margin-top: 18px; }
.seek input { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; outline: none;
  background: linear-gradient(to right, var(--fg) var(--p, 0%), #ffffff33 var(--p, 0%)); }
.seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); }
.seek input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--fg); }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.controls { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.controls .icon-btn.on { color: var(--accent); }
.play-btn { width: 72px; height: 72px; border-radius: 50%; background: var(--fg); color: #000; display: grid; place-items: center; }
.play-btn svg { width: 36px; height: 36px; }

/* 가사 */
.lyrics { padding: 8px 24px 40vh; font-size: 22px; font-weight: 700; line-height: 1.5; color: #ffffff59; white-space: pre-wrap; }
.lyrics .ln { margin: 0 0 14px; transition: color .2s; cursor: pointer; }
.lyrics .ln.on { color: var(--fg); }
.lyrics.plain { color: var(--fg); font-size: 18px; font-weight: 500; }
.lyrics .src { font-size: 12px; color: var(--fg2); font-weight: 400; margin-top: 24px; }

/* 메뉴 시트 */
.sheet { position: fixed; inset: 0; z-index: 30; background: #0008; display: flex; align-items: flex-end; }
.sheet-box { width: 100%; background: #1d1d26; border-radius: 16px 16px 0 0; padding: 8px 0 calc(8px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
.sheet-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #ffffff14; }
.sheet-head img { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; }
.sheet-box > button { display: block; width: 100%; text-align: left; padding: 15px 20px; font-size: 15px; }
.sheet-box > button:active { background: #ffffff0d; }
.sheet-box .muted { color: var(--fg2); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 16px); z-index: 40;
  transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; transition: .2s;
  background: #f2f2f5; color: #000; padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 900px) {
  .shelf { grid-auto-columns: 40%; }
  #view { max-width: 1100px; margin: 0 auto; }
}

/* 아티스트 / 앨범 */
.row .num { width: 32px; text-align: center; color: var(--fg2); font-variant-numeric: tabular-nums; flex: none; }
.row img.round { border-radius: 50%; }
.section h2 .cnt { color: var(--fg2); font-size: 14px; font-weight: 500; margin-left: 4px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; padding: 0 16px; }
.agrid .card img { width: 100%; height: auto; aspect-ratio: 1; }
.agrid .t1, .cards .t1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero { position: relative; height: 300px; margin-top: -60px; background-size: cover; background-position: center 30%; display: flex; align-items: flex-end; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--bg)); }
.hero h1 { position: relative; margin: 0 16px 12px; font-size: 34px; letter-spacing: -0.8px; }
.album-head { text-align: center; padding: 8px 24px 16px; }
.album-head img { width: min(240px, 62vw); aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 40px #0008; background: var(--bg3); }
.album-head h1 { font-size: 24px; margin: 18px 0 6px; letter-spacing: -0.4px; }
.album-head .t2 { white-space: normal; }
.album-head a { color: var(--fg); text-decoration: underline; cursor: pointer; }
.brand .icon-btn { margin-left: -12px; }

/* 눌림/호버 피드백 */
.row, .card, .chip, .pill, .icon-btn, .hist button, .play-btn, .album-head a { cursor: pointer; }
.row, .card, .pill, .chip, .play-btn { transition: transform .12s ease, background-color .15s ease; }
.card img { transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.row:active, .pill:active, .chip:active, .play-btn:active { transform: scale(.97); }
.card:active { transform: scale(.95); }
.icon-btn { transition: background-color .15s ease, transform .12s ease; }
.icon-btn:active { transform: scale(.9); }
@media (hover: hover) {
  .row:hover { background: #ffffff10; }
  .card:hover img { transform: translateY(-3px); filter: brightness(1.12); box-shadow: 0 10px 24px #0009; }
  .card:hover .t1 { text-decoration: underline; }
  .icon-btn:hover { background: #ffffff14; }
  .pill:hover { filter: brightness(1.1); }
  .hist button:hover { color: var(--fg); }
}
.loading-bar { height: 3px; margin: 8px 16px; border-radius: 2px; overflow: hidden; background: #ffffff14; position: relative; }
.loading-bar::after { content: ""; position: absolute; inset: 0; width: 35%; background: var(--accent); border-radius: 2px; animation: lb 1s ease-in-out infinite; }
@keyframes lb { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.album-head .ph { width: min(240px, 62vw); aspect-ratio: 1; margin: 0 auto; border-radius: 8px; background: var(--bg3); }

/* ---- v3: 계정 / 플레이리스트 / 캐러셀 ---- */
.login input + input { margin-top: 10px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 16px 12px; }
.sec-head h2 { margin: 0; }
.sec-head .sub { margin: 4px 0 0; }
.sec-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.see-all { padding: 6px 12px; border: 1px solid #ffffff33; border-radius: 999px; font-size: 13px; color: var(--fg); }
.see-all:hover { background: #ffffff14; }
.pill.sm { padding: 7px 14px; font-size: 14px; }
.pill.danger { background: #ff4d6d; color: #fff; }
.danger-t { color: #ff6b81 !important; }
.tag { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: middle; margin-left: 4px; }
.greet { margin: 4px 16px 20px; font-size: 26px; font-weight: 800; letter-spacing: -0.6px; }
.lib-actions.center { justify-content: center; flex-wrap: wrap; }
select.chip { border: 0; color: var(--fg); appearance: none; -webkit-appearance: none; padding-right: 14px; }

.carousel { position: relative; }
.car-btn { display: none; position: absolute; top: 34%; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: #1d1d26ee; box-shadow: 0 4px 14px #0008; place-items: center; }
.car-btn.prev { left: 4px; } .car-btn.next { right: 4px; }
@media (hover: hover) { .carousel:hover .car-btn { display: grid; } }
.cards { scroll-behavior: smooth; }
.section.expanded .cards { flex-wrap: wrap; overflow: visible; }
.section.expanded .cards .card { flex: 0 0 140px; }
.section.expanded .shelf { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); overflow: visible; }
.section.expanded .car-btn { display: none !important; }
.collapsible:not(.expanded) .list li:nth-child(n+6) { display: none; }
.artist-card { text-align: center; }
.artist-card img { border-radius: 50% !important; }

.hero-text { position: relative; margin: 0 16px 12px; }
.hero-text h1 { margin: 0 0 4px; font-size: 34px; letter-spacing: -0.8px; }
.bio { margin: 0 16px; color: var(--fg2); line-height: 1.7; font-size: 14px; white-space: pre-wrap; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bio.open { -webkit-line-clamp: unset; display: block; }

.edit-btns { display: flex; flex: none; }
.edit-btns .icon-btn { width: 38px; height: 38px; }
.pl-ph { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--bg3); color: var(--fg2); }
.album-head .pl-ph { width: min(240px, 62vw); margin: 0 auto; }
.pl-ph svg { width: 40%; height: 40%; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700;
  background: conic-gradient(from 210deg, var(--accent), var(--accent2), var(--accent)); color: #000; }
.link { cursor: pointer; }
.pt1.link:hover, .pt2.link:hover { text-decoration: underline; }
.spin svg { animation: spin .8s linear infinite; }

.modal { position: fixed; inset: 0; z-index: 50; background: #000a; display: grid; place-items: center; padding: 20px; }
.modal-box { width: min(380px, 100%); background: #1d1d26; border-radius: 14px; padding: 20px; }
.modal-box h3 { margin: 0 0 12px; font-size: 18px; }
.modal-box label { display: block; font-size: 13px; color: var(--fg2); margin-top: 12px; }
.modal-box input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--bg3);
  background: var(--bg2); color: var(--fg); outline: none; font-size: 16px; }
.modal-box input:focus { border-color: var(--accent); }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#menu { z-index: 35; }
.usage { margin: 4px 16px 14px; }
.sheet-head .usage { margin: 8px 0 0; }
.ubar { height: 6px; border-radius: 3px; background: #ffffff1f; overflow: hidden; margin-top: 6px; }
.ubar > div { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 3px; }
.row .meta .ubar { max-width: 220px; height: 4px; }
.chip { white-space: nowrap; flex: none; }
.dl { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--accent2); }
.dl svg { width: 14px; height: 14px; }
.searchbar { position: sticky; }
.suggest { position: absolute; left: 16px; right: 16px; top: calc(100% - 6px); z-index: 6; background: #1d1d26; border-radius: 14px;
  box-shadow: 0 14px 40px #000a; padding: 6px 0; max-height: 70vh; overflow-y: auto; }
.sg-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; text-align: left; color: var(--fg2); }
.sg-row:hover, .sg-row:active { background: #ffffff10; }
.sg-row svg { width: 20px; height: 20px; flex: none; }
.sg-row b { color: var(--fg); }
.sg-item img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: none; background: var(--bg3); }
.sg-item img.round { border-radius: 50%; }
.sg-item .meta { display: flex; flex-direction: column; min-width: 0; }
.sg-item .t1 { color: var(--fg); }
.corrected { margin: 0 16px 14px; color: var(--fg2); font-size: 14px; }
.corrected b { color: var(--fg); }

/* ---- 영상 탭 ---- */
.vchips { padding-top: 0; overflow-x: auto; }
.vnote { margin: 0 16px 14px; color: var(--fg2); font-size: 14px; }
.vgrid { display: grid; grid-template-columns: 1fr; gap: 18px 16px; padding: 0 0 8px; }
@media (min-width: 640px) { .vgrid { grid-template-columns: repeat(2, 1fr); padding: 0 16px; } }
@media (min-width: 1000px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .vgrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 2600px) { .vgrid { grid-template-columns: repeat(5, 1fr); } }
.vcard { cursor: pointer; min-width: 0; }
.vthumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg3); overflow: hidden; }
@media (min-width: 640px) { .vthumb { border-radius: 12px; } }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
@media (hover: hover) { .vcard:hover .vthumb img { transform: scale(1.03); } }
.vdur { position: absolute; right: 6px; bottom: 6px; background: #000c; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 5px; border-radius: 4px; }
.vdur.live { background: #e0002a; }
.vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff55; }
.vprog > div { height: 100%; background: #ff2d4b; }
.vinfo { display: flex; gap: 12px; padding: 10px 12px 0; }
@media (min-width: 640px) { .vinfo { padding: 10px 0 0; } }
.vavatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg3); cursor: pointer; }
.vtext { min-width: 0; }
.vtitle { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { font-size: 13px; color: var(--fg2); margin-top: 4px; line-height: 1.4; }
.vlist { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.vcard.compact { display: flex; gap: 10px; }
.vcard.compact .vthumb { width: 168px; flex: none; border-radius: 8px; }
.vcard.compact .vinfo { padding: 0; }
.vcard.compact .vtitle { font-size: 14px; }
.vcard.compact .vmeta { font-size: 12px; }
.vsubrow { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none; }
.vsubrow::-webkit-scrollbar { display: none; }
.vsubch { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; flex: none; font-size: 11px; color: var(--fg2); }
.vsubch img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bg3); }
.vsubch span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.vchrow { display: flex; align-items: center; gap: 16px; padding: 10px 16px 18px; cursor: pointer; }
.vchrow img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--bg3); }

.watch { display: block; }
@media (min-width: 1000px) {
  .watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr;
    grid-template-areas: "player side" "main side"; column-gap: 24px; padding: 0 16px; align-items: start; }
  .watch > .wplayer { grid-area: player; } .watch > .wmain { grid-area: main; } .watch > .wside { grid-area: side; }
  /* 시네마 모드: 플레이어가 가로 전체, 다음 동영상은 아래 오른쪽 */
  .watch.theater { grid-template-areas: "player player" "main side"; padding: 0; }
  .watch.theater > .wplayer { aspect-ratio: auto; height: min(calc((100vw - var(--side-w, 0px)) * .5625), calc(100vh - 150px)); border-radius: 0; }
  .watch.theater .wmain, .watch.theater .wside { margin-top: 4px; }
  .watch.theater .wmain { padding-left: 16px; }
  .watch.theater .wside { padding-right: 16px; }
}
.wplayer:fullscreen { border-radius: 0; }
.wplayer:fullscreen video { width: 100%; height: 100%; }
.wplayer { position: relative; background: #000; aspect-ratio: 16 / 9; position: sticky; top: 56px; z-index: 4; }
@media (min-width: 1000px) { .wplayer { position: relative; top: 0; border-radius: 12px; overflow: hidden; } }
.wplayer video { width: 100%; height: 100%; background: #000; display: block; }
.wplayer .spinner { pointer-events: none; }
.wq { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 8px 12px 0; min-height: 8px; flex-wrap: wrap; }
.wmode { margin-right: auto; font-size: 12px; max-width: 70%; white-space: normal; }
.wcine.on { background: var(--fg); color: #000; }
.wtitle { font-size: 19px; line-height: 1.35; margin: 6px 12px 6px; letter-spacing: -0.2px; }
.wstats { margin: 0 12px; color: var(--fg2); font-size: 13px; }
.wchannel { display: flex; align-items: center; gap: 12px; margin: 14px 12px; }
.wchannel img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; cursor: pointer; background: var(--bg3); }
.wchname { flex: 1; min-width: 0; cursor: pointer; }
.wdesc { margin: 0 12px 16px; padding: 12px; border-radius: 12px; background: var(--bg2); font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; max-height: 5.2em; overflow: hidden; cursor: pointer; overflow-wrap: anywhere; }
.wdesc.open { max-height: none; }
.wside h3, .wcomments h3 { margin: 8px 12px 12px; font-size: 16px; }
@media (min-width: 1000px) { .wside .vlist { padding: 0; } .wside h3 { margin-left: 0; } }
.wcomments { margin-bottom: 24px; }
.cmt { display: flex; gap: 12px; padding: 8px 12px; }
.cmt img { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--bg3); }
.cmt-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; margin: 2px 0; overflow-wrap: anywhere; }
.vbanner { height: 120px; background-size: cover; background-position: center; }
@media (min-width: 900px) { .vbanner { height: 200px; margin: 0 16px; border-radius: 12px; } }
.vchhead { display: flex; align-items: center; gap: 16px; padding: 16px; }
.vchhead img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--bg3); }
.vchhead h1 { margin: 0 0 4px; font-size: 22px; }
.vchhead > div { flex: 1; min-width: 0; }

/* ---- v18: 영상 중심 + 유튜브식 사이드바 ---- */
.vavatar.ph { display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: #3a3a48; }
.vdot { display: none; }
.mnav { padding: 4px 16px 12px; overflow-x: auto; }
.vfhead { align-items: center; }
.vfhead .pill svg { width: 16px; height: 16px; }
.vtop form { max-width: 720px; margin: 0 auto; }
.vchips { justify-content: flex-start; }
.side { display: none; }
.side-i { display: flex; align-items: center; gap: 20px; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14px; text-align: left; color: var(--fg); }
.side-i svg { width: 22px; height: 22px; flex: none; }
.side-i span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.side-i:hover { background: #ffffff14; }
.side-i.on { background: #ffffff1f; font-weight: 700; }
.side-ch img, .side-ch .vavatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; font-size: 11px; }
.side .dot { width: 6px; height: 6px; border-radius: 50%; background: #3ea6ff; flex: none; }
.side hr { border: 0; border-top: 1px solid #ffffff1a; margin: 10px 0; }
.side-h { display: flex; align-items: center; gap: 4px; padding: 8px 12px 4px; font-size: 16px; font-weight: 700; color: var(--fg); }
.side-h svg { width: 18px; height: 18px; }
.side-note { padding: 6px 12px; font-size: 12px; color: var(--fg2); line-height: 1.5; }
@media (min-width: 1000px) {
  :root { --nav-h: 0px; --side-w: 232px; }
  .tabs { display: none; }
  .side { display: block; position: fixed; top: 64px; left: 0; bottom: 0; width: var(--side-w); overflow-y: auto;
    padding: 4px 12px 100px; z-index: 4; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
  #view, .mnav, .msearch { margin-left: var(--side-w) !important; margin-right: 0 !important; }
  #view { max-width: none; padding-left: 8px; padding-right: 24px; }
  body:not(.vmode) #view { max-width: 1100px; }
  .mini { left: var(--side-w); }
  .vsubrow { display: none; }
}

.imgph { border-radius: 50%; display: grid; place-items: center; }

/* ---- v22: 좁은 화면에서 ☰ 로 여는 사이드바 서랍 ---- */
.side-dim { display: none; }
@media (max-width: 999px) {
  body.side-open .side { display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 26; width: min(280px, 82vw);
    overflow-y: auto; background: #101016; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(24px + var(--safe-b));
    box-shadow: 8px 0 30px #000a; animation: side-in .18s ease-out; }
  body.side-open .side-dim { display: block; position: fixed; inset: 0; z-index: 25; background: #0009; }
}
@keyframes side-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (min-width: 1000px) { #btn-menu { display: none; } }
.brand #btn-menu { margin-left: -12px; margin-right: -4px; }
.brand #btn-back:not(.hidden) + #btn-menu { margin-left: -8px; }

/* ---- v23: 영상 위 화질·시네마 버튼 ---- */
.wov { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.wplayer:hover .wov, .wplayer.show-ov .wov, .wplayer.paused .wov { opacity: 1; pointer-events: auto; }
.wov-b { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border-radius: 18px; background: #000b; color: #fff; font-size: 13px; font-weight: 600; }
.wov-b svg { width: 20px; height: 20px; }
.wov-b:hover { background: #000e; }
.wov-b.on { background: #fff; color: #000; }
.wqmenu { position: absolute; top: 52px; right: 10px; z-index: 4; min-width: 170px; max-width: 80%; background: #1d1d26f2; border-radius: 10px; padding: 6px 0; box-shadow: 0 10px 30px #000a; }
.wqmenu button { display: block; width: 100%; text-align: left; padding: 9px 16px; font-size: 14px; }
.wqmenu button:hover { background: #ffffff14; }
.wqmenu button.on { font-weight: 700; }
.wqmenu button.on::after { content: " ✓"; }
.wqnote { padding: 8px 16px 4px; font-size: 11px; color: var(--fg2); line-height: 1.5; border-top: 1px solid #ffffff14; }
.wqmenu .wqnote:first-child { border-top: 0; }

/* ---- v24: 자막 ---- */
#wccbtn { font-weight: 800; letter-spacing: .5px; }
.wplayer video::cue { font-size: 1.15em; line-height: 1.35; background: #000000b8; color: #fff; }

/* ---- v24: 유튜브식 재생 컨트롤 ---- */
.wov { display: none; }
.wplayer { user-select: none; -webkit-user-select: none; }
.wplayer.idle, .wplayer.idle video { cursor: none; }
.wctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 28px 12px 4px;
  background: linear-gradient(transparent, #000000b0); transition: opacity .25s; }
.wplayer.idle .wctl { opacity: 0; pointer-events: none; }
.wbar { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.wbar-in { position: relative; width: 100%; height: 3px; background: #ffffff40; transition: height .1s; }
.wbar:hover .wbar-in, .wplayer.seeking .wbar-in { height: 5px; }
.wbuf { position: absolute; left: 0; top: 0; bottom: 0; background: #ffffff66; }
.wplayed { position: absolute; left: 0; top: 0; bottom: 0; background: #f00; }
.wknob { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #f00; transform: scale(0); transition: transform .1s; }
.wbar:hover .wknob, .wplayer.seeking .wknob { transform: scale(1); }
@media (hover: none) { .wknob { transform: scale(1); } }
.wtip { position: absolute; bottom: 20px; transform: translateX(-50%); background: #000c; color: #fff; font-size: 12px; padding: 3px 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.wrow { display: flex; align-items: center; gap: 2px; height: 44px; color: #fff; }
.wc { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; flex: none; }
.wc svg { width: 26px; height: 26px; filter: drop-shadow(0 0 2px #0008); }
.wc:hover { background: #ffffff1a; }
.wc.on { color: #fff; } .wc.on::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 6px; height: 2px; background: #f00; border-radius: 1px; }
.wsp { flex: 1; }
.wtime { font-size: 13px; color: #eee; margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 0 2px #000; }
.wlive { cursor: pointer; font-weight: 700; } .wlive::first-letter { color: #f00; } .wlive.behind::first-letter { color: #aaa; }
.wvol { display: flex; align-items: center; }
.wvol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, #fff var(--p, 100%), #ffffff40 var(--p, 100%)); outline: none; }
.wvol:hover input, .wvol:focus-within input { width: 70px; opacity: 1; margin: 0 6px; }
.wvol input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.wvol input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
@media (hover: none) { .wvol input { display: none; } }
.wqbadge:empty { display: none; }
.wqbadge { position: absolute; top: 6px; right: 3px; background: #f00; color: #fff; font-size: 8px; font-weight: 800; padding: 1px 2px; border-radius: 2px; line-height: 1; }
.wqmenu { top: auto; bottom: 64px; right: 12px; }
@media (max-width: 600px) { .wc { width: 38px; height: 38px; } .wc svg { width: 23px; height: 23px; } #wc-next { display: none; } .wctl { padding: 20px 6px 2px; } }
.wplayer:fullscreen .wctl { padding: 40px 24px 10px; }

/* ---- v29: 라이브 ---- */
.livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f00; margin-right: 6px; vertical-align: middle; animation: lpulse 1.6s infinite; }
@keyframes lpulse { 50% { opacity: .35; } }
.side-live { font-style: normal; font-size: 9px; font-weight: 800; color: #fff; background: #f00; border-radius: 3px; padding: 1px 4px; flex: none; }
.ctabs { padding: 0 16px 14px; }

/* ---- v30: 두 번 탭 이동, 작은 화면 ---- */
.wseek { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; background: #0009; color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 24px; pointer-events: none; animation: wseekin .15s ease-out; }
.wseek.l { left: 12%; } .wseek.r { right: 12%; }
@keyframes wseekin { from { opacity: 0; transform: translateY(-50%) scale(.8); } }
@media (hover: none) { .wplayer video { touch-action: pan-x pinch-zoom; } }
#vmini { position: fixed; z-index: 12; right: 12px; bottom: calc(var(--nav-h) + var(--mini-h, 0px) + 12px + var(--safe-b));
  width: 360px; background: #1a1a22; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px #000c; display: grid;
  grid-template-columns: 1fr auto auto; grid-template-rows: auto auto; align-items: center; }
#vmini .wplayer { grid-column: 1 / -1; position: relative; aspect-ratio: 16 / 9; width: 100%; height: auto !important; margin: 0; top: 0; border-radius: 0; cursor: pointer; }
#vmini .wctl, #vmini .wqmenu, #vmini .wseek, #vmini .spinner { display: none !important; }
#vmini .vm-info { min-width: 0; padding: 8px 4px 8px 12px; cursor: pointer; display: flex; flex-direction: column; }
#vmini .vm-info b, #vmini .vm-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
@media (max-width: 999px) {
  #vmini { left: 0; right: 0; width: auto; border-radius: 0; grid-template-columns: 120px 1fr auto auto; grid-template-rows: 68px; bottom: calc(var(--nav-h) + var(--mini-h, 0px) + var(--safe-b)); }
  #vmini .wplayer { grid-column: 1; height: 68px !important; aspect-ratio: auto; }
}
/* 음악 미니 플레이어가 없을 때는 영상 작은 화면을 아래 탭 바로 위에 */
body:has(#mini.hidden) #vmini { bottom: calc(var(--nav-h) + 12px + var(--safe-b)); }
@media (max-width: 999px) { body:has(#mini.hidden) #vmini { bottom: calc(var(--nav-h) + var(--safe-b)); } }

/* ---- v31: 아래 막대는 마지막에 튼 것 하나만 ---- */
body:has(.watch) #mini, body.has-vmini #mini { display: none !important; }
#mini, #vmini { touch-action: pan-x; }
body.mini-off #mini { display: none !important; }
body.mini-off #vmini { bottom: calc(var(--nav-h) + 12px + var(--safe-b)); }
@media (max-width: 999px) { body.mini-off #vmini { bottom: calc(var(--nav-h) + var(--safe-b)); } }

/* ---- v33: 떠 있는 작은 창 (PIP 처럼) ---- */
#vmini { display: block !important; left: auto !important; width: min(46vw, 380px) !important; border-radius: 10px !important; overflow: hidden;
  grid-template-columns: none !important; grid-template-rows: none !important; touch-action: none; cursor: grab; transition: box-shadow .2s; }
@media (max-width: 999px) { #vmini { right: 12px; bottom: calc(var(--nav-h) + 12px + var(--safe-b)); } }
#vmini.drag { cursor: grabbing; box-shadow: 0 16px 40px #000e; }
#vmini .wplayer { aspect-ratio: 16 / 9 !important; height: auto !important; width: 100%; pointer-events: none; }
#vmini .vm-ov { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 6px;
  background: #0006; opacity: 0; transition: opacity .2s; pointer-events: none; }
#vmini:hover .vm-ov, #vmini.ov .vm-ov { opacity: 1; pointer-events: auto; }
#vmini .vm-b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #000a; color: #fff; }
#vmini .vm-b svg { width: 20px; height: 20px; }
.wcmore { padding: 14px 0 24px; text-align: center; color: var(--fg2); font-size: 13px; cursor: pointer; }

/* ---- v34: 댓글 카드·창, 구간, 오프라인 저장, 시청 화면 사이드바 숨김 ---- */
.wcom-card { display: block; width: calc(100% - 24px); margin: 4px 12px 20px; text-align: left; background: var(--bg2, #1c1c24); border-radius: 12px; padding: 12px 14px; }
.wcom-h { font-weight: 700; font-size: 15px; margin-bottom: 8px; } .wcom-h .t2 { font-weight: 400; margin-left: 4px; }
.wcom-first { display: flex; gap: 10px; align-items: center; }
.wcom-first img, .wcom-first .vavatar { width: 26px; height: 26px; border-radius: 50%; flex: none; font-size: 11px; background: var(--bg3); }
.wcom-first span { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#csheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #15151c; border-radius: 14px 14px 0 0; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .2s ease-out; box-shadow: 0 -10px 30px #0009; }
#csheet.on { transform: none; }
.csheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 10px 16px; border-bottom: 1px solid #ffffff14; touch-action: none; }
.csheet-head .t2 { font-weight: 400; margin-left: 4px; }
.csheet-grab { position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #ffffff40; }
.csheet-body { flex: 1; overflow-y: auto; padding: 8px 0 calc(24px + var(--safe-b)); overscroll-behavior: contain; }
body.csheet-open { overflow: hidden; }
.wgap { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1.5px; background: #000; z-index: 1; }
.wchap { color: #eee; font-size: 13px; margin-left: 6px; padding: 4px 10px; border-radius: 14px; background: #ffffff1f; max-width: 34%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; }
.wchap span { opacity: .7; }
.wtip b { font-weight: 600; }
.wchmenu { max-height: 60%; overflow-y: auto; left: 12px; right: auto; }
.wchmenu button .t2 { margin-right: 6px; font-variant-numeric: tabular-nums; }
.wacts { display: flex; gap: 8px; padding: 2px 12px 12px; overflow-x: auto; scrollbar-width: none; }
.wact { display: flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: #ffffff1a; font-size: 14px; font-weight: 600; }
.wact svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .wchap { display: none; } }
/* 영상 보는 화면 (넓은 화면): 사이드바는 숨기고 ☰ 로 열기 */
@media (min-width: 1000px) {
  body.vwatch .side { display: none; }
  body.vwatch #view, body.vwatch .mnav, body.vwatch .msearch { margin-left: 0 !important; }
  body.vwatch #btn-menu { display: grid; }
  body.vwatch.side-open .side { display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 26; width: 260px; background: #101016;
    padding: 16px 12px 24px; box-shadow: 8px 0 30px #000a; animation: side-in .18s ease-out; }
  body.vwatch.side-open .side-dim { display: block; position: fixed; inset: 0; z-index: 25; background: #0009; }
  body.vwatch .mini { left: 0; }
}

/* ---- v35: 화면의 ← 버튼은 없앰 (휴대폰·브라우저 뒤로 가기로 충분) ---- */
#btn-back { display: none !important; }
.brand #btn-menu { margin-left: -12px !important; }

/* ---- v36: ⋮ 메뉴, 숨긴 항목 ---- */
.vinfo { position: relative; }
.vmore { flex: none; width: 32px; height: 32px; margin: -4px -6px 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--fg2); align-self: flex-start; }
.vmore svg { width: 20px; height: 20px; }
.vmore:hover { background: #ffffff14; color: var(--fg); }
@media (hover: hover) { .vcard .vmore { opacity: 0; } .vcard:hover .vmore { opacity: 1; } }
.hnote { padding: 0 16px 8px; font-size: 12px; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.hrow img, .hrow .hph { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg3); }
.hrow img.round { width: 44px; height: 44px; border-radius: 50%; }
.hrow span { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- v36: 작은 창 버튼 (유튜브 작은 창처럼) ---- */
#vmini { background: #1c1c24; }
#vmini .vm-vid { position: relative; }
#vmini .vm-ov { display: block; padding: 0; }
#vmini .vm-tl { position: absolute; left: 6px; top: 6px; }
#vmini .vm-tr { position: absolute; right: 6px; top: 6px; }
#vmini .vm-c { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
#vmini .vm-c .vm-b { pointer-events: auto; }
#vmini .vm-big { width: 48px; height: 48px; } #vmini .vm-big svg { width: 30px; height: 30px; }
#vmini .vm-sk { font-size: 12px; font-weight: 700; }
#vmini .vm-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff3; pointer-events: none; }
#vmini .vm-prog i { display: block; height: 100%; width: 0; background: #f00; }
#vmini .vm-bar { display: flex; align-items: center; gap: 2px; padding: 6px 4px 6px 10px; }
#vmini .vm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#vmini .vm-t b, #vmini .vm-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vmini .vm-t b { font-size: 13px; } #vmini .vm-t span { font-size: 12px; color: var(--fg2); }
#vmini .vm-bar .vm-b { background: transparent; flex: none; }
#vmini .vm-bar .vm-b:hover { background: #fff2; }
#vmini .vm-ov, #vmini .vm-prog { z-index: 6; }  /* .wplayer 가 z-index 4 라 그 위로 */

/* ---- v40: 설정 메뉴(유튜브식), 자막 크기, 시간 링크, 부드러운 전환, 누를 때 반응 ---- */
.wqmenu .wqrow { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.wqmenu .wqrow .t2 { font-size: 13px; white-space: nowrap; }
.wqmenu .wqback { font-weight: 700; border-bottom: 1px solid #ffffff1a; margin-bottom: 4px; }
.wqmenu { max-height: calc(100% - 72px); overflow-y: auto; min-width: 220px; }
.wplayer video[data-cc="s"]::cue { font-size: .85em; }
.wplayer video[data-cc="m"]::cue { font-size: 1.15em; }
.wplayer video[data-cc="l"]::cue { font-size: 1.5em; }
.wplayer video[data-cc="xl"]::cue { font-size: 1.9em; }
a.wts { color: #3ea6ff; cursor: pointer; text-decoration: none; }
a.wts:hover { text-decoration: underline; }
@media (max-width: 999px) { .watch > .wplayer { touch-action: none; } }
.watch { will-change: auto; }
.watch.enter .wmain, .watch.enter .wside { animation: wenter .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes wenter { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
#vmini.snap { transition: right .26s cubic-bezier(.2,.8,.2,1), bottom .26s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.vcard { transition: transform .12s ease; }
.vcard:active { transform: scale(.975); }
.wact, .pill, .wc, .vm-b, .icon-btn { transition: transform .1s ease, background-color .15s; }
.wact:active, .pill:active, .wc:active, .vm-b:active, .icon-btn:active { transform: scale(.92); }
.wplayer .wctl .wrow, .wplayer .wbar { transition: opacity .25s; }

/* ---- v41: 유튜브 계정 연동 ---- */
.vhchips { margin: 4px 0 6px; }
.vhmark { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: 13px; cursor: pointer; }
.vhmark input { width: 16px; height: 16px; accent-color: #3ea6ff; }
.wact.on { background: #fff; color: #000; }
.wact.on svg { fill: #000; }

.vhwarn { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #3a2a10; color: #ffd8a0; font-size: 13px; line-height: 1.55; }

.vhday { font-size: 16px; font-weight: 700; margin: 14px 0 6px; }
.vhday:first-of-type { margin-top: 4px; }

.brand-home { display: flex; align-items: center; gap: 10px; font: inherit; color: inherit; background: none; border: 0; padding: 4px 6px 4px 2px; border-radius: 8px; cursor: pointer; }
.brand-home:active { transform: scale(.97); }

/* ---- v52: 음악 - 곡 추가 창, 좋아요, 자동 재생 ---- */
#picker { position: fixed; inset: 0; z-index: 40; background: var(--bg, #0b0b0f); display: flex; flex-direction: column; }
#picker .pk-head { display: flex; gap: 6px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid #ffffff12; }
#picker form { flex: 1; }
#picker input { width: 100%; padding: 11px 14px; border-radius: 22px; border: 0; background: var(--bg2, #1c1c24); color: inherit; font-size: 15px; }
#pk-res { flex: 1; overflow-y: auto; padding: 6px 0 calc(20px + env(safe-area-inset-bottom)); }
#picker .pk-add.done { color: #3ea6ff; }
.pl-addrow { width: 100%; text-align: left; background: none; border: 0; color: inherit; }
.pl-addrow .ph-sq { width: 48px; height: 48px; border-radius: 6px; background: var(--bg2, #1c1c24); display: grid; place-items: center; flex: none; }
.pl-addrow .ph-sq svg { width: 24px; height: 24px; }
.pill.on svg { fill: #ff4d6d; }
.qauto { display: flex; gap: 10px; align-items: center; padding: 10px 16px; font-size: 13px; color: var(--fg2); cursor: pointer; }
.qauto input { width: 18px; height: 18px; accent-color: #3ea6ff; flex: none; }
.qauto b { color: var(--fg); }

/* ---- v52: 영상 가운데 버튼 3개 (휴대폰·태블릿) ---- */
.wcenter { display: none; }
@media (hover: none) {
  .wcenter { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 12vw;
    background: #00000052; transition: opacity .2s; pointer-events: none; }
  .wplayer.idle .wcenter { opacity: 0; }
  .wplayer:not(.idle) .wcenter .wcb { pointer-events: auto; }
  .wcb { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #0000005c; color: #fff; border: 0; }
  .wcb svg { width: 30px; height: 30px; fill: #fff; }
  .wcb.big { width: 68px; height: 68px; } .wcb.big svg { width: 42px; height: 42px; }
  .wcb.off { opacity: .35; }
  .wcb:active { transform: scale(.9); }
  #vmini .wcenter { display: none !important; }
  .wplayer:fullscreen .wcenter { gap: 16vw; }
}

/* ---- v54: 터치 기기 표시, 앱 안 전체 화면 ---- */
body.touchui .wcenter { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 12vw;
  background: #00000052; transition: opacity .2s; pointer-events: none; }
body.touchui .wplayer.idle .wcenter { opacity: 0; }
body.touchui .wplayer:not(.idle) .wcenter .wcb { pointer-events: auto; }
body.touchui .wcb { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #0000005c; color: #fff; border: 0; }
body.touchui .wcb svg { width: 30px; height: 30px; fill: #fff; }
body.touchui .wcb.big { width: 68px; height: 68px; } body.touchui .wcb.big svg { width: 42px; height: 42px; }
body.touchui .wcb.off { opacity: .35; }
body.touchui #vmini .wcenter { display: none !important; }
body.pfs { overflow: hidden; }
body.pfs .watch > .wplayer { position: fixed !important; inset: 0 !important; top: 0 !important; z-index: 70 !important; width: 100vw !important; height: 100dvh !important;
  max-height: none !important; aspect-ratio: auto !important; margin: 0 !important; border-radius: 0 !important; background: #000; }
body.pfs .watch > .wplayer video { width: 100%; height: 100%; object-fit: contain; }
body.pfs #top, body.pfs header, body.pfs #mnav, body.pfs .tabs, body.pfs #mini { visibility: hidden; }

/* ---- v56: 재생목록 화면 · 재생목록 이어 보기 ---- */
.plhead { display: flex; gap: 16px; align-items: flex-end; padding: 16px; }
.plhead img { width: 200px; max-width: 42vw; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: var(--bg2, #1c1c24); flex: none; }
.plhead h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; }
.plmeta { min-width: 0; }
.plbtns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .plhead { flex-direction: column; align-items: stretch; } .plhead img { width: 100%; max-width: none; } }
.vdur svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; fill: currentColor; }
.plq { border: 1px solid #ffffff1f; border-radius: 12px; margin: 0 12px 16px; overflow: hidden; }
@media (min-width: 1000px) { .plq { margin: 0 0 16px; } }
.plq-h { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 12px; background: #ffffff0d; }
.plq-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plq-list { max-height: 340px; overflow-y: auto; padding: 4px 0; }
.plq-list .vcard.cur { background: #ffffff1a; border-radius: 8px; }

/* ---- v57: 아래로 당겨서 새로고침(크롬 기본 동작) 끄기 — 음악 플레이어 쓸어내리기·영상 화면과 겹쳐서 불필요 ---- */
html, body { overscroll-behavior-y: none; }
#player, .pane, #queue-list, #picker, #pk-res { overscroll-behavior: contain; }

/* ---- v58: 앱 안 '당겨서 새로고침' 표시 ---- */
#ptr { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 30; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg2, #1c1c24); box-shadow: 0 2px 10px #0008; opacity: 0; transform: translate(-50%, -50px); pointer-events: none; }
#ptr svg { width: 22px; height: 22px; fill: var(--fg2, #aaa); }
#ptr.ready svg { fill: #3ea6ff; }
#ptr.spin svg { fill: #3ea6ff; animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* ---- v60: 가사 줄은 글자 부분만 눌리게 (오른쪽 빈 곳을 눌러도 이동하던 문제) ---- */
.lyrics .ln { width: fit-content; max-width: 100%; }

/* v61 혹등고래 로고 */
.brand-home .whale { height: 28px; width: auto; display: block; flex: none; }
.whale.big { display: block; height: 84px; width: auto; margin: 0 auto 26px; }

/* v64 음악 검색창을 영상 탭처럼 맨 위에 */
.msearch + .mnav { padding-top: 0; }

/* v66 연결 설정 화면 */
.setup { padding: 8px 16px 40px; max-width: 760px; }
.setup h2 { margin: 8px 0 4px; }
.setup-card { background: var(--bg2); border-radius: 16px; padding: 14px 16px; margin: 14px 0; line-height: 1.55; }
.setup-card h3 { margin: 0 0 6px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.setup-card p { margin: 6px 0; }
.setup-card ol { margin: 6px 0 10px; padding-left: 20px; }
.setup-card li { margin: 4px 0; }
.setup-card a.pill, .setup-card label.pill { display: inline-flex; text-decoration: none; cursor: pointer; }
.setup .st { font-size: 13px; font-weight: 500; }
.setup .st.ok { color: #4ade80; } .setup .st.warn { color: #ffb84d; } .setup .st.no { color: #9a9aa6; }
.setup-card ul { margin: 6px 0; padding-left: 20px; }
.setup-card ul li { margin: 4px 0; }

/* v70 채널 안 검색 */
.ctabs .csbtn { padding-left: 12px; padding-right: 12px; }
.ctabs .csbtn svg { width: 18px; height: 18px; vertical-align: middle; }
.csearch { position: static; }
.vchips .vt-edit svg { width: 16px; height: 16px; vertical-align: middle; }
.modal-box textarea { width: 100%; box-sizing: border-box; background: var(--bg2); color: var(--fg); border: 1px solid #ffffff22; border-radius: 10px; padding: 8px; font: 12px/1.4 monospace; margin-top: 6px; }

/* v79 작은 창: 더 크게, 버튼은 크게 보기·닫기·재생만 (끌어서 옮기거나 내려서 닫기 쉽게) */
#vmini { width: min(64vw, 440px) !important; }
@media (min-width: 1000px) { #vmini { width: min(34vw, 440px) !important; } }
#vmini .vm-b { width: 30px; height: 30px; }
#vmini .vm-b svg { width: 18px; height: 18px; }
#vmini .vm-big { width: 44px; height: 44px; }
#vmini .vm-ov { background: #0004; }
/* 버튼이 안 보일 때(작은 창을 처음 누를 때)는 가운데 재생 버튼이 눌리지 않게 */
#vmini .vm-c .vm-b { pointer-events: none; }
#vmini:hover .vm-c .vm-b, #vmini.ov .vm-c .vm-b { pointer-events: auto; }
@media (hover: none) { #vmini:hover:not(.ov) .vm-c .vm-b { pointer-events: none; } #vmini:hover:not(.ov) .vm-ov { opacity: 0; pointer-events: none; } }
.wcom-first .imgph { border-radius: 50%; display: grid; place-items: center; font-size: 14px; }

/* v85 휴대폰: 검색창은 위쪽 돋보기를 눌러야 펼쳐짐 */
.top-r { display: flex; align-items: center; gap: 2px; }
#btn-search { display: none; }
@media (max-width: 999px) {
  #btn-search { display: grid; }
  body:not(.search-open) .searchbar.vtop, body:not(.search-open) #msearch { display: none !important; }
}
/* v86 안내 상자(토스트): 가로로 길게, 반투명 유리처럼 */
.toast { width: min(92vw, 560px); max-width: none; box-sizing: border-box; text-align: center;
  background: rgba(18, 18, 24, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .10);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-radius: 14px; padding: 11px 18px; font-size: 14px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

/* v87 화면 오른쪽이 잘리던 문제: 가로로 넘치는 것 막기 */
html, body { overflow-x: clip; }
.cmt > div { min-width: 0; flex: 1; }
.wdesc, .wtitle { overflow-wrap: anywhere; }

/* v88 아티스트·앨범 위 버튼: 한 줄로 작게 */
.lib-actions { flex-wrap: wrap; }
.lib-actions .pill { white-space: nowrap; font-size: 14px; padding: 8px 14px; }
.lib-actions .pill svg { width: 17px; height: 17px; }
.pill.on svg { color: #ff4d6d; fill: #ff4d6d; }

/* v90: 저화질 → 고화질 끊김 없이 (뒤에서 받아 둔 고화질 '다리' 영상, 멈춘 장면 덮개) */
.wplayer video.wbridge, .wplayer canvas.wfreeze { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; z-index: 1; }
.wplayer video.wbridge { opacity: 0; }
.wplayer video.wbridge.on { opacity: 1; }
.wplayer.hdswap #wspin { display: none; }

/* v91: 처음 불러올 때는 썸네일만 (돌아가는 표시 없음) */
.wplayer #wspin { display: none; }

/* v93: 피드 미리보기 (카드 썸네일 위에서 소리 없이) */
.vthumb video.vpv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; pointer-events: none; background: transparent; }
.vthumb.pv-on video.vpv { opacity: 1; }
.vthumb.pv-on .vdur { opacity: 0; transition: opacity .3s; }

/* ---- v96: 쇼츠 (세로로 넘기는 영상) ---- */
body.shorts-on .topbar, body.shorts-on #mini, body.shorts-on #msearch { display: none !important; }
body.shorts-on #view { padding: 0; }
.shorts { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 3; background: #000;
  overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.shorts::-webkit-scrollbar { display: none; }
.sh-s { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
.sh-th, .sh-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sh-v { opacity: 0; transition: opacity .15s; }
.sh-s.ready .sh-v { opacity: 1; }
.sh-v.wide { object-fit: contain; }
.sh-load { position: absolute; inset: 0; display: grid; place-items: center; }
.sh-s::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; pointer-events: none;
  background: linear-gradient(transparent, #000000a8); }
.sh-info { position: absolute; left: 12px; right: 76px; bottom: 18px; z-index: 2; color: #fff; text-shadow: 0 1px 3px #0009; }
.sh-ch { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; padding: 0; margin-bottom: 8px; font-size: 14px; }
.sh-ch img, .sh-ch .vavatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.sh-title { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-acts { position: absolute; right: 6px; bottom: 18px; z-index: 2; display: flex; flex-direction: column; gap: 14px; }
.sh-a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 60px; background: none; border: 0; color: #fff; font-size: 11.5px; text-shadow: 0 1px 3px #0009; }
.sh-a svg { width: 26px; height: 26px; fill: #fff; padding: 11px; box-sizing: content-box; border-radius: 50%; background: #ffffff26; backdrop-filter: blur(6px); }
.sh-a.on svg { fill: #3ea6ff; background: #ffffff40; }
.sh-a:active svg { transform: scale(.9); }
.sh-paused { position: absolute; left: 50%; top: 50%; z-index: 2; width: 72px; height: 72px; margin: -36px; border-radius: 50%; background: #0007;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s; pointer-events: none; }
.sh-paused svg { width: 40px; height: 40px; fill: #fff; }
.sh-s.ready.paused .sh-paused { opacity: 1; }
.sh-prog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: #ffffff33; }
.sh-prog i { display: block; height: 100%; width: 0; background: #fff; }
@media (min-width: 1000px) {
  body.shorts-on .topbar { display: flex !important; }
  .shorts { top: 64px; bottom: 12px; left: calc(var(--side-w) + (100% - var(--side-w)) / 2); right: auto; width: min(480px, calc((100vh - 76px) * 9 / 16 + 80px)); transform: translateX(-50%); border-radius: 12px; }
}
/* 쇼츠 댓글 창이 열리면 영상을 위쪽 남은 칸에 맞춰 줄임 (유튜브처럼) */
body.shorts-on.csheet-open .sh-s.playing .sh-v, body.shorts-on.csheet-open .sh-s.playing .sh-th { bottom: auto; height: 32vh; object-fit: contain; transition: height .2s; }
body.shorts-on.csheet-open .sh-s.playing :is(.sh-info, .sh-acts, .sh-prog, .sh-paused) { visibility: hidden; }
body.shorts-on.csheet-open .shorts { overflow: hidden; }
/* v98: 미리보기 소리 버튼 (썸네일 오른쪽 위) */
.vthumb .pv-snd { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #000a; display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.vthumb.pv-on .pv-snd { opacity: 1; }
.vthumb .pv-snd svg { width: 20px; height: 20px; fill: #fff; }

/* v100: 앱 작은 창(PiP) — 재생 중인 영상만 꽉 차게 */
html.pip, html.pip body { background: #000 !important; overflow: hidden !important; }
html.pip body * { visibility: hidden !important; }
html.pip #vplayer, html.pip .wbridge.on, html.pip .sh-s.playing .sh-v { visibility: visible !important; position: fixed !important; left: 0 !important; top: 0 !important;
  right: auto !important; bottom: auto !important; width: 100vw !important; height: 100vh !important; z-index: 2147483000 !important;
  object-fit: contain !important; background: #000 !important; transform: none !important; opacity: 1 !important; margin: 0 !important; }
html.pip .wbridge.on { z-index: 2147483001 !important; }

/* v100: 작은 창을 화면 끝에 걸쳐 두기 */
#vmini.stash { box-shadow: none; }
#vmini.stash::after { content: ''; position: absolute; top: 0; bottom: 0; width: 44px; background: #000a; z-index: 7; pointer-events: none; }
#vmini.sr::after { left: 0; } #vmini.sl::after { right: 0; }
#vmini.stash::before { position: absolute; top: 50%; z-index: 8; margin-top: -14px; width: 44px; text-align: center; font-size: 26px; line-height: 28px; color: #fff; pointer-events: none; }
#vmini.sr::before { content: '‹'; left: 0; } #vmini.sl::before { content: '›'; right: 0; }
#vmini.stash .vm-ov { opacity: 0 !important; pointer-events: none !important; }
.wdesc.wait { visibility: hidden; }

/* ---- v103: 쇼츠 탭에 있는 동안 보던 영상(작은 창) 숨김 · 기록의 쇼츠 묶음 ---- */
body.vmini-held #vmini { display: none !important; }
.vhsh { margin: 0 0 14px; border-radius: 12px; background: var(--bg2); overflow: hidden; }
.vhsh-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; text-align: left; color: var(--fg); }
.vhsh-head svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.vhsh-head b { font-size: 15px; }
.vhsh-head .t2 { font-size: 12px; white-space: nowrap; }
.vhsh-peek { display: flex; gap: 3px; margin-left: auto; }
.vhsh-peek img { width: 22px; height: 38px; object-fit: cover; border-radius: 4px; background: #000; }
.vhsh-arr { font-size: 20px; color: var(--fg2); transition: transform .2s; }
.vhsh.open .vhsh-arr { transform: rotate(90deg); }
.vhsh.open .vhsh-peek { display: none; }
.vhsh-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 0 12px 12px; }
.vhsh.open .vhsh-grid { display: grid; }
.vhsh-it { display: flex; flex-direction: column; gap: 4px; text-align: left; color: var(--fg); min-width: 0; }
.vhsh-it img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #000; }
.vhsh-it span { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 420px) { .vhsh-peek img:nth-child(n+3) { display: none; } }
/* v105: 아티스트 노래 정렬 (조회순/인기순) */
.ar-sort { display: flex; gap: 8px; margin: 2px 0 10px; }
.ar-sort .chip { border: 0; color: var(--fg); cursor: pointer; }
.ar-sort .chip.on { background: var(--fg); color: #000; }
/* v107: 아티스트 '노래 더 보기' */
.ar-more { margin: 10px auto 0; display: flex; gap: 4px; align-items: center; }
.ar-more svg { width: 18px; height: 18px; }
.list .list-sep { list-style: none; padding: 18px 4px 8px; font-size: 13px; color: var(--fg2, #aaa); border-top: 1px solid #ffffff1a; margin-top: 8px; }
.ar-sort .ar-note { align-self: center; font-size: 12px; margin-left: 4px; }
.page-head { padding: 8px 4px 4px; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; }
/* v108: 아티스트 노래 — 목록 밑 '모두 보기', 펼치면 맨 밑 '노래 더 보기' */
.ar-bottom { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.ar-bottom .ar-more { margin: 0; }
#ar-songs:not(.expanded):not(.few) .ar-more, #ar-songs:not(.expanded) .ar-fold, #ar-songs.expanded .ar-all { display: none; }

/* v118 채널 커뮤니티 (읽기 전용) */
.posts { padding: 0 12px; }
.post { border: 1px solid var(--bg3); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; cursor: pointer; }
.post.full { border: none; border-radius: 0; padding: 14px 16px; margin: 0; cursor: auto; }
.post-h { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post-h[data-ch] { cursor: pointer; }
.post-h img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg3); flex: none; }
.post-h b { font-size: 14px; margin-right: 8px; }
.post-text { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.post:not(.full) .post-text { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.post-text a, .pc-b a { color: #3ea6ff; text-decoration: none; }
.post-imgs { margin-top: 10px; }
.post-imgs.one img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 10px; background: var(--bg3); }
.post-imgs.multi { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.post-imgs.multi::-webkit-scrollbar { display: none; }
.post-imgs .pimg { position: relative; flex: 0 0 88%; scroll-snap-align: start; }
.post-imgs .pimg img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg3); }
.post-imgs .pimg span { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.post-video { display: flex; gap: 10px; margin-top: 10px; border-radius: 10px; background: var(--bg2); overflow: hidden; cursor: pointer; }
.post-video .vthumb { flex: 0 0 44%; position: relative; }
.post-video .vthumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-video .pv-t { padding: 8px 10px 8px 0; min-width: 0; }
.post-video .vtitle { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.post-poll { margin-top: 10px; display: grid; gap: 8px; }
.poll-c { border: 1px solid var(--bg3); border-radius: 8px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.poll-c img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; }
.post-f { display: flex; gap: 18px; margin-top: 10px; }
.post-shared { margin-top: 10px; border: 1px solid var(--bg3); border-radius: 12px; overflow: hidden; }
.post-shared .post.full { padding: 10px 12px; }
.pc-head { padding: 14px 16px 6px; font-weight: 600; border-top: 1px solid var(--bg3); }
.pc-b { flex: 1; min-width: 0; }
.pc-rep, .pc-rmore { background: none; border: 0; color: #3ea6ff; padding: 6px 0 2px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pc-replies .cmt.reply { padding: 6px 0; }
.pc-replies .cmt.reply img { width: 24px; height: 24px; }
.pc-creator { background: var(--bg3); color: var(--fg); border-radius: 10px; padding: 0 7px; }

/* v120 음악 홈 '내 취향 믹스' 머리글: 제목·설명 한 줄씩, 버튼은 오른쪽에 한 줄로 */
.sec-head > div:first-child { min-width: 0; flex: 1; }
.sec-head .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mixsec .sec-head { align-items: center; }
.mixsec .sec-head { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 2px; }
.mixsec .sec-head > div:first-child { display: contents; }
.mixsec .sec-head h2 { grid-area: 1 / 1; }
.mixsec .sec-actions { grid-area: 1 / 2; }
.mixsec .sec-head .sub { grid-area: 2 / 1 / 3 / 3; }

/* v123 앱 두 개: 뮤직 앱은 왼쪽 메뉴(☰) 없음, 아래 메뉴 3칸 */
html.app-music #btn-menu, html.app-music #side, html.app-music #side-dim { display: none !important; }
@media (min-width: 1000px) {   /* 넓은 화면의 뮤직 앱: 왼쪽 메뉴 대신 아래 메뉴를 그대로 */
  html.app-music { --nav-h: 60px; --side-w: 0px; }
  html.app-music .tabs { display: flex; }
  html.app-music #view, html.app-music .mnav, html.app-music .msearch { margin-left: auto !important; margin-right: auto !important; }
  html.app-music .mini { left: 0; }
}
/* 뮤직 앱 '둘러보기': 검색창을 늘 펼쳐 둠 */
html.app-music body.mtab-search #msearch:not(.hidden) { display: block !important; }
/* v123 뮤직 홈 (유튜브 뮤직처럼) */
.cards.two { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 140px; gap: 14px; scroll-snap-type: x proximity; }
.cards.two .card { scroll-snap-align: start; }
.section.expanded .cards.two { display: flex; }
.mixcard .mixart { position: relative; width: 140px; height: 140px; border-radius: 8px; overflow: hidden; background: var(--bg3); }
.mixcard .mixart img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; filter: saturate(1.1); }
.mixcard .mixart::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, #ff4d6d66 0%, #0000 45%, #000c 100%); }
.mixcard .mixart span { position: absolute; left: 10px; bottom: 8px; z-index: 1; font-weight: 800; font-size: 17px; line-height: 1.15; color: #fff; text-align: left;
  text-shadow: 0 1px 4px #0008; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
html.app-music .greet { display: none; }
