
:root{
  --ink:#0d0d10;
  --ivory:#F6F4EF;
  --line:rgba(221,214,200,0.72);
  --gold:#AE965C;
  --blue:#2B6CB0;
  --shadow:0 20px 60px rgba(0,0,0,0.12);
  --shadow2:0 10px 25px rgba(0,0,0,0.08);
  --r:22px;
  --pad:clamp(16px, 4vw, 40px);
  --max:1180px;
  --ease:cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 900px at 15% 12%, rgba(174,150,92,0.14), rgba(0,0,0,0) 60%),
    radial-gradient(900px 800px at 85% 18%, rgba(43,108,176,0.07), rgba(0,0,0,0) 55%),
    var(--ivory);
  line-height:1.55;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none;}
.wrap{width:min(var(--max), calc(100% - var(--pad)*2)); margin:0 auto;}
strong{font-weight:800;}
code{
  background:rgba(13,13,16,0.06);
  border:1px solid rgba(221,214,200,0.75);
  padding:2px 6px;
  border-radius:10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:0.9em;
}

.topbar{
  position:sticky; top:0; z-index:40;
  backdrop-filter: blur(14px);
  background: rgba(246,244,239,0.78);
  border-bottom:1px solid rgba(221,214,200,0.55);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0; gap:14px;
}
.brand{display:flex; align-items:center; gap:12px; min-width:240px;}
.mark{
  width:42px; height:42px; border-radius:16px;
  border:1px solid rgba(221,214,200,0.92);
  background:linear-gradient(135deg,#0b0b0d,#232329);
  box-shadow:0 14px 34px rgba(0,0,0,0.14);
  position:relative;
}
.mark::after{
  content:"ST";
  position:absolute; inset:0;
  display:grid; place-items:center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight:700;
  letter-spacing:1px;
  color:rgba(246,244,239,0.96);
  font-size:14px;
}
.b1{font-family: Georgia, "Times New Roman", serif; font-weight:700; font-size:18px; line-height:1.1;}
.b2{font-size:12px; color:rgba(13,13,16,0.62); margin-top:2px;}
.navRight{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}

.pill{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.86);
  box-shadow:var(--shadow2);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  user-select:none;
  transition:transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.pill:hover{transform:translateY(-1px); box-shadow:0 18px 45px rgba(0,0,0,0.14);}
.pill.gold{border-color:rgba(174,150,92,0.74);}
.pill.ghost{background:rgba(255,255,255,0.64);}
.pill.badge{cursor:default; box-shadow:none; padding:10px 12px; font-size:12px;}
.pill.danger{border-color:rgba(185,28,28,0.35); background:rgba(185,28,28,0.08);}

.app{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:16px;
  padding:16px 0 56px;
}

.sidebar{
  border-radius:var(--r);
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.72);
  box-shadow:var(--shadow2);
  overflow:hidden;
  min-height: calc(100vh - 110px);
  display:flex;
  flex-direction:column;
}
.sideHeader{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(221,214,200,0.75);
}
.hTitle{font-weight:900; font-size:13px; letter-spacing:0.12px; color:rgba(13,13,16,0.78);}
.iconBtn{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.86);
  background:rgba(255,255,255,0.74);
  box-shadow:var(--shadow2);
  cursor:pointer;
  transition:transform 180ms var(--ease);
}
.iconBtn:hover{transform:translateY(-1px);}

.search{padding:10px 14px; border-bottom:1px solid rgba(221,214,200,0.75);}
.search input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.85);
  outline:none;
  font-size:13px;
}

.channels{padding:8px; overflow:auto; flex:1;}
.channel{
  padding:12px 12px;
  border-radius:16px;
  border:1px solid transparent;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
  transition:background 180ms var(--ease), transform 180ms var(--ease), border-color 180ms var(--ease);
}
.channel:hover{background:rgba(255,255,255,0.86); transform:translateY(-1px); border-color:rgba(221,214,200,0.75);}
.channel.active{background:rgba(255,255,255,0.92); border-color:rgba(174,150,92,0.55);}
.channel .name{font-weight:900; font-size:13px;}
.channel .desc{margin-top:3px; font-size:12px; color:rgba(13,13,16,0.62);}
.channel .count{font-size:12px; color:rgba(13,13,16,0.62); white-space:nowrap;}

