@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg-0: #0f1117;
  --bg-1: #1a1d2e;
  --text-main: #f7f9ff;
  --text-dim: #aab3cd;
  --teal: #00d4aa;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, #1f2a4b 0%, var(--bg-0) 40%, #090b10 100%);
  color: var(--text-main);
  font-family: "DM Sans", sans-serif;
  height: 100%;
}

body {
  display: flex;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #3a405a;
  border-radius: 8px;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 29, 46, 0.96), rgba(15, 17, 23, 0.96));
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
}

.logo h1 {
  margin: 0;
  font-size: 1.45rem;
}

.logo p {
  margin: 4px 0 12px;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.nav-links {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.sidebar-section-title {
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 1px;
  margin: 10px 0 6px;
  text-transform: uppercase;
}

.nav-btn,
.category-btn,
.tab-btn,
button {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover,
.category-btn:hover,
.tab-btn:hover,
button:hover {
  border-color: var(--border);
}

.nav-btn.active,
.category-btn.active,
.tab-btn.active {
  background: rgba(0, 212, 170, 0.16);
  border-color: rgba(0, 212, 170, 0.45);
}

.btn-primary {
  background: rgba(0, 212, 170, 0.18);
  border-color: rgba(0, 212, 170, 0.45);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.5);
}

.category-filters,
#categoryManager {
  display: grid;
  gap: 6px;
}

.category-item,
.category-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-row .spacer {
  flex: 1;
}

.category-name-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.usage-pill {
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.icon-btn {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.form-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.sidebar-footer {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
}

.user-chip {
  border: 1px solid rgba(0, 212, 170, 0.22);
  background: rgba(0, 212, 170, 0.1);
  color: #d3fff2;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.clock {
  font-family: "Space Mono", monospace;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.timer-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #3f4a67;
}

.dot.running {
  background: #00e676;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.35;
    transform: scale(0.95);
  }
  60% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.35;
    transform: scale(0.95);
  }
}

.main {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 560px) 44px;
  gap: 10px;
  margin-bottom: 14px;
}

.topbar-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.headline {
  font-size: 1.1rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 10px;
  width: 100%;
}

.quick-add {
  padding: 11px 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.panel,
.note-card,
.task-card,
.reminder-card,
.time-card,
.search-panel,
.guide-panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  backdrop-filter: blur(7px);
}

.card,
.panel,
.note-card,
.task-card,
.reminder-card,
.time-card {
  padding: 12px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-tabs select {
  min-width: 160px;
  max-width: 220px;
}

.gantt {
  display: grid;
  gap: 8px;
}

.gantt-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  cursor: pointer;
}

.gantt-empty {
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
}

.gantt-title {
  font-weight: 600;
}

.gantt-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.gantt-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 6px;
}

.gantt-bar {
  height: 100%;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
}

.muted {
  color: var(--text-dim);
}

.mono {
  font-family: "Space Mono", monospace;
}

.pill-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.list-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  margin-bottom: 8px;
}

.timeline-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 150px 140px auto;
  gap: 8px;
  margin-bottom: 10px;
}

#view-admin .form-row {
  grid-template-columns: 1fr 1fr 1fr 180px auto;
}

.admin-user-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.search-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.search-group {
  margin-bottom: 12px;
}

.search-group h3 {
  margin: 8px 0;
}

.search-input {
  margin-bottom: 10px;
}

.bar-wrap {
  margin-top: 10px;
}

.bar-row {
  margin-bottom: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4aa, #4a9eff);
}

.mindmap-canvas {
  position: relative;
  min-height: 580px;
  min-width: 900px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 15%, rgba(74, 158, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 170, 0.1), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
}

