/* 리버스M 공지 사이트(P2, RM-107) · 10-31 리디자인(사용자 「다크가 너무 어둡다 · 게임 이미지 · 라이트/다크 · 폰트는 caretgames.info」).
   레이아웃: 위 = 게임 그림 배너(홈) · 분류 타일 · 그 아래 카드(그림 있는 업데이트·이벤트)와 줄 목록(공지·가이드·문제). 폰 먼저, 넓으면 2단.
   색 하나 = 뜻 하나: 금색 = 브랜드·링크·고정 · 초록 = 진행 중·정상·수정됨 · 호박색 = 예정·확인 중·점검 예정 · 빨강 = 점검 중 · 회색 = 종료.
   글꼴 = G마켓 산스(caretgames.info 와 같음, fonts/ 에 직접 둠). 밝기 = 기기 설정 기본 + 버튼(site.js). */
@font-face { font-family: "Gmarket Sans"; src: url("fonts/GmarketSansMedium.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Gmarket Sans"; src: url("fonts/GmarketSansBold.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }

:root {
  --bg: #f3f4f8; --surface: #ffffff; --surface-2: #f6f7fb; --line: #e2e5ee; --line-strong: #cfd4e1;
  --text: #191b23; --text-2: #4a5062; --muted: #7d8498;
  --brand: #a8741c; --brand-strong: #8c5f12; --brand-soft: rgba(168, 116, 28, 0.10);
  --ok: #12855a; --ok-soft: rgba(18, 133, 90, 0.10);
  --pending: #a06a00; --pending-soft: rgba(196, 140, 0, 0.13);
  --danger: #cf3442; --danger-soft: rgba(207, 52, 66, 0.10);
  --off: #7d8498; --off-soft: rgba(125, 132, 152, 0.13);
  --header: rgba(255, 255, 255, 0.88); --shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 8px 24px -12px rgba(20, 24, 40, 0.18);
  --radius: 16px; --radius-sm: 10px;
  --font: "Gmarket Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a22; --surface: #20242f; --surface-2: #272c39; --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
    --text: #eef0f5; --text-2: #bfc5d2; --muted: #8e95a8;
    --brand: #e5b65c; --brand-strong: #f0c674; --brand-soft: rgba(229, 182, 92, 0.14);
    --ok: #46d6a0; --ok-soft: rgba(70, 214, 160, 0.13); --pending: #f3c35a; --pending-soft: rgba(243, 195, 90, 0.13);
    --danger: #ff7680; --danger-soft: rgba(255, 118, 128, 0.14); --off: #8e95a8; --off-soft: rgba(142, 149, 168, 0.14);
    --header: rgba(23, 26, 34, 0.88); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171a22; --surface: #20242f; --surface-2: #272c39; --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f5; --text-2: #bfc5d2; --muted: #8e95a8;
  --brand: #e5b65c; --brand-strong: #f0c674; --brand-soft: rgba(229, 182, 92, 0.14);
  --ok: #46d6a0; --ok-soft: rgba(70, 214, 160, 0.13); --pending: #f3c35a; --pending-soft: rgba(243, 195, 90, 0.13);
  --danger: #ff7680; --danger-soft: rgba(255, 118, 128, 0.14); --off: #8e95a8; --off-soft: rgba(142, 149, 168, 0.14);
  --header: rgba(23, 26, 34, 0.88); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.7 var(--font); letter-spacing: -0.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 1.6rem; line-height: 1.3; margin: 0; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 20; background: var(--header); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
/* 게임 타이틀 로고(로그인 화면의 title_rebirth). 밝은 바탕에선 은색 글자가 묻혀 그림자를 살짝 */
.brand-logo { height: 44px; width: auto; display: block; flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); } /* REBIRTH M + ONLINE 합성 한 로고(사용자 10-31) */
@media (max-width: 360px) { .brand-logo { height: 36px; } }
.brand-sub { color: var(--muted); font-size: 0.85rem; padding-left: 10px; border-left: 1px solid var(--line-strong); }
@media (max-width: 480px) { .brand-sub { display: none; } }
.tools { display: flex; align-items: center; gap: 8px; }
.langs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.langs a { padding: 4px 12px; border-radius: 999px; font-size: 0.82rem; color: var(--text-2); white-space: nowrap; }
@media (max-width: 360px) { .langs a { padding: 4px 8px; font-size: 0.78rem; } .top-row { gap: 8px; } }
.langs a[aria-current] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2); cursor: pointer; padding: 0; }
.theme-btn:hover { color: var(--brand); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .sun { display: none; } :root:not([data-theme="light"]) .theme-btn .moon { display: block; } }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 10px 14px 12px; color: var(--text-2); font-size: 0.93rem; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); font-weight: 700; border-bottom-color: var(--brand); }

