/* login */
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--panel);
}
.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
  background: var(--panel-2);
  border-right: 1px solid var(--border);
  color: var(--text);
}
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--text);
  color: var(--panel);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
}
.brand-lockup strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.brand-lockup span { font-size: 12px; color: var(--text-3); }
.login-hero { margin: auto 0; padding: 40px 0; max-width: 460px; }
.login-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 18px;
}
.login-hero .eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--border-strong); }
.login-hero h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.login-hero h1 em { font-style: normal; color: var(--text-3); }
.login-hero p { color: var(--text-2); font-size: 14px; line-height: 1.75; max-width: 420px; }
.brand-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 34px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.brand-point { display: flex; gap: 10px; padding: 14px 16px; background: var(--panel); }
.brand-point .icon { color: var(--text-3); margin-top: 1px; }
.brand-point strong { display: block; font-size: 13px; font-weight: 500; }
.brand-point span { font-size: 11.5px; color: var(--text-3); }
.login-foot { display: flex; align-items: center; justify-content: space-between; color: var(--text-4); font-size: 11.5px; }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--panel); }
.login-card { width: 100%; max-width: 372px; }
.login-card .login-title { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.login-card .login-sub { color: var(--text-3); margin: 7px 0 24px; font-size: 13px; line-height: 1.65; }
.login-card .field { margin-bottom: 14px; }
.login-card .input { height: 40px; }
.login-card .verify-box { height: 44px; }
.login-card .btn.lg { height: 42px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; gap: 12px; }
.login-note {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.7;
  display: flex;
  gap: 9px;
}
.login-note .icon { color: var(--text-4); margin-top: 1px; }
.login-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-weak);
  color: var(--danger);
  font-size: 12.5px;
  display: none;
  border: 1px solid color-mix(in srgb, var(--danger) 18%, transparent);
}
.login-error.show { display: flex; gap: 7px; align-items: flex-start; }

/* shell */
.workspace { display: flex; height: 100vh; height: 100dvh; background: var(--bg); }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px 10px;
  z-index: 40;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; cursor: pointer; }
