/* AIDEN 창세수 — 모바일 우선. 외부 글꼴·CDN 없이 시스템 글꼴만 사용한다. */
:root {
  --green: #00c73c;
  --green-deep: #088537; /* 흰 글자와 대비 4.7:1 */
  --green-soft: #eafaf0;
  --ink: #17191c;
  --ink-2: #454b54;
  --ink-3: #68707c;
  --line: #e6e8eb;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --danger: #c4281c;
  --danger-soft: #fdf1f0;
  --warn: #9a4a06;
  --warn-soft: #fff7e6;
  --radius: 12px;
  --tab-h: 58px;
  --player-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --page: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
}
body.has-player { padding-bottom: calc(var(--tab-h) + var(--player-h) + var(--safe-b)); }
body.scroll-locked { position: fixed; left: 0; right: 0; overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0b57d0; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; display: inline-flex; align-items: center; min-height: 44px; background: var(--ink); color: #fff; padding: 0 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.boot-message { padding: 80px 20px; text-align: center; color: var(--ink-3); }
.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 22px; font-weight: 700; font-size: 15px; white-space: nowrap; border: 1px solid transparent; }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: #06702e; }
.btn-line { background: #fff; border-color: #cfd3d9; color: var(--ink); }
.btn-line:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-line { background: #fff; border-color: #e7b3ae; color: var(--danger); }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 22px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex: none; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn.is-on { color: var(--danger); }

/* ---------- 머리말 ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.header-inner { max-width: var(--page); margin: 0 auto; padding: 0 8px 0 16px; height: 56px; display: flex; align-items: center; gap: 4px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 20px; font-weight: 900; letter-spacing: .03em; line-height: 1; }
.brand-sub { font-size: 14px; font-weight: 800; color: var(--green-deep); line-height: 1; padding-left: 8px; border-left: 2px solid var(--line); }
.guild-link { font-size: 22px; line-height: 1; }
.header-upload { display: none; }
.search-form { display: none; position: relative; }
.search-form.is-open { display: block; padding: 0 16px 10px; }
.search-input { width: 100%; height: 44px; padding: 0 46px 0 16px; border: 2px solid var(--green-deep); border-radius: 22px; background: #fff; font-size: 16px; outline-offset: 2px; }
.search-input::placeholder { color: var(--ink-3); }
.search-submit { position: absolute; right: 0; top: 0; color: var(--green-deep); }
.primary-nav { display: none; }

/* ---------- 모바일 하단 탭 ---------- */
.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); min-width: 0; }
.tab-item .icon { width: 24px; height: 24px; }
.tab-item[aria-current="page"] { color: var(--green-deep); }
.tab-upload .tab-plus { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green-deep); color: #fff; margin-top: -4px; }
.tab-upload { color: var(--green-deep); }

