/* ============================================================
   묭인 (myongin) theme
   Black + lime, Bagel Fat One display, Gothic A1 body
   ============================================================ */
:root {
    --mg-ink: #0e0e0e;
    --mg-ink-2: #262626;
    --mg-paper: #f3f3ef;
    --mg-white: #ffffff;
    --mg-line: #e6e6e1;
    --mg-muted: #555555;
    --mg-muted-dark: #b5b5b5;
    --mg-accent: #d4ff3a;
    --mg-radius: 28px;
    --mg-display: 'Bagel Fat One', 'Gothic A1', sans-serif;
    --mg-body: 'Gothic A1', 'Malgun Gothic', sans-serif;
}

html { overflow-y: auto; }
body { margin: 0; background: var(--mg-paper); color: var(--mg-ink); font-family: var(--mg-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, input, button, textarea, select { font-family: var(--mg-body); }
a { color: inherit; }
#hd, #wrapper, #ft { min-width: 0; }
img { max-width: 100%; }
svg { display: block; }

#skip_to_container a { position: absolute; left: -9999px; }
#skip_to_container a:focus { left: 16px; top: 16px; z-index: 1000; background: var(--mg-accent); padding: 10px 16px; border-radius: 999px; font-weight: 800; }

/* ---------- ticker ---------- */
.mg-ticker { background: var(--mg-accent); height: 40px; overflow: hidden; white-space: nowrap; }
.mg-ticker-track { display: inline-flex; gap: 40px; padding: 0 20px; height: 40px; align-items: center; animation: mg-marquee 40s linear infinite; }
.mg-ticker:hover .mg-ticker-track { animation-play-state: paused; }
.mg-ticker-item { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--mg-ink); }
.mg-ticker-item b { font-weight: 800; }
.mg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mg-ink); flex-shrink: 0; }
@keyframes mg-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mg-ticker-track { animation: none; } }

