:root {
  --blue: #3370ff;
  --blue-deep: #245bdb;
  --cyan: #14c9c9;
  --purple: #7b5cfa;
  --green: #00b96b;
  --orange: #ff7a45;
  --red: #f54a45;
  --ink: #1f2329;
  --muted: #646a73;
  --soft: #8f959e;
  --line: #e5e6eb;
  --fill: #f5f6f7;
  --surface: #ffffff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body { overflow-x: hidden; overscroll-behavior: none; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { border: 0; outline: 0; color: inherit; background: none; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; stroke-width: 1.9; }
.lark-icon { display: block; width: 24px; height: 24px; overflow: visible; color: inherit; }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}

main { min-height: 100dvh; }
.page { display: none; min-height: 100dvh; padding-bottom: calc(64px + max(var(--safe-bottom), 10px)); background: #fff; }
.page.active { display: block; animation: pageIn .2s ease; }
.detail-page { position: relative; z-index: 30; padding-bottom: 0; background: #fff; }
.detail-page.active { display: flex; flex-direction: column; }
@keyframes pageIn { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.topbar,
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  display: grid;
  grid-template-columns: 76px 1fr 76px;
  align-items: center;
  padding: max(8px, env(safe-area-inset-top)) 16px 0;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(229,230,235,.72);
  backdrop-filter: blur(16px);
}

.topbar h1 { margin: 0; text-align: center; font-size: 18px; font-weight: 650; }
.avatar-button { position: relative; width: 34px; height: 34px; padding: 0; }
.avatar-button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #3370ff, #5b8bff);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.avatar-button span img,
.account-big-avatar span img,
.native-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}
.avatar-button i { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--green); }
.topbar-actions { display: flex; justify-content: flex-end; gap: 4px; }
.top-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; }
.top-icon:active { background: var(--fill); }
.top-icon svg { width: 21px; height: 21px; }