.sideFooter{padding:12px 14px; border-top:1px solid rgba(221,214,200,0.75);}
.miniTitle{font-weight:900; font-size:12px; letter-spacing:0.12px;}
.miniText{margin-top:6px; font-size:12px; color:rgba(13,13,16,0.70);}

.main{
  border-radius:var(--r);
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.72);
  box-shadow:var(--shadow2);
  overflow:hidden;
  min-height: calc(100vh - 110px);
  display:flex;
  flex-direction:column;
}
.mainHeader{
  padding:14px 16px 12px;
  border-bottom:1px solid rgba(221,214,200,0.75);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.roomTitle{font-weight:900; font-size:14px; letter-spacing:0.12px;}
.roomSub{margin-top:4px; font-size:12px; color:rgba(13,13,16,0.62); max-width:68ch;}
.mainActions{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.status{font-size:12px; color:rgba(13,13,16,0.62);}

.filterRow{
  padding:10px 16px 12px;
  border-bottom:1px solid rgba(221,214,200,0.75);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  background:rgba(255,255,255,0.58);
}
.chips{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.chip{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(221,214,200,0.85);
  background:rgba(255,255,255,0.75);
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.chip.active{
  border-color:rgba(174,150,92,0.75);
  background:rgba(255,255,255,0.92);
  box-shadow:0 10px 24px rgba(0,0,0,0.08);
}
.search2{flex:1; min-width:220px; display:flex; justify-content:flex-end;}
.search2 input{
  width:min(420px, 100%);
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.85);
  outline:none;
  font-size:13px;
}

.timeline{
  padding:16px;
  overflow:auto;
  flex:1;
  background:
    radial-gradient(900px 600px at 15% 20%, rgba(174,150,92,0.08), rgba(0,0,0,0) 58%),
    radial-gradient(800px 600px at 85% 40%, rgba(43,108,176,0.06), rgba(0,0,0,0) 55%);
}
.daySep{
  margin:12px 0 10px;
  font-size:12px;
  color:rgba(13,13,16,0.62);
  display:flex; align-items:center; gap:10px;
}
.daySep::before,.daySep::after{content:""; height:1px; flex:1; background:rgba(221,214,200,0.85);}

.msg{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap:10px;
  padding:12px 12px;
  border-radius:18px;
  border:1px solid rgba(221,214,200,0.70);
  background:rgba(255,255,255,0.78);
  box-shadow:0 12px 30px rgba(0,0,0,0.06);
  margin-bottom:10px;
}
.avatar{
  width:42px; height:42px; border-radius:16px;
  border:1px solid rgba(221,214,200,0.85);
  background:linear-gradient(135deg, rgba(174,150,92,0.20), rgba(43,108,176,0.10));
  display:grid; place-items:center;
  font-weight:900;
  color:rgba(13,13,16,0.70);
}
.msgTop{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.author{font-weight:900; font-size:13px;}
.time{font-size:12px; color:rgba(13,13,16,0.62);}
.body{margin-top:6px; font-size:14px; color:rgba(13,13,16,0.80); white-space:pre-wrap; word-break:break-word;}
.meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  align-items:center;
}
.miniBtn{
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.70);
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.miniBtn:hover{transform:translateY(-1px);}
.badgeTxt{font-size:12px; color:rgba(13,13,16,0.62);}
.reactRow{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.react{
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.78);
  border-radius:999px;
  padding:7px 10px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.react.on{border-color:rgba(174,150,92,0.75); background:rgba(174,150,92,0.10);}
.reactCount{opacity:0.72; font-weight:800; margin-left:6px;}

.attachments{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.thumb{
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.90);
  box-shadow:0 10px 25px rgba(0,0,0,0.07);
  overflow:hidden;
  cursor:pointer;
}
.thumb img{
  display:block;
  width:160px;
  height:120px;
  object-fit:cover;
}
.filepill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.86);
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}

.composer{
  border-top:1px solid rgba(221,214,200,0.75);
  padding:14px 16px 16px;
  background:rgba(255,255,255,0.66);
}
.composerTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
#nickname{
  width:min(420px, 100%);
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.85);
  outline:none;
  font-size:13px;
}
.hint{font-size:12px; color:rgba(13,13,16,0.62);}
#message{
  width:100%;
  margin-top:10px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.90);
  outline:none;
  font-size:14px;
  min-height:96px;
  resize:vertical;
}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
select{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.85);
  outline:none;
  font-size:13px;
  font-weight:800;
}