/* 점검 띠 */
.strip { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding-top: 10px; padding-bottom: 10px; color: var(--text); font-size: 0.9rem; }
.strip-scheduled { background: var(--pending-soft); }
.strip-maintenance { background: var(--danger-soft); }
.strip strong { color: var(--danger); }
.strip-scheduled strong { color: var(--pending); }

/* 홈 배너 */
.hero { position: relative; overflow: hidden; background: #0f1118; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 18, 0.88) 0%, rgba(10, 12, 18, 0.55) 45%, rgba(10, 12, 18, 0.1) 100%),
  linear-gradient(0deg, rgba(10, 12, 18, 0.65), transparent 55%); }
.hero-body { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 44px; padding-bottom: 40px; min-height: 260px; justify-content: flex-end; }
.hero-logo { height: 68px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; align-self: flex-start; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
@media (min-width: 760px) { .hero-logo { height: 88px; } }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); color: #fff; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.82); max-width: 32rem; }
.status-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; font-size: 0.85rem; backdrop-filter: blur(6px); }
.status-pill:hover { color: #fff; background: rgba(255, 255, 255, 0.2); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #46d6a0; box-shadow: 0 0 0 3px rgba(70, 214, 160, 0.25); }
.status-pill.status-scheduled .dot { background: #f3c35a; box-shadow: 0 0 0 3px rgba(243, 195, 90, 0.25); }
.status-pill.status-maintenance .dot { background: #ff7680; box-shadow: 0 0 0 3px rgba(255, 118, 128, 0.25); }
@media (min-width: 760px) { .hero-body { min-height: 340px; padding-bottom: 56px; } }

/* 분류 타일(홈) */
.cats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 18px 0 6px; padding-bottom: 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; padding: 12px 14px; border-radius: var(--radius);
  overflow: hidden; color: #fff; scroll-snap-align: start; background: #222; box-shadow: var(--shadow); }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: transform 0.4s ease; }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 10, 16, 0.82) 0%, rgba(8, 10, 16, 0.1) 70%); }
.cat strong, .cat span { position: relative; z-index: 1; }
.cat strong { font-size: 1rem; }
.cat span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.8); }
.cat:hover { color: #fff; }
.cat:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .cat img { transition: none; } .cat:hover img { transform: none; } }

/* 칸 */
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 10px; }
.section-head h2 { font-size: 1.15rem; margin: 0; }
.section-head a { font-size: 0.85rem; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 18px; }
.pinned { border-color: var(--brand-soft); }

/* 줄 목록 */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 13px 0; color: var(--text); }
.rows a:hover .item-title { color: var(--brand); }
.item-title { font-weight: 500; overflow-wrap: anywhere; }
.item-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-sum { grid-column: 1 / -1; color: var(--text-2); font-size: 0.87rem; }
@media (max-width: 520px) { .rows a { grid-template-columns: 1fr; } .item-meta { white-space: normal; flex-wrap: wrap; } }
.pin { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: 2px; }

