body.in-room { min-height: 100vh; }
body.in-room #v-app { height: 100%; display: flex; flex-direction: column; }
body.in-room .mmain { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: 920px; width: 100%; padding-top: 0; padding-bottom: 0; }
.room { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

.strip { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 12px; border-bottom: 1px solid var(--navy-line); flex-shrink: 0; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-bro { position: relative; background: none; border: 0; color: var(--silver-soft); display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; padding: 0; min-width: 58px; }
.strip-bro:hover .av, .strip-bro:focus-visible .av { box-shadow: 0 0 0 2px var(--silver); }
.strip-bro:focus-visible { outline: none; }
.strip-name { font-size: 12px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { position: absolute; top: 40px; right: 6px; width: 13px; height: 13px; border-radius: 50%; background: #3FB86A; border: 2px solid var(--navy); }

.av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--navy-line); display: inline-flex; align-items: center; justify-content: center;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 14px; color: var(--silver); flex-shrink: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-lg { width: 54px; height: 54px; font-size: 18px; }

.feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.feed-inner { padding: 8px 0 16px; display: flex; flex-direction: column; }
.room-start { text-align: center; padding: 28px 12px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--silver-soft); font-size: 14px; }
.room-start b { font-family: "Oswald", sans-serif; font-size: 22px; letter-spacing: 3px; text-transform: uppercase; color: var(--white); }
.older { text-align: center; padding: 12px 0; }
.room-note { color: var(--silver-soft); text-align: center; padding: 16px; margin: 0; font-size: 14px; }
.dayline { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; color: var(--silver); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.dayline::before, .dayline::after { content: ""; flex: 1; height: 1px; background: var(--navy-line); }

.msg { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 0 12px; padding: 8px 6px 4px; border-radius: 8px; }
.msg.grouped { padding-top: 2px; }
.msg:hover { background: rgba(255, 255, 255, 0.03); }
.msg.flash { background: rgba(138, 42, 44, 0.35); transition: background 0.4s; }
.av-btn { background: none; border: 0; padding: 0; cursor: pointer; align-self: start; }
.av-gap { width: 38px; }
.mbody { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mmeta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mname { background: none; border: 0; padding: 0; color: var(--white); font-weight: 600; font-size: 15px; cursor: pointer; }
.mname:hover { text-decoration: underline; }
.msg.me .mname { color: #E9B8B9; }
.mmeta time, .mmeta small { font-size: 12px; color: var(--silver); }
.text { margin: 0; font-size: 15.5px; line-height: 1.55; color: #ECEDEF; white-space: pre-wrap; overflow-wrap: anywhere; }
.text a { color: #C9D6F2; }
.removed { margin: 0; font-style: italic; color: var(--silver); font-size: 14px; }
.quote { display: flex; flex-direction: column; text-align: left; background: var(--navy-deep); border: 0; border-left: 3px solid var(--maroon-bright); border-radius: 0 6px 6px 0; padding: 6px 10px; color: var(--silver-soft); font-size: 13px; cursor: pointer; max-width: 520px; }
.quote b { color: var(--white); font-weight: 600; }
.quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gif { max-width: min(320px, 100%); border-radius: 8px; display: block; }
.pics { display: grid; gap: 4px; max-width: 460px; }
.pics-1 { grid-template-columns: minmax(0, 1fr); }
.pics-2, .pics-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pic { padding: 0; border: 0; background: var(--navy-line); border-radius: 6px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1; max-width: 100%; }
.pics-1 .pic { aspect-ratio: auto; max-height: 420px; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid { max-width: min(460px, 100%); max-height: 420px; border-radius: 8px; background: #000; }
.aud { display: flex; flex-direction: column; gap: 6px; background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: 10px; padding: 10px 12px; max-width: 360px; font-size: 13px; color: var(--silver-soft); }
.aud audio { width: 100%; height: 36px; }
.filelink { display: inline-flex; align-items: center; gap: 10px; background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: 10px; padding: 10px 14px; color: var(--white); text-decoration: none; max-width: 360px; font-size: 14px; }
.filelink span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelink small { color: var(--silver); flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--navy-deep); border: 1px solid var(--navy-line); border-radius: 999px; padding: 2px 10px; font-size: 15px; color: var(--white); cursor: pointer; min-height: 30px; }
.chip span { font-size: 12px; color: var(--silver-soft); font-weight: 600; }
.chip.mine { border-color: var(--maroon-bright); background: rgba(138, 42, 44, 0.3); }
.mact { position: relative; align-self: start; }
.mact-btn { background: none; border: 1px solid transparent; color: var(--silver); border-radius: 6px; width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1; }
.msg:hover .mact-btn, .mact-btn:focus-visible { border-color: var(--navy-line); color: var(--white); }
@media (hover: hover) { .mact-btn { opacity: 0; } .msg:hover .mact-btn, .mact-btn:focus-visible, .mact-btn[aria-expanded="true"] { opacity: 1; } }
.menu { position: absolute; right: 0; top: 38px; z-index: 6; background: #0B1427; border: 1px solid var(--navy-line); border-radius: 10px; padding: 8px; width: 236px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
.menu.up { top: auto; bottom: 38px; }
.menu-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--navy-line); margin-bottom: 4px; }
.menu-quick button { background: none; border: 0; font-size: 22px; min-height: 44px; border-radius: 6px; cursor: pointer; }
.menu-quick button:hover { background: var(--navy-line); }
.menu-item { background: none; border: 0; color: var(--white); text-align: left; padding: 10px; border-radius: 6px; cursor: pointer; font-size: 14px; min-height: 40px; }
.menu-item:hover { background: var(--navy-line); }
.menu-item.danger { color: #F2A7A8; }

.composer { position: relative; flex-shrink: 0; border-top: 1px solid var(--navy-line); padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; background: var(--navy); }
.crow { display: flex; align-items: flex-end; gap: 6px; }
.crow textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px !important; padding: 11px 16px !important; line-height: 1.4; }
.cicon { position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--navy-line); background: var(--navy-deep); color: var(--silver-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cicon:hover { color: var(--white); border-color: var(--silver); }
.cicon input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gifbtn { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.csend { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--maroon); color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.csend:hover { background: var(--maroon-bright); }
.csend:disabled { opacity: 0.6; cursor: wait; }
.cbtn { background: var(--navy-deep); border: 1px solid var(--navy-line); color: var(--white); border-radius: 999px; padding: 0 14px; min-height: 36px; cursor: pointer; font-size: 13px; }
.cbtn-strong { background: var(--maroon); border-color: var(--maroon); }
.replybar, .recbar { display: flex; align-items: center; gap: 10px; background: var(--navy-deep); border-left: 3px solid var(--maroon-bright); border-radius: 0 8px 8px 0; padding: 8px 10px; font-size: 13px; color: var(--silver-soft); }
.replybar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replybar b { color: var(--white); }
.recbar { border-left-color: #E05656; }
.recbar span:nth-child(3) { flex: 1; }
.recdot { width: 10px; height: 10px; border-radius: 50%; background: #E05656; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .recdot { animation: none; } }
.pending { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.pfile { position: relative; flex-shrink: 0; width: 76px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pfile img, .ptype { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; background: var(--navy-deep); border: 1px solid var(--navy-line); display: flex; align-items: center; justify-content: center; color: var(--silver-soft); }
.pname { font-size: 11px; color: var(--silver-soft); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premove { background: var(--navy-line); border: 0; color: var(--white); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.pfile .premove { position: absolute; top: -8px; right: -8px; }
.panel { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 7; width: min(360px, 100%); max-height: 340px; overflow-y: auto; background: #0B1427; border: 1px solid var(--navy-line); border-radius: 12px; padding: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
.emoji-grid button { background: none; border: 0; font-size: 24px; min-height: 40px; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover { background: var(--navy-line); }
.gif-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.gif-grid button { padding: 0; border: 0; background: var(--navy-line); border-radius: 6px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.gif-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-credit { margin: 8px 0 0; font-size: 11px; color: var(--silver); text-align: right; }
.lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(5, 9, 18, 0.92); display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy-line); color: var(--white); font-size: 18px; cursor: pointer; }

@media (max-width: 560px) {
  .msg { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0 10px; padding-inline: 2px; }
  .av { width: 34px; height: 34px; font-size: 13px; }
  .av-gap { width: 34px; }
  .av-lg { width: 50px; height: 50px; }
  .dot { top: 36px; }
  .crow { gap: 4px; }
  .cicon, .csend { width: 40px; height: 40px; }
  .menu, .menu.up { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: auto; }
}

#member-features .room, .shop-admin .room { height: min(72dvh, 850px); min-height: 380px; }
.shop-admin { background: var(--navy); color: var(--white); border-radius: 8px; padding: 24px; }
#shop-connection { margin: 0; color: var(--silver-soft); font-size: 13px; }
@media (max-width: 540px) { .shop-admin { padding: 14px; } #member-features .room { height: 68dvh; } }