/* ---------- 본문 공통 ---------- */
.page { max-width: var(--page); margin: 0 auto; padding: 16px 16px 40px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.page-title { font-size: 22px; font-weight: 800; margin-right: auto; }
.page-desc { width: 100%; color: var(--ink-3); font-size: 14px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; margin-bottom: 10px; min-height: 44px; }
.section-title { font-size: 19px; font-weight: 800; margin-right: auto; }
.more-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.more-link:hover { color: var(--green-deep); }
.sort-tabs { display: inline-flex; background: var(--bg-soft); border-radius: 25px; padding: 3px; }
.sort-tab { min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; font-weight: 700; color: var(--ink-3); }
.sort-tab[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.load-more { display: flex; justify-content: center; margin-top: 20px; }
.empty { padding: 44px 16px; text-align: center; color: var(--ink-3); background: var(--bg-soft); border-radius: var(--radius); }
.empty-title { font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.error-box { padding: 20px 16px; text-align: center; color: var(--danger); background: var(--danger-soft); border-radius: var(--radius); }
.error-box .btn { margin-top: 12px; }
.skeleton { height: 120px; border-radius: var(--radius); background: var(--bg-soft); }

/* ---------- 홈 ---------- */
.hero { position: relative; overflow: hidden; border-radius: 18px; padding: 26px 20px 22px; background: linear-gradient(135deg, #0a7a35 0%, #0d9a45 55%, #35b862 100%); color: #fff; }
.hero-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; opacity: .9; }
.hero-title { font-size: 28px; font-weight: 900; line-height: 1.2; margin-top: 6px; }
.hero-text { margin-top: 10px; font-size: 15px; max-width: 30em; opacity: .96; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .btn-primary { background: #fff; color: #0a6b2f; }
.hero .btn-line { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.hero-tree { position: absolute; right: -18px; bottom: -22px; width: 170px; height: 170px; opacity: .16; pointer-events: none; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; min-height: 76px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: center; }
.stat-card:hover { border-color: var(--green-deep); }
.stat-card .icon { color: var(--green-deep); }
.stat-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.stat-count { font-size: 12px; color: var(--ink-3); }
.notice-adult { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--danger-soft); border: 1px solid #f3c9c5; color: #8f1d14; font-size: 14px; }
.notice-adult .icon { color: var(--danger); margin-top: 1px; }
.notice-adult strong { display: block; font-size: 15px; }

/* ---------- 음원 목록(차트) ---------- */
.track-list { border-top: 1px solid var(--line); }
.track-row { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.track-row.is-current { background: var(--green-soft); }
.track-rank { text-align: center; font-weight: 800; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.track-cover { position: relative; width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: var(--green-soft); }
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--green-deep); background: linear-gradient(135deg, #dff5e6, #c4ecd1); }
.track-main { min-width: 0; min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
.track-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-main:hover .track-title { color: var(--green-deep); }
.track-artist { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta { display: none; }
.track-actions { display: flex; align-items: center; }
.track-actions .like-btn { display: none; }
.play-btn { color: var(--green-deep); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--bg-soft); color: var(--ink-2); vertical-align: middle; }
.badge-green { background: var(--green-soft); color: #066b2c; }
.badge-red { background: var(--danger-soft); color: #9c2118; }
.badge-amber { background: var(--warn-soft); color: var(--warn); }

/* ---------- 이미지·영상 격자 ---------- */
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-grid.is-video { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-card { display: block; width: 100%; text-align: left; min-width: 0; }
.media-thumb { position: relative; overflow: hidden; border-radius: 10px; background: var(--bg-soft); aspect-ratio: 1 / 1; }
.is-video .media-thumb { aspect-ratio: 9 / 16; background: #111; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card:hover .media-thumb img { transform: scale(1.03); }
.media-thumb img { transition: transform .2s ease; }
.media-badge { position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.media-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: flex; align-items: center; justify-content: center; }
.media-title { margin-top: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 음원 상세 ---------- */
.track-detail { display: grid; gap: 18px; }
.track-detail-cover { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; margin: 0 auto; background: var(--green-soft); }
.track-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-detail-cover .icon { width: 72px; height: 72px; }
.detail-title { font-size: 24px; font-weight: 800; line-height: 1.3; }
.detail-artist { margin-top: 4px; color: var(--ink-2); font-weight: 600; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-block { margin-top: 22px; }
.detail-block h2 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.prose { white-space: pre-wrap; color: var(--ink-2); line-height: 1.75; }
.lyrics { white-space: pre-wrap; line-height: 1.9; color: var(--ink-2); padding: 16px; background: var(--bg-soft); border-radius: var(--radius); }

/* ---------- 안내 페이지 ---------- */
.guide h2 { font-size: 18px; font-weight: 800; margin: 26px 0 8px; }
.guide p, .guide li { color: var(--ink-2); }
.guide ul { list-style: disc; padding-left: 20px; display: grid; gap: 4px; }
.guide-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.guide-table th, .guide-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-table th { white-space: nowrap; color: var(--ink); width: 5.5em; }

/* ---------- 접수 현황 ---------- */
.receipt-list { display: grid; gap: 10px; }
.receipt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.receipt-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.receipt-sub { font-size: 13px; color: var(--ink-3); }
.receipt-reason { grid-column: 1 / -1; font-size: 14px; color: #8f1d14; background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; }
.receipt-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 꼬리말 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 24px; }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 22px 16px 28px; font-size: 13px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 8px; }
.footer-links a, .footer-links button { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink-2); }
.footer-links a:hover { color: var(--green-deep); }

/* ---------- 재생 막대 ---------- */
.player-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 45; height: var(--player-h); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
.player-inner { max-width: var(--page); height: 100%; margin: 0 auto; padding: 0 6px 0 12px; display: flex; align-items: center; gap: 8px; }
.player-progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--line); }
.player-progress-fill { height: 100%; width: 0; background: var(--green); }
.player-now { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-align: left; min-height: 48px; }
.player-cover { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; flex: none; background: var(--green-soft); }
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-text { min-width: 0; }
.player-title { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; align-items: center; flex: none; }
.player-controls .ctl-prev { display: none; }
.player-toggle { color: var(--ink); }
.player-toggle .icon { width: 30px; height: 30px; }
.player-seek, .player-extra { display: none; }

/* ---------- 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .5); }
.modal-panel { position: relative; display: flex; flex-direction: column; width: 100%; max-height: 100vh; max-height: 100dvh; background: #fff; border-radius: 18px 18px 0 0; overflow: hidden; }
.modal.is-full .modal-panel { height: 100vh; height: 100dvh; border-radius: 0; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 6px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.modal.is-sheet .modal-head { padding-top: 8px; }
.modal-title { font-size: 18px; font-weight: 800; margin-right: auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; min-height: 0; padding-bottom: calc(16px + var(--safe-b)); }
.modal-foot { display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: #fff; }
.modal-foot .btn { flex: 1; }
.modal.is-dark .modal-panel { background: #111; color: #fff; }
.modal.is-dark .modal-head { border-color: #2a2a2a; }
.modal.is-dark .icon-btn { color: #fff; }
.modal.is-dark .icon-btn:hover { background: #2a2a2a; }
.modal.is-dark .icon-btn.is-on { color: #ff6b5e; }

/* 이미지·영상 보기 */
.viewer-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.viewer-stage { display: flex; align-items: center; justify-content: center; background: #000; flex: none; min-height: 200px; }
.viewer-stage img { max-width: 100%; max-height: 62vh; max-height: 62dvh; object-fit: contain; }
.viewer-stage video { width: 100%; max-height: 68vh; max-height: 68dvh; background: #000; }
.viewer-info { padding: 14px 16px calc(20px + var(--safe-b)); }
.viewer-title { font-size: 18px; font-weight: 800; }
.viewer-sub { margin-top: 2px; font-size: 14px; color: #b8bcc4; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.viewer-desc { margin-top: 14px; white-space: pre-wrap; color: #d4d7dc; line-height: 1.7; }
.modal.is-dark .btn-line { background: transparent; color: #fff; border-color: #555; }
.modal.is-dark .btn-line.is-on { border-color: #ff6b5e; color: #ff8a80; }

/* 지금 재생 중(가사) */
.now-cover { width: min(60vw, 260px); aspect-ratio: 1 / 1; margin: 4px auto 14px; border-radius: 14px; overflow: hidden; background: var(--green-soft); }
.now-cover img { width: 100%; height: 100%; object-fit: cover; }
.now-cover .icon { width: 64px; height: 64px; }
.now-title { text-align: center; font-size: 20px; font-weight: 800; }
.now-artist { text-align: center; color: var(--ink-3); margin-top: 2px; }
.now-seek { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.now-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.now-controls .now-toggle { width: 64px; height: 64px; background: var(--green-deep); color: #fff; }
.now-controls .now-toggle:hover { background: #06702e; }
.now-controls .now-toggle .icon { width: 34px; height: 34px; }
.now-lyrics { margin-top: 20px; }

/* 범위 입력(탐색 막대) */
.range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 44px; background: transparent; margin: 0; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--green) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--green); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--green-deep); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--green-deep); border: 2px solid #fff; }

/* ---------- 올리기 양식 ---------- */
.type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; border: 2px solid var(--line); border-radius: var(--radius); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.type-tab[aria-pressed="true"] { border-color: var(--green-deep); background: var(--green-soft); color: #066b2c; }
.field { margin-top: 16px; }
.field-label { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field-label .req { color: var(--danger); }
.field-label .opt { font-weight: 500; color: var(--ink-3); font-size: 13px; }
.field-hint { margin-top: 5px; font-size: 13px; color: var(--ink-3); }
.field-error { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--danger); }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9ced6; border-radius: 10px; background: #fff; font-size: 16px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--green-deep); outline: 2px solid var(--green-deep); outline-offset: 0; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 104px; padding: 14px; border: 2px dashed #b9c0ca; border-radius: var(--radius); background: var(--bg-soft); text-align: center; color: var(--ink-2); }
.file-drop.is-over { border-color: var(--green-deep); background: var(--green-soft); }
.file-drop.has-file { border-style: solid; border-color: var(--green-deep); background: var(--green-soft); }
.file-drop .icon { color: var(--green-deep); width: 28px; height: 28px; }
.file-name { font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px; border-radius: 10px; background: var(--bg-soft); font-size: 14px; }
.check-row input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--green-deep); }
.progress { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); transition: width .2s linear; }
.upload-status { text-align: center; padding: 18px 0 6px; }
.upload-step { font-weight: 800; font-size: 17px; }
.upload-detail { margin: 6px 0 16px; color: var(--ink-3); font-size: 14px; min-height: 1.5em; }
.upload-done-icon { width: 60px; height: 60px; margin: 6px auto 10px; border-radius: 50%; background: var(--green-soft); color: var(--green-deep); display: flex; align-items: center; justify-content: center; }
.upload-done-icon.is-fail { background: var(--danger-soft); color: var(--danger); }
.upload-done-icon .icon { width: 34px; height: 34px; }

/* 검사용 영상: 화면에는 보이지 않지만 프레임은 디코딩되어야 하므로 display:none 을 쓰지 않는다 */
.scan-video { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-facts { font-size: 13px; color: var(--ink-2); }

/* ---------- 알림 ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--player-h) + var(--safe-b) + 12px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { max-width: 100%; padding: 11px 16px; border-radius: 10px; background: #23262b; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.toast.is-error { background: #a3231a; }

/* ================= 태블릿 이상 ================= */
@media (min-width: 768px) {
  body { padding-bottom: 0; font-size: 15px; }
  body.has-player { padding-bottom: 76px; }
  :root { --player-h: 76px; }
  .tab-bar { display: none; }
  .header-inner { height: 64px; padding: 0 20px; gap: 12px; }
  .brand { margin-right: 8px; }
  .search-toggle { display: none; }
  .search-form, .search-form.is-open { display: block; flex: 1; max-width: 440px; margin-right: auto; padding: 0; }
  .header-upload { display: inline-flex; }
  .primary-nav { display: block; border-top: 1px solid var(--line); }
  .nav-inner { max-width: var(--page); margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; }
  .nav-link { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 48px; padding: 0 14px; font-weight: 700; font-size: 16px; color: var(--ink-2); }
  .nav-link:hover { color: var(--green-deep); }
  .nav-link[aria-current="page"] { color: var(--green-deep); }
  .nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--green); border-radius: 2px; }
  .page { padding: 24px 20px 56px; }
  .hero { padding: 40px 36px; }
  .hero-title { font-size: 36px; }
  .hero-tree { width: 260px; height: 260px; right: 10px; bottom: -40px; }
  .hero-stats { gap: 12px; }
  .stat-card { flex-direction: row; justify-content: center; gap: 10px; min-height: 64px; }
  .media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .media-grid.is-video { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .track-row { grid-template-columns: 34px 56px minmax(0, 1fr) minmax(0, 150px) 56px auto; gap: 14px; padding: 8px 8px; }
  .track-row:hover { background: var(--bg-soft); }
  .track-cover { width: 56px; height: 56px; }
  .track-meta { display: block; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .track-meta.is-time { text-align: right; font-variant-numeric: tabular-nums; }
  .track-actions .like-btn { display: inline-flex; }
  .track-detail { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
  .track-detail-cover { margin: 0; }
  .player-bar { bottom: 0; }
  .player-progress { display: none; }
  .player-inner { padding: 0 20px; gap: 16px; }
  .player-now { flex: 0 1 280px; }
  .player-cover { width: 52px; height: 52px; }
  .player-controls .ctl-prev { display: inline-flex; }
  .player-seek { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
  .player-extra { display: flex; align-items: center; flex: none; }
  .toast-wrap { bottom: 96px; }
  .modal { align-items: center; padding: 24px; }
  .modal-panel { max-width: 560px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); border-radius: 18px; }
  .modal.is-full .modal-panel { height: auto; border-radius: 18px; }
  .modal-head { padding: 10px 8px 10px 20px; }
  .modal-body { padding: 20px; }
  .modal-foot { padding: 14px 20px; }
  .modal.is-wide .modal-panel { max-width: 980px; }
  .viewer-stage img { max-height: 66vh; max-height: 66dvh; }
  .viewer-stage video { max-height: 66vh; max-height: 66dvh; }
  .viewer-info { padding: 16px 20px 22px; }
}
@media (min-width: 1100px) {
  .media-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .media-grid.is-video { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .brand-sub { display: none; }
  .hero-title { font-size: 24px; }
}
/* 가로로 눕힌 휴대폰: 화면이 낮으므로 보기 영역을 줄인다 */
@media (max-height: 480px) and (orientation: landscape) {
  .viewer-stage img, .viewer-stage video { max-height: 78vh; max-height: 78dvh; }
  .now-cover { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* aspect-ratio 를 모르는 구형 브라우저(iOS 14 이하)용 */
@supports not (aspect-ratio: 1 / 1) {
  .media-thumb { height: 0; padding-top: 100%; }
  .is-video .media-thumb { padding-top: 177.78%; }
  .media-thumb img, .media-thumb .cover-fallback { position: absolute; left: 0; top: 0; }
  .track-detail-cover { height: 280px; }
  .now-cover { height: min(60vw, 260px); }
}

/* ---------- 보완 ---------- */
.search-box { position: relative; }
.receipt-banner { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.receipt-banner:hover { border-color: var(--green-deep); color: var(--green-deep); }
.receipt-banner .icon { color: var(--green-deep); }
.plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.radio-row { margin-top: 8px; align-items: center; min-height: 48px; }
.media-grid.is-video.is-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .media-grid.is-home, .media-grid.is-video.is-home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- 🛡️ 길드장 관리실 ---------- */
.guild-body { padding-bottom: 0; background: var(--bg-soft); }
.guild-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.guild-header-inner { max-width: 980px; margin: 0 auto; min-height: 56px; padding: 6px 16px; display: flex; align-items: center; gap: 8px; }
.guild-title { font-size: 18px; font-weight: 800; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-main { max-width: 980px; margin: 0 auto; padding: 16px 16px calc(40px + var(--safe-b)); }
.guild-login { max-width: 400px; margin: 32px auto; padding: 24px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.guild-login h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.guild-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.guild-card { display: flex; flex-direction: column; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.guild-card.is-warn { border-color: #e9b872; background: var(--warn-soft); }
.guild-card-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.guild-card-label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
/* 좁은 화면에서는 가로로 밀지 않고 두 줄로 접는다 */
.guild-tabs { display: flex; flex-wrap: wrap; margin: 16px 0 12px; background: #e9ebee; border-radius: 16px; }
.guild-tabs .sort-tab { flex: 1 0 auto; min-height: 44px; white-space: nowrap; }
.guild-list { display: grid; gap: 8px; }
.queue-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.queue-row.is-report { grid-template-columns: minmax(0, 1fr); }
.queue-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.queue-main { min-width: 0; }
.queue-title { font-weight: 700; }
.queue-sub { font-size: 13px; color: var(--ink-3); }
.queue-notes { margin-top: 4px; font-size: 13px; color: var(--warn); }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #111; border-radius: var(--radius); overflow: hidden; min-height: 120px; }
.review-stage img, .review-stage video { max-width: 100%; max-height: 56vh; max-height: 56dvh; object-fit: contain; }
.review-stage audio { width: 100%; max-width: 480px; margin: 12px; }
.review-stage .review-cover { max-height: 220px; margin-top: 12px; border-radius: 8px; }
.review-stage .empty { background: transparent; color: #d4d7dc; }
.review-h { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.scan-line { margin-top: 6px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.audit-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.audit-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.audit-row:last-child { border-bottom: 0; }
.audit-time { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.audit-action { font-weight: 700; }
.audit-detail { color: var(--ink-2); }
@media (min-width: 768px) {
  .guild-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .queue-row.is-report { grid-template-columns: minmax(0, 1fr) auto; }
  .audit-row { grid-template-columns: 140px 170px minmax(0, 1fr); gap: 12px; }
}

/* 마우스를 쓰는 넓은 화면에서는 버튼을 조금 작게. 터치 기기(휴대폰·태블릿)는 44px 을 유지한다. */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .btn-small { min-height: 36px; border-radius: 18px; }
  .sort-tab { min-height: 38px; }
  .range { height: 28px; }
}