.sb-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--text);
  color: var(--panel);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  flex: none;
  overflow: hidden;
}
.sb-brand-text { min-width: 0; }
.sb-brand-text strong { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-brand-text span { display: block; font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 2px 0; }
.sb-group { display: flex; flex-direction: column; gap: 1px; }
.sb-label { font-size: 11px; color: var(--text-4); font-weight: 500; padding: 0 8px 5px; letter-spacing: .02em; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  position: relative;
  transition: background .12s ease, color .12s ease;
}
.sb-item .icon { width: 17px; height: 17px; color: var(--text-3); }
.sb-item:hover { background: var(--panel-2); color: var(--text); }
.sb-item:hover .icon { color: var(--text-2); }
.sb-item.active { background: var(--primary-weak); color: var(--primary-strong); font-weight: 600; }
.sb-item.active .icon { color: var(--primary); }
.sb-item .sb-badge {
  margin-left: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sb-item .sb-badge.alert { background: var(--danger); }
.sb-utils .icon-btn { position: relative; }
.sb-utils .icon-btn .sb-badge { position: absolute; top: -3px; right: -3px; margin: 0; min-width: 15px; height: 15px; font-size: 9.5px; padding: 0 4px; border: 1.5px solid var(--panel); }
.sb-foot { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sb-user:hover { background: var(--panel-2); }
.sb-user-meta { min-width: 0; flex: 1; }
.sb-user-meta strong { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-meta span { display: block; font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-utils { display: flex; align-items: center; gap: 2px; padding: 0 2px; }
.sb-utils .icon-btn { width: 28px; height: 28px; }

.main { flex: 1; min-width: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; position: relative; background: var(--bg); }
.view { display: flex; flex: 1; min-width: 0; height: 100%; }
.page { flex: 1; min-width: 0; height: 100%; overflow-y: auto; padding: 26px 32px 56px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.page-head p { color: var(--text-3); font-size: 13px; margin-top: 5px; }
.page-head .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h3 { font-size: 14px; font-weight: 600; }
.section-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* chat */
.chat-layout { display: flex; flex: 1; min-width: 0; }
.conv-col {
  width: 318px;
  flex: none;
  border-right: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.conv-head { padding: 14px 14px 6px; }
.conv-head-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 2px; }
.conv-head-top h2 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.conv-head-top .actions { display: flex; gap: 0; }
.conv-tabs { display: flex; gap: 14px; padding: 10px 14px 0; border-bottom: 1px solid var(--border); }
.conv-tab {
  height: 30px;
  padding: 0 1px 9px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease;
}
.conv-tab:hover { color: var(--text); }
.conv-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.conv-tab .count { font-size: 11px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.conv-list { flex: 1; overflow: auto; padding: 6px 8px 12px; }
.conv-item {
  display: flex;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .1s ease;
  position: relative;
}
.conv-item:hover { background: var(--panel-2); }
.conv-item.active { background: var(--primary-weak); }
.conv-body { flex: 1; min-width: 0; }
.conv-line { display: flex; align-items: center; gap: 8px; }
.conv-name { font-weight: 500; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.conv-item.active .conv-name { color: var(--primary-strong); font-weight: 600; }
.conv-time { font-size: 11px; color: var(--text-4); flex: none; font-variant-numeric: tabular-nums; }
.conv-preview {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12.5px;
  min-height: 18px;
}
.conv-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-preview .conv-sender { flex: none; max-width: 88px; color: var(--text-4); }
.conv-preview .ellipsis { flex: 1; min-width: 0; }
.conv-preview > .tag { flex: none; }
.conv-preview .conv-meta { flex: none; }
.conv-preview .icon { width: 13px; height: 13px; flex: none; color: var(--text-4); }
.conv-meta { display: flex; align-items: center; gap: 5px; margin-left: auto; flex: none; }
.conv-flags { display: flex; gap: 3px; color: var(--text-4); }
.conv-flags .icon { width: 13px; height: 13px; }
.conv-muted { color: var(--text-4); }
.conv-empty { padding: 36px 20px; }

.chat-col { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.chat-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}
.chat-head .who { min-width: 0; }
.chat-head .who h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chat-head .who p { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; min-height: 16px; }
.chat-head .actions { display: flex; align-items: center; gap: 0; margin-left: auto; }
.announce-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--warning-weak);
  color: var(--warning);
  font-size: 12.5px;
  border-bottom: 1px solid color-mix(in srgb, var(--warning) 16%, transparent);
}
.announce-bar .icon { flex: none; }
.announce-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.msg-list { flex: 1; overflow: auto; padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 2px; }
.msg-day { text-align: center; margin: 16px 0 12px; }
.msg-day span { font-size: 11px; color: var(--text-4); background: var(--panel); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--border); }
.msg { display: flex; gap: 9px; max-width: min(74%, 720px); align-items: flex-start; margin-top: 8px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { margin-top: 1px; }
.msg-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.msg.mine .msg-main { align-items: flex-end; }
.msg-sender { font-size: 11.5px; color: var(--text-3); padding: 0 2px; display: flex; gap: 5px; align-items: center; }
.msg.mine .msg-sender { display: none; }
.bubble {
  position: relative;
  padding: 8px 12px;
  border-radius: 4px 10px 10px 10px;
  background: var(--bubble-in);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg.mine .bubble {
  background: var(--bubble-out);
  border-color: var(--bubble-out);
  color: #fff;
  border-radius: 10px 4px 10px 10px;
}
.msg.mine .bubble a { color: #eaf1ff; text-decoration: underline; text-underline-offset: 2px; }
.msg-foot { display: flex; align-items: center; gap: 7px; padding: 0 2px; font-size: 11px; color: var(--text-4); min-height: 15px; }
.msg.mine .msg-foot { flex-direction: row-reverse; }
.msg-status { display: inline-flex; align-items: center; gap: 3px; }
.msg-status.read { color: var(--primary); }
.msg-actions { display: inline-flex; gap: 1px; opacity: 0; transition: opacity .12s ease; }
.msg:hover .msg-actions { opacity: 1; }
.msg-actions button {
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
}
.msg-actions button:hover { color: var(--text); background: var(--panel-3); }
.msg-recall {
  font-size: 12.5px;
  color: var(--text-3);
  font-style: normal;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--panel-3);
  border: 1px dashed var(--border-strong);
}
.msg-recall.recall-gray { color: var(--text-3); background: var(--panel-3); border-color: var(--border-strong); }
.msg-recall.recall-blue { color: var(--primary-strong); background: var(--primary-weak); border-color: var(--primary-weak-2); }
.msg-recall.recall-amber { color: var(--warning); background: var(--warning-weak); border-color: color-mix(in srgb, var(--warning) 24%, transparent); }
.msg-recall.recall-violet { color: var(--purple); background: color-mix(in srgb, var(--purple) 8%, var(--panel)); border-color: color-mix(in srgb, var(--purple) 24%, transparent); }
.msg-recall.recall-green { color: var(--success); background: var(--success-weak); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.recall-color-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.recall-color-option { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text-3); font-size: 11px; cursor: pointer; }
.recall-color-option:hover { border-color: var(--border-strong); }
.recall-color-option.active { border-color: var(--primary); background: var(--primary-weak); color: var(--primary-strong); }
.recall-color-swatch { width: 32px; height: 20px; border-radius: 5px; display: block; }
.msg-system { align-self: center; max-width: 80%; text-align: center; margin: 8px 0; }
.msg-system span {
  font-size: 11.5px;
  color: var(--text-3);
  background: var(--panel-3);
  border-radius: 99px;
  padding: 3px 11px;
  display: inline-block;
  line-height: 1.6;
}
.msg-image { padding: 3px; border-radius: 10px; overflow: hidden; background: var(--panel); border: 1px solid var(--border); max-width: 300px; cursor: zoom-in; }
.msg.mine .msg-image { background: rgba(255, 255, 255, .16); border-color: transparent; }
.msg-image img { display: block; border-radius: 7px; max-height: 260px; object-fit: cover; }
.msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  min-width: 220px;
  max-width: 330px;
  cursor: pointer;
}
.msg.mine .msg-file { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); }
.msg-file .file-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--primary-weak);
  color: var(--primary);
  flex: none;
}
.msg.mine .msg-file .file-badge { background: rgba(255, 255, 255, .2); color: #fff; }
.msg-file .info { min-width: 0; flex: 1; }
.msg-file .info strong { display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file .info span { font-size: 11px; opacity: .72; }
.load-more { align-self: center; margin: 6px 0 12px; }
.typing-hint { height: 18px; padding: 0 26px; font-size: 11.5px; color: var(--text-4); }

.composer { flex: none; border-top: 1px solid var(--border); background: var(--panel); padding: 10px 16px 12px; }
.composer-box { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel); padding: 6px 8px 6px; transition: border-color .13s ease, box-shadow .13s ease; }
.composer-box:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.composer textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  min-height: 40px;
  max-height: 160px;
  padding: 6px 4px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.65;
}
.composer-tools { display: flex; align-items: center; gap: 0; margin-top: 2px; }
.composer-tools .spacer { flex: 1; }
.composer-tip { font-size: 11px; color: var(--text-4); margin-right: 8px; }
.send-btn { height: 28px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 12.5px; }
.drop-hint {
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--primary) 6%, var(--panel));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  color: var(--primary);
  font-weight: 500;
  font-size: 13px;
  z-index: 30;
  pointer-events: none;
}
.emoji-panel {
  position: absolute;
  bottom: 92px;
  left: 18px;
  width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  z-index: 40;
  animation: pop .12s ease;
}
.emoji-panel button { border: none; background: transparent; font-size: 18px; height: 30px; border-radius: 5px; cursor: pointer; }
.emoji-panel button:hover { background: var(--panel-2); }
.quick-replies {
  position: absolute;
  bottom: 92px;
  left: 18px;
  width: 268px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 40;
}
.quick-reply { padding: 7px 9px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.quick-reply:hover { background: var(--panel-2); color: var(--text); }

/* files */
.files-layout { display: flex; flex: 1; min-width: 0; }
.files-side { width: 224px; flex: none; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.side-head { padding: 14px 14px 8px; display: flex; align-items: center; justify-content: space-between; }
.side-head h2 { font-size: 15px; font-weight: 600; }
.side-body { flex: 1; overflow: auto; padding: 2px 8px 16px; }
.side-section { margin-bottom: 14px; }
.side-label { font-size: 11px; color: var(--text-4); font-weight: 500; padding: 5px 8px; display: flex; align-items: center; gap: 6px; }
.side-label .icon-btn { margin-left: auto; width: 22px; height: 22px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  transition: background .1s ease, color .1s ease;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.side-item:hover { background: var(--panel-2); color: var(--text); }
.side-item.active { background: var(--primary-weak); color: var(--primary-strong); font-weight: 600; }
.side-item .icon { width: 16px; height: 16px; color: var(--text-3); }
.side-item.active .icon { color: var(--primary); }
.side-item .count { margin-left: auto; font-size: 11px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.side-item .unread-badge { margin-left: auto; }
.side-quota { padding: 11px 12px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--border); margin: 4px 6px 0; }
.side-quota .quota-line { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); margin-bottom: 7px; }
.side-quota .quota-line strong { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.folder-tree { margin-left: 10px; border-left: 1px solid var(--border); padding-left: 4px; }
.tree-node { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-2); font-size: 12.5px; border: 0; background: transparent; width: 100%; text-align: left; }
.tree-node:hover { background: var(--panel-2); color: var(--text); }
.tree-node.active { background: var(--primary-weak); color: var(--primary-strong); }
.tree-node .icon { width: 14px; height: 14px; color: var(--text-4); }
.tree-node.active .icon { color: var(--primary); }
.tree-toggle { width: 16px; height: 16px; display: grid; place-items: center; color: var(--text-4); border: none; background: transparent; cursor: pointer; padding: 0; }

.files-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); }
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 58px;
}
.files-toolbar .title { font-size: 15px; font-weight: 600; margin-right: 4px; display: flex; align-items: center; gap: 8px; }
.files-toolbar .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.files-search { width: 210px; }
.breadcrumb { display: flex; align-items: center; gap: 1px; padding: 9px 24px 0; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.breadcrumb button { border: none; background: transparent; color: var(--text-3); cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: 12.5px; }
.breadcrumb button:hover { color: var(--primary-strong); background: var(--primary-weak); }
.breadcrumb .sep { opacity: .55; padding: 0 1px; }
.breadcrumb .current { color: var(--text-2); font-weight: 500; }
.files-content { flex: 1; overflow: auto; padding: 10px 24px 28px; }
.file-card { border-top: 1px solid var(--border); }
.file-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 96px 124px 84px;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-4);
  font-weight: 500;
  letter-spacing: .01em;
  position: sticky;
  top: -10px;
  background: var(--panel);
  z-index: 2;
}
.file-head > :last-child { text-align: right; }
.file-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 96px 124px 84px;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s ease;
  position: relative;
}
.file-row:hover { background: var(--panel-2); }
.file-row.selected { background: var(--primary-weak); }
.file-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.file-name strong { font-size: 13px; font-weight: 450; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-name span { font-size: 11px; color: var(--text-4); display: flex; align-items: center; gap: 5px; }
.file-size, .file-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.file-actions > * { opacity: 0; transition: opacity .1s ease; }
.file-actions > [data-act="more"] { opacity: .55; }
.file-row:hover .file-actions > *, .file-row.selected .file-actions > *, .file-row.trash-row .file-actions > * { opacity: 1; }
.file-tags { display: inline-flex; gap: 4px; align-items: center; }
.files-empty { padding: 56px 20px; }
.dropzone {
  margin: 14px 0 0;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text-4);
  background: var(--panel);
  transition: border-color .13s ease, background .13s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dropzone .icon { color: var(--text-4); }
.dropzone strong { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; }
.dropzone span { font-size: 12px; color: var(--text-4); }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.dropzone:hover .icon, .dropzone.dragover .icon { color: var(--primary); }
.dropzone:hover strong, .dropzone.dragover strong { color: var(--primary-strong); }

.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.share-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .13s ease;
}
.share-card:hover { border-color: var(--border-strong); }
.share-card-top { display: flex; gap: 10px; align-items: flex-start; }
.share-card-top .info { flex: 1; min-width: 0; }
.share-card-top strong { font-size: 13px; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-card-top .sub { color: var(--text-4); font-size: 11.5px; margin-top: 2px; }
.share-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-3);
  font-family: var(--mono);
}
.share-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-stats { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-4); }
.share-stats b { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.share-actions { display: flex; gap: 6px; margin-top: auto; justify-content: flex-end; }
.share-actions .btn { flex: 0 0 auto; }

/* friends */
.friends-layout { display: flex; flex: 1; min-width: 0; }
.friends-col { width: 300px; flex: none; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.friends-detail { flex: 1; min-width: 0; background: var(--bg); overflow: auto; padding: 26px 30px; }
.friend-item { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.friend-item:hover { background: var(--panel-2); }
.friend-item.active { background: var(--primary-weak); }
.friend-item .meta { flex: 1; min-width: 0; }
.friend-item .meta strong { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-item .meta span { font-size: 11.5px; color: var(--text-4); }
.friend-item .online { color: var(--success); font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.friend-item .online i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); display: block; }
.friend-check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.friend-check.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.friend-check .icon { width: 11px; height: 11px; stroke-width: 3; }

.profile-card {
  max-width: 620px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.profile-cover { height: 76px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.profile-head { padding: 0 22px 18px; margin-top: -28px; display: flex; align-items: flex-end; gap: 14px; position: relative; z-index: 1; }
.profile-head .avatar { border: 3px solid var(--panel); }
.profile-head .info { flex: 1; min-width: 0; padding-bottom: 2px; }
.profile-head .info h3 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.profile-head .info p { color: var(--text-3); font-size: 12.5px; }
.profile-body { padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.profile-row { display: flex; gap: 10px; font-size: 12.5px; }
.profile-row .label { width: 84px; color: var(--text-4); flex: none; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.request-card {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  align-items: center;
  margin-bottom: 8px;
}
.request-card .info { flex: 1; min-width: 0; }
.request-card .info strong { font-size: 13px; font-weight: 500; }
.request-card .info p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.request-card .actions { display: flex; gap: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-title h3 { font-size: 14px; font-weight: 600; }
.section-title .tag { margin-left: auto; }

/* settings */
.settings-layout { flex: 1; display: flex; min-width: 0; background: var(--bg); }
.settings-nav { width: 208px; flex: none; background: var(--panel); border-right: 1px solid var(--border); padding: 16px 10px; }
.settings-nav h2 { font-size: 15px; font-weight: 600; padding: 0 8px 12px; }
.settings-nav .side-item { margin-bottom: 1px; }
.settings-body { flex: 1; min-width: 0; overflow: auto; padding: 26px 32px 60px; }
.settings-inner { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.settings-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.settings-card > header { margin-bottom: 16px; }
.settings-card h3 { font-size: 14px; font-weight: 600; }
.settings-card header p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.profile-edit { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-edit .avatar { flex: none; }
.profile-edit .note { font-size: 12px; color: var(--text-4); line-height: 1.6; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.quota-visual { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.quota-bar { height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; display: flex; }
.quota-bar i { height: 100%; }
.quota-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; color: var(--text-3); }
.quota-legend .dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.quota-total { display: flex; align-items: baseline; gap: 7px; }
.quota-total strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.device-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.device-row:last-child { border-bottom: none; }
.device-row .icon-box { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--panel-2); display: grid; place-items: center; color: var(--text-3); flex: none; }
.device-row .meta { flex: 1; min-width: 0; }
.device-row .meta strong { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.device-row .meta span { font-size: 11.5px; color: var(--text-4); }
.theme-picker { display: flex; gap: 8px; }
.theme-option {
  flex: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: border-color .13s ease, background .13s ease;
  background: var(--panel);
}
.theme-option:hover { border-color: var(--text-4); }
.theme-option.active { border-color: var(--primary); background: var(--primary-weak); }
.theme-preview { width: 40px; height: 28px; border-radius: 5px; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; flex: none; }
.theme-preview .bar { height: 6px; background: var(--panel-3); }
.theme-preview .body { flex: 1; background: var(--panel-2); }
.theme-preview.dark-preview { background: #0b0c0f; border-color: #2a2d35; }
.theme-preview.dark-preview .bar { background: #1d2027; }
.theme-preview.dark-preview .body { background: #121317; }

/* upload */
.upload-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 328px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 700;
  overflow: hidden;
  animation: pop .16s ease;
}
.upload-dock-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
}
.upload-dock-head .btn { margin-left: auto; }
.upload-list { max-height: 260px; overflow: auto; padding: 4px; }
.upload-item { padding: 7px 9px; border-radius: var(--radius-sm); }
.upload-item:hover { background: var(--panel-2); }
.upload-item .row { gap: 7px; }
.upload-item .name { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .pct { font-size: 11px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.upload-item .progress { margin-top: 5px; height: 3px; }
.upload-item .status { font-size: 11px; margin-top: 3px; color: var(--text-4); }
.upload-item.error .status { color: var(--danger); }
.upload-item.done .status { color: var(--success); }

/* preview */
.preview-modal { max-width: 960px; width: min(960px, calc(100vw - 48px)); }
.preview-body { padding: 0; background: var(--panel-2); display: flex; align-items: center; justify-content: center; min-height: 240px; max-height: 72vh; overflow: auto; }
.preview-body img { max-width: 100%; max-height: 72vh; display: block; }
.preview-body iframe { width: 100%; height: 72vh; border: none; background: #fff; }
.preview-video { max-width: 100%; max-height: 72vh; background: #000; display: block; }

/* share form */
.share-form .field { margin-bottom: 12px; }
.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.option-row:hover { border-color: var(--border-strong); }
.option-row.active { border-color: var(--primary); background: var(--primary-weak); }
.option-row .radio-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.option-row.active .radio-dot { border-color: var(--primary); }
.option-row.active .radio-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.option-row .text strong { display: block; font-size: 12.5px; font-weight: 500; }
.option-row .text span { font-size: 11.5px; color: var(--text-4); }
.option-row .spacer { flex: 1; }
.expiry-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.expiry-pill {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-2);
}
.expiry-pill:hover { border-color: var(--border-strong); }
.expiry-pill.active { border-color: var(--primary); background: var(--primary-weak); color: var(--primary-strong); font-weight: 500; }
.user-picker { max-height: 200px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; }
.user-pick-row { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: var(--radius-sm); cursor: pointer; }
.user-pick-row:hover { background: var(--panel-2); }

/* notices */
.notice-list { display: flex; flex-direction: column; gap: 6px; }
.notice-item { display: flex; gap: 9px; padding: 10px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); }
.notice-item .icon-box { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-3); display: grid; place-items: center; flex: none; }
.notice-item .meta { flex: 1; min-width: 0; }
.notice-item .meta strong { font-size: 12.5px; display: flex; align-items: center; gap: 5px; font-weight: 500; }
.notice-item .meta span { font-size: 11.5px; color: var(--text-4); }
.notice-item[data-id] { cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.notice-item[data-id]:hover { border-color: var(--border-strong); background: var(--panel-2); }
.notice-item.unread { border-color: var(--primary-weak-2); background: var(--primary-weak); }
.notice-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); display: inline-block; }
.notice-link { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-size: 11.5px; flex: none; align-self: center; }
.notice-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.notice-tab { border: 1px solid transparent; background: transparent; color: var(--text-3); padding: 4px 9px; border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; }
.notice-tab:hover { color: var(--text); background: var(--panel-2); }
.notice-tab.active { color: var(--primary-strong); background: var(--primary-weak); border-color: var(--primary-weak-2); font-weight: 500; }

/* members */
.member-row { display: flex; align-items: center; gap: 9px; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: none; }
.member-row .meta { flex: 1; min-width: 0; }
.member-row .meta strong { font-size: 12.5px; display: flex; gap: 5px; align-items: center; font-weight: 500; }
.member-row .meta span { font-size: 11px; color: var(--text-4); }
.member-row .ops { display: flex; gap: 4px; }
.member-row .ops .btn { height: 24px; padding: 0 7px; font-size: 11.5px; }
.invite-list { border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 240px; overflow: auto; padding: 4px; }
.invite-row { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: var(--radius-sm); cursor: pointer; }
.invite-row:hover { background: var(--panel-2); }
.invite-row.selected { background: var(--primary-weak); }

/* shared folders */
.shared-member-list { border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 260px; overflow: auto; background: var(--panel); }
.shared-member-option { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid var(--border); cursor: pointer; }
.shared-member-option:last-child { border-bottom: none; }
.shared-member-option:hover { background: var(--panel-2); }
.shared-member-option input { width: auto; accent-color: var(--primary); }
.shared-member-option .grow { display: flex; flex-direction: column; line-height: 1.35; }
.shared-member-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-bottom: 1px solid var(--border); }
.shared-member-row:last-child { border-bottom: none; }
.shared-member-row .grow { display: flex; flex-direction: column; }
.shared-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 2px 10px; }
.shared-members { display: flex; flex-wrap: wrap; gap: 5px; }
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--panel);
  font-size: 11.5px;
}
.member-chip .tag { font-size: 10px; padding: 1px 5px; }

/* home */
.home-view { display: block; height: 100%; overflow-y: auto; padding: 26px 32px 48px; background: var(--bg); }
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.home-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.home-head p { margin: 5px 0 0; color: var(--text-3); font-size: 13px; }
.home-stats {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.home-stat { padding: 15px 18px; border-left: 1px solid var(--border); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.home-stat:first-child { border-left: none; }
.home-stat-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.home-stat-top .icon { width: 15px; height: 15px; color: var(--text-4); }
.home-stat-value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.2; }
.home-stat-value small { font-size: 12px; font-weight: 400; color: var(--text-4); margin-left: 3px; letter-spacing: 0; }
.home-stat-foot { margin-top: auto; font-size: 11.5px; color: var(--text-4); }
.home-stat .progress { margin-top: 2px; background: color-mix(in srgb, var(--text-4) 18%, transparent); }
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.home-span-7 { grid-column: span 7; }
.home-span-5 { grid-column: span 5; }
.home-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.home-card-head h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; }
.home-card-head p { margin: 0; font-size: 11.5px; color: var(--text-4); }
.home-list { padding: 4px 6px 6px; flex: 1; }
.home-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; min-width: 0; }
.home-row:hover { background: var(--panel-2); }
.home-row .grow, .home-share-top .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.home-row strong, .home-share-top strong { font-size: 12.5px; font-weight: 450; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.home-row .grow span, .home-share-top .grow span { font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-conv-meta { display: flex; align-items: center; gap: 6px; }
.home-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; color: var(--text-4); text-align: center; }
.home-empty .icon { width: 22px; height: 22px; stroke-width: 1.5; }
.home-empty strong { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.home-empty p { margin: 0 0 6px; font-size: 11.5px; }
.home-share { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.home-share:last-child { border-bottom: none; }
.home-share-top { display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
.home-share-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; padding-left: 1px; }
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; background: var(--border); flex: 1; }
.home-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border: 0;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: background .12s ease;
}
.home-action:hover { background: var(--panel-2); }
.home-action-icon { color: var(--text-4); display: flex; margin-bottom: 5px; }
.home-action:hover .home-action-icon { color: var(--primary); }
.home-action strong { font-size: 12.5px; font-weight: 500; }
.home-action span { font-size: 11px; color: var(--text-4); }

/* community */
.community-view { display: block; flex: 1; height: 100%; overflow-y: auto; padding: 26px 32px 56px; background: var(--bg); }
.community-head, .community-intro, .community-feed, .community-more { width: min(820px, 100%); margin-left: auto; margin-right: auto; }
.community-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.community-head h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.community-head p { margin: 0; color: var(--text-3); font-size: 12.5px; }
.community-head .actions { display: flex; align-items: center; gap: 8px; }
.community-intro { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-3); background: var(--panel); border: 1px solid var(--border); font-size: 12px; }
.community-intro .icon { color: var(--text-4); flex: none; }
.community-feed { display: flex; flex-direction: column; gap: 10px; }
.community-post { padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.post-head .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.post-head strong { font-size: 13px; font-weight: 500; }
.post-head span { color: var(--text-4); font-size: 11px; }
.post-content { font-size: 13.5px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.post-file { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--border); }
.post-file .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.post-file strong { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-file span { color: var(--text-4); font-size: 11px; }
.post-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.post-action { display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; border: none; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; }
.post-action:hover, .post-action.active { color: var(--primary-strong); }
.post-action.active .icon { fill: color-mix(in srgb, var(--primary) 16%, transparent); }
.post-comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.comment-list { display: flex; flex-direction: column; gap: 9px; }
.comment-row { display: flex; align-items: flex-start; gap: 8px; }
.comment-row .grow { min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 1px; }
.comment-meta strong { font-size: 12px; font-weight: 500; }
.comment-meta span { color: var(--text-4); font-size: 11px; }
.comment-row p { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 7px; margin-top: 10px; }
.comment-form .input { flex: 1; height: 32px; }
.community-more { display: flex; justify-content: center; padding: 16px 0 0; }
.community-empty { padding: 52px 20px; }

/* legacy wallet / games / external drive */
.friend-request-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid var(--primary-weak-2);
  border-radius: var(--radius-sm);
  background: var(--primary-weak);
  color: var(--primary-strong);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.friend-request-hint span { margin-left: auto; font-size: 11px; opacity: .8; }
[data-role="notice-btn"] { position: relative; }

.games-view { display: block; flex: 1; height: 100%; overflow-y: auto; padding: 26px 32px 56px; background: var(--bg); }
.games-head, .games-grid, .games-tip { width: min(960px, 100%); margin-left: auto; margin-right: auto; }
.games-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.games-head h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; }
.games-head p { margin: 0; color: var(--text-3); font-size: 12.5px; }
.coin-wallet { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.coin-icon { width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--warning-weak); color: var(--warning); }
.coin-balance { display: flex; flex-direction: column; gap: 1px; min-width: 60px; }
.coin-balance span { font-size: 10.5px; color: var(--text-4); }
.coin-balance strong { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.game-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.game-card.coming { opacity: .66; }
.game-card-top { display: flex; align-items: center; gap: 9px; }
.game-card-top h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.game-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); flex: none; }
.game-card p { margin: 0; color: var(--text-2); font-size: 12.5px; line-height: 1.65; min-height: 40px; }
.game-card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--text-4); font-size: 11.5px; border-top: 1px solid var(--border); padding-top: 9px; margin-top: auto; }
.game-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.game-play { margin-top: 2px; }
.games-tip { display: flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--text-4); font-size: 12px; }
.game-wallet-line { display: flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12.5px; margin-bottom: 12px; }
.game-wallet-line strong { color: var(--text); }
.game-intro, .game-finish { text-align: center; padding: 18px 12px 8px; }
.game-intro-icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: var(--radius); display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); }
.game-intro h3, .game-finish h3 { margin: 0 0 5px; font-size: 16px; }
.game-intro p, .game-finish p { margin: 0 0 14px; color: var(--text-3); font-size: 12.5px; }
.game-finish.success .game-intro-icon { background: var(--success-weak); color: var(--success); }
.game-finish.danger .game-intro-icon { background: var(--danger-weak); color: var(--danger); }
.guess-status { font-size: 12px; color: var(--text-3); margin-bottom: 7px; }
.guess-history { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; margin-bottom: 11px; }
.guess-chip { padding: 2px 8px; border-radius: 99px; background: var(--panel-3); color: var(--text-2); font-size: 11px; }
.guess-chip.higher { background: var(--warning-weak); color: var(--warning); }
.guess-chip.lower { background: var(--primary-weak); color: var(--primary-strong); }
.guess-chip.hit { background: var(--success-weak); color: var(--success); }
.guess-input-row { display: flex; gap: 7px; }
.guess-input-row .input { flex: 1; }
.guess-feedback { margin-top: 10px; padding: 8px 11px; border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-2); font-size: 12px; }
.guess-feedback.success { background: var(--success-weak); color: var(--success); }
.guess-feedback.danger { background: var(--danger-weak); color: var(--danger); }
.dice-row { display: flex; justify-content: center; gap: 14px; margin: 20px 0 14px; }
.dice-face { width: 76px; height: 76px; border-radius: var(--radius); display: grid; place-items: center; font-size: 38px; font-weight: 600; color: var(--primary); background: var(--panel); border: 1px solid var(--border-strong); }
.dice-face.spinning { animation: dice-shake .18s linear infinite; }
@keyframes dice-shake { 0% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 100% { transform: rotate(-4deg); } }
.dice-result { text-align: center; margin-bottom: 12px; display: flex; flex-direction: column; gap: 3px; }
.dice-result strong { font-size: 15px; }
.dice-result.success strong { color: var(--success); }
.dice-result span { color: var(--text-4); font-size: 12px; }
#modal-root .modal-body > .btn.primary { width: 100%; margin-top: 6px; }
.coin-ledger { display: flex; flex-direction: column; gap: 2px; }
.coin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.coin-row:last-child { border-bottom: none; }
.coin-type { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); }
.coin-type > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coin-type strong { font-size: 12px; color: var(--text); font-weight: 500; }
.coin-type span { font-size: 10.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-amount { font-size: 13px; font-weight: 500; flex: none; font-variant-numeric: tabular-nums; }
.coin-amount.plus { color: var(--success); }
.coin-amount.minus { color: var(--danger); }

.rail-coin { display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel-2); color: var(--warning); font-size: 11px; font-weight: 600; cursor: pointer; }
.rail-coin .icon { width: 13px; height: 13px; }
.rail-coin b { font-weight: 600; }
.wallet-hero { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.wallet-coin-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--warning-weak); color: var(--warning); }
.wallet-balance { display: flex; flex-direction: column; gap: 0; }
.wallet-balance span { color: var(--text-4); font-size: 11px; }
.wallet-balance strong { color: var(--text); font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.wallet-note { margin-left: auto; max-width: 220px; text-align: right; color: var(--text-4); font-size: 11.5px; }
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.wallet-action { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); text-align: left; cursor: pointer; }
.wallet-action:hover:not(:disabled) { border-color: var(--border-strong); background: var(--panel-2); }
.wallet-action:disabled { opacity: .6; cursor: default; }
.wallet-action-icon { width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); flex: none; }
.wallet-action > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.wallet-action strong { font-size: 12px; color: var(--text); font-weight: 500; }
.wallet-action small { font-size: 11px; color: var(--text-4); }
.wallet-quota { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--text-4); font-size: 11.5px; }
.wallet-ledger-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 5px; }
.wallet-ledger-head strong { font-size: 12.5px; }
.wallet-ledger-head span { color: var(--text-4); font-size: 11px; }
.dav-guide { display: flex; flex-direction: column; gap: 8px; }
.dav-guide > div { padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel-2); }
.dav-guide strong { display: block; margin-bottom: 3px; font-size: 12px; }
.dav-guide p { margin: 0; color: var(--text-2); font-size: 11.5px; line-height: 1.7; }

