/* The shared kit for the member app (Jay, October 21, 2026; the "App polish" mockups, Main.dc.html): one look for
   buttons, switches, section headers, sheets and dialogs, loaded after every other member stylesheet. Shapes are set
   with low specificity where a screen keeps its own color or size (:where(body.app-framed)), so a screen's own rule
   for, say, a clay Hush button still wins; colors that must change everywhere (dark text on clay) repeat the screen's
   own selector here, later in the cascade.
   Colors: ground #0d1014, card #141920, raised #1d2530, line #262c35 (row dividers #1f252d), text #f1f3f5 / #a7b2c1 /
   #8f9bab, Social #d97757, Hush #d97757, done #4cc38a, warn #f3c27a, danger #f0868c, gold #e6c36a. */
body.app-framed {
  --kit-ground:#0d1014; --kit-card:#141920; --kit-raised:#1d2530; --kit-line:#262c35; --kit-divider:#1f252d;
  --kit-text:#f1f3f5; --kit-text-2:#a7b2c1; --kit-text-3:#8f9bab;
  --kit-social:#d97757; --kit-hush:#d97757; --kit-done:#4cc38a; --kit-warn:#f3c27a; --kit-danger:#f0868c; --kit-gold:#e6c36a;
  --kit-on-social:#0d1014; --kit-on-hush:#1a0f0b; --kit-ease:cubic-bezier(.2,.8,.2,1);
}

/* ---------- Buttons: a 48px pill. Primary filled in the side's color with dark text; secondary outlined. ---------- */
:where(body.app-framed) .grid-primary { height:48px; border-radius:24px; font-size:17px; font-weight:700; }
:where(body.app-framed) .grid-secondary { height:48px; padding:0 20px; border-radius:24px; font-size:17px; font-weight:700; }
:where(body.app-framed) :is(.chat-panel,.chat-overlay,.member-profile-sheet,.bids-sheet,.meet-layer) :is(.chat-primary,.chat-secondary) {
  min-height:48px; padding:12px 18px; border-radius:24px; font-size:17px; font-weight:700; line-height:24px; box-sizing:border-box; }
