/* ============================================================================
   큐피드 공개방 — 메인 카드 배지/안내 버튼, 입장 시트, 방 채팅 UI, 프로필 사진
   로드 순서: style.css → freetalk.css → room.css
   z-index: 입장 시트 1900 < group-modal/crop-modal 2000 < custom-alert 9999
   ============================================================================ */

.character-card[hidden] { display: none !important; }

/* ── 메인 카드: 공개방 리본 + 안내(i) ── */
.character-card__room-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #d6335c, #8f1d43);
    border: 1px solid rgba(255, 220, 232, 0.5);
    color: #ffe3ec;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.character-card__multi-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.2rem 0.52rem 0.2rem 0.42rem;
    border-radius: 999px;
    background: rgba(20, 14, 22, 0.62);
    border: 1px solid rgba(255, 170, 200, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffe3ec;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
.character-card__multi-icon { width: 0.82rem; height: 0.82rem; flex: none; }
@media (max-width: 480px) {
    .character-card__multi-badge { top: 0.35rem; right: 0.35rem; padding: 0.16rem 0.42rem 0.16rem 0.34rem; font-size: 0.62rem; }
    .character-card__multi-icon { width: 0.74rem; height: 0.74rem; }
}

.character-card__room-info {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    z-index: 5;
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(8, 2, 6, 0.72);
    border: 1px solid rgba(255, 229, 173, 0.6);
    color: #ffe5ad;
    font: italic 800 0.95rem/1 Georgia, 'Times New Roman', serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.character-card__room-count {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: calc(100% - 1rem);
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    background: rgba(8, 2, 6, 0.74);
    border: 1px solid rgba(255, 229, 173, 0.35);
    color: #fff3d6;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.character-card__room-count[hidden] { display: none !important; }
.character-card__room-count-dot {
    flex: none;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #4be38b;
    box-shadow: 0 0 6px rgba(75, 227, 139, 0.8);
}
.character-card__room-count.is-quiet { color: rgba(255, 243, 214, 0.78); }
.character-card__room-count.is-quiet .character-card__room-count-dot { background: #a6a0b3; box-shadow: none; }
.character-card__room-count-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
@media (orientation: landscape) and (max-height: 500px) {
    .character-card--room .character-card__info {
        padding-bottom: 0.2rem;
    }
    .character-card__room-count {
        top: 0.2rem;
        left: 0.2rem;
        padding: 0.06rem 0.3rem;
        font-size: 0.56rem;
        line-height: 1;
    }
}

.character-card__room-info:hover,
.character-card__room-info:focus-visible {
    background: #ffe5ad;
    color: #2a0b16;
    outline: 2px solid #fff;
    outline-offset: 2px;
}
/* 터치 영역은 눈에 보이는 크기보다 넓게 */
.character-card__room-info::after { content: ''; position: absolute; inset: -0.35rem; }

.character-card__room-notice {
    display: block;
    color: #ffd2e0;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.profile__room-notice {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(214, 51, 92, 0.14);
    border: 1px solid rgba(214, 51, 92, 0.4);
    color: #ffd2e0;
    font-size: 0.82rem;
    line-height: 1.5;
}
.profile__room-notice[hidden] { display: none; }

/* 안내 팝업(커스텀 알림 안) */
.room-help { text-align: left; font-size: 0.86rem; line-height: 1.6; }
.room-help ul { margin: 0; padding-left: 1.1rem; }
.room-help li { margin: 0.3rem 0; }

/* ── 입장 시트 ── */
.room-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1900;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.66);
    padding: env(safe-area-inset-top, 0) 0 0;
}
.room-sheet {
    width: min(100%, 460px);
    max-height: 92dvh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, #1d0a13, #100409);
    border: 1px solid rgba(230, 190, 96, 0.22);
    color: var(--text-main, #f0e6e9);
}
@media (min-width: 640px) {
    .room-sheet-overlay { align-items: center; }
    .room-sheet { border-radius: 18px; }
}
.room-sheet__title { margin: 0 0 0.4rem; font-size: 1.1rem; }
.room-sheet__lead { margin: 0 0 0.8rem; color: var(--text-muted, #a38d97); font-size: 0.85rem; line-height: 1.5; }
.room-sheet__rows { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 0.8rem; margin: 0 0 0.8rem; font-size: 0.86rem; }
.room-sheet__rows dt { color: var(--text-muted, #a38d97); }
.room-sheet__rows dd { margin: 0; overflow-wrap: anywhere; }
.room-sheet__photo { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.4rem; }
.room-sheet__photo-img {
    display: inline-block;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(214, 51, 92, 0.18) center/cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    flex: 0 0 56px;
}
.room-sheet__photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room-sheet__hint { margin: 0 0 0.5rem; color: #ffb3c6; font-size: 0.82rem; }
.room-sheet__hint[hidden] { display: none; }
.room-sheet__notice { margin: 0 0 0.5rem; color: rgba(246, 235, 239, 0.8); font-size: 0.8rem; line-height: 1.5; }
.room-sheet__status { min-height: 1.1em; margin: 0 0 0.6rem; color: var(--accent, #e6be60); font-size: 0.8rem; }
.room-sheet__actions { display: flex; gap: 0.5rem; }
.room-sheet__btn {
    flex: 1;
    min-height: 44px;
    padding: 0 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    color: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}
.room-sheet__btn--primary { background: linear-gradient(135deg, #d6335c, #9a2349); border-color: rgba(255, 220, 232, 0.4); font-weight: 800; }
.room-sheet__btn:disabled { opacity: 0.45; cursor: not-allowed; }
.room-sheet__photo .room-sheet__btn { flex: 0 0 auto; }

/* ── 설정 모달: 프로필 사진 ── */
.settings-photo { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.settings-photo[hidden] { display: none; }
.settings-photo__label { font-size: 0.85rem; color: var(--text-muted); }
.settings-photo__row { display: flex; align-items: center; gap: 12px; }
.settings-photo__preview {
    display: inline-block; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%;
    background: rgba(214, 51, 92, 0.18); border: 1px solid rgba(255, 255, 255, 0.18); overflow: hidden;
}
.settings-photo__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-photo__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-photo__hint { margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--text-muted); }
.settings-photo__status { margin: 0; min-height: 1.1em; font-size: 0.78rem; color: var(--accent); }

/* 공개방에서는 초기화 UI를 숨긴다 */
#settings-reset-section[hidden] { display: none !important; }

/* ── 방 채팅 UI ── */
.ft-room-mode .ft-room-badge {
    display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 999px;
    background: rgba(214, 51, 92, 0.85); color: #fff; font-size: 0.65rem; font-weight: 800; vertical-align: middle;
}
.ft-room-count {
    appearance: none; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main, #f0e6e9); font-family: inherit; font-size: 0.78rem; line-height: 1.2;
    font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
@media (hover: hover) {
    .ft-room-count:hover {
        background: rgba(214, 51, 92, 0.28);
        border-color: rgba(244, 168, 192, 0.55);
    }
}
.ft-room-count:focus-visible { outline: 2px solid #ffe5ad; outline-offset: 2px; }
.ft-room-count:active { transform: translateY(1px); }
.ft-room-banner {
    margin: 0 0 0.4rem; padding: 0.35rem 0.7rem; border-radius: 10px;
    background: rgba(230, 190, 96, 0.12); border: 1px solid rgba(230, 190, 96, 0.28);
    color: #ffe5ad; font-size: 0.78rem; line-height: 1.4; text-align: center;
}
.ft-room-banner[hidden] { display: none; }
.ft-room-banner.is-reply-wait {
    display:flex; align-items:center; justify-content:center; gap:0.65rem;
    padding:0.4rem 0.6rem; background:none; border:0; border-radius:0;
    color:#d8b3c2; font-size:0.75rem; letter-spacing:0.02em;
}
.ft-reply-pulse { display:inline-flex; align-items:center; gap:4px; height:16px; }
.ft-reply-pulse i { width:3px; height:12px; border-radius:99px; background:#e88aad; animation:ft-reply-flow 1.4s ease-in-out infinite; }
.ft-reply-pulse i:nth-child(2) { animation-delay:0.16s; }
.ft-reply-pulse i:nth-child(3) { animation-delay:0.32s; }
@keyframes ft-reply-flow { 0%,80%,100% { transform:scaleY(0.35); opacity:0.4; } 40% { transform:scaleY(1); opacity:1; } }
.ft-send-btn.is-room-locked, .ft-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 다른 유저 메시지: AI 캐릭터 대사(.ft-log-msg.assistant)와 같은 말풍선 + 왼쪽 정렬. 구분은 닉네임 색·성별 아이콘으로만 한다. */
.ft-log-msg.peer {
    align-self: flex-start;
    max-width: min(72%, 650px);
    margin-left: clamp(0px, 0.7vw, 10px);
    background: linear-gradient(180deg, rgba(32, 8, 18, 0.82), rgba(18, 4, 11, 0.94));
    color: var(--text-main, #f0e6e9);
    border: 1px solid rgba(230, 190, 96, 0.095);
    border-bottom-left-radius: 4px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.ft-log-msg.peer[hidden] { display: none; }
.ft-peer-nick {
    appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 800;
    cursor: pointer; text-align: left; color: #8fc1ff;
}
.ft-peer-nick:focus-visible, .ft-peer-avatar:focus-visible { outline: 2px solid #ffe5ad; outline-offset: 2px; border-radius: 6px; }
.ft-peer-color-0 { color: #8fc1ff; }
.ft-peer-color-1 { color: #ffb86b; }
.ft-peer-color-2 { color: #8be3b0; }
.ft-peer-color-3 { color: #f09ad6; }
.ft-peer-color-4 { color: #d3c3ff; }
.ft-peer-age, .ft-peer-card__age { font-weight: 600; color: var(--text-muted, #c4aeb8); font-size: 0.9em; white-space: nowrap; }
.ft-peer-card__age[hidden] { display: none; }
.ft-gender-icon { display: inline-block; margin-left: 0.3rem; font-size: 0.8rem; font-weight: 800; vertical-align: baseline; }
.ft-gender-m { color: #7db8ff; }
.ft-gender-f { color: #ff8fb7; }
.ft-gender-x { color: #c9b8ff; }

/* VN 모드: 사진 없음, 닉네임 텍스트만 */
.freetalk-overlay.ft-mode-vn .ft-log-msg.peer .ft-peer-avatar { display: none; }

/* 채팅 모드: 사진 + 닉네임 */
.freetalk-overlay.ft-mode-chatbot .ft-log-msg.peer {
    align-self: stretch; justify-content: flex-start; max-width: 100%;
    background: transparent; border: none; box-shadow: none;
}
.freetalk-overlay.ft-mode-chatbot .ft-log-msg.peer .ft-log-content { border-bottom-left-radius: 4px; }
.freetalk-overlay.ft-mode-chatbot .ft-log-msg.peer .ft-log-name { color: inherit; margin-bottom: 0; }
.freetalk-overlay.ft-mode-chatbot .ft-peer-avatar { overflow: hidden; font-size: 0; }
.freetalk-overlay.ft-mode-chatbot .ft-peer-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.freetalk-overlay.ft-mode-chatbot .ft-peer-avatar--empty::before { content: '👤'; font-size: 1.2rem; }
.freetalk-overlay.ft-mode-chatbot .ft-peer-avatar--empty { background: rgba(120, 160, 230, 0.18); }

/* 프로필 카드 팝오버 */
.ft-peer-card {
    position: absolute; z-index: 30; box-sizing: border-box; padding: 0.8rem; border-radius: 14px;
    background: #17121c; border: 1px solid rgba(230, 190, 96, 0.3); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    color: var(--text-main, #f0e6e9);
}
.ft-peer-card__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.ft-peer-card__photo {
    display: inline-block; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; overflow: hidden;
    background: rgba(120, 160, 230, 0.18);
}
.ft-peer-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ft-peer-card__who { min-width: 0; overflow-wrap: anywhere; }
.ft-peer-card__intro { margin: 0 0 0.4rem; font-size: 0.84rem; line-height: 1.5; overflow-wrap: anywhere; }
.ft-peer-card__intro.is-empty { color: var(--text-muted, #a38d97); }
.ft-peer-card__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.ft-peer-card__tag { padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(230, 190, 96, 0.12); border: 1px solid rgba(230, 190, 96, 0.28); color: #ffe5ad; font-size: 0.74rem; }
.ft-peer-card__actions { display: flex; gap: 0.4rem; }
.ft-peer-card__btn { flex: 1; min-height: 36px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: inherit; font-size: 0.78rem; cursor: pointer; }

.settings-photo__hint--warn { color: #ffb3c6; }

/* 하렘클럽: 받는 손님 칩(호스트 말풍선 이름 줄) · 대화 목록 안 '생각 중' 말풍선 */
.ft-room-to-chip {
    display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px;
    background: rgba(214, 51, 92, 0.14); border: 1px solid rgba(214, 51, 92, 0.3);
    color: var(--text-muted, #e9c9d4); font-size: 0.72rem; font-weight: 600; line-height: 1.5;
    vertical-align: middle; white-space: normal; max-width: 100%; overflow-wrap: anywhere;
}
.ft-room-thinking .ft-thinking-body { gap: 0.45rem; }
.ft-room-thinking__text { color: var(--text-muted, #c4aeb8); font-size: 0.86rem; }
.freetalk-overlay.ft-school-room .ft-room-thinking,
.freetalk-overlay.ft-school-room .ft-room-thinking .ft-log-content {
    background:none; border:0; box-shadow:none;
}
.freetalk-overlay.ft-school-room .ft-room-thinking .ft-log-content { display:flex; align-items:center; gap:12px; padding:8px 2px; }
.freetalk-overlay.ft-school-room .ft-room-thinking .ft-log-name { margin:0; }
.freetalk-overlay.ft-school-room .ft-room-thinking .ft-thinking-body { padding:0; }

.photo-upload-progress {
    height: 6px;
    width: 100%;
    margin-top: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 229, 173, 0.12);
    border: 1px solid rgba(255, 229, 173, 0.2);
}
.photo-upload-progress[hidden] { display: none !important; }
.photo-upload-progress__fill {
    display: block;
    height: 100%;
    width: 35%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d6335c, #ffe5ad);
    animation: photo-upload-progress-slide 1.2s ease-in-out infinite;
}
@keyframes photo-upload-progress-slide {
    from { transform: translateX(-110%); }
    to { transform: translateX(310%); }
}
@media (prefers-reduced-motion: reduce) {
    .photo-upload-progress__fill { animation: none; width: 100%; opacity: 0.7; }
}
/* School locations share one account session and keep scene rendering local to the selected place. */
.ft-school-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; padding:10px 12px; background:linear-gradient(100deg,#28101c,#18080e 75%); border-bottom:1px solid #623044; }
.ft-school-move { display:inline-flex; align-items:center; justify-content:center; gap:9px; max-width:100%; min-height:44px; padding:8px 13px 8px 9px; border:1px solid #f4a8c0; border-radius:14px; background:linear-gradient(135deg,#b53b66,#852b50); color:#fff6fa; font:inherit; font-size:13px; font-weight:750; line-height:1.4; box-shadow:0 3px 14px #c63b6e38,inset 0 1px #ffffff35; cursor:pointer; transition:background .18s,box-shadow .18s,transform .18s; }
.ft-school-move-icon { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border-radius:9px; background:#ffffff18; }
.ft-school-move-icon::before { content:''; width:18px; height:18px; background:currentColor; mask:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"/%3E%3Ccircle cx="12" cy="10" r="2.5"/%3E%3C/svg%3E') center/contain no-repeat; }
.ft-school-move-label { min-width:0; overflow-wrap:anywhere; text-align:left; }
.ft-school-move-arrow { margin-left:3px; color:#ffe0a4; font-size:20px; font-weight:500; }
.ft-school-move:disabled { opacity:.55; cursor:default; box-shadow:none; }
@media(hover:hover) { .ft-school-move:not(:disabled):hover { background:linear-gradient(135deg,#ca4978,#9b335d); box-shadow:0 4px 20px #dc52885c,inset 0 1px #ffffff45; transform:translateY(-1px); } }
.ft-school-move:focus-visible,.ft-school-place:focus-visible,.ft-school-dialog-close:focus-visible { outline:2px solid #ffe0a4; outline-offset:3px; }
.ft-school-move:not(:disabled):active { transform:translateY(1px); }
.ft-school-hint { flex:1 1 220px; color:#cdb6c0; font-size:12px; overflow-wrap:anywhere; }
.ft-school-dialog { width:min(720px,calc(100% - 24px)); max-height:85dvh; padding:20px; border:1px solid #9d526d; border-radius:22px; background:radial-gradient(ellipse at 0 0,#4a20344d,transparent 65%),#1b0911; color:#f8e9ef; box-sizing:border-box; box-shadow:0 24px 90px #0009,inset 0 1px #ffffff10; }
.ft-school-dialog[open] { display:flex; flex-direction:column; gap:12px; }
.ft-school-dialog::backdrop { background:#000b; backdrop-filter:blur(5px); }
.ft-school-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; }
.ft-school-dialog-heading h2 { display:flex; align-items:center; gap:10px; font-size:19px; margin:0; letter-spacing:-.02em; }
.ft-school-dialog-heading h2::before { content:'↗'; display:grid; place-items:center; width:34px; height:34px; border:1px solid #b76583; border-radius:11px; background:linear-gradient(135deg,#993452,#52223b); color:#ffe0a4; font-size:23px; font-weight:500; }
.ft-school-dialog-close { width:44px; height:44px; border:1px solid #754052; border-radius:10px; background:#32131f; color:inherit; font-size:24px; cursor:pointer; }
.ft-school-dialog-status { margin:0; padding:0 0 3px; font-size:12px; color:#d9b6c6; flex-shrink:0; }
.ft-school-places { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:max-content; align-content:start; gap:10px; overflow:auto; min-height:0; padding:4px; margin:-4px; scrollbar-width:thin; scrollbar-color:#8e4a64 #28101b; }
.ft-school-place { display:flex; flex-direction:column; align-items:stretch; gap:11px; min-width:0; min-height:156px; padding:13px; text-align:left; border:1px solid #623346; border-radius:16px; overflow:hidden; background:linear-gradient(145deg,#381726,#27101b); color:inherit; font:inherit; cursor:pointer; overflow-wrap:anywhere; transition:border-color .18s,background .18s; }
.ft-school-place span,.ft-school-place small { color:#d5bec8; font-size:12px; }
.ft-school-place-heading { position:relative; display:flex; align-items:flex-end; gap:9px; aspect-ratio:8 / 5; flex-shrink:0; box-sizing:border-box; min-width:0; margin:-13px -13px 0; padding:13px; background:#321b29; isolation:isolate; }
.ft-school-place-heading::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,transparent 45%,#24101e45 65%,#24101ef0); }
.ft-school-place-heading strong { min-width:0; flex:1; color:#fff6fa; font-size:15px; text-shadow:0 1px 6px #000b; }
.ft-school-place-preview { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:center 48%; }
.ft-school-place .ft-school-place-mark { flex:0 0 auto; align-self:flex-start; color:#ffe7ef; font-size:18px; text-shadow:0 1px 6px #000; }
.ft-school-place[aria-current] { border-color:#f0a1bd; background:linear-gradient(135deg,#642944,#3c182c); box-shadow:inset 0 1px #ffffff12; }
.ft-school-place[aria-current] .ft-school-place-mark { max-width:72px; padding:4px 6px; border:1px solid #edabc266; border-radius:6px; background:#4c1c36ed; color:#ffe2ed; font-size:10px; line-height:1.3; text-align:center; }
.ft-school-place:disabled { cursor:default; }
@media(hover:hover) { .ft-school-place:not(:disabled):hover { border-color:#cc7797; background:linear-gradient(145deg,#4b2035,#331424); } }
.ft-school-place-people,.ft-school-place-users { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.ft-school-place-users { padding-top:9px; border-top:1px solid #c58aa51c; }
.ft-school-person { display:inline-flex; align-items:center; gap:6px; max-width:100%; min-width:0; padding:3px 8px 3px 3px; border:1px solid #d78baa25; border-radius:20px; background:#f8c9dc09; }
.ft-school-person-portrait { position:relative; display:grid; place-items:center; width:27px; height:27px; flex:0 0 27px; overflow:hidden; border-radius:50%; background:#724057; }
.ft-school-person-portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ft-school-person .ft-school-person-name { min-width:0; color:#f2dce6; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.ft-school-person--user { border-color:transparent; background:transparent; padding-left:0; }
.ft-school-person--user .ft-school-person-portrait { width:22px; height:22px; flex-basis:22px; }
.ft-school-person--user .ft-school-person-name { color:#d4b7c6; font-size:11px; }
.ft-school-place .ft-school-place-empty { color:#b699a8; font-size:12px; padding:4px 0; }
.ft-school-place[data-school-gate] { position:relative; isolation:isolate; grid-column:1 / -1; flex-direction:row; align-items:flex-end; gap:16px; min-height:clamp(210px,32vw,300px); padding:22px; border-color:#c88eaa; background:#392331; box-shadow:inset 0 0 0 1px #ffe1ec18; }
.ft-school-place[data-school-gate]::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,transparent 45%,#fff4f733 60%,#fff4f7f5); }
.ft-school-gate-picture { position:absolute; inset:0; z-index:-2; }
.ft-school-gate-picture img { width:100%; height:100%; object-fit:cover; object-position:center 55%; }
.ft-school-place .ft-school-gate-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:7px; text-shadow:0 1px 8px #fff; }
.ft-school-gate-copy strong { color:#53213e; font-size:clamp(17px,2.5vw,22px); line-height:1.4; }
.ft-school-place .ft-school-gate-hint { color:#69374f; font-size:12px; line-height:1.5; }
.ft-school-place .ft-school-gate-arrow { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border:1px solid #c887a5; border-radius:50%; background:#fff4f7db; color:#873556; font-size:24px; }
@media(max-width:519px) { .ft-school-dialog { padding:16px; border-radius:18px; } .ft-school-places { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .ft-school-move,.ft-school-place { transition:none; } }
.ft-school-location-label { font-weight:700; color:#f2a3c2; }
.ft-school-role { display:inline-block; margin-left:4px; color:#ceb6c2; font-size:.85em; font-weight:500; white-space:nowrap; }
.ft-room-mode .ft-log-name { flex-wrap:wrap; row-gap:3px; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-log-avatar { width:36px; height:36px; flex-basis:36px; border:1px solid #d88ca766; box-shadow:0 0 0 3px #b8587c16,0 4px 12px #0005; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-log-name { color:#f3b4ce; line-height:1.5; }
.ft-avatar-area.ft-school-scene { background-image:none; }
.freetalk-overlay.ft-school-room .ft-avatar-area.ft-school-scene::before { content:''; display:block; position:absolute; inset:0; width:100%; height:100%; background-image:var(--ft-school-background); background-size:cover; background-position:center; filter:var(--ft-school-time-filter,none); opacity:1; transform:none; z-index:0; pointer-events:none; }
.ft-avatar-area.ft-school-scene::after { display:none; }
.freetalk-overlay.ft-school-room .ft-avatar-area.ft-school-scene { padding:0; align-items:center; justify-content:center; }
.freetalk-overlay.ft-school-room .ft-avatar-area.ft-school-scene #ft-avatar { object-fit:contain; object-position:center center; width:100%; height:100%; max-width:100%; margin:0; transition:none; }
.freetalk-overlay.ft-school-room .ft-avatar-area.ft-school-scene .ft-school-sprite-outgoing { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center center; pointer-events:none; z-index:2; transition:none; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-main { position:relative; isolation:isolate; background-image:none; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-main::before { content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; background-image:linear-gradient(#10080c55,#10080c55),var(--ft-school-background); background-size:cover; background-position:center; filter:var(--ft-school-time-filter,none); }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-log-content { background:#190c14; color:#f6edf2; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-log-msg.user .ft-log-content { background:#552039; color:#fff3f8; }
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-scene-global-content,
.freetalk-overlay.ft-school-room.ft-mode-chatbot .ft-status-message { background:#190c14; border-radius:12px; padding:8px 12px; color:#eadce4; }
@media(max-height:500px) { .ft-school-dialog { max-height:92dvh; padding:10px; gap:6px; } .ft-school-place { min-height:70px; } }
.freetalk-overlay.ft-school-room .ft-status-message.ft-school-sound {
    align-self:center; max-width:90%; padding:8px 12px; border:0; border-radius:0;
    background:none; box-shadow:none; color:#bba6b1; font-style:italic;
    font-size:0.78rem; line-height:1.8; text-align:center; overflow-wrap:anywhere;
}
.ft-school-follow {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-height:36px; max-width:100%; margin:6px 0 2px 6px; padding:7px 13px;
    border:1px solid #a04f70; border-radius:999px;
    background:linear-gradient(120deg,#592239,#382033); color:#f7dce7;
    font:inherit; font-size:0.78rem; line-height:1.4; cursor:pointer;
    transition:background 160ms,border-color 160ms;
}
.ft-school-follow::after { content:'↗'; font-size:1rem; }
.ft-school-follow:hover { background:#71314d; border-color:#db8cae; }
.ft-school-follow:focus-visible { outline:2px solid #f2b8d0; outline-offset:3px; }
.ft-school-follow:disabled { opacity:0.5; cursor:wait; }
@media (pointer:coarse) { .ft-school-follow { min-height:44px; } }
@media (prefers-reduced-motion:reduce) {
    .ft-reply-pulse i,.ft-school-room .ft-thinking-dots span { animation:none; transform:none; opacity:0.75; }
    .ft-school-follow { transition:none; }
}

/* ── 상단 인원 버튼 → 1차(유저 목록) · 2차(유저 상세 정보) 레이어 팝업 ── */
.ft-room-users-dialog { width:min(460px,calc(100% - 24px)); }
.ft-room-users-dialog .ft-school-dialog-heading h2::before { content:'👥'; font-size:17px; }
.ft-room-users-list { display:flex; flex-direction:column; gap:8px; overflow-y:auto; min-height:0; max-height:60dvh; padding:2px; margin:-2px; scrollbar-width:thin; scrollbar-color:#8e4a64 #28101b; }
.ft-room-user-item {
    appearance:none; display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px;
    border:1px solid #623346; border-radius:14px; background:linear-gradient(145deg,#381726,#27101b);
    color:inherit; font:inherit; text-align:left; cursor:pointer; box-sizing:border-box;
    transition:border-color .18s,background .18s,transform .15s;
}
.ft-room-user-item.is-me { border-color:#d87a9e; background:linear-gradient(145deg,#471d31,#2f1221); }
@media(hover:hover) {
    .ft-room-user-item:hover { border-color:#e593b2; background:linear-gradient(145deg,#4e2137,#351526); }
}
.ft-room-user-item:focus-visible { outline:2px solid #ffe0a4; outline-offset:2px; }
.ft-room-user-item:active { transform:translateY(1px); }
.ft-room-user-avatar {
    width:44px; height:44px; flex:0 0 44px; border-radius:50%; overflow:hidden;
    background:#4c2538; border:1px solid #d88ca766; display:grid; place-items:center;
}
.ft-room-user-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.ft-room-user-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.ft-room-user-top { display:flex; align-items:center; flex-wrap:wrap; gap:4px 6px; min-width:0; }
.ft-room-user-nick { font-size:14px; font-weight:750; color:#fff6fa; overflow-wrap:anywhere; }
.ft-room-user-me {
    display:inline-flex; align-items:center; padding:1px 7px; border-radius:999px;
    background:#d6335c44; border:1px solid #f4a8c088; color:#ffe3ec; font-size:11px; font-weight:700; line-height:1.3;
}
.ft-room-user-place { font-size:12px; color:#d5bec8; overflow-wrap:anywhere; }
.ft-room-user-arrow { flex:0 0 auto; font-size:20px; color:#d9b6c6; line-height:1; padding-left:4px; }

.ft-room-user-detail-dialog { width:min(440px,calc(100% - 24px)); z-index:10; }
.ft-room-user-detail-dialog .ft-school-dialog-heading h2::before { content:'👤'; font-size:17px; }
.ft-room-user-detail { display:flex; flex-direction:column; gap:14px; overflow-y:auto; min-height:0; max-height:68dvh; }
.ft-room-user-detail__head {
    display:flex; align-items:center; gap:14px; padding:12px; border-radius:16px;
    background:rgba(255,255,255,0.04); border:1px solid rgba(240,161,189,0.22);
}
.ft-room-user-detail__photo {
    width:68px; height:68px; flex:0 0 68px; border-radius:50%; overflow:hidden;
    background:#4c2538; border:1.5px solid #e6a2be88; box-shadow:0 4px 14px #0006;
}
.ft-room-user-detail__photo img { width:100%; height:100%; object-fit:cover; display:block; }
.ft-room-user-detail__who { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.ft-room-user-detail__name-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.ft-room-user-detail__nick { font-size:17px; font-weight:800; color:#fff6fa; overflow-wrap:anywhere; }
.ft-room-user-detail__meta { margin:0; display:grid; grid-template-columns:max-content 1fr; gap:4px 10px; font-size:13px; }
.ft-room-user-detail__meta-row { display:contents; }
.ft-room-user-detail__meta dt { color:#c9abb8; font-weight:500; }
.ft-room-user-detail__meta dd { margin:0; color:#f8e9ef; font-weight:600; overflow-wrap:anywhere; }
.ft-room-user-detail__desc-box {
    display:flex; flex-direction:column; gap:6px; padding:12px 14px; border-radius:14px;
    background:rgba(16,6,11,0.65); border:1px solid rgba(215,139,170,0.24);
}
.ft-room-user-detail__label { font-size:12px; font-weight:700; color:#e5b8ca; letter-spacing:0.02em; }
.ft-room-user-detail__desc {
    font-size:13.5px; line-height:1.6; color:#f8e9ef; white-space:pre-wrap; overflow-wrap:anywhere;
    max-height:220px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#8e4a64 #28101b;
}
.ft-room-user-detail__desc.is-empty { color:#a68b97; font-style:italic; }

