/* 비령 소통 공간 — 16bit UI, 독립 REST 백엔드 */
/* 구역 선택 효과가 그리드 정렬을 흔들지 않도록 이동 효과 제거 */
.zone-card:is(:hover,:focus-visible){transform:none;filter:brightness(1.09)}
.zone-card.is-selected{transform:none;outline:2px solid #caad74;outline-offset:-1px;box-shadow:inset 0 0 0 3px #08111b,0 4px 0 #030912}
.central-sigil{background:#e6b958;border-color:#fff0bf;box-shadow:0 0 0 4px #0a1624,0 0 0 6px #526579;width:32px;height:32px;display:block}
.central-sigil::before,.central-sigil::after{content:none!important}
.map-legend{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;align-items:center;padding:15px 2px 10px;line-height:1.45;text-align:center;border-bottom:1px solid #364658}
.map-legend span{display:block;white-space:nowrap;letter-spacing:0}
.community-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:12px 0 1px}
.community-shortcuts button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:43px;border:1px solid #846f52;background:#132536;color:#eee1c2;box-shadow:inset 0 0 0 3px #091521,0 3px 0 #040910;padding:7px 5px;font-size:12px;font-weight:700;white-space:nowrap;transition:border-color .16s,background .16s}
.community-shortcuts button:hover,.community-shortcuts button:focus-visible{background:#2b3944;border-color:#ebc580}
.shortcut-mark{color:#dbb776;font:16px var(--pixel)}
.community-shortcuts small{font:9px var(--pixel);color:#91acb1}
.community-dialog,.community-profile-dialog{border:2px solid #ae9465;background:#0a1725;color:#ede1c8;padding:0;box-shadow:0 0 0 5px #07101a,0 20px 70px #030711f0;max-width:calc(100vw - 20px)}
.community-dialog{width:min(960px,calc(100vw - 20px));height:min(850px,calc(100dvh - 26px));max-height:calc(100dvh - 26px)}
.community-profile-dialog{width:min(650px,calc(100vw - 22px));max-height:calc(100dvh - 22px);overflow:auto}
.community-dialog::backdrop,.community-profile-dialog::backdrop{background:#030914d9;backdrop-filter:blur(3px)}
.community-window{height:100%;display:flex;flex-direction:column;min-height:0}
.community-window-head{padding:17px 22px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #687257;background:linear-gradient(90deg,#152d3c,#111b29)}
.community-overline{font:9px var(--pixel);letter-spacing:.12em;color:#9fbaa5}
.community-window-head h2{margin:5px 0 0;font-size:22px;letter-spacing:.1em}
.community-close,.community-profile-head button{width:34px;height:34px;flex:none;border:1px solid #806e53;color:#f1d5a5;background:#172939}
.community-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#09131f;border-bottom:1px solid #4a5d63}
.community-tabs button{border:0;border-right:1px solid #374b5a;color:#9eb5ba;background:transparent;padding:13px 5px;font-size:12px}
.community-tabs button[aria-selected=true]{color:#f5dfaf;background:#243a46;box-shadow:inset 0 -3px #dfb76e}
.community-account{min-height:57px;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:9px 20px;border-bottom:1px solid #273c4b;background:#101e2d;font-size:12px}
.community-account .account-left{display:flex;align-items:center;gap:10px;min-width:0}
.community-account .account-identity{display:flex;flex-direction:column;gap:2px;min-width:0}.account-identity small{color:#90aab1;font:10px var(--pixel)}
.community-account button,.community-mini-btn,.community-primary,.community-secondary,.community-load-more,.community-back{border:1px solid #9d835a;background:#253a45;color:#f4e0b6;padding:8px 12px;font-size:12px}
.community-account button:hover,.community-mini-btn:hover,.community-primary:hover,.community-secondary:hover,.community-load-more:hover,.community-back:hover{background:#344e57}
.community-primary{background:#85623b;border-color:#d3ad76;color:#fff8e3;font-weight:700}
.community-feedback{margin:0;padding:8px 20px;color:#f6d3a6;background:#43332f;border-bottom:1px solid #875c4c;font-size:12px}
.community-content{padding:20px;min-height:0;overflow-y:auto;flex:1;scrollbar-color:#5d6870 #0b1723}
.community-intro{margin:0 0 14px;color:#a7bfc0;font-size:12px;line-height:1.8}
.community-form,.community-auth-form{display:flex;flex-direction:column;gap:10px}
.community-form textarea,.community-form input,.community-auth-form input,.community-auth-form textarea,.community-form select,.community-auth-form select,.community-search-input{background:#091723;border:1px solid #536b76;color:#eee8d9;border-radius:0;padding:10px 11px;min-width:0;width:100%;font:13px/1.6 var(--serif)}
.community-form textarea,.community-auth-form textarea{resize:vertical;min-height:83px}
.community-form label,.community-auth-form label{font-size:12px;color:#d5c39f;display:flex;flex-direction:column;gap:5px}
.community-form .compose-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.community-counter{font:10px var(--pixel);color:#94aeb1}
.community-auth-layout{max-width:435px;margin:6px auto;display:flex;flex-direction:column;gap:16px}
.community-auth-toggle{display:flex;gap:8px}.community-auth-toggle button{flex:1;border:1px solid #6f6f61;background:#152635;padding:10px;color:#a2b3b5}.community-auth-toggle button.active{background:#34464b;color:#f0d5a5;border-color:#d9b97d}
.community-card{background:#101e2b;border:1px solid #445967;padding:15px;margin-bottom:11px;box-shadow:inset 0 0 0 3px #0b1621}
.community-card-head{display:flex;align-items:center;gap:10px;margin-bottom:11px}.community-author{background:none;border:0;padding:0;color:#f1d5a6;text-align:left;display:flex;flex-direction:column;gap:3px;font-size:12px}.community-author small,.community-time{color:#8ca6ab;font:10px var(--pixel)}
.community-time{margin-left:auto;text-align:right}.community-avatar{width:39px;height:39px;flex:none;display:grid;place-items:center;background:#0e2333;border:2px solid var(--avatar-accent,#d4b078);color:var(--avatar-accent,#d4b078);font-size:19px;font-weight:700}
.community-card-body{font-size:13px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;color:#e0ddce;margin:5px 0 0}
.community-card-title{font-size:17px;margin:4px 0 6px;color:#f5e2ba}
.community-card-meta{display:flex;align-items:center;justify-content:space-between;margin-top:13px;padding-top:9px;border-top:1px dashed #3c4f5b;color:#9cb3ad;font-size:11px}
.community-stack-title{font-size:15px;color:#e4c38a;margin:19px 0 12px;border-bottom:1px solid #50606b;padding-bottom:8px}
.community-empty{padding:28px 16px;text-align:center;border:1px dashed #405968;color:#8ca8ac;font-size:13px;line-height:1.9}
.community-load-more{width:100%;margin:5px 0 18px;background:#132735}
.community-thread-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:5px 0 14px}
.community-thread-head h3{font-size:18px;margin:0}
.community-comment{border-left:2px solid #4b6871;margin:8px 0 8px calc(min(var(--indent,0),3)*18px);padding:9px 12px;background:#0e202e;overflow-wrap:anywhere}
.community-comment .community-card-head{margin-bottom:7px}.community-comment .community-avatar{width:30px;height:30px;font-size:15px}.community-comment .community-card-body{font-size:12px}
.community-comment form{margin-top:10px}.community-comments-toolbar{display:flex;gap:8px;align-items:center;margin-top:10px}
.community-dm-layout{display:grid;grid-template-columns:minmax(200px,33%) minmax(0,1fr);gap:14px;min-height:475px}
.community-dm-sidebar{border:1px solid #3c5462;background:#0e1c2b;padding:12px;display:flex;flex-direction:column;min-height:0}
.community-dm-sidebar h3{margin:0 0 12px;font-size:14px;color:#dbb979}.community-dm-search{display:flex;gap:5px;margin-bottom:9px}.community-dm-search button{padding:6px 10px;border:1px solid #a98b60;color:#e8d2a6;background:#29404a}
.community-dm-search input{min-width:0;background:#07131e;border:1px solid #4b626b;color:#f1e1c6;padding:7px;flex:1;width:40px}
.community-dm-list{overflow:auto;flex:1;min-height:80px}.community-dm-item{display:block;width:100%;text-align:left;padding:10px 8px;border:1px solid #314754;border-bottom:0;background:#142837;color:#f3e5c6;font-size:12px}.community-dm-item[aria-current=true]{background:#2b4851;border-color:#caa56c}.community-dm-item:last-child{border-bottom:1px solid #314754}.community-dm-item small{display:block;color:#90aab0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px;font-size:11px}
.community-dm-search-results{margin:0 0 10px;max-height:145px;overflow:auto}.community-dm-chat{display:flex;flex-direction:column;border:1px solid #496171;background:#081522;min-height:430px}
.community-dm-chat-head{padding:12px 14px;color:#e9d6aa;border-bottom:1px solid #344b5b;font-size:13px}
.community-dm-messages{display:flex;flex-direction:column;gap:10px;flex:1;overflow:auto;min-height:280px;max-height:410px;padding:16px 12px;overscroll-behavior:contain}
.community-bubble{align-self:flex-start;max-width:85%;background:#263847;border:1px solid #617787;color:#f2e6d0;padding:10px 12px;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.community-bubble.mine{align-self:flex-end;background:#4e4936;border-color:#ab9164}.community-bubble small{display:block;font:9px var(--pixel);color:#bac6bc;margin-top:6px}
.community-dm-send{padding:10px;border-top:1px solid #344b5b;display:flex;gap:6px}.community-dm-send input{background:#0b1c2a;border:1px solid #506b76;color:#f1e9d7;min-width:0;flex:1;padding:9px}.community-dm-send button{border:1px solid #b89968;color:#fff0cd;background:#644d30;padding:8px 15px}
.community-warning{color:#d7b68a;font-size:11px;line-height:1.8;margin:8px 0 0}
.community-profile-head{display:flex;align-items:center;justify-content:space-between;padding:14px 19px;border-bottom:1px solid #725f46}.community-profile-head h2{margin:0;font-size:18px}
.community-profile-content{padding:19px;max-height:calc(100dvh - 112px);overflow:auto}.community-profile-banner{height:62px;background:linear-gradient(120deg,var(--profile-accent,#d4b078),#142737 70%);border:1px solid #6c7b78;margin-bottom:14px}
.community-profile-title{display:flex;align-items:center;gap:11px}.community-profile-title h3{margin:0 0 4px;font-size:18px}.community-profile-title p{margin:0;font:11px var(--pixel);color:#8fa9b2}.community-profile-bio{font-size:13px;white-space:pre-wrap;line-height:1.8;color:#b9c7c3}
.community-editor{max-width:510px}.community-editor .community-form{margin-top:16px}
@media(max-width:780px){.community-shortcuts small{display:none}.community-shortcuts{gap:6px}.community-shortcuts button{gap:4px;font-size:11px}.community-dialog{height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.community-content{padding:13px}.community-window-head{padding:12px 15px}.community-account{padding:9px 13px}.community-dm-layout{grid-template-columns:1fr;min-height:0}.community-dm-sidebar{max-height:205px}.community-dm-chat{min-height:360px}}
@media(max-width:480px){.community-shortcuts button{font-size:10px;min-height:44px}.shortcut-mark{font-size:13px}.map-legend{font-size:8px}.community-tabs button{font-size:10px;padding:12px 2px}.community-window-head h2{font-size:18px}.community-account{flex-wrap:wrap}.community-card{padding:11px}.community-time{font-size:9px}}
/* v1.9 서버 연결: 칭호 · 안 읽은 밀담 · 지우기 */
.community-chat-title{flex:none;padding:1px 7px;border:1px solid #d4b078;color:#f2d24a;font-size:11px;letter-spacing:.04em}
.community-erase{margin-left:6px;border-color:#7a4a48 !important;color:#e2b3ae !important;background:#2a1d1f !important}
[data-community][data-unread],[data-community-tab][data-unread]{position:relative}
[data-community][data-unread]::after,[data-community-tab][data-unread]::after{content:attr(data-unread);position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;background:#b8403a;color:#fff;font:11px 'Galmuri9',sans-serif;border:1px solid #0e1928}
.community-dm-item[data-unread]{border-left:3px solid #b8403a}

/* vC.06 접속자 확인하기 · 선물 · 도깨비들의 터 */
.party-dialog.party-small{width:min(560px,calc(100vw - 20px));height:auto;max-height:calc(100dvh - 26px)}
.party-dialog.party-small .community-window{height:auto}
.party-body{display:flex;flex-direction:column;gap:10px;overflow:auto}
.online-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.online-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #687257;background:#0f1d2b}
.online-row.is-me{border-color:#d4b07899}
.online-avatar{display:grid;place-items:center;width:30px;height:30px;border:1px solid #687257;font-size:15px;flex:none}
.online-who{flex:1;min-width:0;display:flex;flex-direction:column}.online-who b{font-size:13px;color:#f1e4c3}.online-who small{font-size:11px;color:#a0b2b3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.online-acts{display:flex;gap:6px;flex:none}.online-me{font-size:11px;color:#d4b078}
.gift-row{display:flex;align-items:center;gap:10px;font-size:13px}.gift-row>span{width:52px;color:#a0b2b3;flex:none}
.gift-select,.gift-num,.gift-note{flex:1;min-width:0;padding:7px 8px;background:#0a1420;border:1px solid #687257;color:#efe6ce;font:inherit}
.gift-send{align-self:flex-end}
.invite-stack{position:fixed;right:14px;bottom:14px;z-index:90;display:flex;flex-direction:column;gap:8px;max-width:min(330px,calc(100vw - 28px))}
.invite-card{padding:12px;border:1px solid #d4b078;background:#101e2e;box-shadow:0 6px 18px #000a;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.invite-card p{margin:0 0 4px;width:100%;font-size:13px;color:#f1e4c3}
.party-room-head{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#d4b078;flex-wrap:wrap}
.party-log{list-style:none;margin:0;padding:10px;flex:1;min-height:240px;max-height:52dvh;overflow:auto;border:1px solid #687257;background:#08121d;display:flex;flex-direction:column;gap:6px}
.party-log.is-read{max-height:64dvh}
.party-msg{font-size:13px;line-height:1.5;color:#e7ddc4;display:flex;flex-wrap:wrap;gap:6px;align-items:baseline}
.party-msg b{color:#8fbaff}.party-msg.is-me b{color:#d4b078}.party-msg time{font-size:10px;color:#71818a;margin-left:auto}
.party-msg.is-notice{color:#d4b078cc;font-size:12px;font-style:italic}
.party-form{display:flex;gap:8px}.party-form input{flex:1;min-width:0;padding:9px;background:#0a1420;border:1px solid #687257;color:#efe6ce;font:inherit}
.party-dates{display:flex;flex-wrap:wrap;gap:6px}
.party-rooms{display:flex;flex-direction:column;gap:6px}
.party-room-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 11px;border:1px solid #687257;background:#0f1d2b;color:#efe6ce;text-align:left}
.party-room-row:hover{border-color:#d4b078}.party-room-row small{font-size:11px;color:#a0b2b3}
[data-party-open][data-unread]::after{content:attr(data-unread);margin-left:4px;padding:0 5px;border-radius:9px;background:#d56b69;color:#fff;font-size:10px}
.page-party[hidden]{display:none}
.party-dialog.party-small{height:fit-content !important;max-height:calc(100dvh - 26px);overflow:auto}

/* vC.06 접속자 이름 → 프로필 카드 */
.online-who{background:none;border:0;padding:0;text-align:left;color:inherit;font:inherit;cursor:pointer}
.online-who:hover b,.online-who:focus-visible b{text-decoration:underline;color:#fff3d6}
.pcard-top{display:flex;gap:14px;align-items:center}
.pcard-photo{width:96px;height:96px;flex:none;border:2px solid #c9a961;background:#0b1522;display:grid;place-items:center;overflow:hidden}
.pcard-photo img{width:100%;height:100%;object-fit:cover}.pcard-photo span{font-size:34px;color:#e8d3a4}
.pcard-info{display:flex;flex-direction:column;gap:3px}.pcard-info b{font-size:18px;color:#f1e4c3}.pcard-info small{font-size:11px;color:#a0b2b3}.pcard-title{font-size:12px;color:#d4b078}
.pcard-fields{display:grid;grid-template-columns:72px 1fr;gap:6px 10px;margin:4px 0 0;font-size:13px}.pcard-fields dt{color:#a0b2b3}.pcard-fields dd{margin:0;color:#efe6ce;white-space:pre-wrap}
/* vD.01 도깨비들의 터: 화면을 덮지 않는 옆 창(전투와 같이 본다) — 머리를 끌어 옮기고, 모서리로 크기를 바꾸고, 접는다 */
.party-dialog.party-dock{position:fixed;inset:auto 16px 16px auto;margin:0;width:min(400px,calc(100vw - 24px));height:min(560px,calc(100dvh - 90px));z-index:3000;resize:both;overflow:hidden;min-width:280px;min-height:150px;max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
.party-dock .community-window-head{cursor:move;user-select:none;touch-action:none;padding:10px 14px}
.party-dock .community-window-head h2{font-size:17px}
.party-dock .party-body{flex:1;min-height:0}
.party-dock .party-log{min-height:120px;max-height:none}
.party-dock-tools{display:flex;gap:6px;margin-left:auto}
.party-dock-tools .ghost-btn{font-size:11px;padding:4px 8px;white-space:nowrap}
.party-dock.is-min{height:auto !important;min-height:0;resize:none}
.party-dock.is-min .community-tabs,.party-dock.is-min .party-body{display:none}
@media(max-width:600px){.party-dialog.party-dock{inset:auto 6px 6px 6px;width:auto;height:min(420px,60dvh)}.party-sound{font-size:0 !important}.party-sound::first-letter{font-size:13px}}
/* vD.01 우편함 */
.community-mail-list{display:flex;flex-direction:column;gap:10px}
.mail-card .mail-head{display:flex;justify-content:space-between;gap:8px;align-items:baseline;color:#e9cf98}
.mail-card .mail-head time{font-size:11px;color:#8fa3a6}
.mail-card .mail-note{margin:6px 0 0;color:#cbbf9f;font-size:13px}
.mail-card .mail-state{display:block;margin-top:6px;color:#7f9798;font-size:11px}
/* vD.02 알림 카드는 맨 위 층 · 일행 대화 옆 창(오른쪽 아래)과 겹치지 않게 오른쪽 위 */
.invite-stack{inset:72px 14px auto auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;z-index:2147483001}
.invite-stack:not(:popover-open){display:none}
.invite-stack:popover-open{display:flex}
.party-leader-tag{margin-left:4px;padding:0 5px;border:1px solid #d4b07899;border-radius:8px;color:#f3d79e;font-size:10px;font-weight:normal}

/* vD.02.3 팝업 공지 */
.popup-notice{border:0;padding:0;background:transparent;max-width:min(440px,92vw);z-index:2147483002}
.popup-notice::backdrop{background:rgba(3,7,16,.66)}
.popup-notice-box{background:#0d1a2b;border:2px solid #c9a961;border-radius:14px;padding:20px 22px;color:#efe6ce;box-shadow:0 18px 60px rgba(0,0,0,.6);text-align:center}
.popup-notice-over{margin:0;font-size:11px;letter-spacing:.3em;color:#c9a961}
.popup-notice h2{margin:6px 0 10px;font-size:20px;color:#f2d24a}
.popup-notice-body{margin:0 0 16px;white-space:pre-wrap;line-height:1.7;font-size:15px}
.popup-notice-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