/* ---------- header ---------- */
.mg-header { background: var(--mg-ink); color: var(--mg-white); position: sticky; top: 0; z-index: 100; }
.mg-header-inner { max-width: 1320px; margin: 0 auto; height: 80px; padding: 0 32px; display: flex; align-items: center; gap: 36px; }
.mg-logo-link { color: var(--mg-accent); display: flex; flex-shrink: 0; }
.mg-logo { width: 80px; height: 48px; }
.mg-nav { display: flex; gap: 26px; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.mg-nav a { color: var(--mg-white); padding: 6px 0; white-space: nowrap; border-bottom: 3px solid transparent; }
.mg-nav a:hover, .mg-nav a.is-active { border-bottom-color: var(--mg-accent); }
.mg-search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: 260px; height: 44px; padding: 0 18px; background: var(--mg-ink-2); border-radius: 999px; box-sizing: border-box; }
.mg-search svg { width: 18px; height: 18px; fill: none; stroke: var(--mg-muted-dark); stroke-width: 2.4; stroke-linecap: round; flex-shrink: 0; }
.mg-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: var(--mg-white); font-size: 15px; }
.mg-search input::placeholder { color: var(--mg-muted-dark); }
.mg-account { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.mg-link { font-size: 15px; font-weight: 600; color: var(--mg-white); white-space: nowrap; }
.mg-pill { white-space: nowrap; font-size: 15px; font-weight: 800; color: var(--mg-ink); background: var(--mg-accent); padding: 12px 20px; border-radius: 999px; }
.mg-menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; align-items: center; justify-content: center; cursor: pointer; }
.mg-menu-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--mg-white); stroke-width: 2.4; stroke-linecap: round; }
.mg-drawer { background: var(--mg-ink); padding: 8px 20px 24px; border-top: 1px solid #2a2a2a; }
.mg-drawer > a { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid #2a2a2a; font-family: var(--mg-display); font-size: 22px; color: var(--mg-white); }
.mg-drawer > a span { font-family: var(--mg-body); font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--mg-accent); width: 70px; }
.mg-drawer-account { display: flex; gap: 18px; padding-top: 16px; font-weight: 700; color: var(--mg-muted-dark); }
.mg-search-m { display: none; width: 100%; margin: 8px 0 8px; }

/* ---------- layout ---------- */
#wrapper.mg-wrapper { max-width: 1320px; margin: 0 auto; padding: 0 32px 80px; box-sizing: border-box; }
#wrapper.mg-wrapper.is-index { max-width: none; padding: 0 0 80px; }
#container.mg-container { float: none; width: auto; min-height: 400px; margin: 0; font-size: 1em; }
.is-index #container.mg-container > section { max-width: 1320px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
.mg-page-head { padding: 48px 0 24px; display: flex; flex-direction: column; gap: 6px; }
.mg-page-en { font-size: 13px; font-weight: 800; letter-spacing: 2px; color: var(--mg-muted); }
#container_title { font-family: var(--mg-display); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: -1px; margin: 0; }

/* ---------- common bits ---------- */
.mg-btn { display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; padding: 16px 28px; border-radius: 999px; border: 2px solid transparent; }
.mg-btn-accent { background: var(--mg-accent); color: var(--mg-ink); }
.mg-btn-ghost { color: var(--mg-white); border-color: var(--mg-white); }
.mg-btn-dark { background: var(--mg-ink); color: var(--mg-accent); }
.mg-chip-white { align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: 1px; background: var(--mg-white); color: var(--mg-ink); padding: 8px 14px; border-radius: 999px; }
.mg-h2 { font-family: var(--mg-display); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -1px; margin: 0; }
.mg-h3 { font-family: var(--mg-display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; }
.mg-sec { padding-top: 64px; }
.mg-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.mg-more { font-size: 15px; font-weight: 800; border-bottom: 2px solid currentColor; padding-bottom: 2px; flex-shrink: 0; }
.mg-card { background: var(--mg-white); border-radius: var(--mg-radius); padding: 32px; }
.mg-card-dark { background: var(--mg-ink); color: var(--mg-white); }
.mg-tag { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 800; color: var(--mg-white); background: var(--mg-ink); padding: 6px 10px; border-radius: 999px; }
.mg-tag-accent { background: var(--mg-accent); color: var(--mg-ink); }
.mg-pill-sm { font-size: 14px; font-weight: 800; color: var(--mg-ink); background: var(--mg-accent); padding: 10px 16px; border-radius: 999px; }
.mg-empty { display: block; padding: 36px 28px; border: 2px dashed #c9c9c2; border-radius: 22px; text-align: center; font-weight: 700; color: var(--mg-muted); }
.mg-empty-dark { border-color: #3a3a3a; color: var(--mg-muted-dark); }
.mg-badge { display: inline-block; vertical-align: middle; font-size: 10px; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 999px; }
.mg-badge-on { background: var(--mg-accent); color: var(--mg-ink); }
.mg-badge-off { background: #ececec; color: #6b6b6b; border: 1px dashed #b5b5b5; padding: 3px 6px; }
.mg-badge-admin { background: var(--mg-ink); color: var(--mg-accent); }
.mg-badge-dark { background: var(--mg-ink); color: var(--mg-white); }
.mg-noimg { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: 100%; color: #9a9a9a; font-weight: 700; line-height: 1.5; }

/* ---------- hero ---------- */
.is-index #container.mg-container > .mg-hero { max-width: none; background: var(--mg-ink); color: var(--mg-white); padding-top: 72px; padding-bottom: 88px; display: flex; gap: 64px; align-items: center; justify-content: center; }
.mg-hero-text { flex: 1; max-width: 700px; display: flex; flex-direction: column; gap: 26px; }
.mg-hero-title { font-family: var(--mg-display); font-weight: 400; font-size: 92px; line-height: 1.05; letter-spacing: -2px; margin: 0; color: var(--mg-white); }
.mg-hero-title em { font-style: normal; color: var(--mg-accent); }
.mg-hero-logo { display: inline-block; color: var(--mg-white); vertical-align: -0.08em; }
.mg-hero-logo .mg-logo { width: 1.45em; height: 0.86em; }
.mg-hero-sub { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.6; color: #c9c9c9; }
.mg-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.mg-today { width: 420px; flex-shrink: 0; position: relative; }
.mg-sticker { position: absolute; top: -18px; left: -20px; z-index: 2; transform: rotate(-8deg); font-family: var(--mg-display); font-size: 22px; color: var(--mg-ink); background: var(--mg-accent); padding: 12px 20px; border-radius: 999px; }
.mg-today-card { display: block; position: relative; height: 520px; border-radius: 32px; overflow: hidden; background: #2b2b2b; }
.mg-today-card img { width: 100%; height: 100%; object-fit: cover; }
.mg-today-info { position: absolute; left: 18px; right: 18px; bottom: 18px; background: var(--mg-white); color: var(--mg-ink); border-radius: 20px; padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.mg-today-title { font-size: 17px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-today-meta { grid-column: 1; font-size: 13px; color: var(--mg-muted); }
.mg-today-good { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 6px; font-weight: 800; }
.mg-today-good svg { width: 20px; height: 20px; fill: var(--mg-ink); }

/* ---------- tiles ---------- */
.mg-tiles { padding-top: 48px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.mg-tile { height: 140px; box-sizing: border-box; padding: 20px; border-radius: 24px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .15s ease; }
.mg-tile:hover { transform: translateY(-4px); }
.mg-tile-accent { background: var(--mg-accent); color: var(--mg-ink); }
.mg-tile-dark { background: var(--mg-ink); color: var(--mg-white); }
.mg-tile-light { background: var(--mg-white); color: var(--mg-ink); border: 2px solid var(--mg-ink); }
.mg-tile-en { font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.mg-tile-name { font-family: var(--mg-display); font-size: 24px; }

/* ---------- cuts ---------- */
.mg-cuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.mg-cut { display: flex; flex-direction: column; gap: 10px; }
.mg-cut-img { position: relative; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: #dcdcd6; display: block; }
.mg-cut-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.mg-cut:hover .mg-cut-img img { transform: scale(1.04); }
.mg-cut-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--mg-muted); }
.mg-cut-meta b { color: var(--mg-ink); }

/* ---------- split ---------- */
.mg-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.mg-split-wide { grid-template-columns: 2fr 1fr; }
.mg-filters { display: flex; gap: 6px; }
.mg-filters a { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid #555; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--mg-white); }
.mg-filters a.is-on { background: var(--mg-accent); border-color: var(--mg-accent); color: var(--mg-ink); }
.mg-hot { list-style: none; margin: 0; padding: 0; }
.mg-hot a { display: flex; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid #2a2a2a; }
.mg-rank { font-family: var(--mg-display); font-size: 26px; color: var(--mg-accent); width: 28px; flex-shrink: 0; }
.mg-hot-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-hot-cat { font-size: 12px; font-weight: 700; color: var(--mg-muted-dark); flex-shrink: 0; }
.mg-count { font-size: 13px; font-weight: 800; color: var(--mg-ink); background: var(--mg-white); padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.mg-market { list-style: none; margin: 0; padding: 0; }
.mg-market a { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--mg-line); }
.mg-market-img { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: #ececec; flex-shrink: 0; }
.mg-market-img img { width: 100%; height: 100%; object-fit: cover; }
.mg-market-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mg-market-title { font-size: 15px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-market-meta { font-size: 12px; color: var(--mg-muted); }
.mg-market-price { font-size: 16px; font-weight: 800; flex-shrink: 0; }

/* ---------- salons ---------- */
.mg-salons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mg-salon { display: flex; gap: 18px; padding: 16px; background: var(--mg-white); border-radius: 24px; }
.mg-salon-img { width: 110px; height: 110px; border-radius: 16px; overflow: hidden; background: #ececec; flex-shrink: 0; }
.mg-salon-img img { width: 100%; height: 100%; object-fit: cover; }
.mg-salon-body { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.mg-salon-body .mg-badge { align-self: flex-start; }
.mg-salon-title { font-size: 16px; font-weight: 800; }
.mg-salon-meta { font-size: 13px; color: var(--mg-muted); }

/* ---------- magazine / files ---------- */
.mg-mags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mg-mag { display: flex; flex-direction: column; gap: 12px; }
.mg-mag-img { position: relative; display: block; height: 190px; border-radius: 22px; overflow: hidden; background: #dcdcd6; }
.mg-mag-img img { width: 100%; height: 100%; object-fit: cover; }
.mg-mag-title { font-size: 17px; font-weight: 800; line-height: 1.4; }
.mg-files { list-style: none; margin: 0; padding: 0; }
.mg-files a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--mg-line); font-size: 15px; font-weight: 700; }
.mg-file-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--mg-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mg-file-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--mg-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- CTA ---------- */
.is-index #container.mg-container > .mg-cta { margin-top: 64px; padding: 44px 48px; background: var(--mg-accent); border-radius: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: calc(1320px - 64px); }
.mg-cta p { margin: 8px 0 0; font-size: 17px; font-weight: 600; }

/* ---------- footer ---------- */
.mg-footer { background: var(--mg-ink); color: #a8a8a8; font-size: 13px; line-height: 1.7; }
.mg-footer-inner { max-width: 1320px; margin: 0 auto; padding: 48px 32px 24px; display: flex; justify-content: space-between; gap: 48px; }
.mg-footer-main { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.mg-footer-main p { margin: 0; }
.mg-footer-logo { color: var(--mg-accent); }
.mg-footer-logo .mg-logo { width: 90px; height: 54px; }
.mg-footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-content: flex-start; font-weight: 600; color: #d0d0d0; }
.mg-footer-copy { max-width: 1320px; margin: 0 auto; padding: 0 32px 40px; }

/* ---------- mobile tab bar ---------- */
.mg-tabbar { display: none; }

/* ============================================================
   Board skins (basic / gallery) — restyle to match
   ============================================================ */
#bo_list, #bo_gall, #bo_v, #bo_w { width: 100% !important; }
#bo_cate { margin: 0 0 20px; }
#bo_cate ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: none; border: 0; }
#bo_cate li { float: none; padding: 0; }
#bo_cate a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid #cfcfc8; border-radius: 999px; background: var(--mg-white); color: var(--mg-ink); font-size: 14px; font-weight: 700; line-height: 1; }
#bo_cate a:hover, #bo_cate a:focus, #bo_cate a:active { background: var(--mg-white); color: var(--mg-ink); border-color: var(--mg-ink); text-decoration: none; }
#bo_cate #bo_cate_on { background: var(--mg-ink); color: var(--mg-accent); border-color: var(--mg-ink); box-shadow: none; }

#bo_btn_top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
#bo_list_total { font-size: 14px; color: var(--mg-muted); float: none; line-height: 1.4; }
.btn_bo_user { display: flex; gap: 6px; float: none; }
.btn_bo_user > li { float: none; margin: 0; }
.btn_b01, a.btn_b01 { color: var(--mg-ink); }
.btn_bo_user .btn, .btn_bo_user a.btn { width: 42px; height: 42px; line-height: 42px; padding: 0; border-radius: 50%; background: var(--mg-white); border: 1px solid var(--mg-line); color: var(--mg-ink); font-size: 16px; }
.btn_bo_user .btn:hover { background: var(--mg-accent); color: var(--mg-ink); }
.btn_b02, a.btn_b02, .btn_submit { background: var(--mg-ink) !important; color: var(--mg-accent) !important; border: 0 !important; border-radius: 999px !important; font-weight: 800 !important; }
.btn_b02:hover, .btn_submit:hover { background: #262626 !important; }

.tbl_wrap { background: var(--mg-white); border-radius: 22px; overflow: hidden; }
.tbl_head01 thead th { background: var(--mg-ink); color: var(--mg-white); border: 0; font-weight: 700; padding: 14px 8px; }
.tbl_head01 td { border-color: var(--mg-line); padding: 14px 8px; }
.tbl_head01 tbody tr:hover td { background: #fafaf5; }
.bo_notice td { background: #fbffe6 !important; }
.td_subject .bo_tit a { color: var(--mg-ink); font-weight: 600; }
.bo_cate_link { color: var(--mg-muted) !important; background: #efefe9 !important; border-radius: 999px !important; }
.cnt_cmt { background: var(--mg-accent) !important; color: var(--mg-ink) !important; border-radius: 999px !important; font-weight: 800 !important; }
.new_icon { background: var(--mg-ink) !important; color: var(--mg-accent) !important; border-radius: 6px !important; }

#bo_gall #gall_ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; margin: 0; padding: 0; }
#bo_gall #gall_ul:after { display: none; }
#bo_gall .gall_li, .gall_row .col-gn-1, .gall_row .col-gn-2, .gall_row .col-gn-3, .gall_row .col-gn-4, .gall_row .col-gn-5, .gall_row .col-gn-6 { float: none; width: auto !important; margin: 0 !important; padding: 0 !important; }
.gall_row .box_clear { clear: none; }
#bo_gall .gall_box { background: transparent; border: 0; box-shadow: none; }
#bo_gall .gall_img { height: auto !important; max-height: none !important; aspect-ratio: 3 / 4; border: 0; border-radius: 22px; overflow: hidden; background: #dcdcd6; }
#bo_gall .gall_img a { height: 100%; }
#bo_gall .gall_img img, #bo_gall .gall_img video { width: 100%; height: 100% !important; object-fit: cover; }
#bo_gall .gall_img span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #dcdcd6; color: var(--mg-muted); font-size: 13px; }
#bo_gall .gall_con { padding: 10px 2px 0; }
#bo_gall .gall_text_href { margin: 0 0 4px; }
#bo_gall .bo_tit { font-size: 15px; font-weight: 700; color: var(--mg-ink); }
#bo_gall .gall_info { font-size: 12px; color: var(--mg-muted); }
#bo_gall .gall_option { color: var(--mg-muted); }

.pg_wrap { margin: 32px 0; text-align: center; }
.pg_page, .pg_current { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 999px; border: 0; font-weight: 700; }
.pg_page { background: var(--mg-white); color: var(--mg-ink); }
.pg_current { background: var(--mg-ink); color: var(--mg-accent); }

#bo_sch, .bo_sch_wrap .bo_sch { border-radius: 22px; }
#bo_v, #bo_w { background: var(--mg-white); border-radius: var(--mg-radius); padding: 32px; box-sizing: border-box; }
#bo_v_title .bo_v_tit { font-family: var(--mg-display); font-weight: 400; font-size: 32px; line-height: 1.25; }
#bo_v_con { font-size: 16px; line-height: 1.8; }
.bo_vc_w textarea, .write_div .frm_input, .write_div textarea, .frm_input { border-radius: 14px !important; border: 1px solid #d6d6cf !important; }
#bo_vc article, .bo_vc_w { border-radius: 18px; }
#bo_v_act .bo_v_good { background: var(--mg-accent); color: var(--mg-ink); border-radius: 999px; }

.mg-salon-price { font-size: 13px; font-weight: 800; }
/* extra fields (market / salon / cuts) */
.mg-extra { background: #fafaf5; border: 1px solid var(--mg-line); border-radius: 18px; padding: 18px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 12px 0 !important; }
.mg-extra-row { display: flex; flex-direction: column; gap: 6px; }
.mg-extra-row label { font-size: 13px; font-weight: 800; }
.mg-extra-row .frm_input { width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; }
.mg-req { font-size: 11px; font-weight: 800; color: var(--mg-ink); background: var(--mg-accent); padding: 2px 6px; border-radius: 999px; margin-left: 4px; }
.mg-extra-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--mg-muted); }
.mg-consent { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; cursor: pointer; }
.mg-consent input { width: 20px; height: 20px; accent-color: var(--mg-ink); }
.mg-li-price { display: block; margin-top: 4px; font-size: 16px; font-weight: 800; color: var(--mg-ink); }
.mg-li-meta { display: block; font-size: 12px; color: var(--mg-muted); }
.mg-status { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.mg-status-hold { background: var(--mg-accent); color: var(--mg-ink); }
.mg-status-done { background: #d9d9d4; color: #444; }
.mg-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 8px; padding: 0; }
.mg-spec div { background: #fafaf5; border: 1px solid var(--mg-line); border-radius: 16px; padding: 14px 16px; }
.mg-spec dt { font-size: 12px; font-weight: 700; color: var(--mg-muted); }
.mg-spec dd { margin: 4px 0 0; font-size: 18px; font-weight: 800; }
.mg-disclaimer { margin: 0 0 16px; font-size: 12px; color: var(--mg-muted); }
#bo_list .mg-badge, #bo_gall .mg-badge, #bo_v_info .mg-badge { margin-left: 4px; }

/* legal pages */
.mg-legal { font-size: 15px; line-height: 1.8; color: #222; }
.mg-legal h3 { font-family: var(--mg-body); font-size: 18px; font-weight: 800; margin: 32px 0 10px; }
.mg-legal ol, .mg-legal ul { padding-left: 20px; margin: 0 0 8px; }
.mg-legal ol { list-style: decimal; } .mg-legal ul { list-style: disc; }
.mg-legal li { margin: 4px 0; }
.mg-legal table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 14px; }
.mg-legal th, .mg-legal td { border: 1px solid var(--mg-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.mg-legal thead th, .mg-legal tbody th { background: #fafaf5; font-weight: 800; }
.mg-legal-info { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--mg-line); font-size: 13px; color: var(--mg-muted); }
#ctt { background: var(--mg-white); border-radius: var(--mg-radius); padding: 32px; }
@media (max-width: 960px) { #ctt { padding: 22px 18px; } }

/* member pages */
#mb_login, #register_form, #fregister, .mbskin { max-width: 480px !important; margin: 24px auto !important; background: var(--mg-white); border-radius: var(--mg-radius); padding: 32px !important; box-sizing: border-box; }
.mbskin h1, #mb_login h1 { font-family: var(--mg-display); font-weight: 400; font-size: 30px; }
.btn_submit.full_input, #login_fs .btn_submit { height: 52px; font-size: 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1440px) {
    .mg-header-inner { gap: 24px; }
    .mg-nav { gap: 20px; }
    .mg-search { width: 200px; }
    .mg-account { gap: 14px; }
}

@media (max-width: 1200px) {
    .mg-nav { gap: 16px; font-size: 15px; }
    .mg-header-inner > .mg-search { display: none; }
    .mg-account { margin-left: auto; }
    .mg-hero-title { font-size: 72px; }
    .mg-today { width: 360px; }
    .mg-today-card { height: 460px; }
    .mg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    body { font-size: 14px; }
    .mg-header-inner { height: 60px; padding: 0 12px 0 20px; gap: 16px; }
    .mg-logo { width: 64px; height: 38px; }
    .mg-nav, .mg-header-inner > .mg-search, .mg-account { display: none; }
    .mg-menu-btn { display: flex; }
    .mg-search-m { display: flex; }
    .mg-ticker { height: 32px; }
    .mg-ticker-track { height: 32px; gap: 24px; }
    .mg-ticker-item { font-size: 12px; }

    #wrapper.mg-wrapper { padding: 0 20px 110px; }
    #wrapper.mg-wrapper.is-index { padding: 0 0 110px; }
    .is-index #container.mg-container > section { padding-left: 20px; padding-right: 20px; }
    #container_title { font-size: 32px; }
    .mg-page-head { padding: 28px 0 16px; }

    .is-index #container.mg-container > .mg-hero { flex-direction: column; align-items: stretch; gap: 32px; padding-top: 28px; padding-bottom: 40px; }
    .mg-hero-title { font-size: 46px; letter-spacing: -1px; }
    .mg-hero-sub { font-size: 15px; }
    .mg-chip-white { display: none; }
    .mg-hero-btns .mg-btn-ghost { display: none; }
    .mg-hero-btns .mg-btn { flex: 1; }
    .mg-today { width: auto; order: 2; }
    .mg-hero-btns { order: 3; }
    .mg-hero-text { display: contents; }
    .mg-today-card { height: 380px; border-radius: 26px; }
    .mg-sticker { font-size: 17px; padding: 9px 15px; left: -6px; top: -14px; }

    .mg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 28px; }
    .mg-tile { height: 92px; padding: 16px; border-radius: 20px; }
    .mg-tile-name { font-size: 20px; }

    .mg-sec { padding-top: 40px; }
    .mg-h2 { font-size: 28px; }
    .mg-h3 { font-size: 24px; }
    .mg-cuts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-right: -20px; padding-right: 20px; }
    .mg-cut { width: 150px; flex-shrink: 0; scroll-snap-align: start; }
    .mg-cut-img { border-radius: 18px; }
    .mg-split, .mg-split-wide { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .mg-card { padding: 24px 20px; border-radius: 24px; }
    .mg-card .mg-sec-head { flex-wrap: wrap; }
    .mg-hot a { gap: 12px; padding: 13px 0; }
    .mg-hot-title { white-space: normal; font-size: 14px; line-height: 1.4; }
    .mg-hot-cat { display: none; }
    .mg-salons { grid-template-columns: 1fr; }
    .mg-mags { display: flex; overflow-x: auto; gap: 12px; margin-right: -20px; padding-right: 20px; }
    .mg-mag { width: 250px; flex-shrink: 0; }
    .mg-mag-img { height: 150px; }
    .is-index #container.mg-container > .mg-cta { margin: 40px 20px 0; padding: 26px 22px; flex-direction: column; align-items: flex-start; }
    .mg-cta p { font-size: 13px; }

    .mg-footer-inner { flex-direction: column; gap: 20px; padding: 32px 20px 16px; }
    .mg-footer-copy { padding: 0 20px 110px; }

    .mg-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 200; height: 66px; padding: 0 6px; background: var(--mg-ink); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
    .mg-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--mg-muted-dark); }
    .mg-tabbar a.is-active { color: var(--mg-accent); }
    .mg-tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
    .mg-tabbar .mg-tab-write { justify-self: center; width: 48px; height: 48px; border-radius: 50%; background: var(--mg-accent); color: var(--mg-ink); justify-content: center; }
    .mg-tabbar .mg-tab-write svg { stroke-width: 2.8; }

    #bo_gall #gall_ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
    .mg-extra, .mg-spec { grid-template-columns: 1fr 1fr; }
    #bo_v, #bo_w { padding: 22px 18px; border-radius: 22px; }
    #bo_v_title .bo_v_tit { font-size: 24px; }
    .tbl_head01 thead { display: none; }
    .tbl_head01 td.td_num2, .tbl_head01 td.td_datetime, .tbl_head01 td.td_num { display: none; }
    #mb_login, #register_form, #fregister, .mbskin { padding: 24px 18px !important; }
}

/* ============================================================
   포인트 · 등급 · 랭킹 · 레시피
   ============================================================ */
.mg-tier { display: inline-block; vertical-align: middle; font-size: 10px; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 6px; letter-spacing: 0; }
.mg-tier-friends  { background: #ecebe6; color: #55534c; }
.mg-tier-silver   { background: linear-gradient(135deg, #f4f5f7, #c9ced6); color: #3d4450; }
.mg-tier-gold     { background: linear-gradient(135deg, #fff3c4, #e6c25a); color: #6b4b00; }
.mg-tier-platinum { background: linear-gradient(135deg, #f1f6fa, #b8cbdc); color: #22384d; }
.mg-tier-vip      { background: #1d2a44; color: #e9cf7f; }
.mg-tier-vvip     { background: #5a1426; color: #f2d98c; }
.mg-tier-black    { background: #0e0e0e; color: #d4ff3a; box-shadow: 0 0 0 1px #d4ff3a inset; }

/* 이번 주 인기 시술 로테이션 */
.mg-today-card { display: none; }
.mg-today-card.is-on { display: block; animation: mg-fade .5s ease; }
@keyframes mg-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mg-today-card.is-on { animation: none; } }
.mg-dots { position: absolute; top: 18px; right: 18px; display: flex; gap: 6px; z-index: 3; }
.mg-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.mg-dots button.is-on { width: 26px; border-radius: 999px; background: var(--mg-accent); }

/* 메인 랭킹 · 내 포인트 */
.mg-rank-mini { list-style: none; margin: 0; padding: 0; }
.mg-rank-mini li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--mg-line); }
.mg-rank-mini .mg-rank { color: var(--mg-ink); width: 24px; font-size: 22px; }
.mg-rank-mini li:first-child .mg-rank { background: var(--mg-accent); border-radius: 8px; text-align: center; }
.mg-rank-nick { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mg-card-accent { background: var(--mg-accent); }
.mg-card-accent .mg-help { color: #333; }
.mg-mini-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-mini-wallet b { font-family: var(--mg-display); font-weight: 400; font-size: 44px; }
.mg-help { font-size: 13px; color: var(--mg-muted); margin: 8px 0; }
.mg-list { padding-left: 20px; list-style: disc; }

/* 내 포인트 페이지 */
.mg-my { display: flex; flex-direction: column; gap: 24px; }
.mg-my-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.mg-my-nick { font-family: var(--mg-display); font-size: 30px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mg-my-sub { color: var(--mg-muted-dark); margin-top: 6px; font-size: 14px; }
.mg-my-sub a { color: var(--mg-accent); font-weight: 700; }
.mg-my-wallet { text-align: right; }
.mg-my-wallet span { display: block; font-size: 13px; color: var(--mg-muted-dark); }
.mg-my-wallet b { font-family: var(--mg-display); font-weight: 400; font-size: 48px; color: var(--mg-accent); }
.mg-my-tier { margin-top: 24px; }
.mg-my-tier-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--mg-muted-dark); margin-bottom: 8px; gap: 12px; }
.mg-bar { height: 12px; background: #2a2a2a; border-radius: 999px; overflow: hidden; }
.mg-bar span { display: block; height: 100%; background: var(--mg-accent); border-radius: 999px; }
.mg-form { display: flex; flex-direction: column; gap: 8px; }
.mg-form label { font-size: 13px; font-weight: 800; margin-top: 6px; }
.mg-form .frm_input { height: 46px; padding: 0 14px; box-sizing: border-box; width: 100%; }
.mg-form .mg-btn { margin-top: 10px; border: 0; cursor: pointer; }
.mg-form .mg-btn[disabled] { opacity: .4; cursor: not-allowed; }
.mg-tier-table { display: flex; flex-direction: column; }
.mg-tier-row { display: grid; grid-template-columns: 90px 110px 1fr; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid var(--mg-line); }
.mg-tier-row.is-me { background: #fbffe6; border-radius: 12px; }
.mg-tier-min { font-weight: 800; }
.mg-tier-perk { color: var(--mg-muted); font-size: 14px; }

/* 랭킹 페이지 */
.mg-rankpage { display: flex; flex-direction: column; gap: 24px; }
.mg-rank-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mg-filters-light a { color: var(--mg-ink); border-color: #cfcfc8; background: var(--mg-white); }
.mg-rank-nav { display: flex; align-items: center; gap: 14px; font-size: 18px; }
.mg-rank-nav a, .mg-rank-nav span { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--mg-white); font-size: 22px; }
.mg-rank-nav span { opacity: .3; }
.mg-rank-me { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--mg-ink); color: var(--mg-white); border-radius: 20px; padding: 16px 22px; }
.mg-rank-me b { font-family: var(--mg-display); font-weight: 400; font-size: 26px; color: var(--mg-accent); }
.mg-rank-me .mg-more { margin-left: auto; color: var(--mg-white); }
.mg-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.mg-podium-item { background: var(--mg-white); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mg-podium-1 { background: var(--mg-accent); padding-top: 34px; order: 2; }
.mg-podium-2 { order: 1; } .mg-podium-3 { order: 3; }
.mg-podium-rank { font-family: var(--mg-display); font-size: 40px; line-height: 1; }
.mg-podium-nick { font-size: 18px; font-weight: 800; word-break: break-all; }
.mg-podium-pts { font-family: var(--mg-display); font-size: 22px; }
.mg-rank-list { list-style: none; margin: 0; padding: 0; background: var(--mg-white); border-radius: 22px; overflow: hidden; }
.mg-rank-list li { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--mg-line); }
.mg-rank-list li.is-me { background: #fbffe6; }
.mg-rank-no { font-family: var(--mg-display); font-size: 20px; width: 34px; }
.mg-rank-pts { font-weight: 800; }
.mg-hall ul { list-style: none; margin: 0; padding: 0; }
.mg-hall li { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--mg-line); }
.mg-earn { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mg-earn div { background: #fafaf5; border: 1px solid var(--mg-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mg-earn span { font-family: var(--mg-display); font-size: 20px; }

/* 시술 레시피 */
.mg-li-recipe { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 800; background: var(--mg-ink); color: var(--mg-accent); padding: 3px 8px; border-radius: 999px; }
.mg-recipe { margin: 28px 0 8px; border: 2px solid var(--mg-ink); border-radius: 22px; overflow: hidden; background: var(--mg-white); }
.mg-recipe-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--mg-ink); color: var(--mg-white); }
.mg-recipe-head h3 { margin: 0; font-family: var(--mg-display); font-weight: 400; font-size: 22px; color: var(--mg-accent); }
.mg-recipe-meta { font-size: 13px; font-weight: 700; }
.mg-recipe-body { position: relative; padding: 8px 20px 16px; overflow: hidden; }
.mg-recipe-list { margin: 0; padding: 0; }
.mg-recipe-list div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--mg-line); }
.mg-recipe-list dt { font-size: 13px; font-weight: 800; color: var(--mg-muted); }
.mg-recipe-list dd { margin: 0; font-size: 15px; line-height: 1.6; position: relative; z-index: 1; }
.mg-recipe-fake dd { display: flex; flex-direction: column; gap: 6px; filter: blur(3px); }
.mg-recipe-fake i { display: block; height: 12px; border-radius: 6px; background: #d9d9d2; }
.mg-recipe-lock { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: rgba(243,243,239,.86); }
.mg-recipe-lock b { font-family: var(--mg-display); font-weight: 400; font-size: 24px; }
.mg-recipe-lock small { color: var(--mg-muted); }
.mg-recipe-lock form { margin: 4px 0 0; }
.mg-recipe-lock .mg-btn { border: 0; cursor: pointer; }
.mg-btn-ghost-dark { background: transparent; color: var(--mg-ink); border: 2px solid var(--mg-ink); }
.mg-watermark { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 40px 60px; padding: 20px; transform: rotate(-18deg) scale(1.3); opacity: .08; font-size: 14px; font-weight: 800; color: #000; user-select: none; }
.mg-recipe-notice { margin: 0; padding: 12px 20px 16px; font-size: 12px; line-height: 1.6; color: var(--mg-muted); background: #fafaf5; border-top: 1px solid var(--mg-line); }
.mg-recipe-write { background: #fbffe6; border: 2px solid var(--mg-ink); border-radius: 18px; padding: 18px 20px; margin: 12px 0 !important; }
.mg-recipe-toggle { font-size: 16px; }
.mg-recipe-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.mg-recipe-fields[hidden] { display: none; }
.mg-recipe-fields .is-wide { grid-column: 1 / -1; }
.mg-recipe-fields textarea.frm_input { height: auto; min-height: 76px; padding: 10px 14px; width: 100%; box-sizing: border-box; }
.mg-recipe-fields .mg-extra-note { grid-column: 1 / -1; }

/* 끌어올리기 · 신고 */
.mg-bump { margin: 24px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--mg-ink); color: var(--mg-white); border-radius: 20px; padding: 18px 22px; }
.mg-bump b { display: block; font-size: 16px; margin-bottom: 4px; color: var(--mg-accent); }
.mg-bump span { font-size: 13px; color: var(--mg-muted-dark); }
.mg-bump .mg-btn { border: 0; cursor: pointer; }
.mg-report { margin: 16px 0 0; font-size: 13px; color: var(--mg-muted); }
.mg-report summary { cursor: pointer; display: inline-block; padding: 6px 0; }
.mg-report form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mg-report select { height: 40px; padding: 0 10px; }
.mg-report .mg-btn { padding: 8px 16px; font-size: 13px; border: 0; cursor: pointer; }

@media (max-width: 960px) {
    .mg-podium { grid-template-columns: 1fr; }
    .mg-podium-1, .mg-podium-2, .mg-podium-3 { order: 0; padding-top: 22px; }
    .mg-earn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-tier-row { grid-template-columns: 70px 80px 1fr; padding: 10px 4px; }
    .mg-recipe-list div { grid-template-columns: 1fr; gap: 4px; }
    .mg-recipe-fields { grid-template-columns: 1fr; }
    .mg-my-wallet { text-align: left; }
    .mg-hall li { grid-template-columns: 90px 1fr auto; }
}

#bo_v_top .btn_scrap, #bo_v_top a, .bo_v_com a { white-space: nowrap; }
#bo_v_share .btn, #bo_v_share a.btn { white-space: nowrap; width: auto; }

/* 인증 표시 강조 (중고거래 · 미용실매매) */
#bo_list .mg-badge, #bo_gall .mg-badge, #bo_v_info .mg-badge { font-size: 11px; padding: 4px 8px; }
.mg-board-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--mg-white); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.mg-board-note .mg-badge { margin: 0 2px; }
.mg-board-note.is-salon { border: 2px solid var(--mg-ink); }
.mg-seller { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 14px; padding: 14px 18px; margin: 14px 0 8px; font-size: 14px; }
.mg-seller b { font-weight: 800; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.mg-seller.is-on { background: #f4ffd0; }
.mg-seller.is-on b { background: var(--mg-accent); color: var(--mg-ink); }
.mg-seller.is-off { background: #f3f3f3; border: 1px dashed #b5b5b5; }
.mg-seller.is-off b { background: #6b6b6b; color: #fff; }

/* ============================================================
   1:1 채팅
   ============================================================ */
.mg-btn-line { background: var(--mg-white); color: var(--mg-ink); border-color: var(--mg-ink); }
.mg-chat-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.mg-chat-dot { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--mg-accent); color: var(--mg-ink); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.mg-chat-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--mg-ink); color: var(--mg-accent); vertical-align: middle; white-space: nowrap; }
.mg-chat-tag.is-trade { background: #e7f0ff; color: #1f4b99; }
.mg-chat-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--mg-paper); border-radius: 18px; padding: 16px 20px; margin: 24px 0 8px; }
.mg-chat-cta span { font-size: 14px; color: var(--mg-muted); }
.mg-chat-cta b { color: var(--mg-ink); margin-right: 6px; }
.mg-chat-cta .mg-btn { font-size: 15px; padding: 12px 22px; }
.mg-chat-cta.is-off { opacity: .7; }
.mg-chat-rules { margin: 14px 0; padding-left: 18px; font-size: 13px; color: var(--mg-muted); line-height: 1.7; }
.mg-chat-rules b { color: var(--mg-ink); }

/* 새 채팅 */
.mg-chatnew { max-width: 640px; margin: 32px auto 0; display: flex; flex-direction: column; gap: 14px; }
.mg-chatnew .mg-h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 0; }
.mg-chatnew-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.mg-chatnew-form label { font-weight: 800; font-size: 14px; }
.mg-chatnew-form label small { font-weight: 500; color: var(--mg-muted); }
.mg-chatnew-form textarea { width: 100%; box-sizing: border-box; border-radius: 14px; padding: 12px 14px; height: auto; font-size: 15px; line-height: 1.6; resize: vertical; }
.mg-chatnew-form .mg-btn { border: 0; cursor: pointer; align-self: stretch; }
.mg-chatnew-form .mg-btn[disabled] { opacity: .4; cursor: not-allowed; }
.mg-chatnew-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 16px 18px; background: var(--mg-paper); border-radius: 16px; }
.mg-chatnew-nick { font-size: 18px; font-weight: 800; }
.mg-chatnew-price { margin-left: auto; font-size: 18px; font-weight: 800; background: var(--mg-accent); padding: 6px 14px; border-radius: 999px; }
.mg-chatnew-pay { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--mg-line); border-radius: 14px; }
.mg-chatnew-pay > div { display: flex; justify-content: space-between; font-size: 14px; }
.mg-chat-item { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--mg-paper); border-radius: 16px; color: var(--mg-ink); }
.mg-chat-item-img { width: 64px; height: 64px; border-radius: 12px; background: #dcdcd6; overflow: hidden; flex-shrink: 0; }
.mg-chat-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-chat-item b { display: block; font-size: 15px; }
.mg-chat-item em { display: block; font-style: normal; font-weight: 800; font-size: 14px; }
.mg-chat-item small { display: block; font-size: 12px; color: var(--mg-muted); margin-top: 2px; }

/* 목록 */
.mg-chatlist-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-top: 32px; align-items: start; }
.mg-chatlist { background: var(--mg-white); border-radius: var(--mg-radius); padding: 24px; min-height: 360px; }
.mg-chatlist .mg-filters { flex-wrap: wrap; margin-bottom: 14px; }
.mg-filters-light a { color: var(--mg-ink); border-color: #cfcfc8; }
.mg-chatrows { list-style: none; margin: 0; padding: 0; }
.mg-chatrows li { border-top: 1px solid var(--mg-line); }
.mg-chatrows li:first-child { border-top: 0; }
.mg-chatrows a { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 52px 16px 6px; color: var(--mg-ink); }
.mg-chatrows a:hover { background: var(--mg-paper); border-radius: 14px; }
.mg-chatrows li.is-new a { background: #f7ffdc; border-radius: 14px; }
.mg-chatrow-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mg-chatrow-top b { font-size: 16px; }
.mg-chatrow-top small { font-size: 12px; color: var(--mg-muted); }
.mg-chatrow-top time { margin-left: auto; font-size: 12px; color: var(--mg-muted); }
.mg-chatrow-item { font-size: 12px; font-weight: 700; color: #1f4b99; }
.mg-chatrow-snip { font-size: 14px; color: var(--mg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-chatrow-unread { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: var(--mg-ink); color: var(--mg-accent); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mg-chatside { display: flex; flex-direction: column; gap: 14px; }
.mg-chatside .mg-card { padding: 24px; }
.mg-chatside .mg-h3 { margin-top: 0; }
.mg-chatset { display: flex; flex-direction: column; gap: 6px; }
.mg-chatset label { font-weight: 800; font-size: 14px; }
.mg-chatset-price { display: flex; align-items: center; gap: 8px; }
.mg-chatset-price input { width: 140px; font-size: 18px; font-weight: 800; }
.mg-chatset .mg-btn { border: 0; cursor: pointer; margin-top: 6px; padding: 12px 20px; font-size: 15px; }
.mg-chat-ticket { font-size: 15px; margin: 0; }
.mg-chat-ticket b { font-size: 28px; }
.mg-chat-blocks { list-style: none; margin: 0; padding: 0; }
.mg-chat-blocks li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--mg-line); }
.mg-chat-blocks .mg-btn { padding: 6px 12px; font-size: 13px; cursor: pointer; }

/* 채팅방 */
body:has(.mg-chatroom) .mg-page-head { display: none; }
.mg-chatroom { max-width: 760px; margin: 24px auto 0; background: var(--mg-white); border-radius: var(--mg-radius); padding: 0 0 18px; display: flex; flex-direction: column; overflow: hidden; }
.mg-chatroom-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--mg-line); }
.mg-chatroom-back { font-size: 30px; line-height: 1; color: var(--mg-ink); padding: 0 4px; }
.mg-chatroom-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.mg-chatroom-who b { font-size: 17px; }
.mg-chatroom-dday { font-size: 12px; color: var(--mg-muted); }
.mg-chatroom-menu { position: relative; }
.mg-chatroom-menu summary { list-style: none; cursor: pointer; font-size: 22px; font-weight: 800; padding: 2px 10px; border-radius: 10px; }
.mg-chatroom-menu summary::-webkit-details-marker { display: none; }
.mg-chatroom-menu[open] summary { background: var(--mg-paper); }
.mg-chatroom-menu > div { position: absolute; right: 0; top: 40px; z-index: 5; width: 220px; background: var(--mg-white); border: 1px solid var(--mg-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column; }
.mg-chatroom-menu button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.mg-chatroom-menu button:hover { background: var(--mg-paper); }
.mg-chatroom-report { display: flex; gap: 4px; padding: 4px 6px; border-top: 1px solid var(--mg-line); margin-top: 4px; }
.mg-chatroom-report select { flex: 1; min-width: 0; font-size: 13px; border: 1px solid var(--mg-line); border-radius: 8px; }
.mg-chatroom-report button { width: auto; color: #b3261e; }
.mg-chat-item.is-bar { margin: 12px 20px 0; padding: 10px; }
.mg-chat-item.is-bar .mg-chat-item-img { width: 48px; height: 48px; }
.mg-chat-banner { margin: 12px 20px 0; padding: 16px 18px; background: #f7ffdc; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.mg-chat-banner b { font-size: 15px; }
.mg-chat-banner.is-off { background: var(--mg-paper); color: var(--mg-muted); flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mg-chat-banner.is-warn { background: #fff4d6; }
.mg-chat-banner .mg-btn { padding: 10px 18px; font-size: 14px; cursor: pointer; align-self: flex-start; }
.mg-chat-banner-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.mg-chat-intro { margin: 0; padding: 12px 14px; background: var(--mg-white); border-radius: 12px; line-height: 1.6; }
.mg-chat-tip { margin: 12px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--mg-muted); }
.mg-chat-tip .mg-btn { padding: 8px 14px; font-size: 13px; cursor: pointer; }
.mg-chat-note { margin: 10px 20px 0; font-size: 12px; color: var(--mg-muted); }
.mg-chat-msgs { height: 56vh; min-height: 320px; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; background: #fafaf7; margin-top: 12px; }
.mg-chat-empty { margin: auto; color: var(--mg-muted); font-size: 14px; }
.mg-msg { max-width: 75%; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; }
.mg-msg p { margin: 0; padding: 10px 14px; background: var(--mg-white); border: 1px solid var(--mg-line); border-radius: 4px 18px 18px 18px; font-size: 15px; line-height: 1.55; word-break: break-word; }
.mg-msg time { font-size: 11px; color: #999; padding: 0 6px; }
.mg-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.mg-msg.is-mine p { background: var(--mg-ink); color: var(--mg-white); border-color: var(--mg-ink); border-radius: 18px 4px 18px 18px; }
.mg-msg.is-sys { align-self: center; max-width: 90%; align-items: center; }
.mg-msg.is-sys p { background: transparent; border: 0; font-size: 12px; color: var(--mg-muted); text-align: center; padding: 4px 10px; }
.mg-msg.is-sys time { display: none; }
.mg-chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px 20px 0; }
.mg-chat-input textarea { flex: 1; min-height: 48px; max-height: 140px; resize: vertical; border: 1px solid var(--mg-line); border-radius: 16px; padding: 12px 14px; font-size: 15px; line-height: 1.5; box-sizing: border-box; }
.mg-chat-input .mg-btn { padding: 12px 20px; font-size: 15px; cursor: pointer; border: 0; }
.mg-chat-safe { margin: 8px 20px 0; font-size: 12px; color: #999; }
@media (max-width: 960px) {
    .mg-chatlist-wrap { grid-template-columns: 1fr; margin-top: 16px; }
    .mg-chatlist { padding: 16px; border-radius: 22px; }
    .mg-chatroom { margin: 12px -8px 0; border-radius: 20px; }
    .mg-chatroom-head, .mg-chat-msgs, .mg-chat-input { padding-left: 14px; padding-right: 14px; }
    .mg-chat-banner, .mg-chat-tip, .mg-chat-note, .mg-chat-safe, .mg-chat-item.is-bar { margin-left: 14px; margin-right: 14px; }
    .mg-chat-msgs { height: calc(100vh - 370px); height: calc(100dvh - 370px); min-height: 260px; }
    .mg-msg { max-width: 85%; }
    .mg-chatnew { margin-top: 16px; }
    body:has(.mg-chatroom) .mg-tabbar { display: none; }
    .mg-chatroom { margin-bottom: 16px; }
}

/* 안내 문구 (알림창 대신) */
.mg-flash { position: fixed; left: 50%; top: 92px; transform: translateX(-50%); z-index: 300; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); box-sizing: border-box; padding: 14px 14px 14px 20px; background: var(--mg-ink); color: var(--mg-white); border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: 15px; font-weight: 700; line-height: 1.5; transition: opacity .4s, transform .4s; }
.mg-flash::before { content: '✓'; color: var(--mg-accent); font-weight: 800; }
.mg-flash.is-error::before { content: '!'; color: #ffb4a8; }
.mg-flash button { background: none; border: 0; color: var(--mg-muted-dark); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.mg-flash.is-out { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }
@media (max-width: 960px) { .mg-flash { top: 76px; font-size: 14px; } }

/* 포인트 변화 표시 */
.mg-account a { position: relative; }
.mg-point-pop { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); white-space: nowrap; background: var(--mg-accent); color: var(--mg-ink); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; animation: mg-pop 2.6s ease forwards; pointer-events: none; }
.mg-point-pop.is-minus { background: #ffd9d3; }
@keyframes mg-pop { 0% { opacity: 0; transform: translate(-50%, 0); } 12% { opacity: 1; transform: translate(-50%, 6px); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }
.mg-chat-dot[hidden] { display: none; }

/* 헤더: 메뉴가 많아져도 한 줄 유지 */
@media (max-width: 1640px) {
    .mg-header-inner > .mg-search { width: 44px; padding: 0 13px; cursor: pointer; transition: width .2s; }
    .mg-header-inner > .mg-search input { width: 0; }
    .mg-header-inner > .mg-search:focus-within { width: 220px; padding: 0 18px; }
    .mg-header-inner > .mg-search:focus-within input { width: auto; }
    .mg-account { gap: 14px; }
}
@media (max-width: 1200px) and (min-width: 961px) {
    .mg-header-inner { gap: 18px; padding: 0 20px; }
    .mg-logo { width: 64px; height: 38px; }
    .mg-nav { gap: 13px; font-size: 14px; }
    .mg-account { gap: 11px; }
    .mg-link { font-size: 13px; }
    .mg-pill { font-size: 13px; padding: 10px 14px; }
}

/* 신고 처리 · 제재 */
.mg-sanction small { font-weight: 500; color: var(--mg-muted); font-size: 12px; }
.mg-sanction-rows { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.mg-sanction-row { background: var(--mg-white); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.mg-sanction-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mg-sanction-who small { width: 100%; }
.mg-sanction-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-sanction-opts label { cursor: pointer; }
.mg-sanction-opts input { position: absolute; opacity: 0; pointer-events: none; }
.mg-sanction-opts span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfcfc8; font-size: 13px; font-weight: 800; background: var(--mg-white); }
.mg-sanction-opts input:checked + span { background: var(--mg-ink); color: var(--mg-accent); border-color: var(--mg-ink); }
.mg-sanction-opts .is-warn input:checked + span { background: #f2b705; color: var(--mg-ink); border-color: #f2b705; }
.mg-sanction-opts .is-banp input:checked + span, .mg-sanction-opts .is-ban30 input:checked + span, .mg-sanction-opts .is-ban7 input:checked + span { background: #b3261e; color: #fff; border-color: #b3261e; }
.mg-sanction-opts input:focus-visible + span { outline: 2px solid var(--mg-ink); outline-offset: 2px; }
.mg-sanction-reason { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 13px; }
.mg-sanction-reason input { height: 40px; border-radius: 10px; }

.mg-recipe-price { grid-column: 1 / -1; background: var(--mg-white); border-radius: 14px; padding: 14px 16px; }
.mg-recipe-price input { max-width: 200px; font-size: 18px; font-weight: 800; }
.mg-recipe-guide { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; background: #fff4d6; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }

/* 직급 배지 */
.mg-role { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 800; line-height: 1; padding: 4px 8px; border-radius: 6px; background: #ecebe6; color: #45433d; white-space: nowrap; }
.mg-role.is-designer { background: #1d2a44; color: #e9cf7f; }
.mg-role.is-owner { background: var(--mg-ink); color: var(--mg-accent); }
.mg-role + .mg-badge-on { margin-left: 2px; padding: 4px 6px; }
.mg-tier-row .mg-role { font-size: 12px; padding: 5px 10px; }
.mg-status { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #fff4d6; color: #7a5a00; vertical-align: middle; }
.mg-status.is-done { background: var(--mg-accent); color: var(--mg-ink); }
.mg-status.is-no { background: #ffd9d3; color: #8a1c12; }
.mg-cate-jump { border-style: dashed !important; }
/* 인증 신청 폼 */
.mg-verify-form { display: flex; flex-direction: column; gap: 12px; }
.mg-verify-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mg-verify-types label { cursor: pointer; }
.mg-verify-types input { position: absolute; opacity: 0; pointer-events: none; }
.mg-verify-types span { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 56px; box-sizing: border-box; padding: 10px; border: 2px solid var(--mg-line); border-radius: 16px; background: var(--mg-white); }
.mg-verify-types span b { font-size: 16px; }
.mg-verify-types span small { font-size: 12px; color: var(--mg-muted); line-height: 1.5; }
.mg-verify-types input:checked + span { border-color: var(--mg-ink); background: #f7ffdc; }
.mg-verify-types input:focus-visible + span { outline: 2px solid var(--mg-ink); outline-offset: 2px; }
.mg-verify-form [hidden] { display: none !important; }
.mg-verify-notice { background: var(--mg-paper); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.7; }
.mg-verify-notice ul { margin: 6px 0 0; padding-left: 18px; }
.mg-verify-box { margin: 0 0 18px; }
@media (max-width: 640px) { .mg-verify-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 랭킹 탭 */
.mg-rank-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 28px 0 6px; }
.mg-rank-tabs a { height: 40px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--mg-white); border: 1px solid #cfcfc8; font-weight: 800; font-size: 14px; color: var(--mg-ink); }
.mg-rank-tabs a.is-on { background: var(--mg-ink); color: var(--mg-accent); border-color: var(--mg-ink); }
.mg-rank-rule { font-size: 13px; color: var(--mg-muted); margin: 4px 0 14px; }
.mg-podium-detail { display: block; font-size: 11px; color: var(--mg-muted); margin-top: 4px; }
.mg-rank-list .mg-rank-nick small { display: block; font-size: 11px; color: var(--mg-muted); font-weight: 500; margin-top: 2px; }
.mg-hall .mg-h3 small { font-size: 13px; color: var(--mg-muted); font-family: var(--mg-body); }

.mg-who { white-space: nowrap; display: inline-block; }

/* 글쓰기 메뉴 시트 */
button.mg-tab-write { border: 0; cursor: pointer; padding: 0; font: inherit; }
.mg-sheet { position: fixed; inset: 0; z-index: 400; }
.mg-sheet[hidden] { display: none; }
.mg-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.mg-sheet-box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh; overflow-y: auto; background: var(--mg-white); border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; animation: mg-sheet-up .22s ease; }
@keyframes mg-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mg-sheet-box { animation: none; } }
.mg-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.mg-sheet-head b { font-size: 18px; }
.mg-sheet-head button { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--mg-muted); }
.mg-sheet-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mg-sheet-list a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--mg-paper); color: var(--mg-ink); min-height: 72px; box-sizing: border-box; }
.mg-sheet-list a:first-child { background: var(--mg-accent); }
.mg-sheet-list a b { font-size: 15px; }
.mg-sheet-list a span { font-size: 12px; color: var(--mg-muted); line-height: 1.4; }
.mg-sheet-list a:first-child span { color: #333; }
.mg-sheet-list a:focus-visible { outline: 2px solid var(--mg-ink); outline-offset: 2px; }

/* 닉네임 링크 */
a.mg-nick { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
a.mg-nick:hover, a.mg-nick:focus-visible { border-bottom-style: solid; }
/* 회원 프로필 */
.mg-profile { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.mg-profile-head { display: flex; flex-direction: column; gap: 18px; }
.mg-profile-who { display: flex; align-items: center; gap: 16px; }
.mg-profile-avatar img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #333; display: block; }
.mg-profile-nick { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mg-profile-since { margin: 4px 0 0; font-size: 13px; color: var(--mg-muted-dark); }
.mg-profile-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mg-profile-actions .mg-btn { font-size: 15px; padding: 12px 20px; }
.mg-profile-actions .mg-help { color: var(--mg-muted-dark); margin: 0; }
.mg-profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mg-profile-stats div { background: #1d1d1d; border-radius: 14px; padding: 12px 14px; }
.mg-profile-stats dt { font-size: 12px; color: var(--mg-muted-dark); }
.mg-profile-stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 800; color: var(--mg-accent); }
.mg-profile-tabs { margin: 6px 0 0; }
.mg-profile-tabs small { font-weight: 600; opacity: .7; margin-left: 2px; }
.mg-profile-cats { flex-wrap: wrap; }
.mg-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mg-profile-grid.is-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mg-profile-cell { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #dcdcd6; display: block; color: var(--mg-ink); }
.mg-profile-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.mg-profile-cell:hover img { transform: scale(1.04); }
.mg-profile-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-weight: 700; font-size: 13px; }
.mg-profile-cell-meta { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.9); padding: 3px 8px; border-radius: 999px; }
.mg-profile-list { list-style: none; margin: 0; padding: 0; background: var(--mg-white); border-radius: var(--mg-radius); overflow: hidden; }
.mg-profile-list li + li { border-top: 1px solid var(--mg-line); }
.mg-profile-list a { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px; color: var(--mg-ink); }
.mg-profile-list a:hover { background: var(--mg-paper); }
.mg-profile-list li.is-sold { opacity: .5; }
.mg-profile-board { font-size: 12px; font-weight: 800; color: #1f4b99; }
.mg-profile-list b { font-size: 15px; }
.mg-profile-meta { font-size: 12px; color: var(--mg-muted); }
.mg-profile-pages { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.mg-profile-pages a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--mg-white); font-weight: 800; color: var(--mg-ink); }
.mg-profile-pages a.is-on { background: var(--mg-ink); color: var(--mg-accent); }
@media (max-width: 960px) {
    .mg-profile { margin-top: 16px; }
    .mg-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .mg-profile-grid.is-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mg-profile-cell { border-radius: 8px; }
    .mg-profile-nick { font-size: 22px; }
}

/* 한글 줄바꿈: 단어 중간에서 끊지 않기 */
body { word-break: keep-all; overflow-wrap: break-word; }
/* 회원가입 숨은 칸 (봇 차단용) */
.mg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
/* 회원가입·글쓰기 화면에서는 모바일 하단 메뉴 숨김 (버튼 가림 방지) */
@media (max-width: 960px) {
    body:has(#fregisterform) .mg-tabbar, body:has(form[name="fwrite"]) .mg-tabbar, body:has(#fregister) .mg-tabbar { display: none; }
    body:has(#fregisterform) .mg-footer-copy, body:has(form[name="fwrite"]) .mg-footer-copy { padding-bottom: 32px; }
}
.mg-br-m { display: none; }
@media (max-width: 640px) { .mg-br-m { display: inline; } }

/* 잠긴 카테고리 */
#bo_cate a.mg-cate-lock { color: #8a8a84; background: #f0f0ec; border-style: dashed; }
#bo_cate a.mg-cate-lock span[aria-hidden] { font-size: 12px; margin-right: 4px; filter: grayscale(1); }
#bo_cate a.mg-cate-lock:hover { color: var(--mg-ink); }

.mg-verify-guide { background: #f7ffdc; border: 2px solid var(--mg-ink); border-radius: 16px; padding: 14px 18px; font-size: 14px; line-height: 1.7; }
.mg-verify-guide > b { font-size: 15px; }
.mg-verify-guide ol { margin: 6px 0 0; padding-left: 20px; }
.mg-extra-row label small { font-weight: 500; color: var(--mg-muted); }

.mg-more-light { color: var(--mg-white); border-color: var(--mg-white); }
.mg-hot-cat { white-space: nowrap; }
.mg-hot-time { flex-shrink: 0; min-width: 46px; font-size: 12px; font-weight: 700; color: var(--mg-accent); }

/* 운영자 도구 (프로필) */
.mg-admin-box { border: 2px dashed var(--mg-ink); }
.mg-admin-box .mg-h3 small { font-size: 12px; color: var(--mg-muted); font-family: var(--mg-body); margin-left: 6px; }
.mg-admin-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.mg-admin-info div { background: var(--mg-paper); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mg-admin-info dt { font-size: 11px; color: var(--mg-muted); }
.mg-admin-info dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.mg-admin-ban { color: #b3261e; }
.mg-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mg-admin-form { display: flex; flex-direction: column; gap: 8px; background: var(--mg-paper); border-radius: 16px; padding: 14px; }
.mg-admin-form > b { font-size: 15px; }
.mg-admin-form .mg-btn { padding: 10px 16px; font-size: 14px; cursor: pointer; border: 0; align-self: flex-start; }
.mg-admin-form .mg-consent { font-size: 13px; }
.mg-admin-log { margin-top: 12px; font-size: 13px; }
.mg-admin-log summary { cursor: pointer; font-weight: 700; }
.mg-admin-log pre { white-space: pre-wrap; background: var(--mg-paper); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 12px; line-height: 1.7; }
@media (max-width: 960px) { .mg-admin-grid, .mg-admin-info { grid-template-columns: 1fr; } .mg-admin-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 메인 이달의 랭킹 (돌아가는 탭) */
.mg-rk-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 6px; padding-bottom: 2px; }
.mg-rk-tabs::-webkit-scrollbar { display: none; }
.mg-rk-tabs button { flex: 0 0 auto; border: 1px solid var(--mg-line); background: #fff; color: var(--mg-ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mg-rk-tabs button.is-on { background: var(--mg-ink); color: var(--mg-accent); border-color: var(--mg-ink); }
.mg-rk-pane { display: none; }
.mg-rk-pane.is-on { display: block; animation: mgRkIn .35s ease; }
@keyframes mgRkIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mg-rk-pane.is-on { animation: none; } }

/* 중고거래 택배 O/X */
.mg-extra-label { font-size: 13px; font-weight: 800; }
.mg-ox { display: flex; gap: 8px; }
.mg-ox label { flex: 1; position: relative; cursor: pointer; }
.mg-ox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mg-ox span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 1px solid var(--mg-line); border-radius: 12px; background: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.mg-ox b { font-size: 18px; }
.mg-ox input:checked + span { background: var(--mg-ink); color: var(--mg-accent); border-color: var(--mg-ink); }
.mg-ox input:focus-visible + span { outline: 2px solid var(--mg-ink); outline-offset: 2px; }
.mg-ox-o { color: #1a7f37; } .mg-ox-x { color: #c62828; }
.mg-rk, .mg-split > * { min-width: 0; }
/* 모바일 가로 넘침 막기 */
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 960px) {
    .mg-chatlist-wrap { grid-template-columns: minmax(0, 1fr); }
    .bo_v_com { float: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin: 12px 0; }
    .bo_v_com > li { float: none; margin-left: 0; }
}
@media (max-width: 960px) { .mg-extra .mg-extra-full { grid-column: 1 / -1; } }
/* 앱으로 설치 */
.mg-drawer-install { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--mg-accent); color: var(--mg-ink); text-align: left; cursor: pointer; font: inherit; }
.mg-drawer-install[hidden] { display: none; }
.mg-drawer-install img { border-radius: 9px; flex: 0 0 auto; }
.mg-drawer-install span { display: flex; flex-direction: column; }
.mg-drawer-install b { font-size: 16px; }
.mg-drawer-install small { font-size: 12px; color: #333; }
.mg-app-banner { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 300; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 18px; background: var(--mg-ink); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: mg-sheet-up .25s ease; }
.mg-app-banner[hidden] { display: none; }
.mg-app-banner img { border-radius: 10px; flex: 0 0 auto; box-shadow: 0 0 0 1px #3a3a3a; }
.mg-app-banner span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mg-app-banner b { font-size: 14px; }
.mg-app-banner small { font-size: 12px; color: #bbb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-app-banner-go { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 9px 16px; background: var(--mg-accent); color: var(--mg-ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.mg-app-banner-x { flex: 0 0 auto; border: 0; background: none; color: #999; font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.mg-app-steps { margin: 0; padding: 0 4px 6px 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.5; }
.mg-app-steps[hidden] { display: none; }
.mg-app-steps small { display: block; color: var(--mg-muted); font-size: 13px; }
.mg-app-ico { display: inline-flex; vertical-align: middle; width: 26px; height: 26px; border-radius: 8px; background: var(--mg-paper); align-items: center; justify-content: center; }
.mg-app-ico svg { width: 16px; height: 16px; fill: none; stroke: #0a84ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 961px) { .mg-app-banner { display: none !important; } }

/* 모바일 메뉴: 화면 전체 덮기 + 뒤 화면 고정 */
@media (max-width: 960px) {
    .mg-drawer { position: fixed; left: 0; right: 0; bottom: 0; top: 60px; z-index: 450; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(32px + env(safe-area-inset-bottom)); box-sizing: border-box; }
    .mg-drawer[hidden] { display: none; }
    html.mg-menu-open { overflow: hidden; overscroll-behavior: none; }
    html.mg-menu-open .mg-tabbar, html.mg-menu-open .mg-app-banner { display: none !important; }
}
/* 모바일 메뉴 아래 계정 버튼: 줄바꿈 없이 3칸씩 */
.mg-drawer-account { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 16px; }
.mg-drawer-account a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; border-radius: 12px; background: #1c1c1c; color: #ddd; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
