:root {
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --green: #16a34a;
    --green-hover: #15803d;
    --green-light: #f0fdf4;
    --green-border: #bbf7d0;
    --amber: #f59e0b;
    --amber-light: #fffbeb;
    --red: #dc2626;
    --red-light: #fef2f2;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 56px;
    --green-bg: #f8faf8;
    --green-bg-hover: #f0f5f0;
    --commitment-hover: #e0f5e0;
    --red-bg: #fef8f8;
    --red-bg-hover: #fdf2f2;
    --amber-bg: #fffdf8;
    --amber-bg-hover: #fffbf0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg);
    min-height: 100vh;
    overflow: hidden;
}

/* ---- App Shell ---- */
.app-shell {
    max-width: 440px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-header {
    padding: 12px 16px 8px;
    text-align: center;
    background: var(--bg);
    flex-shrink: 0;
}

.app-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 16px 16px;
    -webkit-overflow-scrolling: touch;
}

.tab-content.fading { opacity: 0; transition: opacity 0.1s ease; }
.tab-content.visible { opacity: 1; transition: opacity 0.15s ease; }

/* ---- Bottom Nav ---- */
.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.nav-tab .nav-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.nav-tab .nav-icon svg { width: 22px; height: 22px; }
.nav-tab .nav-label { font-size: 11px; }

.nav-tab.active { color: var(--green); }

/* ---- Sub-state overlay ---- */
.sub-state-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--nav-height);
    background: var(--bg);
    z-index: 50;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    transform: translateY(100%);
    transition: transform 0.2s ease, visibility 0.2s;
    visibility: hidden;
}
.sub-state-overlay.open { transform: translateY(0); visibility: visible; }

/* ---- Page Title ---- */
.page-tab-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

/* ---- Cards ---- */
.card {
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 10px;
}
.card:last-child { margin-bottom: 0; }

.card-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}
.card-desc:last-child { margin-bottom: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Action Buttons ---- */
.action-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.action-btn:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}
.action-btn.primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.action-btn.primary:hover {
    background: var(--green-hover);
    border-color: var(--green-hover);
}
.action-btn.secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border-color: var(--border);
}
.action-btn.secondary:hover {
    background: var(--border-light);
    border-color: var(--text-tertiary);
}

/* ---- Dash Label ---- */
.dash-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    margin-top: 18px;
}
.dash-label:first-child { margin-top: 0; }

/* ---- Progress Bar ---- */
.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--border-light);
    margin: 8px 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

/* ---- Feed Items ---- */
.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.feed-item:last-child { border-bottom: none; }

