/* Margy Store on the web: Material 3, in the store's mint, light or dark as the device is. */
:root {
  --primary: #1f6b4f; --on-primary: #fff; --primary-container: #a8f2d0; --on-primary-container: #002116;
  --secondary-container: #cfe9da; --on-secondary-container: #092017;
  --tertiary-container: #c2e8fc; --on-tertiary-container: #001f2a;
  --error-container: #ffdad6; --on-error-container: #410002;
  --surface: #f5fbf5; --on-surface: #171d1a; --on-surface-variant: #404943; --outline: #707973;
  --c-low: #eff5ef; --c: #e9efe9; --c-high: #e4eae4; --c-highest: #dee4de;
  --star: #ffb300; --shadow: 0 1px 3px rgba(0,0,0,.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #8dd5b4; --on-primary: #003827; --primary-container: #00513a; --on-primary-container: #a8f2d0;
    --secondary-container: #354b41; --on-secondary-container: #cfe9da;
    --tertiary-container: #254b5b; --on-tertiary-container: #c2e8fc;
    --error-container: #93000a; --on-error-container: #ffdad6;
    --surface: #0f1512; --on-surface: #dee4df; --on-surface-variant: #bfc9c1; --outline: #89938c;
    --c-low: #171d1a; --c: #1b211e; --c-high: #252b28; --c-highest: #303633;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --primary: #8dd5b4; --on-primary: #003827; --primary-container: #00513a; --on-primary-container: #a8f2d0;
    --secondary-container: #354b41; --on-secondary-container: #cfe9da;
    --tertiary-container: #254b5b; --on-tertiary-container: #c2e8fc;
    --error-container: #93000a; --on-error-container: #ffdad6;
    --surface: #0f1512; --on-surface: #dee4df; --on-surface-variant: #bfc9c1; --outline: #89938c;
    --c-low: #171d1a; --c: #1b211e; --c-high: #252b28; --c-highest: #303633;
    --shadow: none;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--on-surface); }