.external-drive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.external-drive-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); text-align: left; cursor: pointer; transition: border-color .13s ease, background .13s ease; }
.external-drive-card:hover { border-color: var(--border-strong); background: var(--panel-2); }
.external-drive-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--panel-2); color: var(--text-2); flex: none; }
.external-drive-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.external-drive-info strong { font-size: 12.5px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-drive-info small { color: var(--text-4); font-size: 11px; }
.external-drive-open { color: var(--text-4); }
.remote-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.remote-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 1px; font-size: 12px; min-width: 0; }
.crumb-link { border: 0; background: transparent; color: var(--primary); padding: 2px 4px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.crumb-link:hover { background: var(--primary-weak); }
.crumb-sep { color: var(--text-4); }
.remote-list { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.remote-row { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid var(--border); min-width: 0; }
.remote-row:last-child { border-bottom: 0; }
.remote-row[data-dir="1"] { cursor: pointer; }
.remote-row[data-dir="1"]:hover { background: var(--panel-2); }
.remote-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.remote-meta { color: var(--text-4); font-size: 11px; flex: none; }
.remote-action { color: var(--text-4); display: flex; }

/* vip */
.vip-view { display: block; flex: 1; height: 100%; overflow-y: auto; padding: 26px 32px 56px; background: var(--bg); }
.vip-inner { width: min(880px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.vip-hero { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border); position: relative; overflow: hidden; }
.vip-hero.active { background: var(--panel); border-color: color-mix(in srgb, var(--warning) 34%, var(--border)); }
.vip-crown { width: 52px; height: 52px; border-radius: var(--radius); display: grid; place-items: center; background: var(--warning-weak); color: var(--warning); flex: none; }
.vip-hero-text { flex: 1; min-width: 0; }
.vip-eyebrow { font-size: 10.5px; letter-spacing: .12em; color: var(--text-4); font-weight: 600; }
.vip-hero h2 { margin: 4px 0 5px; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.vip-hero p { margin: 0; color: var(--text-3); font-size: 12.5px; }
.vip-status { padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--border); font-size: 11.5px; font-weight: 500; flex: none; }
.vip-status.active { background: var(--warning-weak); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 26%, transparent); }
.vip-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 16px 18px; }
.vip-card header { margin-bottom: 12px; }
.vip-card header h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; }
.vip-card header p { margin: 0; color: var(--text-4); font-size: 11.5px; }
.vip-redeem { display: flex; gap: 8px; }
.vip-redeem .input { flex: 1; text-transform: uppercase; letter-spacing: .04em; }
.vip-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.vip-benefits > div { padding: 12px 13px; background: var(--panel); }
.vip-benefits > div > span { width: 26px; height: 26px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--warning-weak); color: var(--warning); margin-bottom: 7px; }
.vip-benefits strong { display: block; font-size: 12px; margin-bottom: 3px; font-weight: 500; }
.vip-benefits p { margin: 0; color: var(--text-4); font-size: 11.5px; line-height: 1.6; }
.vip-foot { display: flex; align-items: center; gap: 5px; color: var(--text-4); font-size: 11.5px; }
.vip-badge { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 3px; background: var(--warning-weak); color: var(--warning); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; vertical-align: 1px; }
.rail-vip-dot { position: absolute; top: 5px; left: 7px; padding: 1px 4px; border-radius: 3px; background: var(--warning-weak); color: var(--warning); font-size: 7px; font-weight: 700; }
.rail-vip { padding: 2px 6px; border-radius: 4px; background: var(--warning-weak); color: var(--warning); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }

