/* Mobile & Device-Specific Refinements (V5) */
body.mobile .shell {
  display: block;
}

body.mobile .sidebar,
body.mobile .topbar,
body.mobile .desktop-only,
body.mobile .desktop-only-flex {
  display: none;
}

body.mobile .workspace {
  min-height: 100vh;
  background: #dff0fc url('blue-ribbons.svg') center top / 100% 760px no-repeat;
}

body.mobile .ambient-art {
  top: 48px;
  right: -24px;
  width: 300px;
  max-width: none;
  opacity: 0.42;
}

body.mobile .mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(22px, env(safe-area-inset-top)) 20px 4px;
  position: relative;
  z-index: 2;
}

body.mobile .mobile-top .logo {
  padding: 0;
  font-size: 24px;
  gap: 8px;
}

body.mobile .mobile-top .logo-mark {
  width: 26px;
  height: 26px;
}

body.mobile .mobile-top .right {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.mobile .mobile-top .icon-btn,
body.mobile .mobile-top .avatar-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  background: transparent;
  border: 0;
}

body.mobile .main {
  padding: 8px 20px calc(92px + env(safe-area-inset-bottom));
  max-width: 540px;
}

body.mobile .sky-date {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #7999b6;
  margin: 6px 2px 0;
}

body.mobile .sky-hero {
  padding: 0 0 22px;
  margin-top: -2px;
}

body.mobile .sky-art-wrap {
  width: calc(100% + 40px);
  max-width: none;
  margin: -2px -20px -12px;
  overflow: hidden;
}

body.mobile .sky-illustration {
  width: calc(100% + 60px);
  height: 248px;
  object-fit: cover;
  margin: 0 -30px;
}

body.mobile .sky-count {
  font-size: 86px;
  line-height: 1.05;
  margin-bottom: 4px;
}

body.mobile .sky-focus h1 {
  font-size: 18px;
}

body.mobile .sky-start {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  font-size: 15px;
}

body.mobile .sky-agenda {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

body.mobile .sky-task {
  padding: 18px 18px;
  border-radius: 15px;
}

body.mobile .sky-task-go {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin-right: -4px;
}

body.mobile .page-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

body.mobile .page-bar h1 {
  font-size: 22px;
}

body.mobile .mobile-only-inline {
  display: inline-flex;
  min-height: 34px;
  padding: 4px 14px;
  font-size: 12px;
}

body.mobile .filterbar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

body.mobile .tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

body.mobile .tabs button {
  min-height: 36px;
  padding: 4px 8px;
}

body.mobile .search input {
  width: 100%;
  min-height: 42px;
}

body.mobile .knowledge-grid {
  grid-template-columns: 1fr;
  gap: 11px;
}

body.mobile .k-card {
  padding: 16px 18px;
  gap: 12px;
}

body.mobile .k-action {
  min-height: 34px;
  padding: 4px 12px;
}

body.mobile .mobile-only {
  display: flex;
}

body.mobile .review-card {
  padding: 22px 20px;
  border-radius: 20px;
}

body.mobile .review-content {
  font-size: 16px;
  min-height: 150px;
}

body.mobile .feedback-grid {
  gap: 8px;
}

body.mobile .fb-btn {
  min-height: 66px;
  padding: 10px 6px;
}

body.mobile .fb-btn strong {
  font-size: 13px;
}

body.mobile .fb-btn small {
  font-size: 10px;
}

body.mobile .stat-cards {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body.mobile .stat-card {
  padding: 16px;
}

body.mobile .stat-card strong {
  font-size: 30px;
}

body.mobile .stat-split {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.mobile .glass-card {
  padding: 18px;
}

body.mobile .msg-card {
  flex-wrap: wrap;
  gap: 12px;
}

body.mobile .msg-card .pill-btn {
  width: 100%;
  min-height: 42px;
}

body.mobile dialog {
  width: 100%;
  border: 0;
}

body.mobile .dialog-body {
  padding: 22px 20px max(24px, env(safe-area-inset-bottom));
}

body.mobile .bottom-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(180, 206, 228, 0.5);
  padding: 6px 10px max(10px, env(safe-area-inset-bottom));
}

body.mobile .bottom-tabs button {
  border: 0;
  background: transparent;
  color: #7c97b0;
  flex-direction: column;
  gap: 3px;
  min-height: 48px;
  padding: 4px;
  font-size: 10px;
  position: relative;
}

body.mobile .bottom-tabs svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.6;
}

body.mobile .bottom-tabs .selected {
  color: var(--ink);
  font-weight: 600;
}

body.mobile .bottom-tabs .selected:before {
  content: "";
  position: absolute;
  top: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7d9fbc;
}

body.mobile .tab-badge {
  position: absolute;
  top: 2px;
  left: 55%;
  background: #6c8fae;
  color: #ffffff;
  font-size: 9px;
  padding: 0 4px;
  min-width: 15px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
}

body.mobile #toast {
  bottom: calc(82px + env(safe-area-inset-bottom));
  font-size: 12px;
  max-width: calc(100% - 32px);
}