/* 카드(그림) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.cards a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s ease; }
.cards a:hover { transform: translateY(-2px); border-color: var(--line-strong); }
@media (prefers-reduced-motion: reduce) { .cards a { transition: none; } .cards a:hover { transform: none; } }
.thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card-body .item-title { font-weight: 700; line-height: 1.45; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; line-height: 1.5; }
.chip-ok { color: var(--ok); background: var(--ok-soft); }
.chip-pending { color: var(--pending); background: var(--pending-soft); }
.chip-off { color: var(--off); background: var(--off-soft); }
.chip-kind { color: var(--brand); background: var(--brand-soft); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; }
.empty-note { color: var(--muted); padding: 14px 0; margin: 0; }

/* 목록 머리(분류 그림 띠) */
.band { position: relative; overflow: hidden; border-radius: var(--radius); margin: 18px 0 16px; min-height: 120px; display: flex; align-items: flex-end; background: #1a1d26; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 16, 0.85), rgba(8, 10, 16, 0.2)); }
.band-text { position: relative; z-index: 1; padding: 18px 20px; color: #fff; }
.band-text h1 { color: #fff; font-size: 1.5rem; }
.band-text p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.8); font-size: 0.88rem; }

/* 글 */
.post { max-width: 820px; margin: 0 auto; }
.post .back { display: inline-block; margin-top: 18px; font-size: 0.9rem; }
.post-head { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.note { padding: 11px 14px; border-radius: var(--radius-sm); background: var(--pending-soft); color: var(--text-2); font-size: 0.9rem; margin: 0 0 14px; }
.body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 22px 22px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .body { padding: 4px 16px 18px; border-radius: 12px; } }
.body h2, .body h3, .body h4 { line-height: 1.4; margin: 1.6em 0 0.5em; scroll-margin-top: 120px; }
.body h2 { font-size: 1.25rem; } .body h3 { font-size: 1.1rem; } .body h4 { font-size: 1rem; }
.body img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 10px 0; }
.body blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text-2); }
.body blockquote p { margin: 0.3em 0; }
.body ul, .body ol { padding-left: 1.3em; }
.body li { margin: 0.2em 0; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.body code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.body pre { background: var(--surface-2); padding: 12px; border-radius: 10px; overflow-x: auto; }
.body table { display: block; overflow-x: auto; border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
.body th, .body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.body th { background: var(--surface-2); }
.toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 14px 0; font-size: 0.92rem; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 3px 0; }
.toc .toc-3 { padding-left: 14px; } .toc .toc-4 { padding-left: 28px; font-size: 0.88rem; }

/* 점검 상태 */
.status-card { padding: 18px; }
.status-word { font-size: 1.2rem; font-weight: 700; margin: 4px 0 8px; }
.status-normal .status-word { color: var(--ok); }
.status-scheduled { border-color: var(--pending); } .status-scheduled .status-word { color: var(--pending); }
.status-maintenance { border-color: var(--danger); } .status-maintenance .status-word { color: var(--danger); }
.status-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 8px; }
.status-card dt { color: var(--muted); } .status-card dd { margin: 0; }
.status-msg { white-space: pre-line; color: var(--text-2); }

.empty-page { text-align: center; padding: 34px 16px; margin-top: 24px; }
.btn { display: inline-block; padding: 9px 20px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; }
.btn:hover { color: #fff; background: var(--brand-strong); }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 20px; padding-bottom: 32px; margin-top: 36px; border-top: 1px solid var(--line); font-size: 0.85rem; }
.foot a { color: var(--text-2); }
.preview-bar { position: sticky; top: 0; z-index: 30; padding: 8px 16px; background: #3d7be0; color: #fff; font-weight: 700; font-size: 0.85rem; text-align: center; }
/* 폰: 그림 카드를 가로형(왼쪽 작은 그림 + 글)으로 — 16:9 큰 그림이 한 화면을 다 먹지 않게 */
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .cards a { flex-direction: row; align-items: stretch; }
  .thumb { flex: none; width: 116px; aspect-ratio: auto; min-height: 84px; }
  .card-body { padding: 10px 12px; justify-content: center; gap: 4px; }
  .card-body .item-title { font-size: 0.95rem; }
}
