/* 아이비봇: 아이비 상징색 기준
   #eeceff 연보라 / #c9f0f7 연하늘 / #5b4b8a 진보라 / #3a6b78 진청록 */

:root {
  --violet: #eeceff;
  --cyan:   #c9f0f7;
  --deep:   #5b4b8a;
  --teal:   #3a6b78;
  --ink:    #3a3a45;
  --dim:    #6b6880;
  --bg:     #f7f4fb;
  --card:   #ffffff;
  --line:   #ece8f4;
  --warn-bg:#fff6e0;
  --warn-ink:#8a5a00;
  --bad-bg: #fdeaea;
  --bad-ink:#a32020;
  --ok-bg:  #e6f7ec;
  --ok-ink: #1c6b3c;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink:#e8e6ef; --dim:#a09ab5; --bg:#16151b; --card:#221f2a; --line:#332f3d;
    --warn-bg:#3a3020; --warn-ink:#e8c98a; --bad-bg:#3a2020; --bad-ink:#f0a0a0;
    --ok-bg:#1e3227; --ok-ink:#8fd6a8;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", -apple-system, system-ui, sans-serif;
  line-height: 1.7; font-size: 16px;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
a { color: var(--deep); }
@media (prefers-color-scheme: dark) { a { color: #b9a8e8; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 50; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; background: linear-gradient(90deg, var(--violet), var(--cyan));
       border-bottom: 1px solid rgba(0,0,0,.06); }
.topbar { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--deep); font-weight: 800; }
.brand-mark { background: var(--deep); color: #fff; border-radius: 8px; padding: 3px 9px; font-size: 13px; letter-spacing: .06em; }
.brand-name { font-size: 17px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 7px 12px; border-radius: 99px; text-decoration: none; color: #4a3f73; font-size: 15px; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,.55); }
.nav a.on { background: var(--deep); color: #fff; }
.acct { display: flex; gap: 7px; align-items: center; font-size: 14px; }
.acct a { color: #4a3f73; text-decoration: none; padding: 6px 10px; border-radius: 99px; }
.acct a:hover { background: rgba(255,255,255,.55); }
.acct .chip { background: var(--deep); color: #fff; font-weight: 700; }

.main { padding: 26px 16px 70px; }

/* 카드 */
.card { background: var(--card); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px;
        box-shadow: 0 1px 3px rgba(0,0,0,.06); }
@media (prefers-color-scheme: dark) { .card { box-shadow: none; border: 1px solid var(--line); } }
h1 { font-size: 26px; margin: 0 0 10px; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 26px 0 10px; color: var(--deep); }
@media (prefers-color-scheme: dark) { h2 { color: #c3b2f0; } }
h3 { font-size: 16px; margin: 18px 0 6px; }
p { margin: 9px 0; }
.lead { color: var(--dim); font-size: 16px; }
.meta { color: var(--dim); font-size: 13px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 14px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 13px; }

/* 히어로 */
.hero { background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #3b3560;
        border-radius: 18px; padding: 40px 30px; margin-bottom: 18px; }
.hero h1 { font-size: 32px; color: #3b3560; }
.hero p { color: #4a4368; font-size: 17px; max-width: 46em; }
.hero .btn { margin-top: 14px; }

/* 버튼 */
.btn { display: inline-block; background: var(--deep); color: #fff !important; text-decoration: none;
       padding: 11px 22px; border-radius: 10px; font-weight: 700; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--line); color: var(--ink) !important; }
.btn.danger { background: var(--bad-ink); }
.btn.sm { padding: 6px 13px; font-size: 14px; border-radius: 8px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* 알림 */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.flash.ok, .flash.success { background: var(--ok-bg); color: var(--ok-ink); }
.flash.error, .flash.bad { background: var(--bad-bg); color: var(--bad-ink); }
.flash.info { background: var(--warn-bg); color: var(--warn-ink); }
.note { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 16px; border-radius: 10px; margin: 14px 0; }
.note.bad, .note.error { background: var(--bad-bg); color: var(--bad-ink); }
.note.ok, .note.success  { background: var(--ok-bg);  color: var(--ok-ink); }

/* 폼 */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 15px; }
.field .hint { color: var(--dim); font-size: 13px; margin: 3px 0 6px; }
input[type=text], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: var(--bg); color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--deep); outline-offset: 1px; }
.err { color: var(--bad-ink); font-size: 13px; margin-top: 4px; font-weight: 600; }

/* 동의 박스 */
.consent { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--bg); }
.consent.req { border-left: 4px solid var(--deep); }
.consent.opt { border-left: 4px solid var(--cyan); }
.consent > label { display: flex; gap: 9px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.consent input[type=checkbox] { margin-top: 5px; width: 17px; height: 17px; flex: none; }
.consent .tag { font-size: 12px; padding: 1px 7px; border-radius: 99px; font-weight: 700; flex: none; }
.consent .tag.r { background: var(--deep); color: #fff; }
.consent .tag.o { background: var(--cyan); color: #2b4b55; }
.consent .detail { margin: 8px 0 0 26px; font-size: 13.5px; color: var(--dim); white-space: pre-line; font-weight: 400; }
.consent .docref { margin: 7px 0 0 26px; font-size: 13px; }

/* 표 */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 10px; }
th, td { padding: 9px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--bg); font-size: 13.5px; }
tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

/* 명령어 */
.cmd-cat { margin-bottom: 26px; }
.cmd-cat > h2 { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--violet); padding-bottom: 7px; }
.cmd { border: 1px solid var(--line); border-radius: 11px; padding: 13px 16px; margin-bottom: 9px; background: var(--card); }
.cmd .name { font-weight: 800; color: var(--deep); font-size: 15.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
@media (prefers-color-scheme: dark) { .cmd .name { color: #c3b2f0; } }
.cmd .d { margin: 5px 0 0; font-size: 14.5px; }
.cmd .alias { margin-top: 6px; font-size: 13px; color: var(--dim); }
.cmd .w { margin-top: 6px; font-size: 13px; background: var(--warn-bg); color: var(--warn-ink); padding: 6px 10px; border-radius: 7px; }

/* 플랜 */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.plan { border: 1px solid var(--line); border-radius: 13px; padding: 18px; background: var(--card); }
.plan h3 { margin: 0 0 3px; color: var(--deep); }
.plan .price { font-size: 21px; font-weight: 800; margin: 5px 0 9px; }
.plan .sum { color: var(--dim); font-size: 14px; }
.plan ul { padding-left: 18px; font-size: 14px; margin: 9px 0 0; }

/* 목차 */
.toc { background: var(--bg); border-radius: 11px; padding: 14px 18px; margin: 16px 0 22px; border: 1px solid var(--line); }
.toc ol { margin: 7px 0 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.doc-sec { scroll-margin-top: 80px; }
.doc h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* 상태 배지 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.badge.pending  { background: var(--warn-bg); color: var(--warn-ink); }
.badge.approved { background: var(--ok-bg);  color: var(--ok-ink); }
.badge.rejected { background: var(--bad-bg); color: var(--bad-ink); }
.badge.canceled { background: var(--line);   color: var(--dim); }

/* 푸터 */
.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; margin-top: 30px; background: var(--card); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; }
.foot-note, .foot-copy { color: var(--dim); font-size: 13px; margin: 6px 0; }

/* 관리자 */
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.adm-tabs a { padding: 7px 14px; border-radius: 99px; background: var(--bg); text-decoration: none;
              border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.adm-tabs a.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--bg); border-radius: 11px; padding: 14px; text-align: center; border: 1px solid var(--line); }
.stat b { display: block; font-size: 25px; color: var(--deep); }
.stat span { font-size: 13px; color: var(--dim); }

@media (max-width: 640px) {
  .topbar { min-height: auto; padding: 10px 0; gap: 10px; }
  /* flex:1 의 basis 0 을 덮어써야 메뉴가 한 줄을 통째로 차지한다.
     안 그러면 남는 폭만큼만 잡혀서 오른쪽에 세로로 쌓인다. */
  .nav { order: 3; flex: 0 0 100%; width: 100%; justify-content: center; gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .brand { flex: 1 1 auto; }
  .brand-name { font-size: 16px; }
  .acct { flex: 0 0 auto; font-size: 13px; }
  .acct a { padding: 5px 9px; }
  .hero { padding: 28px 20px; } .hero h1 { font-size: 25px; }
  .card { padding: 20px 18px; }
}

/* ───────────────── 명령어 표 ───────────────── */
h2.tight { margin-top: 18px; }
ul.plain { list-style: none; padding-left: 0; margin: 8px 0; }
ul.plain li { position: relative; padding-left: 14px; margin-bottom: 5px; font-size: 14.5px; line-height: 1.65; }
ul.plain li::before { content: "·"; position: absolute; left: 3px; color: var(--deep); font-weight: 700; }

.perm-legend { margin: 14px 0 4px; line-height: 2.1; }
.perm { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 12px;
        font-weight: 700; white-space: nowrap; }
.perm.p전체   { background: var(--ok-bg);   color: var(--ok-ink); }
.perm.p스태프 { background: var(--violet);  color: #4a3a75; }
.perm.p관리자 { background: var(--bad-bg);  color: var(--bad-ink); }
@media (prefers-color-scheme: dark) { .perm.p스태프 { background: #3b3250; color: #d9c8f5; } }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmdtbl { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 14.5px; }
table.cmdtbl th, table.cmdtbl td { border-bottom: 1px solid var(--line); padding: 11px 10px;
        text-align: left; vertical-align: top; }
table.cmdtbl thead th { background: var(--bg); color: var(--deep); font-size: 13px;
        white-space: nowrap; position: sticky; top: 0; }
table.cmdtbl tr:last-child td { border-bottom: 0; }
table.cmdtbl .c-cmd  { width: 24%; min-width: 170px; }
table.cmdtbl .c-ex   { width: 22%; min-width: 150px; }
table.cmdtbl .c-perm { width: 76px; text-align: center; }
code.cmdname { display: inline-block; font-weight: 700; color: var(--deep); background: var(--bg); }
code.ex { display: block; margin-bottom: 4px; color: var(--teal); font-size: 13.5px; word-break: break-all; }
table.cmdtbl .d { margin: 0 0 5px; line-height: 1.65; }
table.cmdtbl .alias { margin-top: 6px; font-size: 12.5px; color: var(--dim); line-height: 1.55; }
table.cmdtbl .w { margin-top: 6px; background: var(--warn-bg); color: var(--warn-ink);
        border-radius: 7px; padding: 6px 9px; font-size: 13px; line-height: 1.55; }

/* ───────────────── 펼치고 접는 설명 ───────────────── */
details.more { margin: 10px 0 2px; border: 1px solid var(--line); border-radius: 10px;
        background: var(--bg); overflow: hidden; }
details.more > summary { cursor: pointer; padding: 9px 12px; font-size: 13.5px; font-weight: 700;
        color: var(--deep); list-style: none; display: flex; align-items: center; gap: 7px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary:hover { background: var(--line); }
.more-body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.more-body ul.plain { margin-top: 8px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
table.grid thead th { background: var(--card); color: var(--deep); font-size: 12.5px; white-space: nowrap; }
table.grid code { font-size: 13px; }

/* 동의 항목의 고지 사항 */
details.more.notice { background: var(--card); }
ul.notice-list { list-style: none; padding-left: 0; margin: 6px 0 0; }
ul.notice-list li { display: flex; gap: 10px; padding: 5px 0; font-size: 13.5px; line-height: 1.6;
        border-bottom: 1px dashed var(--line); }
ul.notice-list li:last-child { border-bottom: 0; }
ul.notice-list b { flex: 0 0 78px; color: var(--deep); font-size: 13px; }
.btn.tiny { padding: 5px 13px; font-size: 13px; border-radius: 8px; }

/* ───────────────── 전문 보기 팝업 ───────────────── */
dialog.modal { width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px);
        padding: 0; border: 0; border-radius: 16px; background: var(--card); color: var(--ink);
        box-shadow: 0 18px 50px rgba(40, 30, 70, .3); overflow: hidden; }
dialog.modal::backdrop { background: rgba(32, 26, 48, .5); backdrop-filter: blur(2px); }
dialog.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px;
        background: linear-gradient(90deg, var(--violet), var(--cyan)); flex: 0 0 auto; }
.modal-title { margin: 0; font-size: 17px; color: #3b3560; flex: 1 1 auto; }
.modal-x { border: 0; background: rgba(255, 255, 255, .55); color: #3b3560; font-size: 22px;
        line-height: 1; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; }
.modal-x:hover { background: #fff; }
.modal-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px 16px; }
.modal-body .card { box-shadow: none; border: 0; padding: 0; margin: 0; background: none; }
.modal-body .doc h1, .modal-body .modal-doc-title { display: none; }
.modal-body .toc { margin-top: 12px; }
.modal-loading { color: var(--dim); padding: 24px 0; text-align: center; }
.modal-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
        padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); }
.modal-open-tab { margin-left: auto; font-size: 13px; color: var(--dim); }
@media (max-width: 560px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal-open-tab { margin-left: 0; }
  table.cmdtbl { font-size: 13.5px; }
  table.cmdtbl th, table.cmdtbl td { padding: 9px 7px; }
}

/* 좁은 화면에서는 명령어 표를 카드처럼 쌓는다 */
@media (max-width: 640px) {
  table.cmdtbl { display: block; }
  table.cmdtbl thead { display: none; }
  table.cmdtbl tbody, table.cmdtbl tr, table.cmdtbl td { display: block; width: auto; }
  table.cmdtbl tr { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
        margin-bottom: 12px; background: var(--bg); position: relative; }
  table.cmdtbl td { border: 0; padding: 0 0 9px; }
  table.cmdtbl td:last-child { padding-bottom: 0; }
  table.cmdtbl td[data-label]::before { content: attr(data-label); display: block;
        font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: .02em;
        margin-bottom: 3px; }
  table.cmdtbl td.c-cmd::before { display: none; }
  table.cmdtbl td.c-cmd { padding-right: 82px; }
  table.cmdtbl td.c-cmd, table.cmdtbl td.c-ex, table.cmdtbl td.c-desc { min-width: 0; width: auto; }
  table.cmdtbl td.c-perm { position: absolute; top: 12px; right: 13px; padding: 0; text-align: right; }
  table.cmdtbl td.c-perm::before { display: none; }
  code.cmdname { font-size: 14.5px; }
  details.more, table.grid { background: var(--card); }
  ul.notice-list li { display: block; }
  ul.notice-list b { display: block; margin-bottom: 2px; }
}

/* ───────────────── 대시보드 ───────────────── */
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; word-break: break-all; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 6px; vertical-align: 1px; }
.dot.on  { background: #24a35a; box-shadow: 0 0 0 3px rgba(36,163,90,.18); }
.dot.off { background: #b23b3b; box-shadow: 0 0 0 3px rgba(178,59,59,.16); }

.badge { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 700;
         background: var(--line); color: var(--dim); margin-left: 6px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }

.dev { border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; margin-bottom: 14px; }
.dev.up { border-left: 4px solid #24a35a; }
.dev.down { border-left: 4px solid #b23b3b; }
.dev-head { display: flex; justify-content: space-between; align-items: center; gap: 10px;
            flex-wrap: wrap; margin-bottom: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 9px; margin-bottom: 12px; }
.stat { background: var(--bg); border-radius: 9px; padding: 8px 11px; }
.stat .k { display: block; font-size: 11.5px; color: var(--dim); font-weight: 700; }
.stat .v { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 2px; }

.uprow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.upbox { flex: 1 1 140px; background: linear-gradient(135deg, var(--violet), var(--cyan));
         border-radius: 11px; padding: 10px 14px; color: #3b3560; }
.upbox .k { display: block; font-size: 12px; font-weight: 700; opacity: .85; }
.upbox .v.big { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 52px; padding: 4px 0;
         border-bottom: 1px solid var(--line); }
.spark .bar { flex: 1 1 0; display: flex; align-items: flex-end; height: 100%; min-width: 4px; }
.spark .bar i { display: block; width: 100%; border-radius: 2px 2px 0 0; }
.spark .bar.full i { background: #24a35a; }
.spark .bar.part i { background: #d8a032; }
.spark .bar.low  i { background: #b23b3b; }
.spark .bar.none i { background: var(--line); }

.planbadge { display: inline-block; border-radius: 99px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; }
.planbadge.pfree     { background: var(--line);    color: var(--dim); }
.planbadge.pstarter  { background: var(--cyan);    color: #235c68; }
.planbadge.pstandard { background: var(--violet);  color: #4a3a75; }
.planbadge.ppro      { background: var(--deep);    color: #fff; }

table.plantbl .pcol { text-align: center; width: 92px; }
table.plantbl .pcol.yes { color: var(--ok-ink); font-weight: 700; }
table.plantbl .pcol.no  { color: var(--dim); }
table.plantbl .grouprow td { background: var(--bg); font-weight: 700; color: var(--deep); font-size: 13px; }
.chk input { width: 18px; height: 18px; accent-color: var(--deep); cursor: pointer; }

.roomrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
           border-bottom: 1px solid var(--line); padding: 12px 0; }
.roomrow:last-child { border-bottom: 0; }
.roominfo { flex: 1 1 260px; min-width: 0; }
.roomact { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
form.inline { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
form.inline select { padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px;
                     background: var(--card); color: var(--ink); font: inherit; font-size: 13px; }
.keyform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.keyform input[type=text] { flex: 1 1 200px; padding: 8px 12px; border: 1px solid var(--line);
                            border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; }
.keyform select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
                  background: var(--card); color: var(--ink); font: inherit; }

@media (max-width: 640px) {
  .dev-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .uprow .upbox { flex: 1 1 100%; }
  .roomact { width: 100%; }
}

/* 소개 페이지 맨 위의 봇 상태 줄 */
.statusbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
             background: var(--card); border: 1px solid var(--line); border-radius: 12px;
             padding: 11px 16px; margin-bottom: 14px; font-size: 14.5px; }
.statusbar.up   { border-left: 4px solid #24a35a; }
.statusbar.down { border-left: 4px solid #b23b3b; }
.statusbar .meta { font-size: 13px; }


/* 신호가 끊긴 구간 */
.outbox { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 12px; }
.out-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
            flex-wrap: wrap; margin-bottom: 8px; }
.ok-line { color: var(--ok-ink); }
ul.downlist { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow-y: auto; }
ul.downlist li { padding: 7px 10px; border-left: 3px solid #b23b3b; background: var(--bg);
                 border-radius: 0 8px 8px 0; margin-bottom: 5px; font-size: 14px;
                 font-variant-numeric: tabular-nums; }
ul.downlist li.blip { border-left-color: #d8a032; }
ul.downlist li.now  { border-left-color: #b23b3b; background: var(--bad-bg); }
.down-len { display: inline-block; margin-left: 7px; padding: 1px 9px; border-radius: 99px;
            background: var(--bad-bg); color: var(--bad-ink); font-size: 12.5px; font-weight: 700; }
.down-len.one { background: var(--warn-bg); color: var(--warn-ink); }
@media (max-width: 640px) {
  .out-head { flex-direction: column; gap: 2px; }
  ul.downlist li { font-size: 13.5px; }
}


/* ───────────────── 플랜 페이지 ───────────────── */
.plancards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
             gap: 14px; margin-bottom: 18px; }
.plancard { position: relative; background: var(--card); border: 1px solid var(--line);
            border-radius: 14px; padding: 20px 18px; display: flex; flex-direction: column; }
.plancard.pfree     { border-top: 4px solid var(--line); }
.plancard.pstarter  { border-top: 4px solid var(--cyan); }
.plancard.pstandard { border-top: 4px solid var(--violet); }
.plancard.ppro      { border-top: 4px solid var(--deep); }
.plancard h2 { margin: 0 0 8px; font-size: 18px; }
.plancard .price { margin-bottom: 8px; }
.plancard .price strong { font-size: 23px; letter-spacing: -.02em; }
.plancard .price .was { display: block; font-size: 13px; color: var(--dim);
                        text-decoration: line-through; }
.plancard .sum { color: var(--dim); font-size: 13.5px; margin: 0 0 10px; }
.plancard ul.plain { flex: 1 1 auto; margin-bottom: 10px; }
.plancard ul.plain li { font-size: 13.5px; }
.plancard .open-count { margin: 0 0 12px; }
.plancard .btn { text-align: center; }
.plancard.sale { border-color: #d8a032; }
.saletag { position: absolute; top: -10px; right: 14px; background: #d8a032; color: #fff;
           font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 99px; }
.salenote { margin: 0 0 8px; font-size: 13px; color: #8a5a00; font-weight: 700; }
@media (prefers-color-scheme: dark) { .salenote { color: #e8c98a; } }

.cmpform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.cmpform label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; }
.cmpform select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
                  background: var(--card); color: var(--ink); font: inherit; }
.cmpform .vs { font-weight: 800; color: var(--deep); padding-bottom: 9px; }
.cmpform .chkline { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 9px;
                    font-weight: 400; }
.cmpform .chkline input { width: 17px; height: 17px; accent-color: var(--deep); }

.diffgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 12px; margin-bottom: 12px; }
.diffbox { border-radius: 12px; padding: 14px 16px; }
.diffbox h3 { margin: 0 0 8px; font-size: 15px; }
.diffbox.up   { background: var(--ok-bg);  color: var(--ok-ink); }
.diffbox.down { background: var(--bad-bg); color: var(--bad-ink); }
.diffbox ul.plain li::before { color: inherit; }
.diffbox .meta { color: inherit; opacity: .75; }

table.plantbl .pcol.num { font-variant-numeric: tabular-nums; font-weight: 600; }
table.plantbl .pcol.num.best { color: var(--ok-ink); font-weight: 800; }

/* 관리자 : 할인과 제한 */
.discrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.discrow select, .discrow input { padding: 8px 11px; border: 1px solid var(--line);
                                  border-radius: 9px; background: var(--card);
                                  color: var(--ink); font: inherit; }
.discrow input[type=text] { flex: 1 1 150px; }
.limgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.limitem { display: grid; grid-template-columns: 1fr 88px; gap: 4px 8px; align-items: center;
           font-size: 13.5px; }
.limitem .k { font-weight: 700; }
.limitem input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px;
                 background: var(--card); color: var(--ink); font: inherit;
                 text-align: right; font-variant-numeric: tabular-nums; }
.limitem .now { grid-column: 1 / -1; text-align: right; }

/* 개발자 문서 */
.card pre { max-height: 460px; }
.card h3 { font-size: 15px; margin: 18px 0 7px; color: var(--ink); }

@media (max-width: 640px) {
  .cmpform { flex-direction: column; align-items: stretch; }
  .cmpform .vs { display: none; }
  .limitem { grid-template-columns: 1fr 76px; }
}


/* 머리말 로고 */
.brand-logo { width: 34px; height: 34px; border-radius: 10px; display: block;
              object-fit: cover; box-shadow: 0 1px 4px rgba(40, 30, 70, .22); }
.brand { gap: 10px; }
@media (max-width: 640px) { .brand-logo { width: 30px; height: 30px; border-radius: 9px; } }

/* 소개 페이지 큰 로고 */
.hero-logo { width: 84px; height: 84px; border-radius: 22px; object-fit: cover;
             box-shadow: 0 6px 20px rgba(40, 30, 70, .28); margin-bottom: 14px; }


/* ───────────────── 상점 ───────────────── */
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
            gap: 14px; margin-bottom: 18px; }
.shopitem { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
            overflow: hidden; display: flex; flex-direction: column; }
.shopitem .thumb { position: relative; aspect-ratio: 1 / 1; background: var(--bg);
                   display: flex; align-items: center; justify-content: center; }
.shopitem .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shopitem .thumb .noimg { font-size: 44px; opacity: .45; }
.shopitem .soldtag { position: absolute; inset: 0; display: flex; align-items: center;
                     justify-content: center; background: rgba(20, 16, 30, .62); color: #fff;
                     font-weight: 800; font-size: 17px; letter-spacing: .04em; }
.shopitem.soldout .body { opacity: .62; }
.shopitem .body { padding: 13px 14px; display: flex; flex-direction: column; flex: 1 1 auto; }
.shopitem .cat { font-size: 11.5px; font-weight: 700; color: var(--dim); }
.shopitem h3 { margin: 3px 0 4px; font-size: 15.5px; line-height: 1.35; }
.shopitem .opt { margin: 0 0 5px; font-size: 13px; font-weight: 700; color: var(--deep); }
.shopitem .sum { margin: 0 0 8px; font-size: 13px; color: var(--dim); line-height: 1.55; }
.shopitem .more { margin: 0 0 8px; }
.shopitem .more .d { margin: 0 0 4px; font-size: 13px; }
.shopitem .foot { margin-top: auto; display: flex; justify-content: space-between;
                  align-items: baseline; gap: 8px; padding-top: 8px; }
.shopitem .pt { font-size: 19px; font-weight: 800; color: var(--deep);
                font-variant-numeric: tabular-nums; }
.shopitem .pt small { font-size: 12px; margin-left: 1px; }
.shopitem .stock { font-size: 12px; color: var(--dim); }
.shopitem .stock.out { color: var(--bad-ink); font-weight: 700; }
.buycmd { display: block; margin-top: 9px; text-align: center; font-size: 12.5px;
          background: var(--bg); border: 1px solid var(--line); padding: 5px 8px; }

/* 관리자 상점 */
.field.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.grid2 > div { min-width: 0; }
.curimg { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.curimg img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover;
              border: 1px solid var(--line); }
.shoprow { display: flex; gap: 12px; align-items: center; padding: 11px 0;
           border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shoprow:last-child { border-bottom: 0; }
.shoprow.off { opacity: .55; }
.shoprow .mini { width: 52px; height: 52px; border-radius: 10px; background: var(--bg);
                 display: flex; align-items: center; justify-content: center;
                 font-size: 22px; overflow: hidden; flex: 0 0 auto; }
.shoprow .mini img { width: 100%; height: 100%; object-fit: cover; }
.shoprow .info { flex: 1 1 200px; min-width: 0; }
.shoprow .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn.danger { background: var(--bad-ink); }

.buyrow { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start;
          padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.buyrow:last-child { border-bottom: 0; }
.buyrow.pending { background: var(--warn-bg); border-radius: 10px; padding: 12px 13px;
                  margin-bottom: 6px; }
.buyrow .info { flex: 1 1 260px; min-width: 0; }
.buyrow .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.buyrow .acts input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
                      background: var(--card); color: var(--ink); font: inherit; font-size: 13px;
                      max-width: 160px; }

@media (max-width: 640px) {
  .field.grid2 { grid-template-columns: 1fr; }
  .shopgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .shopitem h3 { font-size: 14.5px; }
  .buyrow .acts { width: 100%; }
}


/* 지갑·이용권 */
table.grid td.num, table.grid th.num { text-align: right;
                                       font-variant-numeric: tabular-nums; }
table.grid tr.dim { opacity: .55; }


/* 사이트 첫 화면의 갈래 칸 */
.hero-card { text-align: center; }
.hero-card h1 { font-size: 30px; }
.site-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.site-tile {
  display: block; padding: 22px 24px; border-radius: 14px;
  background: var(--bg); border-top: 4px solid var(--violet);
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.site-tile:nth-child(even) { border-top-color: var(--cyan); }
.site-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(91,75,138,.16); }
.site-tile h2 { margin: 0 0 6px; font-size: 18px; color: var(--deep); }
.site-tile p { margin: 0; font-size: 14px; color: var(--dim); line-height: 1.6; }
.site-tile-links {
  display: block; margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 12.5px;
  color: var(--deep); font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .site-tile h2, .site-tile-links { color: #c3b2f0; }
}


/* 화면 안의 작은 탭 */
.subtabs { display: flex; gap: 2px; margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.subtabs a {
  padding: 9px 16px; text-decoration: none; color: var(--dim);
  font-weight: 600; border-bottom: 2px solid transparent; font-size: 15px;
}
.subtabs a.on { color: var(--deep); border-bottom-color: var(--deep); }
@media (prefers-color-scheme: dark) {
  .subtabs a.on { color: #c3b2f0; border-bottom-color: #c3b2f0; }
}


/* ── 여러 곳에서 쓰는 줄맞춤 조각 ───────────────────────────
   원래 매니저(om.css)에만 있었습니다. 그런데 문의 화면과 관리자
   문의함도 같은 모양을 쓰는데, 그 두 곳은 매니저가 아니라서 om.css 를
   읽지 않습니다. 매니저는 이 파일을 먼저 읽으니 여기로 옮겨 뒀습니다.
   이름에 om- 이 남아 있는 것은 쓰는 쪽을 전부 고치는 것보다
   한 군데 옮기는 쪽이 덜 깨지기 때문입니다. */

.om-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.om-bar .grow { flex: 1; min-width: 180px; }

.om-seg { display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 10px; }
.om-seg a {
  padding: 6px 12px; border-radius: 8px; text-decoration: none;
  color: var(--dim); font-size: 14px; font-weight: 600;
}
.om-seg a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.om-feed { display: flex; flex-direction: column; gap: 10px; }
.om-entry {
  display: flex; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--card);
}

.om-entry-body { flex: 1; min-width: 0; }
.om-entry-reason { word-break: break-word; }
.om-entry-meta { font-size: 13px; color: var(--dim); margin-top: 3px; }

.om-person {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.om-person h1 { font-size: 22px; margin: 0; }

.om-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.om-kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; }
.om-kv label { font-size: 14px; color: var(--dim); }
.om-inline-form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  .om-two { grid-template-columns: 1fr; }
  .om-kv { grid-template-columns: 1fr; gap: 4px; }
  .om-kv label { margin-top: 8px; }
}


/* 관리자 단추 위의 숫자. 승인 기다리는 방 + 답 기다리는 문의 */
.chip-n {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 3px;
  border-radius: 99px; background: #fff; color: var(--deep);
  font-size: 12px; font-weight: 800; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 문의함 : 어디에서 왔나 (메르카토르 지도 위의 점)
   지도 그림은 assets/world-mercator.svg 이고, 점 자리는
   bot/src/geoip.php 의 MAP_* 와 mapX/mapY 가 냅니다. 둘 중 하나만
   바꾸면 점이 엉뚱한 데 앉습니다. */
.geo-map {
  position: relative; border-radius: 12px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
}
.geo-map img { display: block; width: 100%; height: auto; }
.geo-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.geo-dot {
  fill: rgba(91, 75, 138, .55); stroke: #5b4b8a; stroke-width: 1.2;
}
.geo-dot.bot { fill: rgba(163, 32, 32, .5); stroke: #a32020; }
.geo-key { margin-left: 10px; white-space: nowrap; }
.geo-chip {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: rgba(91, 75, 138, .55); border: 1px solid #5b4b8a;
  vertical-align: -1px; margin-right: 3px;
}
.geo-chip.bot { background: rgba(163, 32, 32, .5); border-color: #a32020; }
.geo-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.geo-line code { font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .geo-map img { filter: brightness(.72) saturate(.85); }
  .geo-dot { fill: rgba(185, 168, 232, .5); stroke: #b9a8e8; }
  .geo-dot.bot { fill: rgba(240, 160, 160, .45); stroke: #f0a0a0; }
  .geo-chip { background: rgba(185, 168, 232, .5); border-color: #b9a8e8; }
  .geo-chip.bot { background: rgba(240, 160, 160, .45); border-color: #f0a0a0; }
}
