/* 누가의 미니홈피 — 피그마 "싸이월드 미니홈피" 기준 */
:root {
  --bg-page: #8c8c8c;
  --frame-outer: #a6d3df;
  --frame-inner: #f2f2f2;
  --surface: #fff;
  --surface-muted: #f8f8f8;
  --border-box: #ccc;
  --border-line: #e6e6e6;
  --text-title: #003380;
  --text-section: #1296bf;
  --text-body: #333;
  --text-muted: #999;
  --text-today: #f00;
  --tab-bg: #2491b2;
  --orange: #f60;
  --admin-bg: #fff4e5;
  --admin-border: #f93;
  --font-body: Dotum, '돋움', 'Nanum Gothic', 'Apple SD Gothic Neo', sans-serif;
  --font-title: 'Nanum Gothic', 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--bg-page);
  background-image:
    linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-body);
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 12px; color: var(--text-body); }
img { display: block; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.blue { color: var(--text-title); }
.sky { color: var(--text-section); }
.orange { color: var(--orange); }
.bold { font-family: var(--font-title); font-weight: 700; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-all; line-height: 1.75; }

/* 공통 컴포넌트 */
.sec { display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--border-line); padding-bottom: 4px; margin-bottom: 8px; }
.sec h2 { margin: 0; font: 700 14px var(--font-title); color: var(--text-section); }
.sec .sub { color: var(--text-muted); }
.sec .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 3px 8px; border: 1px solid var(--border-box); background: var(--surface); color: var(--text-body); font-size: 11px; border-radius: 2px; line-height: 1.3; white-space: nowrap; }
.btn:hover { border-color: var(--text-muted); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.danger { border-color: var(--admin-border); color: var(--text-today); }
.btn[disabled] { opacity: .5; cursor: default; }
.admin-only { display: none !important; }
body.is-owner .admin-only { display: inline-flex !important; }
body.is-owner div.admin-only, body.is-owner section.admin-only, body.is-owner form.admin-only { display: flex !important; }
.hr { border: 0; border-top: 1px solid var(--border-line); margin: 8px 0; }
.hr.dashed { border-top-style: dashed; }
.empty { color: var(--text-muted); background: var(--surface-muted); text-align: center; padding: 28px 10px; line-height: 1.8; }
.chk { width: 12px; height: 12px; accent-color: var(--text-section); margin: 0; }
.gender { width: 13px; height: 10px; display: inline-block; vertical-align: middle; }
.select-box { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 6px; border: 1px solid var(--border-box); background: var(--surface); font-size: 11px; }
.select-box select { border: 0; width: 100%; background: transparent; font-size: 11px; outline: none; }
.lock-entry { display: flex; justify-content: flex-end; }
.lock-entry button { border: 0; background: none; padding: 2px; opacity: .6; }
.lock-entry button:hover { opacity: 1; }

/* 모바일 전용 요소는 기본 숨김 */
.m-adminbar, .fab, .m-banner { display: none; }

/* ── 데스크탑 ─────────────────────────────────────── */
.stage { width: 1160px; margin: 0 auto; padding: 30px 30px 30px; position: relative; }
.bgm-wrap { display: flex; justify-content: flex-end; height: 28px; margin-bottom: 10px; }
.book { display: flex; gap: 3px; height: 600px; }
.outer { background: var(--frame-outer); padding: 20px; height: 100%; flex: none; }
.outer.left { width: 243px; padding-right: 0; border-radius: 8px 24px 24px 8px / 8px 8px 8px 8px; }
.outer.right { width: 648px; padding-left: 0; border-radius: 24px 8px 8px 24px / 8px 8px 8px 8px; position: relative; }
.inner { background: var(--frame-inner); border-radius: 8px; height: 100%; display: flex; flex-direction: column; }
.outer.left .inner { padding: 0 5px 10px 10px; }
.outer.right .inner { padding: 0 10px 10px 5px; }
.counter { height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; padding-top: 4px; font-size: 10px; }
.counter .num { font-size: 12px; }
.counter .today { color: var(--text-today); }
.head { height: 40px; display: flex; align-items: center; gap: 8px; padding: 4px 4px 0 12px; }
.head h1 { margin: 0; flex: 1; font: 700 17px/1.2 var(--font-title); color: var(--text-title); letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .url { font-size: 11px; }
.adminbar { display: none; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--admin-border); background: var(--admin-bg); border-radius: 10px; font-size: 11px; }
body.is-owner .adminbar { display: flex; }
.adminbar b { color: var(--orange); font-family: var(--font-title); }
.adminbar button { border: 0; background: none; color: var(--text-muted); font-size: 11px; padding: 0; }
.box { background: var(--surface); border: 1px solid var(--border-box); border-radius: 8px; flex: 1; min-height: 0; }
.box.left-box { padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.box.main { padding: 12px 20px; overflow-y: auto; box-shadow: 5px 5px 20px -10px grey; display: flex; flex-direction: column; gap: 12px; }
.tabs { position: absolute; right: -30px; top: 70px; display: flex; flex-direction: column; gap: 3px; }
.tab { width: 60px; height: 35px; display: flex; align-items: center; justify-content: center; background: var(--tab-bg); color: #fff; border-radius: 0 8px 8px 0; font-size: 14px; letter-spacing: -0.5px; }
.tab.on { background: #fff; color: #000; border: 1px solid var(--tab-bg); border-left: 0; font-family: var(--font-title); font-weight: 700; }
.tab.manage { background: var(--orange); display: none; }
body.is-owner .tab.manage { display: flex; }
.tab .tab-ico { display: none; }

/* 오른쪽 세로 단 (원본 #subcontent) */
.side { width: 160px; margin: 24px 0 0 48px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.side-box { background: #fff; border: 1px solid var(--border-box); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.mp { gap: 6px; }
.mp-now { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.mp-cd { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #fff 0 1.5px, var(--orange) 2px); flex: none; }
.mp.playing .mp-cd { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mp-title { flex: 1; overflow: hidden; white-space: nowrap; font-size: 11px; color: var(--text-title); }

.mp .ctrl { gap: 6px; }
.mp .ctrl button { font-size: 10px; padding: 0 1px; }
.mp-vol { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.mp-vol input { width: 56px; height: 4px; accent-color: var(--text-section); margin: 0; }
.mp-vol .grow { flex: 1; }
.mp-vol a { color: var(--text-section); font: 700 10px var(--font-title); }
.act-row { display: flex; justify-content: space-between; font-size: 11px; padding: 1px 0; }
.act-row b { color: var(--orange); font-family: var(--font-title); }
.act-rate { display: flex; align-items: center; gap: 5px; padding-top: 4px; font-size: 10px; }
.act-rate b { color: var(--text-section); font-family: var(--font-title); }
.act-rate i { flex: 1; height: 6px; border-radius: 3px; background: var(--border-line); overflow: hidden; }
.act-rate i::after { content: ''; display: block; height: 100%; width: var(--w); background: var(--orange); }
.banners { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.banners a, .m-banner a { display: block; border: 1px solid var(--border-box); line-height: 0; }
.banners img, .m-banner img { width: 150px; height: 50px; }

/* 긴 제목 흘러가기: 멈춤 → 끝까지 → 멈춤 → 처음으로 */
.marquee { overflow: hidden; white-space: nowrap; display: block; min-width: 0; }
.marquee > span { display: inline-block; }
.marquee.run > span { animation: mq var(--dur, 8s) ease-in-out infinite; }
@keyframes mq { 0%, 18% { transform: translateX(0); } 62%, 80% { transform: translateX(calc(-1 * var(--dist))); } 100% { transform: translateX(0); } }
.bgm .song.marquee { text-overflow: clip; }
.now .title.marquee { max-width: 100%; }

/* 쥬크박스 목록 (원본 2004 '내가 가진 음악') */
.table.jb { table-layout: fixed; }
.table.jb th { background: linear-gradient(#fbfbfb, #ececec); border-top: 1px solid var(--border-box); border-bottom: 1px solid var(--border-box); color: #666; font-size: 10px; letter-spacing: 1px; padding: 5px 4px; }
.table.jb td { border-bottom: 1px dotted #ccc; padding: 4px; height: 26px; }
.table.jb .c-chk { width: 26px; }
.table.jb .col-no { width: 34px; }
.table.jb .col-artist { width: 120px; }
.table.jb .c-menu { width: 52px; white-space: nowrap; }
.table.jb td.title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.table.jb .ico { border: 0; background: none; padding: 0 3px; font-size: 11px; cursor: pointer; }
.songs .tag.is-bgm { color: var(--text-section); }
.jb-acts { align-items: center; gap: 4px; flex-wrap: wrap; }

/* 왼쪽 프로필 */
.profile-photo { width: 100%; aspect-ratio: 176 / 190; object-fit: cover; background: var(--surface-muted); margin-bottom: 10px; }
/* 프로필 사진 맞춤: 너비(잘림) · 높이(전체 보임) · 늘리기 */
img.fit-width { object-fit: cover !important; }
img.fit-height { object-fit: contain !important; }
img.fit-stretch { object-fit: fill !important; }
.radios { display: flex; flex-direction: column; gap: 4px; }
.fr-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border-line); flex-wrap: wrap; }
.fr-row img, .fr-ph, .result .fr-ph { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; background: var(--surface-muted); flex: none; display: inline-block; }
.fr-row .grow { flex: 1; min-width: 120px; }
.result img.fr-ph, [data-fresults] .result img { width: 36px; height: 36px; }
.mood { display: flex; align-items: center; gap: 6px; }
.mood .label { font: 700 10px var(--font-title); color: var(--text-muted); }
.mood .val { font: 700 11px var(--font-title); color: var(--orange); }
.intro { font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.spacer { flex: 1; }
.history { display: flex; align-items: center; gap: 4px; font: 700 10px var(--font-title); }
.history .grow { flex: 1; }
.owner-name { display: flex; align-items: center; gap: 4px; }
.owner-name b { font: 700 13px var(--font-title); color: var(--text-title); }
.btn-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* 폴더 · 달력 */
.folder-title { font: 700 12px var(--font-title); color: var(--text-section); }
.folders { display: flex; flex-direction: column; }
.folder { display: flex; align-items: center; gap: 4px; padding: 3px 4px; cursor: pointer; }
.folder .n { flex: 1; }
.folder .c { color: var(--text-muted); font-size: 11px; }
.folder .arr { color: var(--text-section); font-size: 10px; }
.folder.on { background: var(--surface-muted); }
.folder.on .n { color: var(--text-title); font-family: var(--font-title); font-weight: 700; }
.cal-head { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 4px; }
.cal-head b { font: 700 13px var(--font-title); color: var(--text-title); }
.cal-head button { border: 0; background: none; color: var(--text-muted); font-size: 9px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; text-align: center; font-size: 11px; }
.cal .dow { font-size: 10px; color: var(--text-muted); }
.cal .dow.sun { color: var(--text-today); }
.cal .d { padding: 1px 0; border-radius: 9px; }
.cal .d.has { color: var(--text-title); font-family: var(--font-title); font-weight: 700; cursor: pointer; }
.cal .d.today { background: var(--orange); color: #fff; font-family: var(--font-title); font-weight: 700; }
.cal .d.sel { outline: 1px solid var(--text-section); }

/* 홈 */
.home-top { display: flex; gap: 20px; }
.home-top > * { flex: 1; min-width: 0; }
.recent li, .ilchon li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.recent ul, .ilchon ul { list-style: none; margin: 0; padding: 0; }
.recent .cat { color: var(--text-section); font-size: 11px; }
.recent .t { flex: 1; font-size: 12px; }
.recent .d, .ilchon .d { color: var(--text-muted); font-size: 11px; }
.counts { padding-top: 22px; }
.counts .row { display: flex; border-top: 1px dashed var(--border-line); padding: 6px 0; }
.counts .row > a { flex: 1; display: flex; gap: 6px; }
.counts .num { color: var(--text-title); }
.miniroom { width: 100%; height: 210px; border-radius: 6px; background-color: var(--surface-muted); background-repeat: no-repeat; cursor: grab; user-select: none; touch-action: none; }
.miniroom.dragging { cursor: grabbing; }
.ilchon .dot { color: var(--text-section); font-weight: 700; }
.ilchon .t { flex: 1; }

/* 프로필 */
.about { display: flex; gap: 16px; }
.about img { width: 150px; height: 200px; object-fit: cover; border-radius: 4px; }
.about dl { flex: 1; margin: 0; }
.about dl div { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-line); }
.about dt { width: 90px; color: var(--text-section); font: 700 12px var(--font-title); }
.about dd { margin: 0; flex: 1; }

/* 글 */
.toolbar { display: flex; justify-content: flex-end; gap: 4px; }
.entry { display: flex; flex-direction: column; gap: 8px; }
.entry + .entry { border-top: 1px dashed var(--border-line); padding-top: 12px; }
.entry-head { display: flex; align-items: center; gap: 8px; }
.entry-head .date { font: 700 13px var(--font-title); color: var(--text-title); }
.entry-head .grow { flex: 1; }
.entry-foot { display: flex; gap: 12px; font-size: 11px; color: var(--text-section); }
.secret-tag { color: var(--orange); font-size: 11px; }
.comments { background: var(--surface-muted); border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.comments .c { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.comments .c b { color: var(--text-title); font-family: var(--font-title); }
.comments .c .t { flex: 1; }
.comments form { display: flex; gap: 4px; margin-top: 4px; }
.comments input { border: 1px solid var(--border-box); padding: 3px 5px; font-size: 11px; }
.comments input.body { flex: 1; }
.post-title { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--surface-muted); }
.post-title .cat { color: var(--text-section); font: 700 12px var(--font-title); }
.post-title .t { flex: 1; color: var(--text-title); font: 700 13px var(--font-title); }
.photo { max-width: 100%; max-height: 420px; margin: 0 auto; cursor: zoom-in; }
.entry img.attach { max-width: 100%; max-height: 360px; }
.pager { display: flex; justify-content: center; gap: 8px; color: var(--text-title); font-size: 12px; }
.pager button { border: 0; background: none; color: var(--text-title); padding: 0 2px; }
.pager button.on { font-weight: 700; text-decoration: underline; }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--surface-muted); border-bottom: 1px solid var(--border-box); color: var(--text-section); font: 700 11px var(--font-title); padding: 6px; }
.table td { border-bottom: 1px solid var(--border-line); padding: 7px 6px; text-align: center; font-size: 11px; color: var(--text-muted); }
.table td.title { text-align: left; color: var(--text-body); font-size: 12px; cursor: pointer; }
.table td.title:hover { text-decoration: underline; }
.search { display: flex; gap: 4px; justify-content: flex-end; }
.search input { border: 1px solid var(--border-box); padding: 3px 6px; width: 140px; }
.gb { border: 1px solid var(--border-line); }
.gb-head { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: var(--surface-muted); }
.gb-head .grow { flex: 1; }
.gb-body { display: flex; gap: 14px; padding: 10px; }
.gb-body img { width: 96px; height: 96px; object-fit: cover; border-radius: 2px; flex: none; }
.gb-body .pre { flex: 1; }
.writebox { background: var(--admin-bg); border: 1px solid var(--admin-border); border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.writebox textarea { width: 100%; height: 56px; border: 1px solid var(--border-box); padding: 6px; resize: vertical; }
.writebox .row { display: flex; align-items: center; gap: 6px; }
.writebox .row .grow { flex: 1; }

/* 쥬크박스 */
.now { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface-muted); border-radius: 4px; }
.now img, .now .cover { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--border-line); flex: none; }
.now .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.now .label { font: 700 10px var(--font-title); color: var(--orange); }
.now .title { font: 700 13px var(--font-title); color: var(--text-title); }
.progress { height: 3px; background: var(--border-box); position: relative; cursor: pointer; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text-section); }
.ctrl { display: flex; gap: 8px; }
.ctrl button { border: 0; background: none; color: var(--text-section); font-size: 13px; padding: 2px; }
.songs td { vertical-align: middle; }
.songs tr.playing td { background: var(--admin-bg); }
.songs tr.playing td.title { font-family: var(--font-title); font-weight: 700; color: var(--text-title); }
.songs .tag { color: var(--orange); font: 700 10px var(--font-title); margin-left: 6px; }
.songs .status { font-size: 10px; color: var(--orange); margin-left: 6px; }
.songs .status.error { color: var(--text-today); }
.songs .acts { display: flex; gap: 3px; justify-content: center; }

/* BGM 플레이어 */
.bgm { width: 260px; height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border: 1px solid var(--border-box); border-radius: 14px; }
.bgm .note { color: var(--orange); font-weight: 700; }
.bgm .song { flex: 1; min-width: 0; font-size: 11px; color: var(--text-title); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bgm .ctrl button { font-size: 10px; padding: 0 1px; }

/* 팝업 (데스크탑) · 바텀시트 (모바일) */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--tab-bg); border-radius: 6px; overflow: hidden; }
.modal.sm { max-width: 340px; }
.modal-title { display: flex; align-items: center; padding: 7px 10px 7px 12px; background: var(--tab-bg); color: #fff; font: 700 12px var(--font-title); }
.modal-title span { flex: 1; }
.modal-title button { border: 0; background: none; color: #fff; font-size: 13px; }
.modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: center; gap: 6px; padding: 10px 16px 12px; background: var(--surface-muted); }
.modal .grab { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font: 700 11px var(--font-title); color: var(--text-section); }
.field input[type=text], .field input[type=password], .field input[type=datetime-local], .field input[type=url], .field select, .field textarea {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border-box); background: #fff; border-radius: 0; font-size: 12px; outline: none;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--text-section); }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.uploader { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uploader img { max-width: 160px; max-height: 100px; border: 1px solid var(--border-line); }
.err { color: var(--text-today); font-size: 11px; min-height: 0; }
.results { max-height: 260px; overflow-y: auto; border: 1px solid var(--border-line); }
.result { display: flex; align-items: center; gap: 8px; padding: 6px; border-bottom: 1px solid var(--border-line); cursor: pointer; }
.result:hover, .result.on { background: var(--admin-bg); }
.result img { width: 64px; height: 36px; object-fit: cover; flex: none; }
.result .info { flex: 1; min-width: 0; }
.result .info div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 8px 14px; border-radius: 16px; z-index: 60; font-size: 12px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 70; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 95vh; }
.wave-list .w { display: flex; gap: 4px; margin-bottom: 4px; }
.wave-list .w input { flex: 1; }

/* ── 모바일 (≤ 768px) ─────────────────────────────── */
.m-only { display: none !important; }
@media (max-width: 768px) {
  .d-only { display: none !important; }
  .m-only { display: flex !important; }
  body { font-size: 13px; }
  .stage { width: 100%; padding: 8px 8px calc(96px + env(safe-area-inset-bottom)); }
  .bgm-wrap, .side { display: none; }
  .m-banner { display: flex !important; justify-content: center; }
  .book { display: block; height: auto; }
  .outer.left { display: none; }
  .outer.right { width: 100%; padding: 8px; border-radius: 16px; }
  .outer.right .inner { padding: 8px; gap: 6px; min-height: calc(100vh - 120px); }
  .head { height: auto; padding: 14px 6px 12px; align-items: center; }
  .head h1 { font-size: 19px; }
  .head .url { display: none; }
  .head .m-counter { display: flex; align-items: center; gap: 3px; font-size: 9px; }
  .head .m-counter .num { font-size: 11px; }
  .head .adminbar { display: none !important; }
  .m-adminbar { display: none; align-items: center; gap: 6px; padding: 6px 12px; background: var(--admin-bg); border: 1px solid var(--admin-border); border-radius: 12px; font-size: 11px; }
  body.is-owner .m-adminbar { display: flex !important; }
  .m-adminbar b { flex: 1; color: var(--orange); font-family: var(--font-title); }
  .m-adminbar button { border: 0; background: none; color: var(--text-muted); font-size: 11px; }
  .m-bgm { display: flex !important; }
  .m-bgm .bgm { width: 100%; }
  .box.main { padding: 12px; gap: 14px; flex: none; overflow: visible; box-shadow: 3px 3px 14px -8px grey; }
  .home-top { flex-direction: column; gap: 14px; }
  .counts { padding-top: 0; }
  .counts .row { border-top: 0; border-bottom: 1px solid var(--border-line); padding: 6px 0; }
  .miniroom { height: 180px; }
  .about { flex-direction: column; }
  .about img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .gb-body img { width: 64px; height: 64px; }
  .photo { max-height: none; }
  .table.board thead { display: none; }
  .table.board tr { display: flex; align-items: center; border-bottom: 1px solid var(--border-line); padding: 10px 2px; gap: 8px; }
  .table.board td { border: 0; padding: 0; }
  .table.board td.no, .table.board td.date, .table.board td.views { display: none; }
  .table.board td.title { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
  .table.board td.title .meta { display: block !important; font-size: 10px; color: var(--text-muted); }
  .songs thead { display: none; }
  .songs .col-no, .songs .col-artist { display: none; }
  .songs td.title .meta { display: block !important; font-size: 10px; color: var(--text-muted); font-weight: 400; }
  .now { flex-direction: column; text-align: center; padding: 14px; }
  .now img, .now .cover { width: 120px; height: 120px; border-radius: 6px; }
  .now .info { width: 100%; align-items: center; }
  .now .title { font-size: 15px; }
  .now .ctrl button { font-size: 20px; padding: 0 8px; }
  .search input { flex: 1; width: auto; padding: 7px 10px; }

  .m-profile { display: flex !important; gap: 12px; }
  .m-profile img { width: 100px; height: 130px; object-fit: cover; background: var(--surface-muted); border-radius: 4px; flex: none; }
  .m-profile .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
  .chips { display: flex !important; flex-wrap: wrap; gap: 6px; }
  .chip { padding: 5px 10px; border: 1px solid var(--tab-bg); border-radius: 14px; color: var(--text-title); font-size: 11px; background: #fff; }
  .chip .c { color: var(--text-muted); font-size: 10px; margin-left: 3px; }
  .chip.on { background: var(--tab-bg); color: #fff; font-weight: 700; }
  .chip.on .c { color: #fff; }
  .m-cal { padding: 8px; background: var(--surface-muted); border-radius: 6px; }
  .m-cal .cal { font-size: 12px; }

  .tabs { position: fixed; left: 8px; right: 8px; bottom: calc(14px + env(safe-area-inset-bottom)); top: auto; flex-direction: row; justify-content: center; gap: 4px; height: 56px; padding: 0 6px; background: var(--tab-bg); border-radius: 18px; align-items: flex-end; padding-bottom: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 30; }
  .tab { width: 48px; height: 44px; border-radius: 12px; background: transparent; font-size: 0; }
  .tab .tab-ico { display: block; width: 22px; height: 22px; }
  .tab .tab-ico * { stroke: #fff; }
  .tab.on { height: 58px; background: #fff; border: 1.5px solid var(--tab-bg); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
  .tab.on .tab-ico * { stroke: var(--tab-bg); }
  .tab.manage { display: none !important; }
  .fab { position: fixed; right: 20px; bottom: calc(86px + env(safe-area-inset-bottom)); padding: 10px 16px; border: 0; border-radius: 22px; background: var(--orange); color: #fff; font: 700 13px var(--font-title); box-shadow: 0 3px 8px rgba(0,0,0,.25); z-index: 31; display: none; }
  body.is-owner .fab.show { display: block; }

  .modal-bg { align-items: flex-end; padding: 0; }
  .modal, .modal.sm { max-width: none; border: 0; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .modal .grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border-box); margin: 10px auto 0; }
  .modal-title { background: #fff; color: var(--text-title); font-size: 17px; padding: 10px 20px 4px; }
  .modal-title button { color: var(--text-muted); font-size: 16px; }
  .modal-body { padding: 12px 20px; }
  .modal-foot { background: #fff; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); gap: 8px; }
  .modal-foot .btn { flex: 1; padding: 12px; font: 700 14px var(--font-title); border-radius: 6px; }
  .field input[type=text], .field input[type=password], .field input[type=datetime-local], .field input[type=url], .field select, .field textarea { padding: 10px; font-size: 16px; border-radius: 4px; }
  .field > label { font-size: 12px; }
  .btn { padding: 4px 9px; }
}
