/* ===================== 2breath · PLATFORM ===================== */

body { background: var(--bg-tint); overflow: hidden; }

/* browser window frame */
.browser { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 0; }
.browser-chrome {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px 16px; flex: none;
}
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 99px; display: block; }
.dots i:nth-child(1){ background:#E8857A; } .dots i:nth-child(2){ background:#E8C57A; } .dots i:nth-child(3){ background:#92C892; }
.url {
  flex: 1; max-width: 460px; margin: 0 auto;
  background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 7px 16px; font-size: 13px; color: var(--text-2); font-family: var(--mono);
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.url svg { width: 13px; height: 13px; }
.chrome-actions { display: flex; align-items: center; gap: 12px; }

/* app shell */
.app {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 260px 1fr 340px;
  background: var(--bg); border: none;
  border-radius: 0; overflow: hidden;
}

/* left sidebar */
.side { border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 22px 16px; gap: 4px; background: var(--surface); }
.side .logo { margin: 4px 8px 22px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-md); color: var(--text-2);
  font-size: 15.5px; font-weight: 500; text-align: left;
  transition: background .2s, color .2s; position: relative;
}
.nav-item svg { width: 21px; height: 21px; flex: none; }
.room-row .ri svg { width: 18px; height: 18px; }
.rail-card h4 svg { width: 15px; height: 15px; }
.menu-btn svg { width: 18px; height: 18px; }
.cmt-input .send svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--bg-tint); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--accent); font-weight: 600; }
[data-theme="dark"] .nav-item.active { color: var(--accent-2); }
.nav-item.active::before { content:""; position:absolute; left:-16px; top:50%; transform:translateY(-50%); width:3px; height:22px; border-radius:99px; background: var(--brand-grad); }
.nav-item .badge-n { margin-left: auto; background: var(--warm); color: #5a3925; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.side-sep { height: 1px; background: var(--border); margin: 14px 8px; }
.side-foot { margin-top: auto; }
.side-actions { display: flex; align-items: center; gap: 10px; padding: 0 6px 12px; }
.side-actions .btn { flex: 1; }
.me-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); cursor: pointer; transition: background .2s; }
.me-card:hover { background: var(--bg-tint); }
.me-card .av { width: 40px; height: 40px; border-radius: 3px; flex: none; }
.me-card b { font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.me-card span { font-size: 13px; color: var(--text-2); }

/* center column */
.main { overflow-y: auto; padding: 0; }
.main-inner { max-width: 660px; margin: 0 auto; padding: 28px 28px 80px; }
.greet { margin-bottom: 22px; }
.greet h2 { font-size: 27px; margin-bottom: 4px; }
.greet p { color: var(--text-2); font-size: 15.5px; }

.filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; position: sticky; top: 0; }
.chip {
  padding: 9px 16px; border-radius: 3px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.need { color: var(--gold); border-color: color-mix(in srgb,var(--gold) 40%, transparent); }
.chip.need.active { background: var(--gold); color: #3a2c0a; border-color: var(--gold); }

/* composer trigger */
.composer-trigger {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px; margin-bottom: 22px; text-align: left; transition: border-color .2s, box-shadow .2s;
}
.composer-trigger:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.composer-trigger .av { width: 40px; height: 40px; border-radius: 3px; flex: none; }
.composer-trigger span { color: var(--text-3); font-size: 16px; }
.composer-trigger .go { margin-left: auto; background: var(--accent); color: var(--on-accent); padding: 9px 18px; border-radius: 3px; font-size: 14px; font-weight: 600; }

/* post card */
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 24px; margin-bottom: 16px; transition: border-color .25s, box-shadow .25s;
}
.post.need { border-color: color-mix(in srgb,var(--gold) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb,var(--gold) 12%, transparent); }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-head .av { width: 46px; height: 46px; border-radius: 3px; flex: none; }
.post-head .av.anon { display: grid; place-items: center; font-size: 20px; }
.post-meta { min-width: 0; }
.post-meta .name { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.star { color: var(--gold); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; }
.post-meta .sub { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.mood { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 3px; font-size: 12.5px; font-weight: 500; }
.tag { color: var(--accent); font-weight: 500; }
[data-theme="dark"] .tag { color: var(--accent-2); }
.need-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--gold); background: color-mix(in srgb,var(--gold) 14%, transparent); padding: 2px 9px; border-radius: 3px; }
.menu-btn { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; color: var(--text-2); transition: background .2s; }
.menu-btn:hover { background: var(--bg-tint); }
.post-body { font-size: 16px; line-height: 1.6; color: var(--text); margin-bottom: 16px; }
.post-body.clip { cursor: pointer; }

/* link preview */
.link-prev { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; text-decoration: none; transition: border-color .2s; }
.link-prev:hover { border-color: var(--border-2); }
.link-prev .thumb { width: 120px; flex: none; }
.link-prev .lp-body { padding: 12px 16px; min-width: 0; }
.link-prev .lp-body b { font-size: 14.5px; display: block; margin-bottom: 3px; }
.link-prev .lp-body p { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.link-prev .lp-body .dom { font-size: 12px; color: var(--text-3); font-family: var(--mono); }

/* reaction row */
.react-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.react {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-full);
  background: var(--bg-tint); border: 1px solid transparent; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .2s; user-select: none;
}
.react:hover { color: var(--text); transform: translateY(-1px); }
.react .e { font-size: 17px; }
.react.on { background: var(--surface); color: var(--text); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.react.helped { margin-left: auto; }
.react.helped.on { color: #6b5318; border-color: var(--gold); background: color-mix(in srgb,var(--gold) 16%, transparent); }
[data-theme="dark"] .react.helped.on { color: var(--gold); }
.react.helped .e { color: var(--gold); }
.react.bloom { animation: bloom .5s var(--ease); }
@keyframes bloom { 0% { box-shadow: 0 0 0 0 color-mix(in srgb,var(--gold) 60%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.cmt-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-full); color: var(--text-2); font-size: 14px; font-weight: 500; transition: background .2s,color .2s; }
.cmt-btn:hover { background: var(--bg-tint); color: var(--text); }
.cmt-btn.right { margin-left: auto; }
.react svg, .cmt-btn svg { width: 17px; height: 17px; }

/* right rail */
.rail { border-left: 1px solid var(--border); overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; background: var(--surface); }
.rail-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
[data-theme="dark"] .rail-card { background: var(--bg-tint); }
.rail-card h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.awake { display: flex; flex-direction: column; gap: 12px; }
.awake-row { display: flex; align-items: center; gap: 11px; }
.awake-row .av { width: 34px; height: 34px; border-radius: 3px; flex: none; position: relative; }
.awake-row .av::after { content:""; position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border-radius:99px; background: var(--success); border: 2px solid var(--bg); }
[data-theme="dark"] .awake-row .av::after { border-color: var(--bg-tint); }
.awake-row b { font-size: 14px; }
.awake-row span { font-size: 12px; color: var(--text-2); font-family: var(--mono); margin-left: auto; }

/* breathing widget mini */
.breathe-mini { text-align: center; }
.bm-circle { width: 110px; height: 110px; margin: 6px auto 14px; border-radius: 50%; background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--glow); }
.bm-circle.run { animation: bmbreath 11s ease-in-out infinite; }
@keyframes bmbreath { 0%{transform:scale(.8)} 36%{transform:scale(1.08)} 64%{transform:scale(1.08)} 100%{transform:scale(.8)} }

.room-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.room-row .ri { width: 36px; height: 36px; border-radius: var(--r-sm); flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--accent); }
[data-theme="dark"] .room-row .ri { color: var(--accent-2); }
.room-row b { font-size: 14px; display: block; } .room-row span { font-size: 12px; color: var(--text-2); }

/* ---------- post detail ---------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14.5px; font-weight: 500; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }
.comments { margin-top: 26px; }
.comments h4 { font-family: var(--sans); font-size: 14px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 18px; }
.comment { display: flex; gap: 12px; margin-bottom: 18px; }
.comment .av { width: 38px; height: 38px; border-radius: 3px; flex: none; display:grid; place-items:center; }
.comment .c-body { background: var(--bg-tint); border-radius: var(--r-md); padding: 12px 16px; flex: 1; }
.comment .c-body .name { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; margin-bottom: 3px; }
.comment .c-body .name span { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.comment .c-body p { font-size: 14.5px; line-height: 1.55; }
.comment .c-react { display: flex; gap: 14px; margin-top: 8px; padding-left: 2px; }
.comment .c-react button { font-size: 12.5px; color: var(--text-3); display: inline-flex; gap: 4px; align-items: center; }
.comment .c-react button:hover { color: var(--text); }
.cmt-input { display: flex; gap: 12px; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; }
.cmt-input input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 13px 20px; font-size: 15px; font-family: var(--sans); color: var(--text); }
.cmt-input input:focus { outline: none; border-color: var(--accent); }
.cmt-input .send { width: 46px; height: 46px; border-radius: 99px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }

/* ---------- profile ---------- */
.cover { height: 180px; border-radius: var(--r-xl); background: var(--brand-grad); position: relative; overflow: hidden; margin-bottom: 0; }
.cover::after { content:""; position:absolute; inset:0; background: radial-gradient(90% 140% at 80% 0%, rgba(255,255,255,.25), transparent 60%); }
.prof-head { display: flex; align-items: flex-end; gap: 20px; margin: -46px 0 22px; padding: 0 6px; position: relative; }
.prof-head .pav { width: 104px; height: 104px; border-radius: 4px; border: 5px solid var(--bg); flex: none; }
.prof-head .pinfo { padding-bottom: 6px; flex: 1; }
.prof-head .pinfo h2 { font-size: 27px; display: flex; align-items: center; gap: 10px; }
.prof-head .pinfo .sub { color: var(--text-2); font-size: 15px; margin-top: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prof-actions { display: flex; gap: 10px; padding-bottom: 6px; }
.bio { font-size: 16px; line-height: 1.6; color: var(--text); margin-bottom: 22px; max-width: 56ch; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.bdg { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 3px; background: var(--bg-tint); border: 1px solid var(--border); font-size: 13.5px; font-weight: 500; }
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 26px; }
.gallery .ph { aspect-ratio: 1; border-radius: var(--r-md); }
.gallery .ph span { font-size: 10px; }
.prof-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.prof-tabs button { padding: 12px 18px; font-size: 15px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.prof-tabs button.active { color: var(--text); border-color: var(--accent); }

/* ---------- modal (composer / breathing) ---------- */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 40%, rgba(10,8,20,.5)); backdrop-filter: blur(6px); z-index: 200; display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .3s var(--ease); max-height: 88vh; overflow: auto; }
.overlay.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal-head .x { width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; color: var(--text-2); }
.modal-head .x:hover { background: var(--bg-tint); }
.modal-body { padding: 22px; }
.modal-body textarea { width: 100%; border: none; background: transparent; resize: none; font-family: var(--sans); font-size: 18px; line-height: 1.55; color: var(--text); min-height: 130px; }
.modal-body textarea:focus { outline: none; }
.composer-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.tool { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-md); background: var(--bg-tint); font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: color .2s, background .2s; }
.tool:hover { color: var(--text); }
.tool svg { width: 17px; height: 17px; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-top: 1px solid var(--border); }
.opt-row .txt { flex: 1; } .opt-row .txt b { font-size: 14.5px; display: block; } .opt-row .txt span { font-size: 13px; color: var(--text-2); }
.switch { width: 46px; height: 27px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .25s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 99px; background: #fff; transition: transform .25s; box-shadow: var(--shadow-sm); }
.switch.on { background: var(--accent); } .switch.on i { transform: translateX(19px); }
.modal-foot { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }

/* big breathing widget */
.breath-big { text-align: center; padding: 12px 0 4px; }
.bb-stage { width: 220px; height: 220px; margin: 10px auto 22px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.bb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--border-2); }
.bb-core { width: 130px; height: 130px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 600; box-shadow: var(--glow); transition: transform .2s linear; }
.pattern-pick { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }

/* hidden views */
.view { display: none; } .view.active { display: block; }

/* responsive: collapse rails */
@media (max-width: 1200px) { .app { grid-template-columns: 248px 1fr; } .rail { display: none; } }
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .side { position: absolute; left: -260px; }
}
