/* GrooveMap community board (/community). Standalone sheet: main.css is NOT loaded here
 * (11k lines and a fixed 72px header). Light theme; the brand orange (#f97316) is an accent only:
 * active tab, checks, progress, likes, focus. Actions are ink (#0f172a) so every text sits at WCAG AA.
 * Mobile first; 360px wide must never scroll sideways; inputs stay 16px (iOS focus zoom); touch targets 44px
 * on coarse pointers. Design round 2026-09-28 (owner: "더 세련되고 이쁘게"). */
:root {
    --cm-bg: #f5f6f8;
    --cm-surface: #ffffff;
    --cm-surface-2: #f1f3f6;
    --cm-surface-3: #e7ebf0;
    --cm-ink: #0f172a;
    --cm-ink-2: #1e293b;
    --cm-text: #0f172a;
    --cm-text-2: #475569;                     /* 7.5:1 on white */
    --cm-muted: #5d6b7e;                      /* 5.4:1 on white, 5.0:1 on --cm-bg */
    --cm-placeholder: #6b7686;                /* 4.6:1 on white */
    --cm-light: #cbd5e1;
    --cm-line: rgba(15, 23, 42, 0.08);
    --cm-line-2: rgba(15, 23, 42, 0.12);
    --cm-line-3: rgba(15, 23, 42, 0.2);
    --cm-field: #d3d9e2;
    --cm-field-hover: #b6bfcc;
    --cm-control: #8391a4;                    /* checkbox / radio edge: 3.2:1 on white (non-text) */
    --cm-accent: #f97316;                     /* brand orange: decoration and non-text marks */
    --cm-accent-600: #ea580c;                 /* checks, underline, progress: 3.6:1 (non-text) */
    --cm-accent-ink: #c2410c;                 /* orange text: 5.2:1 on white, 4.7:1 on --cm-accent-soft */
    --cm-accent-soft: #fff4ed;
    --cm-accent-line: #fed7aa;
    --cm-ring: 0 0 0 3px rgba(249, 115, 22, 0.3);
    --cm-danger: #dc2626;
    --cm-danger-ink: #b91c1c;
    --cm-danger-bg: #fef2f2;
    --cm-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --cm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px -4px rgba(15, 23, 42, 0.1);
    --cm-shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 14px 32px -12px rgba(15, 23, 42, 0.22);
    --cm-shadow-lg: 0 28px 56px -16px rgba(15, 23, 42, 0.32), 0 2px 6px rgba(15, 23, 42, 0.06);
    --cm-radius-sm: 8px;
    --cm-radius-md: 12px;
    --cm-radius-lg: 16px;
    --cm-radius-xl: 20px;
    --cm-radius-full: 9999px;
    --cm-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --cm-fast: 0.16s cubic-bezier(0.2, 0.7, 0.2, 1);
    --cm-sat: env(safe-area-inset-top, 0px);
    --cm-sab: env(safe-area-inset-bottom, 0px);
    --cm-sal: env(safe-area-inset-left, 0px);
    --cm-sar: env(safe-area-inset-right, 0px);
    --cm-font: 'Pretendard Variable', Pretendard, 'Outfit', -apple-system, BlinkMacSystemFont, system-ui,
        'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    --cm-font-brand: 'Outfit', 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
    --cm-gutter: 16px;
    --cm-max: 760px;
    --cm-max-wide: 1080px;
    --cm-bar-h: 56px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* nothing scrolled into view (focus, anchors) may hide under the sticky header or a docked bar */
html { scroll-padding-top: calc(var(--cm-bar-h) + var(--cm-sat) + 8px); }
@media (max-width: 599px) {
    html:has(.cm-submit-bar), html:has(.cm-cmt-form.is-dock) { scroll-padding-bottom: calc(96px + var(--cm-sab)); }
}
html, body { overflow-x: clip; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--cm-bg);
    color: var(--cm-text);
    font-family: var(--cm-font);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    word-break: keep-all;
    overflow-wrap: anywhere;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) { body { font-size: 16px; } }
html.cm-modal-open, html.cm-modal-open body { overflow: hidden; }
h1, h2, h3, p, figure, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button, a, label, [role="button"], input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
::selection { background: rgba(249, 115, 22, 0.22); }
:focus-visible { outline: 2px solid var(--cm-accent-600); outline-offset: 2px; }
.cm-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 0; }
.cm-ic svg { width: 1.1em; height: 1.1em; }
.cm-sr {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cm-offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

/* ---------- app bar ---------- */
.cm-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--cm-line);
    padding-top: var(--cm-sat);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .cm-bar { background: rgba(255, 255, 255, 0.97); }
}
.cm-bar-inner {
    max-width: var(--cm-max-wide);
    margin: 0 auto;
    height: var(--cm-bar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 calc(var(--cm-gutter) + var(--cm-sar)) 0 calc(var(--cm-gutter) + var(--cm-sal));
}
.cm-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; min-width: 0; border-radius: 10px; }
.cm-logo img { width: 28px; height: 28px; border-radius: 8px; }
.cm-logo-word { font-family: var(--cm-font-brand); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.cm-bar-sep { width: 1px; height: 16px; background: var(--cm-line-2); flex: none; }
.cm-bar-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--cm-text);
    white-space: nowrap;
    min-width: 0;
    border-radius: 8px;
}
.cm-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.cm-bar-write { min-height: 38px; padding: 0 14px 0 12px; font-size: 14px; }
.cm-bar-write .cm-ic svg { width: 16px; height: 16px; }
.cm-bar-login { min-height: 38px; padding: 0 14px; font-size: 14px; }
.cm-bar-me {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px 0 5px;
    border-radius: var(--cm-radius-full);
    border: 1px solid var(--cm-line-2);
    background: var(--cm-surface);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    max-width: 168px;
    transition: border-color var(--cm-fast), background var(--cm-fast);
}
.cm-bar-me:hover { border-color: var(--cm-line-3); }
.cm-bar-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cm-dot {
    position: absolute;
    top: 3px;
    left: 24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cm-accent);
    box-shadow: 0 0 0 2px var(--cm-surface);
}
@media (max-width: 420px) {
    .cm-logo-word, .cm-bar-sep { display: none; }
}
@media (max-width: 380px) {
    .cm-bar-me { max-width: 118px; }
    .cm-bar-inner { gap: 8px; }
    .cm-bar-actions { gap: 6px; }
}
@media (max-width: 340px) {
    .cm-bar-me { padding: 0; width: 40px; justify-content: center; }
    .cm-bar-me .cm-bar-nick { display: none; }
    .cm-dot { left: 26px; }
}
@media (max-width: 330px) {
    .cm-bar-write .cm-bar-label { display: none; }
    .cm-bar-write { width: 40px; padding: 0; }
}

