@import url("https://hangeul.pstatic.net/hangeul_static/css/nanum-square-round.css");

.page-back-button,.icon-back{display:grid!important;place-items:center;width:54px!important;height:54px!important;padding:0!important;color:#9a6741!important;font-size:34px!important;line-height:1!important}
.page-back-button svg{width:29px;height:29px}.conversation-head{color:#332820}.mobile-room-back{color:#9a6741}
.room strong{display:flex;gap:4px;align-items:center}.room strong span{font-size:12px;color:#9a6741}
.room-context-menu{position:fixed;z-index:3000;min-width:190px;padding:8px;border:1px solid #eaded5;border-radius:14px;background:#fff;box-shadow:0 14px 40px rgba(51,40,32,.2)}
.room-context-menu[hidden]{display:none}.room-context-menu button{display:block;width:100%;padding:12px 14px;border:0;border-radius:9px;background:transparent;color:#332820;text-align:left;font:inherit;cursor:pointer}.room-context-menu button:hover{background:#faf3ed}.room-context-menu .danger{color:#c34f45}
@media(min-width:701px){.mobile-room-back{display:none!important}}
body, button, input, select, textarea {
    font-family: "NanumSquareRound", "Apple SD Gothic Neo", sans-serif;
}

/* 참여자 프로필 열람 등급 안내 */
.profile-upgrade-dialog{width:min(430px,calc(100% - 32px));padding:0;border:0;border-radius:22px;background:#fff;color:#332820;box-shadow:0 24px 70px rgba(45,29,19,.28)}
.profile-upgrade-dialog::backdrop{background:rgba(35,24,18,.58);backdrop-filter:blur(2px)}
.profile-upgrade-dialog article{position:relative;padding:32px 28px 26px;text-align:center}
.profile-upgrade-icon{display:grid;width:54px;height:54px;margin:0 auto 15px;place-items:center;border-radius:50%;background:linear-gradient(135deg,#f5e8ff,#8d58bb);color:#fff;font-size:24px;box-shadow:0 8px 20px rgba(102,55,143,.22)}
.profile-upgrade-dialog h2{margin:0 0 9px;font-size:22px}
.profile-upgrade-dialog p{margin:0;color:#75675e;font-size:14px;line-height:1.65;word-break:keep-all}
.profile-upgrade-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;margin-top:24px}
.profile-upgrade-actions button{min-height:48px;border:1px solid #dfd0c5;border-radius:12px;background:#fff;color:#59483d;font:inherit;font-weight:800;cursor:pointer}
.profile-upgrade-actions .primary{border-color:#9a6741;background:#9a6741;color:#fff}
.profile-upgrade-close{position:absolute;top:13px;right:13px;display:grid;width:36px;height:36px;place-items:center;padding:0;border:0;border-radius:50%;background:#f8f3ef;color:#58483e;font-size:22px;line-height:1;cursor:pointer}
@media(max-width:480px){.profile-upgrade-dialog article{padding:30px 20px 21px}.profile-upgrade-actions{grid-template-columns:1fr}.profile-upgrade-actions button{min-height:47px}}

/* 모바일 Safari 기본 파란 글자/포커스 제거 */
#closeParticipantPanel{
  color:#211a16!important;
  -webkit-text-fill-color:#211a16!important;
  -webkit-appearance:none;
  appearance:none;
  -webkit-tap-highlight-color:transparent;
  outline:none!important;
}
#closeParticipantPanel:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(33,26,22,.35);
}
.room .room-copy strong{
  color:#211a16!important;
  -webkit-text-fill-color:#211a16!important;
  text-decoration:none!important;
}
.conversation-head{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center}.participant-toggle{padding:8px 11px;border:1px solid #e5d5c9;border-radius:10px;background:#fff;color:#9a6741;font:inherit;font-weight:800;cursor:pointer}.participant-toggle:disabled{opacity:.45;cursor:default}.participant-panel{min-width:250px;border-left:1px solid #eadbd0;background:#fff;overflow:auto}.participant-panel[hidden]{display:none}.chat-layout.participants-open{grid-template-columns:280px minmax(0,1fr) 270px}.participant-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #eadbd0}.participant-panel header div{display:grid;gap:3px}.participant-panel header small{color:#8a786c}.participant-panel header button{width:34px;height:34px;border:0;border-radius:50%;background:#faf3ed;font-size:20px;cursor:pointer}.participant-list{display:grid}.participant-item{display:flex;width:100%;align-items:center;gap:11px;padding:13px 15px;border:0;background:#fff;color:inherit;text-align:left;font:inherit;appearance:none;-webkit-appearance:none}.participant-item:disabled{opacity:1}.participant-item+.participant-item{box-shadow:inset 0 1px #f2e9e3}.participant-avatar{display:grid;width:38px;height:38px;place-items:center;border-radius:50%;background:#f3e5da;color:#9a6741;font-weight:800}.participant-copy{min-width:0}.participant-copy strong,.participant-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.participant-copy small{margin-top:3px;color:#8a786c}.room-owner-mark{display:inline-flex;margin-left:5px;padding:2px 6px;border-radius:999px;background:#9a6741;color:#fff;font-size:10px}.nickname-dialog{width:min(430px,calc(100% - 28px));padding:0;border:0;border-radius:20px}.nickname-dialog::backdrop{background:#261a1570}.nickname-dialog form{display:grid;gap:12px;padding:26px}.nickname-dialog span{color:#9a6741;font-size:12px;font-weight:800}.nickname-dialog h2{margin:0}.nickname-dialog p{margin:0;color:#8a786c;line-height:1.5}.nickname-dialog .nickname-message{min-height:20px;color:#b14e3f}.nickname-dialog .primary{width:100%}
.room-owner-mark.co-owner{background:#5276a5}

.composer {
    position: relative;
    display: grid;
    grid-template-columns: 46px 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.emoji-wrap { position: relative; flex: 0 0 auto; }
.composer input { min-width: 0; }
.composer #sendButton { min-width: 74px; white-space: nowrap; }
.emoji-button {
    width: 46px; height: 46px; border: 1px solid #e5d5c9; border-radius: 50%;
    background: #fffaf6; color: #9a6741; font-size: 25px; cursor: pointer;
}
.media-button { width:46px;height:46px;border:1px solid #e5d5c9;border-radius:50%;background:#fffaf6;color:#9a6741;font-size:28px;line-height:1;cursor:pointer }.media-button:disabled{opacity:.45;cursor:default}.media-file-input{display:none!important}.media-preview{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;padding:10px 12px;border:1px solid #e5d5c9;border-radius:13px;background:#fffaf6;color:#5d493b}.media-preview[hidden]{display:none}.media-preview-item{display:flex;min-width:0;align-items:center;gap:10px;padding:6px;border-radius:10px;background:#fff}.media-preview img{width:58px;height:58px;object-fit:cover;border-radius:9px}.media-preview .media-preview-icon{display:grid;width:58px;height:58px;place-items:center;border-radius:9px;background:#efe2d8;font-size:25px}.media-preview-copy{min-width:0;flex:1}.media-preview-copy strong,.media-preview-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-preview-copy small{margin-top:4px;color:#82746b}.media-preview-remove{width:34px;height:34px;border:0;border-radius:50%;background:#eaded5;color:#5d493b;font-size:20px;cursor:pointer}.chat-media-image,.chat-media-video{display:block;width:min(300px,100%);max-height:360px;border-radius:12px;object-fit:contain;background:#1f1a17}.chat-media-link{display:block;margin-bottom:5px}.bubble .media-caption{margin:5px 0 0;white-space:pre-wrap;word-break:break-word}
.emoji-button:disabled { opacity: .45; cursor: default; }
.emoji-picker {
    position: absolute; left: 0; bottom: 56px; z-index: 30; width: 270px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 12px;
    border: 1px solid #e5d5c9; border-radius: 16px; background: #fff;
    box-shadow: 0 12px 30px rgba(74,51,35,.15);
}
.emoji-picker[hidden] { display: none; }
.emoji-picker button { border: 0; border-radius: 9px; background: transparent; padding: 7px; font-size: 23px; cursor: pointer; }
.emoji-picker button:hover { background: #faf2ec; }

@media (max-width: 700px) {
    .emoji-picker { position: fixed; left: 14px; right: 14px; bottom: 76px; width: auto; }
    .composer { grid-template-columns: 42px 42px minmax(0, 1fr) 60px; gap: 6px; padding: 10px; }
    .emoji-button,.media-button { width: 42px; height: 42px; }
    .composer input { padding: 11px 10px; }
    .composer #sendButton { min-width: 0; padding: 11px 8px; }
    .conversation-head{grid-template-columns:44px minmax(0,1fr) auto!important}.participant-toggle span{display:none}.chat-layout{position:relative}.chat-layout.participants-open{grid-template-columns:1fr}.participant-panel{position:absolute;z-index:45;top:0;right:0;bottom:0;width:min(78vw,300px);box-shadow:-12px 0 30px #321f1530}.chat-layout.participants-open .conversation{display:grid!important}.participant-panel[hidden]{display:none}
}

/* 참여자 버튼을 채팅방 제목 왼쪽에 작게 배치 */
.conversation-head{grid-template-columns:auto auto minmax(0,1fr) auto!important;justify-content:start}
.participant-toggle{display:inline-flex;align-items:center;gap:4px;width:max-content;padding:5px 8px;border-radius:8px;font-size:12px}
.bubble-meta{display:flex;align-items:center;gap:7px;margin-top:5px}
.bubble-meta small{margin:0}
.message-report{padding:1px 4px;border:0;background:transparent;color:#a65a4c;font-size:10px;cursor:pointer}
@media(max-width:700px){.conversation-head{grid-template-columns:44px auto minmax(0,1fr) auto!important}.participant-toggle{padding:5px 7px}.participant-toggle span{display:none}}
.participant-invite{display:grid;gap:7px;padding:13px 14px;border-bottom:1px solid #eadbd0;background:#fffaf6}.participant-invite[hidden]{display:none}.participant-invite label{font-size:12px;font-weight:800;color:#5d493b}.participant-invite>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}.participant-invite input{min-width:0;padding:9px;border:1px solid #ddcdc1;border-radius:9px;font:inherit;font-size:12px}.participant-invite button{padding:8px 10px;border:0;border-radius:9px;background:#9a6741;color:#fff;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.participant-invite p{min-height:15px;margin:0;color:#b14e3f;font-size:11px;line-height:1.35}
.chat-tools-button{padding:6px 9px;border:1px solid #e5d5c9;border-radius:8px;background:#fff;color:#9a6741;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer}.chat-tools-button[hidden]{display:none}.message-context-menu{z-index:3100}.message-context-menu button[hidden]{display:none}.bubble-row.announcement{position:relative;margin-top:18px;padding:8px;border:1px solid #d8b38f;border-radius:14px;background:#fff8ef}.announcement-label{position:absolute;top:-13px;left:10px;padding:3px 8px;border-radius:999px;background:#9a6741;color:#fff;font-size:10px;font-weight:800}.mine .announcement-label{right:10px;left:auto}.chat-poll,.chat-ladder{width:min(330px,68vw);padding:12px;border-radius:12px;background:#fff;color:#3f3027}.chat-poll>span,.chat-ladder>span{color:#9a6741;font-size:11px;font-weight:900}.chat-poll h3,.chat-ladder h3{margin:7px 0 10px;font-size:16px}.chat-poll>div{display:grid;gap:7px}.poll-choice{position:relative;overflow:hidden;padding:10px;border:1px solid #e6d7cc;border-radius:9px;background:#fff;color:#3f3027;text-align:left;cursor:pointer}.poll-choice>span{position:relative;z-index:2;display:flex;justify-content:space-between;gap:9px;font-size:12px}.poll-choice>i{position:absolute;z-index:1;inset:0 auto 0 0;background:#ead8c9;opacity:.65}.poll-choice.selected{border-color:#9a6741;box-shadow:0 0 0 2px #9a674125}.chat-poll>small{display:block;margin-top:9px;color:#84756b;font-size:10px}.chat-ladder details{border:1px solid #e6d7cc;border-radius:9px;background:#fff}.chat-ladder summary{padding:10px;color:#9a6741;font-size:12px;font-weight:800;cursor:pointer}.chat-ladder p{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;margin:0;padding:8px 10px;border-top:1px solid #f0e7e0;font-size:12px}.chat-ladder p strong{text-align:right;color:#9a6741}.chat-feature-dialog{width:min(650px,calc(100% - 28px));max-height:90dvh;padding:0;border:0;border-radius:22px;color:#332820}.chat-feature-dialog::backdrop{background:#261a156b}.chat-feature-dialog form{display:grid;max-height:90dvh}.chat-feature-dialog header{display:flex;justify-content:space-between;gap:18px;padding:23px 25px 18px;border-bottom:1px solid #eaded5}.chat-feature-dialog header span{color:#9a6741;font-size:11px;font-weight:900}.chat-feature-dialog h2{margin:5px 0}.chat-feature-dialog header p{margin:0;color:#82746b;font-size:12px;line-height:1.5}.chat-feature-dialog header button{flex:0 0 auto;width:40px;height:40px;border:0;border-radius:50%;background:#faf3ed;font-size:23px;cursor:pointer}.chat-feature-dialog nav{display:flex;gap:7px;padding:14px 25px 0}.chat-feature-dialog nav button{flex:1;padding:10px;border:1px solid #eaded5;border-radius:10px;background:#fff;color:#82746b;font-weight:800;cursor:pointer}.chat-feature-dialog nav button.active{border-color:#9a6741;background:#9a6741;color:#fff}.chat-feature-dialog section{display:grid;gap:13px;padding:20px 25px;overflow:auto}.chat-feature-dialog section[hidden]{display:none}.chat-feature-dialog label{display:grid;gap:7px;font-size:13px;font-weight:800}.chat-feature-dialog input,.chat-feature-dialog textarea{width:100%;padding:12px;border:1px solid #ddcdc1;border-radius:10px;outline:none;resize:vertical}.poll-option-editor{display:grid;gap:8px}.poll-option-editor label{display:grid;grid-template-columns:28px minmax(0,1fr) 34px;gap:7px;align-items:center}.poll-option-editor label>span{display:grid;width:27px;height:27px;place-items:center;border-radius:50%;background:#f3e5da;color:#9a6741;font-size:11px}.poll-option-editor label>button{width:34px;height:34px;border:0;border-radius:50%;background:#f8e9e6;color:#b34f43;font-size:19px;cursor:pointer}.feature-add-option{padding:10px;border:1px dashed #bd936f;border-radius:10px;background:#fff;color:#9a6741;font-weight:800;cursor:pointer}.feature-two-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.chat-feature-dialog form>p{min-height:18px;margin:0;padding:0 25px;color:#b14e3f;font-size:12px}.chat-feature-dialog footer{display:flex;justify-content:flex-end;gap:8px;padding:16px 25px 22px;border-top:1px solid #eaded5}.chat-feature-dialog footer button{padding:11px 17px;border:1px solid #e5d5c9;border-radius:10px;background:#fff;font-weight:800;cursor:pointer}.chat-feature-dialog footer .primary{border-color:#9a6741;background:#9a6741;color:#fff}.emoji-picker{max-height:310px;overflow:auto;grid-template-columns:repeat(7,1fr)}
@media(max-width:700px){.chat-tools-button{width:34px;overflow:hidden;padding-inline:0;color:transparent;font-size:0}.chat-tools-button::after{content:"＋";color:#9a6741;font-size:17px}.feature-two-columns{grid-template-columns:1fr}.chat-feature-dialog header,.chat-feature-dialog section,.chat-feature-dialog footer{padding-inline:18px}.chat-feature-dialog nav{padding-inline:18px}.chat-feature-dialog form>p{padding-inline:18px}.emoji-picker{grid-template-columns:repeat(8,1fr);max-height:260px}.emoji-picker button{padding:5px;font-size:21px}}

/* 모바일 채팅은 목록 또는 대화 한 화면만 사용한다. */
@media(max-width:700px){
  .conversation-head{column-gap:10px!important;padding-left:14px!important;padding-right:14px!important}
  .conversation-head #roomTitle{padding-left:5px!important}
  html,body{height:100%;overflow:hidden}
  body{background:#fff}
  .app{width:100%;max-width:none;height:100dvh;margin:0;padding:0!important}
  .app>.top,.app>.hero{display:none!important}
  .chat-layout{
    position:relative;
    height:100dvh!important;
    min-height:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .rooms{height:100%;overflow-y:auto;background:#fff}
  .room-head{position:sticky;z-index:5;top:0;padding:20px 18px;background:#fff}
  .room{min-height:72px;padding:17px 18px}
  .room small{display:none!important}
  .conversation{height:100dvh;min-height:0}
  .conversation-head{background:#fff}
  .messages{min-height:0}
  .composer{padding-bottom:max(10px,env(safe-area-inset-bottom))}
}

/* 2026-08-02: 모바일 채팅 목록 가독성 */
@media(max-width:700px){
  .room .room-copy strong{
    font-size:16px!important;
    font-weight:900!important;
    line-height:1.3!important;
    letter-spacing:-.2px;
  }
  .room .room-copy small{
    margin-top:5px!important;
    color:#74675f!important;
    font-size:14px!important;
    font-weight:500!important;
    line-height:1.4!important;
  }
}

/* 채팅방 목록의 최근 시간 */
.room{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:start}
.room>strong{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.room>small{grid-column:1/-1}
.room-time{justify-self:end;color:#8a786c;font-size:11px;line-height:1.4;white-space:nowrap}

/* 카카오톡처럼 아래에서 올라오는 첨부 메뉴 */
.attachment-backdrop{position:fixed;z-index:3200;inset:0;background:#241a145c}
.attachment-backdrop[hidden],.attachment-sheet[hidden]{display:none}
.attachment-sheet{position:fixed;z-index:3210;right:0;bottom:0;left:0;margin:auto;padding:18px max(18px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));border-radius:24px 24px 0 0;background:#fff;box-shadow:0 -18px 44px #2f211a2b;animation:attachment-sheet-up .22s ease-out}
.attachment-sheet header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.attachment-sheet header strong{font-size:18px}.attachment-sheet header button{display:grid;width:38px;height:38px;place-items:center;border:0;border-radius:50%;background:#f7f1ec;color:#332820;font-size:24px;cursor:pointer}
.attachment-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.attachment-grid button{display:grid;gap:8px;place-items:center;min-width:0;padding:11px 5px;border:0;background:transparent;color:#332820;cursor:pointer}.attachment-grid button span{display:grid;width:58px;height:58px;place-items:center;border-radius:19px;background:#f5eee8;font-size:28px}.attachment-grid button b{overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis;font-size:12px}.attachment-grid button:hover span{background:#ead8ca}
@keyframes attachment-sheet-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
.chat-option-dialog{width:min(520px,calc(100% - 28px));max-height:88dvh;padding:0;border:0;border-radius:22px;color:#332820}.chat-option-dialog::backdrop{background:#241a146b}.chat-option-dialog form,.chat-option-dialog>div{display:grid}.chat-option-dialog header{display:flex;align-items:flex-start;justify-content:space-between;padding:22px;border-bottom:1px solid #eaded5}.chat-option-dialog header span{color:#9a6741;font-size:11px;font-weight:900}.chat-option-dialog h2{margin:5px 0 0}.chat-option-dialog header button{display:grid;width:40px;height:40px;place-items:center;border:0;border-radius:50%;background:#f7f1ec;font-size:23px;cursor:pointer}.chat-option-dialog form>label{display:grid;gap:7px;margin:18px 22px 0;font-weight:800}.chat-option-dialog input,.chat-option-dialog textarea{width:100%;padding:13px;border:1px solid #ddcdc1;border-radius:11px;font:inherit}.chat-option-dialog textarea{min-height:120px;resize:vertical}.chat-option-dialog form>p{min-height:18px;margin:12px 22px 0;color:#b14e3f;font-size:12px}.chat-option-dialog footer{display:flex;justify-content:flex-end;gap:8px;padding:18px 22px 22px}.chat-option-dialog footer button{padding:11px 16px;border:1px solid #ddcdc1;border-radius:10px;background:#fff;font-weight:800}.chat-option-dialog footer .primary{border-color:#9a6741;background:#9a6741;color:#fff}.meeting-event-picker{display:grid;gap:9px;max-height:58dvh;padding:18px 22px 24px;overflow:auto}.meeting-event-picker button{display:grid;gap:5px;padding:14px;border:1px solid #eaded5;border-radius:13px;background:#fff;color:#332820;text-align:left;cursor:pointer}.meeting-event-picker button strong{font-size:15px}.meeting-event-picker button span,.meeting-event-picker button small{color:#81756c}.meeting-event-picker .empty{padding:35px 12px}
@media(max-width:700px){.attachment-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.attachment-sheet{max-height:70dvh;overflow-y:auto}.attachment-grid button span{width:54px;height:54px}.chat-option-dialog{width:calc(100% - 24px)}.room-time{font-size:11px}}
@media(pointer:fine){.camera-attachment{display:none!important}}

/* 최신 채팅 목록: 프로필·한 줄 미리보기·시간 */
.room{grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:11px}.room-avatar{grid-row:1;display:grid;width:44px;height:44px;place-items:center;overflow:hidden;border-radius:50%;background:#f5ece5}.room-avatar img{width:100%;height:100%;object-fit:cover}.room-copy{min-width:0}.room-copy strong,.room-copy small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.room-copy small{margin-top:4px}.room-time{align-self:start;padding-top:2px}
.meeting-share-card{display:grid;grid-template-columns:104px minmax(180px,1fr);width:min(430px,72vw);overflow:hidden;border-radius:13px;background:#fff;color:#332820}.meeting-share-card>img{width:104px;height:100%;min-height:112px;object-fit:cover}.meeting-share-card>div{display:grid;align-content:center;gap:5px;padding:13px}.meeting-share-card span{color:#9a6741;font-size:11px;font-weight:900}.meeting-share-card strong{font-size:16px}.meeting-share-card p{margin:0;color:#76695f;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meeting-share-card a{justify-self:start;margin-top:3px;padding:6px 10px;border:1px solid #9a6741;border-radius:8px;color:#9a6741;font-size:11px;font-weight:900;text-decoration:none}
.ladder-detail-dialog{width:min(760px,calc(100% - 24px));max-height:90dvh;padding:0;border:0;border-radius:22px}.ladder-detail-dialog::backdrop{background:#261a1570}.ladder-detail-dialog article{display:grid;grid-template-rows:auto minmax(0,1fr);max-height:90dvh}.ladder-detail-dialog header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #eaded5}.ladder-detail-dialog header span{color:#9a6741;font-size:11px;font-weight:900}.ladder-detail-dialog h2{margin:4px 0 0}.ladder-detail-dialog header button{display:grid;width:42px;height:42px;place-items:center;border:0;border-radius:50%;background:#f7f1ec;font-size:24px}.ladder-detail-dialog #ladderDetailContent{min-height:260px;max-height:72dvh;padding:16px;overflow:auto;overscroll-behavior:contain}.ladder-detail-dialog .ladder-svg-wrap{display:block!important;min-width:640px;min-height:360px;overflow:visible}.ladder-detail-dialog .ladder-scroll-content{min-width:var(--ladder-content-width,640px);min-height:330px}.ladder-detail-button{margin-top:8px;padding:7px 10px;border:1px solid #9a6741;border-radius:8px;background:#fff;color:#9a6741;font-weight:800}
@media(max-width:700px){.room{min-height:76px;padding:14px 16px}.room small{display:block!important}.meeting-share-card{grid-template-columns:88px minmax(150px,1fr);width:min(360px,78vw)}.meeting-share-card>img{width:88px}.attachment-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.ladder-detail-dialog #ladderDetailContent{max-height:68dvh;overflow:auto}}

/* 2026-07-23: 모바일 목록/대화 분리와 공통 아이콘 센터링을 마지막 규칙으로 고정 */
.unified-back,.mobile-room-back,.chat-list-back{display:grid!important;place-items:center!important;padding:0!important;line-height:0!important}
.unified-back svg,.mobile-room-back svg,.chat-list-back svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.room-head{display:flex;align-items:center;gap:10px;min-height:70px}
.chat-list-back{flex:0 0 44px;width:44px!important;height:44px!important;border:1px solid #eaded5!important;border-radius:14px!important;background:#fff!important;color:#9a6741!important;cursor:pointer}
.room-head strong{font-size:18px}
.ladder-detail-button{cursor:pointer!important;touch-action:manipulation}
.meeting-share-card{grid-template-columns:96px minmax(0,1fr);width:min(380px,72vw);max-width:100%}
.meeting-share-card:not(:has(>img)){grid-template-columns:minmax(0,1fr)}
.meeting-share-card>img{width:96px;min-height:96px;max-height:126px}
.meeting-share-card>div{padding:11px 12px}
.meeting-share-card strong,.meeting-share-card p{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ladder-detail-dialog #ladderDetailContent{overflow:scroll!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable both-edges}

@media(max-width:700px){
  .chat-layout:not(.room-open) .rooms{display:block!important;width:100%!important;height:100dvh!important}
  .chat-layout:not(.room-open) .conversation{display:none!important}
  .chat-layout:not(.room-open) .participant-panel{display:none!important}
  .chat-layout.room-open .rooms{display:none!important}
  .chat-layout.room-open .conversation{display:grid!important;width:100%!important}
  .room-head{padding:10px 16px!important}
  .room-head strong{font-size:17px}
  .room{grid-template-columns:46px minmax(0,1fr) auto!important}
  .ladder-detail-dialog{width:calc(100% - 16px);max-height:88dvh;border-radius:18px}
  .ladder-detail-dialog article{max-height:88dvh}
  .ladder-detail-dialog header{padding:14px 16px}
  .ladder-detail-dialog header h2{font-size:18px}
  .ladder-detail-dialog #ladderDetailContent{width:100%;height:64dvh;min-height:0;max-height:64dvh;padding:10px}
  .ladder-detail-dialog .ladder-svg-wrap{min-width:470px!important;min-height:300px!important}
  .ladder-detail-dialog .ladder-scroll-content{min-width:max(470px,var(--ladder-content-width,470px))!important;min-height:290px!important}
  .meeting-share-card{grid-template-columns:82px minmax(0,1fr);width:min(330px,78vw)}
  .meeting-share-card:not(:has(>img)){grid-template-columns:minmax(0,1fr);width:min(310px,74vw)}
  .meeting-share-card>img{width:82px;min-height:92px;max-height:112px}
  .meeting-share-card strong{font-size:14px}
}

/* 2026-07-24: 채팅 목록 안에서 내 친구와 채팅방을 구분해 보는 탭 */
.rooms{
  display:flex;
  min-width:0;
  flex-direction:column;
  overflow:hidden;
}
.room-head,.chat-list-tabs{flex:0 0 auto}
.chat-list-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  padding:12px 14px;
  border-bottom:1px solid #eaded5;
  background:#fff;
}
.chat-list-tab{
  min-width:0;
  padding:10px 12px;
  border:1px solid #e5d5c9;
  border-radius:11px;
  background:#fff;
  color:#6f5f54;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.chat-list-tab.active{
  border-color:#9a6741;
  background:#9a6741;
  color:#fff;
  box-shadow:0 7px 16px rgba(123,78,46,.14);
}
.chat-list-panel{
  min-height:0;
  flex:1 1 auto;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.chat-list-panel[hidden]{display:none!important}
.friend-list{display:grid;background:#fff}
.chat-friend-item{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 26px;
  gap:12px;
  align-items:center;
  width:100%;
  min-height:76px;
  padding:14px 16px;
  border:0;
  border-bottom:1px solid #eee3db;
  background:#fff;
  color:#332820;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.chat-friend-item:hover{background:#fffaf6}
.chat-friend-avatar{
  display:grid;
  width:48px;
  height:48px;
  place-items:center;
  overflow:hidden;
  border-radius:50%;
  background:#f3e6dc;
  color:#9a6741;
  font-size:18px;
  font-weight:900;
}
.chat-friend-avatar img{width:100%;height:100%;object-fit:cover}
.chat-friend-copy{min-width:0}
.chat-friend-copy strong,.chat-friend-copy small{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.chat-friend-copy small{margin-top:5px;color:#85766c;font-size:12px}
.chat-friend-chevron{
  display:grid;
  width:26px;
  height:26px;
  place-items:center;
  color:#9a6741;
  font-size:22px;
}
.chat-friend-empty{padding:58px 22px;color:#85766c;text-align:center;line-height:1.7}

.chat-friend-dialog,.chat-friend-report-dialog{
  width:min(560px,calc(100% - 28px));
  max-height:90dvh;
  padding:0;
  overflow:auto;
  border:0;
  border-radius:22px;
  color:#332820;
  box-shadow:0 22px 70px rgba(43,28,20,.22);
}
.chat-friend-dialog::backdrop,.chat-friend-report-dialog::backdrop{background:rgba(38,26,21,.58)}
.chat-friend-dialog article{display:grid}
.chat-friend-dialog article,.chat-friend-dialog article>*,
.chat-friend-report-dialog form,.chat-friend-report-dialog form>*{
  box-sizing:border-box;
  min-width:0;
}
.chat-friend-dialog header,.chat-friend-report-dialog header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 22px 17px;
  border-bottom:1px solid #eaded5;
}
.chat-friend-dialog header span,.chat-friend-report-dialog header span{
  color:#9a6741;
  font-size:11px;
  font-weight:900;
}
.chat-friend-dialog h2,.chat-friend-report-dialog h2{margin:5px 0 0}
.chat-friend-dialog header button,.chat-friend-report-dialog header button{
  display:grid;
  flex:0 0 40px;
  width:40px;
  height:40px;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:#f7f1ec;
  color:#332820;
  font-size:23px;
  line-height:1;
  cursor:pointer;
}
.chat-friend-profile{
  display:grid;
  grid-template-columns:104px minmax(0,1fr);
  align-items:center;
  gap:18px;
  padding:24px 22px 14px;
  text-align:left;
}
.chat-friend-profile .chat-friend-avatar{width:104px;height:104px;border-radius:26px;font-size:30px}
.chat-friend-heading{min-width:0}
.chat-friend-profile h2{
  overflow:hidden;
  margin:0;
  color:#2f251f;
  font-size:22px;
  line-height:1.3;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.chat-friend-badges,.chat-friend-tags{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
.chat-friend-badges span,.chat-friend-tags span{
  padding:5px 8px;
  border-radius:999px;
  background:#f5ebe3;
  color:#8a5d3c;
  font-size:11px;
  font-weight:800;
}
.chat-friend-basic,.chat-friend-location{margin:0;color:#76685f;font-size:13px}
.chat-friend-basic{margin-top:7px}
.chat-friend-location{margin-top:5px}
.chat-friend-tags{margin:0 22px}
.chat-friend-intro{
  box-sizing:border-box;
  width:auto;
  margin:12px 22px 18px;
  padding:14px 16px;
  border-radius:12px;
  background:#fbf7f3;
  color:#51453d;
  font-size:13px;
  line-height:1.65;
  text-align:left;
  white-space:pre-wrap;
  word-break:break-word;
}
.chat-friend-connection{
  display:block;
  width:calc(100% - 44px);
  min-height:42px;
  margin:0 22px 12px;
  border:1px solid #d9b99f;
  border-radius:11px;
  background:#fff8f2;
  color:#8b5835;
  font:inherit;
  font-weight:900;
}
.chat-friend-connection[disabled]{cursor:default;opacity:.78}
.chat-friend-details{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  box-sizing:border-box;
  width:auto;
  margin:12px 22px 18px;
  color:#685a51;
  font-size:12px;
}
.chat-friend-details:empty{display:none}
.chat-friend-details>div{
  min-width:0;
  padding:11px 12px;
  border:1px solid #eaded5;
  border-radius:11px;
  background:#fff;
}
.chat-friend-details dt{
  margin:0 0 5px;
  color:#9a6741;
  font-size:11px;
  font-weight:900;
}
.chat-friend-details dd{
  margin:0;
  color:#51453d;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.chat-friend-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0 22px 22px}
.chat-friend-actions button,.chat-friend-report-dialog footer button{
  min-height:44px;
  padding:10px 14px;
  border:1px solid #d9b99f;
  border-radius:11px;
  background:#fff;
  color:#8b5835;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}
.chat-friend-actions .primary,.chat-friend-report-dialog footer .primary{
  border-color:#9a6741;
  background:#9a6741;
  color:#fff;
}
.chat-friend-report-dialog form{display:grid}
.chat-friend-report-field{
  display:grid;
  gap:8px;
  margin:18px 22px 0;
}
.chat-friend-report-field>label{
  font-size:13px;
  font-weight:900;
}
.chat-friend-report-dialog select,.chat-friend-report-dialog textarea{
  box-sizing:border-box;
  width:100%;
  padding:12px 14px;
  border:1px solid #ddcdc1;
  border-radius:11px;
  background:#fff;
  color:#332820;
  font:inherit;
}
.chat-friend-report-dialog textarea{min-height:110px;resize:vertical}
.chat-friend-report-help{
  color:#8b7769;
  font-size:11px;
  line-height:1.55;
}
.chat-friend-report-dialog form>p{min-height:18px;margin:10px 22px 0;color:#b14e3f;font-size:12px}
.chat-friend-report-dialog footer{display:flex;justify-content:flex-end;gap:8px;padding:15px 22px 22px}

@media(max-width:700px){
  .room-head{min-height:68px}
  .room-head strong{font-size:0}
  .room-head strong::after{content:"채팅";font-size:18px}
  .chat-list-tabs{padding:12px 16px}
  .chat-list-tab{padding:9px 10px}
  .chat-friend-dialog,.chat-friend-report-dialog{
    width:calc(100% - 20px);
    max-height:88dvh;
    border-radius:20px;
  }
  .chat-friend-profile{
    grid-template-columns:82px minmax(0,1fr);
    gap:14px;
    padding:20px 18px 14px;
  }
  .chat-friend-profile .chat-friend-avatar{width:82px;height:82px;border-radius:22px;font-size:25px}
  .chat-friend-profile h2{font-size:20px}
  .chat-friend-tags{margin:0 18px}
  .chat-friend-intro{margin:12px 18px 0}
  .chat-friend-details{
    grid-template-columns:1fr;
    margin:10px 18px 16px;
  }
  .chat-friend-actions{padding:0 18px 18px}
  .chat-friend-report-field{margin:16px 18px 0}
  .chat-friend-report-dialog form>p{margin-right:18px;margin-left:18px}
  .chat-friend-report-dialog footer{padding-right:18px;padding-left:18px}
}


/* 2026-08-03 v31 meeting profile sync */
.participant-avatar{overflow:hidden}
.participant-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.message-sender-avatar{display:grid;flex:0 0 auto;width:36px;height:36px;place-items:center;align-self:flex-end;margin-right:8px;overflow:hidden;border-radius:50%;background:#f3e5da;color:#9a6741;font-size:12px;font-weight:900}
.message-sender-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.bubble-row.mine .message-sender-avatar{display:none}

/* 2026-08-19 채팅 사진 앱 내 확대 보기 */
.chat-media-link{display:block;margin-bottom:5px;padding:0;border:0;background:transparent;cursor:zoom-in}

/* 예약 메시지: 한 창에서 시간·본문·다중 첨부를 함께 설정 */
.scheduled-attachment-field{display:grid;gap:8px;margin:18px 22px 0}.scheduled-attachment-field>strong{font-size:14px}.scheduled-attachment-field>small{color:#81756c;font-size:11px}.scheduled-attachment-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.scheduled-attachment-buttons button{min-height:44px;border:1px solid #ddcdc1;border-radius:11px;background:#fff;color:#8b5e3c;font:inherit;font-weight:800;cursor:pointer}.scheduled-attachment-preview{display:grid;gap:7px}.scheduled-attachment-preview[hidden]{display:none}.scheduled-attachment-item{display:flex;min-width:0;align-items:center;gap:10px;padding:8px;border-radius:11px;background:#faf6f2}.scheduled-attachment-item img,.scheduled-attachment-item .file-icon{display:grid;width:48px;height:48px;flex:0 0 auto;place-items:center;border-radius:9px;object-fit:cover;background:#efe2d8;font-size:23px}.scheduled-attachment-copy{min-width:0;flex:1}.scheduled-attachment-copy strong,.scheduled-attachment-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scheduled-attachment-copy small{margin-top:3px;color:#81756c;font-size:11px}.scheduled-attachment-remove{display:grid;width:32px;height:32px;place-items:center;border:0;border-radius:50%;background:#eee2d9;color:#6d5545;font-size:18px;cursor:pointer}
.scheduled-media-grid{display:grid;width:min(300px,100%);height:250px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:3px;margin-bottom:5px;overflow:hidden;border-radius:12px}.scheduled-media-grid[data-count="1"]{display:block;height:auto}.scheduled-media-grid[data-count="1"] .scheduled-media-image{height:auto;max-height:360px}.scheduled-media-grid[data-count="2"]{height:175px;grid-template-rows:1fr}.scheduled-media-grid[data-count="3"] .scheduled-media-link:first-child{grid-row:1/3}.scheduled-media-link{position:relative;display:block;min-width:0;min-height:0;padding:0;border:0;background:#eee;cursor:zoom-in}.scheduled-media-image{display:block;width:100%;height:100%;object-fit:cover}.scheduled-media-more{position:absolute;inset:0;display:grid;place-items:center;background:#0008;color:#fff;font-size:24px;font-weight:900}.scheduled-file-card{display:flex;min-width:220px;align-items:center;gap:9px;margin:4px 0;padding:10px;border-radius:11px;background:#fff5;color:#fff;text-decoration:none}.bubble-row:not(.mine) .scheduled-file-card{background:#faf6f2;color:#49372b}.scheduled-file-card>span{font-size:24px}.scheduled-file-card>span:last-child{font-size:18px}.scheduled-file-card>div{min-width:0;flex:1}.scheduled-file-card strong,.scheduled-file-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scheduled-file-card small{margin-top:3px;opacity:.72;font-size:11px}
@media(max-width:700px){.scheduled-attachment-field{margin-inline:18px}.scheduled-attachment-buttons button{font-size:12px}.scheduled-media-grid{height:220px}}
.chat-image-viewer{inset:0;box-sizing:border-box;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:max(68px,calc(50px + env(safe-area-inset-top))) 18px max(24px,env(safe-area-inset-bottom));overflow:hidden;border:0;background:rgba(15,12,10,.94)}
.chat-image-viewer[open]{display:grid;place-items:center}
.chat-image-viewer::backdrop{background:rgba(15,12,10,.88);backdrop-filter:blur(3px)}
.chat-image-viewer img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;box-shadow:0 18px 58px rgba(0,0,0,.42);user-select:none;-webkit-user-drag:none}
.chat-image-viewer button{position:fixed;z-index:2;top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));display:grid;width:46px;height:46px;padding:0;place-items:center;border:1px solid rgba(255,255,255,.48);border-radius:50%;background:rgba(28,22,19,.72);color:#fff;font-size:31px;line-height:1;cursor:pointer}
body:has(.chat-image-viewer[open]){overflow:hidden}

/* 위치 공유 메시지는 긴 URL 대신 누르면 바로 지도 앱·사이트로 연결되는 카드로 표시합니다. */
.chat-location-card{display:flex;box-sizing:border-box;width:min(300px,100%);align-items:flex-start;gap:11px;padding:13px;border-radius:13px;background:rgba(255,255,255,.16);color:inherit;text-decoration:none}.bubble-row:not(.mine) .chat-location-card{background:#faf6f2;color:#342820}.chat-location-pin{display:grid;width:40px;height:40px;flex:0 0 auto;place-items:center;border-radius:50%;background:#fff;color:#a66d43;font-size:13px}.chat-location-pin::before{content:"⌖";font-size:24px}.chat-location-pin{font-size:0}.chat-location-card>span:last-child{display:grid;min-width:0;gap:4px}.chat-location-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-location-card small{display:-webkit-box;overflow:hidden;color:inherit;opacity:.72;font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chat-location-card em{margin-top:3px;color:inherit;font-size:12px;font-style:normal;font-weight:900}.chat-location-card:hover,.chat-location-card:focus-visible{outline:2px solid #d7ae8d;outline-offset:2px}.chat-friend-profile .chat-friend-avatar:has(img){cursor:zoom-in}
