:root {
  color-scheme: light;
  --bg: #fff;
  --text: #17191c;
  --muted: #6d7075;
  --border: #dedfe1;
  --surface: #f7f8f9;
  --green: #0b8a4a;
  --green-pressed: #08703c;
  --green-soft: #eaf8f1;
  --orange: #f39a08;
  --orange-soft: #fff6e8;
  --blue: #1769d2;
  --blue-soft: #edf4ff;
  --red: #c83c3c;
  --red-soft: #fff0f0;
  --shadow: 0 4px 16px rgb(17 24 39 / 8%);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100dvh; color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.app-layout { padding-bottom: calc(82px + var(--safe-bottom)); }
.app-content { width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.desktop-nav { display: none; }

.mobile-space-switcher { margin-bottom: 18px; }
.space-switcher { position: relative; width: 100%; }
.space-switcher > summary { list-style: none; }
.space-switcher > summary::-webkit-details-marker { display: none; }
.space-switcher-current { display: flex; min-height: 44px; padding: 7px 10px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.space-switcher-current > span { display: block; min-width: 0; }
.space-switcher-current strong, .space-switcher-current small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-switcher-current strong { font-size: 14px; }
.space-switcher-current small { color: var(--muted); font-size: 12px; }
.space-switcher-current > i { flex: 0 0 auto; transition: transform 140ms ease; }
.space-switcher[open] .space-switcher-current > i { transform: rotate(180deg); }
.space-switcher-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0; overflow: hidden; padding: 5px; border: 1px solid var(--border); border-radius: 9px; background: white; box-shadow: var(--shadow); }
.space-switcher-menu form { margin: 0; }
.space-switcher-menu button { display: block; width: 100%; min-height: 44px; padding: 8px 10px; overflow: hidden; color: var(--text); border: 0; border-radius: 6px; background: white; text-align: left; }
.space-switcher-menu button:hover, .space-switcher-menu button:focus-visible, .space-switcher-menu button[aria-current="true"] { background: var(--green-soft); }
.space-switcher-menu strong, .space-switcher-menu span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-switcher-menu span { color: var(--muted); font-size: 12px; }
.space-switcher-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.space-switcher-actions a { min-height: 40px; padding: 9px 10px; color: var(--green); border-radius: 6px; font-size: 13px; font-weight: 650; }
.space-switcher-actions a:hover, .space-switcher-actions a:focus-visible { background: var(--green-soft); }

.page-card { min-width: 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(30px, 9vw, 42px); line-height: 1.08; letter-spacing: -0.035em; }
.page-heading p:not(.eyebrow) { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.space-choice-list { display: grid; gap: 10px; margin-top: 20px; }
.space-choice { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; align-items: center; border: 1px solid var(--border); border-radius: 9px; }
.space-choice-copy { min-width: 0; overflow: hidden; }
.space-choice-copy strong, .space-choice-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-choice-copy span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.space-choice-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.space-choice-copy .space-choice-badge { display: inline-flex; width: fit-content; max-width: 100%; margin: 0; padding: 4px 7px; color: #0b6f3d; background: var(--green-soft); border-radius: 6px; font-size: 12px; font-weight: 650; white-space: normal; overflow-wrap: anywhere; }
.space-choice-copy .space-choice-badge-important { color: #a96500; background: var(--orange-soft); }
.space-choice form { min-width: 0; margin: 0; }
.space-choice .button { min-width: 88px; min-height: 44px; }

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: clamp(30px, 9vw, 38px); line-height: 1.08; letter-spacing: -0.035em; }
.page-header p { margin: 4px 0 0; color: var(--muted); font-size: 17px; }
.page-header.with-back { justify-content: flex-start; }
.page-header.with-back > a:first-child, .detail-header > a { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; font-size: 24px; border-radius: 8px; }
.page-header.with-back > div { flex: 1; min-width: 0; }
.page-header.with-back h1 { font-size: 28px; }
.detail-header { margin-bottom: 28px; }
.detail-header > span { flex: 1; text-align: center; font-size: 18px; font-weight: 650; }

.round-add { display: grid; flex: 0 0 56px; width: 56px; height: 56px; place-items: center; color: white; background: var(--green); border-radius: 999px; font-size: 28px; box-shadow: 0 6px 18px rgb(11 138 74 / 18%); }
.round-add:hover, .round-add:focus-visible { background: var(--green-pressed); }
.round-add.compact { flex-basis: 46px; width: 46px; height: 46px; font-size: 22px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.notification-link { position: relative; display: grid; width: 46px; height: 46px; place-items: center; color: #3d4249; border-radius: 999px; font-size: 22px; }
.notification-link:hover { background: var(--surface); }
.notification-link span { position: absolute; top: 1px; right: 0; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; color: white; background: var(--red); border: 2px solid white; border-radius: 999px; font-size: 10px; font-weight: 700; }

.search { position: relative; margin-bottom: 28px; }
.search i { position: absolute; left: 16px; top: 50%; color: var(--muted); font-size: 21px; transform: translateY(-50%); pointer-events: none; }
.search input { width: 100%; height: 54px; padding: 0 16px 0 48px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: white; font-size: 16px; outline: 0; }
.search input::placeholder { color: #92959a; }
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgb(11 138 74 / 14%); }

section > h2, .section-heading h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.decision-section { margin-bottom: 30px; }
.decision-section > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.attention-mark { display: inline-grid; width: 28px; height: 28px; place-items: center; color: white; background: var(--orange); border-radius: 999px; font-size: 16px; }
.decision-card { padding: 20px; border: 1.5px solid var(--orange); border-left-width: 6px; border-radius: 10px; background: #fffdfa; box-shadow: var(--shadow); }
.decision-card + .decision-card { margin-top: 12px; }
.decision-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.status-label { padding: 5px 9px; color: #b66e00; background: var(--orange-soft); border-radius: 6px; font-weight: 650; }
.decision-card h3 { margin: 18px 0 6px; font-size: 21px; line-height: 1.25; }
.decision-card p { margin: 0; color: var(--muted); }
.decision-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.decision-actions form, .decision-actions button { width: 100%; }

.button { display: inline-flex; min-height: 46px; padding: 10px 16px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; font-size: 15px; font-weight: 650; line-height: 1.2; transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--green); border-color: var(--green); }
.button-primary:hover, .button-primary:focus-visible { background: var(--green-pressed); border-color: var(--green-pressed); }
.button-secondary { color: var(--green); background: white; border-color: var(--green); }
.button-secondary:hover, .button-secondary:focus-visible { background: var(--green-soft); }
.button-danger { color: var(--red); background: white; border-color: #e6a4a4; }
.button-danger:hover, .button-danger:focus-visible { background: var(--red-soft); }
.button-wide { width: 100%; min-height: 52px; font-size: 16px; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-heading a { color: var(--green); font-weight: 650; }
.section-heading span { color: var(--muted); font-size: 14px; }
.request-list { border-top: 1px solid var(--border); }
.request-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(108px, .75fr) 38px 14px; gap: 10px; min-height: 94px; padding: 16px 0; align-items: center; border-bottom: 1px solid var(--border); }
.request-row:hover { background: #fafafa; }
.request-main, .request-state { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.request-main strong { overflow: hidden; font-size: 16px; line-height: 1.25; text-overflow: ellipsis; }
.request-main span, .request-state span { overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.3; text-overflow: ellipsis; }
.request-state { text-align: right; }
.request-state strong { font-size: 14px; }
.request-assignee { display: grid; width: 38px; height: 38px; place-items: center; color: #344d72; background: #e8f0fc; border-radius: 999px; font-size: 14px; font-weight: 700; }
.row-chevron { color: var(--muted); font-size: 17px; }
.status-new, .status-needs_info { color: #b76a00 !important; }
.status-approved { color: #3d6c53 !important; }
.status-ordered, .status-purchased { color: var(--blue) !important; }
.status-delivered, .status-closed { color: var(--green) !important; }
.status-rejected, .status-cancelled { color: var(--red) !important; }

.regular-preview { margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--border); }
.regular-preview p { max-width: 560px; margin: 8px 0 0; color: var(--muted); }
.empty-state { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty-state i { color: var(--green); font-size: 34px; }
.empty-state p { margin: 10px 0; }
.empty-state a { color: var(--green); font-weight: 650; }

.tabs { display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs a { flex: 0 0 auto; padding: 11px 12px 9px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; }
.tabs a.active { color: var(--green); border-color: var(--green); }
.export-link { margin: 8px 0 14px; text-align: right; }
.export-link a { color: var(--green); font-size: 14px; font-weight: 650; }
.profile-summary { display: flex; gap: 12px; margin: 0 0 18px; padding: 16px; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.profile-summary > i { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 21px; }
.profile-summary div { flex: 1; min-width: 0; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { color: var(--muted); font-size: 13px; }
.profile-summary form { margin: 0; }

.request-form { padding-bottom: 24px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 650; }
.field label span { color: var(--red); }
.field input:not([type=hidden]), .field textarea, .field select, .inline-form select { display: block; width: 100%; min-height: 48px; padding: 11px 12px; color: var(--text); background: white; border: 1px solid #cfd1d4; border-radius: 8px; outline: none; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .inline-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgb(11 138 74 / 14%); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.field-error input, .field-error textarea, .field-error select { border-color: var(--red); }
.error-text { display: block; margin-top: 5px; color: var(--red); font-size: 13px; }
.form-errors { margin-bottom: 18px; padding: 12px 14px; color: #7b2020; background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 6px; }
.space-form { max-width: 680px; margin-top: 24px; }
.space-form-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 16px; }
.space-form-grid .field:last-child { grid-column: 1 / -1; }
.space-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 26px; }
.space-summary-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.space-summary-card span, .space-summary-card strong { display: block; }
.space-summary-card span { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.space-summary-card strong { overflow-wrap: anywhere; font-size: 16px; }
.event-information { margin-top: 28px; }
.quick-dates { display: flex; gap: 7px; margin-top: 8px; overflow-x: auto; }
.quick-dates button { flex: 0 0 auto; min-height: 44px; padding: 9px 12px; color: #44505c; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; }
.form-actions { padding: 12px 0; background: white; }

.member-list { border-top: 1px solid var(--border); }
.member-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.3fr) minmax(130px, .7fr) auto; gap: 14px; padding: 17px 0; align-items: center; border-bottom: 1px solid var(--border); }
.member-row-inactive { opacity: .72; }
.member-copy, .member-meta { min-width: 0; }
.member-copy strong, .member-copy span, .member-meta strong, .member-meta span { display: block; overflow-wrap: anywhere; }
.member-copy span, .member-meta span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.member-state-active { color: var(--green) !important; }
.member-state-inactive { color: var(--red) !important; }
.member-actions { display: flex; min-width: 0; gap: 7px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.member-actions form { margin: 0; }
.member-actions .button { padding: 8px 11px; }
.invitation-section { margin-top: 34px; }
.invitation-list { border-top: 1px solid var(--border); }
.invitation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; align-items: center; border-bottom: 1px solid var(--border); }
.invitation-row strong, .invitation-row span { display: block; overflow-wrap: anywhere; }
.invitation-row span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.invitation-row form { margin: 0; }

.detail-title h1 { margin: 0; font-size: clamp(32px, 10vw, 48px); line-height: 1.08; letter-spacing: -0.04em; }
.detail-title p { margin: 12px 0 0; color: var(--muted); font-size: 17px; }
.current-status { display: flex; gap: 12px; margin: 26px 0; padding: 16px; align-items: center; border-radius: 8px; font-size: 17px; }
.current-status.status-ordered, .current-status.status-purchased { color: #0858b8 !important; background: var(--blue-soft); }
.current-status.status-new, .current-status.status-needs_info { color: #a96500 !important; background: var(--orange-soft); }
.current-status.status-approved, .current-status.status-delivered, .current-status.status-closed { color: #0b6f3d !important; background: var(--green-soft); }
.current-status.status-rejected, .current-status.status-cancelled { color: var(--red) !important; background: var(--red-soft); }
.lifecycle-banner { margin: 0 0 18px; padding: 13px 15px; border-radius: 8px; font-weight: 700; }
.lifecycle-archive { color: #4b5563; background: #f1f3f5; }
.lifecycle-trash { color: #7b2020; background: var(--red-soft); }
.lifecycle-actions { display: flex; gap: 8px; margin: 0 0 24px; align-items: stretch; flex-wrap: wrap; }
.lifecycle-actions form { display: flex; margin: 0; }
.danger-confirmation { display: grid; gap: 14px; padding: 18px; border: 1px solid #e6a4a4; border-radius: 10px; background: var(--red-soft); }
.danger-confirmation p { margin: 7px 0 0; }
.danger-confirmation code { overflow-wrap: anywhere; }
.danger-confirmation .field { margin: 0; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; }
.detail-copy, .assign-block, .status-actions, .comments-section, .attachments-section, .timeline { margin-top: 30px; }
.detail-copy h2, .assign-block h2, .status-actions h2, .comments-section h2, .attachments-section h2, .timeline h2 { margin: 0 0 12px; font-size: 20px; }
.detail-copy p { margin: 0 0 18px; color: #35383d; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.action-grid form, .action-grid button { width: 100%; }
.timeline-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.timeline-item > i { color: var(--muted); }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.comment-item { padding: 13px 0; border-bottom: 1px solid var(--border); }
.comment-author { display: flex; justify-content: space-between; gap: 12px; }
.comment-author span { color: var(--muted); font-size: 12px; }
.comment-item p { margin: 7px 0 0; }
.comment-form { margin-top: 14px; }
.comment-form .field { margin-bottom: 8px; }
.comment-form textarea { width: 100%; min-height: 76px; padding: 11px 12px; border: 1px solid #cfd1d4; border-radius: 8px; resize: vertical; }
.attachment-list { border-top: 1px solid var(--border); }
.attachment-list > a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 12px 0; align-items: center; border-bottom: 1px solid var(--border); }
.attachment-list span { overflow: hidden; text-overflow: ellipsis; }
.attachment-list small { color: var(--muted); }
.attachment-form { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.attachment-form input { max-width: 100%; }
.form-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.messages { margin-bottom: 16px; }
.message { padding: 11px 14px; border-radius: 7px; font-size: 14px; }
.message + .message { margin-top: 6px; }
.message-success { color: #075f34; background: var(--green-soft); }
.message-error { color: #7b2020; background: var(--red-soft); }

.bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); padding: 9px 6px calc(8px + var(--safe-bottom)); background: rgb(255 255 255 / 97%); border-top: 1px solid var(--border); box-shadow: 0 -5px 18px rgb(17 24 39 / 5%); }
.bottom-nav a { display: flex; min-height: 50px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: var(--muted); font-size: 12px; }
.bottom-nav i { font-size: 22px; }
.bottom-nav a:hover, .bottom-nav a:focus-visible { color: var(--green); }
.bottom-nav-icon { position: relative; display: grid; place-items: center; }
.chat-unread-badge { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; color: white; background: var(--red); border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1; }
.desktop-nav .chat-unread-badge { margin-left: auto; }
.desktop-nav-separator { display: block; margin: 6px 12px; border-top: 1px solid var(--border); }
.bottom-nav .chat-unread-badge { position: absolute; top: -5px; left: calc(100% - 5px); border: 2px solid white; }

.auth-layout { display: grid; min-height: 100dvh; padding: 28px 18px; place-items: center; background: #f6f7f8; }
.auth-card { width: min(100%, 420px); padding: 30px 24px; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0; font-size: 34px; letter-spacing: -0.035em; }
.auth-card > p { margin: 8px 0 24px; color: var(--muted); }
.auth-mark { display: grid; width: 50px; height: 50px; margin-bottom: 18px; place-items: center; color: white; background: var(--green); border-radius: 10px; font-size: 25px; }
.auth-link { display: block; margin-top: 18px; color: var(--green); text-align: center; font-size: 14px; font-weight: 600; }
.push-panel { display: grid; gap: 12px; margin-bottom: 22px; padding: 18px; border: 1px solid var(--border); border-radius: 10px; }
.push-panel h2 { margin: 0; font-size: 19px; }
.push-panel p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.push-result { min-height: 20px; }
.notification-list { border-top: 1px solid var(--border); }
.notification-item { border-bottom: 1px solid var(--border); }
.notification-item button { display: grid; width: 100%; grid-template-columns: 30px 1fr; gap: 10px; padding: 16px 6px; color: var(--text); background: white; border: 0; text-align: left; }
.notification-item.unread button { background: #f3f8ff; }
.notification-item i { color: var(--blue); font-size: 19px; }
.notification-item span { display: flex; flex-direction: column; gap: 4px; }
.notification-item small { color: var(--muted); font-size: 13px; }
.recurring-list { margin-top: 18px; border-top: 1px solid var(--border); }
.recurring-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.recurring-row > div { display: flex; flex-direction: column; gap: 4px; }
.recurring-row span { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .recurring-row { grid-template-columns: 1fr 1fr; } .recurring-row > div:first-child { grid-column: 1 / -1; } }

:focus-visible { outline: 3px solid rgb(23 105 210 / 32%); outline-offset: 2px; }

@media (max-width: 390px) {
  .app-content { padding-inline: 14px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading > .button { width: 100%; }
  .decision-card { padding: 17px 14px; }
  .decision-actions { gap: 7px; }
  .button { padding-inline: 11px; }
  .request-row { grid-template-columns: minmax(0, 1fr) minmax(82px, .62fr) 34px 12px; gap: 7px; }
  .request-assignee { width: 34px; height: 34px; font-size: 12px; }
  .request-state strong { font-size: 13px; }
  .space-choice { grid-template-columns: 1fr; gap: 10px; padding: 12px 10px; }
  .space-choice .button { width: 100%; }
  .space-form-grid, .space-summary-grid { grid-template-columns: 1fr; }
  .space-form-grid .field:last-child { grid-column: auto; }
  .member-row { grid-template-columns: 1fr; gap: 10px; }
  .member-actions { justify-content: stretch; }
  .member-actions .button, .member-actions form { width: 100%; }
  .invitation-row { grid-template-columns: 1fr; }
  .invitation-row .button { width: 100%; }
  .lifecycle-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .lifecycle-actions form { width: 100%; }
  .lifecycle-actions .button { width: 100%; min-height: 48px; }
  .bottom-nav a { min-width: 0; padding-inline: 3px; }
  .bottom-nav a > span:last-child { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
}

@media (min-width: 900px) {
  .app-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); padding-bottom: 0; }
  .desktop-nav { position: sticky; top: 0; display: flex; height: 100dvh; padding: 30px 22px; flex-direction: column; border-right: 1px solid var(--border); background: #fbfbfb; }
  .desktop-nav .brand { font-size: 25px; font-weight: 750; letter-spacing: -0.03em; }
  .desktop-nav .space-switcher { margin: 8px 0 24px; }
  .mobile-space-switcher { display: none; }
  .desktop-nav nav { display: flex; flex-direction: column; gap: 6px; }
  .desktop-nav nav a, .nav-button { display: flex; min-height: 44px; padding: 10px 12px; align-items: center; gap: 11px; color: #3c4249; background: transparent; border: 0; border-radius: 8px; font-size: 15px; text-align: left; }
  .desktop-nav nav a:hover, .nav-button:hover { color: var(--green); background: var(--green-soft); }
  .desktop-nav i { font-size: 19px; }
  .logout-form { margin-top: auto; }
  .nav-button { width: 100%; }
  .app-content { max-width: 920px; padding: 42px 54px 70px; }
  .bottom-nav { display: none; }
  .dashboard-header h1 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
