:root {
  color-scheme: dark;
  --app: #080e19;
  --panel: #121a26;
  --panel-strong: #17202e;
  --glass-a: #163149;
  --glass-b: #09111a;
  --border: #424854;
  --border-blue: #426084;
  --text: #dfe5f5;
  --muted: #a5abb9;
  --accent: #00f5f5;
  --purple: #929bfa;
  --green: #8eff71;
  --danger: #ff716c;
  font: 14px "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { display: grid; place-items: center; color: var(--text); background: #edf7f1; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ambient-a { width: 480px; height: 480px; left: -170px; top: 170px; background: #ddf5e7; }
.ambient-b { width: 560px; height: 560px; right: -170px; bottom: -180px; background: #dcebe1; }

.app-window {
  position: relative;
  width: min(calc(100vw - 58px), calc((100vh - 32px) * 1.617));
  height: min(calc(100vh - 32px), calc((100vw - 58px) / 1.617));
  min-width: 900px;
  min-height: 556px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--app);
  box-shadow: 0 16px 42px #06121d55;
  animation: app-enter .22s ease-out both;
}
@keyframes app-enter { from { opacity: 0; transform: scale(.992); } }
.titlebar {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #426084;
  background: linear-gradient(115deg, #17273b, #0b1421 42%, #1f4c73);
}
.traffic { position: absolute; left: 17px; display: flex; gap: 8px; }
.traffic i { width: 15px; height: 15px; border-radius: 50%; background: #ff5a5f; box-shadow: inset 0 -2px 2px #0005; }
.traffic i:nth-child(2) { background: #ffbf27; }
.traffic i:nth-child(3) { background: #32c954; }
.title-logo { width: 50px; height: 32px; object-fit: contain; }
.fullscreen-btn { position: absolute; right: 12px; height: 36px; padding: 0 16px; border: 1px solid #00e4fa; border-radius: 19px; background: #1a3956; box-shadow: 0 0 10px #00ecff88; font-size: 12px; font-weight: 700; cursor: pointer; }

.app-body {
  position: relative;
  height: calc(100% - 54px);
  padding: 16px 49px 86px;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 12%, #15344e 0 10%, transparent 25%),
    radial-gradient(circle at 94% 32%, #082f3a 0 20%, transparent 34%),
    repeating-linear-gradient(0deg, #ffffff05 0 1px, transparent 1px 4px),
    #080e19;
}
.commandbar {
  position: relative;
  z-index: 2;
  height: 111px;
  padding: 13px 13px 13px 48px;
  display: grid;
  grid-template-columns: 210px 1fr auto 44px;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-blue);
  border-radius: 30px;
  background: linear-gradient(135deg, #163149ee, #102132ee 48%, #09111af5);
}
.commandbar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 8% 0%, #2b5b8155, transparent 24%), radial-gradient(circle at 19% 0%, #4b438044, transparent 20%); }
.brand-logo { position: relative; z-index: 1; width: 125px; height: 82px; object-fit: contain; }
.global-search { position: relative; z-index: 1; height: 56px; padding: 0 18px; display: flex; align-items: center; gap: 15px; border: 1px solid #355173; border-radius: 28px; background: #0c1523; }
.global-search::after { content: ""; position: absolute; left: 48px; right: 20px; bottom: -1px; height: 1px; background: linear-gradient(90deg, #a8c9ff, #56d5ff 56%, #78f777); opacity: .7; }
.global-search span { color: #9dd6f8; font-size: 22px; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.account-pill { position: relative; z-index: 1; height: 49px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #3a5268; border-radius: 18px; background: #0b1725; cursor: pointer; }
.account-pill > span:last-child { display: grid; text-align: left; }
.account-pill strong { font-size: 12px; }
.account-pill small { color: #c4d8e6; font-size: 10px; }
.avatar { width: 29px; height: 29px; flex: none; display: inline-grid; place-items: center; overflow: hidden; border-radius: 10px; background: #586a83; color: white; font-size: 10px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-cyan { background: #05bfe8; }
.round-btn, .icon-btn { display: grid; place-items: center; border: 1px solid #40516d; border-radius: 50%; background: #142337; cursor: pointer; }
.round-btn { position: relative; z-index: 1; width: 40px; height: 40px; }
.icon-btn { width: 32px; height: 32px; }

.site-nav {
  position: relative; z-index: 3; height: 53px; margin: 9px -49px 0; overflow: hidden;
  border: 0; border-top: 1px solid #08789d; border-bottom: 1px solid #16d5ed; border-radius: 0;
  background: linear-gradient(180deg,#03131c,#020b11);
  box-shadow: 0 5px 18px #0006, inset 0 -1px #0075a573;
}
.site-nav-track {
  width: calc(100% - 32px); max-width: 1120px; height: 51px; margin: 0 auto; padding: 4px 54px;
  display: flex; align-items: stretch; justify-content: center; gap: 3px; overflow-x: auto; scrollbar-width: none;
  background: url("assets/bg-globalnav-blueline.png") center / 100% 39px no-repeat;
}
.site-nav-track::-webkit-scrollbar { display: none; }
.site-nav a { position: relative; z-index: 1; flex: 0 0 auto; height: 43px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; color: #e8f9ff; font: 700 14px Bahnschrift,"Segoe UI",sans-serif; text-decoration: none; text-shadow: 0 1px 2px #000; transition: color .15s,background .15s,box-shadow .15s; }
.site-nav a:first-child { border: 1px solid #27d6f3; border-bottom-color: #8fe43f; background: linear-gradient(180deg,#147eae,#0a5077 52%,#06344e); box-shadow: inset 0 1px #bff8ffb8,inset 0 -3px #8fe43f,0 0 13px #1fc8f44d; color: #fff; }
.site-nav a:hover, .site-nav a:focus-visible { outline: 0; color: #fff; background: linear-gradient(180deg,#11709994,#03344cb3); box-shadow: inset 0 1px #57e2ff73,inset 0 -2px #33cfee; }
.site-nav a span { margin-left: 5px; font-size: 11px; }
.workspace { height: calc(100% - 184px); min-height: 0; margin-top: 10px; }
.screen { height: 100%; min-height: 0; display: grid; animation: workspace-in .18s ease-out both; }
@keyframes workspace-in { from { opacity: .45; transform: translateY(3px); } }
.panel { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #38577d; border-radius: 28px; background: linear-gradient(135deg, #163149de, #102132e8 48%, #09111af2); }
.panel-header { height: 40px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, #343a94, #2d3d8a 42%, #0c6b8c); font-size: 12px; }
.section-title { margin: 0; font-size: 15px; }
.muted { color: var(--muted); }
.eyebrow { color: #35e5ff; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.chip { min-height: 31px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid #305675; border-radius: 17px; background: #0b1828; font-size: 11px; }
.primary-action, .secondary-action { min-height: 38px; padding: 0 16px; border: 1px solid #2f8e4d; border-radius: 20px; background: linear-gradient(#8ecf56, #6db450 46%, #2f8e4d); color: white; font-weight: 800; cursor: pointer; }
.secondary-action { border-color: #345772; background: #0d1c2d; }
button:disabled { opacity: .48; cursor: default; }
.scroll-area { overflow: auto; scrollbar-width: thin; scrollbar-color: #29718e transparent; }
.scroll-area::-webkit-scrollbar, .pin-grid::-webkit-scrollbar { width: 7px; }
.scroll-area::-webkit-scrollbar-thumb, .pin-grid::-webkit-scrollbar-thumb { border-radius: 5px; background: linear-gradient(#c8ff7c, #4fa88b); }

/* Pins */
.pins-screen { grid-template-columns: 165px minmax(0, 1fr); gap: 8px; }
.pins-sidebar { padding: 14px 12px 12px; display: flex; flex-direction: column; }
.side-title { height: 37px; margin-bottom: 9px; display: grid; place-items: center; border: 1px solid #2f8e4d; border-radius: 13px; background: linear-gradient(#8ecf56, #6db450 46%, #2f8e4d); font-size: 11px; font-weight: 800; }
.pins-sidebar > p { margin: 0 2px 10px; color: #9db7c9; font-size: 11px; line-height: 1.45; }
.category-list { min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.category-list::-webkit-scrollbar { display: none; }
.category { min-height: 36px; padding: 0 12px; border: 1px solid #27526f; border-radius: 18px; background: #0d1b2b; text-align: left; font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.category:hover { transform: translateX(2px); border-color: #57d6ff; }
.category.active { border-color: #008da8; background: #0b2739; color: #8bbad0; }
.pins-actions { margin-top: auto; padding-top: 10px; display: grid; gap: 7px; }
.pins-actions button { height: 33px; border: 1px solid #34536d; border-radius: 17px; background: #0e1c2c; font-size: 11px; font-weight: 700; cursor: pointer; }
.pins-actions .generate { border-color: #2f8e4d; background: linear-gradient(#8ecf56, #2f8e4d); }
.pins-stats { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; font-size: 10px; }
.pins-stats span { padding: 5px 8px; border: 1px solid #315878; border-radius: 10px; }
.pins-main { min-width: 0; overflow: hidden; display: grid; grid-template-rows: 40px 58px minmax(0, 1fr) 28px; }
.mobile-category-strip { display: none; }
.feed-toolbar { padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #34536c; background: #101928; }
.feed-toolbar p { margin: 3px 0 0; color: #b7cfe0; font-size: 10px; }
.zoom-controls { display: flex; align-items: center; gap: 8px; }
.zoom-controls button, .zoom-controls span { min-width: 32px; height: 32px; padding: 0 9px; display: grid; place-items: center; border: 1px solid #2d516e; border-radius: 16px; background: #0a1727; font-size: 10px; }
.pin-grid { width: 100%; min-width: 0; min-height: 0; padding: 10px 22px 12px; overflow-x: clip; overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; }
.pin-grid::-webkit-scrollbar { width: 7px; height: 0; }.pin-grid::-webkit-scrollbar:horizontal { display: none; }
.pin-columns { width: 100%; min-width: 0; max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(var(--pin-columns), minmax(0, 1fr)); gap: calc(9px * var(--pin-zoom)); }
.pin-column { min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: calc(10px * var(--pin-zoom)); }
.pin-card { appearance: none; position: relative; width: 100%; min-width: 0; max-width: 100%; min-height: 72px; padding: 0; overflow: hidden; border: 1px solid #365477; border-radius: 22px; background: #0d1421; cursor: pointer; transform-origin: center; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.pin-card img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #0d1421; }
.pin-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #72869a; font-size: 10px; font-weight: 700; }.pin-card:not(.media-error) .pin-placeholder { visibility: hidden; }.pin-card.media-error img { display: none; }
.pin-card:hover { z-index: 2; border-color: #8ecf56; box-shadow: 0 10px 24px #0008; transform: translateY(-3px) scale(1.01); }
.media-badge { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border: 1px solid #445b76; border-radius: 12px; background: #111724df; font-size: 10px; font-weight: 700; }
.pin-audio-title { position: absolute; left: 12px; right: 12px; top: 12px; padding: 10px 12px; border: 1px solid #5d7698; border-radius: 16px; background: #111824ec; text-align: left; opacity: 0; transition: opacity .25s; }
.pin-card:hover .pin-audio-title { opacity: 1; }
.pin-audio-title strong, .pin-audio-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-audio-title small { margin-top: 4px; color: #afc0d7; font-size: 10px; }
.feed-footer { padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #314868; background: #101827; color: #9fbdd1; font-size: 10px; }

/* Messenger */
.chat-screen { grid-template-columns: 300px minmax(390px, 1fr) 250px; gap: 18px; }
.chat-list { padding: 18px; display: flex; flex-direction: column; overflow: hidden; }.online-panel { padding: 18px; }
.chat-user-card { padding: 16px; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; border: 1px solid #426084; border-radius: 24px; background: #162131; }
.chat-user-avatar { width: 46px; height: 46px; border-radius: 16px; }
.chat-user-card strong, .chat-user-card small, .chat-user-card em { display: block; }
.chat-user-card strong { font-size: 17px; }
.chat-user-card small { margin-top: 3px; color: var(--muted); }
.chat-user-card em { margin-top: 7px; color: var(--green); font-size: 10px; font-style: normal; }
.new-dm { width: 100%; margin: 18px 0; }
.chat-list h4, .online-panel h4 { margin: 16px 0 8px; color: #7e9db9; font-size: 10px; letter-spacing: .08em; }
.conversation-list { min-height: 0; display: grid; align-content: start; gap: 6px; }.channel-list { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }.direct-list { flex: 0 1 35%; max-height: 220px; overflow-x: hidden; overflow-y: auto; }
.conversation { padding: 8px; display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; border: 1px solid transparent; border-radius: 14px; background: transparent; text-align: left; cursor: pointer; transition: .18s; }
.conversation:hover, .conversation.active { border-color: #28607e; background: #10263b; transform: translateX(2px); }
.conversation strong, .conversation small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation small { color: #8ea9bd; font-size: 10px; }
.chat-main { display: grid; grid-template-rows: 72px minmax(0, 1fr) 35px auto; }
.mobile-chat-nav { display: none; }
.chat-room-header { padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #38577d; background: #101a29; }
.chat-room-header h3 { margin: 4px 0 0; }
.messages { padding: 16px 18px; display: flex; flex-direction: column; gap: 13px; }
.message { display: grid; grid-template-columns: 40px 1fr; gap: 10px; }
.message .avatar { width: 36px; height: 36px; border-radius: 12px; }
.message-head { display: flex; align-items: center; gap: 8px; }
.message-head time { color: #7894a9; font-size: 10px; }
.message-bubble { display: inline-block; max-width: 90%; margin-top: 5px; padding: 13px 18px; border: 1px solid var(--border); border-radius: 18px; background: #182435; }
.message-bubble p { margin: 0; font-size: 15px; line-height: 1.42; }
.reply-preview { display: block; margin-bottom: 8px; padding: 7px 10px; border-left: 2px solid var(--accent); background: #101c2b; color: var(--muted); }
.emoji-strip { padding: 4px 14px; display: flex; align-items: center; gap: 6px; border-top: 1px solid #29445c; }
.emoji-strip button { border: 0; background: transparent; cursor: pointer; }
.emoji-strip span { margin-left: auto; color: #7894a9; font-size: 10px; }
.chat-composer { padding: 11px; display: grid; grid-template-columns: 1fr 40px; gap: 8px; border-top: 1px solid #29445c; }
.chat-composer textarea { height: 42px; padding: 11px 15px; resize: none; outline: 0; border: 1px solid #31536d; border-radius: 20px; background: #071421; color: white; }
.chat-composer button { border: 1px solid #13d7ee; border-radius: 50%; background: #10465d; }
.presence-heading { display: flex; align-items: center; justify-content: space-between; }
.presence-heading h3 { margin: 4px 0; }
.presence-heading > span { padding: 5px 9px; border-radius: 11px; background: #10345d; color: #81ecff; }
.online-list { display: grid; }
.online-user { padding: 9px 0; display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; border-bottom: 1px solid #1e354a; }
.online-user small { display: block; color: #7fa0b7; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #4aee63; }

/* Posts */
.posts-screen { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; font-family: Bahnschrift, "Segoe UI", sans-serif; }
.posts-main { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
.posts-compose { padding: 13px 16px; background: linear-gradient(135deg, #132c42, #0d1f30 55%, #09131f); }
.quick-post-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: start; }
.quick-post-row .avatar { width: 40px; height: 40px; border-radius: 15px; }
.quick-post-row textarea { min-height: 40px; max-height: 72px; padding: 9px 0; resize: none; border: 0; outline: 0; background: transparent; color: #f4faff; font-size: 16px; }
.quick-post-row .primary-action { min-width: 82px; }
.compose-tools { margin: 8px 0 10px 52px; display: flex; align-items: center; gap: 8px; }
.compose-tools button { padding: 6px 10px; border: 1px solid #294a66; border-radius: 14px; background: #0c1b2a; color: #a9c4dd; cursor: pointer; }
.compose-tools small { margin-left: auto; color: #72e98c; }
.post-sort { padding-top: 9px; display: flex; justify-content: center; gap: 8px; border-top: 1px solid #24415c; }
.post-sort button { width: 112px; height: 30px; border: 0; background: url('assets/posts-sort-button-idle-v7-160x42.png') center/100% 100% no-repeat; color: #a6bed4; cursor: pointer; }
.post-sort button.active { background-image: url('assets/posts-sort-button-active-v10-160x42.png'); color: #ecfff2; }
.post-feed { padding: 12px; }
.post-card { margin-bottom: 10px; padding: 13px; border: 1px solid #294d69; border-radius: 18px; background: #0d1d2f; content-visibility: auto; contain-intrinsic-size: 620px 180px; }
.post-card:has(.post-embed,.social-video-player) { content-visibility: visible; contain: none; }
.post-author { display: flex; align-items: center; gap: 9px; }
.post-author div { flex: 1; }
.post-author small { display: block; color: #87a5bb; }
.post-body { margin: 11px 0; line-height: 1.48; overflow-wrap: anywhere; }
.hashtag-link { display: inline; padding: 0; border: 0; background: transparent; color: #49dcff; font: inherit; font-weight: 750; cursor: pointer; }
.hashtag-link:hover { color: #80ef9c; text-decoration: underline; }
.post-image-button { max-width: 100%; padding: 0; display: block; overflow: hidden; border: 1px solid #315875; border-radius: 15px; background: #050d16; cursor: zoom-in; }
.post-media { max-width: 100%; max-height: 430px; display: block; object-fit: contain; border-radius: 14px; }
.post-embed, .pin-video-embed { width: min(100%, 820px); aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #315875; border-radius: 16px; background: #02070c; box-shadow: 0 12px 28px #0007; }
.post-embed iframe, .pin-video-embed iframe { width: 100%; height: 100%; display: block; border: 0; }
.post-link-preview { width: min(100%, 650px); padding: 14px 16px; display: grid; gap: 4px; border: 1px solid #315875; border-radius: 14px; background: linear-gradient(135deg,#10263a,#091522); color: #dff7ff; text-decoration: none; }
.post-link-preview small { color: #77dff4; }
.social-video-player { position: relative; width: min(100%, 820px); aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #315875; border-radius: 16px; background: #02070c; box-shadow: 0 12px 28px #0007; isolation: isolate; }
.social-video-player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.video-controls { position: absolute; inset: auto 0 0; z-index: 4; padding: 28px 12px 10px; background: linear-gradient(transparent,#000e); opacity: 1; transition: opacity .2s; }
.social-video-player.is-playing:not(:hover):not(:focus-within) .video-controls { opacity: 0; }
.video-control-row { height: 34px; display: flex; align-items: center; gap: 9px; }
.video-controls button, .video-center-play { display: grid; place-items: center; border: 0; background: transparent; color: #fff; cursor: pointer; }
.video-controls button { width: 32px; height: 32px; padding: 0; font-size: 16px; filter: drop-shadow(0 1px 2px #000); }
.video-center-play { position: absolute; left: 50%; top: 50%; z-index: 3; width: 66px; height: 48px; border-radius: 14px; background: #ff0033e8; font-size: 22px; transform: translate(-50%,-50%); box-shadow: 0 7px 20px #0009; transition: opacity .18s,transform .18s; }
.video-center-play:hover { transform: translate(-50%,-50%) scale(1.06); }
.social-video-player.is-playing .video-center-play { opacity: 0; pointer-events: none; }
.video-time { color: #eef7ff; font-size: 11px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }.video-time b { font-weight: 600; }.video-control-spacer { flex: 1; }
.video-seek, .video-volume, .player-seek, .player-volume { --range-progress: 0%; height: 18px; margin: 0; accent-color: #42df70; cursor: pointer; }
.video-seek { width: 100%; display: block; }
.video-volume { width: 76px; }
.video-seek, .video-volume { appearance: none; background: transparent; }
.video-seek::-webkit-slider-runnable-track, .video-volume::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg,#ff174d var(--range-progress),#ffffff66 var(--range-progress)); }
.video-seek::-webkit-slider-thumb, .video-volume::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: #ff174d; box-shadow: 0 1px 5px #000a; }
.video-seek::-moz-range-track, .video-volume::-moz-range-track { height: 4px; border-radius: 4px; background: #ffffff66; }.video-seek::-moz-range-progress, .video-volume::-moz-range-progress { height: 4px; background: #ff174d; }.video-seek::-moz-range-thumb, .video-volume::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #ff174d; }
.video-spinner { position: absolute; left: calc(50% - 18px); top: calc(50% - 18px); z-index: 2; width: 36px; height: 36px; display: none; border: 3px solid #ffffff44; border-top-color: #fff; border-radius: 50%; animation: video-spin .75s linear infinite; }.social-video-player.is-buffering .video-spinner { display: block; }.social-video-player.is-buffering .video-center-play { display: none; }@keyframes video-spin{to{transform:rotate(360deg)}}
.post-actions { display: flex; gap: 8px; }
.post-actions button { padding: 5px 10px; border: 1px solid #2d516c; border-radius: 14px; background: #081625; color: #cce2f2; cursor: pointer; }
.trends { padding: 15px; }
.trend { width: 100%; padding: 11px 0; display: flex; justify-content: space-between; border: 0; border-bottom: 1px solid #1e354a; background: transparent; text-align: left; cursor: pointer; }
.trend strong { color: #49dcff; }
.posts-side-nav { margin-top: 24px; padding-top: 16px; display: grid; gap: 7px; border-top: 1px solid #1e354a; }
.posts-side-nav button { height: 38px; padding: 0 12px; border: 1px solid #24415c; border-radius: 13px; background: #0c1b2a; text-align: left; cursor: pointer; }
.relay-private { margin-top: 22px; padding: 14px; border: 1px solid #254059; border-radius: 18px; background: #0b1928; }
.relay-private strong, .relay-private small { display: block; }
.relay-private small { margin-top: 6px; color: #72e98c; }

/* Profile */
.profile-screen { grid-template-columns: 310px 1fr; gap: 18px; }
.profile-card { padding: 28px; text-align: center; background: radial-gradient(circle at 50% 4%, #254f70, transparent 35%), linear-gradient(135deg, #163149, #09111a); }
.profile-avatar { width: 112px; height: 112px; margin: 0 auto 15px; display: grid; place-items: center; overflow: hidden; border: 3px solid #46e6ff; border-radius: 50%; background: #04b7e3; font-size: 34px; font-weight: 900; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h2 { margin: 0; }
.profile-card p { color: #91adc1; }
.taros { display: inline-block; padding: 8px 15px; border: 1px solid #56cc44; border-radius: 17px; color: #8ef072; }
.profile-editor { padding: 26px; }
.profile-editor form { max-width: 650px; display: grid; gap: 14px; }
.profile-editor label, .auth-modal label, .composer-modal label { display: grid; gap: 6px; color: #a9c1d2; font-size: 11px; }
.profile-editor input, .profile-editor textarea, .auth-modal input, .composer-modal input, .composer-modal textarea { padding: 11px 13px; outline: 0; border: 1px solid #31536f; border-radius: 12px; background: #071421; color: white; }
.profile-editor textarea { min-height: 110px; resize: vertical; }

/* Dock and dialogs */
.lower-deck { position: absolute; left: 49px; right: 49px; bottom: 20px; height: 59px; display: grid; grid-template-columns: 124px 1fr 120px; gap: 12px; align-items: center; }
.relay-card, .presence-card { height: 58px; padding: 10px; display: flex; align-items: center; border: 1px solid #31526c; border-radius: 16px; background: #0d1d30; color: #9fc0d5; font-size: 9px; }
.dock { justify-self: center; height: 64px; padding: 8px; display: flex; gap: 8px; border: 1px solid #315b7b; border-radius: 20px; background: #10253a; }
.dock button { position: relative; width: 108px; min-width: 108px; height: 48px; padding: 0 14px; overflow: hidden; border: 1px solid #294561; border-radius: 15px; background: #10233c; color: #d7eafd; font: 600 13px Bahnschrift,"Segoe UI",sans-serif; cursor: pointer; box-shadow: inset 0 0 0 3px #0a1523; transition: color .14s,border-color .16s,transform .14s,box-shadow .16s,background .16s; }
.dock button::after { content:""; position:absolute; inset:2px; pointer-events:none; border:1px solid #1ad7ff; border-radius:13px; opacity:0; transition:opacity .16s; }
.dock button:hover { color:#f5fdff; transform:translateY(-1px); }.dock button:hover::after { opacity:.38; }
.dock button:active { transform:translateY(0); }.dock button:active::after { opacity:.18; }
.dock button .dock-icon { position:relative; z-index:1; margin-right:8px; color:inherit; font-family:"Segoe MDL2 Assets"; font-size:13px; font-weight:400; }
.dock button.active { border-color:#43de73; background:linear-gradient(135deg,#1a3b63 0%,#0a58b6 18%,#2ce45f 100%); color:#f7fff6; box-shadow:inset 0 0 0 3px #0a1523,0 0 10px #3aea8e94; }
.presence-card { justify-content: center; gap: 8px; }
.presence-card i { width: 8px; height: 8px; border-radius: 50%; background: #50ed58; }
.presence-card time { color: white; font-weight: 800; }
.modal { padding: 0; border: 1px solid #3a607c; border-radius: 22px; background: #0b192a; color: white; box-shadow: 0 24px 70px #000b; }
.modal::backdrop { background: #020912c9; backdrop-filter: blur(5px); }
.modal-close { position: absolute; right: 14px; top: 11px; z-index: 2; width: 34px; height: 34px; border: 1px solid #3a607c; border-radius: 50%; background: #0a1727; font-size: 20px; cursor: pointer; }
.install-app-btn { position: absolute; right: 150px; height: 34px; padding: 0 16px; border: 1px solid #4ce778; border-radius: 18px; background: linear-gradient(135deg,#0b5dbb,#2bdd62); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 0 13px #37ee8370; }
.install-app-btn[hidden] { display: none; }
.install-modal form { width: min(480px,90vw); padding: 42px 38px 34px; display: grid; gap: 14px; text-align: center; }
.install-modal img { width: 150px; max-height: 85px; object-fit: contain; justify-self: center; }
.install-modal h2,.install-modal p { margin: 0; }.install-modal p { color: #a7c1d3; line-height: 1.55; }
.auth-modal form, .composer-modal form { width: min(420px, 90vw); padding: 34px; display: grid; gap: 14px; }
.auth-modal img { width: 110px; justify-self: center; }
.auth-modal h2, .auth-modal p { margin: 0; text-align: center; }
.auth-modal p { color: #91adbf; }
.form-error { min-height: 16px; color: #ff7182; font-size: 11px; }
.pin-modal { width: min(1180px, 94vw); height: min(800px, 91vh); overflow: hidden; grid-template-columns: minmax(0, 1fr) 320px; }
.pin-modal[open] { display: grid; }
.pin-dialog-media { min-width: 0; min-height: 0; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%,#142b40,#02070d 70%); }
.pin-dialog-media > .social-video-player, .pin-dialog-media > .pin-video-embed { width: min(94%,960px); }
.pin-dialog-media audio { width: 80%; }
.image-viewer { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.image-viewer-stage { width: 100%; height: 100%; padding: 24px; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.image-viewer-stage.can-pan { cursor: grab; }.image-viewer-stage.is-panning { cursor: grabbing; }
.image-viewer-stage img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; transform-origin: center; transition: transform .16s ease-out; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 16px 28px #000b); }
.image-viewer-stage.is-panning img { transition: none; }
.image-viewer-toolbar { position: absolute; left: 50%; bottom: 18px; z-index: 3; padding: 7px; display: flex; align-items: center; gap: 6px; border: 1px solid #567794; border-radius: 18px; background: #07131fe8; box-shadow: 0 8px 24px #000a; backdrop-filter: blur(14px); transform: translateX(-50%); }
.image-viewer-toolbar button, .image-viewer-toolbar a { min-width: 38px; height: 34px; padding: 0 11px; display: grid; place-items: center; border: 1px solid #31536f; border-radius: 12px; background: #102238; color: #e8f6ff; font: 700 11px "Segoe UI",sans-serif; text-decoration: none; cursor: pointer; }
.image-viewer-toolbar output { min-width: 46px; color: #9feab5; font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; }
.pin-modal aside { padding: 50px 25px 25px; overflow: auto; }
.pin-modal aside h2 { margin: 8px 0; }
.pin-modal aside p { color: #9db7c9; line-height: 1.5; }
.toast-region { position: fixed; right: 22px; top: 22px; z-index: 20; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border: 1px solid #31b9d3; border-radius: 12px; background: #0a1929ef; box-shadow: 0 8px 24px #0008; }
.empty-state { height: 100%; padding: 30px; display: grid; place-items: center; color: #91aabd; text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: white; font-size: 18px; }

/* Persistent music session */
.music-player-bar[hidden], .music-deck-modal:not([open]) { display: none; }
.app-body.has-player .workspace { height: calc(100% - 201px); }
.music-player-bar {
  position: absolute; left: 49px; right: 49px; bottom: 88px; z-index: 9; height: 70px; padding: 8px 11px;
  display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1.35fr) auto; gap: 13px; align-items: center;
  border: 1px solid #4b7296; border-radius: 22px; background: linear-gradient(110deg,#0d1828f7,#17263af7 48%,#102b3af7);
  box-shadow: 0 13px 34px #0009, inset 0 1px #9ddcff1c; backdrop-filter: blur(18px); animation: music-bar-in .24s ease-out both;
}
@keyframes music-bar-in { from { opacity: 0; transform: translateY(12px); } }
.music-player-summary { min-width: 0; padding: 0; display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 11px; align-items: center; border: 0; background: transparent; text-align: left; cursor: pointer; }
.mini-record { position: relative; width: 50px; height: 50px; display: grid; place-items: center; overflow: hidden; border: 1px solid #6c8caf; border-radius: 50%; background: repeating-radial-gradient(circle,#19263a 0 3px,#09101b 4px 7px); box-shadow: 0 0 18px #00eaff22; }
.mini-record::after { content:""; position:absolute; width:8px; height:8px; border-radius:50%; background:#f6dda8; box-shadow:0 0 0 4px #0b1421; }
.mini-record img { width: 23px; height: 23px; border-radius: 50%; object-fit: cover; }
.app-body.player-playing .mini-record { animation: record-spin 4.5s linear infinite; }
.music-player-copy { min-width: 0; display: grid; gap: 2px; }
.music-player-copy small { color: #f6dda8; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.music-player-copy strong, .music-player-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-player-copy strong { color: #fff; font-size: 12px; }.music-player-copy span { color: #9bb3c8; font-size: 10px; }
.music-player-transport, .music-player-tools { display: flex; align-items: center; gap: 5px; }
.music-player-bar button, .deck-controls button, .deck-volume button { display: grid; place-items: center; border: 1px solid #355675; border-radius: 50%; background: #0c1929; color: #e8f5ff; cursor: pointer; transition: transform .15s,border-color .15s,background .15s; }
.music-player-bar button:hover, .deck-controls button:hover, .deck-volume button:hover { border-color: #56dfff; background: #15334a; transform: translateY(-1px); }
.music-player-transport > button, .music-player-tools > button { width: 34px; height: 34px; padding: 0; }
.music-player-transport .music-play-button { width: 42px; height: 42px; border-color: #8eea72; background: linear-gradient(145deg,#17a7c7,#40ca67); color: white; font-size: 17px; }
.music-player-timeline { min-width: 0; display: grid; grid-template-columns: 34px minmax(80px,1fr) 34px; gap: 7px; align-items: center; color:#b6ccda; font-size:9px; }
.music-player-timeline span:last-child { text-align: right; }
.player-seek, .player-volume { height: 18px; margin: 0; accent-color: #49db77; cursor: pointer; }
.music-player-tools .player-volume { width: 68px; }.player-repeat { position: relative; }.music-player-tools .player-repeat[aria-pressed="true"], .deck-controls .player-repeat[aria-pressed="true"] { border-color:#84ed69; color:#9cff81; background:#163d2c; box-shadow:0 0 10px #62e86a55; }.repeat-one { position:absolute; right:2px; bottom:1px; width:13px; height:13px; display:grid; place-items:center; border-radius:50%; background:#7bec71; color:#07130c; font-size:8px; font-weight:900; }

/* Full hi-fi deck, based on the desktop client's turntable. */
.music-deck-modal { width: min(1020px,94vw); height: min(690px,91vh); overflow: hidden; grid-template-columns: minmax(410px,1.15fr) minmax(330px,.85fr); background: radial-gradient(circle at 22% 35%,#1d4460 0,transparent 38%),linear-gradient(135deg,#101c2c,#07111d); }
.music-deck-modal[open] { display: grid; }
.turntable-stage { position: relative; min-width: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 48%,#21526e88 0,transparent 46%),repeating-linear-gradient(135deg,#ffffff04 0 1px,transparent 1px 8px); }
.turntable-glow { position:absolute; width:72%; aspect-ratio:1; border-radius:50%; background:conic-gradient(from 30deg,#5cf8dc00,#5cf8dc44,#ffb07033,#828dff44,#5cf8dc00); filter:blur(28px); animation:record-spin 12s linear infinite; }
.turntable-plinth { position:relative; width:min(430px,82%); aspect-ratio:1.16; border:1px solid #557b9d; border-radius:40px; background:linear-gradient(145deg,#22354c,#0c1726 64%,#1a2c43); box-shadow:inset 0 1px #c7edff33,0 24px 52px #0009; transform:perspective(900px) rotateX(5deg); }
.record-wrap { position:absolute; left:7%; top:9%; width:73%; aspect-ratio:1; filter:drop-shadow(0 16px 13px #0008); }
.vinyl-record { position:relative; width:100%; height:100%; overflow:hidden; border:2px solid #6a88a5; border-radius:50%; background:radial-gradient(circle at 34% 25%,#ffb17d 0,#a36be2 22%,#25637c 48%,#111b2b 75%,#03070d 100%); box-shadow:inset 0 0 32px #000b; }
.app-body.player-playing ~ .music-deck-modal .vinyl-record, .music-deck-modal.player-playing .vinyl-record { animation:record-spin 7s linear infinite; }
@keyframes record-spin { to { transform: rotate(360deg); } }
.vinyl-sheen { position:absolute; inset:4%; border-radius:50%; background:conic-gradient(from 12deg,transparent 0 18%,#d8ffff45 23%,transparent 31% 58%,#ffd8ae32 65%,transparent 73%); filter:blur(3px); }
.vinyl-grooves { position:absolute; inset:3%; border-radius:50%; background:repeating-radial-gradient(circle,transparent 0 6px,#d9ecff17 7px,#0003 8px 10px); }
.vinyl-label { position:absolute; inset:31%; overflow:hidden; border:3px solid #6b87aa; border-radius:50%; background:#14233a; box-shadow:0 0 0 9px #101a2aaa; }
.vinyl-label img { width:100%; height:100%; object-fit:cover; }.vinyl-spindle { position:absolute; left:calc(50% - 8px); top:calc(50% - 8px); width:16px; height:16px; border-radius:50%; background:#f6dda8; box-shadow:0 0 0 7px #0c1320; }
.tonearm { position:absolute; right:3%; top:7%; z-index:4; width:43%; height:28px; transform-origin:93% 50%; transform:rotate(var(--tonearm-angle,14deg)); transition:transform .35s linear; filter:drop-shadow(0 5px 4px #0009); }
.tonearm-arm { position:absolute; left:24px; right:20px; top:10px; height:7px; border:1px solid #c4d2dd; border-radius:8px; background:linear-gradient(#edf4f8,#607891); box-shadow:inset 0 1px #fff8; }
.tonearm-pivot { position:absolute; right:0; top:1px; width:27px; height:27px; border:2px solid #7891b2; border-radius:50%; background:radial-gradient(circle,#b6c5d1 0 18%,#17243a 22% 60%,#07101d 64%); box-shadow:0 0 0 5px #0b1422aa; }
.tonearm-head { position:absolute; left:0; top:5px; width:31px; height:18px; border:1px solid #8ba3ba; border-radius:5px 2px 2px 5px; background:linear-gradient(135deg,#283d55,#0c1624); transform:rotate(-4deg); box-shadow:inset 0 1px #d7ebff33; }
.tonearm-head::before { content:""; position:absolute; left:4px; top:5px; width:12px; height:6px; border-radius:2px; background:#dfebf2; }.tonearm-head em { position:absolute; left:5px; top:15px; width:2px; height:10px; background:#f4d7a4; transform:rotate(13deg); transform-origin:top; box-shadow:0 0 3px #fff; }
.turntable-status { position:absolute; right:8%; bottom:10%; display:grid; gap:6px; justify-items:center; color:#91aabe; font-size:9px; font-weight:800; letter-spacing:.1em; }.turntable-status i { width:9px; height:9px; border-radius:50%; background:#6d7d8c; }.music-deck-modal.player-playing .turntable-status i { background:#71ed67; box-shadow:0 0 12px #71ed67; }
.music-deck-details { min-width:0; padding:58px 46px 36px; display:flex; flex-direction:column; justify-content:center; background:linear-gradient(145deg,#122238ee,#07111df8); }
.music-deck-details h2 { margin:10px 0 5px; overflow:hidden; color:white; font-size:clamp(25px,3vw,42px); line-height:1.05; text-overflow:ellipsis; white-space:nowrap; }.music-artist-link { align-self:flex-start; padding:0; border:0; background:transparent; color:#7fe5ff; font-weight:700; cursor:pointer; }.player-album { margin:7px 0 24px; color:#8ea5b9; }
.deck-equalizer { height:42px; display:flex; align-items:flex-end; gap:5px; }.deck-equalizer i { width:5px; height:28%; border-radius:5px; background:linear-gradient(#f6dda8,#56dcff); }.music-deck-modal.player-playing .deck-equalizer i { animation:eq-bounce .75s ease-in-out infinite alternate; }.deck-equalizer i:nth-child(2n){animation-delay:-.23s!important;height:78%}.deck-equalizer i:nth-child(3n){animation-delay:-.46s!important;height:48%}.deck-equalizer i:nth-child(5n){height:92%}@keyframes eq-bounce{to{height:92%}}
.deck-progress { margin-top:18px; }.deck-progress .player-seek { width:100%; }.deck-progress div { display:flex; justify-content:space-between; color:#9eb3c5; font-size:10px; }
.deck-controls { margin-top:20px; display:flex; align-items:center; justify-content:center; gap:12px; }.deck-controls button { width:43px; height:43px; font-size:17px; }.deck-controls .deck-play-button { width:62px; height:62px; border-color:#77e886; background:linear-gradient(145deg,#13a9cf,#3dca65); font-size:25px; }
.deck-volume { margin:22px auto 0; width:min(240px,100%); display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:center; }.deck-volume button { width:34px; height:34px; }.music-deck-help { margin:22px 0 0; color:#718da4; font-size:10px; line-height:1.45; text-align:center; }

/* Original FusionFall interface alignment. */
.app-body { background: radial-gradient(circle at 8% 2%,#123e5266,transparent 27%),radial-gradient(circle at 92% 18%,#0d4e4b44,transparent 32%),repeating-linear-gradient(0deg,#45c9ef08 0 1px,transparent 1px 4px),#02080d; }
.titlebar { background: linear-gradient(115deg,#071923,#06131b 48%,#0b3341); border-bottom-color:#168fd2; }
.commandbar { border-color:#174652; border-radius:18px; background:linear-gradient(110deg,#071923f2,#06131bf2 76%,#071a21f5); box-shadow:inset 4px 0 #45c9ef; }
.commandbar::before { background:linear-gradient(90deg,transparent 70%,#45c9ef19 88%,#8bd43e18); }
.global-search,.account-pill,.round-btn { border-color:#28687e; background:#020b11e6; }
.global-search::after { background:linear-gradient(90deg,#45c9ef,#168fd2 62%,#8bd43e); }
.panel { border-color:#174652; border-radius:14px; background:linear-gradient(135deg,#071923ed,#06131bf2 62%,#071a21f5); }
.panel-header { background:linear-gradient(90deg,#0a3447,#0b5470 54%,#087fa0); box-shadow:inset 0 -1px #45c9ef66; }
.side-title,.primary-action { border-color:#b8fa65; background:linear-gradient(#a7f154,#5abf21); color:#07110a; text-shadow:0 1px #fff7; }
.category.active,.mobile-category.active,.mobile-conversation.active { border-color:#45c9ef; background:#0b3c50; color:#e8fbff; }
.dock { border-color:#174652; border-radius:14px; background:#06151d; }
.dock button { border-color:#174652; border-radius:8px; background:#08212b; box-shadow:inset 0 0 0 2px #02080d; }
.dock button::after { border-radius:6px; }
.dock button.active { border-color:#45c9ef; background:linear-gradient(135deg,#168fd2,#0b718a 58%,#5abf21); box-shadow:inset 0 0 0 2px #02080d,0 0 10px #45c9ef66; }
.scroll-area::-webkit-scrollbar-thumb,.pin-grid::-webkit-scrollbar-thumb { background:linear-gradient(#45c9ef,#168fd2 55%,#8bd43e); }

@media (max-width: 1180px), (max-height: 700px) {
  .music-player-bar { left:18px; right:18px; bottom:78px; grid-template-columns:minmax(180px,1fr) auto minmax(170px,1fr) auto; }
  .music-player-tools .player-volume, .music-player-tools .player-volume-button { display:none; }
}

@media (max-width: 1180px), (max-height: 700px) {
  .app-window { width: 100vw; height: 100vh; min-width: 0; min-height: 0; border-radius: 0; }
  .app-body { padding: 12px 18px 78px; }
  .commandbar { grid-template-columns: 130px 1fr auto 40px; padding-left: 18px; }
  .lower-deck { left: 18px; right: 18px; bottom: 10px; grid-template-columns: 1fr auto; }
  .relay-card, .presence-card { display: none; }
  .dock button { width: 92px; min-width: 92px; }
  .chat-screen { grid-template-columns: 210px 1fr; gap: 10px; }
  .online-panel { display: none; }
  .pins-screen { grid-template-columns: 150px 1fr; }
  .posts-screen { grid-template-columns: 1fr 210px; }
}
@media (max-width: 760px) {
  :root { font-size: 13px; }
  html, body { height: 100%; height: 100dvh; overflow: hidden; background: var(--app); }
  body { display: block; overscroll-behavior: none; }
  .ambient { display: none; }
  .app-window { width: 100%; height: 100vh; height: 100dvh; min-width: 0; min-height: 0; overflow: hidden; border-radius: 0; box-shadow: none; }
  .titlebar { display: none; }
  .app-body { height: 100%; min-height: 0; padding: max(7px, env(safe-area-inset-top)) 7px calc(66px + env(safe-area-inset-bottom)); display: grid; grid-template-rows: 59px 46px minmax(0, 1fr); gap: 6px; }
  .commandbar { position: relative; z-index: 5; height: 59px; grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 6px; padding: 6px; border-radius: 18px; }
  .brand-logo { width: 40px; height: 43px; }
  .global-search { height: 44px; min-width: 0; padding: 0 11px; gap: 8px; border-radius: 23px; }
  .global-search::after { left: 36px; right: 14px; }
  .global-search span { font-size: 19px; }
  .global-search input { min-width: 0; font-size: 16px; text-overflow: ellipsis; }
  .account-pill { width: 40px; height: 40px; padding: 5px; justify-content: center; border-radius: 15px; }
  .account-pill .avatar { width: 30px; height: 30px; }
  .account-pill > span:last-child, .round-btn { display: none; }
  .site-nav { height:46px; margin:0 -7px; }
  .site-nav-track { width:calc(100% - 12px); height:44px; padding:4px 12px; justify-content:flex-start; background-size:100% 35px; }
  .site-nav a { height:36px; padding:0 14px; font-size:11px; }
  .workspace { height: auto; min-height: 0; margin: 0; overflow: hidden; }
  .screen { height: 100%; min-height: 0; }
  .pins-screen, .chat-screen, .posts-screen, .profile-screen { grid-template-columns: 1fr; }
  .panel { border-radius: 20px; }
  .pins-sidebar, .chat-list, .online-panel, .trends, .profile-card { display: none; }

  .lower-deck { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; height: calc(62px + env(safe-area-inset-bottom)); display: block; padding-bottom: env(safe-area-inset-bottom); background: #07131ff2; border-top: 1px solid #315b7b; backdrop-filter: blur(14px); }
  .dock { width: 100%; height: 62px; padding: 6px 4px; justify-content: space-around; gap: 3px; border: 0; border-radius: 0; background: transparent; }
  .dock button { width: calc(25% - 3px); min-width: 0; height: 50px; padding: 5px 2px 4px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 14px; font-size: 9px; line-height: 1; }
  .dock button .dock-icon { display: none; }
  .dock button::before { content: "•"; position: relative; z-index: 1; display: block; color: #9ebcd2; font-size: 16px; line-height: 14px; }
  .dock button[data-view="posts"]::before { content: "▤"; }
  .dock button[data-view="pins"]::before { content: "◆"; }
  .dock button[data-view="profile"]::before { content: "●"; }
  .dock button.active::before { color: #f4fff7; }
  .dock button:last-child { display: none; }
  body:has(input:focus, textarea:focus) .lower-deck { transform: translateY(110%); }

  /* Mobile pins: category access plus readable two-column masonry. */
  .pins-main { grid-template-rows: 38px 43px 63px minmax(0, 1fr); border-radius: 20px; }
  .panel-header { height: 38px; padding: 0 12px; font-size: 11px; }
  .mobile-category-strip { padding: 6px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; background: #0b1725; border-bottom: 1px solid #29465e; }
  .mobile-category-strip::-webkit-scrollbar { display: none; }
  .mobile-category { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid #2c5572; border-radius: 15px; background: #0d1d2e; color: #abc5d7; font-size: 10px; font-weight: 700; }
  .mobile-category.active { border-color: #25dff4; background: #0b3c50; color: white; }
  .feed-toolbar { min-width: 0; padding: 7px 9px; gap: 6px; }
  .feed-toolbar > div:first-child { min-width: 0; }
  .feed-toolbar p { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section-title { font-size: 14px; }
  .zoom-controls { gap: 4px; }
  .zoom-controls button, .zoom-controls span { min-width: 30px; height: 30px; padding: 0 7px; }
  #filterAll { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pin-grid { padding: 7px; overflow-x: hidden; scrollbar-gutter: auto; }
  .pin-columns { gap: 7px; }
  .pin-column { gap: 7px; }
  .pin-card { min-height: 76px; border-radius: 17px; }
  .pin-card:hover { transform: none; box-shadow: none; }
  .media-badge { right: 7px; bottom: 7px; padding: 4px 7px; font-size: 9px; }
  .feed-footer { display: none; }

  /* Mobile chat keeps every channel reachable without the desktop sidebar. */
  .chat-main { grid-template-rows: 63px 43px minmax(0, 1fr) 35px 58px; border-radius: 20px; }
  .chat-room-header { padding: 0 12px; }
  .chat-room-header h3 { font-size: 17px; }
  .chat-room-header .chip { min-height: 29px; padding: 0 10px; }
  .mobile-chat-nav { min-width: 0; padding: 6px 8px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #29445c; background: #0b1725; }
  .mobile-chat-nav > div { min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .mobile-chat-nav > div::-webkit-scrollbar { display: none; }
  .mobile-conversation, .mobile-new-dm { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid #2c5572; border-radius: 15px; background: #0d1d2e; color: #abc5d7; font-size: 10px; font-weight: 700; }
  .mobile-conversation.active { border-color: #25dff4; background: #0b3c50; color: white; }
  .mobile-new-dm { width: 32px; padding: 0; font-size: 17px; }
  .messages { padding: 10px; gap: 11px; }
  .message { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .message .avatar { width: 31px; height: 31px; border-radius: 10px; }
  .message-head { min-width: 0; gap: 6px; }
  .message-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .message-head time { flex: none; }
  .message-bubble { max-width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 15px; }
  .message-bubble p { overflow-wrap: anywhere; font-size: 14px; line-height: 1.38; }
  .emoji-strip { padding: 3px 10px; }
  .chat-composer { padding: 7px 8px 8px; grid-template-columns: minmax(0, 1fr) 40px; }
  .chat-composer textarea { height: 42px; padding: 10px 13px; font-size: 16px; }

  /* Mobile posts uses the current feed and compact native controls. */
  .posts-main { grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
  .posts-compose { padding: 10px; }
  .quick-post-row { grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 8px; }
  .quick-post-row .avatar { width: 34px; height: 34px; border-radius: 11px; }
  .quick-post-row textarea { min-height: 38px; padding: 8px 0; font-size: 16px; }
  .quick-post-row .primary-action { min-width: 0; min-height: 36px; padding: 0 10px; }
  .compose-tools { margin: 6px 0 8px 42px; gap: 5px; }
  .compose-tools button { padding: 6px 8px; font-size: 10px; }
  .compose-tools small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
  .post-sort { padding-top: 8px; gap: 6px; }
  .post-sort button, .post-sort button.active { width: auto; height: 32px; flex: 1; border: 1px solid #2d5874; border-radius: 16px; background: #0a1929; color: #a8c2d4; font-size: 11px; font-weight: 700; }
  .post-sort button.active { border-color: #42df70; background: linear-gradient(135deg, #0e5e94, #26aa67); color: white; }
  .post-feed { padding: 7px; }
  .post-card { margin-bottom: 7px; padding: 11px; border-radius: 16px; contain-intrinsic-size: 430px 160px; }
  .post-body { margin: 9px 0; overflow-wrap: anywhere; }
  .post-media { max-height: 58vh; }
  .post-embed, .social-video-player { border-radius: 13px; }
  .video-controls { padding: 22px 8px 7px; }
  .video-control-row { gap: 4px; }
  .video-controls button { width: 30px; height: 30px; }
  .video-volume { display: none; }
  .video-time { font-size: 9px; }
  .video-center-play { width: 58px; height: 42px; font-size: 18px; }
  .post-actions { flex-wrap: wrap; gap: 5px; }
  .post-actions button { padding: 5px 9px; }

  /* Mobile profile scrolls inside its panel and keeps controls thumb-sized. */
  .profile-editor { padding: 18px 15px; overflow-y: auto; border-radius: 20px; }
  .profile-editor h2 { margin: 5px 0 14px; font-size: 25px; }
  .profile-editor form { gap: 11px; }
  .profile-editor input, .profile-editor textarea { min-height: 44px; padding: 10px 12px; font-size: 16px; }
  .profile-editor textarea { min-height: 84px; max-height: 130px; }
  .profile-editor .primary-action, .profile-editor .secondary-action { min-height: 44px; }

  /* Phone-sized dialogs account for dynamic browser chrome and keyboards. */
  .modal { max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); border-radius: 20px; overflow: auto; }
  .auth-modal form, .composer-modal form, .install-modal form { width: calc(100vw - 22px); padding: 25px 20px 20px; gap: 11px; }
  .auth-modal img { width: 92px; max-height: 64px; object-fit: contain; }
  .auth-modal h2 { font-size: 22px; }
  .auth-modal input, .composer-modal input, .composer-modal textarea { min-height: 46px; font-size: 16px; }
  .auth-modal .primary-action, .auth-modal .secondary-action, .install-modal .primary-action, .install-modal .secondary-action { min-height: 46px; }
  .modal-close { width: 38px; height: 38px; }
  .pin-modal { width: calc(100vw - 16px); height: calc(100dvh - 24px); overflow: hidden; }
  .pin-modal[open] { display: grid; grid-template-rows: minmax(0, 65%) minmax(0, 35%); grid-template-columns: 1fr; }
  .pin-dialog-media { min-height: 0; }
  .pin-dialog-media > .social-video-player, .pin-dialog-media > .pin-video-embed { width: 100%; border-radius: 0; }
  .image-viewer-stage { padding: 8px; }
  .image-viewer-toolbar { bottom: 9px; max-width: calc(100% - 16px); gap: 4px; }
  .image-viewer-toolbar button, .image-viewer-toolbar a { min-width: 34px; height: 32px; padding: 0 8px; }
  .pin-modal aside { min-height: 0; padding: 35px 18px 16px; }
  .toast-region { left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top)); }
  .toast { text-align: center; }

  /* Spotify-style mobile mini player above the persistent app dock. */
  .app-body.has-player { padding-bottom: calc(137px + env(safe-area-inset-bottom)); }
  .app-body.has-player .workspace { height: auto; }
  .music-player-bar { left:7px; right:7px; bottom:calc(67px + env(safe-area-inset-bottom)); height:64px; padding:6px 7px; grid-template-columns:minmax(0,1fr) auto; gap:7px; border-radius:17px; background:linear-gradient(105deg,#16283bf7,#10243bf7 55%,#123a3af7); }
  .music-player-summary { grid-template-columns:47px minmax(0,1fr); gap:9px; }.mini-record { width:47px; height:47px; }.music-player-copy small { display:none; }.music-player-copy strong{font-size:12px}.music-player-copy span{font-size:9px}
  .music-player-transport { gap:2px; }.music-player-transport > button { width:33px;height:33px;border-color:transparent;background:transparent; }.music-player-transport > button:first-child { display:none; }.music-player-transport .music-play-button { width:40px;height:40px;border-color:#8eea72;background:#102a32;font-size:17px; }
  .music-player-timeline { position:absolute; left:11px; right:11px; bottom:0; height:3px; display:block; }.music-player-timeline .player-seek { width:100%; height:3px; display:block; }.music-player-timeline span { display:none; }.music-player-tools { display:none; }

  .music-deck-modal { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; grid-template-columns:1fr; grid-template-rows:minmax(320px,52vh) minmax(0,1fr); overflow-y:auto; background:#091421; }
  .music-deck-modal[open] { display:grid; }.music-deck-modal .modal-close { position:fixed; top:max(13px,env(safe-area-inset-top)); right:14px; z-index:20; border-color:#83a5bd66;background:#081421cc; }
  .turntable-stage { min-height:320px; padding-top:max(18px,env(safe-area-inset-top)); }.turntable-plinth { width:min(390px,84vw); border-radius:31px; }.turntable-glow { width:82%; }.music-deck-details { padding:28px 25px calc(28px + env(safe-area-inset-bottom)); justify-content:flex-start; text-align:center; }
  .music-deck-details .eyebrow { text-align:center; }.music-deck-details h2 { margin-top:8px; font-size:29px; }.music-artist-link { align-self:center; }.player-album { margin-bottom:10px; }.deck-equalizer { height:29px; justify-content:center; }.deck-progress { margin-top:12px; }.deck-controls { margin-top:13px;gap:10px}.deck-controls button{width:42px;height:42px}.deck-controls .deck-play-button{width:60px;height:60px}.deck-volume{margin-top:14px}.music-deck-help{margin-top:14px}
}

@media (max-width: 420px) {
  .app-body { padding-left: 5px; padding-right: 5px; }
  .commandbar { grid-template-columns: 38px minmax(0, 1fr) 38px; }
  .brand-logo { width: 35px; }
  .feed-toolbar p { max-width: 39vw; }
  .zoom-controls { gap: 3px; }
  .zoom-controls button, .zoom-controls span { min-width: 28px; padding: 0 5px; }
  #filterAll { max-width: 61px; }
  .compose-tools small { display: none; }
  .compose-tools { margin-left: 42px; }
}

@media (max-width: 760px) and (max-height: 620px) {
  .app-body { grid-template-rows: 52px 42px minmax(0, 1fr); }
  .commandbar { height: 52px; }
  .site-nav { height:42px; }
  .site-nav-track { height:40px; }
  .site-nav a { height:32px; }
  .global-search { height: 39px; }
  .brand-logo { height: 38px; }
  .auth-modal form, .composer-modal form, .install-modal form { padding-top: 18px; gap: 8px; }
  .auth-modal img { width: 68px; max-height: 45px; }
}

@media (hover: none) {
  .category:hover, .conversation:hover, .dock button:hover, .pin-card:hover { transform: none; }
  .social-video-player.is-playing .video-controls { opacity: 1; }
}