.feed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.feed-body { flex: 1; min-width: 0; }
.feed-text { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.feed-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.feed-action { margin-top: 6px; }

/* ---- Filter Pills ---- */
.filter-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.filter-pill {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.filter-pill.active {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}

/* ---- Act Page ---- */
.act-group { margin-bottom: 20px; }
.act-group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.act-button {
    display: block;
    width: 100%;
    text-align: left;
    font-family: var(--font);
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.act-button:hover { box-shadow: var(--shadow-md); }
.act-button:active { background: var(--border-light); }
.act-button-label { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.act-button-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ---- Community Map (SPEC-108) ---- */
.community-header {
    text-align: center;
    padding: 8px 0 4px;
}
.community-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.community-region {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.community-polygon-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}
.community-polygon {
    width: 100%;
    max-width: 280px;
    height: auto;
}

.community-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.community-stat {
    text-align: center;
    padding: 12px 8px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.community-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}
.community-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.food-gap {
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 4px;
}
.food-gap-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.food-gap-detail {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.community-role-section {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.community-role-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.community-role-item:last-child { border-bottom: none; }
.community-role-text {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ---- Community Map Detail (overlay state) ---- */
.community-map-header {
    margin-bottom: 8px;
}
.community-map-views {
    display: flex;
    gap: 4px;
}
.view-toggle {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.view-toggle.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.view-toggle:hover { border-color: var(--green); }

.community-map-container {
    width: 100%;
    height: 360px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px;
}

/* Legend */
.map-legend {
    padding: 10px 14px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.map-legend-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.map-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.legend-chip {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* Strategy vote */
.strategy-vote {
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.strategy-vote-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.strategy-vote-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.strategy-option {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    padding: 4px 0;
    cursor: pointer;
}
.strategy-option input {
    margin-right: 8px;
}

/* Role CTAs in map detail */
.map-role-cta-group {
    margin-bottom: 10px;
}
.map-role-cta-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.map-role-cta-group .action-btn {
    margin-right: 6px;
    margin-bottom: 4px;
}

/* Advocate simulation */
.sim-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 12px;
}
.sim-before, .sim-after {
    text-align: center;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
}
.sim-after {
    border-color: var(--green);
    background: var(--green-light);
}
.sim-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.sim-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}
.sim-after .sim-value { color: var(--green); }
.sim-desc {
    font-size: 11px;
    color: var(--text-secondary);
}
.sim-arrow {
    font-size: 24px;
    color: var(--text-tertiary);
}

/* ---- Me Page ---- */
.identity-card {
    text-align: center;
    padding: 24px 16px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.identity-icon { font-size: 32px; margin-bottom: 8px; }
.identity-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.identity-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid var(--green-border);
    border-radius: var(--radius-pill);
    color: var(--green);
    background: var(--green-light);
}
.identity-badge.org {
    border-color: rgba(139, 92, 246, 0.3);
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.08);
}
.identity-location { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.identity-since { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

.aproximal-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    margin-top: 12px;
}

.me-section { margin-bottom: 20px; }

/* Credits stat grid (reuses stat-grid) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.stat-block {
    text-align: center;
    padding: 12px 8px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.stat-value { font-size: 20px; font-weight: 700; color: var(--green); }
.stat-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Activity log */
.activity-log {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-date { font-weight: 600; color: var(--text-secondary); white-space: nowrap; min-width: 80px; }
.activity-desc { flex: 1; color: var(--text-primary); }
.activity-hours { font-weight: 600; color: var(--green); white-space: nowrap; }

/* Garden card (landholder) */
.garden-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 14px 16px;
}
.garden-detail {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0;
}
.garden-detail:first-child { font-weight: 600; color: var(--text-primary); }

/* Household card */
.household-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 14px 16px;
}
.household-member {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.household-member:last-of-type { border-bottom: none; }
.household-name { font-weight: 600; color: var(--text-primary); }
.household-role { color: var(--text-tertiary); font-size: 12px; }
.household-detail {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    margin-top: 4px;
}

/* QR Section */
.qr-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 16px;
}
.qr-explainer { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.qr-steps {
    padding-left: 20px;
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.qr-note {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    line-height: 1.4;
}
.qr-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    margin: 4px 0 12px;
}

/* Memory items (updated for icon+text+date objects) */
.memory-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--amber-light);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}
.memory-icon { font-size: 16px; flex-shrink: 0; }
.memory-text { flex: 1; }
.memory-date { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* Settings list */
.settings-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
}
.settings-item:last-child { border-bottom: none; }
.settings-item span { color: var(--text-tertiary); }
.sign-out-btn {
    width: 100%;
    margin-top: 12px;
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Dev panel */
.dev-panel {
    margin-top: 24px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.04);
    border: 2px dashed rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
}
.role-check-list { list-style: none; padding: 0; margin: 8px 0 0; }
.role-check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.role-check-list li:last-child { border-bottom: none; }
.role-check-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}
.account-switcher {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.account-switcher button {
    flex: 1;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.account-switcher button.active {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-light);
}

/* ---- Sub-state styles (ported from v1) ---- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 16px;
    border: none;
    background: none;
    font-family: var(--font);
    padding: 0;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.back-link:hover { color: var(--text-primary); }
.back-link::before { content: '\2190  '; }

.state-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.state-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.state-field { margin-bottom: 12px; }
.state-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.state-field input, .state-field select, .state-field textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 14px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    transition: border-color 0.15s;
}
.state-field input:focus, .state-field select:focus, .state-field textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
.state-field textarea { min-height: 80px; resize: vertical; }

.state-list { list-style: none; padding: 0; margin: 0 0 12px; }
.state-list li {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}
.state-list li strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}
.state-list li .list-actions { margin-top: 8px; display: flex; gap: 6px; }
.state-list li .list-actions button {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.15s;
}
.state-list li .list-actions button:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

/* ---- Party Sub-State: Capacity ---- */
.party-capacity { margin-bottom: 16px; }
.party-capacity-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    margin-bottom: 6px;
}
.party-capacity-count { font-weight: 600; color: var(--text-primary); }
.party-capacity-left { font-weight: 600; }
.party-capacity-left.green { color: var(--green); }
.party-capacity-left.amber { color: var(--amber); }
.party-capacity-left.red { color: var(--red); }

/* ---- Party Sub-State: Address Card ---- */
.party-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.party-address:hover { border-color: var(--green); }
.party-address-zone {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--green-light);
    border: 2px solid var(--green-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--green);
}
.party-address-detail { flex: 1; font-size: 13px; line-height: 1.5; }
.party-address-street { font-weight: 600; color: var(--text-primary); }
.party-address-meta { color: var(--text-secondary); }
.party-address-link {
    color: var(--green);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
}

/* ---- Party Sub-State: Leader ---- */
.party-leader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.party-leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}
.party-leader-info { flex: 1; }
.party-leader-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.party-leader-role {
    font-size: 12px;
    color: var(--text-secondary);
}
.party-leader-msg {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}
.party-leader-msg:hover { text-decoration: underline; }

/* ---- Party Sub-State: Avatar Row ---- */
.party-attendees { margin-bottom: 16px; }
.party-attendees-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.avatar-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 6px;
}
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    border: 2px solid var(--card-bg);
    margin-left: -6px;
    flex-shrink: 0;
}
.avatar-circle:first-child { margin-left: 0; }
.avatar-overflow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--border-light);
    border: 2px solid var(--card-bg);
    margin-left: -6px;
    flex-shrink: 0;
}
.party-friend-signal {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ---- Party Sub-State: Details List ---- */
.party-details {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
}
.party-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}
.party-detail-item:last-child { border-bottom: none; }
.party-detail-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.party-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Party Sub-State: Full-Width CTA ---- */
.action-btn-full { width: 100%; text-align: center; }