.mindmap-link-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mindmap-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.mindmap-status {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.mindmap-zoom-controls {
  display: flex;
  gap: 8px;
}

.mindmap-stage {
  position: relative;
  transform-origin: top left;
}

.mind-node {
  position: absolute;
  width: 190px;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top left, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border-radius: 999px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  display: grid;
  align-content: center;
  gap: 6px;
  user-select: none;
}

.mind-node-inner {
  display: grid;
  align-content: center;
  gap: 6px;
  animation: floatNode 6.2s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes floatNode {
  0% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-7px) scale(1.01);
  }
  100% {
    transform: translateY(0px) scale(1);
  }
}

.mind-node-title {
  font-weight: 700;
  margin-bottom: 2px;
  text-align: center;
}

.mind-node-ring {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.1);
  pointer-events: none;
}

.mind-node.selected {
  transform: scale(1.03);
  box-shadow: 0 22px 40px rgba(0, 212, 170, 0.18);
}

.mind-node.linking {
  box-shadow: 0 22px 40px rgba(245, 166, 35, 0.18);
}

.mind-node.selected .mind-node-inner,
.mind-node.linking .mind-node-inner {
  animation-play-state: paused;
}

.mind-node-type {
  justify-self: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.mind-node-meta {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
}

.mind-node-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.mind-node-actions button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: 999px;
}

.weather-card {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(74,158,255,0.14), rgba(0,212,170,0.1));
  text-align: left;
}

.weather-place {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 4px;
}

.weather-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

.weather-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.weather-temp {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0;
}

.weather-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.guide-panel p {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.drawer-form {
  display: grid;
  gap: 8px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-drawer {
  position: fixed;
  right: -420px;
  top: 0;
  bottom: 0;
  width: 420px;
  background: #111522;
  border-left: 1px solid var(--border);
  padding: 14px;
  transition: right 0.25s ease;
  z-index: 40;
  overflow-y: auto;
}

.detail-drawer.open {
  right: 0;
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  z-index: 70;
}

.toast {
  border: 1px solid rgba(0, 212, 170, 0.5);
  background: #11322c;
  color: #d7fff4;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 280px;
}

.mobile-nav {
  display: none;
}

.toast-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

@media (max-width: 1100px) {
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding-bottom: 84px;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--border);
    background: rgba(14, 16, 23, 0.96);
    backdrop-filter: blur(9px);
    padding: 8px;
    gap: 6px;
    z-index: 20;
  }

  .topbar,
  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    width: 100%;
  }

  .filter-tabs select {
    max-width: 100%;
  }
}

button,
input,
select,
textarea,
.nav-btn,
.category-btn,
.tab-btn {
  min-height: 44px;
}

.main {
  margin-right: 380px;
  width: auto;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.search-toggle {
  min-width: 64px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.install-mini-btn {
  min-width: 82px;
}

.capture-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.56);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 44;
}

.capture-fab {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--teal);
  color: #041411;
  box-shadow: 0 16px 30px rgba(0, 212, 170, 0.28);
  z-index: 52;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0;
}

body.capture-open .capture-fab {
  opacity: 0;
  pointer-events: none;
}

.capture-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  padding: 18px 18px 18px;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 29, 46, 0.98), rgba(15, 17, 23, 0.98));
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  z-index: 45;
}

.capture-handle {
  display: none;
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  justify-self: center;
  touch-action: none;
}

.capture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 2px;
  touch-action: none;
}

.capture-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.capture-header p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.capture-close {
  display: none;
  min-width: 44px;
  text-align: center;
}

.capture-history {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 8px 4px 18px 0;
}