body { font: 16px/1.5 "Google Sans Text", "Roboto Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
img { display: block; }

/* top app bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--surface); display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; max-width: 1180px; margin: 0 auto; }
.bar.lifted { box-shadow: 0 1px 0 var(--c-highest); }
.bar-wrap { position: sticky; top: 0; z-index: 10; background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand b { font-size: 22px; font-weight: 600; letter-spacing: -.2px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center;
  cursor: pointer; color: var(--on-surface-variant); }
.icon-btn:hover { background: var(--c-high); }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }

main { max-width: 1180px; margin: 0 auto; padding: 4px 16px 48px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 24px; border-radius: 99px;
  border: 0; cursor: pointer; text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.outlined { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1px var(--outline); }
.btn.text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn.big { min-height: 56px; font-size: 17px; padding: 0 28px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn:not([disabled]):hover { filter: brightness(1.06); }

/* segmented button and chips */
.segmented { display: flex; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--outline); overflow: hidden; max-width: 520px; margin: 8px 0 16px; }
.segmented button { flex: 1; border: 0; background: transparent; padding: 10px 12px; cursor: pointer; font-weight: 500; font-size: 14px;
  border-left: 1px solid var(--outline); display: flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button:first-child { border-left: 0; }
.segmented button.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.segmented button.on::before { content: "✓"; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { border: 0; border-radius: 8px; padding: 6px 16px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--outline); background: transparent;
  font-size: 14px; font-weight: 500; }
.chip.on { background: var(--secondary-container); color: var(--on-secondary-container); box-shadow: none; }

/* cards */
.card { background: var(--c-high); border-radius: 28px; padding: 20px; }
.hero { background: var(--primary-container); color: var(--on-primary-container); border-radius: 28px; padding: 28px; margin: 4px 0 16px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero img { width: 88px; height: 88px; border-radius: 24px; }
.hero h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; }
.hero p { margin: 0 0 14px; opacity: .85; }
.hero .grow { flex: 1; min-width: 240px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* the two places' own colours, so they are known at a glance */
.btn.discord { background: #5865F2; color: #fff; }
.btn.telegram { background: #2AABEE; color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
@media (max-width: 420px) { .grid { grid-template-columns: 1fr; } }
.app-card { display: flex; gap: 16px; padding: 16px; border-radius: 28px; background: var(--c-high); text-decoration: none; color: inherit;
  transition: background .15s; }
.app-card:hover { background: var(--c-highest); }
.app-card .icon { width: 64px; height: 64px; flex: none; }
.app-card .body { min-width: 0; flex: 1; }
.app-card .name { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.app-card .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card .who { color: var(--on-surface-variant); font-size: 14px; }
.app-card .sum { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pill { display: inline-block; border-radius: 99px; padding: 3px 12px; font-size: 13px; font-weight: 500; background: var(--c-highest);
  color: var(--on-surface-variant); }
.pill.primary { background: var(--primary-container); color: var(--on-primary-container); }
.pill.tertiary { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.icon { border-radius: 28%; object-fit: cover; background: var(--primary-container); }
.verified { width: 18px; height: 18px; fill: var(--primary); flex: none; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--on-surface-variant); font-size: 14px; font-weight: 500; }
.star { color: var(--star); }

/* app page */
.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 28px; margin: 4px 0 16px; background: var(--c-high); }
.app-head { display: flex; gap: 20px; align-items: center; margin-bottom: 12px; }
.app-head .icon { width: 96px; height: 96px; flex: none; }
.app-head h1 { margin: 0; font-size: 28px; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.author { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; padding: 4px 0; border-radius: 12px; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--primary-container); color: var(--on-primary-container); display: grid;
  place-items: center; font-weight: 600; flex: none; overflow: hidden; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.section { margin: 16px 0; }
.section h2 { font-size: 16px; color: var(--primary); margin: 0 0 8px; font-weight: 600; }
.warn { background: var(--error-container); color: var(--on-error-container); border-radius: 20px; padding: 14px 18px; margin: 12px 0; }
.note { color: var(--on-surface-variant); font-size: 14px; }
.fade { position: relative; max-height: 4.6em; overflow: hidden; }
.fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.6em;
  background: linear-gradient(to bottom, transparent, var(--c-high)); }
.md p { margin: 0 0 .6em; } .md p:last-child { margin: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: .5em 0 .3em; line-height: 1.25; color: inherit; font-size: 1.15em; }
.md h1 { font-size: 1.4em; } .md h2 { font-size: 1.25em; }
.md ul, .md ol { margin: .2em 0 .6em; padding-left: 1.4em; }
.md code { font-family: ui-monospace, "JetBrains Mono", monospace; background: var(--c-highest); border-radius: 6px; padding: 1px 5px; font-size: .92em; }
.md pre { background: var(--c-highest); border-radius: 12px; padding: 12px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: .3em 0; padding-left: 12px; border-left: 3px solid var(--outline); color: var(--on-surface-variant); }
.rows { display: flex; flex-direction: column; gap: 2px; }
.rows > * { background: var(--c-high); padding: 14px 18px; border-radius: 6px; display: flex; align-items: center; gap: 14px; }
.rows > *:first-child { border-radius: 24px 24px 6px 6px; } .rows > *:last-child { border-radius: 6px 6px 24px 24px; }
.rows > *:only-child { border-radius: 24px; }
.rows .grow { flex: 1; min-width: 0; }
.rows a { text-decoration: none; }

/* reviews */
.review { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-highest); }
.review .grow { flex: 1; min-width: 0; }
.review .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.pinned { color: var(--primary); font-size: 13px; font-weight: 500; }
.votes { display: flex; gap: 16px; color: var(--on-surface-variant); font-size: 13px; margin-top: 6px; }

/* people */
.profile { text-align: center; padding: 8px 0 16px; }
.profile .avatar { margin: 0 auto 12px; }
.profile h1 { margin: 0; font-size: 26px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.badges { display: inline-flex; gap: 5px; vertical-align: middle; }
.badge { display: inline-block; flex: none; cursor: pointer; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.people { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 20px; text-decoration: none; color: inherit; }
.person:hover { background: var(--c-high); }

/* search */
.search-field { display: flex; align-items: center; gap: 8px; background: var(--c-high); border-radius: 28px; padding: 4px 8px 4px 18px; }
.search-field input { flex: 1; border: 0; background: transparent; color: inherit; font: inherit; font-size: 17px; padding: 12px 0; outline: none; }

/* dialog */
dialog { border: 0; border-radius: 28px; background: var(--c-high); color: var(--on-surface); padding: 24px; max-width: min(560px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog.full { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; background: var(--surface); padding: 16px 20px; }
dialog h3 { margin: 0 0 12px; font-size: 22px; font-weight: 500; }
dialog .end { display: flex; justify-content: flex-end; margin-top: 16px; gap: 8px; }

footer { max-width: 1180px; margin: 0 auto; padding: 24px 16px 40px; color: var(--on-surface-variant); font-size: 14px; display: flex;
  gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--c-highest); }
footer a { color: inherit; }
.loading { height: 4px; border-radius: 2px; background: var(--c-highest); overflow: hidden; margin: 16px 0; }
.loading::after { content: ""; display: block; height: 100%; width: 35%; background: var(--primary); border-radius: 2px; animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.empty { color: var(--on-surface-variant); padding: 32px 4px; }
.lang { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* phones: the bar on one line, the hero side by side and smaller */
.brand b { white-space: nowrap; }
@media (max-width: 520px) {
  .brand b { font-size: 19px; }
  .brand img { width: 36px; height: 36px; }
  .bar { padding: 8px 8px 8px 16px; gap: 2px; }
  .bar .btn { padding: 0 16px; }
  .hero { padding: 20px; gap: 16px; flex-wrap: nowrap; align-items: flex-start; }
  .hero img { width: 56px; height: 56px; border-radius: 16px; }
  .hero h1 { font-size: 22px; }
  .hero .grow { min-width: 0; }
  .app-head { gap: 16px; }
  .app-head .icon { width: 80px !important; height: 80px !important; }
  .app-head h1 { font-size: 24px; }
  .btn.big { width: 100%; }
}
@media (max-width: 360px) {
  .bar [data-get] { display: none; }
  .segmented button { font-size: 13px; padding: 10px 6px; }
}
html, body { overflow-x: hidden; }

/* signed in: the bar's envelope and picture */
.icon-btn { position: relative; text-decoration: none; }
.icon-btn .avatar { width: 34px; height: 34px; }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ba1a1a; color: #fff; font-size: 11px; font-weight: 600;
  display: inline-grid; place-items: center; line-height: 1; }
.icon-btn .count { position: absolute; top: 6px; right: 4px; }
[hidden] { display: none !important; }

/* forms */
.page-title { font-size: 28px; font-weight: 500; margin: 8px 0 16px; }
.label { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: 14px; color: var(--on-surface-variant); }
.field { width: 100%; font: inherit; font-size: 16px; color: var(--on-surface); background: transparent; border: 1px solid var(--outline);
  border-radius: 12px; padding: 12px 14px; outline: none; resize: vertical; }
.field:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.check { display: flex; gap: 10px; align-items: center; margin: 12px 0; cursor: pointer; }
.check input, .rows input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
.switch { appearance: none; width: 52px !important; height: 32px !important; border-radius: 16px; background: var(--c-highest);
  box-shadow: inset 0 0 0 2px var(--outline); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); top: 8px; left: 8px;
  transition: all .15s; }
.switch:checked { background: var(--primary); box-shadow: none; }
.switch:checked::after { width: 24px; height: 24px; top: 4px; left: 24px; background: var(--on-primary); }
.rows label { cursor: pointer; }
.rows a { color: inherit; }
.btn.tg { background: #2aabee; color: #fff; }
progress { width: 100%; height: 6px; accent-color: var(--primary); margin: 8px 0; }

/* stars to pick */
.pick-stars { display: flex; gap: 4px; margin-top: 8px; }
.pick-stars button { border: 0; background: transparent; font-size: 34px; line-height: 1; cursor: pointer; color: var(--outline); padding: 0 2px; }
.pick-stars.big button { font-size: 44px; }
.pick-stars button.on, .pick-stars:not(.big) button:hover, .pick-stars:not(.big) button:hover ~ button { color: var(--star); }
.pick-stars:not(.big) { flex-direction: row-reverse; justify-content: flex-end; }
dialog .field { margin: 10px 0 6px; }
.votes button.vote { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 4px 8px; border-radius: 99px; margin-left: -8px; }
.votes button.vote:hover { background: var(--c-high); }
.votes button.vote.on { color: var(--primary); font-weight: 600; }

/* the account's picture, changed in place */
.avatar-pick { position: relative; display: inline-block; cursor: pointer; border-radius: 50%; margin: 0 auto 12px; }
.avatar-pick .avatar { margin: 0; }
.avatar-pick .cam { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  display: grid; place-items: center; }
.avatar-pick .cam svg { width: 18px; height: 18px; fill: var(--on-primary); }
.avatar-pick .ring { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.45)
  radial-gradient(closest-side, transparent 78%, transparent 0) ; display: grid; place-items: center; }
.avatar-pick .ring::after { content: ""; width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(#fff calc(var(--p, 8) * 1%), rgba(255,255,255,.25) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 72%, #000 74%); mask: radial-gradient(closest-side, transparent 72%, #000 74%); }

/* the edit page's pictures */
.pictures { display: flex; gap: 12px; align-items: center; margin: 16px 0 4px; }
.pic-icon { cursor: pointer; flex: none; }
.pic-cover { flex: 1; aspect-ratio: 16 / 9; border-radius: 20px; background: var(--c-high); display: grid; place-items: center; overflow: hidden;
  cursor: pointer; color: var(--on-surface-variant); max-width: 420px; }
.pic-cover img { width: 100%; height: 100%; object-fit: cover; }

/* messages */
.tabs { display: flex; border-bottom: 1px solid var(--c-highest); margin-bottom: 8px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 14px 8px; cursor: pointer; font-weight: 500; color: var(--on-surface-variant);
  border-bottom: 3px solid transparent; display: flex; gap: 6px; justify-content: center; align-items: center; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.person .grow { flex: 1; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 80px); height: calc(100dvh - 80px); max-width: 760px; margin: 0 auto; }
.chat-head { display: flex; align-items: center; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--c-highest); }
.messages { flex: 1; overflow-y: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: min(80%, 460px); padding: 8px 14px; border-radius: 20px 20px 20px 6px; background: var(--c-high); align-self: flex-start;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-radius: 20px 20px 6px 20px; }
.bubble span { display: block; text-align: right; font-size: 11px; opacity: .7; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 0 12px; }
.composer textarea { flex: 1; font: inherit; color: inherit; background: var(--c-high); border: 0; border-radius: 24px; padding: 12px 18px; resize: none;
  outline: none; max-height: 160px; }
.composer .send { background: var(--primary); color: var(--on-primary); flex: none; }
.composer .send svg { fill: var(--on-primary); }
body:has(.chat) footer { display: none; }

/* a word that comes and goes */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--on-surface); color: var(--surface);
  padding: 12px 20px; border-radius: 8px; z-index: 100; max-width: 90vw; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: opacity .3s; }
.toast.gone { opacity: 0; }

/* an app's top: on a wide screen the cover sits to the right, no larger than it needs to be */
@media (min-width: 900px) {
  .app-top.with-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 32px; align-items: center; margin: 8px 0 8px; }
  .app-top.with-cover .cover { grid-column: 2; grid-row: 1; margin: 0; }
  .app-top.with-cover .app-main { grid-column: 1; grid-row: 1; }
}
.avatar-pick { display: block; width: max-content; }

.bubble { white-space: normal; }
.bubble .said { white-space: pre-wrap; }

/* Google's own sign-in button: white with the coloured G, dark in a dark theme */
.btn.gsi { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px #747775; font-family: Roboto, "Google Sans", system-ui, sans-serif; }
.btn.gsi .g { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.gsi { background: #131314; color: #e3e3e3; box-shadow: inset 0 0 0 1px #8e918f; } }
:root[data-theme="dark"] .btn.gsi { background: #131314; color: #e3e3e3; box-shadow: inset 0 0 0 1px #8e918f; }

/* admin */
.admin-bar { background: var(--tertiary-container); color: var(--on-tertiary-container); margin: 12px 0; }
.admin-bar .rows > * { background: var(--surface); color: var(--on-surface); }
.review-card { display: flex; flex-direction: column; gap: 6px; }
.review-card p { margin: 0; }
.app-line { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.person-row:hover { background: var(--c-highest) !important; }
.tabs { overflow-x: auto; }
.tabs button { white-space: nowrap; }

/* reactions, and a few emoji shown big with no bubble */
.bubble { position: relative; cursor: default; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { border: 0; border-radius: 99px; padding: 2px 8px; font: inherit; font-size: 14px; cursor: pointer;
  background: var(--c-highest); color: var(--on-surface); }
.bubble.mine .reaction { background: rgba(255,255,255,.25); color: inherit; }
.reaction.mine { box-shadow: inset 0 0 0 2px var(--primary); }
.bubble.mine .reaction.mine { box-shadow: inset 0 0 0 2px var(--on-primary); }
.bubble.jumbo { background: transparent !important; padding: 0 4px; color: var(--on-surface); }
.bubble.jumbo .said { font-size: 46px; line-height: 1.15; }
.bubble.jumbo span { color: var(--on-surface-variant); opacity: 1; }
.bubble.jumbo .reaction { background: var(--c-highest); color: var(--on-surface); }
.picker { display: flex; gap: 2px; padding: 6px; border-radius: 99px; background: var(--c-highest); align-self: flex-start;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); margin-top: -2px; }
.picker.mine { align-self: flex-end; }
.picker button { border: 0; background: transparent; font-size: 24px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.picker button:hover { background: var(--c-high); transform: scale(1.15); }

/* ------------------------------------------------------------------ motion, as Material 3 moves
 * Only what is new moves: a page arrived at, a list just loaded, a message just come, a window opened.
 * Nothing is tied to an element that is merely drawn again. */
:root { --ease: cubic-bezier(.2, 0, 0, 1); --ease-out: cubic-bezier(.05, .7, .1, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ripple { from { transform: scale(0); opacity: .22; } to { transform: scale(1); opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

main#view.enter { animation: page-in .3s var(--ease-out); }
.stagger > * { animation: rise .38s var(--ease-out) both; }
.stagger > *:nth-child(2) { animation-delay: .03s; } .stagger > *:nth-child(3) { animation-delay: .06s; }
.stagger > *:nth-child(4) { animation-delay: .09s; } .stagger > *:nth-child(5) { animation-delay: .12s; }
.stagger > *:nth-child(n+6) { animation-delay: .15s; }
#apps { transition: opacity .2s var(--ease); }
#apps.dim { opacity: .45; }

/* surfaces answer the pointer */
.btn, .icon-btn, .chip, .app-card, .segmented button, .tabs button, .rows > a, .rows > label, .person, .reaction, .picker button, .menu-item {
  position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; pointer-events: none; animation: ripple .55s var(--ease) forwards;
  z-index: -1; }
.btn, .icon-btn, .chip, .segmented button, .reaction, .field, .pill {
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease), filter .2s; }
.btn:not([disabled]):active, .chip:active, .icon-btn:active { transform: scale(.97); }
.app-card { transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.app-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.rows > a, .rows > label, .person { transition: background .2s var(--ease); }
.rows > a:hover, .rows > label:hover { background: var(--c-highest); }
.tabs button { transition: color .2s var(--ease), border-color .25s var(--ease); }
.switch { transition: background .2s var(--ease), box-shadow .2s var(--ease); }
.switch::after { transition: all .25s var(--ease-out); }
.bar.lifted { transition: box-shadow .25s var(--ease); }

/* windows open softly */
dialog[open] { animation: pop .25s var(--ease-out); }
dialog.full[open] { animation: page-in .28s var(--ease-out); }
dialog[open]::backdrop { animation: fade .2s var(--ease); }
.toast { animation: toast-in .3s var(--ease-out); }
.toast.gone { transition: opacity .3s var(--ease), transform .3s var(--ease); transform: translate(-50%, 10px); }

/* messages: only a new one rises; the menu pops when opened */
.bubble.new { animation: rise .28s var(--ease-out) both; }
.picker { animation: pop .18s var(--ease-out); transform-origin: top left; flex-direction: column; align-items: stretch;
  border-radius: 20px; padding: 6px; gap: 4px; }
.picker.mine { transform-origin: top right; }
.picker .picks { display: flex; gap: 2px; }
.picker button { transition: transform .15s var(--ease), background .15s; }
.picker .picks button:hover { transform: scale(1.15); }
.menu-item { display: flex !important; align-items: center; gap: 10px; width: auto !important; height: 40px !important;
  border-radius: 12px !important; font-size: 15px !important; padding: 0 12px; color: var(--on-surface); text-align: left; }
.menu-item svg { width: 20px; height: 20px; fill: currentColor; }
.menu-item:hover { background: var(--c-high) !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, dialog[open], dialog[open]::backdrop { animation: none !important; transition: none !important; }
}
/* the maker's word on a review */
.maker-vote { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 500; }
.maker-vote.up { background: var(--primary-container); color: var(--on-primary-container); }
.maker-vote.down { background: var(--error-container); color: var(--on-error-container); }
.reply { margin-top: 8px; padding: 12px 14px; border-radius: 16px; background: var(--c-high); }
.reply .who { display: flex; align-items: center; gap: 8px; }
.reply .note { color: var(--primary); font-size: 12px; margin-top: 2px; }

/* settings: a choice of a few */
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.rows > .setting { flex-direction: column; align-items: stretch; gap: 10px; }

/* a letter standing in for a picture is not a link's text */
a .avatar, .avatar { text-decoration: none; }
.review > a { text-decoration: none; flex: none; }