/* ---- Party Sub-State: Secondary CTA Row ---- */
.party-cta-secondary {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.party-cta-secondary .action-btn {
    flex: 1;
    text-align: center;
    font-size: 12px;
}

/* ---- Party Confirmed: Prep Moment ---- */
.party-confirmed-badge {
    text-align: center;
    padding: 20px 0 16px;
}
.party-confirmed-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green-light);
    border: 2px solid var(--green-border);
    font-size: 24px;
    margin-bottom: 8px;
}
.party-confirmed-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--green);
}
.party-confirmed-spot {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.party-prep-section {
    margin-bottom: 14px;
}
.party-prep-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.party-prep-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.party-prep-item:hover { border-color: var(--green); }
.party-prep-icon { font-size: 16px; flex-shrink: 0; }
.prep-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    margin-top: 7px;
}
.check-icon { vertical-align: middle; color: var(--green); }
.party-leader-tip {
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--green-light);
    border: 1px solid var(--green-border);
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 14px;
}
.party-leader-tip-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 2px;
}

.map-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    background: var(--border-light);
}

.qr-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0 12px;
    background: var(--border-light);
}

.badge-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    margin: 0 4px 4px 0;
}
.badge-pill.done { border: 1.5px solid var(--green); color: var(--green); background: var(--green-light); }
.badge-pill.todo { border: 1.5px solid var(--border); color: var(--text-tertiary); background: var(--card-bg); }

/* (settings-row and manage-list removed — replaced by settings-list and new me-section layout in SPEC-109) */

/* ---- Hero Card (Home page) ---- */
.hero-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 12px;
}
.hero-card-eyebrow {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.hero-card-time {
    font-size: 26px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
    line-height: 1.1;
}
.hero-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}
.hero-card-detail {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.hero-card-people {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 20px;
    font-size: 13px;
    color: var(--text-secondary);
}
.hero-card-people .avatar-circle {
    width: 28px;
    height: 28px;
    font-size: 10px;
}
.hero-card-capacity {
    margin: 12px 0 16px;
}
.hero-card-capacity-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}
.hero-card-capacity-count { font-weight: 600; color: var(--text-primary); }
.hero-card-capacity-left { font-weight: 600; }
.hero-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.btn {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    width: 100%;
    text-align: center;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.btn-primary:hover {
    background: var(--green-hover);
    border-color: var(--green-hover);
}
.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}
.hero-card-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 8px 0 4px;
    cursor: pointer;
}
.hero-card-footer:hover { color: var(--text-secondary); }

/* ---- Pinned Section (Home page) ---- */
/* ---- Shared Section Header (human-readable, not micro-label) ---- */
.section-header {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 12px;
}

.pinned-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.pinned-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}
.pinned-item {
    padding: 10px 12px;
    border-left: 3px solid var(--green);
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
    background: var(--green-bg);
    cursor: pointer;
    transition: background 0.15s;
}
.pinned-item:last-child { margin-bottom: 0; }
.pinned-item:hover { background: var(--green-bg-hover); }
.pinned-item.level-red { border-left-color: var(--red); background: var(--red-bg); }
.pinned-item.level-red:hover { background: var(--red-bg-hover); }
.pinned-item.level-amber { border-left-color: var(--amber); background: var(--amber-bg); }
.pinned-item.level-amber:hover { background: var(--amber-bg-hover); }
.pinned-item-text {
    font-size: 13.5px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}
.pinned-item-action {
    font-size: 12.5px;
    color: var(--green);
    font-weight: 600;
    margin-top: 3px;
}

