/* Choi's Music Box : shared mobile-first styles (index, Setup, Upload, Album, AlbumSet, User, Sheet) - ASCII only */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ffffff; color: #222222; font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; font-size: 16px; }
input, select, button { font-family: inherit; }
img[onclick], [onclick] { cursor: pointer; }

/* top area : stays on screen while the list scrolls */
.mb-top { position: sticky; top: 0; z-index: 20; background: #eeeeee; padding: 8px 12px 10px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.mb-top.static { position: static; box-shadow: none; }
.mb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.mb-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 21px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-title img { width: 30px; height: 30px; flex: none; }
.mb-tools { display: flex; align-items: center; gap: 16px; flex: none; }
.mb-tools img { width: 24px; height: 24px; display: block; }

/* forms */
.mb-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mb-row > input[type=text], .mb-row > input[type=search], .mb-row > select { flex: 1; min-width: 0; }
.mb-input, .mb-row input[type=text], .mb-row input[type=search] { height: 40px; padding: 0 10px; font-size: 16px; border: 1px solid #aaaaaa; border-radius: 6px; background: #ffffff; }
.mb-select { height: 40px; padding: 0 8px; font-size: 16px; border: 1px solid #aaaaaa; border-radius: 6px; background: #ffffff; }
.mb-btn { height: 40px; padding: 0 14px; font-size: 16px; border: 0; border-radius: 6px; background: #dddddd; color: #222222; white-space: nowrap; }
.mb-btn.primary { background: #ff7a3f; color: #ffffff; }
.mb-btn.wide { width: 100%; }
.mb-btn.small { height: 34px; padding: 0 12px; font-size: 15px; }
.mb-note { font-size: 14px; color: #777777; }
.mb-chip { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 15px; }
.mb-x { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 13px; background: #ff7a3f; color: #ffffff; font-size: 14px; line-height: 26px; }
.mb-file { display: block; width: 100%; padding: 10px; font-size: 15px; border: 1px solid #aaaaaa; border-radius: 6px; background: #ffffff; }

/* lists */
.mb-list { border-top: 1px solid #cccccc; }
.mb-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border-bottom: 1px solid #dddddd; text-align: left; }
.mb-item.on { background: #e4e4e4; }
.mb-item .t { flex: 1; min-width: 0; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.mb-item .t .n { color: #888888; font-size: 14px; margin-right: 2px; }
.mb-icons { display: flex; align-items: center; gap: 14px; flex: none; }
.mb-icons img { width: 24px; height: 24px; display: block; }
.mb-empty { padding: 40px 16px; text-align: center; color: #777777; }
.mb-yt { color: #ff0000; font-size: 12px; font-weight: bold; }
.mb-sheeticon { width: 20px; height: 20px; vertical-align: -4px; margin-left: 4px; }

/* player (index.php) */
.mb-now { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: bold; text-align: center; }
.mb-now img { width: 24px; height: 24px; flex: none; }
.mb-audio { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.mb-audio audio { flex: 1; min-width: 0; height: 44px; }
.mb-vol { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 20px; background: #dddddd; }
.mb-vol svg { display: block; margin: 0 auto; }
.mb-volbox { position: absolute; right: 0; top: 100%; z-index: 30; display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 12px; width: 260px; max-width: 100%; background: #ffffff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.mb-volbox input { flex: 1; }
.mb-volbox span { width: 42px; text-align: right; font-size: 14px; }
.mb-video { width: 100%; max-width: 400px; margin: 6px auto 0; }
.mb-video > div { position: relative; width: 100%; padding-top: 56.25%; background: #000000; }
.mb-ctrl { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mb-ctrl .sp { flex: 1; }

/* icon menu (Setup.php) */
.mb-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; padding: 16px 12px 4px; max-width: 480px; margin: 0 auto; text-align: center; }
.mb-menu a, .mb-menu div.m { display: block; color: #222222; text-decoration: none; font-size: 15px; }
.mb-menu img { width: 64px; height: 64px; display: block; margin: 0 auto 6px; }
.mb-menu .sub { display: block; margin-top: 2px; color: #ff7a3f; font-weight: bold; font-size: 14px; }
.mb-fields { max-width: 480px; margin: 0 auto; padding: 8px 16px 0; }
.mb-field { margin-top: 16px; }
.mb-field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: bold; }
.mb-field select { width: 100%; }
.mb-section { max-width: 480px; margin: 24px auto 0; padding: 16px 16px 32px; border-top: 1px solid #dddddd; }

/* album discs */
.mb-discs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; padding: 14px 8px; }
.mb-disc { width: 140px; text-align: center; }
.mb-disc .d { position: relative; width: 140px; height: 140px; border-radius: 70px; border: 1px solid #000000; background-repeat: no-repeat; background-size: cover; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.mb-disc .d b { display: block; max-width: 100px; font-size: 16px; line-height: 1.25; word-break: keep-all; text-shadow: 0 0 3px #ffffff, 0 0 3px #ffffff, 0 0 2px #ffffff; }
.mb-disc .d small { margin-top: 30px; font-size: 13px; text-shadow: 0 0 3px #ffffff, 0 0 3px #ffffff; }
.mb-disc .a { display: flex; justify-content: center; gap: 18px; margin-top: 8px; }
.mb-disc .a img { width: 26px; height: 26px; display: block; }

/* popups */
.mb-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.mb-sheet { position: relative; width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto; padding: 16px; background: #ffffff; border-radius: 10px; text-align: left; }
.mb-sheet h3 { margin: 0 34px 12px 0; font-size: 17px; }
.mb-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: #aaaaaa; color: #ffffff; font-size: 15px; }
.mb-sheet .mb-field:first-of-type { margin-top: 0; }
.mb-sheet .mb-input, .mb-sheet .mb-file { width: 100%; }
.mb-sheet .mb-discs { padding: 4px 0; }
.mb-sheet.fit .mb-discs { padding: 4px 4px 8px; }

/* album setup (AlbumSet.php) */
.mb-albumhead { display: flex; gap: 12px; align-items: stretch; margin-top: 8px; }
.mb-albumhead .mb-disc, .mb-albumhead .mb-disc .d { width: 120px; }
.mb-albumhead .mb-disc .d { height: 120px; }
.mb-albumsongs { flex: 1; min-width: 0; max-height: 160px; overflow-y: auto; background: #ffffff; border: 1px solid #cccccc; border-radius: 6px; }
.mb-albumsongs .mb-item { min-height: 0; padding: 7px 8px; font-size: 14px; }
.mb-del { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: #ff3b30; color: #ffffff; font-size: 12px; flex: none; }

/* users (User.php) */
.mb-user .lv { flex: none; width: 82px; text-align: center; font-size: 14px; }
.mb-user .ud { flex: none; display: flex; gap: 6px; }
.mb-user .ud input { height: 28px; padding: 0 10px; border: 0; border-radius: 14px; color: #ffffff; font-size: 13px; }
.mb-user .sns { display: block; font-size: 12px; color: #777777; margin-top: 2px; }

/* index.php : tools row, then the title centered (same size as Choi's 7080) */
.mb-toolrow { justify-content: flex-end; }
.mb-h1 { margin: 6px 0 2px; font-size: 28px; text-align: center; }

/* wide screens : index.php two columns, album popups grow with the number of albums (max 70% x 70%) */
@media (min-width: 600px) {
	.mb-title { font-size: 24px; }
	.mb-sheet.fit { width: max-content; max-width: 70vw; max-height: 70vh; }
}

/* search box with the voice-input mic inside, at the right end (index.php, src/mbvoice.js) */
.mb-qwrap { position: relative; flex: 1; min-width: 0; display: flex; }
.mb-row .mb-qwrap input { flex: 1; width: 100%; min-width: 0; height: 40px; padding: 0 42px 0 10px; font-size: 16px; border: 1px solid #aaaaaa; border-radius: 6px; background: #ffffff; }
.mb-mic { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; border-radius: 17px; background: transparent; color: #666666; display: flex; align-items: center; justify-content: center; }
.mb-mic.on { background: #ff3b30; color: #ffffff; animation: mb-pulse 1s infinite; }
@keyframes mb-pulse { 50% { opacity: .6; } }

/* song row icons : MR, karaoke (YouTube popup) and sheet */
.mb-sicons { display: flex; align-items: center; gap: 10px; flex: none; }
.mb-sicons img { height: 24px; width: auto; display: block; }
/* MR / karaoke player : fixed at the bottom, full width, no padding */
.mb-ytdock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #000000; box-shadow: 0 -2px 8px rgba(0,0,0,.3); }
.mb-ytdock-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: #333333; color: #ffffff; font-size: 14px; }
.mb-ytdock-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-ytdock-bar button { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: #777777; color: #ffffff; font-size: 14px; }
.mb-ytdock-v { position: relative; width: 100%; padding-top: 56.25%; }
@media (min-width: 600px) { .mb-ytdock-v { padding-top: 0; height: min(56.25vw, 45vh); } }	/* PC : not taller than 45% of the screen */

/* Music Box MR dock : choose among several MRs, uploaded video / audio files */
.mb-ytdock-pick { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px; background: #222222; }
.mb-ytdock-pick:empty { display: none; }
.mb-ytdock-pick button { flex: none; max-width: 70%; height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: #555555; color: #ffffff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-ytdock-pick button.on { background: #ff7a3f; }
.mb-ytdock-v video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000000; }
.mb-ytdock-v.audio { padding-top: 0 !important; height: auto !important; background: #222222; }
.mb-ytdock-v.audio audio { display: block; width: 100%; }