.account-message-header {
  min-height: 76px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  background: #fff;
}
.account-identity { min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.account-identity-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.account-identity-copy strong { font-size: 17px; line-height: 1.15; font-weight: 600; }
.account-identity-copy small { max-width: 238px; color: var(--soft); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-message-header .topbar-actions { flex: 0 0 auto; }
.account-message-header .top-icon { width: 40px; height: 40px; border-radius: 50%; }
.account-message-header .top-icon svg { width: 26px; height: 26px; }
.account-message-header .has-alert::after { top: 3px; right: 3px; }
.has-alert { position: relative; }
.has-alert::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border: 2px solid white; border-radius: 50%; background: var(--red); }

.message-filter-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.message-filter-row::-webkit-scrollbar,
.doc-space-row::-webkit-scrollbar { display: none; }
.filter-pill { flex: 0 0 auto; height: 30px; padding: 0 13px; border-radius: 6px; color: var(--muted); background: var(--fill); font-size: 13px; }
.filter-pill.active { color: var(--blue); background: #eaf0ff; font-weight: 600; }
.filter-pill b { margin-left: 3px; font-size: 11px; }

.smart-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 16px 10px;
}
.smart-strip button {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr 12px;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 8px 9px;
  border: 1px solid #e9eaf0;
  border-radius: 8px;
  text-align: left;
}
.smart-strip button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.smart-strip strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart-strip small { color: var(--soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart-strip > button > svg { width: 13px; color: #b8babf; }
.smart-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: white; }
.smart-icon svg { width: 18px; }
.aily-mark { background: linear-gradient(145deg, #7559f6, #bd6df0 50%, #ff987d); }
.task-mark { background: linear-gradient(145deg, #3370ff, #14c9c9); }

.chat-list { padding-top: 2px; }
.chat-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) max-content;
  gap: 11px;
  align-items: center;
  padding: 8px 16px;
  text-align: left;
  background: white;
}
.chat-row:active { background: #f7f8fa; }
.avatar {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: white;
  font-weight: 700;
  font-size: 14px;
}
.avatar.round { border-radius: 50%; }
.avatar .pin { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; display: grid; place-items: center; color: #8f959e; background: white; border-radius: 50%; box-shadow: 0 1px 4px rgba(31,35,41,.15); }
.avatar .pin svg { width: 9px; height: 9px; }
.avatar-unread {
  position: absolute;
  top: -5px;
  right: -6px;
  z-index: 2;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.avatar.native-avatar { overflow: visible; color: inherit; background: transparent; }
.avatar.native-avatar > img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: contain; }
.chat-copy { min-width: 0; }
.chat-head { min-width: 0; display: flex; gap: 6px; align-items: center; }
.chat-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.chat-label { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; color: #a66b00; background: #fff6d8; font-size: 9px; font-style: normal; font-weight: 500; line-height: 1.45; white-space: nowrap; }
.chat-label.ai, .chat-label.official, .chat-label.group { color: #245bdb; background: #e8efff; }
.chat-label.external { color: #245bdb; background: #eaf2ff; }
.chat-label.app { color: #245bdb; background: #e8f0ff; }
.chat-label.all { color: #245bdb; background: #edf2ff; }
.chat-copy p { margin: 4px 0 0; color: var(--soft); font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; padding: 2px 0; }
.chat-meta time { color: #a8abb2; font-size: 11px; white-space: nowrap; }
.unread-badge { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; color: white; background: var(--red); font-size: 10px; font-weight: 600; }
.muted-icon { color: #b8babf; }
.muted-icon svg { width: 14px; }

.calendar-topbar { grid-template-columns: 64px 1fr 80px; }
.month-switch { justify-self: center; display: flex; align-items: center; gap: 3px; }
.month-switch strong { font-size: 18px; }
.month-switch svg { width: 15px; color: var(--soft); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--soft); font-size: 11px; }
.week-day strong { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); font-size: 13px; font-weight: 500; }
.week-day.active { color: var(--blue); }
.week-day.active strong { color: white; background: var(--blue); font-weight: 650; }
.calendar-summary { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); }
.calendar-summary div { display: flex; align-items: baseline; gap: 8px; }
.calendar-summary strong { font-size: 16px; }
.calendar-summary span, .calendar-summary small { color: var(--soft); font-size: 11px; }
.timeline { position: relative; padding: 4px 12px 24px 58px; }
.time-slot { position: relative; min-height: 70px; border-top: 1px solid #eef0f2; }
.time-label { position: absolute; left: -48px; top: -7px; width: 40px; color: #a8abb2; font-size: 10px; text-align: right; }
.calendar-event { position: absolute; left: 7px; right: 4px; z-index: 3; min-height: 54px; padding: 8px 10px; border-left: 3px solid var(--event-color); border-radius: 5px; text-align: left; background: color-mix(in srgb, var(--event-color) 9%, white); }
.calendar-event strong { display: block; font-size: 13px; }
.calendar-event span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.now-line { position: absolute; left: 52px; right: 12px; z-index: 5; height: 1px; background: var(--red); }
.now-line::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; }

.workplace-header { padding: max(18px, env(safe-area-inset-top)) 16px 12px; background: linear-gradient(180deg, #f7faff 0, #fff 100%); }
.work-title-row { display: flex; align-items: flex-end; justify-content: space-between; }
.work-title-row span { color: var(--blue); font-size: 11px; font-weight: 600; }
.work-title-row h1 { margin: 3px 0 0; font-size: 25px; }
.search-trigger, .contact-search { width: 100%; height: 36px; display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 0 12px; color: #a8abb2; background: #f2f3f5; border-radius: 6px; font-size: 13px; text-align: left; }
.search-trigger svg, .contact-search svg { width: 17px; }
.app-grid-section, .todo-section, .favorite-docs, .recent-docs, .contact-section { padding: 14px 16px 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 650; }
.section-title button, .section-title > span { display: flex; align-items: center; gap: 2px; color: var(--soft); font-size: 11px; }
.section-title svg { width: 14px; height: 14px; }
.work-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; padding: 14px 0 10px; }
.work-app { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.work-app-icon { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--app-color); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.work-app-icon svg { width: 21px; height: 21px; }
.work-app > span:last-child { max-width: 100%; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-app b { position: absolute; top: -6px; right: -7px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; border: 2px solid white; border-radius: 9px; color: white; background: var(--red); font-size: 9px; }
.ai-work-card { margin: 12px 16px 8px; min-height: 86px; display: grid; grid-template-columns: 44px 1fr 18px; gap: 12px; align-items: center; padding: 14px; border: 1px solid #dfe7ff; border-radius: 8px; background: linear-gradient(110deg, #f5f8ff, #f7f4ff 58%, #fff8f6); }
.ai-orbit { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: white; background: conic-gradient(from 30deg, #ff8a66, #b85cf0, #3867ff, #4ad6c6, #ff8a66); box-shadow: inset 0 0 0 9px white; }
.ai-orbit svg { width: 16px; }
.ai-work-card > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ai-work-card span { color: var(--purple); font-size: 10px; font-weight: 600; }
.ai-work-card strong { font-size: 14px; }
.ai-work-card small { color: var(--soft); font-size: 10px; }
.ai-work-card > svg { width: 18px; color: var(--blue); }
.todo-preview-row { min-height: 56px; display: grid; grid-template-columns: 20px 1fr auto; gap: 9px; align-items: center; border-bottom: 1px solid #f0f1f2; }
.todo-check { width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid #c9cdd4; border-radius: 50%; }
.todo-check svg { display: none; width: 12px; }
.todo-check.done { color: white; border-color: var(--blue); background: var(--blue); }
.todo-check.done svg { display: block; }
.todo-preview-row > div { min-width: 0; }
.todo-preview-row strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-preview-row small { display: block; margin-top: 3px; color: var(--soft); font-size: 10px; }
.priority-tag { padding: 2px 5px; border-radius: 3px; color: var(--red); background: #fff0f0; font-size: 9px; }
.work-banner { min-height: 64px; display: grid; grid-template-columns: 38px 1fr 16px; align-items: center; gap: 11px; margin: 14px 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.banner-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: white; background: linear-gradient(145deg, #7b5cfa, #aa76ff); }
.banner-icon svg { width: 19px; }
.work-banner div { min-width: 0; }
.work-banner strong, .work-banner span { display: block; }
.work-banner strong { font-size: 13px; }
.work-banner div span { margin-top: 3px; color: var(--soft); font-size: 10px; }
.work-banner > svg { width: 15px; color: #b8babf; }

.docs-topbar, .contacts-topbar { grid-template-columns: 64px 1fr 80px; }
.doc-space-row { display: flex; gap: 18px; overflow-x: auto; padding: 0 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.doc-space-row button { position: relative; flex: 0 0 auto; height: 44px; color: var(--muted); font-size: 13px; }
.doc-space-row button.active { color: var(--ink); font-weight: 600; }
.doc-space-row button.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 18px; height: 2px; transform: translateX(-50%); background: var(--blue); border-radius: 2px; }
.favorite-doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 8px; }
.favorite-doc-card { min-width: 0; height: 82px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 10px; border: 1px solid var(--line); border-radius: 7px; text-align: left; }
.favorite-doc-card .doc-type-icon { width: 24px; height: 24px; border-radius: 5px; }
.favorite-doc-card strong { width: 100%; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-list { border-top: 1px solid #f0f1f2; }
.doc-row { width: 100%; min-height: 68px; display: grid; grid-template-columns: 40px 1fr 18px; gap: 11px; align-items: center; border-bottom: 1px solid #f0f1f2; text-align: left; }
.doc-type-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--doc-color); }
.doc-type-icon svg { width: 19px; }
.doc-copy { min-width: 0; }
.doc-copy strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-copy span { display: block; margin-top: 5px; color: var(--soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row > svg { width: 16px; color: #b8babf; }

.contact-search { width: calc(100% - 32px); margin: 12px 16px; }
.contact-entry-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-entry-list button { width: 100%; min-height: 54px; display: grid; grid-template-columns: 34px 1fr auto 16px; gap: 10px; align-items: center; padding: 0 16px; border-bottom: 1px solid #f0f1f2; text-align: left; }
.contact-entry-list button:last-child { border-bottom: 0; }
.entry-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: white; }
.entry-icon svg { width: 17px; }
.entry-icon.blue { background: var(--blue); }
.entry-icon.cyan { background: var(--cyan); }
.entry-icon.orange { background: var(--orange); }
.contact-entry-list span:nth-child(2) { font-size: 13px; }
.contact-entry-list small { color: var(--soft); font-size: 11px; }
.contact-entry-list > button > svg { width: 15px; color: #b8babf; }
.contact-list { border-top: 1px solid #f0f1f2; }
.contact-row { width: 100%; min-height: 62px; display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid #f0f1f2; text-align: left; }
.contact-row .avatar { width: 40px; height: 40px; font-size: 12px; }
.contact-copy { min-width: 0; }
.contact-copy strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.contact-copy span { display: block; margin-top: 4px; color: var(--soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.status-dot.busy { background: var(--orange); }
.status-dot.offline { background: #c9cdd4; }
.contact-row > svg { width: 15px; color: #b8babf; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(100%, 430px);
  height: calc(58px + max(var(--safe-bottom), 10px));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 5px 4px max(var(--safe-bottom), 10px);
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(18px);
}
.bottom-nav[hidden] { display: none; }
.bottom-nav button { height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; color: #737982; font-size: 11px; line-height: 14px; }
.bottom-nav button.active { color: var(--blue); }
.nav-icon { position: relative; width: 30px; height: 29px; display: grid; place-items: end center; }
.nav-icon svg, .nav-icon img { grid-area: 1 / 1; width: 23px; height: 23px; display: block; object-fit: contain; }
.bottom-nav button[data-nav="messages"] .nav-icon svg { width: 27px; height: 23px; }
.bottom-nav button[data-nav="mail"] .nav-icon svg { width: 25px; height: 21px; }
.nav-icon .nav-on { display: none; }
.bottom-nav button.active .nav-off { display: none; }
.bottom-nav button.active .nav-on { display: block; }
.nav-icon b { position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; border: 2px solid white; border-radius: 9px; color: white; background: var(--red); font-size: 8px; line-height: 1; }

.mail-topbar { grid-template-columns: 40px 1fr 40px; }
.mail-title { min-width: 0; text-align: center; }
.mail-title h1 { margin: 0; font-size: 16px; line-height: 1.15; }
.mail-title span { display: block; max-width: 100%; margin-top: 2px; color: var(--soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-compose-icon { justify-self: end; }
.mail-command { padding: 12px 16px 0; border-bottom: 1px solid var(--line); background: #fff; }
.mail-search-box { height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-radius: 8px; background: var(--fill); }
.mail-search-box svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--soft); }
.mail-search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 12px; }
.mail-search-box input::placeholder { color: #a8abb2; }
.mail-inbox-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mail-inbox-head strong { display: block; font-size: 18px; }
.mail-inbox-head span { display: block; margin-top: 3px; color: var(--soft); font-size: 10px; }
.mail-inbox-head button { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 6px; color: var(--blue); background: #edf2ff; font-size: 11px; font-weight: 600; }
.mail-inbox-head button svg { width: 16px; height: 16px; }
.mail-filter-tabs { height: 38px; display: flex; gap: 22px; }
.mail-filter-tabs button { position: relative; height: 38px; color: var(--muted); font-size: 12px; }
.mail-filter-tabs button.active { color: var(--blue); font-weight: 600; }
.mail-filter-tabs button.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 20px; height: 2px; transform: translateX(-50%); border-radius: 2px; background: var(--blue); }
.main-mail-list { background: white; }
.main-mail-row { min-height: 86px; grid-template-columns: 40px minmax(0,1fr) 20px; gap: 11px; padding: 12px 16px; }
.main-mail-row .avatar { width: 40px; height: 40px; border-radius: 10px; font-size: 11px; }
.mail-sender-line { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-sender-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-sender-line time { flex: 0 0 auto; color: var(--soft); font-size: 9px; font-weight: 400; }
.mail-row-actions { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 2px 0; color: #c2c5ca; }
.mail-row-actions span { width: 22px; height: 22px; display: grid; place-items: center; }
.mail-row-actions svg { width: 15px; height: 15px; }
.main-mail-row:has(.mail-row-actions span[aria-label="Remove star"]) .mail-row-actions svg { color: #f7b500; fill: currentColor; }
.mail-unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.mail-empty-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--soft); }
.mail-empty-state > svg { width: 40px; height: 40px; margin-bottom: 12px; color: #c9cdd4; }
.mail-empty-state strong { color: var(--muted); font-size: 13px; }
.mail-empty-state span { margin-top: 5px; font-size: 10px; }

.detail-topbar { flex: 0 0 auto; grid-template-columns: 48px 1fr 48px; padding-left: 8px; padding-right: 8px; }
.detail-topbar > button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.detail-topbar > button svg { width: 22px; }
.detail-topbar > div { min-width: 0; text-align: center; }
.detail-topbar h1 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-topbar small { display: block; margin-top: 1px; color: var(--soft); font-size: 9px; }
.detail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: #fff; }
.native-profile-detail .detail-topbar { background: #f2f3f5; border-bottom-color: transparent; }
.native-profile-detail .detail-body { background: #f2f3f5; }

.native-info-page { min-height: 100%; padding: 14px 12px 40px; background: #f2f3f5; }
.native-group-title { margin: 19px 4px 8px; color: #7b8088; font-size: 11px; font-weight: 500; }
.native-info-card { overflow: hidden; margin: 0 0 12px; border-radius: 10px; background: white; }
.native-info-row {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 0 14px;
  text-align: left;
  background: white;
  border-bottom: 1px solid #eff0f2;
}
.native-info-card > .native-info-row:last-child { border-bottom: 0; }
.native-info-row > span:first-child { font-size: 14px; }
.native-info-row > strong { color: #7a7f87; font-size: 12px; font-weight: 400; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.native-info-row > svg { width: 16px; color: #c2c5ca; }
.native-info-row.avatar-row { min-height: 74px; }
.native-avatar { justify-self: end; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(145deg,#3370ff,#6c8dff); font-size: 14px; font-weight: 700; }
.native-trailing-icon { justify-self: end; color: #62666d; }
.native-trailing-icon svg { width: 19px; }
.native-company-value { min-width: 0; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.native-company-value strong { max-width: 210px; color: #5f646c; font-size: 12px; font-weight: 400; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.native-verified, .verified-mark, .status-with-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 10px; font-weight: 500; }
.native-verified img, .verified-mark img, .status-with-badge img { width: 14px; height: 14px; }
.company-identity-card { display: grid; grid-template-columns: 52px 1fr; gap: 13px; align-items: center; padding: 18px 16px; border-radius: 10px; background: white; }
.company-logo-tile { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, #3370ff, #14c9c9); font-size: 18px; font-weight: 700; }
.company-identity-card h2 { margin: 0 0 7px; font-size: 16px; line-height: 1.35; }
.status-with-badge { justify-self: end; font-size: 12px; }

.account-layer { position: fixed; inset: 0; z-index: 100; }
.account-layer[hidden] { display: none; }
.account-mask { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(17,22,32,.38); backdrop-filter: blur(2px); }
.account-drawer { position: absolute; inset: 0 auto 0 0; width: calc(100% - 40px); max-width: 388px; display: grid; grid-template-columns: 82px minmax(0,1fr); overflow: hidden; background: white; box-shadow: 18px 0 44px rgba(31,35,41,.18); animation: drawerIn .23s ease; }
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-open { overflow: hidden; }
.account-rail { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: max(24px, env(safe-area-inset-top)) 7px 20px; background: #f3f4f6; }
.rail-account { position: relative; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #757a83; font-size: 9px; }
.rail-account.active { color: var(--blue); }
.rail-avatar, .rail-app, .rail-add { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: white; background: #8e9ab0; font-size: 12px; font-weight: 700; }
.rail-avatar.company { background: #3370ff; }
.rail-app { padding: 5px; background: white; }
.rail-app img { width: 100%; height: 100%; object-fit: contain; }
.rail-add { color: #969ba3; background: #e2e4e8; }
.rail-add svg { width: 18px; }
.rail-account > i { position: absolute; top: 32px; right: 11px; width: 9px; height: 9px; border: 2px solid #f3f4f6; border-radius: 50%; background: #00b96b; }
.rail-account small { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.account-panel { min-width: 0; overflow-y: auto; padding: max(26px, env(safe-area-inset-top)) 16px 22px; background: white; }
.account-profile-head { display: flex; align-items: flex-end; justify-content: space-between; }
.account-big-avatar { width: 66px; height: 66px; padding: 0; overflow: hidden; border-radius: 18px; color: white; background: linear-gradient(145deg,#3370ff,#6c8dff); font-size: 18px; font-weight: 700; }
.account-big-avatar span { width: 100%; height: 100%; display: block; border-radius: inherit; overflow: hidden; }
.status-button { height: 31px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: #5b6068; font-size: 11px; }
.status-button svg { width: 14px; }
.account-name-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) 25px 15px; gap: 5px; align-items: center; margin-top: 14px; text-align: left; }
.account-name-row > span { min-width: 0; }
.account-name-row strong { display: block; font-size: 19px; }
.account-name-row small { min-width: 0; display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #7f848c; font-size: 10px; }
.account-name-row small > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name-row > svg { width: 17px; color: #92979f; }
.account-name-row > svg:last-child { width: 14px; color: #c1c4c9; }
.verified-mark { flex: 0 0 auto; font-size: 9px; }
.verified-mark img { width: 12px; height: 12px; }
.signature-field { width: 100%; margin: 14px 0 17px; padding: 9px 10px; border-radius: 6px; color: #8b9097; background: #f5f6f7; font-size: 10px; line-height: 1.4; text-align: left; }
.account-menu { border-top: 1px solid #eff0f2; }
.account-menu button { width: 100%; min-height: 49px; display: grid; grid-template-columns: 25px 1fr auto; gap: 9px; align-items: center; border-bottom: 1px solid #f2f3f4; text-align: left; }
.account-menu button span { font-size: 13px; }
.account-menu button small { color: #9ca0a7; font-size: 10px; }
.menu-icon { width: 19px; height: 19px; }
.menu-icon.native { width: 23px; height: 23px; display: block; object-fit: contain; }
.menu-icon.blue { color: #3370ff; }
.menu-icon.red { color: #f54a45; }
.menu-icon.yellow { color: #f5a623; }
.menu-icon.cyan { color: #14c9c9; }

.chat-detail { min-height: calc(100dvh - 58px); display: flex; flex-direction: column; background: #f5f6f7; }
.message-stream { flex: 1; padding: 14px 14px 92px; }
.message-time { margin: 12px 0; color: #a8abb2; font-size: 10px; text-align: center; }
.bubble-row { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; }
.bubble-row.me { justify-content: flex-end; }
.bubble-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: white; border-radius: 7px; font-size: 9px; font-weight: 700; }
.bubble-wrap { max-width: 76%; }
.bubble-author { display: block; margin: 0 0 4px 3px; color: var(--soft); font-size: 9px; }
.bubble { padding: 10px 12px; border-radius: 4px 12px 12px 12px; background: white; box-shadow: 0 1px 2px rgba(31,35,41,.04); font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.bubble-row.me .bubble { border-radius: 12px 4px 12px 12px; background: #cfe2ff; }
.bubble-card { width: min(290px, 82vw); padding: 12px; border-radius: 8px; background: white; box-shadow: 0 1px 3px rgba(31,35,41,.08); }
.bubble-card-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bubble-card-head span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: white; background: var(--blue); }
.bubble-card-head svg { width: 16px; }
.bubble-card-head strong { font-size: 13px; }
.daily-items { padding: 6px 0; }
.daily-item { display: flex; gap: 8px; padding: 7px 0; font-size: 11px; line-height: 1.4; }
.daily-item b { color: var(--red); }
.card-link { width: 100%; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; color: var(--blue); font-size: 11px; }
.doc-share-card { width: min(280px, 80vw); padding: 12px; border-radius: 8px; background: white; }
.doc-share-card span { width: 32px; height: 32px; display: grid; place-items: center; float: left; margin-right: 9px; border-radius: 7px; color: white; background: var(--blue); }
.doc-share-card span svg { width: 17px; }
.doc-share-card strong { display: block; font-size: 12px; line-height: 1.4; }
.doc-share-card small { display: block; margin-top: 5px; color: var(--soft); font-size: 9px; }
.task-share-card { width: min(280px, 80vw); padding: 12px; border-radius: 8px; background: white; }
.task-share-card strong { font-size: 12px; }
.progress-bar { height: 5px; margin: 11px 0 6px; overflow: hidden; border-radius: 3px; background: #edf0f5; }
.progress-bar i { display: block; height: 100%; width: var(--progress); background: var(--blue); border-radius: inherit; }
.task-share-card small { color: var(--soft); font-size: 9px; }
.chat-composer { position: sticky; bottom: 0; z-index: 5; padding: 8px 10px calc(8px + var(--safe-bottom)); background: white; border-top: 1px solid var(--line); }
.composer-row { display: grid; grid-template-columns: 32px 1fr 32px; gap: 6px; align-items: end; }
.composer-row > button { width: 32px; height: 36px; display: grid; place-items: center; }
.composer-row > button svg { width: 21px; color: var(--muted); }
.composer-row input { min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #f7f8fa; font-size: 13px; }
.composer-row input:focus { border-color: var(--blue); background: white; }
.composer-tools { display: flex; justify-content: space-around; padding-top: 8px; }
.composer-tools button { width: 34px; height: 28px; display: grid; place-items: center; }
.composer-tools svg { width: 20px; color: var(--muted); }

.profile-hero { padding: 26px 20px 20px; background: linear-gradient(145deg, #f3f7ff, #fff 58%, #f5fffe); }
.profile-main { display: grid; grid-template-columns: 66px 1fr; gap: 14px; align-items: center; }
.profile-main .avatar { width: 66px; height: 66px; border-radius: 16px; font-size: 20px; }
.profile-main h2 { margin: 0; font-size: 21px; }
.profile-main p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.profile-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 7px; border-radius: 4px; color: #17875a; background: #eaf8f1; font-size: 10px; }
.profile-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.profile-signature { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.profile-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.profile-actions button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 10px; }
.profile-actions svg { width: 18px; color: var(--blue); }
.info-group { margin-top: 10px; border-top: 8px solid var(--fill); border-bottom: 1px solid var(--line); }
.info-row { min-height: 52px; display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center; padding: 0 16px; border-bottom: 1px solid #f0f1f2; }
.info-row:last-child { border-bottom: 0; }
.info-row > span:first-child { color: var(--muted); font-size: 12px; }
.info-row strong, .info-row a { color: var(--ink); font-size: 12px; font-weight: 500; text-align: right; text-decoration: none; }
.info-row > svg { width: 15px; color: #b8babf; }

.detail-section { padding: 16px; border-bottom: 8px solid var(--fill); }
.detail-section h2 { margin: 0 0 12px; font-size: 16px; }
.event-hero { padding: 22px 18px; border-bottom: 8px solid var(--fill); }
.event-color { width: 30px; height: 4px; margin-bottom: 15px; border-radius: 2px; background: var(--event-color); }
.event-hero h2 { margin: 0; font-size: 20px; line-height: 1.35; }
.event-hero .event-status { display: inline-block; margin-top: 10px; padding: 3px 7px; border-radius: 4px; color: var(--blue); background: #edf2ff; font-size: 10px; }
.event-info-row { min-height: 52px; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; border-bottom: 1px solid #f0f1f2; }
.event-info-row svg { width: 18px; color: var(--muted); }
.event-info-row strong { display: block; font-size: 12px; }
.event-info-row span { display: block; margin-top: 3px; color: var(--soft); font-size: 10px; }
.primary-action { width: calc(100% - 32px); height: 44px; margin: 18px 16px; border-radius: 6px; color: white; background: var(--blue); font-size: 14px; font-weight: 600; }
.secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 18px; }
.secondary-actions button { height: 40px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }

.list-toolbar { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.list-toolbar button { height: 30px; padding: 0 12px; border-radius: 5px; color: var(--muted); background: var(--fill); font-size: 11px; }
.list-toolbar button.active { color: var(--blue); background: #eaf0ff; }
.approval-row, .task-row, .mail-row, .search-result { width: 100%; padding: 14px 16px; border-bottom: 1px solid #f0f1f2; text-align: left; }
.approval-top { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }
.approval-top .avatar { width: 36px; height: 36px; font-size: 10px; border-radius: 9px; }
.approval-top strong { display: block; font-size: 13px; }
.approval-top span { display: block; margin-top: 3px; color: var(--soft); font-size: 9px; }
.approval-top time { color: var(--soft); font-size: 9px; }
.approval-row h3 { margin: 12px 0 4px; font-size: 14px; }
.approval-row p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.approval-row b { display: block; margin-top: 8px; color: var(--ink); font-size: 15px; }
.approval-detail-head { padding: 24px 16px 18px; text-align: center; border-bottom: 8px solid var(--fill); }
.approval-detail-head .avatar { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 13px; }
.approval-detail-head h2 { margin: 0; font-size: 18px; }
.approval-detail-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.approval-steps { padding: 16px; }
.approval-step { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding-bottom: 18px; }
.approval-step::after { content: ""; position: absolute; left: 11px; top: 23px; bottom: 0; width: 1px; background: var(--line); }
.approval-step:last-child::after { display: none; }
.step-dot { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.step-dot.pending { color: var(--soft); background: var(--fill); }
.step-dot svg { width: 12px; }
.approval-step strong { font-size: 12px; }
.approval-step p { margin: 4px 0 0; color: var(--soft); font-size: 10px; }
.approval-footer { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.7fr; gap: 10px; padding: 10px 16px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: white; }
.approval-footer button { height: 42px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.approval-footer .reject { color: var(--red); border: 1px solid #ffd1d0; }
.approval-footer .approve { color: white; background: var(--blue); }

.task-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; }
.task-row .todo-check { margin-top: 1px; }
.task-row h3 { margin: 0; font-size: 13px; line-height: 1.45; }
.task-row p { margin: 5px 0 0; color: var(--soft); font-size: 10px; }
.task-row time { color: var(--soft); font-size: 9px; }
.task-row.done h3 { color: var(--soft); text-decoration: line-through; }

.doc-editor { padding: 22px 18px 100px; }
.doc-editor h1 { margin: 0; font-size: 25px; line-height: 1.35; }
.doc-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--soft); font-size: 10px; }
.doc-owner-mini { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 8px; }
.doc-callout { margin: 22px 0; padding: 13px; border-left: 3px solid var(--blue); border-radius: 4px; background: #f5f8ff; font-size: 12px; line-height: 1.7; }
.doc-editor h2 { margin: 24px 0 10px; font-size: 17px; }
.doc-editor p, .doc-editor li { color: #3d4148; font-size: 13px; line-height: 1.8; }
.doc-editor ul { padding-left: 20px; }
.doc-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 10px; }
.doc-table th, .doc-table td { padding: 8px; border: 1px solid var(--line); text-align: left; }
.doc-table th { color: var(--muted); background: var(--fill); }
.floating-comment { position: fixed; left: 50%; bottom: calc(16px + var(--safe-bottom)); z-index: 34; width: min(398px, calc(100% - 32px)); height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 8px 30px rgba(31,35,41,.12); }
.floating-comment span { color: var(--soft); font-size: 12px; }
.floating-comment div { display: flex; gap: 5px; }
.floating-comment button { width: 32px; height: 32px; display: grid; place-items: center; }
.floating-comment svg { width: 18px; color: var(--muted); }

.contact-hero { padding: 28px 16px 18px; text-align: center; background: linear-gradient(180deg, #f5f8ff, white); }
.contact-hero .avatar { width: 72px; height: 72px; margin: 0 auto; border-radius: 18px; font-size: 20px; }
.contact-hero h2 { margin: 12px 0 0; font-size: 21px; }
.contact-hero p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.contact-action-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 16px; border-bottom: 8px solid var(--fill); }
.contact-action-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; }
.contact-action-grid span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #edf2ff; }
.contact-action-grid svg { width: 18px; }

.mail-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; }
.mail-row .avatar { width: 36px; height: 36px; border-radius: 9px; font-size: 10px; }
.mail-copy { min-width: 0; }
.mail-copy strong { display: block; font-size: 12px; }
.mail-copy h3 { margin: 4px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-copy p { margin: 4px 0 0; color: var(--soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--soft); font-size: 9px; }
.mail-meta svg { width: 15px; color: #f7b500; fill: currentColor; }
.mail-row.unread { background: #f7f9ff; }
.mail-row.unread .mail-copy strong, .mail-row.unread h3 { font-weight: 700; }
.mail-detail { padding: 20px 18px 100px; }
.mail-detail h2 { margin: 0; font-size: 21px; line-height: 1.4; }
.mail-sender { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; margin-top: 20px; }
.mail-sender .avatar { width: 40px; height: 40px; border-radius: 10px; font-size: 11px; }
.mail-sender strong { display: block; font-size: 12px; }
.mail-sender span, .mail-sender time { display: block; margin-top: 3px; color: var(--soft); font-size: 9px; }
.mail-body { margin-top: 24px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.mail-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: white; }
.mail-actions button { height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.mail-actions svg { width: 17px; }

.okr-hero { padding: 20px 16px; background: linear-gradient(145deg, #fff8eb, #fff); border-bottom: 8px solid var(--fill); }
.okr-hero span { color: #d97b00; font-size: 10px; font-weight: 600; }
.okr-hero h2 { margin: 6px 0 0; font-size: 19px; line-height: 1.45; }
.okr-progress { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.okr-progress .progress-bar { flex: 1; margin: 0; height: 7px; }
.okr-progress strong { color: #d97b00; font-size: 13px; }
.key-result { padding: 14px 0; border-bottom: 1px solid #f0f1f2; }
.key-result:last-child { border-bottom: 0; }
.key-result-head { display: flex; justify-content: space-between; gap: 10px; }
.key-result strong { font-size: 12px; line-height: 1.5; }
.key-result b { color: var(--blue); font-size: 11px; }

.bitable-wrap { overflow-x: auto; padding: 12px 0; }
.bitable { min-width: 620px; border-collapse: collapse; font-size: 10px; }
.bitable th, .bitable td { height: 40px; padding: 7px 10px; border: 1px solid var(--line); white-space: nowrap; }
.bitable th { color: var(--muted); background: #f5f7fb; text-align: left; }
.table-status { padding: 2px 6px; border-radius: 3px; color: var(--blue); background: #edf2ff; }

.search-page { min-height: calc(100dvh - 58px); background: #fff; }
.search-field { padding: 10px 16px; }
.search-field label { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 7px; background: var(--fill); }
.search-field svg { width: 18px; color: var(--soft); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-suggestions { padding: 8px 16px; }
.search-suggestions h3 { margin: 8px 0 12px; color: var(--muted); font-size: 12px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.search-tags button { height: 30px; padding: 0 11px; border-radius: 5px; background: var(--fill); font-size: 11px; }
.search-result { display: grid; grid-template-columns: 34px 1fr 16px; gap: 10px; align-items: center; }
.search-result span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--blue); }
.search-result svg { width: 16px; }
.search-result strong { display: block; font-size: 12px; }
.search-result small { display: block; margin-top: 3px; color: var(--soft); font-size: 9px; }

.sheet-layer { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-layer[hidden] { display: none; }
.sheet-mask { position: absolute; inset: 0; width: 100%; background: rgba(31,35,41,.38); }
.action-sheet { position: relative; z-index: 2; width: min(100%, 430px); padding: 12px 16px calc(16px + var(--safe-bottom)); border-radius: 12px 12px 0 0; background: white; animation: sheetUp .22s ease; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: #d8dade; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; }
.sheet-title h2 { margin: 0; font-size: 17px; }
.sheet-title button { width: 32px; height: 32px; display: grid; place-items: center; }
.sheet-title svg { width: 19px; }
.create-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; padding: 20px 0 8px; }
.create-grid button { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; }
.create-grid span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--create-color); }
.create-grid svg { width: 21px; }
.compose-sheet label { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; }
.compose-sheet input, .compose-sheet textarea { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; font-size: 13px; }
.compose-sheet textarea { min-height: 110px; resize: none; }
.compose-sheet input:focus, .compose-sheet textarea:focus { border-color: var(--blue); }
.sheet-submit { width: 100%; height: 42px; margin-top: 16px; border-radius: 6px; color: white; background: var(--blue); font-size: 13px; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 92px; z-index: 120; max-width: min(340px, calc(100% - 32px)); padding: 9px 14px; transform: translate(-50%, 14px); border-radius: 6px; color: white; background: rgba(31,35,41,.9); font-size: 11px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@supports not (background: color-mix(in srgb, red 10%, white)) {
  .calendar-event { background: #edf2ff; }
}

@media (max-width: 340px) {
  .smart-strip { grid-template-columns: 1fr; }
  .work-app-grid { gap: 18px 4px; }
  .app-shell { width: 100%; }
  .favorite-doc-grid { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  body { padding: 24px 0; background: #eef1f5; }
  .app-shell { min-height: calc(100dvh - 48px); border-radius: 16px; box-shadow: 0 0 0 1px rgba(31,35,41,.04), 0 24px 72px rgba(31,35,41,.14); }
  .page { min-height: calc(100dvh - 48px); }
  .bottom-nav { bottom: 24px; border-radius: 0 0 16px 16px; }
  .detail-page { min-height: calc(100dvh - 48px); }
  .account-drawer { left: calc(50% - 215px); }
}