/* ---- Commitment Section (Home page — YOUR SCHEDULE) ---- */
.commitment-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.commitment-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--green);
    margin-bottom: 10px;
}
.commitment-item {
    padding: 10px 12px;
    border-left: 3px solid var(--green);
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
    background: var(--green-light);
    cursor: pointer;
    transition: background 0.15s;
}
.commitment-item:last-child { margin-bottom: 0; }
.commitment-item:hover { background: var(--commitment-hover); }
.commitment-item-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.commitment-item-detail {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.commitment-item-action {
    font-size: 12.5px;
    color: var(--green);
    font-weight: 600;
    margin-top: 4px;
}

/* ---- Parties Section (Home page — THIS WEEK) ---- */
.parties-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.parties-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}
.party-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.party-row:last-of-type { border-bottom: none; }
.party-row:hover { background: var(--border-light); margin: 0 -16px; padding: 10px 16px; }
.party-row-title {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 0;
}
.party-row-when {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
    white-space: nowrap;
}
.party-row-spots {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 8px;
    white-space: nowrap;
}
.parties-see-all {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    padding: 10px 0 2px;
    cursor: pointer;
}
.parties-see-all:hover { color: var(--green-hover); }

/* ---- Stream Section (Home page) ---- */
.stream-section {
    padding: 0 0 8px;
}
.stream-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.stream-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.stream-item:last-child { border-bottom: none; }
.stream-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    flex-shrink: 0;
    margin-top: 1px;
}
.stream-item-body { flex: 1; min-width: 0; }
.stream-item-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}
.stream-item-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 1px;
}
.stream-see-all {
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    cursor: pointer;
}
.stream-see-all:hover { color: var(--green-hover); }

/* ---- Help block (below hero, all roles) ---- */
.help-block {
    background: var(--green-bg);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.help-block:hover { background: var(--green-bg-hover); }
.help-block-label { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.help-block-desc { font-size: 13px; color: var(--text-secondary); }

/* ---- Garden profile: bed cards ---- */
.bed-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.bed-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.bed-card-label { font-weight: 600; font-size: 14px; }
.bed-card-sqft { font-size: 12px; color: var(--text-secondary); }
.season-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.season-growing { background: #dcfce7; color: #166534; }
.season-harvest { background: #fef9c3; color: #854d0e; }
.season-dormant { background: #f3f4f6; color: #6b7280; }
.season-prep { background: #dbeafe; color: #1e40af; }
.bed-crops { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.bed-help-flag { font-size: 12px; color: var(--red); font-weight: 600; margin-bottom: 6px; }
.bed-note {
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
    margin-top: 6px;
}
.bed-note-author { font-weight: 600; color: var(--text-primary); }
.bed-note-link {
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.bed-note-link:hover { color: var(--green-hover); }

/* Bed card action buttons (match state-list compact style) */
.bed-card .list-actions { display: flex; gap: 6px; }
.bed-card .list-actions button {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.15s;
}
.bed-card .list-actions button:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

/* Structured crop rows */
.crop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.crop-row select {
    flex: 2;
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}
.crop-row input[type="number"] {
    flex: 1;
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    max-width: 80px;
}
.crop-row .crop-remove {
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font);
}
.crop-row .crop-remove:hover {
    color: var(--red);
    border-color: var(--red);
}
.crop-total {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #f3f4f6;
}
.crop-header {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    padding: 0 0 4px;
}
.crop-header span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.crop-header span:first-child { flex: 2; }
.crop-header span:nth-child(2) { flex: 1; max-width: 80px; }
.crop-header span:last-child { width: 42px; }
.crop-add-btn {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    background: none;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 4px;
}
.crop-add-btn:hover {
    border-color: var(--green);
    background: var(--green-bg);
}

/* Crop lines in bed card display */
.bed-crop-line {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}
.bed-crop-line .crop-name { font-weight: 500; color: var(--text-primary); }
.bed-crop-line .crop-sqft { font-size: 12px; }
.bed-crop-total {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 2px;
    margin-bottom: 6px;
}

/* ---- Garden profile: section labels ---- */
.garden-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f3f4f6;
}
.garden-add-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    background: var(--green-bg);
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
}
.garden-add-btn:hover { background: var(--green-bg-hover); }

/* ---- Splash Page (SPEC-111) ---- */
.splash-page {
    padding: 20px 0 40px;
}
.splash-header {
    text-align: center;
    margin-bottom: 24px;
}
.splash-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.splash-location {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.splash-prompt {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
}

.splash-group {
    margin-bottom: 8px;
}

.splash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.splash-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--green);
}
.splash-card:active {
    background: var(--border-light);
}

.splash-card-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}
.splash-card-body {
    flex: 1;
    min-width: 0;
}
.splash-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.splash-card-role {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
}
.splash-card-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 1px;
}
.splash-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.splash-divider {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding: 12px 0;
    position: relative;
}
.splash-divider::before,
.splash-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}
.splash-divider::before { left: 0; }
.splash-divider::after { right: 0; }

.splash-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 24px;
    line-height: 1.5;
}

/* Switch persona link on Me tab */
.switch-persona-link {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-top: 8px;
}
.switch-persona-link:hover {
    color: var(--text-secondary);
}

/* ---- Desktop centering ---- */
@media (min-width: 600px) {
    .app-shell { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