/* ---------- layout ---------- */
#cm-app, #cm-ssr { width: 100%; }
.cm-wrap, #cm-ssr {
    max-width: var(--cm-max);
    margin: 0 auto;
    padding: 20px calc(var(--cm-gutter) + var(--cm-sar)) 40px calc(var(--cm-gutter) + var(--cm-sal));
}
.cm-wrap.is-wide { max-width: var(--cm-max-wide); }
#cm-app:empty { display: none; }
#cm-ssr { flex: 1 0 auto; }
.cm-wrap { flex: 1 0 auto; }
.cm-view { min-width: 0; }
.cm-notices { display: grid; gap: 8px; }
.cm-notices:not(:empty) { margin-bottom: 16px; }
.cm-h1 { font-size: clamp(1.45rem, 1.3rem + 0.6vw, 1.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.cm-sub { color: var(--cm-text-2); font-size: 14px; margin-top: 4px; }
.cm-sec-title { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cm-hint { color: var(--cm-text-2); font-size: 13px; line-height: 1.55; }
.cm-hint.is-ok { color: #047857; font-weight: 600; }
.cm-hint.is-bad { color: var(--cm-danger-ink); font-weight: 600; }

/* ---------- buttons ---------- */
.cm-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--cm-radius-full);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--cm-fast), border-color var(--cm-fast), color var(--cm-fast), box-shadow var(--cm-fast), transform var(--cm-fast);
    -webkit-user-select: none;
    user-select: none;
}
.cm-btn .cm-ic svg { width: 16px; height: 16px; }
.cm-btn:active:not(:disabled) { transform: scale(0.97); }
.cm-btn:disabled { opacity: 0.5; }
.cm-btn.is-busy { opacity: 0.85; cursor: progress; }
.cm-btn.is-busy::before {
    content: '';
    width: 14px;
    height: 14px;
    flex: none;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: cm-spin 0.7s linear infinite;
}
.cm-btn-primary {
    background: var(--cm-ink);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cm-btn-primary:hover:not(:disabled) { background: var(--cm-ink-2); }
.cm-btn-ghost { background: var(--cm-surface); border-color: var(--cm-line-2); color: var(--cm-text); }
.cm-btn-ghost:hover:not(:disabled) { border-color: var(--cm-line-3); background: #fafbfc; }
.cm-btn-text { background: transparent; color: var(--cm-text-2); padding: 0 10px; }
.cm-btn-text:hover:not(:disabled) { color: var(--cm-text); background: var(--cm-surface-2); }
.cm-btn-danger { background: var(--cm-danger); color: #fff; }
.cm-btn-danger:hover:not(:disabled) { background: var(--cm-danger-ink); }
.cm-btn-danger-text { color: var(--cm-danger-ink); }
.cm-btn-danger-text:hover:not(:disabled) { color: var(--cm-danger-ink); background: var(--cm-danger-bg); }
.cm-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.cm-btn-lg { min-height: 52px; font-size: 16px; font-weight: 700; }
.cm-btn-wide { width: 100%; }
.cm-btn-link {
    background: none; border: 0; padding: 0; color: var(--cm-accent-ink);
    font-weight: 700; text-decoration: underline; text-underline-offset: 2px; font-size: inherit;
}
.cm-icon-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--cm-text-2); flex: none;
    transition: background var(--cm-fast), color var(--cm-fast);
}
.cm-icon-btn:hover { background: var(--cm-surface-2); color: var(--cm-text); }
.cm-icon-btn-sm { width: 32px; height: 32px; }
.cm-icon-btn-sm .cm-ic svg { width: 16px; height: 16px; }
/* small controls keep a 44px hit area around them */
.cm-btn-sm::after, .cm-icon-btn-sm::after { content: ''; position: absolute; inset: -6px -2px; }
@media (pointer: coarse) {
    .cm-btn { min-height: 44px; }
    .cm-btn-sm { min-height: 36px; }
    .cm-btn-lg { min-height: 52px; }
    .cm-icon-btn { width: 44px; height: 44px; }
    .cm-icon-btn-sm { width: 36px; height: 36px; }
    .cm-bar-write, .cm-bar-login { min-height: 40px; }
    .cm-search-btn { min-height: 38px; }
    .cm-bar-write::after, .cm-bar-login::after, .cm-bar-me::after, .cm-search-btn::after { content: ''; position: absolute; inset: -3px -1px; }
    .cm-logo, .cm-bar-title { position: relative; }
    .cm-logo::after, .cm-bar-title::after { content: ''; position: absolute; inset: -9px -4px; }
    .cm-foot-row a, .cm-foot-proc a, .cm-login-links a { display: inline-flex; align-items: center; min-height: 44px; }
    .cm-check-link { display: inline-flex; align-items: center; min-height: 36px; }
}

/* ---------- badges, chips, avatars ---------- */
.cm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    background: var(--cm-surface-2);
    color: var(--cm-text-2);
}
.cm-badge .cm-ic svg { width: 12px; height: 12px; }
.cm-badge-video { background: var(--cm-accent-soft); color: var(--cm-accent-ink); }
.cm-badge-qna { background: #eef4ff; color: #1d4ed8; }
.cm-badge-free { background: #ecfdf5; color: #047857; }
.cm-badge-notice { background: var(--cm-ink); color: #fff; }
.cm-badge-compose { background: var(--cm-surface); color: var(--cm-accent-ink); box-shadow: inset 0 0 0 1px var(--cm-accent-line); }
.cm-badge-admin { background: var(--cm-ink); color: #fff; height: 18px; padding: 0 6px; font-size: 10.5px; border-radius: 5px; }
.cm-badge-held { background: #fffbeb; color: #92400e; }
.cm-badge-removed, .cm-badge-deleted { background: var(--cm-danger-bg); color: var(--cm-danger-ink); }
.cm-badge-new { background: var(--cm-accent-ink); color: #fff; }
.cm-badge-link { background: var(--cm-surface-2); color: var(--cm-text-2); }
.cm-badge-link.cm-badge-youtube { background: #fef2f2; color: #b91c1c; }
.cm-badge-link.cm-badge-instagram { background: #fdf2f8; color: #be185d; }
.cm-badge-link.cm-badge-tiktok { background: #eef2f6; color: var(--cm-ink); }
.cm-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--cm-radius-full);
    background: var(--cm-accent-soft);
    border: 1px solid var(--cm-accent-line);
    color: var(--cm-accent-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--cm-fast), border-color var(--cm-fast);
}
a.cm-chip:hover { background: #ffedd5; }
.cm-chip .cm-ic svg { width: 14px; height: 14px; }
.cm-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cm-avatar {
    --av: 28px;
    --av-bg: #e2e8f0;
    --av-fg: #334155;
    width: var(--av);
    height: var(--av);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    background: var(--av-bg);
    color: var(--av-fg);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    font-size: calc(var(--av) * 0.42);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    -webkit-user-select: none;
    user-select: none;
}
.cm-avatar .cm-ic svg { width: calc(var(--av) * 0.55); height: calc(var(--av) * 0.55); }
.cm-avatar-xs { --av: 26px; }
.cm-avatar-sm { --av: 28px; }
.cm-avatar-md { --av: 40px; }
.cm-avatar-lg { --av: 56px; }
.cm-avatar.tone-0 { --av-bg: #ffedd5; --av-fg: #9a3412; }
.cm-avatar.tone-1 { --av-bg: #fef3c7; --av-fg: #92400e; }
.cm-avatar.tone-2 { --av-bg: #dcfce7; --av-fg: #166534; }
.cm-avatar.tone-3 { --av-bg: #ccfbf1; --av-fg: #115e59; }
.cm-avatar.tone-4 { --av-bg: #e0f2fe; --av-fg: #075985; }
.cm-avatar.tone-5 { --av-bg: #e0e7ff; --av-fg: #3730a3; }
.cm-avatar.tone-6 { --av-bg: #ede9fe; --av-fg: #5b21b6; }
.cm-avatar.tone-7 { --av-bg: #fce7f3; --av-fg: #9d174d; }
.cm-avatar.tone-8 { --av-bg: #ffe4e6; --av-fg: #9f1239; }
.cm-avatar.is-guest { --av-bg: #f1f5f9; --av-fg: #475569; box-shadow: inset 0 0 0 1px #cbd5e1; }
.cm-avatar.is-admin { --av-bg: var(--cm-ink); --av-fg: #fdba74; box-shadow: none; }

/* ---------- meta ---------- */
.cm-meta, .cm-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    color: var(--cm-muted);
    font-size: 12.5px;
    min-width: 0;
}
.cm-author { display: inline-flex; align-items: center; gap: 6px; color: var(--cm-text-2); font-weight: 600; min-width: 0; }
.cm-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; min-width: 0; }
.cm-author-ip { color: var(--cm-muted); font-weight: 500; }
.cm-stat { display: inline-flex; align-items: center; gap: 4px; }
.cm-stat .cm-ic svg { width: 15px; height: 15px; }
.cm-time { white-space: nowrap; }
.cm-edited { color: var(--cm-muted); }
.cm-count { font-variant-numeric: tabular-nums; }

/* ---------- list head ---------- */
.cm-list-head { display: grid; gap: 16px; margin-bottom: 18px; }
.cm-list-title { min-width: 0; }
.cm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line-2);
    border-radius: var(--cm-radius-full);
    padding: 0 5px 0 16px;
    min-width: 0;
    box-shadow: var(--cm-shadow-xs);
    transition: border-color var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-search:hover { border-color: var(--cm-line-3); }
.cm-search:focus-within { border-color: var(--cm-accent); box-shadow: var(--cm-ring); }
.cm-search-ic { color: var(--cm-muted); }
.cm-search-ic svg { width: 18px; height: 18px; }
.cm-search-input.cm-input { border: 0; box-shadow: none; padding: 0; height: 100%; min-width: 0; flex: 1; background: transparent; border-radius: 0; }
.cm-search-input.cm-input:focus { box-shadow: none; }
.cm-search-btn { min-height: 38px; padding: 0 16px; background: var(--cm-surface-2); color: var(--cm-text); }
.cm-search-btn:hover:not(:disabled) { background: var(--cm-surface-3); }
@media (pointer: coarse) { .cm-search-btn { min-height: 38px; } }
.cm-tabs-wrap {
    position: relative;
    margin: 0 calc(-1 * var(--cm-gutter));
    border-bottom: 1px solid var(--cm-line-2);
}
.cm-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 calc(var(--cm-gutter) - 10px);
}
.cm-tabs::-webkit-scrollbar { display: none; }
.cm-tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.cm-tabs.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.cm-tabs.fade-l.fade-r {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.cm-tab {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 10px;
    color: var(--cm-muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--cm-fast);
}
.cm-tab:hover { color: var(--cm-text); }
.cm-tab.is-on { color: var(--cm-text); font-weight: 700; }
.cm-tab.is-on::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--cm-accent-600);
}
.cm-tab:focus-visible { outline-offset: -6px; border-radius: 10px; }
@media (min-width: 768px) {
    .cm-list-head { grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: end; column-gap: 24px; }
    .cm-list-head > .cm-tabs-wrap, .cm-list-head > .cm-filters { grid-column: 1 / -1; }
    .cm-tabs-wrap { margin: 0; }
    .cm-tabs { padding: 0; }
    .cm-tab:first-child { padding-left: 2px; }
    .cm-tab:first-child.is-on::after { left: 2px; }
}

/* ---------- "put a score on your video" card ---------- */
.cm-cta { position: relative; margin: 0 0 16px; }
.cm-cta-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 48px 12px 12px;
    border-radius: 14px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    box-shadow: var(--cm-shadow-xs);
    text-decoration: none;
    min-width: 0;
    transition: border-color var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-cta-link:hover { border-color: var(--cm-accent-line); box-shadow: var(--cm-shadow-sm); }
.cm-cta-ic {
    width: 38px; height: 38px; flex: none; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cm-accent-soft); color: var(--cm-accent-600);
}
.cm-cta-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.cm-cta-text strong { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.cm-cta-text span { font-size: 12.5px; color: var(--cm-text-2); line-height: 1.45; }
.cm-cta-go { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--cm-accent-ink); }
.cm-cta-go .cm-ic svg { width: 16px; height: 16px; }
.cm-cta-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); color: var(--cm-muted); }
@media (max-width: 560px) { .cm-cta-go-text { display: none; } }

/* ---------- feed and cards ---------- */
.cm-feed { display: grid; gap: 12px; }
/* a text post's cover: only in the two-column grid, where every tile then has the same picture + body shape */
.cm-card-cover { display: none; }
@media (min-width: 900px) {
    .cm-wrap.is-wide .cm-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .cm-wrap.is-wide .cm-card-cover {
        position: relative;
        display: flex;
        align-items: flex-start;
        flex: none;
        aspect-ratio: 16 / 9;
        padding: 26px 28px 0;
        overflow: hidden;
        border-bottom: 1px solid var(--cm-line);
        background: linear-gradient(165deg, var(--cv-tint, #f4f6f9) 0%, #ffffff 92%);
    }
    .cm-wrap.is-wide .cm-card-cover::before {
        content: '';
        position: absolute; left: 28px; top: 20px;
        width: 28px; height: 3px; border-radius: 3px;
        background: var(--cv-mark, var(--cm-light));
    }
    .cm-wrap.is-wide .cm-card-cover::after {
        content: '';
        position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 88%);
        pointer-events: none;
    }
    .cm-wrap.is-wide .cm-cover-video { --cv-tint: #fff1e6; --cv-mark: var(--cm-accent); }
    .cm-wrap.is-wide .cm-cover-qna { --cv-tint: #eaf1ff; --cv-mark: #3b82f6; }
    .cm-wrap.is-wide .cm-cover-free { --cv-tint: #e8f8f0; --cv-mark: #10b981; }
    .cm-wrap.is-wide .cm-cover-notice { --cv-tint: #eef1f5; --cv-mark: var(--cm-ink); }
    .cm-card-cover-text {
        margin-top: 14px;
        font-size: 17px;
        font-weight: 500;
        line-height: 1.7;
        letter-spacing: -0.02em;
        color: #1e293b;
        white-space: pre-line;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .cm-card-cover-text.is-short { font-size: 22px; font-weight: 700; line-height: 1.5; letter-spacing: -0.03em; color: var(--cm-text); }
    .cm-card-cover-ic { margin: auto; color: var(--cv-mark, var(--cm-muted)); opacity: 0.5; }
    .cm-card-cover-ic svg { width: 44px; height: 44px; }
    .cm-wrap.is-wide .cm-card-cover.is-link {
        align-items: center; justify-content: center; flex-direction: column; gap: 12px;
        padding: 0; color: #fff; border-bottom: 0;
    }
    .cm-wrap.is-wide .cm-card-cover.is-link::before, .cm-wrap.is-wide .cm-card-cover.is-link::after { display: none; }
    .cm-wrap.is-wide .cm-cover-instagram { background: radial-gradient(120% 140% at 0% 100%, #fdc468 0%, #f77737 22%, #dd2a7b 52%, #8134af 78%, #515bd4 100%); }
    .cm-wrap.is-wide .cm-cover-tiktok { background: radial-gradient(90% 120% at 20% 10%, #1f2937 0%, #0b0b0f 70%); }
    .cm-wrap.is-wide .cm-cover-youtube { background: radial-gradient(90% 120% at 20% 10%, #ef4444 0%, #991b1b 80%); }
    .cm-card-cover.is-link .cm-card-play { position: static; transform: none; }
    .cm-card-cover-brand { font-family: var(--cm-font-brand); font-size: 15px; font-weight: 700; letter-spacing: 0.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
    @media (hover: hover) { .cm-card:hover .cm-card-cover.is-link .cm-card-play { transform: scale(1.08); } }
    .cm-wrap.is-wide .cm-card:not(.has-media):not(.is-compact) .cm-card-excerpt { display: none; }
}
.cm-feed > .cm-empty, .cm-feed > .cm-sr { grid-column: 1 / -1; }
.cm-card {
    display: flex;
    flex-direction: column;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--cm-radius-lg);
    box-shadow: var(--cm-shadow-xs);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    min-width: 0;
    transition: box-shadow 0.22s var(--cm-ease), transform 0.22s var(--cm-ease), border-color 0.22s var(--cm-ease);
}
.cm-card:focus-visible { outline: 2px solid var(--cm-accent-600); outline-offset: 2px; }
@media (hover: hover) {
    .cm-card:hover { box-shadow: var(--cm-shadow-md); transform: translateY(-2px); border-color: var(--cm-line-2); }
    .cm-card:hover .cm-card-img { transform: scale(1.035); }
    .cm-card:hover .cm-card-media.is-portrait .cm-card-img { transform: none; }
    .cm-card:hover .cm-card-play { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
}
.cm-card-media {
    position: relative;
    flex: none;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b1220;
    isolation: isolate;
}
.cm-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--cm-ease); }
.cm-card-media.is-portrait .cm-card-bg { filter: blur(22px) saturate(1.25) brightness(0.72); transform: scale(1.3); }
.cm-card-media.is-portrait .cm-card-img { object-fit: contain; }
.cm-card-media.is-empty { background: radial-gradient(120% 110% at 28% 18%, #334155 0%, #111827 62%, #0b1220 100%); }
.cm-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.5); }
.cm-card-ph svg { width: 34px; height: 34px; }
.cm-card-shade {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.14) 34%, rgba(2, 6, 23, 0) 58%);
}
.cm-card-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.9); color: var(--cm-ink);
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.3);
    transition: transform 0.22s var(--cm-ease), background 0.22s var(--cm-ease);
}
.cm-card-play svg { width: 22px; height: 22px; margin-left: 3px; }
.cm-card-dur {
    position: absolute; right: 10px; bottom: 10px;
    padding: 2px 7px; border-radius: 6px;
    background: rgba(2, 6, 23, 0.7); color: #fff;
    font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}
.cm-card-flag {
    position: absolute; left: 10px; top: 10px;
    display: inline-flex; align-items: center; gap: 5px;
    height: 26px; padding: 0 10px 0 8px; border-radius: var(--cm-radius-full);
    background: rgba(255, 255, 255, 0.95); color: var(--cm-accent-ink);
    font-size: 12px; font-weight: 700; letter-spacing: -0.01em;
    box-shadow: 0 2px 10px rgba(2, 6, 23, 0.2);
}
.cm-card-flag .cm-ic svg { width: 13px; height: 13px; }
.cm-card-main { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 16px 14px; min-width: 0; }
.cm-card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cm-card-top:empty { display: none; }
.cm-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cm-card-excerpt {
    color: var(--cm-text-2);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cm-card.has-media .cm-card-excerpt { -webkit-line-clamp: 1; }
.cm-card-song { display: flex; align-items: center; gap: 5px; color: var(--cm-accent-ink); font-size: 12.5px; font-weight: 600; min-width: 0; }
.cm-card-song .cm-ic svg { width: 14px; height: 14px; }
.cm-card-song span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; min-width: 0; }
.cm-card-foot .cm-meta { flex: 1; flex-wrap: nowrap; overflow: hidden; }
.cm-card-foot .cm-author { flex: 0 1 auto; }
.cm-stats { display: flex; align-items: center; gap: 12px; flex: none; color: var(--cm-muted); font-size: 12.5px; }
/* compact rows (My activity) */
.cm-feed-compact { gap: 8px; }
.cm-card.is-compact { flex-direction: row; align-items: flex-start; box-shadow: none; }
.cm-card.is-compact .cm-card-media { order: 2; width: 112px; margin: 12px 12px 12px 0; border-radius: 10px; }
.cm-card.is-compact .cm-card-play { width: 28px; height: 28px; }
.cm-card.is-compact .cm-card-play svg { width: 13px; height: 13px; margin-left: 2px; }
.cm-card.is-compact .cm-card-dur { right: 5px; bottom: 5px; font-size: 10.5px; padding: 1px 5px; }
.cm-card.is-compact .cm-card-main { padding: 12px 14px; gap: 5px; }
.cm-card.is-compact .cm-card-title { font-size: 15px; }
@media (hover: hover) { .cm-card.is-compact:hover { transform: none; box-shadow: var(--cm-shadow-sm); } }
.cm-more { margin-top: 16px; }
.cm-more:empty { display: none; }
@media (min-width: 900px) { .cm-wrap.is-wide .cm-more { max-width: 360px; margin-left: auto; margin-right: auto; } }

/* ---------- skeletons ---------- */
.cm-skel {
    display: block;
    border-radius: 7px;
    background: linear-gradient(90deg, #eceff3 0%, #f6f7f9 45%, #eceff3 90%);
    background-size: 300% 100%;
    animation: cm-shimmer 1.4s ease-in-out infinite;
}
@keyframes cm-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cm-skel-card { display: flex; flex-direction: column; background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: var(--cm-radius-lg); overflow: hidden; }
.cm-skel-media { aspect-ratio: 16 / 9; border-radius: 0; }
.cm-skel-body { display: grid; gap: 10px; padding: 16px; }
.cm-skel-chip { width: 56px; height: 20px; border-radius: 6px; }
.cm-skel-line { height: 14px; width: 100%; }
.cm-skel-line.is-title { height: 18px; width: 82%; }
.cm-skel-line.is-short { width: 56%; }
.cm-skel-line.is-tiny { width: 96px; height: 12px; }
.cm-skel-line.is-h1 { height: 30px; width: 74%; }
.cm-skel-foot { display: flex; align-items: center; gap: 8px; }
.cm-skel-dot { width: 26px; height: 26px; border-radius: 50%; }
.cm-skel-dot.is-lg { width: 40px; height: 40px; }
.cm-skel-post { display: grid; gap: 14px; padding-top: 4px; }
.cm-skel-media.is-post { border-radius: 18px; }

/* ---------- notices, empty states, loading ---------- */
.cm-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #dbe7fe;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.5;
}
.cm-notice .cm-ic { margin-top: 2px; }
.cm-notice-text { display: grid; gap: 2px; min-width: 0; }
.cm-notice-text span { color: inherit; opacity: 0.88; font-size: 13px; }
.cm-notice-held { background: #fffbeb; border-color: #fde68a; color: #78350f; margin: 12px 0; }
.cm-notice-admin { background: var(--cm-ink); border-color: var(--cm-ink); color: #fff; padding: 10px 14px; font-size: 13px; }
.cm-notice-admin .cm-ic { color: #fdba74; }
.cm-notice-error { background: var(--cm-danger-bg); border-color: #fecaca; color: #991b1b; }
.cm-notice-text .cm-ban-reason { opacity: 1; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.cm-held-tools { display: flex; justify-content: flex-end; margin-top: 4px; }
.cm-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding: 40px 20px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--cm-radius-xl);
}
.cm-empty .cm-btn { margin-top: 6px; }
.cm-empty-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.cm-empty-sub { color: var(--cm-text-2); font-size: 14px; }
.cm-empty-ic {
    width: 46px; height: 46px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cm-surface-2); color: var(--cm-text-2);
}
.cm-empty-ic svg { width: 21px; height: 21px; }
.cm-empty-error .cm-empty-ic { background: var(--cm-danger-bg); color: var(--cm-danger-ink); }
.cm-empty-inline { padding: 22px 16px; background: var(--cm-surface-2); border: 0; border-radius: 14px; }
.cm-empty-inline .cm-empty-ic { background: var(--cm-surface); }
.cm-empty-board { padding: 32px 20px 30px; }
.cm-illo { display: block; line-height: 0; margin-bottom: 4px; }
.cm-illo svg { width: 168px; height: auto; }
.cm-preparing { padding: 44px 20px 40px; margin-top: 12px; }
.cm-preparing-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.cm-preparing-btns .cm-btn { margin-top: 0; }
.cm-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 0; color: var(--cm-text-2); font-size: 14px; }
.cm-spinner {
    display: inline-block;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--cm-accent-line); border-top-color: var(--cm-accent-600);
    animation: cm-spin 0.8s linear infinite;
}
@keyframes cm-spin { to { transform: rotate(360deg); } }

/* ---------- post ---------- */
.cm-back {
    display: inline-flex; align-items: center; gap: 2px;
    height: 36px; margin: -4px 0 14px -6px; padding: 0 12px 0 4px;
    color: var(--cm-text-2); font-size: 14px; font-weight: 600; text-decoration: none;
    border-radius: var(--cm-radius-full);
    transition: background var(--cm-fast), color var(--cm-fast);
}
.cm-back .cm-ic svg { width: 18px; height: 18px; }
.cm-back:hover { color: var(--cm-text); background: var(--cm-surface-3); }
.cm-post { min-width: 0; }
.cm-post-head { display: grid; gap: 12px; margin-bottom: 20px; }
.cm-post-title { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); font-weight: 800; line-height: 1.3; letter-spacing: -0.03em; }
.cm-byline { flex-wrap: nowrap; gap: 10px; }
.cm-byline-text { display: grid; gap: 1px; min-width: 0; }
.cm-byline .cm-author { font-size: 15px; color: var(--cm-text); font-weight: 700; }
.cm-byline .cm-meta { font-size: 12.5px; }
.cm-media { display: grid; gap: 10px; margin-bottom: 22px; }
.cm-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #0b1220;
    isolation: isolate;
    box-shadow: var(--cm-shadow-sm);
}
.cm-stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(34px) saturate(1.2) brightness(0.5); transform: scale(1.25); z-index: -1; }
.cm-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;       /* YouTube embed minimum */
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}
.cm-media .cm-frame { margin-bottom: 0; }
.cm-frame.is-portrait {
    aspect-ratio: 9 / 16;
    width: min(100%, calc(74vh * 9 / 16));
    min-width: min(100%, 200px);
    margin-left: auto;
    margin-right: auto;
}
.cm-stage.is-portrait .cm-frame { background: rgba(0, 0, 0, 0.35); }
.cm-frame video, .cm-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cm-frame video { object-fit: contain; background: transparent; }
.cm-frame-err {
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    padding: 8px 10px; border-radius: var(--cm-radius-sm);
    background: rgba(15, 23, 42, 0.88); color: #fff; font-size: 13px;
}
/* a video this device cannot decode: the frame keeps its size, the poster shows dimmed behind the words */
.cm-frame-unsup {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 20px; text-align: center;
    background: rgba(11, 18, 32, 0.84); color: #fff;
    font-size: 14px; font-weight: 600; line-height: 1.5;
}
.cm-frame-unsup p { max-width: 30em; overflow-wrap: anywhere; }
.cm-frame-unsup .cm-ic {
    width: 44px; height: 44px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.12); color: #fdba74;
}
.cm-frame-unsup .cm-ic svg { width: 22px; height: 22px; }
.cm-frame.is-portrait .cm-frame-unsup { font-size: 13px; padding: 16px; }
.cm-notice-media { margin: -10px 0 20px; }
@media (max-width: 599px) {
    .cm-post .cm-media > .cm-stage { margin: 0 -8px; border-radius: 16px; }
}
.cm-extlink {
    display: inline-flex; align-items: center; gap: 6px; justify-self: start;
    min-height: 32px; color: var(--cm-text-2); font-size: 13px; font-weight: 600; text-decoration: none;
}
.cm-extlink:hover { color: var(--cm-accent-ink); }
.cm-linkcard {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; margin-bottom: 22px;
    border-radius: var(--cm-radius-lg);
    border: 1px solid var(--cm-line-2);
    background: var(--cm-surface);
    box-shadow: var(--cm-shadow-xs);
    text-decoration: none; min-width: 0;
    transition: border-color var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-linkcard:hover { border-color: var(--cm-line-3); box-shadow: var(--cm-shadow-sm); }
.cm-linkcard > .cm-ic { color: var(--cm-muted); }
.cm-linkcard-ic, .cm-linkcard-img { width: 56px; height: 56px; flex: none; border-radius: 14px; object-fit: cover; }
.cm-linkcard-ic { display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--cm-ink); }
.cm-linkcard-ic svg { width: 22px; height: 22px; }
.cm-linkcard-instagram .cm-linkcard-ic { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.cm-linkcard-tiktok .cm-linkcard-ic { background: #111; box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55; }
.cm-linkcard-youtube .cm-linkcard-ic { background: #e11d26; }
.cm-linkcard-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cm-linkcard-text strong { font-size: 15px; letter-spacing: -0.01em; }
.cm-linkcard-text span { color: var(--cm-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-song-chip { margin-bottom: 16px; }
.cm-body {
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: -0.005em;
    color: var(--cm-text);
    margin-bottom: 22px;
}
@media (min-width: 768px) { .cm-body { font-size: 17px; } }
.cm-body a, .cm-cmt-body a { color: var(--cm-accent-ink); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.cm-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 12px 0; border-top: 1px solid var(--cm-line-2); border-bottom: 1px solid var(--cm-line-2);
}
.cm-actions-gap { flex: 1 1 0; min-width: 0; }
/* ---------- translate switch (list, post) ---------- */
.cm-tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cm-tr-bar[hidden] { display: none; }
.cm-list-view > .cm-tr-bar { margin: -4px 0 12px; }
.cm-tr-btn {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 34px; padding: 0 12px;
    border-radius: var(--cm-radius-full);
    border: 1px solid var(--cm-line-2);
    background: var(--cm-surface); color: var(--cm-text-2);
    font-size: 13px; font-weight: 600;
    transition: background var(--cm-fast), border-color var(--cm-fast), color var(--cm-fast);
}
.cm-tr-btn .cm-ic svg { width: 15px; height: 15px; }
.cm-tr-btn:hover:not(:disabled) { color: var(--cm-text); border-color: var(--cm-line-3); }
.cm-tr-btn:focus-visible { outline: none; box-shadow: var(--cm-ring); }
.cm-tr-btn.is-on { color: var(--cm-accent-ink); border-color: var(--cm-accent-line); background: var(--cm-accent-soft); }
.cm-tr-note { font-size: 12px; color: var(--cm-muted); }
@media (pointer: coarse) { .cm-tr-btn { min-height: 40px; } }
.cm-act {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 42px; padding: 0 15px;
    border-radius: var(--cm-radius-full);
    border: 1px solid var(--cm-line-2);
    background: var(--cm-surface); color: var(--cm-text-2);
    font-size: 14px; font-weight: 600;
    transition: background var(--cm-fast), border-color var(--cm-fast), color var(--cm-fast), transform var(--cm-fast);
}
.cm-act .cm-ic svg { width: 18px; height: 18px; }
.cm-act:hover:not(:disabled) { color: var(--cm-text); border-color: var(--cm-line-3); }
.cm-act:active:not(:disabled) { transform: scale(0.97); }
.cm-act-quiet { border-color: transparent; background: transparent; padding: 0 10px; font-size: 13px; color: var(--cm-muted); }
.cm-act-quiet .cm-ic svg { width: 16px; height: 16px; }
.cm-act-quiet:hover:not(:disabled) { background: var(--cm-surface-2); border-color: transparent; }
.cm-act-icon { width: 42px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--cm-text-2); }
.cm-act-icon:hover:not(:disabled), .cm-menu.is-open .cm-act-icon { background: var(--cm-surface-3); border-color: transparent; }
.cm-like .cm-count { color: var(--cm-text); font-weight: 700; }
.cm-like.is-on { color: var(--cm-accent-ink); border-color: var(--cm-accent-line); background: var(--cm-accent-soft); }
.cm-like.is-on .cm-count { color: var(--cm-accent-ink); }
.cm-like.is-on svg { fill: var(--cm-accent); stroke: var(--cm-accent-600); }
.cm-like.is-on .cm-ic { animation: cm-pop 0.36s var(--cm-ease); }
@keyframes cm-pop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }
@media (pointer: coarse) { .cm-act { min-height: 44px; } .cm-act-icon { width: 44px; } }
.cm-menu { position: relative; }
.cm-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 176px;
    padding: 6px;
    display: grid;
    gap: 2px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: 14px;
    box-shadow: var(--cm-shadow-lg);
    transform-origin: top right;
    animation: cm-menu-in 0.14s ease-out;
}
@keyframes cm-menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.cm-menu-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 42px; padding: 0 12px;
    border: 0; border-radius: 10px; background: transparent;
    color: var(--cm-text); font-size: 14px; font-weight: 600; text-align: left; white-space: nowrap;
}
.cm-menu-item .cm-ic { color: var(--cm-text-2); }
.cm-menu-item .cm-ic svg { width: 17px; height: 17px; }
.cm-menu-item:hover { background: var(--cm-surface-2); }
.cm-menu-item:focus-visible { outline: none; background: var(--cm-surface-2); box-shadow: inset 0 0 0 2px var(--cm-accent-600); }
.cm-menu-item.is-danger, .cm-menu-item.is-danger .cm-ic { color: var(--cm-danger-ink); }
.cm-menu-item.is-danger:hover { background: var(--cm-danger-bg); }

/* ---------- comments ---------- */
.cm-comments { margin-top: 24px; display: grid; gap: 14px; }
.cm-cmt-list { display: grid; gap: 14px; }
.cm-cmt { min-width: 0; }
.cm-cmt.has-avatar { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.cm-cmt.has-avatar > .cm-avatar { margin-top: 2px; }
.cm-cmt-main { min-width: 0; display: grid; gap: 2px; justify-items: start; }
.cm-cmt-bubble {
    max-width: 100%;
    min-width: 0;
    padding: 9px 14px 10px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: 4px 18px 18px 18px;
    box-shadow: var(--cm-shadow-xs);
}
.cm-cmt-bubble.is-mine { background: var(--cm-accent-soft); border-color: var(--cm-accent-line); }
.cm-cmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; color: var(--cm-muted); }
.cm-cmt-head .cm-author { color: var(--cm-text); font-weight: 700; font-size: 13px; }
.cm-cmt-body { white-space: pre-wrap; margin-top: 2px; font-size: 14.5px; line-height: 1.62; color: var(--cm-text); }
.cm-cmt-tools { display: flex; flex-wrap: wrap; gap: 0; margin-left: 2px; }
.cm-cmt-tools .cm-btn-sm { min-height: 28px; padding: 0 8px; font-size: 12.5px; color: var(--cm-muted); }
.cm-cmt-tools .cm-btn-sm:hover:not(:disabled) { color: var(--cm-text); }
.cm-cmt.is-placeholder { padding: 10px 14px; border-radius: 14px; background: var(--cm-surface-2); }
.cm-cmt.is-placeholder .cm-cmt-ph { color: var(--cm-muted); font-size: 13.5px; }
.cm-cmt.is-placeholder .cm-cmt-tools { margin: 4px 0 0 -8px; }
.cm-cmt-empty { color: var(--cm-muted); font-size: 14px; padding: 18px 0 8px; text-align: center; }
.cm-cmt-form { display: grid; gap: 10px; min-width: 0; }
.cm-cmt-form.is-guest {
    padding: 16px;
    border-radius: 18px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    box-shadow: var(--cm-shadow-xs);
}
.cm-cmt-form.is-guest .cm-counter { margin-top: -6px; }
/* members: a composer docked to the bottom of the screen while the comments are in view */
.cm-cmt-form.is-dock {
    position: sticky;
    bottom: 0;
    z-index: 20;
    gap: 6px;
    margin: 4px calc(-1 * var(--cm-gutter)) 0;
    padding: 10px var(--cm-gutter) calc(10px + var(--cm-sab));
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(170%) blur(14px);
    backdrop-filter: saturate(170%) blur(14px);
    border-top: 1px solid var(--cm-line);
}
@media (min-width: 600px) {
    .cm-cmt-form.is-dock {
        position: static;
        margin: 4px 0 0;
        padding: 10px;
        background: var(--cm-surface);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border: 1px solid var(--cm-line);
        border-radius: 22px;
        box-shadow: var(--cm-shadow-sm);
    }
}
.cm-composer { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.cm-composer > .cm-avatar { margin-bottom: 8px; }
.cm-composer-field { position: relative; flex: 1; min-width: 0; }
.cm-composer-field .cm-textarea {
    display: block;
    min-height: 44px;
    max-height: 168px;
    resize: none;
    padding: 10px 16px;
    border-radius: 22px;
    border-color: transparent;
    background: var(--cm-surface-2);
    overflow-y: auto;
}
.cm-composer-field .cm-textarea:hover { border-color: var(--cm-field); }
.cm-composer-field .cm-textarea:focus { background: var(--cm-surface); border-color: var(--cm-accent); }
.cm-composer-field .cm-counter {
    position: absolute; right: 12px; top: -9px;
    padding: 0 6px; border-radius: 6px;
    background: var(--cm-surface); font-size: 11px; line-height: 18px;
    opacity: 0; transition: opacity var(--cm-fast); pointer-events: none;
}
.cm-composer-field:focus-within .cm-counter, .cm-composer-field .cm-counter.is-over { opacity: 1; }
.cm-send { width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 50%; flex: none; }
.cm-send .cm-ic svg { width: 20px; height: 20px; stroke-width: 2.4; }
.cm-send.is-busy .cm-ic { display: none; }

/* ---------- forms ---------- */
.cm-form { display: grid; gap: 14px; margin-top: 18px; }
.cm-write .cm-h1, .cm-me .cm-h1 { margin-bottom: 2px; }
.cm-form-sec {
    display: grid;
    gap: 18px;
    padding: 18px 16px;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: 18px;
    box-shadow: var(--cm-shadow-xs);
    min-width: 0;
}
@media (min-width: 600px) { .cm-form-sec { padding: 22px 22px; } }
fieldset.cm-form-sec > legend { float: left; width: 100%; padding: 0; }
.cm-field { display: grid; gap: 8px; min-width: 0; }
.cm-label { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--cm-text); padding: 0; }
.cm-label-quiet { display: block; font-size: 12px; font-weight: 600; color: var(--cm-muted); }
.cm-input {
    width: 100%;
    min-width: 0;
    font-size: 16px;              /* iOS: no focus zoom */
    line-height: 1.5;
    padding: 11px 14px;
    border-radius: var(--cm-radius-md);
    border: 1px solid var(--cm-field);
    background: var(--cm-surface);
    color: var(--cm-text);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--cm-fast), box-shadow var(--cm-fast), background var(--cm-fast);
}
.cm-input:hover { border-color: var(--cm-field-hover); }
select.cm-input {
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}
.cm-input::placeholder { color: var(--cm-placeholder); }
.cm-input:focus { outline: none; border-color: var(--cm-accent); box-shadow: var(--cm-ring); }
.cm-textarea { resize: vertical; min-height: 120px; }
.cm-counter { justify-self: end; font-size: 12px; color: var(--cm-muted); font-variant-numeric: tabular-nums; margin-top: -2px; }
.cm-counter.is-over { color: var(--cm-danger-ink); font-weight: 700; }
.cm-input-wrap { position: relative; min-width: 0; }
.cm-input-wrap > .cm-input { padding-left: 42px; }
.cm-input-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cm-muted); pointer-events: none; }
.cm-input-ic svg { width: 18px; height: 18px; }
.cm-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--cm-surface-2);
    overflow-x: auto;
    scrollbar-width: none;
}
.cm-seg::-webkit-scrollbar { display: none; }
.cm-seg-item { position: relative; display: flex; flex: 1 0 auto; }
.cm-seg-item input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cm-seg-item span {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 14px;
    border-radius: 10px;
    color: var(--cm-text-2); font-size: 14px; font-weight: 600; white-space: nowrap;
    cursor: pointer;
    transition: background var(--cm-fast), color var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-seg-item span:hover { color: var(--cm-text); }
.cm-seg-item input:checked + span {
    background: var(--cm-surface);
    color: var(--cm-text);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 3px 10px -3px rgba(15, 23, 42, 0.16);
}
.cm-seg-item input:focus-visible + span { box-shadow: var(--cm-ring); }
@media (pointer: coarse) { .cm-seg-item span { min-height: 44px; } }
.cm-media-panel { display: grid; gap: 12px; }
.cm-media-panel:empty { display: none; }
.cm-drop {
    display: grid; justify-items: center; gap: 4px; width: 100%;
    padding: 26px 16px 24px; border-radius: var(--cm-radius-lg);
    border: 1.5px dashed #c3cbd6;
    background: linear-gradient(180deg, #fbfcfd 0%, #f5f7f9 100%);
    color: var(--cm-text); text-align: center;
    transition: border-color var(--cm-fast), background var(--cm-fast), box-shadow var(--cm-fast);
}
@media (hover: hover) { .cm-drop:hover { border-color: var(--cm-accent); background: var(--cm-accent-soft); } }
.cm-drop.is-over { border-color: var(--cm-accent-600); background: var(--cm-accent-soft); box-shadow: var(--cm-ring); }
.cm-drop-ic {
    width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cm-surface); color: var(--cm-accent-600); box-shadow: var(--cm-shadow-sm);
}
.cm-drop-ic svg { width: 22px; height: 22px; }
.cm-drop strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.cm-drop-hint { font-size: 12.5px; color: var(--cm-text-2); }
.cm-drop-more { display: none; font-size: 12px; color: var(--cm-muted); }
@media (hover: hover) and (pointer: fine) { .cm-drop-more { display: block; } }
.cm-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cm-file {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 12px; border-radius: var(--cm-radius-lg);
    border: 1px solid var(--cm-line-2); background: var(--cm-surface); min-width: 0;
}
.cm-file-prev {
    position: relative; flex: none; width: 136px; aspect-ratio: 16 / 9;
    border-radius: 10px; overflow: hidden; background: #0b1220;
}
.cm-file-prev.is-portrait { width: 78px; aspect-ratio: 9 / 16; }
.cm-file-prev.is-empty { background: radial-gradient(120% 110% at 28% 18%, #334155 0%, #111827 70%); }
.cm-file-prev img { width: 100%; height: 100%; object-fit: cover; }
.cm-file-prev .cm-card-ph svg { width: 26px; height: 26px; }
.cm-file-prev .cm-card-dur { right: 6px; bottom: 6px; font-size: 11px; padding: 1px 5px; }
.cm-file-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.cm-file-name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-file-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-file-chip {
    display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
    border-radius: 6px; background: var(--cm-surface-2); color: var(--cm-text-2);
    font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cm-file-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
@media (max-width: 400px) { .cm-file-prev { width: 112px; } .cm-file-prev.is-portrait { width: 64px; } }
.cm-inline-cta { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 32px; font-size: 13px; font-weight: 700; color: var(--cm-accent-ink); text-decoration: none; }
.cm-inline-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
/* how to get under the size / length limit (with the file error, and under the form error after a 413) */
.cm-shrink {
    display: grid; gap: 6px; padding: 12px 14px;
    border-radius: var(--cm-radius-md); background: var(--cm-surface-2);
    color: var(--cm-text-2); font-size: 13px; line-height: 1.55; min-width: 0;
}
.cm-shrink-title { color: var(--cm-text); font-weight: 700; font-size: 13.5px; }
.cm-shrink-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.cm-shrink-list li { overflow-wrap: anywhere; }
.cm-shrink-slot { min-width: 0; }
.cm-song { position: relative; }
.cm-song-search { display: grid; gap: 8px; min-width: 0; }
.cm-song-picked { justify-self: start; padding-right: 4px; }
.cm-song-results {
    display: grid; gap: 2px; max-height: 300px; overflow-y: auto; padding: 4px;
    border: 1px solid var(--cm-line-2); border-radius: 14px;
    background: var(--cm-surface); box-shadow: var(--cm-shadow-md);
}
.cm-song-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
    padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left;
}
.cm-song-opt:hover { background: var(--cm-accent-soft); }
.cm-song-opt:focus-visible { outline: none; background: var(--cm-accent-soft); box-shadow: inset 0 0 0 2px var(--cm-accent-600); }
.cm-song-ic {
    width: 34px; height: 34px; flex: none; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cm-surface-2); color: var(--cm-text-2);
}
.cm-song-ic svg { width: 16px; height: 16px; }
.cm-song-text { display: grid; min-width: 0; }
.cm-song-t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-song-a { font-size: 12.5px; color: var(--cm-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-song-none { padding: 12px; color: var(--cm-text-2); font-size: 14px; }
.cm-guest { gap: 14px; }
.cm-guest-login {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--cm-surface-2);
}
.cm-guest-login .cm-hint { flex: 1 1 180px; min-width: 0; }
.cm-guest-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .cm-guest-row { grid-template-columns: minmax(0, 1fr); } }
.cm-consents { display: grid; gap: 12px; }
.cm-consents > legend { margin-bottom: 2px; }
.cm-guest-ip, .cm-public-note { margin-top: 0; }
.cm-form > .cm-public-note { text-align: center; color: var(--cm-muted); padding: 0 8px; }
.cm-check, .cm-radio {
    display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
    font-size: 14px; line-height: 1.5; cursor: pointer; min-width: 0;
}
.cm-check > span, .cm-radio > span { flex: 1 1 0; min-width: 0; padding-top: 1px; }
.cm-check input, .cm-radio input {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; height: 22px; margin: 0; flex: none;
    border: 1.5px solid var(--cm-control);
    background: var(--cm-surface) no-repeat center / 16px 16px;
    cursor: pointer;
    transition: background-color var(--cm-fast), border-color var(--cm-fast), border-width var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-check input { border-radius: 7px; }
.cm-radio input { border-radius: 50%; }
.cm-check:hover input:not(:checked), .cm-radio:hover input:not(:checked) { border-color: var(--cm-text-2); }
.cm-check input:checked {
    border-color: var(--cm-accent-600);
    background-color: var(--cm-accent-600);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17.5 19 7'/%3E%3C/svg%3E");
}
.cm-radio input:checked { border-color: var(--cm-accent-600); border-width: 7px; }
.cm-check input:focus-visible, .cm-radio input:focus-visible { outline: none; box-shadow: var(--cm-ring); }
.cm-check-link { flex-basis: 100%; margin-left: 34px; font-size: 13px; color: var(--cm-accent-ink); font-weight: 600; text-underline-offset: 3px; }
.cm-radios { display: grid; gap: 8px; }
.cm-radios > legend { margin-bottom: 8px; }
.cm-radios .cm-radio {
    align-items: center;
    padding: 11px 14px;
    border: 1px solid var(--cm-line-2);
    border-radius: 12px;
    transition: border-color var(--cm-fast), background var(--cm-fast);
}
.cm-radios .cm-radio > span { padding-top: 0; }
.cm-radios .cm-radio:hover { border-color: var(--cm-line-3); }
.cm-radios .cm-radio:has(input:checked) { border-color: var(--cm-accent-600); background: var(--cm-accent-soft); }
.cm-hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cm-form-err {
    padding: 11px 14px; border-radius: var(--cm-radius-md);
    background: var(--cm-danger-bg); border: 1px solid #fecaca; color: var(--cm-danger-ink);
    font-size: 14px; font-weight: 600;
}
.cm-form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* the write form's progress + submit, docked to the bottom of a phone screen */
.cm-submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 15;
    display: grid;
    gap: 10px;
    margin: 2px calc(-1 * var(--cm-gutter)) 0;
    padding: 12px var(--cm-gutter) calc(12px + var(--cm-sab));
    background: rgba(245, 246, 248, 0.9);
    -webkit-backdrop-filter: saturate(170%) blur(14px);
    backdrop-filter: saturate(170%) blur(14px);
    border-top: 1px solid var(--cm-line);
}
.cm-submit-bar .cm-form-actions > .cm-btn { flex: 1; }
@media (min-width: 600px) {
    .cm-submit-bar { position: static; margin: 4px 0 0; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .cm-submit-bar .cm-form-actions > .cm-btn { flex: none; width: auto; min-width: 220px; }
}
.cm-progress { display: grid; gap: 6px; }
.cm-progress-track { display: block; height: 6px; border-radius: 99px; background: var(--cm-surface-3); overflow: hidden; }
.cm-progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cm-accent), var(--cm-accent-600)); border-radius: 99px; transition: width 0.2s linear; }
.cm-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--cm-text-2); }
.cm-edit { display: grid; gap: 16px; }
.cm-edit .cm-form-actions { margin-top: 2px; }

/* ---------- my activity ---------- */
.cm-me { display: grid; gap: 14px; }
.cm-panel {
    display: grid; gap: 14px; padding: 18px 16px;
    border-radius: 18px; background: var(--cm-surface); border: 1px solid var(--cm-line);
    box-shadow: var(--cm-shadow-xs); min-width: 0;
}
@media (min-width: 600px) { .cm-panel { padding: 22px; } }
.cm-me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.cm-me-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cm-me-id > div { min-width: 0; }
.cm-me-nick { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-me-foot { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--cm-line); }
.cm-panel-empty { padding: 4px 0; }
.cm-block-row { padding: 6px 0; border-bottom: 1px solid var(--cm-line); }
.cm-block-row:last-child { border-bottom: 0; }
.cm-block-row .cm-author { color: var(--cm-text); font-size: 14px; }

/* ---------- modal: a bottom sheet on phones, a centred card from 640px ---------- */
.cm-modal-back {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 42, 0.44);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 12px var(--cm-sar) 0 var(--cm-sal);
    animation: cm-fade 0.18s ease-out;
}
.cm-modal {
    position: relative;
    width: 100%; max-width: 480px;
    max-height: calc(100vh - 24px - var(--cm-sat));
    max-height: calc(100dvh - 24px - var(--cm-sat));
    display: flex; flex-direction: column;
    background: var(--cm-surface);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--cm-shadow-lg);
    animation: cm-sheet 0.3s var(--cm-ease);
}
.cm-modal-grip { display: block; flex: none; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 99px; background: #d5dbe3; }
.cm-modal-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 2px 20px; }
.cm-modal-title { flex: 1; font-size: 18px; font-weight: 800; letter-spacing: -0.025em; min-width: 0; }
.cm-modal-body { display: grid; gap: 16px; padding: 8px 20px 18px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cm-modal-sub { color: var(--cm-text-2); font-size: 14px; line-height: 1.6; }
.cm-modal-foot {
    display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
    padding: 12px 20px calc(14px + var(--cm-sab)); border-top: 1px solid var(--cm-line);
}
.cm-modal-foot .cm-btn { flex: 1 1 0; }
@media (min-width: 640px) {
    .cm-modal-back { align-items: center; padding: 24px; }
    .cm-modal { border-radius: 22px; animation: cm-rise 0.22s var(--cm-ease); }
    .cm-modal-grip { display: none; }
    .cm-modal-head { padding-top: 16px; }
    .cm-modal-foot { padding-bottom: 16px; }
    .cm-modal-foot .cm-btn { flex: none; min-width: 96px; }
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cm-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes cm-rise { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.cm-modal-login .cm-modal-body { justify-items: stretch; text-align: center; gap: 12px; padding-top: 4px; }
.cm-login-logo { width: 56px; height: 56px; border-radius: 16px; justify-self: center; box-shadow: var(--cm-shadow-sm); margin: 4px 0 2px; }
.cm-modal-login .cm-modal-sub { margin-bottom: 6px; }
.cm-oauth {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; width: 100%; border-radius: 14px;
    font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
    border: 1px solid var(--cm-field);
    transition: background var(--cm-fast), border-color var(--cm-fast), transform var(--cm-fast);
}
.cm-oauth:active { transform: scale(0.98); }
.cm-oauth-google { background: #fff; color: #1f1f1f; }
.cm-oauth-google:hover { background: #f8fafc; border-color: var(--cm-field-hover); }
.cm-oauth-kakao { background: #fee500; color: #191919; border-color: #fee500; }
.cm-oauth-kakao:hover { background: #fada0a; }
.cm-oauth-mark { display: inline-flex; line-height: 0; }
.cm-login-terms { text-align: left; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--cm-surface-2); }
.cm-login-links { display: flex; justify-content: center; gap: 16px; font-size: 13px; }
.cm-login-links a { color: var(--cm-text-2); text-underline-offset: 3px; }

/* ---------- toast (top on phones, above sticky bars; bottom from 600px) ---------- */
#cm-toast {
    position: fixed; left: 50%; transform: translateX(-50%);
    top: calc(var(--cm-bar-h) + var(--cm-sat) + 10px); z-index: 120;
    display: grid; justify-items: center; gap: 8px;
    width: min(calc(100vw - 32px), 420px); pointer-events: none;
}
@media (min-width: 600px) { #cm-toast { top: auto; bottom: calc(28px + var(--cm-sab)); } }
.cm-toast {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 14px;
    background: rgba(15, 23, 42, 0.95); color: #fff;
    font-size: 14px; font-weight: 600; line-height: 1.45;
    box-shadow: var(--cm-shadow-lg);
    animation: cm-rise 0.22s var(--cm-ease);
    transition: opacity 0.3s, transform 0.3s;
}
.cm-toast.is-ok::before, .cm-toast.is-error::before, .cm-toast.is-warn::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: #34d399;
}
.cm-toast.is-error::before { background: #f87171; }
.cm-toast.is-warn::before { background: #fbbf24; }
.cm-toast.is-out { opacity: 0; transform: translateY(-6px); }

/* ---------- footer ---------- */
.cm-foot {
    margin-top: auto;
    border-top: 1px solid var(--cm-line);
    background: var(--cm-surface);
    color: var(--cm-text-2);
    font-size: 13px;
    line-height: 1.6;
}
.cm-foot-inner {
    max-width: var(--cm-max-wide); margin: 0 auto;
    padding: 28px calc(var(--cm-gutter) + var(--cm-sar)) calc(28px + var(--cm-sab)) calc(var(--cm-gutter) + var(--cm-sal));
    display: grid; gap: 14px;
}
.cm-foot-recipient-wrap { display: grid; gap: 8px; justify-items: start; max-width: 640px; }
.cm-foot-title { font-size: 13px; font-weight: 700; color: var(--cm-text); letter-spacing: -0.01em; }
.cm-foot-recipient { font-style: normal; }
.cm-foot-mail {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 38px; padding: 0 16px 0 12px;
    border-radius: var(--cm-radius-full);
    border: 1px solid var(--cm-line-2); background: var(--cm-surface-2);
    color: var(--cm-text); font-size: 14px; font-weight: 700; text-decoration: none;
    white-space: nowrap;        /* the address never breaks ("support@groovemap.i" / "o" on a 390 px iPhone) */
    transition: background var(--cm-fast), border-color var(--cm-fast), color var(--cm-fast);
}
.cm-foot-mail:hover { background: var(--cm-accent-soft); border-color: var(--cm-accent-line); color: var(--cm-accent-ink); }
.cm-foot-mail-ic { display: inline-flex; color: var(--cm-accent-600); line-height: 0; }
@media (pointer: coarse) { .cm-foot-mail { min-height: 44px; } }
.cm-foot-note { color: var(--cm-muted); font-size: 12.5px; }
.cm-foot-proc { font-size: 12.5px; }
.cm-foot-proc a { color: var(--cm-text-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--cm-light); text-underline-offset: 3px; }
.cm-foot-proc a:hover { color: var(--cm-text); text-decoration-color: currentColor; }
.cm-foot-noads { color: var(--cm-muted); font-size: 12.5px; }
.cm-foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 14px; border-top: 1px solid var(--cm-line); }
.cm-foot-row a { color: var(--cm-text-2); text-decoration: none; font-weight: 600; }
.cm-foot-row a:hover { color: var(--cm-text); }
.cm-lang { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.cm-lang select.cm-input { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; border-radius: 10px; font-size: 16px; }

/* ---------- server-rendered fallback (shown until the app paints, and without JS) ---------- */
#cm-ssr:has(.cm-ssr-list) { max-width: var(--cm-max-wide); }
#cm-ssr h1 { font-size: clamp(1.45rem, 1.3rem + 0.6vw, 1.75rem); font-weight: 800; line-height: 1.3; letter-spacing: -0.03em; margin-bottom: 14px; }
#cm-ssr h2 { font-size: 16px; font-weight: 700; line-height: 1.42; letter-spacing: -0.02em; }
#cm-ssr p { color: var(--cm-text-2); }
#cm-ssr a { color: var(--cm-text); }
#cm-ssr ol, #cm-ssr ul { padding-left: 1.2em; }
#cm-ssr .cm-ssr-cats {
    display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none;
    padding: 0 0 10px; margin: 0 0 18px; border-bottom: 1px solid var(--cm-line-2);
}
#cm-ssr .cm-ssr-cats li { margin: 0; }
#cm-ssr .cm-ssr-cats a { color: var(--cm-muted); font-weight: 600; text-decoration: none; }
#cm-ssr .cm-ssr-cats a[aria-current="page"] { color: var(--cm-text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--cm-accent-600); text-decoration-thickness: 3px; text-underline-offset: 13px; }
#cm-ssr .cm-ssr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { #cm-ssr .cm-ssr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; } }
#cm-ssr .cm-ssr-list > li { margin: 0; min-width: 0; }
#cm-ssr .cm-ssr-list article {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px; background: var(--cm-surface);
    border: 1px solid var(--cm-line); border-radius: var(--cm-radius-lg); box-shadow: var(--cm-shadow-xs);
}
#cm-ssr .cm-ssr-list h2 a { text-decoration: none; }
#cm-ssr .cm-ssr-list p { font-size: 14px; }
#cm-ssr .cm-ssr-thumb { display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; background: #0b1220; }
#cm-ssr .cm-ssr-thumb img { width: 100%; height: 100%; object-fit: cover; }
#cm-ssr .cm-ssr-meta { color: var(--cm-muted); font-size: 12.5px; margin-top: auto; }
#cm-ssr .cm-ssr-meta a { color: var(--cm-accent-ink); }
#cm-ssr .cm-ssr-more { margin-top: 16px; text-align: center; }
#cm-ssr .cm-ssr-crumb { font-size: 13px; color: var(--cm-muted); margin-bottom: 12px; }
#cm-ssr .cm-ssr-crumb a { color: var(--cm-text-2); text-decoration: none; font-weight: 600; }
#cm-ssr .cm-ssr-post > .cm-ssr-meta { margin: 0 0 16px; }
#cm-ssr .cm-ssr-song { margin: 0 0 14px; font-size: 14px; }
#cm-ssr .cm-ssr-media { margin: 0 0 20px; }
#cm-ssr .cm-ssr-media p { margin-top: 8px; font-size: 13px; }
#cm-ssr .cm-ssr-video { display: block; width: 100%; max-height: 80vh; background: #000; border-radius: 16px; }
#cm-ssr .cm-body, #cm-ssr article p { color: var(--cm-text); white-space: pre-wrap; }
#cm-ssr .cm-ssr-post .cm-body { font-size: 16px; line-height: 1.8; margin-bottom: 20px; }
#cm-ssr .cm-ssr-comments { margin-top: 24px; }
#cm-ssr .cm-ssr-comments h2 { margin-bottom: 12px; }
#cm-ssr .cm-ssr-comments ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
#cm-ssr .cm-ssr-comments li { margin: 0; padding: 10px 14px; background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 4px 16px 16px 16px; }
#cm-ssr .cm-ssr-comments .cm-body { font-size: 14.5px; line-height: 1.62; margin: 2px 0 0; }
#cm-ssr .cm-ssr-back { margin-top: 20px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .cm-skel { animation: none; }
    .cm-spinner, .cm-btn.is-busy::before { animation: cm-spin 2.4s linear infinite !important; animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
    .cm-card:hover, .cm-card:hover .cm-card-img { transform: none; }
}

/* ---------- emoji picker (2026-09-29) ----------
   A card that floats beside its button on a wide screen, a keyboard-like drawer under the text box on a phone.
   Search on top, category icons (the section in view underlined), sections under sticky titles, chips for the
   Korean chat emoticons. */
.cm-text-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.cm-text-tools .cm-counter, .cm-cmt-form .cm-text-tools .cm-counter { margin-top: 0; }
.cm-emoji-anchor { position: relative; display: inline-flex; flex: none; }
/* the picker's own buttons start from nothing (no browser bevel, grey fill or border) */
.cm-emoji-btn, .cm-emoji-cat, .cm-emoji-item, .cm-emoji-chip {
    -webkit-appearance: none; appearance: none;
    margin: 0; padding: 0; border: 0; background: none;
    font: inherit; color: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.cm-emoji-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    color: var(--cm-muted); background: transparent;
    transition: background var(--cm-fast), color var(--cm-fast), transform var(--cm-fast);
}
.cm-emoji-btn .cm-ic svg { width: 21px; height: 21px; }
@media (hover: hover) { .cm-emoji-btn:hover { background: var(--cm-surface-2); color: var(--cm-text); } }
.cm-emoji-btn:active { transform: scale(0.9); }
.cm-emoji-btn.is-on { background: var(--cm-accent-soft); color: var(--cm-accent-ink); }
.cm-emoji-btn:focus-visible { outline: none; box-shadow: var(--cm-ring); }
.cm-text-tools .cm-emoji-anchor { margin-left: -6px; }
.cm-composer > .cm-emoji-anchor { margin-bottom: 2px; }
.cm-composer > .cm-emoji-anchor .cm-emoji-btn { width: 40px; height: 40px; }

.cm-emoji-panel {
    display: flex; flex-direction: column;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    overflow: hidden;
    color: var(--cm-text);
    font-family: var(--cm-font);
    text-align: left;
}
/* wide screens: a card beside the button */
.cm-emoji-panel.is-pop {
    position: absolute; z-index: 60;
    left: -4px; top: calc(100% + 8px);
    width: 352px; height: min(424px, calc(100vh - 32px));
    border-radius: var(--cm-radius-xl);
    box-shadow: var(--cm-shadow-lg);
    transform-origin: 18px top;
    animation: cm-emoji-pop 0.18s var(--cm-ease);
}
.cm-emoji-panel.is-pop.is-up { top: auto; bottom: calc(100% + 8px); transform-origin: 18px bottom; }
.cm-emoji-panel.is-pop.is-right { left: auto; right: -4px; transform-origin: calc(100% - 18px) top; }
.cm-emoji-panel.is-pop.is-up.is-right { transform-origin: calc(100% - 18px) bottom; }
@keyframes cm-emoji-pop { from { opacity: 0; transform: translateY(4px) scale(0.96); } to { opacity: 1; transform: none; } }
/* phones: a drawer where the keyboard was */
.cm-emoji-panel.is-drawer {
    height: 288px;
    margin-top: 6px;
    border-radius: var(--cm-radius-lg);
    box-shadow: var(--cm-shadow-sm);
    animation: cm-emoji-rise 0.24s var(--cm-ease);
}
.cm-cmt-form.is-dock .cm-emoji-panel.is-drawer {
    margin: 10px calc(-1 * var(--cm-gutter)) 0;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.25);
}
@keyframes cm-emoji-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cm-emoji-head { display: grid; gap: 8px; padding: 10px 10px 8px; }
.cm-emoji-grip { display: none; }
.cm-emoji-panel.is-drawer .cm-emoji-grip {
    display: block; justify-self: center;
    width: 36px; height: 4px; margin: -2px 0 0;
    border-radius: 2px; background: var(--cm-light);
}
.cm-emoji-search {
    display: flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px;
    border-radius: var(--cm-radius-full);
    background: var(--cm-surface-2);
    color: var(--cm-muted);
    transition: background var(--cm-fast), box-shadow var(--cm-fast);
}
.cm-emoji-search:focus-within { background: var(--cm-surface); box-shadow: inset 0 0 0 1.5px var(--cm-accent); }
.cm-emoji-search .cm-ic svg { width: 16px; height: 16px; }
.cm-emoji-q {
    flex: 1; min-width: 0; height: 100%;
    padding: 0; border: 0; outline: none; background: transparent;
    font: inherit; font-size: 16px; color: var(--cm-text);
}
@media (pointer: fine) { .cm-emoji-q { font-size: 14px; } }
.cm-emoji-q::placeholder { color: var(--cm-placeholder); }
.cm-emoji-q::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.cm-emoji-cats {
    display: flex; gap: 2px;
    padding: 0 8px 6px;
    border-bottom: 1px solid var(--cm-line);
    transition: opacity var(--cm-fast);
}
.cm-emoji-cats.is-dim { opacity: 0.45; }
.cm-emoji-cat {
    position: relative;
    flex: 1 1 0; min-width: 0; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    color: var(--cm-muted);
    transition: background var(--cm-fast), color var(--cm-fast);
}
.cm-emoji-cat .cm-ic svg { width: 19px; height: 19px; }
@media (hover: hover) { .cm-emoji-cat:hover { background: var(--cm-surface-2); color: var(--cm-text); } }
.cm-emoji-cat.is-on { color: var(--cm-accent-ink); }
.cm-emoji-cat.is-on::after {
    content: ''; position: absolute; left: 32%; right: 32%; bottom: -7px;
    height: 2px; border-radius: 2px; background: var(--cm-accent);
}
.cm-emoji-cat:focus-visible { outline: none; box-shadow: var(--cm-ring); }

.cm-emoji-body {
    position: relative;
    flex: 1; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 0 8px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.cm-emoji-sec-title {
    position: sticky; top: 0; z-index: 1;
    margin: 0; padding: 10px 6px 6px;
    font-size: 12px; font-weight: 700; letter-spacing: -0.01em; color: var(--cm-muted);
    background: linear-gradient(var(--cm-surface) 72%, rgba(255, 255, 255, 0));
}
.cm-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.cm-emoji-item {
    min-height: 38px; aspect-ratio: 1;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-size: 25px; line-height: 1;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--cm-font);
    transition: background 0.12s var(--cm-ease), transform 0.12s var(--cm-ease);
}
@media (hover: hover) { .cm-emoji-item:hover { background: var(--cm-surface-2); transform: scale(1.14); } }
.cm-emoji-item:active { transform: scale(0.88); background: var(--cm-surface-3); }
.cm-emoji-item:focus-visible { outline: none; box-shadow: var(--cm-ring); }
.cm-emoji-grid.is-text { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 4px; }
.cm-emoji-chip {
    height: 34px; padding: 0 12px;
    border-radius: var(--cm-radius-full);
    border: 1px solid var(--cm-line-2);
    background: var(--cm-surface);
    font-size: 14px; font-weight: 600; color: var(--cm-text-2);
    white-space: nowrap;
    transition: background var(--cm-fast), border-color var(--cm-fast), color var(--cm-fast), transform var(--cm-fast);
}
@media (hover: hover) { .cm-emoji-chip:hover { background: var(--cm-accent-soft); border-color: var(--cm-accent-line); color: var(--cm-accent-ink); } }
.cm-emoji-chip:active { transform: scale(0.95); }
.cm-emoji-chip:focus-visible { outline: none; box-shadow: var(--cm-ring); }
.cm-emoji-results .cm-emoji-grid { padding-top: 10px; }
.cm-emoji-none { margin: 36px 8px; text-align: center; font-size: 13px; color: var(--cm-muted); }
/* the text box is full: a small shake instead of an insert */
.cm-emoji-panel.is-full { animation: cm-emoji-shake 0.32s; }
@keyframes cm-emoji-shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

/* a comment of one to three emoji: big and without its bubble, like a sticker */
.cm-cmt-bubble.is-sticker { background: transparent; border-color: transparent; box-shadow: none; padding: 2px 2px 0; }
.cm-cmt-bubble.is-sticker .cm-cmt-body {
    margin-top: 4px;
    font-size: 46px; line-height: 1.1; letter-spacing: 2px;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--cm-font);
    filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.16));
}
.cm-cmt-bubble.is-sticker.is-new .cm-cmt-body { transform-origin: 16px bottom; animation: cm-sticker-in 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes cm-sticker-in { from { opacity: 0; transform: scale(0.3) rotate(-8deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .cm-emoji-panel, .cm-emoji-item, .cm-emoji-chip, .cm-emoji-btn, .cm-cmt-bubble.is-sticker .cm-cmt-body { animation: none !important; transition: none !important; }
}
