* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
body { min-height: 100dvh; background: #E4EAE8; font-family: Inter, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.frame {
  width: 100%; max-width: 430px; height: 100dvh; margin: 0 auto;
  background: #F0F7F5; color: #1A1A1A; position: relative;
  overflow: hidden; display: flex; flex-direction: column;
}
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; }
.app-title { font-weight: 300; font-size: 20px; letter-spacing: 3px; text-transform: uppercase; }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; background: none; color: #1A1A1A; }
.mode-toggle { display: flex; margin: 4px 20px 16px; border: 1px solid #1B5E4D; }
.toggle-cell { flex: 1; text-align: center; padding: 10px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: #1B5E4D; border-left: 1px solid #1B5E4D; background: none; }
.toggle-cell:first-child { border-left: none; }
.toggle-cell.active { background: #1B5E4D; color: #FFFFFF; }
.scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; min-height: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.section-count { color: #666; font-weight: 400; }
.badge-dot { width: 8px; height: 8px; flex-shrink: 0; }
.badge-dot.goal, .dot.goal { background: #1B5E4D; }
.badge-dot.waiting, .dot.waiting { background: #A6791B; }
.badge-dot.info, .dot.info { background: #999; }
.badge-dot.simmer { background: #2D9E88; }
.card { background: #FFF; border: 1px solid #E0E0E0; margin: 0 20px 12px; padding: 16px; position: relative; overflow: hidden; }
.swipe-wrap { position: relative; margin: 0 20px 12px; overflow: hidden; border: 1px solid #E0E0E0; }
.swipe-wrap .card { margin: 0; border: none; }
.reveal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.reveal.simmer { background: #E8F5F2; color: #1B5E4D; }
.reveal.archive { background: #1A1A1A; color: #F5F5F5; }
.card-top { display: flex; gap: 12px; }
.avatar { width: 40px; height: 40px; background: #E8F5F2; color: #1B5E4D; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.card-body { flex: 1; min-width: 0; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title { font-size: 16px; font-weight: 600; }
.unread-dot { width: 8px; height: 8px; background: #1B5E4D; margin-top: 6px; }
.badge-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.badge-label { font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: #666; }
.participants, .last-action { font-size: 13px; color: #666; margin-top: 6px; }
.last-action b { color: #1A1A1A; font-weight: 500; }
.suggested { border-left: 2px solid #1B5E4D; padding: 10px 0 10px 12px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.suggested-text .label { font-weight: 600; color: #1B5E4D; display: block; font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 2px; }
.suggested-text .desc { color: #666; font-size: 13px; }
.collapsed-row { display: flex; align-items: center; justify-content: space-between; margin: 0 20px 16px; padding: 14px 16px; border: 1px solid #E0E0E0; }
.collapsed-text { font-size: 13px; color: #666; }
.bottom-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #FFF; border-top: 1px solid #E0E0E0; }
.tab-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #666; border: none; background: none; }
.tab-btn.active { color: #1B5E4D; }
.search-field { flex: 1; height: 44px; border: 1px solid #E0E0E0; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: #666; font-size: 14px; }
.sender-card { background: #FFF; border: 1px solid #E0E0E0; margin: 0 20px 12px; padding: 16px; }
.sender-name { font-size: 16px; font-weight: 600; }
.sender-meta { font-size: 12px; color: #666; margin-top: 2px; }
.topic-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0 0; color: #666; }
.header { display: flex; align-items: center; gap: 4px; padding: 8px 20px; border-bottom: 1px solid #E0E0E0; }
.back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; background: none; margin-left: -12px; }
.header-title { font-size: 18px; font-weight: 600; }
.header-sub, .header-count { font-size: 12px; color: #666; margin-left: auto; }
.search-header { padding: 20px 20px 14px; }
.search-input-row { display: flex; align-items: center; gap: 8px; height: 52px; border: 1px solid #1B5E4D; padding: 0 6px 0 14px; background: #FFF; }
.search-input-row input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; font-family: inherit; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 20px 6px; align-items: center; }
.filter-chip { padding: 6px 14px; border: 1px solid #E0E0E0; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: #666; background: #FFF; }
.filter-chip.active { border-color: #1B5E4D; color: #1B5E4D; }
.results-label { font-size: 12px; color: #666; padding: 10px 20px 4px; }
.result-row { display: flex; gap: 12px; margin: 0 20px; padding: 14px 0; border-bottom: 1px solid #E0E0E0; }
.result-avatar { width: 36px; height: 36px; background: #E8F5F2; color: #1B5E4D; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.result-sender { font-size: 14px; font-weight: 600; }
.result-date { font-size: 12px; color: #666; }
.result-subject { font-size: 14px; margin-top: 2px; }
.result-preview { font-size: 13px; color: #666; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: #E8F5F2; color: #1B5E4D; font-weight: 600; }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg-avatar { width: 32px; height: 32px; background: #E8F5F2; color: #1B5E4D; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.msg-bubble { background: #FFF; border-left: 2px solid #1B5E4D; padding: 12px 14px; flex: 1; }
.msg-from { font-size: 13px; font-weight: 600; }
.msg-time { font-size: 11px; color: #666; font-weight: 400; }
.msg-text { font-size: 16px; line-height: 1.5; margin-top: 6px; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .msg-bubble { background: #E8F5F2; border-left: none; border-right: 2px solid #1B5E4D; }
.thread-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.footer-note { padding: 14px 20px 20px; background: #FFF; border-top: 1px solid #E0E0E0; font-size: 13px; color: #666; }
.toast {
  position: absolute; left: 16px; right: 16px; bottom: 72px;
  background: #1A1A1A; color: #FFF; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; z-index: 20;
}
.toast button { background: none; border: none; color: #8EEAD4; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; font-size: 12px; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: #FFF;
  border-top: 1px solid #E0E0E0; padding: 16px 20px 28px; z-index: 30;
}
.sheet h3 { font-size: 13px; letter-spacing: 0.8px; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.label-btn { height: 44px; border: 1px solid #1B5E4D; background: #FFF; color: #1B5E4D; font-size: 13px; font-weight: 600; }
.onboard { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; gap: 20px; text-align: center; }
.wordmark { font-weight: 300; font-size: 40px; letter-spacing: 6px; text-transform: uppercase; }
.tagline { font-size: 17px; line-height: 1.5; max-width: 300px; }
.sub { font-size: 14px; color: #666; max-width: 280px; line-height: 1.5; }
.actions { width: 100%; padding: 0 32px 48px; display: flex; flex-direction: column; gap: 12px; }
.btn-primary { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; background: #1B5E4D; color: #FFF; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; border: none; }
.btn-ghost { background: none; border: none; color: #1B5E4D; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.deck { flex: 1; display: flex; flex-direction: column; padding: 12px 20px 20px; min-height: 0; }
.deck-card {
  flex: 1; background: #FFF; border: 1px solid #E0E0E0; padding: 24px 20px;
  display: flex; flex-direction: column; touch-action: pan-y;
}
.deck-hint { font-size: 12px; color: #666; text-align: center; padding: 10px 0 0; }
.empty { padding: 40px 24px; text-align: center; color: #666; font-size: 14px; line-height: 1.6; }
.menu { position: absolute; top: 64px; right: 16px; background: #FFF; border: 1px solid #E0E0E0; z-index: 40; min-width: 180px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 12px 16px; font-size: 14px; border: none; background: none; border-bottom: 1px solid #F0F0F0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 8px; }
.topic-chip { padding: 6px 12px; background: #E8F5F2; color: #1B5E4D; font-size: 12px; font-weight: 600; border: none; }
