/* =========================================================
   app.css - 부산 맛집 (휴대폰 전용 디자인: 넓은 화면에서도 가운데 480px 기둥)
   ---------------------------------------------------------
   1) 기본·색  2) 머리말  3) 검색·칩·목록 카드  4) 지도 창(아래에서 올라옴)
   5) 폼(요청·관리자 공통)  6) 관리자  7) 방문자 통계(stats.php)
   색: 강조 주황 #d9480f(흰 글자 4.6:1), 글자 #212529, 회색 글자 #5c636a(흰 바탕 6.1:1)
   ========================================================= */

/* 1) 기본·색 */
:root {
    --accent: #d9480f;
    --accent-dark: #b03a0c;
    --ink: #212529;
    --muted: #5c636a;
    --line: #e5e7eb;
    --soft: #fff4ec;
    --bg: #f6f6f4;
    --open: #2b8a3e;
    --closed: #868e96;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0 auto;
    max-width: 480px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
@media (min-width: 481px) {
    html { background: #e9ecef; }
    body { box-shadow: 0 0 24px rgba(0, 0, 0, .08); }
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { padding: 12px 14px 24px; }
.msg { margin: 10px 0; color: var(--muted); text-align: center; }
.empty { list-style: none; padding: 40px 0; text-align: center; color: var(--muted); }
.lead { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }
.req { color: var(--accent); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 18px; border: 0; border-radius: 10px;
    background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:active { background: var(--accent-dark); }
.btn:disabled { opacity: .6; }
.btn-light { background: #f1f3f5; color: var(--ink); }
.btn-light:active { background: #e9ecef; }
.btn-danger { background: #fff; color: #c92a2a; border: 1px solid #f1aeb5; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn-row { display: flex; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.btn-mini {
    min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font-size: 13px; cursor: pointer;
}
.btn-mini.danger { color: #c92a2a; }
.btn-mini:disabled { opacity: .35; }

/* 2) 머리말 */
.top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 8px;
    height: 54px; padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: var(--bg); color: var(--ink);
}
.top h1 { flex: 1; margin: 0; font-family: "Noto Sans KR Title", "Noto Sans KR", sans-serif; font-size: 21px; font-weight: 900; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-mark { display: inline-block; width: 36px; height: 36px; margin-right: 10px; border-radius: 11px; vertical-align: middle; background: #d9480f url(icons/title.svg) center / 21px no-repeat; }
.top-link {
    padding: 6px 12px; border: 1px solid #ced4da; border-radius: 999px;
    background: #fff; color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.top-back { margin-left: -6px; padding: 0 6px; font-size: 30px; line-height: 1; text-decoration: none; color: inherit; }
/* 관리자·통계 휴대폰 화면: 흰 본문 + 검은 제목줄 (일반 화면과 구분) */
body.admin { background: #fff; }
@media (max-width: 340px) { .logo-mark { margin-right: 6px; } .top-link { padding-left: 8px; padding-right: 8px; } }
.top-dark { border-bottom: 0; background: var(--ink); color: #fff; }
.top-dark .top-link { border-color: rgba(255, 255, 255, .7); background: transparent; color: #fff; }

/* 3) 검색·칩·목록 카드 */
.search { display: flex; gap: 6px; }
.search input, .search select, .admin-search {
    height: 44px; border: 1px solid #ced4da; border-radius: 10px; background: #fff; padding: 0 12px;
}
.search input { flex: 1; min-width: 0; }
.search select { flex: none; width: 112px; padding: 0 8px; }
.chips {
    display: flex; gap: 6px; margin: 10px -14px 0; padding: 0 14px 4px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; height: 34px; padding: 0 13px; border: 1px solid #dee2e6; border-radius: 999px;
    background: #fff; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.tools { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 13px; }
.count { flex: 1; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 4px; }
.toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.sort { height: 32px; padding: 0 10px; border: 1px solid #dee2e6; border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; }

.list { margin: 0; padding: 0; list-style: none; }
.card {
    display: flex; gap: 12px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
    background: #fff; cursor: pointer;
}
.card:active { background: #fafafa; }
.card-photo {
    flex: none; width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--soft);
}
.card-photo.none { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.card-body { flex: 1; min-width: 0; }
.card-head { display: flex; align-items: flex-start; gap: 6px; }
.card-name { flex: 1; font-size: 16px; line-height: 1.35; }
.fav { flex: none; margin: -6px -6px 0 0; padding: 4px 6px; border: 0; background: none; font-size: 20px; line-height: 1; color: #adb5bd; cursor: pointer; }
.fav.on { color: #f59f00; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.tag { padding: 1px 7px; border-radius: 4px; background: var(--soft); color: var(--accent-dark); font-weight: 700; }
.dist { color: var(--ink); font-weight: 700; }
.status { font-weight: 700; }
.status.open { color: var(--open); }
.status.before { color: #e67700; }
.status.closed { color: var(--closed); }
.card-menu, .card-desc {
    margin: 4px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc { color: var(--muted); }
.foot { padding: 20px 0 30px; text-align: center; font-size: 12px; }
.foot a { color: #868e96; }

/* 4) 지도 창 */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet-box {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh;
    display: flex; flex-direction: column;
    background: #fff; border-radius: 16px 16px 0 0; overflow: hidden;
    animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translate(-50%, 40px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-close {
    position: absolute; top: 8px; right: 8px; z-index: 5;
    width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .95); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-size: 24px; line-height: 1; cursor: pointer;
}
.map { flex: none; position: relative; width: 100%; height: 240px; background: #e9ecef; }
.map-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--muted); font-size: 14px; }
.sheet-body { overflow-y: auto; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-name {
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 21px; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #ced4da;
}
.naver { padding: 2px 8px; border-radius: 6px; background: #03c75a; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.info { display: grid; grid-template-columns: 64px 1fr; gap: 8px 10px; margin: 14px 0 0; font-size: 14px; }
.info dt { color: var(--muted); font-weight: 700; }
.info dd { margin: 0; min-width: 0; }
.info a { color: var(--accent-dark); font-weight: 700; }
.pre { white-space: pre-line; }
.hours-line b { display: inline-block; min-width: 46px; font-weight: 700; }
.hours-note { color: var(--muted); font-size: 13px; }
.sheet-photo { display: block; width: 100%; margin-top: 14px; border-radius: 10px; }

/* 5) 폼 */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 700; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea, .cat-add input {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 10px; background: #fff;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #ffc9a8; border-color: var(--accent); }
.help { color: var(--muted); font-size: 12.5px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hours-edit { display: flex; flex-direction: column; gap: 6px; }
.hours-row { display: flex; align-items: center; gap: 5px; }
.hours-day { width: 20px; font-weight: 700; }
.hours-row input[type=time] {
    flex: 1; min-width: 0; height: 40px; padding: 0 6px; border: 1px solid #ced4da; border-radius: 8px; background: #fff;
}
.hours-row input[type=time]:disabled { background: #f1f3f5; color: #adb5bd; }
.hours-off { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 13px; }
.hours-off input, .check-line input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.hours-edit .btn-mini { align-self: flex-start; margin-top: 2px; }
.check-line { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff5f5; color: #c92a2a; font-size: 14px; }
.flash { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #ebfbee; color: #2b8a3e; font-size: 14px; }
.done { padding: 40px 0; text-align: center; }
.done-icon { font-size: 44px; margin: 0; }
.done .btn { display: flex; margin: 10px auto 0; width: 100%; }

/* 6) 관리자 */
.login { margin-top: 30px; }
.login h2, .edit-title { margin: 6px 0 4px; font-size: 20px; }
.tabs { display: flex; gap: 4px; margin: 0 -14px 12px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.tab {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: 44px; border: 0; border-bottom: 3px solid transparent; background: none;
    font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.badge { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
.admin-search { width: 100%; margin-top: 10px; }
.admin-list { margin: 8px 0 0; padding: 0; list-style: none; }
.admin-item { display: flex; align-items: center; gap: 8px; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.admin-item-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-item.hidden-item b { color: #adb5bd; }
.sub { color: var(--muted); font-size: 13px; }
.warn { color: #e67700; font-size: 12.5px; font-weight: 700; }
.chev { color: #adb5bd; font-size: 22px; }
.note, .loc { margin: 0; padding: 10px 12px; border-radius: 10px; background: #f8f9fa; color: var(--muted); font-size: 13px; }
.admin-photo { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.photo-link { display: flex; gap: 8px; }
.photo-link input { flex: 1; min-width: 0; }
.photo-link .btn { flex: none; }
.req-card { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.req-card.is-done { opacity: .6; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; }
.pill { flex: none; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.new { background: var(--accent); color: #fff; }
.pill.done { background: #e9ecef; color: var(--muted); }
.req-card .info { margin-top: 8px; }
.cat-list { margin: 0; padding: 0; list-style: none; }
.cat-item { display: flex; align-items: center; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-name { flex: 1; min-width: 0; font-weight: 700; }
.cat-name small { color: var(--muted); font-weight: 400; }
.cat-add { display: flex; gap: 8px; margin-top: 14px; }
.cat-add input { flex: 1; min-width: 0; }

/* 7) 방문자 통계 */
.vs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vs-card { display: flex; flex-direction: column; gap: 1px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.vs-card:last-child { grid-column: 1 / -1; }
.vs-label { font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.vs-label small { color: var(--muted); font-weight: 400; }
.vs-num { font-size: 26px; line-height: 1.2; }
.vs-num small { margin-left: 2px; font-size: 13px; }
.vs-views, .vs-compare { color: var(--muted); font-size: 12.5px; }
.vs-help { margin: 12px 0; color: var(--muted); font-size: 13px; }
.vs-box { margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.vs-box h2 { margin: 0 0 10px; font-size: 15px; }
.vs-box h2 small { color: var(--muted); font-size: 12px; font-weight: 400; }
.vs-scroll { overflow-x: auto; }
.vs-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.vs-chart.daily { min-width: 600px; }
.vs-chart.weekly, .vs-chart.monthly { min-width: 440px; }   /* 12칸 날짜 글자가 겹치지 않게 (좁으면 가로 스크롤) */
.vs-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.vs-val { height: 16px; font-size: 10px; color: var(--muted); }
.vs-track { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.vs-bar { width: 100%; border-radius: 3px 3px 0 0; background: #ffc9a8; }
.vs-bar.peak { background: var(--accent); }
.vs-day { margin-top: 3px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.vs-sub { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.vs-note { margin: 8px 0 0; font-size: 13px; }

/* =========================================================
   관리자 PC 화면 (1024px 이상, body.pc 는 admin.js 가 붙임)
   · 메인 사이트 관리자와 같은 틀: 상단 메뉴 + 대시보드 + 표. 휴대폰 화면은 위 규칙 그대로
   · 파일 맨 끝 유지 (앞의 규칙을 덮어씀)
   ========================================================= */
body.pc { max-width: none; background: var(--bg); box-shadow: none; }
body.pc .top { display: none; }
body.pc .wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
body.pc .form { max-width: 720px; margin: 0 auto; padding: 24px; border-radius: 12px; background: #fff; }
body.pc .edit-title, body.pc .wrap > .note { max-width: 720px; margin-left: auto; margin-right: auto; }
.pc-body .form { max-width: 460px !important; margin: 0 !important; }

.pc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px 30px; min-height: 66px; padding: 10px 30px; background: var(--ink); color: #fff; }
.pc-logo { flex: none; color: #fff; text-decoration: none; letter-spacing: .5px; white-space: nowrap; }
.pc-topbar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 22px; }
.pc-topbar nav a, .pc-topbar nav button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #dee2e6; font-size: 14px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.pc-topbar nav a:hover, .pc-topbar nav a.on, .pc-topbar nav button:hover, .pc-topbar nav button.on { color: #ffb48a; }

.pc-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.pc-title h2 { margin: 0; font-size: 26px; line-height: 1.25; }
.pc-home-link { flex: none; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }
.pc-home-link:hover { background: var(--accent); color: #fff; }

.pc-top-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.pc-visit-band { display: grid; grid-template-columns: repeat(3, 1fr); padding: 22px 0; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; }
.pc-visit-band span { display: flex; flex-direction: column; gap: 2px; padding: 0 24px; border-left: 1px solid rgba(255, 255, 255, .15); }
.pc-visit-band span:first-child { border-left: 0; }
.pc-visit-band small { color: #adb5bd; font-size: 12px; }
.pc-visit-band b { font-size: 28px; font-weight: 600; line-height: 1.2; }
.pc-visit-band .link b { color: #ffb48a; font-size: 18px; line-height: 34px; }
.pc-member-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 16px 20px; border: 0; border-radius: 12px; background: var(--ink); color: #adb5bd; text-align: left; cursor: pointer; }
.pc-member-card small { font-size: 12px; }
.pc-member-card strong { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.2; }
.pc-member-card span { font-size: 13px; }
.pc-member-card.is-on strong { color: #ffb48a; }

.pc-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.pc-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.pc-stat:hover { border-color: var(--accent); }
.pc-stat span { color: var(--muted); font-size: 14px; }
.pc-stat strong { font-size: 26px; line-height: 1.25; }
.pc-stat small { color: var(--muted); font-size: 12px; }

.pc-sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.pc-sub-head h3 { margin: 0; font-size: 17px; }
.pc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.pc-filters input, .pc-filters select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.pc-filters input { flex: 1 1 220px; min-width: 180px; }
.pc-filters .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.pc-filters .btn { height: 38px; padding: 0 16px; font-size: 14px; }
.pc-filters .btn-mini.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }

.pc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pc-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.pc-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); background: #f8f9fa; color: var(--muted); font-size: 13px; text-align: left; white-space: nowrap; }
.pc-table td { padding: 10px 12px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; overflow-wrap: anywhere; }
.pc-table tbody tr:last-child td { border-bottom: 0; }
.pc-table tr.is-hidden td { color: #868e96; }
.pc-table tr.detail td { background: #f8f9fa; }
.pc-table th:last-child, .pc-table td.acts { text-align: right; }
.pc-table td.acts { white-space: nowrap; }
.pc-table td.acts .btn-mini + .btn-mini { margin-left: 4px; }
.pc-table td.empty { padding: 28px 0; text-align: center; }
.pc-table .warn { display: block; color: #c92a2a; font-size: 12px; }
.pc-table .pill { border: 0; cursor: default; white-space: nowrap; }
.pc-table button.pill { cursor: pointer; }
.link-btn { padding: 0; border: 0; background: none; font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pill.rejected { background: #ffe3e3; color: #c92a2a; }

/* 칸 폭 (관리 칸은 버튼 수에 맞춰 고정, 남는 폭은 주소) */
.t-places th:nth-child(1) { width: 16%; }
.t-places th:nth-child(2) { width: 96px; }
.t-places th:nth-child(3) { width: 84px; }
.t-places th:nth-child(4) { width: 128px; }
.t-places th:nth-child(6) { width: 70px; }
.t-places th:nth-child(7) { width: 108px; }
.t-places th:nth-child(8) { width: 84px; }
.t-places th:nth-child(9) { width: 128px; }
.t-requests th:nth-child(1) { width: 108px; }
.t-requests th:nth-child(2) { width: 15%; }
.t-requests th:nth-child(3) { width: 96px; }
.t-requests th:nth-child(5) { width: 128px; }
.t-requests th:nth-child(6) { width: 84px; }
.t-requests th:nth-child(7) { width: 76px; }
.t-requests th:nth-child(8) { width: 84px; }
.t-requests th:nth-child(9) { width: 182px; }
.t-wait th:nth-child(1) { width: 130px; }
.t-wait th:nth-child(5) { width: 130px; }
.t-members th:nth-child(1) { width: 84px; }
.t-members th:nth-child(4) { width: 130px; }
.t-members th:nth-child(5) { width: 112px; }
.t-members th:nth-child(6) { width: 80px; }
.t-members th:nth-child(7), .t-members th:nth-child(8) { width: 108px; }
.t-members th:nth-child(9) { width: 240px; }

.pc-join { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pc-join code { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

/* 관리자 화면을 여는 순간: admin.js 가 자료를 받아 body.pc 를 붙이기 전에도 PC 틀 유지 (로그인한 경우만, admin.php) */
@media (min-width: 1024px) {
    body.pc-start { max-width: none; background: var(--bg); box-shadow: none; }
    body.pc-start .top { display: none; }
    body.pc-start .wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
}
@media (max-width: 1023.98px) {
    body.pc-start #pcTop { display: none; }
}

/* 통계 화면 PC (메인 사이트 통계와 같은 배치. 휴대폰은 7) 방문자 통계 그대로) */
.pc-only { display: none; }
@media (min-width: 1024px) {
    .stats-page .pc-only { display: block; }
    .stats-page .top { display: none; }
    body.stats-page { max-width: none; background: var(--bg); box-shadow: none; }
    .stats-page .wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
    .stats-page .vs-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .stats-page .vs-card { padding: 18px 14px 14px; background: #fff; text-align: center; }
    .stats-page .vs-card:last-child { grid-column: auto; }
    .stats-page .vs-box { margin-bottom: 14px; padding: 18px; background: #fff; }
    .stats-page .vs-chart { gap: 4px; height: 190px; }
    .stats-page .vs-chart.daily, .stats-page .vs-chart.weekly, .stats-page .vs-chart.monthly { min-width: 0; }
    .stats-page .vs-val { white-space: nowrap; }
}
/* 요일·주·월 3칸은 폭이 충분할 때만 (좁으면 세로로 쌓음) */
@media (min-width: 1200px) {
    .vs-chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .vs-chart-grid .vs-box { min-width: 0; margin-bottom: 0; }
    .vs-chart-grid .vs-scroll { overflow: hidden; }
    .vs-chart-grid .vs-val { font-size: 9.5px; letter-spacing: -.2px; }
}

/* 안내 문구의 문장 덩어리: 한 줄에 들어가면 한 줄, 넘치면 문장 끝에서 나뉨 (STANDARD 9-9) */
.sent { display: inline-block; max-width: 100%; }