:where(body.app-framed) :is(.chat-panel,.chat-overlay,.member-profile-sheet,.bids-sheet,.meet-layer) .chat-secondary { border:1px solid rgba(217,119,87,.6); background:#1a120f; color:#f3d5c8; }
:where(body.app-framed) .primary-button { min-height:48px; padding:0 22px; border:0; border-radius:24px; background:#d97757; color:#1a0f0b; font-size:17px; font-weight:700; }
:where(body.app-framed) .primary-button:hover { background:#e59a7d; }
:where(body.app-framed) a.primary-button { display:flex; align-items:center; justify-content:center; }
body.member-portal.app-framed .secondary-button { min-height:48px; padding:0 22px; border:1px solid rgba(217,119,87,.6); border-radius:24px; background:#1a120f; color:#f3d5c8; font-weight:700; }
/* Danger buttons (Block, Leave, Delete): the danger red with dark text. */
.chat-panel .chat-primary.chat-danger-button, .grid-primary.is-danger { background:#f0868c; color:#1a0b0c; }
/* The RSVP buttons and the popups' main button share the shape. */
body.app-framed .member-event-rsvp-inline .member-rsvp-actions button { height:48px; border-radius:24px; font-size:17px; }
body.app-framed .app-popup-dialog .app-popup-accept { width:100%; }
/* Buttons press to 97% in 80ms. */
body.app-framed :is(.grid-primary,.grid-secondary,.chat-primary,.chat-secondary,.primary-button,.secondary-button) { transition:transform 80ms ease-out, background-color .15s, opacity .15s; }
body.app-framed :is(.grid-primary,.grid-secondary,.chat-primary,.chat-secondary,.primary-button,.secondary-button):active:not(:disabled) { transform:scale(.97); }
/* Tertiary: text buttons and links get a 44px tap area without changing how they look. */
body.app-framed :is(.text-button,.forgot-password-link) { min-height:44px; padding-left:4px; padding-right:4px; }
body.app-framed a:is(.text-button,.forgot-password-link) { display:inline-flex; align-items:center; }
body.app-framed .app-popup-dialog .app-popup-close { min-height:44px; padding:0 12px; }

/* ---------- Filled clay buttons get dark text (#1a0f0b): white on clay failed contrast (3:1). ---------- */
.member-profile-option.is-primary,
.grid-chat-pill,
.grid-hush-join-button,
.chat-panel button.grid-hush-join-button,
.grid-chat-send,
.grid-include.is-on .grid-include-box,
.grid-lobby-sheet .grid-primary,
:is(#memberProfileView,[data-copy-of="memberProfileView"]).is-grid .member-profile-message,
:is(#memberProfileView,[data-copy-of="memberProfileView"]).is-grid .member-profile-about-save,
.chat-panel .chat-conversation.is-grid .chat-send,
.grid-end-lobby.grid-primary,
.photo-viewer-yes,
.build-group-flow.is-hush .grid-primary,
.bids-group-add.is-hush .grid-primary,
.chat-library-picker.is-grid .chat-primary, .chat-library-confirm.is-grid .chat-primary,
.hosted-event-page.is-hush .primary-button,
.hev-choice.is-hush.is-on, .hosted-event-create:has(.hev-choice.is-hush.is-on) :is(.hev-group,.hev-day,.hev-choice).is-on,
.library-picker-layer.is-grid .library-picker-roll,
.photo-confirm-dialog.is-grid .primary-button { color:#1a0f0b; }
/* The main button's hover (app.css) never turns a clay one blue. */
.hosted-event-page.is-hush .primary-button:hover, .photo-confirm-dialog.is-grid .primary-button:hover { background:#d97757; }

/* ---------- One switch: 51×31, a 27px knob; on is the side's color (blue for Social and neutral, clay for Hush). ---------- */
body.app-framed :is(.grid-switch,.member-account-switch,input.toggle-switch) { display:inline-block;
  position:relative; flex:none; box-sizing:border-box; width:51px; height:31px; margin:0; padding:0; border:0; border-radius:16px; background:#3a424e; transition:background-color .2s; }
body.app-framed input.toggle-switch { -webkit-appearance:none; appearance:none; background-image:none; cursor:pointer; }
body.app-framed :is(.member-account-switch,input.toggle-switch)::after { content:''; position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%; background:#fff; box-shadow:0 2px 4px rgba(0,0,0,.3); transition:transform .2s var(--kit-ease); }
body.app-framed .grid-switch-knob { top:2px; left:2px; width:27px; height:27px; box-shadow:0 2px 4px rgba(0,0,0,.3); transition:transform .2s var(--kit-ease); }
body.app-framed :is(.grid-switch.is-on,.member-account-switch[aria-checked=true],input.toggle-switch:checked) { background:#d97757; }
body.app-framed :is(.member-account-switch[aria-checked=true],input.toggle-switch:checked)::after,
body.app-framed .grid-switch.is-on .grid-switch-knob { transform:translateX(20px); }
/* The Hush side's switches: clay. */
body.app-framed :is(.is-hush,.is-grid,.grid-show,.grid-lobby,.grid-filters-sheet,.grid-lobby-sheet,.hush-home,.hush-group-sheet) :is(.grid-switch.is-on,.member-account-switch[aria-checked=true],input.toggle-switch:checked) { background:#d97757; }
@media (prefers-reduced-motion: reduce) {
  body.app-framed :is(.member-account-switch,input.toggle-switch)::after, body.app-framed .grid-switch-knob { transition:none; }
}

/* ---------- One section header: 13px, bold, caps, 1.2px tracking, #8f9bab, 16px from the screen's edge. ---------- */
body.app-framed :is(.portal-menu-section,.member-account-section,.chat-settings-section-title) { font-size:13px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8f9bab; }
body.app-framed .grid-sheet h5 { font-size:13px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#8f9bab; }

/* ---------- One sheet: #141920 rising from the bottom, edge to edge, 22px top corners, a #3a4250 handle, a 20px bold
   title and room for the phone's home bar. ---------- */
body.app-framed :is(.grid-sheet,.member-profile-sheet,.chat-sheet,.invite-sheet) {
  box-sizing:border-box; border:0; border-top:1px solid #262c35; border-radius:22px 22px 0 0; background:#141920; }
body.app-framed .grid-sheet-handle, body.app-framed .invite-layer .invite-sheet-grab { width:40px; height:5px; border-radius:3px; background:#3a4250; }
/* The chat's sheets were an inset card; now they run edge to edge from the bottom like the others. */
body.app-framed .chat-sheet { width:100%; margin:0; padding:10px 18px 18px; }
body.app-framed .member-profile-sheet { padding:10px 18px 18px; }
body.app-framed :is(.chat-sheet,.member-profile-sheet)::before { content:''; display:block; width:40px; height:5px; margin:0 auto 12px; border-radius:3px; background:#3a4250; }
body.app-framed .chat-photo-viewer .chat-sheet::before { content:none; }
body.app-framed :is(.grid-sheet,.member-profile-sheet,.chat-sheet) > h4 { font-size:20px; font-weight:700; }
body.app-framed .invite-layer .invite-sheet-title { font-size:20px; font-weight:700; }
/* Dialogs: the card color and a softer corner. */
body.app-framed .feedback-dialog { border-color:#262c35; border-radius:22px; background:#141920; }

/* ---------- Nothing glows or moves forever (Jay, October 21, 2026). ---------- */
/* Online: a plain green dot, no pulsing ring. */
.grid-tile-online::after,.member-profile-online::after,.grid-online-dot::after,.chat-online-dot::after { content:none; animation:none; }
.grid-tile-online,.member-profile-online,.grid-online-dot { background:#4cc38a; box-shadow:0 0 0 2px rgba(0,0,0,.5); }
.chat-online-dot { background:#4cc38a; box-shadow:0 0 0 2.5px #0d1014; }
/* Trophies, handshakes and zodiac signs hold still, their sparkles shown still (as with Reduce Motion before). */
.grid-tile-trophy,.grid-tile-trophy-cup,.grid-tile-zodiac { animation:none; }
.grid-tile-trophy::before,.grid-tile-trophy::after { animation:none; opacity:.8; }
.grid-tile-zodiac::before,.grid-tile-zodiac::after { animation:none; }
/* The group chat header's › into the group page holds still. */
.chat-group-open-chevron { animation:none; box-shadow:none; }
/* Plus rows inside a settings card don't stack glows: no glow and no sparkles (member-chat.css gives them a PLUS tag). */
body.app-framed :is(.chat-settings-section,.member-account-card,.grid-settings) .plus-glow:not(.chat-list-pill):not(.meet-pill) { box-shadow:none; background-image:none; color:inherit; }
body.app-framed :is(.chat-settings-section,.member-account-card,.grid-settings) .plus-glow .plus-spark { display:none; }

/* ---------- Touch targets: at least 44×44. ---------- */
/* The header's ☰ (no frame any more) and the profile's gear / ⋯ in its place. */
.app-framed .portal-header > .portal-menu-toggle { width:44px; height:44px; margin:-4px -6px -4px 0; border:0; border-radius:12px; }
.app-framed .portal-header > .portal-menu-toggle span { width:20px; height:1.5px; }
.portal-header > .member-profile-more { top:2px; right:4px; width:44px; height:44px; }
/* Staff portal keeps its small pill with a bigger invisible tap area. */
.app-framed .portal-header > .portal-staff-button::after { content:''; position:absolute; inset:-9px -4px; }

/* ---------- Tabs: a 140ms crossfade into the tab picked (member-portal.js fadeInTab). It starts half lit, since the old
   tab is already gone: from nothing, the first frame of every tab switch was an empty screen (Jay, October 21, 2026). ---------- */
.is-tab-entering { animation:kit-tab-in .14s ease-out; }
@keyframes kit-tab-in { from { opacity:.55; } to { opacity:1; } }

/* ---------- Reduce Motion: every transition a 200ms fade; buttons don't shrink. ---------- */
@media (prefers-reduced-motion: reduce) {
  body.app-framed :is(.grid-primary,.grid-secondary,.chat-primary,.chat-secondary,.primary-button,.secondary-button):active:not(:disabled) { transform:none; }
}

/* The profile editor's top-bar Save is a text button, not a filled one (Jay, October 21, 2026, a member's report: on a
   Hush profile it took the filled buttons' dark text and couldn't be seen). */
:is(#memberProfileView,[data-copy-of="memberProfileView"]) .member-profile-edit-top .member-profile-about-save { background:none; color:#d97757; }
:is(#memberProfileView,[data-copy-of="memberProfileView"]).is-grid .member-profile-edit-top .member-profile-about-save { background:none; color:#D97757; }