/* responsive */
@media (max-width: 1180px) {
  .conv-col { width: 288px; }
  .friends-col { width: 276px; }
  .files-side { width: 208px; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 210px; }
  .page, .home-view, .community-view, .vip-view, .games-view { padding: 22px 24px 48px; }
  .settings-nav { width: 186px; }
  .home-stats { grid-template-columns: 1fr 1fr; }
  .home-stat:nth-child(3) { border-left: none; }
  .home-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .home-span-7, .home-span-5 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .workspace { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 58px;
    flex-direction: row;
    align-items: center;
    padding: 0 4px env(safe-area-inset-bottom);
    border-right: none;
    border-top: 1px solid var(--border);
    background: var(--panel);
    z-index: 60;
  }
  .sb-brand, .sb-label, .sb-foot { display: none; }
  .sb-nav { flex-direction: row; align-items: center; justify-content: space-around; gap: 0; overflow: visible; padding: 0; }
  .sb-group { flex-direction: row; gap: 0; }
  .sb-item {
    flex-direction: column;
    gap: 2px;
    height: 50px;
    width: auto;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 500;
    justify-content: center;
    min-width: 50px;
  }
  .sb-item .icon { width: 19px; height: 19px; }
  .sb-item .sb-badge { position: absolute; top: 3px; right: 6px; margin: 0; }
  .main { height: calc(100vh - 58px); height: calc(100dvh - 58px); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-side { padding: 28px 20px; }
  .files-side {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 30;
    width: 236px;
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .files-side.open { transform: none; }
  .file-head, .file-row { grid-template-columns: 30px minmax(0, 1fr) 88px 84px; }
  .file-head > :nth-child(4), .file-row > :nth-child(4) { display: none; }
  .settings-nav { width: 172px; }
  .settings-body { padding: 22px 20px 48px; }
}
@media (max-width: 760px) {
  .chat-layout { position: relative; }
  .conv-col { width: 100%; border-right: none; }
  .chat-col { display: none; }
  .chat-layout.chatting .conv-col { display: none; }
  .chat-layout.chatting .chat-col { display: flex; }
  .view { position: relative; }
  .chat-head { height: 52px; padding: 0 10px; gap: 8px; }
  .chat-head .who h3 { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-head .who p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
  .chat-head .actions { flex: none; }
  .chat-head .actions [data-role="conv-info"], .chat-head .actions [data-role="group-dir"] { display: none; }
  #toast-root { top: auto; bottom: 74px; }
  .friends-col { width: 100%; border-right: none; }
  .friends-detail { display: none; }
  .friends-layout.detail-open .friends-col { display: none; }
  .friends-layout.detail-open .friends-detail { display: block; padding: 18px 14px; }
  .settings-layout { flex-direction: column; }
  .settings-nav { width: 100%; display: flex; flex-wrap: wrap; gap: 2px; overflow: visible; padding: 8px; border-right: none; border-bottom: 1px solid var(--border); }
  .settings-nav h2 { display: none; }
  .settings-nav .side-item { white-space: nowrap; padding: 6px 10px; width: auto; }
  .settings-body { padding: 16px 14px 48px; }
  .field-row { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
  .upload-dock { left: 12px; right: 12px; width: auto; bottom: 70px; }
  .files-toolbar { padding: 10px 14px; gap: 6px; }
  .files-toolbar .title { font-size: 14px; flex: 1 1 auto; }
  .files-toolbar .actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .files-toolbar .actions .btn { flex: none; }
  .files-search { flex: 1 1 auto; width: auto; min-width: 120px; }
  .file-actions { opacity: 1; }
  .file-head, .file-row { grid-template-columns: 30px minmax(0, 1fr) 80px; padding: 8px 2px; }
  .file-head > :nth-child(3), .file-row > :nth-child(3),
  .file-head > :nth-child(4), .file-row > :nth-child(4) { display: none; }
  .files-content { padding: 8px 14px 20px; }
  .dropzone { margin: 12px 0 0; flex-direction: column; gap: 4px; padding: 16px; }
  .msg { max-width: 86%; }
  .msg-list { padding: 14px 12px 4px; }
  .composer { padding: 8px 10px 10px; }
  .announce-bar { padding: 7px 12px; }
  .brand-points { grid-template-columns: 1fr; }
  .home-stats { grid-template-columns: 1fr; }
  .home-stat { border-left: none; }
  .home-stat + .home-stat { border-top: 1px solid var(--border); }
  .home-head h1 { font-size: 19px; }
  .home-actions { grid-template-columns: 1fr 1fr; }
  .community-head { align-items: flex-start; flex-direction: column; }
  .community-head .actions { width: 100%; }
  .community-head .search-box { flex: 1; width: auto !important; }
  .vip-benefits { grid-template-columns: 1fr; }
  .vip-hero { flex-wrap: wrap; }
  .games-grid { grid-template-columns: 1fr; }
  .games-head { align-items: flex-start; flex-direction: column; }
  .coin-wallet { width: 100%; flex-wrap: wrap; }
  .page, .home-view, .community-view, .vip-view, .games-view { padding: 18px 14px 40px; }
}