.capture-date-separator {
  justify-self: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.capture-message-group {
  display: grid;
  gap: 10px;
}

.capture-empty {
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.capture-empty strong {
  display: block;
  margin-bottom: 6px;
}

.capture-empty p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.45;
  font-size: 0.9rem;
}

.capture-row {
  display: flex;
}

.capture-row.user {
  justify-content: flex-end;
}

.capture-row.system {
  justify-content: flex-start;
}

.capture-bubble {
  max-width: 90%;
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.45;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.capture-bubble.user {
  background: rgba(255, 255, 255, 0.07);
}

.capture-bubble.system {
  background: rgba(0, 212, 170, 0.12);
  border-color: rgba(0, 212, 170, 0.35);
}

.capture-time {
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: "Space Mono", monospace;
}

.capture-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.capture-options button,
.capture-pill,
.capture-category-toggle {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.capture-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.capture-templates {
  display: none;
  gap: 6px;
}

.capture-templates.open {
  display: grid;
}

.capture-template-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.capture-footer {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(18, 22, 34, 0), rgba(18, 22, 34, 0.97) 18%);
  position: sticky;
  bottom: 0;
}

.capture-hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  line-height: 1.4;
  min-height: 0;
}

.capture-input-row {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  align-items: center;
}

.capture-input {
  min-width: 0;
  min-height: 56px;
  max-height: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
}

.capture-send {
  min-height: 56px;
  border-radius: 18px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-drawer {
  right: -420px;
  z-index: 50;
}

.detail-drawer.open {
  right: 380px;
}

.mobile-nav .nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  padding: 6px 4px;
}

.mobile-nav .nav-btn span {
  font-size: 1rem;
  line-height: 1;
}

.mobile-nav .nav-btn small {
  font-size: 0.68rem;
}

@media (max-width: 1024px) {
  .sidebar {
    width: 92px;
    min-width: 92px;
    padding: 16px 10px;
  }

  .logo p,
  .sidebar-section-title,
  .sidebar-footer .clock,
  .sidebar-footer .timer-indicator span,
  .category-name-btn,
  .usage-pill,
  #categoryManager,
  .form-inline {
    display: none;
  }

  .sidebar .nav-btn {
    text-align: center;
    padding: 10px 6px;
    font-size: 0.78rem;
  }

  .main {
    margin-left: 92px;
    margin-right: 0;
    width: auto;
  }

  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capture-fab {
    display: inline-flex;
  }

  .capture-close,
  .capture-backdrop,
  .capture-handle {
    display: block;
  }

  .capture-panel {
    right: -380px;
    width: 360px;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.35);
    transition: right 0.3s ease;
  }

  body.capture-open .capture-panel {
    right: 0;
  }

  body.capture-open .capture-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .detail-drawer.open {
    right: 0;
  }
}

@media (max-width: 768px) {
  body {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding: 16px 16px 76px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 56px;
  }

  .headline {
    font-size: 1rem;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    border-top: 1px solid var(--border);
    background: #1a1d2e;
    backdrop-filter: blur(9px);
    padding: 4px 6px;
    gap: 4px;
    z-index: 48;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .card-grid,
  .card-grid.four,
  .notes-grid,
  .form-row,
  .admin-form-row,
  .time-start-row {
    grid-template-columns: 1fr;
  }

  #view-today .view-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .weather-card {
    width: 100%;
    text-align: left;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-tabs select,
  .filter-tabs .tab-btn,
  #plannerWeekStrip .tab-btn {
    min-width: 44px;
    max-width: none;
    flex: 0 0 auto;
  }

  .gantt-row {
    padding: 10px;
  }

  .gantt-meta {
    display: block;
  }

  .mindmap-canvas {
    min-width: 100%;
    min-height: calc(100vh - 220px);
    overflow: hidden;
    touch-action: none;
  }

  .capture-fab {
    bottom: 80px;
    right: 20px;
  }

  .capture-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(-85vh);
    width: auto;
    height: calc(85vh - 68px - env(safe-area-inset-bottom, 0px));
    border-left: 0;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 50px rgba(0, 0, 0, 0.4);
    transition: bottom 0.3s ease, transform 0.3s ease;
  }

  body.capture-open .capture-panel {
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .detail-drawer {
    width: 100%;
  }

  .detail-drawer.open {
    right: 0;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 90px;
  }

  .toast {
    min-width: 0;
  }

  .topbar-actions {
    gap: 6px;
  }

  .install-mini-btn {
    min-width: 72px;
  }
}