.uploadRow{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.uploadList{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.uploadItem{
  border-radius:999px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.82);
  padding:10px 12px;
  font-weight:900;
  font-size:12px;
  display:flex;
  gap:10px;
  align-items:center;
}
.uploadItem button{
  border:none;
  background:transparent;
  cursor:pointer;
  font-weight:900;
  opacity:0.7;
}
.uploadItem button:hover{opacity:1;}

.modal{
  position:fixed; inset:0;
  display:none; align-items:center; justify-content:center;
  padding:18px;
  background:rgba(10,10,10,0.72);
  z-index:200;
}
.modal.open{display:flex;}
.modalCard{
  width:min(980px, 100%);
  border-radius:24px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.92);
  box-shadow:0 26px 95px rgba(0,0,0,0.55);
  overflow:hidden;
}
.modalHeader{
  padding:14px 16px;
  border-bottom:1px solid rgba(221,214,200,0.75);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.modalTitle{font-weight:900; font-size:14px; letter-spacing:0.12px;}
.modalBody{padding:16px;}
.modalFooter{padding:14px 16px; border-top:1px solid rgba(221,214,200,0.75); display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;}
.field{margin-top:10px;}
.field label{display:block; font-size:12px; font-weight:900; letter-spacing:0.12px; color:rgba(13,13,16,0.78); margin-bottom:6px;}
.field input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.85);
  outline:none;
  font-size:13px;
}
.callout{
  margin-top:14px;
  border-radius:18px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.80);
  padding:14px;
}
.callTitle{font-weight:900; font-size:12px; letter-spacing:0.12px;}
.callText{margin-top:6px; font-size:13px; color:rgba(13,13,16,0.72);}
.previewArea{
  border-radius:18px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.82);
  padding:14px;
  font-size:14px;
  color:rgba(13,13,16,0.80);
  white-space:pre-wrap;
}

.lightbox{
  display:flex; justify-content:center; align-items:center;
}
.lightbox img{
  max-width:min(980px, 100%);
  max-height:78vh;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:0 26px 95px rgba(0,0,0,0.55);
  background:#fff;
}

.threadWrap{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:14px;
}
.threadMain{
  border-radius:18px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.82);
  overflow:hidden;
}
.threadHeader{
  padding:12px 14px;
  border-bottom:1px solid rgba(221,214,200,0.75);
  font-weight:900;
  font-size:13px;
}
.threadList{
  padding:14px;
  max-height:60vh;
  overflow:auto;
}
.threadComposer{
  border-top:1px solid rgba(221,214,200,0.75);
  padding:12px 14px;
}
.threadComposer textarea{
  width:100%;
  min-height:90px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(221,214,200,0.92);
  background:rgba(255,255,255,0.90);
  outline:none;
  font-size:14px;
  resize:vertical;
}
.threadSide{
  border-radius:18px;
  border:1px solid rgba(221,214,200,0.82);
  background:rgba(255,255,255,0.82);
  padding:14px;
  height:fit-content;
}

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:rgba(13,13,16,0.92);
  color:rgba(246,244,239,0.96);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  padding:12px 14px;
  font-weight:900;
  font-size:13px;
  box-shadow:0 18px 60px rgba(0,0,0,0.35);
  display:none;
  z-index:400;
}

@media (max-width: 980px){
  .app{grid-template-columns:1fr; gap:14px;}
  .sidebar{min-height:auto;}
  .threadWrap{grid-template-columns:1fr;}
}
