/* Siri Bird — test build styles. Phone-first; centered at phone proportions on desktop. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --material: rgba(255, 255, 255, 0.62);
  --material-edge: rgba(255, 255, 255, 0.7);
  --material-shadow: 0 10px 30px rgba(30, 40, 35, 0.10), 0 1px 0 rgba(255,255,255,.6) inset;
  --siri-1: #ff6a3d; --siri-2: #ff3cac; --siri-3: #7b5cff; --siri-4: #2bb5ff; --siri-5: #3dffb4;
  --badge: #ff3b30;

  --world: #dfe6dd;
  --world-2: #cfd9cf;
  --world-hi: #eef2ec;
  --bg-top: #fdfdfb;
  --bg-bottom: #eef0ec;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --group: #f2f2f7;
  --separator: rgba(60, 60, 67, 0.14);
  --fill: rgba(120, 120, 128, 0.12);
  --scrim: rgba(0, 0, 0, 0.22);
  --danger: #ff3b30;
  --shadow: 0 30px 80px rgba(20, 40, 30, 0.22), 0 8px 24px rgba(20, 40, 30, 0.12);

  --egg: #f6f0e1;
  --egg-shade: #ebe1ca;
  --egg-speck: #d9cbad;
  --crack: #6b5a3e;
  --ground: rgba(40, 50, 40, 0.09);
  --plum: #8d9aa9;
  --plum-dark: #6f7d8f;
  --plum-light: #9aa7b5;
  --plum-line: #8290a1;
  --bill: #dccda4;
  --bill-dark: #c3b083;
  --bill-spot: #b9a573;
  --eye: #f4ebbd;
  --leg: #4a525d;

  --pos-noun: #ff9f0a;
  --pos-verb: #30b0c7;
  --pos-adj: #af52de;
  --pos-adv: #34c759;
  --pos-name: #ff375f;
  --pos-exclaim: #ffcc00;
  --pos-grammar: #8e8e93;
  --jar-lid: #e2a25a; --jar-lid-dark: #c98a45; --jar-glass: rgba(255,255,255,.55); --jar-edge: rgba(60,60,67,.22);
  --treat: #e9b872; --treat-dark: #c9924e; --treat-glow: rgba(255, 176, 64, .22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --world: #0c0f0d;
    --world-2: #131814;
    --world-hi: #18201b;
    --bg-top: #121314;
    --bg-bottom: #191c1a;
    --text: #f5f5f7;
    --text-2: #98989f;
    --text-3: #636366;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.2);
    --surface: rgba(44, 44, 46, 0.72);
    --surface-solid: #1c1c1e;
    --group: #000000;
    --separator: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.24);
    --scrim: rgba(0, 0, 0, 0.5);
    --danger: #ff453a;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --egg: #ece4d2;
    --egg-shade: #d9cdb3;
    --ground: rgba(255, 255, 255, 0.06);
    --jar-glass: rgba(255,255,255,.12); --jar-edge: rgba(255,255,255,.22);
    --material: rgba(40, 40, 44, 0.55);
    --material-edge: rgba(255, 255, 255, 0.12);
    --material-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255,255,255,.08) inset;
    --group: #000000;
    --badge: #ff453a;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-feature-settings: "cv11", "ss03";
  letter-spacing: -0.011em;
  color: var(--text);
  background: var(--world);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- world + phone frame ---------- */
.world {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 70% at 50% 110%, var(--world-2), transparent 70%),
    radial-gradient(80% 50% at 15% 0%, var(--world-hi), transparent 70%),
    var(--world);
}
.phone {
  position: relative;
  width: 100vw; height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow: hidden; overflow: clip;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  user-select: none; -webkit-user-select: none;
}
@media (min-width: 600px) and (min-height: 640px) {
  .phone {
    width: min(430px, calc((100dvh - 64px) * 0.4615));
    height: min(932px, calc(100dvh - 64px));
    border-radius: 48px;
    box-shadow: var(--shadow);
  }
}

.rotate {
  display: none; position: fixed; inset: 0; place-items: center; text-align: center;
  background: var(--bg-top); color: var(--text-2); font-size: 17px; z-index: 100;
}
.rotate strong { display: block; color: var(--text); font-size: 22px; margin-bottom: 6px; }
@media (orientation: landscape) and (max-height: 500px) {
  .rotate { display: grid; }
  .phone { visibility: hidden; }
}

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 0;
  height: 56px; flex: none;
}

@keyframes wmBump { 40% { filter: brightness(1.5); } }
/* progress sheet */
.pg-hero { background: var(--surface-solid); border-radius: 16px; padding: 18px 16px 16px; margin-top: 4px; }
.pg-stage { font-family: var(--round); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.pg-of { font-size: 17px; color: var(--text-3); font-weight: 600; letter-spacing: 0; }

.pg-bar { height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; margin: 16px 0 8px; }
.pg-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.pg-next { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.path { list-style: none; margin: 0; padding: 4px 0; background: var(--surface-solid); border-radius: 12px; }
.path li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; position: relative; }
.path li::after { content: ""; position: absolute; left: 29px; top: 34px; bottom: -10px; width: 2px; background: var(--fill); }
.path li:last-child::after { display: none; }
.path li.done::after { background: var(--accent); }
.path .pip { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-3); font-size: 13px; font-weight: 700; position: relative; z-index: 1; }
.path li.done .pip { background: var(--accent); color: #fff; }
.path li.now .pip { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.path .pt { font-weight: 600; font-size: 16px; }
.path li.locked .pt { color: var(--text-2); }
.path .ps { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.path .pv { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mini { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; vertical-align: middle; margin-left: 8px; }
.mini i { display: block; height: 100%; background: var(--accent); }

.admin-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fill); color: var(--text-2);
  transition: transform .2s, background .2s;
}
.admin-btn:active { transform: scale(.92); }
.admin-btn svg { width: 17px; height: 17px; }

/* ---------- stage ---------- */
.stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 104px 12px 0;
}
.stage-svg {
  flex: 1 1 0; min-height: 0;
  width: 100%; max-height: 470px;
  overflow: visible;
  cursor: pointer;
}
.glow {
  position: absolute; left: 50%; bottom: 8%;
  width: 82%; aspect-ratio: 1; translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  filter: blur(10px);
  opacity: 0; scale: .85;
  transition: opacity .5s ease, scale .8s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.phone.listening .glow { opacity: 1; scale: 1; animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { scale: 1.06; } }

#egg { transform-origin: 160px 381px; }
#shellTop { transform-origin: 160px 280px; }
#shellBottom { transform-origin: 160px 381px; }
#bird { transform-origin: 190px 384px; }
#head { transform-origin: 172px 146px; transition: transform .45s cubic-bezier(.3,.9,.3,1); }
#bird.thinking #head { transform: rotate(-9deg); }
#jaw, .peak-god .jaw { transform-origin: 138px 126px; }
#lid { transform-box: fill-box; transform-origin: center; transform: scaleY(0); }
#bird .body { transform-origin: 195px 330px; animation: breath 3.6s ease-in-out infinite; }
#wing { transform-origin: 178px 194px; animation: wing-breath 3.6s ease-in-out infinite; }
@keyframes wing-breath { 50% { transform: rotate(-1.2deg); } }
@keyframes breath { 50% { transform: scale(1.012, 1.02); } }

.phone[data-phase="egg"] #bird { opacity: 0; }
.phone[data-phase="bird"] #egg { opacity: 0; }
.phone.quiet .stage-svg { filter: saturate(.9); }
.phone.quiet .talk, .phone.quiet .top { opacity: .25; transition: opacity .6s; }

/* speech bubble */
.bubble {
  position: absolute; top: 10px; left: 0; right: 0;
  margin-inline: auto; width: fit-content;
  max-width: min(86%, 340px);
  padding: 12px 18px;
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: 0 6px 24px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  font-family: var(--round);
  font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em;
  text-align: center;
  opacity: 0; scale: .9; transform-origin: 50% 100%;
  transition: opacity .25s, scale .35s cubic-bezier(.3,1.4,.5,1);
  pointer-events: none;
  z-index: 2;
}
.bubble.show { opacity: 1; scale: 1; }
.bubble .bock { color: var(--text-3); font-style: italic; font-weight: 500; }
.bubble .dots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.bubble .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: dot 1s infinite ease-in-out; }
.bubble .dots i:nth-child(2) { animation-delay: .15s; } .bubble .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; translate: 0 0; } 40% { opacity: 1; translate: 0 -3px; } }
.bubble.first { font-size: 30px; padding: 14px 24px; }

/* feathers */
.feathers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.feather {
  position: absolute; left: 50%; top: 45%;
  width: 14px; height: 34px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
  background: var(--plum-light);
}

/* ---------- talk area ---------- */
.talk {
  flex: none;
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 24px 22px;
  gap: 10px;
  transition: opacity .4s;
}
.heard {
  min-height: 44px; margin: 0; max-width: 100%;
  font-size: 17px; line-height: 1.3; color: var(--text-2); text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.heard.interim { color: var(--text-3); }
.prompt {
  margin: 0; font-size: 15px; font-weight: 500; color: var(--text-2); text-align: center;
  min-height: 20px;
}
.prompt strong { color: var(--text); font-weight: 600; }

.mic {
  position: relative;
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .25s cubic-bezier(.3,1.5,.5,1), background .3s, box-shadow .3s, opacity .3s;
  margin-top: 4px;
}
.mic:active { transform: scale(.93); }
.mic svg { width: 30px; height: 30px; }
.mic .bars { display: none; gap: 4px; align-items: center; height: 28px; }
.mic .bars i { width: 4px; height: 10px; border-radius: 2px; background: currentColor; animation: bar .9s ease-in-out infinite; }
.mic .bars i:nth-child(2) { animation-delay: .12s; } .mic .bars i:nth-child(3) { animation-delay: .24s; }
.mic .bars i:nth-child(4) { animation-delay: .36s; } .mic .bars i:nth-child(5) { animation-delay: .48s; }
@keyframes bar { 50% { height: 26px; } }
.mic::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0; scale: .9;
}
.phone.listening .mic { background: var(--surface-solid); color: var(--accent); box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 30%, transparent); }
.phone.listening .mic svg { display: none; }
.phone.listening .mic .bars { display: flex; }
.phone.listening .mic::after { animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { opacity: .6; scale: .9; } 100% { opacity: 0; scale: 1.3; } }
.phone.busy .mic { opacity: .4; pointer-events: none; }

.switch {
  position: relative; width: 51px; height: 31px; border-radius: 16px;
  background: var(--fill);
  transition: background .25s;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16);
  transition: translate .25s cubic-bezier(.3,1.3,.5,1);
}
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"] .knob { translate: 20px 0; }

/* ---------- cards (bottom sheets) ---------- */
.scrim {
  position: absolute; inset: 0; background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 20;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.card {
  position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  padding: 30px 24px 22px;
  border-radius: 34px;
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(28px); -webkit-backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  text-align: center;
  translate: 0 120%;
  transition: translate .55s cubic-bezier(.2,.9,.25,1);
  z-index: 21;
}
.card.show { translate: 0 0; }
.card .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.card h2 { font-family: var(--round); font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.card p { font-size: 17px; line-height: 1.4; color: var(--text-2); margin: 0 0 18px; }
.card .big-word { font-family: var(--round); font-size: 46px; font-weight: 700; color: var(--text); margin: 6px 0 18px; letter-spacing: -0.02em; }
.card .steps { text-align: left; margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.card .steps li { display: flex; align-items: center; gap: 14px; font-size: 17px; padding: 12px 14px; border-radius: 16px; background: var(--fill); }
.card .steps svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.card .btn svg { width: 20px; height: 20px; margin-right: 8px; vertical-align: -3px; }
.card .steps.guide { gap: 14px; }
.card .steps.guide li { background: none; padding: 0 4px; align-items: flex-start; line-height: 1.4; color: var(--text-2); }
.card .steps.guide .num { flex: none; width: 28px; height: 28px; border-radius: 14px; background: var(--fill); color: var(--text); font-weight: 700; font-size: 15px; display: grid; place-items: center; margin-top: -1px; }
.card .steps.guide svg { display: inline-block; width: 19px; height: 19px; vertical-align: -3px; margin: 0 3px 0 1px; }
.card .steps.guide strong { color: var(--text); }
.card .point-down { display: grid; place-items: center; color: var(--accent); margin: -6px 0 12px; }
.card .point-down svg { width: 28px; height: 28px; animation: point-down 1.4s ease-in-out infinite; }
@keyframes point-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .card .point-down svg { animation: none; } }
.btn {
  display: block; width: 100%; height: 52px; border-radius: 16px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 600;
  transition: transform .15s, opacity .15s;
}
button:focus { outline: none; }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn:active { transform: scale(.98); opacity: .85; }
.btn.secondary { background: var(--fill); color: var(--accent); }
.btn.danger { background: var(--fill); color: var(--danger); }

/* ---------- toast ---------- */
.toast {
  position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top));
  translate: -50% -20px; opacity: 0;
  max-width: calc(100% - 40px);
  padding: 10px 16px; border-radius: 18px;
  background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  font-size: 15px; font-weight: 500; text-align: center;
  transition: opacity .3s, translate .4s cubic-bezier(.2,.9,.3,1);
  pointer-events: none; z-index: 40;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- admin (temporary test menu) ---------- */
.admin {
  position: absolute; inset: 0; z-index: 30;
  background: var(--group);
  display: flex; flex-direction: column;
  translate: 0 100%; transition: translate .5s cubic-bezier(.2,.9,.25,1);
  padding-top: env(safe-area-inset-top);
}
.admin.show { translate: 0 0; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px;
}
.admin-head h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.admin-head .done { color: var(--accent); font-size: 17px; font-weight: 600; }
.admin-body { overflow-y: auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; user-select: text; -webkit-user-select: text; }
.admin-note { font-size: 13px; color: var(--text-2); margin: 0 4px 14px; }
.group-label { font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); margin: 22px 16px 7px; }
.group { background: var(--surface-solid); border-radius: 12px; overflow: hidden; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 10px 16px; font-size: 17px;
  position: relative;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--separator); }
.row .val { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
button.row { width: 100%; text-align: left; color: var(--accent); }
button.row.danger { color: var(--danger); }
button.row:active { background: var(--fill); }
.row input[type="range"] { flex: 1; max-width: 180px; accent-color: var(--accent); }
.row input[type="text"], .row input[type="url"], .row select {
  flex: 1; min-width: 0; border: 0; background: transparent; text-align: right; color: var(--text-2); outline: none; font-size: 16px;
}
.typebox { display: flex; gap: 8px; padding: 8px; }
.typebox input {
  flex: 1; min-width: 0; height: 40px; border-radius: 20px; border: 0;
  background: var(--fill); padding: 0 16px; font-size: 16px; outline: none;
}
.typebox button { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--accent); color: #fff; font-weight: 600; }
.segmented { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.segmented button { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface-solid); box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--fill); border-radius: 9px; }
.stepper button { width: 44px; height: 32px; font-size: 20px; color: var(--text); }
.stepper span { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.row.perk { justify-content: flex-start; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.perk-pip { flex: none; width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--fill); color: var(--text-2); }
.row.perk.on .perk-pip { background: var(--accent); color: #fff; }
.perk-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; }
.perk-lv { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; }
.row.perk .segmented { flex: none; }
.segmented.chips-wrap { flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.bank { padding: 12px 16px; display: grid; gap: 10px; }
.bank h4 { margin: 0 0 4px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 14px; padding: 4px 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--text); }
.chip b { font-weight: 600; color: var(--c); margin-left: 4px; font-size: 12px; }
.patterns { margin: 0; padding: 12px 16px 12px 36px; font-size: 14px; line-height: 1.6; color: var(--text); }
.patterns .slot { color: var(--c); font-weight: 600; }
.patterns .count { color: var(--text-3); font-size: 12px; margin-left: 6px; }
.empty { padding: 14px 16px; color: var(--text-3); font-size: 15px; }
.mono { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-2); }

/* ---------- alive ---------- */
#pupil { transition: transform .45s cubic-bezier(.3,.8,.3,1); }
#tuft { transform-origin: 200px 94px; }
#bird.attentive #head { transform: rotate(-3deg); }

/* ---------- learned a word ---------- */
.learned-word {
  color: var(--text); font-weight: 600;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 22%, transparent) 62%);
  border-radius: 2px;
  animation: learned-in 1.2s ease-out;
}
@keyframes learned-in { 0% { background-size: 0 100%; } 100% { background-size: 100% 100%; } }
.learned-word { background-repeat: no-repeat; }
.learn-pop {
  position: absolute; left: 50%; top: 30%;
  translate: calc(-50% + var(--x, 0px)) 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: 0 6px 18px rgba(0,0,0,.08), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  font-family: var(--round); font-size: 15px; font-weight: 600; color: var(--text);
  pointer-events: none; z-index: 3;
  animation: learn-pop 2.6s cubic-bezier(.2,.8,.3,1) forwards;
}
.learn-pop svg { width: 13px; height: 13px; color: var(--accent); animation: twinkle 1.2s ease-in-out 2; }
@keyframes learn-pop {
  0% { opacity: 0; transform: translateY(14px) scale(.85); }
  14% { opacity: 1; transform: translateY(0) scale(1.04); }
  22% { transform: translateY(0) scale(1); }
  75% { opacity: 1; transform: translateY(-26px); }
  100% { opacity: 0; transform: translateY(-40px); }
}
@keyframes twinkle { 50% { transform: rotate(45deg) scale(1.3); } }

/* ---------- stats ---------- */
.sheet { z-index: 31; }
.stats-hero { padding: 6px 4px 4px; }
.hero-name { font-family: var(--round); font-size: 22px; font-weight: 700; }
.hero-sub { font-size: 15px; color: var(--text-2); margin-top: 2px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface-solid); border-radius: 14px; padding: 14px 14px 12px; }
.tile-v { font-family: var(--round); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile-l { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.tile-s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 10px; vertical-align: middle; }
.rank { display: inline-block; width: 22px; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 15px; }
.muted { color: var(--text-3); font-size: 14px; }
.chip.unlearned { opacity: .45; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }

/* ---------- treat jar ---------- */
.jar {
  position: absolute; right: 14px; bottom: 6px; z-index: 2;
  width: 54px; height: 62px; display: grid; place-items: center;
  border-radius: 18px;
  transition: transform .2s cubic-bezier(.3,1.4,.5,1);
}
.jar:active { transform: scale(.9); }
.jar svg { width: 44px; height: 52px; overflow: visible; filter: drop-shadow(0 4px 8px rgba(0,0,0,.08)); }
.jar-treat { transition: opacity .3s; }
.jar-count {
  position: absolute; top: 0; right: 0;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.jar.empty .jar-count { background: var(--fill); color: var(--text-2); }
.jar-plus {
  position: absolute; top: -6px; left: 50%; translate: -50% 0;
  font-family: var(--round); font-weight: 700; font-size: 15px; color: var(--jar-lid-dark);
  animation: jar-plus 1.2s ease-out forwards; pointer-events: none;
}
@keyframes jar-plus { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }
.treat-biscuit {
  position: absolute; left: 0; top: 0; z-index: 25; pointer-events: none;
  width: 18px; height: 13px; margin: -6px 0 0 -9px; border-radius: 50%;
  background: var(--treat); box-shadow: inset 0 0 0 1.5px var(--treat-dark);
}
.phone.treated .glow { opacity: 1; scale: 1; background: radial-gradient(closest-side, var(--treat-glow), transparent); animation: breathe 2.2s ease-in-out infinite; }
.phone.treated .mic { box-shadow: 0 0 0 4px var(--treat-glow), 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.learn-pop.phrase span { font-style: italic; }
.learn-pop.treat svg { color: var(--jar-lid); }
.learn-pop.level { top: 22%; background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.learn-pop.level svg { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .card { transition: opacity .3s !important; translate: 0 0; opacity: 0; pointer-events: none; }
  .card.show { opacity: 1; pointer-events: auto; }
}

/* =====================================================================
   Apple pass (2026-11-07): large title, glass materials, dock, Siri edge glow,
   iOS page sheets with grabber and dimmed backdrop, notification-style badge,
   Dynamic Island-style toast.
   ===================================================================== */

/* large title header */
.top { height: auto; padding: 18px 20px 0; align-items: flex-start; }

#title { font-family: var(--round); font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }

.phone[data-phase="egg"] #title { font-size: 28px; }

.admin-btn {
  width: 38px; height: 38px; margin-top: 4px;
  background: var(--material); color: var(--text);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
}
.admin-btn svg { width: 18px; height: 18px; }

/* stage */
.stage { padding-top: 92px; }
.glow {
  width: 92%; bottom: 4%;
  background: conic-gradient(from 0deg, var(--siri-1), var(--siri-2), var(--siri-3), var(--siri-4), var(--siri-5), var(--siri-1));
  filter: blur(46px); opacity: 0; scale: .7;
}
.phone.listening .glow { opacity: .28; scale: 1; animation: orb 6s linear infinite, breathe 2.4s ease-in-out infinite; }
@keyframes orb { to { rotate: 360deg; } }
.phone.treated .glow { opacity: .9; filter: blur(30px); animation: breathe 2.4s ease-in-out infinite; }
.phone.rush:not(.treated) .glow { opacity: .45; scale: 1; filter: blur(30px); background: radial-gradient(closest-side, var(--treat-glow), transparent); animation: breathe 1.3s ease-in-out infinite; }

/* Siri edge glow: the whole screen edge lights up while listening, like Apple Intelligence Siri */
.siri-edge {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 15;
  opacity: 0; transition: opacity .5s ease;
  padding: 3px;
  background: conic-gradient(from var(--a, 0deg), var(--siri-1), var(--siri-2), var(--siri-3), var(--siri-4), var(--siri-5), var(--siri-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: blur(6px) saturate(1.2);
}
.siri-edge::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: inherit; filter: blur(0); -webkit-mask: inherit; mask: inherit;
}
.phone.listening .siri-edge { opacity: 1; animation: edge 3s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes edge { to { --a: 360deg; } }

/* speech bubble: glass */
.bubble {
  background: var(--material);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
  border-radius: 24px; padding: 13px 20px;
  font-size: 22px; letter-spacing: -0.02em;
}

/* talk area + dock */
.talk { padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px)); gap: 6px; }
.heard { font-size: 17px; min-height: 46px; }
.prompt { font-size: 15px; margin-bottom: 8px; }
.dock {
  width: 100%; max-width: 360px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 14px;
  border-radius: 40px;
  background: var(--material);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
}

.dock-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fill); color: var(--text);
  transition: transform .25s cubic-bezier(.3,1.5,.5,1), background .25s, color .25s;
}
.dock-btn:active { transform: scale(.9); }
.dock-btn svg { width: 21px; height: 21px; }
.dock-btn.toggle[aria-checked="true"] { background: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }

/* mic: record-button style, a ring around a filled core */
.mic {
  width: 76px; height: 76px; margin: 0;
  background: transparent; color: #fff;
  box-shadow: inset 0 0 0 3.5px color-mix(in srgb, var(--text) 16%, transparent);
}

.mic svg { width: 28px; height: 28px; }

.mic::after { inset: -4px; border-width: 2px; }
.phone.listening .mic { background: transparent; box-shadow: inset 0 0 0 3.5px color-mix(in srgb, var(--accent) 45%, transparent); }

.phone.listening .mic .bars { display: flex; color: #fff; }
.phone.listening .mic::after { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.phone.treated .mic { box-shadow: inset 0 0 0 3.5px var(--treat), 0 0 0 6px var(--treat-glow); }

/* treat jar: glass button with an iOS badge */
.jar {
  width: 58px; height: 58px; right: 16px; bottom: 10px; border-radius: 50%;
  background: var(--material);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
}
.jar svg { width: 30px; height: 35px; filter: none; }
.jar-count { top: -3px; right: -3px; min-width: 22px; height: 22px; line-height: 22px; background: var(--badge); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 2px var(--bg-bottom); }
.jar.empty .jar-count { display: none; }

/* learn + level pops: glass pills */
.learn-pop {
  background: var(--material);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
  border-radius: 20px; padding: 7px 14px 7px 11px;
}
.learn-pop.level { background: var(--accent); color: #fff; box-shadow: none; }

/* toast: Dynamic Island style */
/* 0.13.0 (Tyler): the message pill looks like the app: card surface and shadow, a feather-color circle with an icon */
.toast {
  top: calc(96px + env(safe-area-inset-top)); translate: -50% -14px; scale: .86;
  display: flex; align-items: center; gap: 11px; width: max-content; max-width: calc(100% - 40px);
  background: var(--surface-solid, #fff); color: var(--text); border-radius: 999px; padding: 9px 20px 9px 9px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 10px 34px rgba(20,30,40,.16), 0 1px 3px rgba(20,30,40,.08);
  font-family: var(--round); font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; text-align: left; line-height: 1.25;
  transition: opacity .25s, translate .55s cubic-bezier(.2,1.25,.3,1), scale .55s cubic-bezier(.2,1.25,.3,1);
}
.toast.show { scale: 1; }
.tst-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bird-accent, var(--accent)); color: #fff; }
.tst-ic svg { width: 19px; height: 19px; }
.toast[data-icon="info"] .tst-ic { background: color-mix(in srgb, var(--bird-accent, var(--accent)) 16%, var(--surface-solid, #fff)); color: var(--bird-accent, var(--accent)); }
.toast[data-icon="heart"] .tst-ic { background: #f0505e; }
.tst-t { min-width: 0; }
@media (prefers-color-scheme: dark) { .toast { background: #2a2c30; box-shadow: 0 10px 34px rgba(0,0,0,.45); } .toast[data-icon="info"] .tst-ic { background: color-mix(in srgb, var(--bird-accent, var(--accent)) 26%, #2a2c30); color: color-mix(in srgb, var(--bird-accent, var(--accent)) 60%, #fff); } }

/* cards: concentric with the phone corners */
.card { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 40px; padding: 32px 24px 24px; }
.card h2 { font-size: 32px; }
.btn { height: 54px; border-radius: 27px; font-weight: 600; }

/* sheets: iOS page sheet with grabber, phone dims behind */
.phone::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.32);
  opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 29;
}
.phone:has(.admin.show)::after { opacity: 1; }
.phone:has(.admin.show) :is(.top, .stage, .talk) { scale: .96; transition: scale .5s cubic-bezier(.2,.9,.25,1); }
.top, .stage, .talk { transition: scale .5s cubic-bezier(.2,.9,.25,1), opacity .4s; }
.admin {
  top: calc(12px + env(safe-area-inset-top)); padding-top: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -2px 20px rgba(0,0,0,.12);
  overflow: hidden;
}
@media (min-width: 600px) and (min-height: 640px) { .admin { border-radius: 16px 16px 48px 48px; } }
.admin::before {
  content: ""; display: block; flex: none; width: 36px; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--text) 22%, transparent); margin: 6px auto 0;
}
.admin-head { padding: 10px 20px 6px; }
.admin-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; }
.group, .path { border-radius: 14px; }
.tile, .pg-hero { border-radius: 18px; }
.pg-bar i, .mini i { background: var(--accent); }
.path li.done .pip { background: var(--accent); }

/* keep the listening orb behind the bird, and hide cards fully when closed */
.stage { isolation: isolate; }
.glow { z-index: -1; }
.card { visibility: hidden; transition: translate .55s cubic-bezier(.2,.9,.25,1), visibility 0s linear .55s; }
.card.show { visibility: visible; transition: translate .55s cubic-bezier(.2,.9,.25,1), visibility 0s; }
.admin { visibility: hidden; transition: translate .5s cubic-bezier(.2,.9,.25,1), visibility 0s linear .5s; }
.admin.show { visibility: visible; transition: translate .5s cubic-bezier(.2,.9,.25,1), visibility 0s; }

/* ---------- level unlocks ---------- */
.unlock-cape, .unlock-crown { display: none; }
.phone.has-cape .unlock-cape, .phone.has-crown .unlock-crown { display: inline; }
.phone.has-goldbill { --bill: #ecc65a !important; --bill-dark: #c99a2e !important; --bill-spot: #b8862a !important; }
.phone.has-crown .glow { opacity: .22; scale: 1; }
.bubble.sing { font-style: italic; }
.bubble.whisper { font-size: 16px; font-weight: 500; color: var(--text-2); }
.learn-pop { white-space: nowrap; }

/* header layout v2: jar + info top right, test menu under the level bar */
.top { display: flex; justify-content: space-between; align-items: flex-start; }

.top-right { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.top .jar { position: relative; right: auto; bottom: auto; width: 54px; height: 54px; }
.top .jar svg { width: 28px; height: 33px; }

.stage { padding-top: 64px; }
.card .facts { text-align: left; list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.card .facts li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 16px; background: var(--fill); font-size: 16px; line-height: 1.35; }
.card .facts b { display: block; font-weight: 600; color: var(--text); }
.card .facts span.t { color: var(--text-2); }
.card .facts .ic { font-size: 22px; line-height: 1.1; text-align: center; }
.jar-total { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 2px 0 16px; }
.jar-n { font-family: var(--round); font-size: 56px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.jar-u { font-size: 20px; font-weight: 600; color: var(--text-2); }
.btn.plain { background: transparent; color: var(--accent); margin-top: 6px; height: 44px; }
.jar.empty .jar-count { display: block; background: var(--fill); color: var(--text-2); box-shadow: none; }

/* ---------- each bird's look: markings ---------- */
.phone { --crest: var(--plum-dark); --belly: color-mix(in srgb, var(--plum-light) 45%, #fff); --old-white: #f3f1ea;
  --bill-mark: color-mix(in srgb, var(--bill-dark) 70%, #3a3226); }
.phone.tone-dark { --mark: color-mix(in srgb, var(--plum-dark) 72%, #1d2228); }
.phone.tone-light { --mark: color-mix(in srgb, var(--plum-light) 40%, #fff); }
.phone.mk-crest { --crest: var(--mark); }
.m { display: none; }
.phone.mk-cap .m-cap, .phone.mk-mask .m-mask, .phone.mk-cheek .m-cheek,
.phone.mk-spots .m-spots, .phone.mk-stripes .m-stripes, .phone.mk-belly .m-belly,
.phone.mk-billtip .m-billtip, .phone.mk-billstripe .m-billstripe, .phone.mk-billfreckles .m-billfreckles,
.phone.mk-tail .m-tail { display: inline; }

/* ---------- growing up: chick, fledgling, young, adult, old ---------- */
.phone { --g-s: 1; --g-head: 1; --g-bill: 1; --g-eye: 1; --g-tilt: 0deg; --g-fluff: 0; --g-tuft: 1; --g-old: 0; --g-shine: 0; --g-plump: 1; --g-leg: 1; }
.phone[data-growth="chick"]     { --g-s: .6;  --g-head: 1.45; --g-bill: .5;  --g-eye: 1.35; --g-fluff: 1;   --g-tuft: 0;  --g-shine: 1; --g-plump: 1.14; --g-leg: 1.5; }
.phone[data-growth="fledgling"] { --g-s: .72; --g-head: 1.26; --g-bill: .7;  --g-eye: 1.2;  --g-fluff: .55; --g-tuft: .45; --g-shine: .8; --g-plump: 1.07; --g-leg: 1.25; }
.phone[data-growth="young"]     { --g-s: .86; --g-head: 1.1;  --g-bill: .87; --g-eye: 1.08; --g-fluff: 0;   --g-tuft: .85; --g-shine: .3; --g-leg: 1.08; }
.phone[data-growth="old"]       { --g-s: .97; --g-bill: 1.04; --g-eye: .96; --g-tilt: 7deg; --g-old: 1; --g-tuft: 1; }

.grow, .g-head, .g-bill, .g-eye, .g-body, .legs, .fluff, .old, #tuft, .baby-shine, .brow {
  transition: transform 1.3s cubic-bezier(.34,1.25,.5,1), opacity 1s ease, filter 1.3s ease, stroke-width 1.3s ease;
}
.g-body { transform-origin: 196px 312px; transform: scale(calc(var(--g-plump) * var(--t-plump, 1)), 1); }
.legs { stroke-width: calc(7px * var(--g-leg)); }
.grow { transform-origin: 190px 384px; transform: scale(calc(var(--g-s) * var(--t-s, 1))); }
.g-head { transform-origin: 170px 142px; transform: translateY(var(--t-neck-y, 0px)) rotate(var(--g-tilt)) scale(var(--g-head)); }
/* 0.16.0: neck length (a look trait) */
.neck { transform-origin: 176px 204px; transform: scaleY(var(--t-neck, 1)); }
.g-bill { transform-origin: 138px 110px; transform: scale(calc(var(--g-bill) * var(--t-bill, 1))); }
.g-eye { transform-origin: 156px 98px; transform: scale(var(--g-eye)); }
.fluff { opacity: var(--g-fluff); }
#tuft { opacity: var(--g-tuft); }
.old { opacity: var(--g-old); }
.brow { opacity: calc(1 - var(--g-old)); }
.baby-shine { opacity: var(--g-shine); }
.phone[data-growth="old"] .grow { filter: saturate(.6) brightness(1.06); }
.phone[data-growth="old"] { --crest: var(--old-white); }

/* glow-up moment */
.phone.glowup .grow { filter: brightness(1.9) saturate(.4) drop-shadow(0 0 18px rgba(255,255,255,.9)); transition-duration: .35s; }
.sparkle { position: absolute; left: 50%; top: 55%; font-size: 22px; color: #ffd75e; text-shadow: 0 0 10px rgba(255,215,94,.9); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .grow, .g-head, .g-bill, .g-eye, .fluff, .old, #tuft, .baby-shine, .brow { transition-duration: .01s; }
}
.card p.card-sub { font-size: 14px; color: var(--text-3); margin-top: -10px; }
.row.look-grow .segmented { width: 100%; }
.row.look-grow .segmented button { flex: 1; padding: 6px 4px; }
.row.mark-chips { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.chip-btn { font-size: 13px; padding: 5px 10px; border-radius: 14px; background: var(--fill); color: var(--text); text-transform: capitalize; }
.chip-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ground { transform-box: fill-box; transform-origin: center; }

/* Developer password card and locked dev button (2026-11-07) */
.admin-btn[hidden] { display: none; }
.card .pw-form { margin: 4px 0 14px; }
.card .pw-form input { width: 100%; box-sizing: border-box; height: 52px; border: 0; border-radius: 16px; background: var(--fill); color: var(--text); font: inherit; font-size: 17px; padding: 0 16px; text-align: center; outline: none; }
.card .pw-form input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.card .pw-err { color: var(--danger); font-size: 14px; margin: 8px 0 0; }

/* ---------- stage 3: the front door (siribird.com without a bird) ---------- */
.phone[data-mode="door"] :is(.top, .stage, .talk, .siri-edge) { display: none; }
.door {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 24px 24px calc(20px + env(safe-area-inset-bottom)); text-align: center;
  animation: door-in .7s cubic-bezier(.2,.9,.25,1) both;
  transition: opacity .35s, scale .35s;
}
.door.leaving { opacity: 0; scale: .98; }
@keyframes door-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
.door-art { flex: 1; width: 100%; max-width: 360px; min-height: 0; display: grid; place-items: center; }
.door-art svg { width: 100%; height: 100%; max-height: 46vh; overflow: visible; }
.door-copy { margin: 4px 0 26px; }
.door-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.door h1 { font-family: var(--round); font-size: 34px; line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 10px; color: var(--text); }
.door-copy p { font-size: 17px; line-height: 1.4; color: var(--text-2); margin: 0 auto; max-width: 300px; }
.door-actions { width: 100%; max-width: 380px; display: grid; gap: 10px; }
/* 0.7.0: "Lost my bird key", a small text button under the two ways in. */
.door-lost {
  justify-self: center; margin-top: 2px; min-height: 44px; padding: 0 14px;
  border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--text-3);
  border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .2s, scale .2s cubic-bezier(.2,.9,.25,1);
}
.door-lost:hover { color: var(--text-2); }
.door-lost:active { scale: .96; color: var(--text-2); }
.door-lost:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .door { animation: none; } }

/* invite code and bird key fields (in the bottom card) */
.door-form { margin: 0 0 10px; }
.code-input, .key-input {
  display: block; width: 100%; border: 0; outline: none; border-radius: 18px;
  background: var(--fill); color: var(--text); text-align: center;
  -webkit-user-select: text; user-select: text;
  transition: box-shadow .2s;
}
.code-input { height: 64px; font: 700 28px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; padding: 0 12px; }
.code-input::placeholder { color: var(--text-3); letter-spacing: .08em; }
.key-input { resize: none; padding: 14px 16px; font: 500 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; text-align: left; word-break: break-all; }
.code-input:focus, .key-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.form-err { color: var(--danger) !important; font-size: 15px !important; margin: 0 0 12px !important; }
.btn.slim { height: 40px; width: auto; display: inline-block; padding: 0 18px; font-size: 15px; margin: 0 0 12px; border-radius: 20px; }
.btn.working { opacity: .6; pointer-events: none; }
.btn:disabled { cursor: default; }

/* bird key QR code */
.qr-box { width: 200px; height: 200px; margin: 4px auto 10px; padding: 10px; border-radius: 24px; background: #fff; box-shadow: 0 1px 0 var(--separator); }
.qr-box svg { width: 100%; height: 100%; display: block; }

/* ---------- 0.4.1: words in a group (Stats → Nouns, Verbs…) ---------- */
button.row.pos-row { color: var(--text); }
.chev { display: inline-block; width: 8px; height: 8px; margin-left: 10px; border: solid var(--text-3); border-width: 2px 2px 0 0; transform: rotate(45deg); vertical-align: 1px; }
.back-chev { margin: 0 6px 0 0; border-color: var(--accent); transform: rotate(-135deg); vertical-align: 0; }
.admin-head .back { color: var(--accent); font-size: 17px; display: inline-flex; align-items: center; }
.words-sheet { z-index: 32; translate: 100% 0; }
.words-sheet.show { translate: 0 0; }
.words-sheet::before { visibility: hidden; }
.words-sheet .hero-name .dot { width: 12px; height: 12px; vertical-align: 3px; }

/* ---------- stage 4 (0.5.0): friends and play dates ---------- */
.online-btn { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.online-btn[hidden] { display: none; }
.online-btn:active { transform: scale(.9); }
/* the orb: Siri colors, a soft highlight, and a slow-turning glow ring while it saves */
.online-orb {
  position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--accent);
}
.online-orb svg { width: 32px; height: 32px; }
.online-btn::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .4s;
  border: 2.5px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
}
.online-btn.saving::before { opacity: 1; animation: online-spin 1s linear infinite; }
@keyframes online-spin { to { transform: rotate(360deg); } }
.online-dot { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 2.5px var(--bg-bottom); }
.online-dot[hidden] { display: none; }
.online-dot[data-state="saving"] { background: #34c759; }
.online-dot[data-state="offline"] { background: #ff9f0a; }
.online-dot[data-state="lost"] { background: var(--badge); }
.online-btn .badge {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--badge); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-bottom); font-variant-numeric: tabular-nums;
}
.online-btn .badge[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .online-btn.saving::before { animation: none; } }

/* the SiriBird Online sheet */
.online-title { display: flex; flex-direction: column; }
.online-title span { font-size: 13px; font-weight: 500; color: var(--text-2); margin-top: 1px; letter-spacing: .01em; }
.online-hero { text-align: center; padding: 14px 16px 6px; }
.online-badge {
  width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--accent);
}
.online-badge svg { width: 34px; height: 34px; }
.online-hero[data-state="saved"] .online-badge { background: #34c759; }
.online-hero[data-state="offline"] .online-badge { background: #ff9f0a; }
.online-hero[data-state="lost"] .online-badge, .online-hero[data-state="local"] .online-badge { background: var(--fill); color: var(--text-2); box-shadow: none; }
.online-status { font-family: var(--round); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.online-hero p { margin: 4px auto 0; max-width: 300px; font-size: 15px; line-height: 1.4; color: var(--text-2); }
.online-hero .btn { margin-top: 16px; }
.online-hero p.card-sub { font-size: 13px; color: var(--text-3); margin-top: 8px; }

/* cards can open on top of a sheet (unfriend, forget a word) */
.phone:has(.sheet.show) .scrim { z-index: 33; }
.phone:has(.sheet.show) .card { z-index: 34; }

/* friends sheet */
.fr-loading { padding: 40px 16px; text-align: center; color: var(--text-2); }
.fr-empty { padding: 14px 16px 4px; }
.fr-empty p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.4; }

.fr-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr-name { font-size: 17px; font-weight: 500; color: var(--text); }
.fr-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.fr-add { justify-content: flex-start; gap: 12px; }
.fr-plus { width: 46px; height: 30px; display: grid; place-items: center; font-size: 26px; font-weight: 400; line-height: 1; }
.fr-visit { gap: 10px; }
.fr-visit.new .fr-name { font-weight: 600; }
.fr-note { margin-top: 14px; }
.pill-btn {
  flex: none; height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--fill); color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform .15s;
}
.pill-btn:active { transform: scale(.95); }
.pill-btn:disabled { opacity: .5; }
.card .fr-hero {
  display: block; width: 132px; height: 132px; margin: -6px auto 12px; border-radius: 50%;
  background-color: var(--fill); background-repeat: no-repeat; background-size: auto 125%; background-position: center 62%;
  box-shadow: 0 0 0 4px var(--surface-solid);
}
.btn.danger-text { color: var(--danger); }
.card .word-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -6px 0 22px; }
.card .word-chips .chip { font-size: 20px; padding: 8px 16px; border-radius: 20px; font-weight: 600; }

/* the play date: two birds facing each other */
.guest {
  position: absolute; inset: 64px 12px 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  pointer-events: none; z-index: 1;
}
.guest .stage-svg { cursor: default; }
.stage > .stage-svg, .guest .stage-svg { transition: transform .9s cubic-bezier(.3,1.25,.5,1), opacity .5s ease; transform-origin: 50% 100%; }
.phone.outing .stage > .stage-svg { transform: translateX(34%) scale(.66); } /* 0.9.2: a little farther apart, so two adults' bills don't overlap (0.16.3: the 0.16 bills are longer; a bit farther and smaller) */
.guest .stage-svg { transform: translateX(-130%) scale(-.72, .72); opacity: 0; }
.phone.outing.outing-in .guest .stage-svg { transform: translateX(-34%) scale(-.66, .66); opacity: 1; }
/* 0.16.3 (Tyler: bills touching again): when either bird has a big bill, a big body or a long neck, both stand a bit smaller and farther apart */
.phone.outing.pd-big .stage > .stage-svg { transform: translateX(36%) scale(.6); }
.phone.outing.outing-in.pd-big .guest .stage-svg { transform: translateX(-36%) scale(-.6, .6); }
.phone.outing .bubble { font-size: 18px; padding: 10px 15px; max-width: 58%; top: auto; bottom: 50%; transform-origin: 50% 100%; z-index: 30; } /* 0.13.7 (Tyler): over the pinned friendship meter (26), so tall bubbles aren't cut off */
.phone.outing #bubble { margin-right: 10px; left: auto; right: 0; margin-left: auto; transform-origin: 70% 100%; }
.guest-bubble { left: 10px !important; right: auto !important; margin: 0 !important; transform-origin: 30% 100%; }
.outing-bar { display: none; }
.phone.outing .outing-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--text-2); min-height: 32px;
}
.phone.outing .prompt, .phone.outing .heard { display: none; }
.phone.outing .dock { opacity: .3; pointer-events: none; transition: opacity .4s; }
.phone.outing .glow { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  .stage > .stage-svg, .guest .stage-svg { transition-duration: .01s; }
}

/* the friend's own look (the phone's markings, growth and unlocks are your bird's, so they're reset here) */
.guest { --crest: var(--plum-dark); --belly: color-mix(in srgb, var(--plum-light) 45%, #fff); --old-white: #f3f1ea;
  --bill-mark: color-mix(in srgb, var(--bill-dark) 70%, #3a3226); --mark: var(--plum-dark);
  --g-s: 1; --g-head: 1; --g-bill: 1; --g-eye: 1; --g-tilt: 0deg; --g-fluff: 0; --g-tuft: 1; --g-old: 0; --g-shine: 0; --g-plump: 1; --g-leg: 1; }
.guest.tone-dark { --mark: color-mix(in srgb, var(--plum-dark) 72%, #1d2228); }
.guest.tone-light { --mark: color-mix(in srgb, var(--plum-light) 40%, #fff); }
.guest.mk-crest { --crest: var(--mark); }
.phone .guest .m, .phone .guest .unlock-cape, .phone .guest .unlock-crown { display: none !important; }
.phone .guest.mk-cap .m-cap, .phone .guest.mk-mask .m-mask, .phone .guest.mk-cheek .m-cheek,
.phone .guest.mk-spots .m-spots, .phone .guest.mk-stripes .m-stripes, .phone .guest.mk-belly .m-belly,
.phone .guest.mk-billtip .m-billtip, .phone .guest.mk-billstripe .m-billstripe, .phone .guest.mk-billfreckles .m-billfreckles,
.phone .guest.mk-tail .m-tail, .phone .guest.has-cape .unlock-cape, .phone .guest.has-crown .unlock-crown { display: inline !important; }
.guest.has-goldbill { --bill: #ecc65a !important; --bill-dark: #c99a2e !important; --bill-spot: #b8862a !important; }
.guest[data-growth="chick"]     { --g-s: .6;  --g-head: 1.45; --g-bill: .5;  --g-eye: 1.35; --g-fluff: 1;   --g-tuft: 0;  --g-shine: 1; --g-plump: 1.14; --g-leg: 1.5; }
.guest[data-growth="fledgling"] { --g-s: .72; --g-head: 1.26; --g-bill: .7;  --g-eye: 1.2;  --g-fluff: .55; --g-tuft: .45; --g-shine: .8; --g-plump: 1.07; --g-leg: 1.25; }
.guest[data-growth="young"]     { --g-s: .86; --g-head: 1.1;  --g-bill: .87; --g-eye: 1.08; --g-fluff: 0;   --g-tuft: .85; --g-shine: .3; --g-leg: 1.08; }
.guest[data-growth="old"]       { --g-s: .97; --g-bill: 1.04; --g-eye: .96; --g-tilt: 7deg; --g-old: 1; --g-tuft: 1; --crest: var(--old-white); }
.phone .guest .grow { filter: none; }
.phone .guest[data-growth="old"] .grow { filter: saturate(.6) brightness(1.06); }
.phone.glowup .guest .grow { filter: none; }

/* stats: who taught a word, and forgetting one */
.row.word-row { width: 100%; text-align: left; color: var(--text); }
.word-by { display: block; font-size: 13px; color: var(--accent); margin-top: 1px; }

/* =====================================================================
   0.6.0 (stage 5): bird-color accent, level ring, the new dock with the listen lock,
   SiriBird Online v2, friend tiles, sleeping, the bag, home movies and the baby book.
   Flat colors on every UI piece (the Siri edge, bird glow and page background stay soft).
   ===================================================================== */

/* the accent comes from the bird's feathers: darker in light mode, lighter in dark mode */
:root { --well: #e9e9ec; --bezel: rgba(60, 60, 67, .10); --paper: #fbf7ee; --paper-line: rgba(120, 100, 60, .16); }
@media (prefers-color-scheme: dark) { :root { --well: #2c2c2e; --bezel: rgba(255, 255, 255, .08); --paper: #26241f; --paper-line: rgba(255, 240, 210, .12); } }
.phone.themed { --accent: var(--bird-accent); --accent-soft: color-mix(in srgb, var(--bird-accent) 16%, transparent); }
@media (prefers-color-scheme: dark) {
  .phone.themed { --accent: color-mix(in srgb, var(--bird-accent) 70%, #fff); --accent-soft: color-mix(in srgb, var(--bird-accent) 30%, transparent); }
}

/* ---------- header: level ring + name + "Young · 54 XP remaining" ---------- */
.top { align-items: center; padding: 16px 20px 0; }
.lvl { display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0; transition: opacity .2s; }
.lvl:active { opacity: .7; }
.ring { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 4.5; }
.ring-bg { stroke: var(--fill); }
.ring-fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .9s cubic-bezier(.2,.8,.2,1), stroke .4s; }
#lvlNum { position: relative; font-family: var(--round); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#lvlNum.small { font-size: 15px; }
.lvl-text { display: flex; flex-direction: column; min-width: 0; }
.lvl-text #title { font-size: 30px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#subtitle { font-size: 14px; font-weight: 500; color: var(--text-2); margin-top: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stage-word { color: var(--accent); font-weight: 600; }
.phone[data-phase="egg"] .ring { display: none; }
.phone[data-phase="egg"] .lvl { cursor: default; }
.phone[data-phase="egg"] .lvl-text #title { font-size: 28px; }
.top-right { margin-top: 0; gap: 10px; }
.top-right .admin-btn { margin-top: 0; }

/* ---------- the dock: Stats | listen lock + mic | Treats | Bag (no labels, every circle on one line) ---------- */
.dock { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 14px; max-width: 370px; width: auto; border-radius: 46px; }
.dock .dock-btn { flex: none; width: 52px; height: 52px; background: var(--well); color: var(--accent); box-shadow: 0 0 0 1px var(--bezel) inset; }
.dock .dock-btn svg { width: 22px; height: 22px; }
.dock .jar { position: relative; right: auto; bottom: auto; z-index: auto; border-radius: 50%; backdrop-filter: none; -webkit-backdrop-filter: none; }
.dock .jar svg { width: 26px; height: 30px; filter: none; }
.dock .jar .jar-count { top: -4px; right: -4px; min-width: 20px; height: 20px; line-height: 20px; font-size: 12px; box-shadow: 0 0 0 2px var(--bg-bottom); }
.dock .jar.empty .jar-count { display: none; }
.dock .bag { --bag: var(--accent); --bag-flap: color-mix(in srgb, var(--accent) 78%, #000); --bag-strap: var(--text-2); --bag-clasp: #fff; }
.dock .bag svg { width: 28px; height: 28px; }

/* the sideways snowman: Listen (small) and the mic (big) share one cutout */
.listen { position: relative; flex: none; width: 128px; height: 72px; }
.listen .cut { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cut-fill { fill: var(--well); }
.lk-paint { fill: var(--accent); transition: fill .4s; }
.cut-rim { stroke: var(--well); }
.cut-bezel { stroke: var(--bezel); }
.lk-lock, .lk-mic { position: absolute; top: 50%; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; transition: scale .25s cubic-bezier(.3,1.5,.5,1); }
.lk-lock { left: 26px; width: 44px; height: 44px; color: var(--text); }
.lk-lock svg { width: 21px; height: 21px; overflow: visible; }
.lk-mic { left: 92px; width: 64px; height: 64px; color: #fff; }
.lk-lock:active, .lk-mic:active { scale: .9; }
.lk-micon, .lk-bars { grid-area: 1 / 1; display: grid; place-items: center; transform-origin: center; }
.lk-micon svg { width: 28px; height: 28px; }
.lk-bars { display: flex; align-items: center; gap: 4px; height: 30px; opacity: 0; }
.lk-bars i { width: 4.5px; height: 6px; border-radius: 3px; background: #fff; }
.phone.busy .lk-mic { opacity: .45; pointer-events: none; }
.phone.treated .cut-rim { stroke: var(--treat); }
.phone.treated .cut-bezel { stroke: var(--treat-dark); }
.lk-lock:focus-visible, .lk-mic:focus-visible, .dock-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- SiriBird Online button + sheet ---------- */
.online-btn { width: 46px; height: 46px; }
.online-orb { width: 40px; height: 40px; background: var(--accent); }
.online-orb svg { width: 26px; height: 26px; }
.online-btn::before { inset: -1px; border-width: 2.5px; }
.online-dot { right: 0; bottom: 0; width: 12px; height: 12px; }
.online-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.online-mark { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); }
.online-mark svg { width: 28px; height: 28px; }
.online-sheet .online-title h2 { font-size: 26px; }
.online-sheet .online-title span { order: -1; font-size: 12px; color: var(--text-3); margin: 0 0 1px; }
.online-when { margin: 6px auto 0 !important; font-size: 14px !important; color: var(--text-3) !important; font-variant-numeric: tabular-nums; }
.fr-label { display: flex; justify-content: space-between; align-items: baseline; }
.fr-jump { font-size: 13px; color: var(--accent); text-transform: none; letter-spacing: 0; font-weight: 500; }
.fr-grid-group { background: none; overflow: visible; }
.fr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-tile {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px;
  padding: 8px 8px 11px; border-radius: 20px; background: var(--surface-solid); color: var(--text);
  transition: scale .2s cubic-bezier(.3,1.4,.5,1);
}
.fr-tile:active { scale: .96; }
.fr-tile.owner { box-shadow: 0 0 0 2px var(--accent) inset; }
.fr-bird { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--fill); display: grid; place-items: center; overflow: hidden; margin-bottom: 7px; }
.fr-bird img { width: 92%; height: 92%; object-fit: contain; object-position: 50% 100%; display: block; }
.fr-egg { width: 38%; aspect-ratio: .78; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: var(--egg); box-shadow: inset -6px -8px 0 var(--egg-shade); }
.fr-tile .fr-name { font-size: 16px; font-weight: 600; padding: 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-tile .fr-note { margin: 0; padding: 0 4px; font-size: 13px; color: var(--accent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-when { padding: 0 4px; font-size: 12px; color: var(--text-3); }
.fr-when.on { color: #248a3d; font-weight: 600; }
.fr-when.on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34c759; margin-right: 5px; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .fr-when.on { color: #30d158; } }
.card .fr-hero.cut { width: 150px; height: 150px; border-radius: 34px; display: grid; place-items: center; overflow: hidden; background: var(--fill); box-shadow: none; }
.card .fr-hero.cut img { width: 92%; height: 92%; object-fit: contain; object-position: 50% 100%; }
.fr-card-note { margin: -4px 0 14px !important; font-size: 15px !important; color: var(--accent) !important; font-weight: 500; }

/* ---------- sleeping ---------- */
.phone.asleep .stage > .stage-svg #lid, .phone.asleep .mn-peek > .stage-svg #lid { transform: scaleY(1); }
.phone.asleep .stage > .stage-svg #head, .phone.asleep .mn-peek > .stage-svg #head { transform: rotate(8deg); }
.phone.asleep .stage > .stage-svg .body, .phone.asleep .stage > .stage-svg #wing { animation-duration: 6.5s; }
.zzz {
  position: absolute; left: 34%; top: 38%; z-index: 3; pointer-events: none;
  font-family: var(--round); font-weight: 700; font-size: calc(22px * var(--s, 1)); color: var(--text-3);
  opacity: 0; animation: zzz 3.4s ease-out var(--d, 0s) both;
}
@keyframes zzz { 0% { opacity: 0; translate: 0 0; rotate: -8deg; } 20% { opacity: .9; } 100% { opacity: 0; translate: -34px -80px; rotate: 12deg; } }

/* ---------- a bird on a page (bag, home movies, baby book): its own look, growth and phase ---------- */
.birdbox { position: relative; display: flex; align-items: flex-end; justify-content: center;
  --crest: var(--plum-dark); --belly: color-mix(in srgb, var(--plum-light) 45%, #fff); --old-white: #f3f1ea;
  --bill-mark: color-mix(in srgb, var(--bill-dark) 70%, #3a3226); --mark: var(--plum-dark);
  --g-s: 1; --g-head: 1; --g-bill: 1; --g-eye: 1; --g-tilt: 0deg; --g-fluff: 0; --g-tuft: 1; --g-old: 0; --g-shine: 0; --g-plump: 1; --g-leg: 1; }
.birdbox .stage-svg { width: 100%; height: 100%; max-height: none; flex: 1 1 auto; cursor: default; }
.birdbox.tone-dark { --mark: color-mix(in srgb, var(--plum-dark) 72%, #1d2228); }
.birdbox.tone-light { --mark: color-mix(in srgb, var(--plum-light) 40%, #fff); }
.birdbox.mk-crest { --crest: var(--mark); }
.birdbox[data-growth="chick"]     { --g-s: .6;  --g-head: 1.45; --g-bill: .5;  --g-eye: 1.35; --g-fluff: 1;   --g-tuft: 0;  --g-shine: 1; --g-plump: 1.14; --g-leg: 1.5; }
.birdbox[data-growth="fledgling"] { --g-s: .72; --g-head: 1.26; --g-bill: .7;  --g-eye: 1.2;  --g-fluff: .55; --g-tuft: .45; --g-shine: .8; --g-plump: 1.07; --g-leg: 1.25; }
.birdbox[data-growth="young"]     { --g-s: .86; --g-head: 1.1;  --g-bill: .87; --g-eye: 1.08; --g-fluff: 0;   --g-tuft: .85; --g-shine: .3; --g-leg: 1.08; }
.birdbox[data-growth="old"]       { --g-s: .97; --g-bill: 1.04; --g-eye: .96; --g-tilt: 7deg; --g-old: 1; --g-tuft: 1; --crest: var(--old-white); }
.phone .birdbox .grow { filter: none; }
.phone .birdbox[data-growth="old"] .grow { filter: saturate(.6) brightness(1.06); }
.phone .birdbox .unlock-cape, .phone .birdbox .unlock-crown { display: none; }
.phone .birdbox.has-cape .unlock-cape, .phone .birdbox.has-crown .unlock-crown { display: inline; }
.birdbox.has-goldbill { --bill: #ecc65a !important; --bill-dark: #c99a2e !important; --bill-spot: #b8862a !important; }
/* 0.9.2: a bird on a page shows its OWN markings, not the phone's (a friend on the chat card wore your bird's cap and spots) */
.phone .birdbox .m { display: none !important; }
.phone .birdbox.mk-cap .m-cap, .phone .birdbox.mk-mask .m-mask, .phone .birdbox.mk-cheek .m-cheek,
.phone .birdbox.mk-spots .m-spots, .phone .birdbox.mk-stripes .m-stripes, .phone .birdbox.mk-belly .m-belly,
.phone .birdbox.mk-billtip .m-billtip, .phone .birdbox.mk-billstripe .m-billstripe, .phone .birdbox.mk-billfreckles .m-billfreckles,
.phone .birdbox.mk-tail .m-tail { display: inline !important; }
.birdbox:not(.mk-crest) { --crest: var(--plum-dark); }
.birdbox[data-growth="old"] { --crest: var(--old-white); }
.phone .birdbox[data-phase="egg"] #egg { opacity: 1; }
.phone .birdbox[data-phase="egg"] #bird { opacity: 0; }
.phone .birdbox[data-phase="bird"] #egg { opacity: 0; }
.phone .birdbox[data-phase="bird"] #bird { opacity: 1; }
.phone .birdbox #lid { transform: scaleY(0); }
.phone .birdbox #head { transform: none; }
.birdbox .ground { display: none; }

/* ---------- the bag ---------- */
.bag-sheet .admin-body { padding-top: 6px; }
.hc-card { position: relative; height: 330px; border-radius: 22px; background: var(--surface-solid); overflow: hidden; margin-top: 4px; }
.hc-chart { position: absolute; inset: 14px 0 26px; display: flex; flex-direction: column; }
.hc-line {
  flex: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 0 16px 4px; border-bottom: 2px dashed var(--separator); color: var(--text-3); text-align: left;
}
.hc-line.on { border-bottom-style: solid; border-bottom-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
.hc-line.now { border-bottom-color: var(--accent); }
.hc-line:disabled { cursor: default; }
.hc-line.on:active { background: var(--accent-soft); }
.hc-name { font-size: 15px; font-weight: 600; }
.hc-line.now .hc-name { color: var(--accent); }
.hc-date { font: 600 11px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: var(--text-2); margin-right: 46%; }
.hc-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: var(--fill); }
.hc-shell { position: absolute; right: 6%; bottom: 14px; width: 62px; height: 31px; z-index: 2; pointer-events: none; }
.hc-bird { position: absolute; right: 3%; bottom: 18px; width: 50%; height: 86%; z-index: 1; cursor: pointer; }
.hc-birdbox { position: absolute; inset: 0; }
.hc-bubble {
  position: absolute; top: 0; left: -18%; z-index: 3; padding: 7px 12px; border-radius: 16px;
  background: var(--accent); color: #fff; font-family: var(--round); font-weight: 700; font-size: 16px;
  opacity: 0; scale: .8; transform-origin: 80% 100%; transition: opacity .2s, scale .35s cubic-bezier(.3,1.5,.5,1); pointer-events: none;
}
.hc-bubble.show { opacity: 1; scale: 1; }
.hc-hint { text-align: center; margin: 10px 4px 2px; }

.favs { list-style: none; margin: 0; padding: 4px 0; }
.favs li { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 12px; padding: 8px 16px; position: relative; }
.favs li + li::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: .5px; background: var(--separator); }
.favs .rank { font-family: var(--round); font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.favs li:first-child .rank { color: var(--accent); }
.fav-w { font-size: 17px; font-weight: 600; color: var(--text); }
.fav-w::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 2px; }
.fav-bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.fav-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.favs li.empty { display: block; color: var(--text-2); font-size: 15px; }

/* ---------- home movies: a 90s camcorder recreation with the real date ---------- */
.movie {
  position: absolute; inset: 0; z-index: 45; background: #0b0b0c; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 14px;
  opacity: 0; transition: opacity .4s ease;
}
.movie.show { opacity: 1; }
.mv-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #2a2620; }
.mv-film {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  background: #e8dcc4; filter: sepia(.28) saturate(.85) contrast(1.06) brightness(.98) blur(.35px);
  animation: mv-weave 5s steps(40) infinite;
}
@media (prefers-color-scheme: dark) { .mv-film { background: #d9ccb2; } }
.mv-film::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 13%; background: rgba(90, 70, 40, .16); }
.mv-birdbox { position: absolute; left: 8%; right: 8%; top: 18%; bottom: 4%; z-index: 1; }
.mv-bubble { top: 6% !important; z-index: 2; font-size: 18px !important; padding: 9px 15px !important; max-width: 80% !important;
  background: rgba(255,255,255,.92) !important; color: #1d1d1f !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
.mv-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(20, 12, 4, .55) 100%); }
.mv-grain { position: absolute; inset: -40%; pointer-events: none; opacity: .2; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: mv-grain .5s steps(5) infinite; }
.mv-lines { position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.6) 0 1px, transparent 1px 3px); }
.mv-osd { position: absolute; inset: 12px 14px; pointer-events: none; z-index: 3;
  font: 700 15px/1.15 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; color: #fff;
  text-shadow: 1.5px 1.5px 0 rgba(0,0,0,.55); }
.mv-play { position: absolute; left: 0; top: 0; }
.mv-sp { position: absolute; right: 0; top: 0; }
.mv-stamp { position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-end; color: #ffd76a; }
.movie:not(.stopped) .mv-play { animation: mv-blink 1.6s steps(2) infinite; }
.mv-caption { font-size: 15px; color: rgba(255,255,255,.7); text-align: center; }
.mv-caption b { color: #fff; }
.mv-actions { display: flex; gap: 10px; }
.mv-btn { height: 46px; padding: 0 22px; border-radius: 23px; background: rgba(255,255,255,.14); color: #fff; font-weight: 600; font-size: 16px; }
.mv-btn.strong { background: #fff; color: #000; }
@keyframes mv-grain { 0% { translate: 0 0; } 20% { translate: -6% 4%; } 40% { translate: 5% -3%; } 60% { translate: -3% -6%; } 80% { translate: 6% 5%; } }
@keyframes mv-weave { 0%, 100% { translate: 0 0; } 25% { translate: .6px -.4px; } 50% { translate: -.4px .5px; } 75% { translate: .3px .3px; } }
@keyframes mv-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mv-film, .mv-grain, .movie .mv-play { animation: none !important; } }

/* ---------- the baby book ---------- */
.book-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.book-pages { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.book-pages::-webkit-scrollbar { display: none; }
.book-page { flex: 0 0 100%; scroll-snap-align: center; padding: 6px 20px 8px; display: flex; }
.bp-paper {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 26px 22px; border-radius: 26px; background: var(--paper); color: var(--text);
  box-shadow: 0 0 0 1px var(--paper-line) inset;
}
.bp-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.bp-title { font-family: var(--round); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.bp-big { font-family: var(--round); font-size: 52px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); margin: 10px 0 6px; line-height: 1.05; overflow-wrap: anywhere; }
.bp-lines { width: 100%; margin: 14px 0 0; text-align: left; }
.bp-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--paper-line); }
.bp-lines div:last-child { border-bottom: 1px solid var(--paper-line); }
.bp-lines dt { font-weight: 600; }
.bp-lines dd { margin: 0; color: var(--text-2); text-align: right; text-transform: capitalize; }
.bp-foot { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.book-cover-bird { width: 170px; height: 170px; margin-bottom: 10px; border-radius: 50%; background: var(--accent-soft); overflow: hidden; }
.book-birdbox { width: 100%; height: 100%; padding-top: 6px; }
.book-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 0 12px; }
.book-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); opacity: .5; transition: opacity .2s, background .2s; }
.book-dots i.on { background: var(--accent); opacity: 1; }
.book-share { margin: 0 20px; width: auto; }
.book-sheet { display: flex; flex-direction: column; }

/* ---------- the read-only viewer (opened from /hatch) ---------- */
.view-banner {
  position: relative; z-index: 20; flex: none; margin: 8px 12px 0; padding: 9px 16px; border-radius: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg-top); font-size: 14px;
}
.view-banner a { color: var(--bg-top); font-weight: 600; text-decoration: none; padding: 2px 0 2px 10px; }
.phone.viewing .top { padding-top: 10px; }
.hc-bird, .hc-bird .stage-svg { pointer-events: none; }
.hc-bird #bird { pointer-events: visiblePainted; }
.book-share { display: flex; align-items: center; justify-content: center; gap: 8px; }
.book-share svg { width: 20px; height: 20px; flex: none; }
.bp-lines dd { text-transform: none; }
.mv-film { filter: sepia(.22) saturate(.9) contrast(1.12) brightness(.96) blur(.35px); }
.mv-grain { opacity: .12; }
.hc-bird { bottom: 10px; }
.book-cover-bird { flex: none; aspect-ratio: 1; }
.card .btn.secondary { margin-top: 10px; }
.fr-bird.full img, .card .fr-hero.cut.full img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }

/* 0.6.1: shown only if the app fails to start */
.oops { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90; padding: 20px; border-radius: 28px; background: var(--surface-solid); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.oops strong { display: block; font-size: 19px; margin-bottom: 4px; }
.oops p { margin: 0 0 14px; color: var(--text-2); }
.oops .btn { width: 100%; background: var(--accent); color: #fff; }
.oops code { display: block; margin-top: 12px; font-size: 11px; color: var(--text-3); white-space: pre-wrap; text-align: left; user-select: text; -webkit-user-select: text; }

/* ---------------- 0.6.2: What's new ---------------- */
.wn { text-align: left; }
.card .wn .eyebrow { text-align: left; }
.card .wn-title { margin: 0 0 18px; }
.wn-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 16px; --wn-cut: var(--surface-solid); }
.wn-item { display: flex; align-items: flex-start; gap: 14px; }
.wn-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; --wn-cut: var(--accent); }
.wn-ic svg { width: 22px; height: 22px; }
.wn-text { display: grid; gap: 2px; font-size: 15px; line-height: 1.35; color: var(--text-2); padding-top: 1px; }
.wn-text b { font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.card .wn .btn.plain { margin-top: 2px; }
.wn-feed { margin: 0; padding: 14px 16px; }
.wn-feed-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wn-feed-label span:last-child { text-transform: none; letter-spacing: 0; }

.card .wn-list { max-height: 52vh; overflow-y: auto; }

/* =================== 0.8.0 · Fishing Update =================== */

/* ---------- the treat jar moved up beside SiriBird Online; the map took its place in the dock ---------- */
.top-right .top-jar { position: relative; right: auto; bottom: auto; z-index: auto; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--well); box-shadow: 0 0 0 1px var(--bezel) inset; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-right .top-jar[hidden] { display: none; }
.top-right .top-jar svg { width: 26px; height: 30px; filter: none; }
.top-right .top-jar .jar-count { top: -4px; right: -4px; min-width: 20px; height: 20px; line-height: 20px; font-size: 12px; box-shadow: 0 0 0 2px var(--bg-top); }
.top-right .top-jar.empty .jar-count { display: none; }
.top-right .top-jar .jar-plus { top: auto; bottom: -18px; }
.dock .map { color: var(--accent); }
.dock .map[hidden], .dock .bag[hidden] { display: none; }
.dock .map svg { width: 24px; height: 24px; }

/* ---------- full screens (the map and the lake) ---------- */
.screen { position: absolute; inset: 0; z-index: 31; overflow: hidden; visibility: hidden; opacity: 0;
  transition: opacity .35s ease, visibility 0s linear .35s; touch-action: none; }
.screen.show { visibility: visible; opacity: 1; transition: opacity .35s ease, visibility 0s; }
.phone:has(.screen.show) .scrim { z-index: 33; }
.phone:has(.screen.show) .card { z-index: 34; }
.phone:has(.screen.show) .toast { z-index: 40; }
.scr-top { position: absolute; left: 18px; right: 18px; top: calc(16px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; z-index: 3; pointer-events: none; }
.scr-top > * { pointer-events: auto; }
.scr-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); color: var(--text); box-shadow: 0 0 0 1px var(--bezel); transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.scr-x:active { transform: scale(.9); }
.scr-x svg { width: 20px; height: 20px; }
.scr-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.scr-sp { width: 44px; }

/* the map */
.mc-grab { display: none; }
/* 0.11.8: the soft map (softmap.js). Soft islands on the app's own background, a floating card, drag to scroll. */
.map-screen { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%); }
.map-glow { position: absolute; inset: -20%; pointer-events: none; filter: blur(20px);
  background: radial-gradient(40% 30% at 30% 30%, var(--accent-soft), transparent 70%), radial-gradient(45% 30% at 75% 75%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.map-view { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.map-view.drag { cursor: grabbing; }
.sm-world { position: absolute; left: 0; top: 0; will-change: transform; }
.sm-world.birdbox { display: block; position: absolute; align-items: initial; justify-content: initial; }
.sm-pl { position: absolute; left: 0; top: 0; will-change: transform; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.sm-pl:focus-visible .blob { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 4 4; }
.sm-pl svg { display: block; overflow: visible; }
.sm-pl .blob { stroke: transparent; stroke-width: 0; transition: stroke .3s, stroke-width .3s; }
.sm-pl.on .blob { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: none; }
.sm-lbl { position: absolute; left: 50%; translate: -50% 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; letter-spacing: -0.01em; transition: color .3s; pointer-events: none; }
.sm-pl.on .sm-lbl { color: var(--accent); }
.sm-in { transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.sm-pl:active .sm-in { transform: scale(.96); }
.sm-world.birdbox svg.stage-svg.sm-bird { width: 30px; height: 37px; max-height: none; flex: none; cursor: inherit; overflow: visible; }
@keyframes sm-sh { 0%,100% { opacity: .2; } 50% { opacity: .8; } }
@keyframes sm-rip { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes sm-swim { 0%,100% { transform: translateX(-5px); } 50% { transform: translateX(6px); } }
@keyframes sm-hat { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(1.5px) rotate(4deg); } }
.sm-pl .shim { animation: sm-sh 3s ease-in-out infinite; }
.sm-pl .rip2 { animation: sm-rip 2.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.sm-pl .swim { animation: sm-swim 6s ease-in-out infinite; }
.sm-pl .hatbob { animation: sm-hat 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.map-screen:not(.show) .sm-pl * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .sm-pl * { animation: none !important; } }
.map-card { position: absolute; left: 14px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3; max-width: 460px; margin: 0 auto;
  background: var(--surface-solid); border-radius: 30px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.07), 0 0 0 1px var(--bezel); }
.mc-body { transition: opacity .15s; }
.map-card.swap .mc-body { opacity: 0; }
.mc-row { display: flex; align-items: center; gap: 14px; }
.mc-badge { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mc-badge.lock { background: var(--fill); color: #8e8e93; }
.mc-badge svg { width: 24px; height: 24px; }
.mc-text { min-width: 0; }
.mc-text b { display: block; font-family: var(--round); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.mc-text span { display: block; font-size: 14px; color: var(--text-2); margin-top: 1px; }
.mc-go { display: block; width: 100%; height: 52px; margin-top: 14px; border-radius: 26px; background: var(--accent); color: #fff; font-weight: 600; font-size: 17px; transition: transform .2s, opacity .2s; }
.mc-go[hidden] { display: none; }
.mc-go:active { transform: scale(.97); }
.mc-go:disabled { opacity: .35; }

/* the lake */
.lake-screen { background: #f4f7f4; }
@media (prefers-color-scheme: dark) { .lake-screen { background: #14181b; } }
.lake-c { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.lake-bird { position: absolute; inset: 0; pointer-events: none; z-index: 1; display: block; }
.lake-bird .lake-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.lake-bird #lid { display: none; }
.lake-wet { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(200, 220, 228, .5); pointer-events: none; z-index: 1; }
@media (prefers-color-scheme: dark) { .lake-wet { background: rgba(28, 54, 66, .55); } }
.lake-pill { height: 44px; padding: 0 16px; border-radius: 22px; background: var(--surface-solid); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; box-shadow: 0 0 0 1px var(--bezel); font-variant-numeric: tabular-nums; }
.lake-pill svg { width: 22px; height: 13px; color: var(--accent); }
.lake-title { position: absolute; left: 16px; right: 16px; top: calc(76px + env(safe-area-inset-top)); text-align: center; font-weight: 700; font-size: 26px; letter-spacing: -0.01em; z-index: 2; pointer-events: none; }
.lake-chips { position: absolute; left: 14px; right: 14px; top: calc(146px + env(safe-area-inset-top)); /* 0.9.2 (Tyler): the words moved to the top, so big fish at the bottom stay in view */ display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; z-index: 2; pointer-events: none; }
.lake-chip { height: 34px; padding: 0 13px; border-radius: 17px; background: var(--surface-solid); font-weight: 600; font-size: 15px; display: flex; align-items: center; animation: chip-in .45s cubic-bezier(.3,1.4,.5,1); }
.lake-chip.ok { background: var(--accent); color: #fff; }
.lake-chip.out { opacity: 0; scale: .9; transition: opacity .4s ease, scale .4s ease; } /* 0.13.5: fades after a few seconds */
.lake-chip.bock { color: var(--text-2); }
@keyframes chip-in { from { opacity: 0; scale: .7; } }
.lake-hint { position: absolute; left: 16px; right: 16px; top: calc(114px + env(safe-area-inset-top)); text-align: center; font-weight: 500; font-size: 15px; color: #2f4a55; z-index: 2; pointer-events: none; }
.lake-hint b { color: var(--text); font-weight: 700; }
@media (prefers-color-scheme: dark) { .lake-hint { color: #a9c3cc; } }
.lake-done { position: absolute; left: 50%; translate: -50% 0; bottom: calc(176px + env(safe-area-inset-bottom)); z-index: 3; height: 50px; padding: 0 26px; border-radius: 25px; background: var(--accent); color: #fff; font-weight: 600; font-size: 17px; animation: chip-in .45s cubic-bezier(.3,1.4,.5,1); }
.lake-done[hidden] { display: none; }

/* ---------- tapping the glass ---------- */
.glass-ring { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--text) 35%, transparent); pointer-events: none; z-index: 5; animation: glass-ring .9s ease-out forwards; }
@keyframes glass-ring { from { opacity: .9; scale: .3; } to { opacity: 0; scale: 2.6; } }

/* ---------- the speech bubble can be tapped (keep or share it) ---------- */
.stage > .bubble.show { pointer-events: auto; cursor: pointer; }
.phone.outing .stage > .bubble { pointer-events: none; }
.bubble.real { box-shadow: var(--material-shadow), 0 0 0 2px var(--accent); transition: box-shadow .4s, opacity .25s, scale .35s cubic-bezier(.3,1.4,.5,1); }
.card .q-you { font-size: 16px; color: var(--text-2); margin: 0 0 12px; }
.card .q-bubble { display: inline-block; max-width: 100%; padding: 14px 20px; border-radius: 24px; background: var(--fill); font-family: var(--round); font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--text); margin: 0 0 14px; }
.card .q-date { margin: 0 0 18px; }

/* ---------- letters ---------- */
.card .letter-note { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--fill); border-radius: 16px; padding: 10px 14px; font-size: 15px; }
.card .letter-note .lt-feather { width: 14px; height: 38px; flex: none; rotate: 18deg; }
.letter-paper { position: relative; margin: 18px 6px 10px; padding: 34px 26px 28px; background: var(--paper);
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-line) 31px 32px); background-position: 0 22px;
  border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06); color: #2b2620; font-family: var(--round); font-size: 19px; line-height: 32px; }
@media (prefers-color-scheme: dark) { .letter-paper { color: #efe6d3; } }
.letter-paper p { margin: 0; }
.letter-paper .lp-dear { font-weight: 700; }
.letter-paper .lp-line { padding-left: 1em; }
.letter-paper .lp-sign { text-align: right; margin-top: 8px; font-weight: 700; }
.letter-paper .lp-date { position: absolute; left: 26px; top: 8px; font-family: Inter, system-ui, sans-serif; font-size: 12px; line-height: 1; color: #8a7a5c; letter-spacing: .04em; text-transform: uppercase; }
/* the feather, taped on and hanging off the edge */
.lp-feather { position: absolute; right: -10px; top: -14px; width: 30px; height: 78px; rotate: 24deg; z-index: 1; }
.lp-feather .lt-feather { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.lp-tape { position: absolute; right: 6px; top: 6px; width: 54px; height: 20px; rotate: -18deg; z-index: 2; border-radius: 2px;
  background: rgba(255, 255, 255, .45); box-shadow: 0 0 0 .5px rgba(0,0,0,.08); backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); }
@media (prefers-color-scheme: dark) { .lp-tape { background: rgba(255, 255, 255, .22); } }

/* bag pages: quote book, letters, fishing memories */
.bag-page .admin-body { padding-bottom: 40px; }
.quote { display: block; width: 100%; text-align: left; padding: 12px 16px; position: relative; }
.quote + .quote::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--separator); }
.quote .qt { font-family: var(--round); font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--text); }
.quote .qm { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.quote.real .qm b { color: var(--accent); font-weight: 600; }
.fish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.fish-stats div { background: var(--surface-solid); border-radius: 14px; padding: 12px 8px; text-align: center; }
.fish-stats b { display: block; font-family: var(--round); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fish-stats span { font-size: 12px; color: var(--text-2); }
.catch { display: flex; align-items: center; gap: 10px; padding: 10px 16px; position: relative; }
.catch + .catch::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--separator); }
.catch .cw { font-weight: 600; }
.catch .cw.bock { color: var(--text-2); font-weight: 500; }
.catch .ct { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.catch .tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft, var(--fill)); color: var(--accent); }

/* ---------- turned sideways: the bird fell over ---------- */
.rotate { grid-template-columns: 1fr 1fr; align-items: center; justify-items: center; text-align: center; padding: 0 5vw; }
.rotate .rot-text { font-size: 19px; }
.rotate .rot-text strong { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.rotate .rot-text span { display: block; }
.rot-art { position: relative; width: min(42vw, 70vh); aspect-ratio: 1; }
.rot-bird { position: absolute; inset: 0; display: block;
  --crest: var(--plum-dark); --belly: color-mix(in srgb, var(--plum-light) 45%, #fff); --old-white: #f3f1ea; --bill-mark: color-mix(in srgb, var(--bill-dark) 70%, #3a3226);
  --g-s: 1; --g-head: 1; --g-bill: 1; --g-eye: 1; --g-tilt: 0deg; --g-fluff: 0; --g-tuft: 1; --g-old: 0; --g-shine: 0; --g-plump: 1; --g-leg: 1; }
.rot-bird .stage-svg { width: 100%; height: 100%; max-height: none; }
.rot-bird[data-growth="chick"]     { --g-s: .6;  --g-head: 1.45; --g-bill: .5;  --g-eye: 1.35; --g-fluff: 1;   --g-tuft: 0;  --g-shine: 1; --g-plump: 1.14; --g-leg: 1.5; }
.rot-bird[data-growth="fledgling"] { --g-s: .72; --g-head: 1.26; --g-bill: .7;  --g-eye: 1.2;  --g-fluff: .55; --g-tuft: .45; --g-shine: .8; --g-plump: 1.07; --g-leg: 1.25; }
.rot-bird[data-growth="young"]     { --g-s: .86; --g-head: 1.1;  --g-bill: .87; --g-eye: 1.08; --g-fluff: 0;   --g-tuft: .85; --g-shine: .3; --g-leg: 1.08; }
.rot-bird[data-growth="old"]       { --g-s: .97; --g-bill: 1.04; --g-eye: .96; --g-tilt: 7deg; --g-old: 1; --g-tuft: 1; --crest: var(--old-white); }
.rot-bird[data-growth="old"] .grow { filter: saturate(.6) brightness(1.06); }
.rot-bird.tone-dark { --mark: color-mix(in srgb, var(--plum-dark) 72%, #1d2228); }
.rot-bird.tone-light { --mark: color-mix(in srgb, var(--plum-light) 40%, #fff); }
.rot-bird.mk-crest { --crest: var(--mark); }
.rot-bird.mk-cap .m-cap, .rot-bird.mk-mask .m-mask, .rot-bird.mk-cheek .m-cheek, .rot-bird.mk-spots .m-spots, .rot-bird.mk-stripes .m-stripes, .rot-bird.mk-belly .m-belly,
.rot-bird.mk-billtip .m-billtip, .rot-bird.mk-billstripe .m-billstripe, .rot-bird.mk-billfreckles .m-billfreckles, .rot-bird.mk-tail .m-tail,
.rot-bird.has-cape .unlock-cape, .rot-bird.has-crown .unlock-crown { display: inline; }
.rot-bird.has-goldbill { --bill: #ecc65a !important; --bill-dark: #c99a2e !important; --bill-spot: #b8862a !important; }
.rot-bird .ground { display: none; }
.rot-bird[data-phase="egg"] #bird { opacity: 0; }
.rot-bird[data-phase="bird"] #egg { opacity: 0; }
/* 0.8.1 (Tyler): whichever way the phone turned, it tips forward toward its bill and lands on it: bill tip and
   both feet on the floor, tail up, stars circling its head. The egg still rolls onto its side. */
.rot-bird[data-phase="bird"] .ground { display: inline; }
.rot-bird[data-phase="bird"] svg { overflow: visible; }
.rot-bird[data-phase="bird"] #bird { transform-origin: 188px 384px; transform: rotate(-56deg); }
.rot-bird[data-phase="bird"] #head { transition: none; transform: rotate(-22deg); }
.rot-bird[data-phase="bird"] .legs { transform-origin: 190px 312px; transform: translateY(-43.7px) rotate(56deg); }
.rot-bird[data-phase="bird"] .ground { transform-box: view-box; transform-origin: 165px 384px; transform: translateX(-95px) scaleX(1.39); }
.rotate.fall .rot-bird[data-phase="bird"] #bird { animation: rot-tip 1.15s both; }
.rotate.fall .rot-bird[data-phase="bird"] #head { animation: rot-nod 1.15s both; }
.rotate.fall .rot-bird[data-phase="bird"] .legs { animation: rot-legs 1.15s both; }
.rotate.fall .rot-bird[data-phase="bird"] .ground { animation: rot-ground 1.15s both; }
/* a little wobble back, then over it goes (gravity), a bump on the bill, and it settles */
@keyframes rot-tip {
  0% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  18% { transform: rotate(5deg); animation-timing-function: cubic-bezier(.55,0,.9,.45); }
  62% { transform: rotate(-60deg); animation-timing-function: ease-out; }
  76% { transform: rotate(-51deg); animation-timing-function: ease-in-out; }
  88% { transform: rotate(-57.5deg); animation-timing-function: ease-in-out; }
  100% { transform: rotate(-56deg); } }
@keyframes rot-nod {
  0%, 18% { transform: rotate(0deg); animation-timing-function: ease-in; }
  62% { transform: rotate(-24deg); animation-timing-function: ease-out; }
  78% { transform: rotate(-18deg); }
  100% { transform: rotate(-22deg); } }
@keyframes rot-legs {
  0% { transform: translateY(0) rotate(0deg); animation-timing-function: ease-in-out; }
  18% { transform: translateY(3.9px) rotate(-5deg); animation-timing-function: cubic-bezier(.55,0,.9,.45); }
  62% { transform: translateY(-46.8px) rotate(60deg); animation-timing-function: ease-out; }
  76% { transform: translateY(-39.8px) rotate(51deg); animation-timing-function: ease-in-out; }
  88% { transform: translateY(-44.9px) rotate(57.5deg); }
  100% { transform: translateY(-43.7px) rotate(56deg); } }
@keyframes rot-ground { 0%, 18% { transform: translateX(0) scaleX(1); } 62%, 100% { transform: translateX(-95px) scaleX(1.39); } }
.rot-bird[data-phase="egg"] { --fall: -90deg; rotate: var(--fall); transform-origin: 50% 50%; }
.rotate.fall .rot-bird[data-phase="egg"] { animation: rot-roll 2.6s ease-in-out .3s infinite; }
@keyframes rot-roll { 0%, 100% { rotate: var(--fall); } 30% { rotate: calc(var(--fall) + 9deg); } 60% { rotate: calc(var(--fall) - 6deg); } }
.rot-stars { position: absolute; top: 30%; width: 30%; height: 18%; left: -9%; pointer-events: none; opacity: 0; }
.rotate.fall .rot-stars { animation: rot-stars-in .35s ease 1s forwards; }
.rot-stars i { position: absolute; left: 50%; top: 50%; font-style: normal; color: var(--accent); font-size: clamp(14px, 3vw, 24px); animation: rot-orbit 1.6s linear infinite; }
.rot-stars i:nth-child(2) { animation-delay: -.53s; font-size: clamp(11px, 2.2vw, 18px); }
.rot-stars i:nth-child(3) { animation-delay: -1.06s; }
@keyframes rot-stars-in { to { opacity: 1; } }
@keyframes rot-orbit { from { transform: translate(-50%, -50%) rotate(0deg) translateX(110%) rotate(0deg) scaleY(1); } to { transform: translate(-50%, -50%) rotate(360deg) translateX(110%) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rotate.fall .rot-bird, .rotate.fall .rot-bird * { animation: none !important; }
  .rotate.fall .rot-stars { animation: none; opacity: 1; }
  .rot-stars i { animation: none; }
  .screen { transition-duration: .01s; }
}

/* ---------- 0.8.1: friends' birds drawn live (tiles and cards), from the look and growth The Server keeps ---------- */
.fr-live.tone-dark { --mark: color-mix(in srgb, var(--plum-dark) 72%, #1d2228); }
.fr-live.tone-light { --mark: color-mix(in srgb, var(--plum-light) 40%, #fff); }
.fr-live.mk-crest { --crest: var(--mark); }
.fr-live:not(.mk-crest) { --crest: var(--plum-dark); }
.fr-live[data-growth="old"] { --crest: var(--old-white); }
.fr-live .m, .fr-live .unlock-cape, .fr-live .unlock-crown, .fr-live .ground { display: none !important; }
.fr-live.mk-cap .m-cap, .fr-live.mk-mask .m-mask, .fr-live.mk-cheek .m-cheek,
.fr-live.mk-spots .m-spots, .fr-live.mk-stripes .m-stripes, .fr-live.mk-belly .m-belly,
.fr-live.mk-billtip .m-billtip, .fr-live.mk-billstripe .m-billstripe, .fr-live.mk-billfreckles .m-billfreckles,
.fr-live.mk-tail .m-tail, .fr-live.has-cape .unlock-cape, .fr-live.has-crown .unlock-crown { display: inline !important; }
.fr-live.has-goldbill { --bill: #ecc65a !important; --bill-dark: #c99a2e !important; --bill-spot: #b8862a !important; }
.fr-live #egg { opacity: 0 !important; }
.fr-live #bird { opacity: 1 !important; }
.fr-bird.live, .fr-hero.live { position: relative; }
.fr-bird.live .fr-live, .card .fr-hero.live .fr-live { position: absolute; inset: 6% 4% 0; width: auto; height: auto; }
.fr-live .stage-svg { width: 100%; height: 100%; }

/* ---------- 0.8.1: the envelope peeking up from behind the dock ---------- */
.talk { position: relative; }
.dock { position: relative; z-index: 2; }
.mail-peek { position: absolute; z-index: 1; left: calc(50% + 112px); bottom: calc(18px + env(safe-area-inset-bottom, 0px) + 72px);
  width: 64px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translateY(70%) rotate(0deg); opacity: 0; transition: transform .6s cubic-bezier(.3,1.5,.5,1), opacity .25s; }
.mail-peek.up { transform: translateY(0) rotate(8deg); opacity: 1; animation: mail-wiggle 5s ease-in-out 1.2s infinite; }
.mail-peek:active { transform: translateY(-4px) rotate(8deg) scale(.94); }
/* room for it: the prompt steps up a little while the envelope is out */
.prompt { transition: margin .45s cubic-bezier(.3,1.2,.5,1); }
.talk.has-mail .prompt { margin-bottom: 30px; }
.mail-peek svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mail-peek .mp-body { fill: var(--paper); stroke: color-mix(in srgb, var(--text) 14%, transparent); stroke-width: 1.5; }
.mail-peek .mp-flap { fill: none; stroke: color-mix(in srgb, var(--text) 22%, transparent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mail-peek .mp-seal { fill: var(--accent); }
.mail-peek .mp-heart { fill: #fff; }
.mail-count { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; box-sizing: border-box;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.mail-count:empty { display: none; }
@keyframes mail-wiggle { 0%, 84%, 100% { rotate: 0deg; translate: 0 0; } 88% { rotate: -5deg; translate: 0 -5px; } 92% { rotate: 4deg; translate: 0 -3px; } 96% { rotate: -2deg; translate: 0 0; } }
.phone.reading .mail-peek, .phone.outing .mail-peek { opacity: 0; pointer-events: none; }
@media (prefers-color-scheme: dark) { .mail-peek .mp-body { stroke: rgba(0,0,0,.3); } }

/* ---------- 0.8.1: reading a letter to the bird ---------- */
.reader { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px); }
.reader > * { pointer-events: auto; }
.reader-paper.letter-paper { margin: 0 4px; max-height: 46vh; overflow: auto; padding-top: 26px; font-size: 20px; scroll-padding: 40px;
  transform: translateY(-24px) scale(.96); opacity: 0; transition: transform .5s cubic-bezier(.3,1.3,.5,1), opacity .3s; }
.reader.show .reader-paper { transform: none; opacity: 1; }
.reader .lp-feather { right: 2px; top: -6px; }
.reader .lp-tape { right: 14px; top: 4px; }
.rw { border-radius: 6px; padding: 0 2px; margin: 0 -2px; transition: color .2s, background-color .2s; }
.rw.now { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.rw.ok { color: #1f9d4b; }
.rw.miss { color: #e5372c; text-decoration: line-through; text-decoration-color: color-mix(in srgb, #e5372c 45%, transparent); text-decoration-thickness: 2px; }
@media (prefers-color-scheme: dark) { .rw.ok { color: #4cd471; } .rw.miss { color: #ff6b61; } }
.reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 30px;
  background: var(--material); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--material-shadow), 0 0 0 .5px var(--material-edge);
  transform: translateY(30px); opacity: 0; transition: transform .5s cubic-bezier(.3,1.3,.5,1) .05s, opacity .3s .05s; }
.reader.show .reader-bar { transform: none; opacity: 1; }
.reader-status { font-size: 15px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; min-width: 0; }
.reader.hearing .reader-status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #e5372c; animation: rec-dot 1.2s ease-in-out infinite; }
.reader.scored .reader-status { color: var(--text); font-size: 17px; }
@keyframes rec-dot { 50% { opacity: .35; } }
.reader-actions { display: flex; gap: 8px; flex: none; }
.reader .pill-btn { height: 40px; border-radius: 20px; padding: 0 16px; font-size: 15px; }
.reader [data-done] { background: var(--accent); color: #fff; }
.reader .pill-btn.plain { background: transparent; color: var(--text-2); }
.reader.scored .reader-actions { visibility: hidden; }
.phone.reading .dock, .phone.reading .heard, .phone.reading .prompt { opacity: 0; pointer-events: none; transition: opacity .3s; }
.phone.reading .stage > .stage-svg { transform: translateY(16%) scale(.74); }
.phone.reading .top-right, .phone.reading .lvl { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ---------- 0.8.1: Letters, redone ---------- */
.letters-head { padding: 4px 6px 4px; }
.letters-head .lh-count { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.letters-head .lh-sub { display: block; margin-top: 4px; font-size: 15px; color: var(--text-2); line-height: 1.35; }
.letter-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.letter-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-radius: 18px;
  background: var(--surface-solid); color: var(--text); font: inherit; cursor: pointer; transition: transform .15s; }
.letter-row:active { transform: scale(.98); }
.lt-env { position: relative; flex: none; width: 52px; height: 38px; }
.lt-env svg { width: 100%; height: 100%; display: block; }
.lt-env .le-body { fill: var(--env, #8d9aa9); }
.lt-env .le-flap { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.lt-env .le-feather { position: absolute; right: -6px; top: -12px; width: 13px; height: 34px; rotate: 22deg; }
.lt-env .le-feather .lt-feather { width: 100%; height: 100%; filter: brightness(1.18); }
.lr-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.lr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lr-from { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-date { flex: none; font-size: 13px; color: var(--text-3, var(--text-2)); }
.lr-preview { font-family: var(--round); font-size: 15px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-sub { font-size: 13px; color: var(--text-3, var(--text-2)); }
.lr-sub.done { color: var(--accent); font-weight: 600; }
.letter-row.unread .lr-from::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: 2px; }
.letters-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px; text-align: center; color: var(--text-2); }
.letters-empty .lt-env { width: 72px; height: 52px; opacity: .6; }
.letter-wrap.first .letter-paper { animation: letter-out .7s cubic-bezier(.3,1.25,.5,1) both; }
@keyframes letter-out { from { transform: translateY(26px) rotate(-1.5deg) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.read-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 6px 0; width: calc(100% - 12px); }
.read-btn svg { width: 20px; height: 20px; }
.read-hint { margin: 10px 14px 0; text-align: center; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.lp-note { text-align: center; }

/* ================= 0.9.0 ================= */

/* the dock: Stats moved to the ⋯ menu; the strap of the bag in the bird's color too */
.dock .bag { --bag-strap: color-mix(in srgb, var(--accent) 60%, var(--text-2)); position: relative; }

.dock .bag .jar-plus { left: 50%; }

/* ---------- the ⋯ button and menu ---------- */
.top-right .menu-btn { order: 9; }
.menu-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--well); color: var(--accent); box-shadow: 0 0 0 1px var(--bezel) inset; transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.menu-btn svg { width: 22px; height: 22px; fill: currentColor; }
.menu-btn:active { transform: scale(.9); }
.menu-btn[hidden] { display: none; }
.menu-layer { position: absolute; inset: 0; z-index: 32; pointer-events: none; visibility: hidden; overflow: hidden; border-radius: inherit; }
.menu-layer.show { visibility: visible; pointer-events: auto; }
.mn-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; }
.mn-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 70%; box-sizing: border-box;
  padding: calc(84px + env(safe-area-inset-top)) 26px calc(26px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; background: var(--surface-solid);
  border-radius: 28px 0 0 28px; box-shadow: -10px 0 40px rgba(0,0,0,.12);
  transform: translate3d(110%,0,0); will-change: transform; touch-action: pan-y;
}
.mn-eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.mn-word { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 0; text-align: left;
  font-family: var(--round); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); border-bottom: 1px solid var(--separator); }
.mn-word:active { opacity: .55; }
.mn-sub { font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.mn-sub[data-state="saved"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34c759; margin-right: 6px; vertical-align: 1px; }
.mn-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--separator); }
.mn-row .mn-sw-label { border: 0; width: auto; font-variant-ligatures: none; }
.mn-switch { flex: none; position: relative; width: 58px; height: 34px; border-radius: 17px; background: var(--fill); transition: background .25s; }
.mn-switch i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: translate .32s cubic-bezier(.3,1.4,.5,1); }
.mn-switch[aria-checked="true"] { background: var(--accent); }
.mn-switch[aria-checked="true"] i { translate: 24px 0; }
.mn-note { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.mn-foot { margin-top: auto; }
.mn-version { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); padding: 6px 0; }
.mn-version svg { width: 7px; height: 11px; }
.mn-peek { position: absolute; pointer-events: none; will-change: transform; }
.mn-peek svg { width: 100%; height: 100%; display: block; overflow: visible; }
.phone.menu-open .bubble:not(.peek-bubble) { opacity: 0; transition: opacity .2s; }
/* 0.9.2: the real bird peeks, and its bubble sits above its head, over the menu */
.menu-layer .bubble.peek-bubble { top: auto; right: auto; margin: 0; z-index: 3; transform-origin: 15% 100%; font-size: 19px; padding: 10px 15px; }

/* ---------- the bag: it looks like a bag ---------- */
.bag-sheet { --bag: var(--accent); --bag-dark: color-mix(in srgb, var(--accent) 78%, #000); --lining: color-mix(in srgb, var(--accent) 7%, #f6f1e7); background: var(--lining); }
@media (prefers-color-scheme: dark) { .bag-sheet { --lining: color-mix(in srgb, var(--accent) 10%, #1d1b18); } }
.bag-sheet::before { background: rgba(255,255,255,.55); position: relative; z-index: 2; }
.bag-flap { position: relative; margin: -11px 0 0; padding: 11px 0 26px; background: var(--bag); border-radius: 0 0 34px 34px; color: #fff; }
.bag-flap::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; top: 4px; border: 2px dashed rgba(255,255,255,.35); border-top: 0; border-radius: 0 0 26px 26px; pointer-events: none; }
.bag-flap .admin-head h2 { color: #fff; }
.bag-flap .online-title span { color: rgba(255,255,255,.75); }
.bag-flap .admin-head .done { color: #fff; position: relative; z-index: 1; }
.bag-clasp { position: absolute; left: 50%; bottom: -13px; translate: -50% 0; width: 34px; height: 26px; border-radius: 8px; background: var(--bag-dark); box-shadow: 0 0 0 3px var(--lining); }
.bag-clasp::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 10px; height: 10px; border-radius: 3px; background: #fff; }
.bag-sheet .admin-body { padding-top: 30px; }
.bag-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 10px; padding: 4px 2px 10px; }
.bag-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 18px; text-align: center; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.bag-item:active { transform: scale(.92); }
.bag-obj { position: relative; width: 84px; height: 76px; display: grid; place-items: center; }
.bag-obj svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 0 rgba(0,0,0,.08)); }
.bag-item:nth-child(1) .bag-obj { rotate: -5deg; }
.bag-item:nth-child(2) .bag-obj { rotate: 4deg; }
.bag-item:nth-child(3) .bag-obj { rotate: -2deg; }
.bag-item:nth-child(4) .bag-obj { rotate: 7deg; }
.bag-item:nth-child(5) .bag-obj { rotate: -6deg; }
.bag-item:nth-child(6) .bag-obj { rotate: 3deg; }

.bag-badge { position: absolute; top: 2px; right: 4px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px; background: var(--badge); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; box-shadow: 0 0 0 2px var(--lining); rotate: 0deg; }
.bag-t { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 4px; }
.bag-s { font-size: 12px; color: var(--text-2); }
.bag-foot { text-align: center; margin-top: 10px; }

/* the height chart: a VHS tape on every line it has reached */
.hc-line { justify-content: flex-start; }
.hc-line .hc-name { min-width: 92px; }
.hc-date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-right: 0; font-size: 10.5px; }
.hc-tape { flex: none; display: inline-block; width: 26px; height: 16px; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.hc-tape svg { width: 100%; height: 100%; display: block; }
.hc-line.on:active .hc-tape { transform: scale(.88) rotate(-4deg); }
.hc-line.now .hc-tape { animation: tape-nudge 3.2s ease-in-out 1s 2; }
@keyframes tape-nudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-8deg); } 86% { transform: rotate(6deg); } 93% { transform: rotate(-2deg); } }
.bag-page .hc-card { margin-top: 6px; }

/* ---------- Share this chat (play dates) ---------- */
.chat-sheet .admin-body { flex: 1; padding-bottom: 20px; }
.cp-lines { display: flex; flex-direction: column; gap: 8px; padding: 8px 2px 10px; }
.cp-line { position: relative; max-width: 76%; padding: 5px 14px 6px; border-radius: 22px; text-align: left; font-family: var(--round); font-size: 18px; font-weight: 700; line-height: 1.12;
  color: var(--text-3); background: var(--surface-solid); box-shadow: 0 0 0 1.5px var(--separator) inset; transition: background .2s, color .2s, transform .25s cubic-bezier(.3,1.4,.5,1); }
.cp-line::after { content: ""; position: absolute; bottom: -7px; width: 18px; height: 10px; background: inherit; clip-path: polygon(0 0, 100% 0, 30% 100%); }
.cp-line.left { align-self: flex-start; }
.cp-line.left::after { left: 22px; }
.cp-line.right { align-self: flex-end; }
.cp-line.right::after { right: 22px; clip-path: polygon(0 0, 100% 0, 70% 100%); }
.cp-line.on { color: #fff; box-shadow: none; }
.cp-line.left.on { background: var(--cp-guest); }
.cp-line.right.on { background: var(--cp-host); }
.cp-line:not(.on) { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.cp-line:active { transform: scale(.96); }
.cp-who { display: block; font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .02em; opacity: .8; margin-bottom: 2px; }
.cp-foot { flex: none; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); background: var(--group); border-top: .5px solid var(--separator); }
.cp-birds { display: flex; justify-content: space-between; height: 120px; margin: 0 8% -6px; }
.cp-bird { position: relative; width: 42%; height: 100%; }
.cp-bird.guest-side { transform: scaleX(-1); }
.cp-bird .ground { display: none; }
.cp-preview { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 16px; margin: 4px 0 14px; box-shadow: 0 0 0 .5px var(--separator); }

/* ---------------- 0.9.1 (Tyler): SiriBird Online at the left of the dock, the talk button in the middle ----------------
   Online, lock + talk, map, bag. Left of the talk button's middle: 10 + 52 + 14 + 92 = 168. Right: 36 + 14 + 52 + 14 + 52 = 168,
   so the talk button sits right in the middle of the screen. */
.dock .online-btn { flex: none; width: 52px; height: 52px; margin-left: 10px; }
.dock .online-orb { width: 52px; height: 52px; background: var(--well); color: var(--accent); box-shadow: 0 0 0 1px var(--bezel) inset; } /* Tyler: like the rest of the dock */
.dock .online-orb svg { width: 30px; height: 30px; }

/* ---------- 0.9.2: friend codes, single or multi-use (Tyler) ---------- */
.segmented.big { border-radius: 12px; padding: 3px; margin: 4px 0 2px; }
.segmented.big button { flex: 1; padding: 9px 6px; border-radius: 9px; font-size: 15px; font-weight: 600; transition: background-color .25s, box-shadow .25s; }
.fl-say { margin: 8px 0 4px; font-size: 14px; color: var(--text-2); min-height: 1.3em; }
.fl-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .42s cubic-bezier(.3,1.1,.4,1), opacity .3s ease; }
.fl-more.open { grid-template-rows: 1fr; opacity: 1; }
.fl-more-in { overflow: hidden; min-height: 0; }
.fl-more .label { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left; }
.fl-time { display: block; width: 100%; margin: 10px 0 2px; height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--fill); color: var(--text); font: inherit; font-size: 16px; }
.fl-time[hidden] { display: none; }
#card .fl-more + .btn { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .fl-more { transition-duration: .01s; } }

/* ---------- 0.9.2: "Stop saying …": a thumbs up over its head when it understands ---------- */
.thumb-pop { position: absolute; left: 50%; top: 30%; z-index: 6; width: 46px; height: 46px; margin: -46px 0 0 -23px; border-radius: 50%;
  background: var(--surface-solid); color: var(--accent); display: grid; place-items: center; pointer-events: none;
  box-shadow: 0 0 0 1px var(--bezel); animation: thumb-pop 2.2s cubic-bezier(.3,1.5,.5,1) forwards; }
.thumb-pop svg { width: 24px; height: 24px; }
@keyframes thumb-pop {
  0% { transform: translateY(10px) scale(.2) rotate(-25deg); opacity: 0; }
  14% { transform: translateY(0) scale(1.12) rotate(6deg); opacity: 1; }
  24% { transform: scale(1) rotate(0); }
  72% { transform: translateY(-6px) scale(1); opacity: 1; }
  100% { transform: translateY(-26px) scale(.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .thumb-pop { animation-duration: 1.6s; animation-timing-function: linear; } }

/* ---------- 0.9.2: the SiriBird Notebook (in the bag) ---------- */
.nb-cover { margin: 2px 4px 14px; padding: 16px 18px; border-radius: 16px; background: #3f7a69; color: #f3ead6; display: flex; flex-direction: column; gap: 2px; }
.nb-cover-title { font-family: var(--round); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.nb-cover-sub { font-size: 14px; font-weight: 500; opacity: .8; }
.nb-pages { display: flex; flex-direction: column; gap: 14px; padding: 0 4px 20px; }
.nb-sheet { position: relative; padding: 16px 18px 18px 26px; border-radius: 6px 14px 14px 6px; background: #fbf6ea; color: #2c2a26;
  box-shadow: inset 4px 0 0 #e3d6b8, 0 1px 0 rgba(0,0,0,.05); }
.nb-sheet h3 { margin: 2px 0 8px; font-family: var(--round); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.nb-sheet p { margin: 0 0 10px; font-size: 16px; line-height: 26px; }
.nb-sheet p:last-of-type { margin-bottom: 0; }
.nb-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #8a7a5c; text-transform: uppercase; letter-spacing: .04em; }
.nb-new { position: absolute; top: -7px; right: 14px; padding: 2px 9px; border-radius: 10px; background: #d9483f; color: #fff; font-size: 12px; font-weight: 700; }
.nb-locked { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--separator); color: var(--text-2); font-size: 15px; }
.nb-locked svg { width: 20px; height: 20px; flex: none; opacity: .7; }
@media (prefers-color-scheme: dark) {
  .nb-sheet { background-color: #2a2822; color: #efe8d8; box-shadow: inset 4px 0 0 #4a4436; }
  .nb-meta { color: #b7a888; }
}

/* ---------- 0.10.0: hats ---------- */
.head.has-hat #tuft, .head.has-hat .hfluff, .head.has-hat .unlock-crown { display: none !important; }
.hat-pic { width: 100%; height: auto; display: block; }
.hat-big { width: 200px; height: auto; display: block; margin: 0 auto; }
.hat-catch { display: grid; place-items: center; padding: 6px 0 2px; animation: hatPop .6s cubic-bezier(.3,1.5,.5,1); }
@keyframes hatPop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.hat-tagrow { margin: 0 0 8px; text-align: center; }
.hat-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: #e6e9e4; color: #4d554c; }
.hat-tag.uncommon { background: #d8e6ff; color: #2b4d8f; }
.hat-tag.rare { background: #f1ddff; color: #6b2fa3; }
.hat-tag.seasonal { background: #ffe6bd; color: #8f5200; }
.hat-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; }
.hat-row .hat-thumb { width: 64px; flex: none; }
.hat-row .hat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.hat-row .hat-name { font-weight: 600; }
.hat-put { flex: none; padding: 7px 14px; border-radius: 99px; background: var(--bird-accent, var(--accent)); color: #fff; font-weight: 600; font-size: 14px; }
.hat-put.plain { background: transparent; color: var(--bird-accent, var(--accent)); box-shadow: inset 0 0 0 1.5px currentColor; }
.hat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 2px 12px; }
.hat-cell { position: relative; aspect-ratio: 1; border-radius: 14px; background: rgba(127,127,127,.1); padding: 6px; display: grid; place-items: center; }
.hat-cell.lost .hat-pic { filter: brightness(0); opacity: .16; }
.hat-cell .hat-n { position: absolute; right: 5px; bottom: 3px; font-size: 11px; font-weight: 700; color: var(--text-2); }

/* 0.13.9: hat motion. Floaters hover over the head; Special hats move. Small list pictures (.hat-pic) hold still. */
[class*="hx-"] { transform-box: fill-box; transform-origin: 50% 50%; }
.hx-float { animation: hxFloat 4.2s ease-in-out infinite; }
.hx-float2 { animation: hxFloat2 6s ease-in-out infinite; }
.hx-float.hx-wobble { animation: hxWobble 3.4s ease-in-out infinite; }
@keyframes hxFloat { 0%,100% { transform: translate(0,0); } 25% { transform: translate(3px,-3px); } 50% { transform: translate(0,-5px); } 75% { transform: translate(-3px,-2px); } }
@keyframes hxFloat2 { 0%,100% { transform: translate(0,0) rotate(0); } 30% { transform: translate(5px,-7px) rotate(2deg); } 65% { transform: translate(-4px,-10px) rotate(-2deg); } }
@keyframes hxWobble { 0%,100% { transform: translate(0,0) rotate(-4deg); } 50% { transform: translate(2px,-7px) rotate(4deg); } }
.hx-rock { transform-origin: 50% 100%; animation: hxRock 2.6s ease-in-out infinite; }
@keyframes hxRock { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.hx-drop { animation: hxDrop 1.35s linear infinite; }
@keyframes hxDrop { 0% { transform: translateY(-4px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
.hx-blink { animation: hxBlink 1.2s steps(1) infinite; }
@keyframes hxBlink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.hx-swim { animation: hxSwim 3.6s ease-in-out infinite; }
@keyframes hxSwim { 0%,100% { transform: translateX(-4px) scaleX(1); } 45% { transform: translateX(6px) scaleX(1); } 50% { transform: translateX(6px) scaleX(-1); } 95% { transform: translateX(-4px) scaleX(-1); } }
.hx-puff { animation: hxPuff 2.4s ease-out infinite; }
@keyframes hxPuff { 0% { transform: translateY(6px) scale(.5); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px) scale(1.2); opacity: 0; } }
.hx-twinkle { animation: hxTwinkle 2s ease-in-out infinite; }
@keyframes hxTwinkle { 0%,100% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }
.hx-shine { animation: hxShine 3.2s ease-in-out infinite; }
@keyframes hxShine { 0%,55% { transform: translateX(0); } 100% { transform: translateX(96px); } }
.hx-tail { transform-origin: 0% 50%; animation: hxTail .8s ease-in-out infinite; }
@keyframes hxTail { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.hx-pop { animation: hxPop 2.1s ease-out infinite; }
@keyframes hxPop { 0% { transform: scale(.1); opacity: 0; } 15% { opacity: 1; } 55% { transform: scale(1); opacity: 1; } 75%,100% { transform: scale(1.15); opacity: 0; } }
.hx-sway { transform-origin: 50% 0%; animation: hxSway 2s ease-in-out infinite; }
@keyframes hxSway { 0%,100% { transform: skewX(8deg); } 50% { transform: skewX(-8deg); } }
.hx-led { animation: hxLed 1s steps(1) infinite; }
.hx-led.amber { animation-name: hxLedBusy; }
@keyframes hxLed { 0%,60% { opacity: 1; } 61%,100% { opacity: .15; } }
@keyframes hxLedBusy { 0%,20%,40% { opacity: 1; } 10%,30%,50%,100% { opacity: .15; } }
.hx-flutter { animation: hxFlutter 6s ease-in-out infinite; }
.hx-flap { animation: hxFlap 6s linear infinite; }
@keyframes hxFlutter { 0%,45%,100% { transform: translateY(0); } 8% { transform: translate(-4px,-14px); } 20% { transform: translate(6px,-20px); } 32% { transform: translate(-2px,-10px); } }
@keyframes hxFlap { 0%,2%,4%,6%,8%,10%,12%,14%,16%,18%,20%,22%,24%,26%,28%,30%,32%,34%,36%,38%,40% { transform: scaleX(1); } 1%,3%,5%,7%,9%,11%,13%,15%,17%,19%,21%,23%,25%,27%,29%,31%,33%,35%,37%,39% { transform: scaleX(.3); } 60%,80% { transform: scaleX(1); } 70% { transform: scaleX(.75); } }
.hx-spin { animation: hxSpin 1.6s linear infinite; }
@keyframes hxSpin { to { transform: rotate(360deg); } }
.hx-lava { animation: hxLava 4.6s ease-in-out infinite; }
@keyframes hxLava { 0%,100% { transform: translateY(0) scale(1,1); } 50% { transform: translateY(-16px) scale(.9,1.12); } }
.hx-bubble { animation: hxBubble 4s ease-out infinite; opacity: 0; }
@keyframes hxBubble { 0% { transform: translateY(4px) scale(.3); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(-26px) scale(1); opacity: 1; } 84% { transform: translateY(-27px) scale(1.35); opacity: 0; } 100% { opacity: 0; } }
.hx-cuckoo { transform-origin: 100% 60%; animation: hxCuckoo 5s ease-in-out infinite; }
@keyframes hxCuckoo { 0%,62%,100% { transform: translateX(10px) scale(0); } 68%,86% { transform: translateX(0) scale(1); } 72%,80% { transform: translateX(-3px) scale(1); } }
.hx-kernel { animation: hxKernel 1.8s ease-in-out infinite; }
@keyframes hxKernel { 0%,100% { transform: translateY(14px) rotate(0); opacity: 0; } 10% { opacity: 1; } 45% { transform: translateY(-8px) rotate(120deg); } 80% { transform: translateY(10px) rotate(240deg); opacity: 1; } 90% { opacity: 0; } }
.hx-ghosteye { transform-origin: 50% 50%; animation: hxEye 3.8s infinite; }
@keyframes hxEye { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.hx-quack { transform-origin: 100% 20%; animation: hxQuack 3.2s ease-in-out infinite; }
@keyframes hxQuack { 0%,55%,73%,100% { transform: rotate(0); } 60%,68% { transform: rotate(-26deg); } 64% { transform: rotate(-8deg); } }
.hx-bob { transform-origin: 80% 100%; animation: hxBob 3.2s ease-in-out infinite; }
@keyframes hxBob { 0%,50%,80%,100% { transform: rotate(0); } 60%,70% { transform: rotate(-7deg); } }
svg.hat-pic [class*="hx-"] { animation: none !important; }
svg.hat-pic .hx-bubble, svg.hat-pic .hx-pop, svg.hat-pic .hx-twinkle, svg.hat-pic .hx-kernel { opacity: 1; }
svg.hat-pic .hx-cuckoo { transform: none; }
@media (prefers-reduced-motion: reduce) { [class*="hx-"] { animation: none !important; } .hx-bubble, .hx-pop, .hx-twinkle, .hx-kernel { opacity: 1; } }
.hat-tag.special { background: #ffe9a8; color: #8a5d00; }
.tr-cell-r.special { background: #e0a400; }

.lake-hat { position: absolute; left: 0; top: 0; display: none; pointer-events: none; will-change: transform; }
.lake-hat.on { display: block; }
.lake-hat svg { width: 100%; height: 100%; display: block; }

/* ---------- 0.11.0 Bird Park ---------- */
.map-screen { --mp-parkhill: #d3e5c8; --mp-parkpond: #bcd3dc; --mp-leaf: #8fb88a; --mp-leaf2: #a9cba4; --mp-trunk: #8c735a; }
@media (prefers-color-scheme: dark) { .map-screen { --mp-parkhill: #2f3d30; --mp-parkpond: #2c4e5b; --mp-leaf: #4f7650; --mp-leaf2: #61876a; --mp-trunk: #6d5c49; } }

.park-screen, .park-backdrop, .so-screen {
  --pk-sky: #cfe6f3; --pk-cloud: #fff; --pk-hill2: #bcd4b4; --pk-hill1: #add0a8; --pk-ground: #d6e8c4; --pk-pond2: #a7c9da; --pk-pond1: #bcdbe8;
  --pk-glint: #fff; --pk-pad: #8fc08a; --pk-reed: #7fa883; --pk-cat: #8a6a4e; --pk-trunk: #8c735a; --pk-leaf1: #9cc296; --pk-leaf2: #86b080; --pk-shade: rgba(40,70,40,.2);
}
.park-screen { z-index: 30; background: var(--pk-ground); }
@media (prefers-color-scheme: dark) { .park-screen, .park-backdrop, .so-screen {
  --pk-sky: #1f2d3a; --pk-cloud: #2d3d4c; --pk-hill2: #2a3b2e; --pk-hill1: #243528; --pk-ground: #1e2c22; --pk-pond2: #1f3b49; --pk-pond1: #284b5b;
  --pk-glint: #7fa6b6; --pk-pad: #3f6a45; --pk-reed: #3d5e46; --pk-cat: #6d5a47; --pk-trunk: #5a4a3b; --pk-leaf1: #365a3c; --pk-leaf2: #2d4d33; --pk-shade: rgba(0,0,0,.28); } }
.pk-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.pk-sky { fill: var(--pk-sky); } .pk-cloud { fill: var(--pk-cloud); opacity: .85; }
.pk-hill2 { fill: var(--pk-hill2); } .pk-hill1 { fill: var(--pk-hill1); } .pk-ground { fill: var(--pk-ground); }
.pk-trunk { fill: var(--pk-trunk); } .pk-leaf1 { fill: var(--pk-leaf1); } .pk-leaf2 { fill: var(--pk-leaf2); }
.pk-pond2 { fill: var(--pk-pond2); } .pk-pond1 { fill: var(--pk-pond1); }
.pk-glint { fill: none; stroke: var(--pk-glint); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.pk-pad ellipse { fill: var(--pk-pad); } .pk-reed { fill: none; stroke: var(--pk-reed); stroke-width: 3.5; stroke-linecap: round; } .pk-cat { fill: var(--pk-cat); }
.pk-birds { position: absolute; inset: 0; z-index: 1; }
/* 0.12.3 (Tyler): the park is about 2½ screens wide and scrolls sideways */
.pk-scroll { position: absolute; inset: 0; z-index: 0; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pk-scroll::-webkit-scrollbar { display: none; }
.pk-scroll.dragging { cursor: grabbing; }
.pk-scroll.dragging .pk-bird { pointer-events: none; }
.pk-world { position: relative; height: 100%; width: 250%; }
.pk-bird { position: absolute; left: var(--x); top: var(--y); translate: -50% -100%; padding: 0; margin: 0; border: 0; background: none; display: block;
  transition: left 3.2s ease-in-out, top 3.2s ease-in-out; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.pk-bird:active .pk-face { scale: .96; }
.pk-bird:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 16px; }
.pk-face { position: relative; display: block; width: 100%; height: 100%; transition: scale .2s cubic-bezier(.3,1.4,.5,1); }
.pk-face .birdbox { width: 100%; height: 100%; }
.pk-bird.walking .pk-face { animation: pkStep .55s ease-in-out infinite; }
@keyframes pkStep { 50% { translate: 0 -2.5%; } }
.pk-shade { position: absolute; left: 20%; right: 14%; bottom: 0; height: 7%; border-radius: 50%; background: var(--pk-shade); }
.pk-top { z-index: 3; }
.pk-title { height: 44px; padding: 0 20px; border-radius: 22px; display: grid; place-items: center; background: var(--surface-solid); color: var(--text); font-weight: 700; font-size: 17px; box-shadow: 0 0 0 1px var(--bezel); }
.pk-quiet { position: absolute; left: 50%; top: 53%; translate: -50% -50%; z-index: 2; width: min(270px, 74%); text-align: center; padding: 12px 16px; border-radius: 18px; background: var(--surface-solid); box-shadow: 0 0 0 1px var(--bezel); }
.pk-quiet[hidden] { display: none; }
.pk-quiet b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.pk-quiet span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.pk-bar { position: absolute; left: 50%; translate: -50% 0; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 3; display: flex; gap: 4px; padding: 8px 10px 7px; border-radius: 34px; background: var(--surface-solid); box-shadow: 0 0 0 1px var(--bezel); }
.pk-bar button { position: relative; display: grid; justify-items: center; gap: 3px; width: 72px; font-size: 11px; font-weight: 600; color: var(--text-2); }
.pk-bar button svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--fill); color: var(--text); transition: scale .2s cubic-bezier(.3,1.4,.5,1); }
.pk-bar button:active svg { scale: .9; }
.pk-bar button.on svg { background: var(--accent); color: #fff; }
.pk-badge { position: absolute; top: -2px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface-solid); }
.pk-badge[hidden] { display: none; }

.pk-sheet { z-index: 32; }
.pk-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 4px; }
.pk-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.pk-cancel, .pk-save { font-size: 17px; color: var(--accent); min-width: 64px; }
.pk-cancel { text-align: left; } .pk-save { text-align: right; font-weight: 600; }
.pk-save:disabled { opacity: .35; }
.pk-body { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.pk-prev { display: flex; justify-content: center; margin-bottom: 2px; }
.pk-prev .birdbox { flex: none; }
.pk-shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pk-shape { display: grid; place-items: center; padding: 6px; border-radius: 20px; background: var(--surface-solid); box-shadow: inset 0 0 0 3px transparent; transition: box-shadow .2s, scale .2s cubic-bezier(.3,1.4,.5,1); }
.pk-shape:active { scale: .96; }
.pk-shape[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--accent); }
.pk-crop { position: relative; display: block; overflow: hidden; border-radius: 15px; background: var(--fill); flex: none; }
.pk-crop .birdbox { display: block; }
.pk-lines { display: grid; gap: 8px; }
.pk-line { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 14px; background: var(--surface-solid); }
.pk-line input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); }
.pk-count { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pk-hint { margin: 0 4px; font-size: 13px; line-height: 1.35; color: var(--text-2); }
.pk-hint.bad { color: var(--danger); }
.pk-leave { margin-top: 2px; }
.card .pk-hero { display: block; position: relative; width: 120px; height: 150px; margin: -10px auto 4px; }
.card .pk-hero .birdbox { position: absolute; inset: 0; }
.card .pk-portrait { display: block; width: 180px; height: 144px; margin: -8px auto 12px; }
.card .pk-portrait .pk-crop { border-radius: 30px; }

.card .pk-sub { margin: 0 0 16px; font-size: 15px; color: var(--text-3); }
.card .btn svg { width: 20px; height: 20px; margin: -4px 8px -4px 0; vertical-align: middle; }

.card .pk-friends { margin: 8px 0 6px; font-size: 15px; font-weight: 600; color: var(--text-2); }

/* friend requests in SiriBird Online */
.fr-req { gap: 10px; }
.fr-bird.req-pic { flex: none; width: 46px; height: 46px; margin: 0; aspect-ratio: auto; border-radius: 14px; }
.fr-bird.req-pic.live .fr-live { position: absolute; inset: auto; width: 200%; height: 200%; left: -43%; top: -2%; }
.req-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: scale .2s cubic-bezier(.3,1.4,.5,1); }
.req-btn:active { scale: .88; }
.req-btn svg { width: 18px; height: 18px; }
.req-btn.yes { background: var(--accent); color: #fff; }
.req-btn.no { background: var(--fill); color: var(--text-2); }
.fr-sent { flex: none; font-size: 13px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .pk-bird { transition: none; } .pk-bird.walking .pk-face { animation: none; } }

/* 0.11.1: a park play date happens at the park (the scene sits behind the main screen) */
.park-backdrop { position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity .5s ease; background: var(--pk-ground); }
.park-backdrop .pk-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone.at-park { isolation: isolate; }
.phone.at-park > .park-backdrop { opacity: 1; }
.card .pk-portrait { width: 150px; height: 120px; margin: -8px auto 10px; }
.card .pk-tagwrap { display: flex; justify-content: center; margin: 2px 0 6px; }
.pk-tagface { width: 200px; height: auto; display: block; }
.card .pk-sub { margin: 0 0 14px; }
.wn-scroll { max-height: 52vh; overflow-y: auto; margin-bottom: 18px; }
.wn-scroll .wn-list { margin: 0 0 18px; max-height: none; overflow: visible; }
.wn-older { margin: 4px 0 12px !important; font-size: 13px !important; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3) !important; }

/* 0.11.2: the share sheet for a park chat has the park behind the two birds (flat colors) */
.chat-sheet.at-park .cp-birds { background: linear-gradient(#d2e8f4 0 62%, #d9e6c6 62% 100%); border-radius: 18px; padding: 0 8%; margin: 0 4% -6px; }

/* 0.11.5: the tap card names the bird, with a Friends badge */
.card .pk-bname { margin: 2px 0 6px; font-size: 26px; line-height: 1.1; }
.card .pk-friendpill { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 4px; padding: 4px 11px 4px 8px; border-radius: 99px; background: color-mix(in srgb, var(--bird-accent, #4f6f92) 16%, transparent); color: var(--bird-accent, #4f6f92); font-size: 13.5px; font-weight: 700; }
.card .pk-friendpill svg { width: 14px; height: 14px; }
.card .pk-tagwrap { margin-top: 0; }
.pk-intro { margin: 0 8px 10px; text-align: center; font-size: 15px; line-height: 1.35; color: var(--text-2); }

/* 0.11.8: lake marks only when there are fish / a hat today */
.sm-world .lk-fish, .sm-world .lk-hat { transition: opacity .5s ease; }
.sm-world.no-fish .lk-fish, .sm-world.no-hat .lk-hat, .sm-world.no-gold .lk-gold { opacity: 0; }

/* 0.11.9: the motion (gyro) button beside the X on the fishing screen */
.scr-l { display: flex; align-items: center; gap: 10px; }
.lake-tilt[hidden] { display: none; }
.lake-tilt { color: var(--text-2); transition: transform .2s cubic-bezier(.3,1.4,.5,1), background-color .25s, color .25s; }
.lake-tilt svg { width: 22px; height: 22px; }
.lake-tilt.on { background: var(--accent); color: #fff; box-shadow: none; }
.lake-tilt svg { transition: transform .35s cubic-bezier(.3,1.3,.5,1); }
.lake-tilt.on svg { transition: none; } /* 0.11.10: leans live with the phone (set every frame) */

/* 0.11.10: park birds say a few words now and then */
.pk-say { position: absolute; left: 50%; bottom: 96%; translate: -50% 6px; scale: .7; opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 6px 11px; border-radius: 14px; background: var(--surface-solid); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 0 0 1px var(--bezel); transition: opacity .3s ease, translate .45s cubic-bezier(.3,1.4,.5,1), scale .45s cubic-bezier(.3,1.4,.5,1); z-index: 2; }
.pk-say::after { content: ""; position: absolute; left: calc(50% + var(--tail, 0px)); top: 100%; translate: -50% -50%; rotate: 45deg; width: 9px; height: 9px; background: inherit; box-shadow: 1px 1px 0 0 var(--bezel); }
.pk-say.in { opacity: 1; translate: -50% 0; scale: 1; }

/* ================= 0.12.0 · The Standoff ================= */
/* The phone is held sideways. On a portrait screen (rotation locked) the stage is turned to lie along the phone;
   if the browser turns the page itself, the stage just fills it. The "turn me upright" screen stays out of the way. */
html.so-open .rotate { display: none !important; }
html.so-open .phone { visibility: visible !important; }
.so-screen { z-index: 33; background: var(--pk-ground); }
.so-screen:not(.show) * { animation: none !important; } /* hidden screens keep animating otherwise (visibility only): no work while it is closed */
.so-upright { position: absolute; inset: 0; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; background: var(--bg-top); }
.so-intro { width: min(360px, 100%); }
.so-intro h2 { font-family: var(--round); font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--text); }
.so-intro p { font-size: 16px; line-height: 1.4; color: var(--text-2); margin: 0 0 14px; }
.so-intro .so-turnof { font-weight: 600; color: var(--accent); }
.so-how { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; text-align: left; }
.so-how li { padding: 12px 14px; border-radius: 16px; background: var(--surface-solid); font-size: 15px; line-height: 1.35; color: var(--text-2); box-shadow: 0 0 0 1px var(--bezel); }
.so-how b { color: var(--text); }
.so-intro .btn, .so-panel .btn { width: 100%; }
.so-turnhint { display: grid; justify-items: center; gap: 6px; color: var(--text-2); font-size: 15px; }
.so-turnhint b { font-size: 22px; color: var(--text); font-family: var(--round); }
.so-phone svg { width: 96px; height: 96px; animation: soTurn 2.4s cubic-bezier(.5,0,.3,1) infinite; }
.so-ph { fill: var(--text); } .so-ph-scr { fill: var(--accent); }
@keyframes soTurn { 0%, 20% { rotate: 0deg; } 50%, 75% { rotate: -90deg; } 100% { rotate: 0deg; } }

.so-stage { position: absolute; left: 50%; top: 50%; overflow: hidden; background: var(--pk-ground);
  /* 0.12.2: the camera island's side. The stage is turned by hand on a portrait screen, so the island (the portrait top inset) can land on
     either end: keep both ends clear. */
  --edge: max(env(safe-area-inset-top, 0px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
.so-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.so-mid { fill: #fff; opacity: .16; }
.so-ring { fill: none; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: soRing 1.4s ease-out forwards; opacity: calc(.9 * var(--k, .6)); }
@keyframes soRing { from { scale: 1; } to { scale: 7; opacity: 0; } }
.so-birds, .so-watchers, .so-fish { position: absolute; inset: 0; pointer-events: none; }
.so-watchers { z-index: 1; } .so-fish { z-index: 2; } .so-birds { z-index: 3; }
.so-bird { position: absolute; left: var(--x); bottom: 8%; height: calc(50% * var(--s, 1)); aspect-ratio: 4 / 5; translate: -50% 0; }
.so-bird .birdbox { width: 100%; height: 100%; }
.so-bird .birdbox.so-flip { scale: -1 1; }
.so-watch { bottom: 50%; }
.so-me .neck { transform-box: view-box; transform-origin: 170px 204px; transition: scale .12s linear; }
.so-me .g-head, .so-me .collar-slot { transition: translate .12s linear; }
.so-f { position: absolute; left: calc(var(--ox, 0px) + var(--px, 422) * var(--k, 1px)); top: var(--y); width: 4.4%; aspect-ratio: 40 / 22; translate: -50% -50%; transition: left .3s linear; }
.so-f svg { display: block; width: 100%; height: 100%; fill: #f0a050; animation: soBob 2.2s ease-in-out infinite; animation-delay: calc(-1 * var(--d, 0s)); }
.so-f .so-tail { fill: #d9843a; } .so-f .so-eye { fill: #2a2a2a; }
.so-f.so-flipf svg { scale: -1 1; }
@keyframes soBob { 50% { translate: 0 -12%; rotate: 4deg; } }
.so-say { position: absolute; left: 50%; bottom: 92%; translate: -50% 6px; scale: .7; opacity: 0; white-space: nowrap; z-index: 4;
  padding: 7px 12px; border-radius: 15px; background: var(--surface-solid); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 0 0 1px var(--bezel); transition: opacity .3s ease, translate .45s cubic-bezier(.3,1.4,.5,1), scale .45s cubic-bezier(.3,1.4,.5,1); }
.so-say::after { content: ""; position: absolute; left: 50%; top: 100%; translate: -50% -50%; rotate: 45deg; width: 10px; height: 10px; background: inherit; box-shadow: 1px 1px 0 0 var(--bezel); }
.so-say.in { opacity: 1; translate: -50% 0; scale: 1; }
.so-watch .so-say.in { scale: calc(1 / .42); }

/* the height line, on my side */

.so-top { position: absolute; left: 50%; top: 5%; translate: -50% 0; display: grid; justify-items: center; gap: 7px; z-index: 5; }
.so-pill { height: 34px; padding: 0 16px; border-radius: 17px; display: grid; place-items: center; background: var(--surface-solid); color: var(--text); font-weight: 700; font-size: 15px; box-shadow: 0 0 0 1px var(--bezel); white-space: nowrap; }
.so-pill:empty { display: none; }
.so-timer { width: 150px; height: 5px; border-radius: 3px; background: var(--surface-solid); overflow: hidden; }
.so-timer i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(1); }
.so-x { position: absolute; right: calc(3% + var(--edge, 0px)); top: 5%; z-index: 6; }
.so-big { position: absolute; left: 50%; top: 40%; translate: -50% -50%; z-index: 6; font-family: var(--round); font-size: 72px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.12); opacity: 0; scale: .8; pointer-events: none; transition: opacity .25s, scale .35s cubic-bezier(.3,1.4,.5,1); white-space: nowrap; }
.so-big.in { opacity: 1; scale: 1; }
.so-big.small { font-size: 36px; }

/* a card on the stage (the table card, stop turn, the end of a turn), or on the upright screen */
.so-panel { position: absolute; left: 50%; top: 50%; translate: -50% -46%; z-index: 8; width: min(360px, 82%); max-height: 92%; overflow: auto; padding: 22px 22px 16px; border-radius: 28px; background: var(--surface-solid); box-shadow: 0 0 0 1px var(--bezel), 0 18px 50px rgba(0,0,0,.18); text-align: center; opacity: 0; transition: opacity .25s, translate .4s cubic-bezier(.3,1.3,.5,1); }
.so-panel.in { opacity: 1; translate: -50% -50%; }
.so-upright .so-panel { position: relative; left: auto; top: auto; translate: 0 8px; }
.so-upright .so-panel.in { translate: 0 0; }
.so-panel p { font-size: 15px; line-height: 1.4; color: var(--text-2); margin: 6px 0 16px; }
.so-ptitle { display: block; font-family: var(--round); font-size: 24px; line-height: 1.15; color: var(--text); }
.so-score { display: grid; justify-items: center; margin-bottom: 4px; }
.so-score b { font-family: var(--round); font-size: 54px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.so-score small { font-size: 13px; color: var(--text-3); font-weight: 600; }
.so-panel .so-score b { font-size: 68px; }
/* 0.12.3: after a turn, "turn your phone back" (turning it upright is the way out) */
.so-flipback { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -4px 0 12px; padding: 10px 14px; border-radius: 18px; background: var(--fill); text-align: left; }
.so-flipback b { font-size: 15px; line-height: 1.25; color: var(--text); }
.so-flipback .so-phone svg { width: 40px; height: 40px; animation: soBack 2.4s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes soBack { 0%, 20% { rotate: 90deg; } 50%, 75% { rotate: 0deg; } 100% { rotate: 90deg; } }
.so-upright .so-flipback { display: none; }
.so-panel .so-done { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .so-f svg, .so-phone svg, .so-flipback .so-phone svg, .so-me > *, .so-birds .so-bird::before { animation: none; } .so-ring { animation-duration: .01s; } }

/* cards: the two birds, the words won */
.card .so-vs { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -6px 0 12px; }
.card .so-vs b { font-family: var(--round); font-size: 20px; color: var(--text-3); }
.card .so-vs .pk-crop { border-radius: 24px; }
.so-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -6px 0 14px; }
.so-chip { padding: 6px 12px; border-radius: 99px; background: var(--fill); color: var(--text); font-weight: 600; font-size: 15px; }
.so-chip.got { background: var(--accent); color: #fff; }
.card p.so-note, .card p.so-scores { font-size: 14px; color: var(--text-3); margin-top: -8px; }
.card .pk-goldnote { margin: -2px 0 8px; font-size: 13.5px; font-weight: 700; color: #a87a12; }
@media (prefers-color-scheme: dark) { .card .pk-goldnote { color: #f2c230; } }

/* the Standoff sheet: games and the leaderboard */
.so-sheet { z-index: 32; }
.so-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 16px 12px; padding: 2px; border-radius: 10px; background: var(--fill); }
.so-tabs button { height: 32px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.so-tabs button[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.so-body { display: grid; gap: 8px; align-content: start; }
.so-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface-solid); text-align: left; }
button.so-row:active { scale: .985; }
.so-row.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.so-av { flex: none; display: block; }
.so-av .pk-crop { border-radius: 14px; }
.so-rtext { flex: 1; min-width: 0; display: grid; gap: 2px; }
.so-rtext b { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-rtext small { font-size: 13px; color: var(--text-2); }
.so-go { color: var(--accent); }
.so-turns { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.so-rank { width: 26px; text-align: center; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.so-rank.gold { color: #fff; background: #f2c230; border-radius: 13px; height: 26px; line-height: 26px; }
.so-pts { font-family: var(--round); font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.so-month { margin: 6px 4px 0; font-size: 20px; font-weight: 700; color: var(--text); }
.so-month.past { margin-top: 18px; }
.so-sec { display: flex; align-items: center; gap: 8px; margin: 14px 4px 2px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.so-sec:first-child { margin-top: 2px; }
.so-sec span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.so-none { margin: 0 4px 4px; font-size: 14px; color: var(--text-2); }
.so-pastm { margin: 6px 4px 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.so-wait { text-align: center; padding: 30px 0; }

/* 0.12.0 motion indicator (Tyler 2026-11-14): a little wooden spirit level, pond water inside, an air bubble that
   wobbles with your hand. My bird sways with it and shows shake marks when it's a lot. */
.so-level { display: block; padding: 5px; border-radius: 14px; background: var(--pk-trunk); }
.so-tube { position: relative; display: block; width: 132px; height: 18px; border-radius: 9px; background: var(--pk-pond1); overflow: hidden; transition: background .3s; }
.so-lmark { position: absolute; top: 3px; bottom: 3px; left: calc(50% - 14px); width: 2px; border-radius: 1px; background: #5d7f8f; opacity: .55; }
.so-lmark.r { left: calc(50% + 12px); }
.so-bubble { position: absolute; left: 50%; top: 3px; width: 22px; height: 12px; margin-left: -11px; border-radius: 6px; background: #fff; z-index: 1; }
.so-level[data-lv="1"] .so-tube { background: #f1d193; }
.so-level[data-lv="2"] .so-tube { background: #ef9f8f; }
.so-level[data-lv="2"] .so-lmark { background: #7a3328; }
.so-me > * { transform-origin: 50% 100%; }
.so-me[data-lv="1"] > *, .so-me[data-lv="2"] > * { animation: soSway .5s ease-in-out infinite alternate; }
.so-me[data-lv="2"] > * { animation-duration: .22s; }
@keyframes soSway { from { rotate: calc(-1 * var(--sway, 0deg)); } to { rotate: var(--sway, 0deg); } }
.so-me::after { content: ""; position: absolute; left: 62%; top: 18%; width: 34px; height: 34px; opacity: 0; transition: opacity .2s;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cg fill='none' stroke='%23e0523f' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l5 5M17 2v7M28 6l-5 5'/%3E%3C/g%3E%3C/svg%3E"); }
.so-me[data-lv="2"]::after { opacity: 1; }
.so-me[data-lv="2"] .g-body { animation: soRuffle .12s steps(2) infinite; }
@keyframes soRuffle { 50% { translate: 1px -1px; } }

/* Birds stand in the pond picture's units (--bx of 844), so they stay on its spots whatever the phone's shape.
   The two players wade at the ends of the water (Tyler 2026-11-14: the pond is the arena). */
.so-stage .so-bird { left: calc(var(--ox, 0px) + var(--bx, 422) * var(--k, 1px)); }
/* wading: the legs go under the water, with a ring of ripples where they go in */
.so-birds .so-bird { bottom: 13%; }
.so-birds .so-bird .birdbox { clip-path: inset(0 0 5% 0); }
.so-birds .so-bird::before { content: ""; position: absolute; left: 50%; bottom: 3.5%; width: 46%; height: 7%; translate: -50% 0; border-radius: 50%; border: 2px solid #fff; opacity: .8; z-index: 1; }
.so-birds .so-bird::before { animation: soWade 2.6s ease-in-out infinite; }
@keyframes soWade { 50% { scale: 1.12; opacity: .45; } }
.so-watch .birdbox { transition: scale .3s ease; } /* turning to look at the other end */
@media (prefers-reduced-motion: reduce) { .so-me > *, .so-birds .so-bird::before, .so-me .g-body { animation: none !important; } }

/* ================= 0.13.0 · Friendship ================= */
/* feelings over the head (Tyler: bird feelings as icons, not the message pill) */
.feel { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; z-index: 6; pointer-events: none;
  animation: feelPop 2.2s cubic-bezier(.2,1.3,.4,1) both; }
.feel svg { width: 100%; height: 100%; display: block; }
.feel-like { animation-name: feelTwinkle; }
.feel-confused { --fl-q: var(--bird-accent, #3d6ea8); animation-name: feelWobble; }
@keyframes feelPop { 0% { opacity: 0; transform: translateY(14px) scale(.3); } 14% { opacity: 1; transform: translateY(0) scale(1.15); } 24% { transform: scale(1); } 40% { transform: scale(1.12); } 52% { transform: scale(1); } 82% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-22px) scale(.9); } }
@keyframes feelTwinkle { 0% { opacity: 0; transform: scale(.2) rotate(-40deg); } 16% { opacity: 1; transform: scale(1.2) rotate(8deg); } 28% { transform: scale(1) rotate(0); } 50% { transform: scale(.9); } 62% { transform: scale(1.08); } 82% { opacity: 1; transform: translateY(-4px); } 100% { opacity: 0; transform: translateY(-18px) scale(.8); } }
@keyframes feelWobble { 0% { opacity: 0; transform: translateY(10px) scale(.4); } 16% { opacity: 1; transform: translateY(0) scale(1.1) rotate(-10deg); } 30% { transform: rotate(10deg) scale(1); } 44% { transform: rotate(-6deg); } 58% { transform: rotate(0); } 84% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .feel { animation: feelFade 1.6s both; } @keyframes feelFade { 0%,100% { opacity: 0; } 15%,80% { opacity: 1; } } }

/* a friend's photo: the head, in a circle with a ring in the friend's feather color */
.fp-head { position: relative; display: inline-block; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--ring, #8d9aa9) 14%, var(--surface-solid)); box-shadow: inset 0 0 0 2.5px var(--ring, #8d9aa9); }
.fp-head .fp-hbox { position: absolute; inset: 0; }
.fp-head .fp-hbox svg { width: 100%; height: 100%; }
.fp-head::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--ring, #8d9aa9); pointer-events: none; }

/* the meter: a pill that drops from the top */
.fp-meter { position: absolute; left: 50%; top: calc(96px + env(safe-area-inset-top)); z-index: 26; --fp: #7f93a8;
  display: flex; align-items: center; gap: 12px; width: min(330px, calc(100% - 36px)); padding: 8px 18px 8px 8px; border-radius: 999px;
  background: var(--surface-solid); box-shadow: 0 10px 34px rgba(20,30,40,.16), 0 1px 3px rgba(20,30,40,.08);
  translate: -50% -26px; scale: .86; opacity: 0; pointer-events: none;
  transition: opacity .28s, translate .6s cubic-bezier(.2,1.25,.3,1), scale .6s cubic-bezier(.2,1.25,.3,1); }
.fp-meter.show { opacity: 1; translate: -50% 0; scale: 1; }
.fp-meter.pinned { scale: .9; }
.fp-meter.pinned.big { scale: 1; }
.fp-meter .fp-head { width: 48px; height: 48px; --ring: var(--fp); }
.fp-meter.neg .fp-head { --ring: #cf6a64; }
.fp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fp-name { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-of { font-size: 13.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.fp-bar { position: relative; height: 7px; border-radius: 99px; background: var(--fill, rgba(120,130,140,.16)); overflow: hidden; }
.fp-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--fp); transition: width .7s cubic-bezier(.25,.9,.3,1); }
.fp-meter.neg .fp-bar i { left: auto; right: 0; background: #cf6a64; }
.fp-ms { display: none; font-size: 12.5px; font-weight: 600; color: var(--fp); margin-top: -1px; }
.fp-meter.neg .fp-ms { color: #b9554f; }
.fp-meter.has-ms .fp-ms { display: block; animation: fpMs .5s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes fpMs { from { opacity: 0; transform: translateY(-4px); } }
.fp-lv { flex: none; display: flex; align-items: center; gap: 4px; }
.fp-heart { width: 19px; height: 19px; fill: #f0505e; }
.fp-heart.broken { fill: #b9b2ae; }
.fp-meter.neg .fp-heart.broken { fill: #cf6a64; }
.fp-num { position: relative; display: inline-grid; min-width: 1ch; height: 36px; overflow: hidden; font-family: var(--round); font-size: 32px; font-weight: 750; letter-spacing: -0.03em; line-height: 36px; font-variant-numeric: tabular-nums; }
.fp-num b { grid-area: 1 / 1; font-weight: inherit; text-align: right; }
.fp-num .in-up { animation: fpIn .5s cubic-bezier(.2,1.2,.3,1) both; } .fp-num .out-up { animation: fpOut .4s ease-in both; }
.fp-num .in-down { animation: fpIn .5s cubic-bezier(.2,1.2,.3,1) reverse both; animation-name: fpInD; } .fp-num .out-down { animation: fpOutD .4s ease-in both; }
@keyframes fpIn { from { transform: translateY(100%); } } @keyframes fpOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes fpInD { from { transform: translateY(-100%); } to { transform: none; } } @keyframes fpOutD { to { transform: translateY(100%); opacity: 0; } }
.fp-delta { position: absolute; left: 50%; top: -6px; translate: -50% 0; opacity: 0; font-family: var(--round); font-size: 18px; font-weight: 750; color: var(--text-2); pointer-events: none; }
.fp-delta.up { color: var(--fp); } .fp-delta.down { color: #b9554f; }
.fp-delta.go { animation: fpDelta 1.5s cubic-bezier(.2,.9,.3,1) both; }
@keyframes fpDelta { 0% { opacity: 0; transform: translateY(6px) scale(.7); } 18% { opacity: 1; transform: translateY(-16px) scale(1.08); } 70% { opacity: 1; transform: translateY(-24px) scale(1); } 100% { opacity: 0; transform: translateY(-34px); } }
.fp-meter.pulse .fp-head { animation: fpPulse .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes fpPulse { 30% { transform: scale(1.14); } }
.fp-meter.wob { animation: fpWob .5s ease; }
@keyframes fpWob { 20% { margin-left: -5px; } 45% { margin-left: 4px; } 70% { margin-left: -2px; } }
.fp-burst { position: absolute; right: 24px; top: 50%; width: 0; height: 0; pointer-events: none; }
.fp-burst i { position: absolute; left: -3px; top: -6px; width: 6px; height: 12px; border-radius: 3px; background: var(--fp); transform: rotate(var(--a)) translateY(0); opacity: 0; animation: fpRay .8s cubic-bezier(.2,.9,.3,1) both; }
@keyframes fpRay { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-10px) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-40px) scale(1); } }
.phone:has(.admin.show) .fp-meter, .phone:has(.screen.show) .fp-meter:not(.pinned) { z-index: 41; }
@media (prefers-color-scheme: dark) { .fp-meter { background: #2a2c30; box-shadow: 0 10px 34px rgba(0,0,0,.45); } }
@media (prefers-reduced-motion: reduce) { .fp-meter { transition: opacity .2s; translate: -50% 0; scale: 1; } }

/* friend pickers (send to a friend) */
.card.fp-tall { max-height: calc(100% - 70px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
.fp-send-label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; text-align: left; }
.fp-picks { display: grid; gap: 8px; text-align: left; }
.fp-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px 8px 8px; border-radius: 18px; background: var(--fill); color: var(--text); font: inherit; }
.fp-pick:active { scale: .98; }
.fp-pick-head { width: 42px; height: 42px; }
.fp-pick-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-pick-t b { font-size: 16.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-pick-lv { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fp-pick-lv .fp-heart { width: 14px; height: 14px; }
.fp-chip { flex: none; padding: 4px 10px; border-radius: 99px; font-size: 14px; font-weight: 700; background: var(--fill); color: var(--text-2); font-variant-numeric: tabular-nums; }
.fp-chip.up { background: color-mix(in srgb, var(--bird-accent, var(--accent)) 16%, transparent); color: var(--bird-accent, var(--accent)); }
.fp-chip.down { background: rgba(207,106,100,.14); color: #b9554f; }
.fp-none { font-size: 15px !important; color: var(--text-3) !important; }

/* items: catch windows and the inventory */
.item-catch { width: 132px; height: 100px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 28px; background: var(--fill); }
.item-catch.golden { background: radial-gradient(circle at 50% 45%, rgba(255,214,90,.55), rgba(255,214,90,0) 70%), var(--fill); }
.item-catch.rare { background: color-mix(in srgb, #8a46d8 12%, var(--fill)); }
.item-big { width: 104px; height: 78px; }
.item-catch.golden .item-big { animation: goldBob 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(240,170,20,.45)); }
@keyframes goldBob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.card .item-word { margin: 0 0 6px; font-size: 40px; }
.item-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--fill); color: var(--text-2); }
.item-tag.common { background: rgba(120,130,140,.14); color: var(--text-2); }
.item-tag.uncommon { background: rgba(47,184,90,.14); color: #23894a; }
.item-tag.rare { background: rgba(138,70,216,.14); color: #7a3cc4; }
.item-tag.golden { background: rgba(244,184,28,.2); color: #a8740a; }
.card p.item-tagrow { margin: 0 0 10px; }
.inv-row { display: flex; align-items: center; gap: 12px; }
.inv-thumb { flex: none; width: 54px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--fill); }
.inv-thumb svg { width: 46px; height: 34px; }
.inv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.inv-name { font-size: 16px; font-weight: 600; }
.inv-sub { font-size: 13.5px; color: var(--text-3); }
.inv-btns { display: flex; gap: 6px; flex: none; }

/* friends list: friendship number, heart and a small bar on each tile */
.fr-fp { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; }
.fr-fp b { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.fr-fp .fp-heart { width: 13px; height: 13px; }
.fr-fp.gold .fp-heart { fill: #f2b705; }
.fr-fp > i { position: relative; flex: 1; height: 5px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.fr-fp > i > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--fr-c, #7f93a8); }
.fr-fp.neg b { color: #b9554f; }
.fr-fp.neg > i > i { left: auto; right: 0; background: #cf6a64; }
.fr-card-fp { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -4px auto 16px; max-width: 280px; }
.fr-card-fp .fr-fp { margin: 0; }
.fr-card-fp .fr-fp b { font-size: 17px; }
.fr-card-fp .fr-fp .fp-heart { width: 17px; height: 17px; }

/* the island's boards */
.fb-seg { display: flex; gap: 4px; padding: 3px; margin: 0 0 10px; border-radius: 12px; background: var(--fill); }
.fb-seg button { flex: 1; padding: 7px 8px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); background: transparent; }
.fb-seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.fb-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.fb-row + .fb-row { border-top: 0.5px solid var(--sep, rgba(120,130,140,.2)); }
.fb-rank { width: 20px; flex: none; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }
.fb-pair { flex: none; display: flex; }
.fb-pair .fp-head { width: 36px; height: 36px; }
.fb-pair .fp-head + .fp-head { margin-left: -10px; }
.fb-names { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-row.mine .fb-names { color: var(--bird-accent, var(--accent)); }
.fb-lv { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fb-lv .fp-heart { width: 15px; height: 15px; }
.fb-empty { padding: 14px; font-size: 14.5px; color: var(--text-3); }

/* friendship on play dates: how two birds stand shows how they get on (milestones, Tyler 2026-11-14) */
.phone.outing.fp-close .guest { translate: 7px 0; }
.phone.outing.fp-close .stage > .stage-svg { translate: -7px 0; }
.phone.outing.fp-close.outing-in .guest { animation: fpBob 1.7s ease-in-out infinite; }
.phone.outing.fp-close.outing-in .stage > .stage-svg { animation: fpBobH 1.7s ease-in-out infinite; }
@keyframes fpBob { 50% { translate: 7px -4px; } }
@keyframes fpBobH { 50% { translate: -7px -4px; } }
.phone.outing .guest .grow, .phone.outing .stage > .stage-svg .grow { transition: transform 1.3s cubic-bezier(.34,1.25,.5,1), rotate .9s cubic-bezier(.3,1.25,.5,1), scale .6s cubic-bezier(.3,1.25,.5,1); }
.phone.outing.outing-in.fp-lean .guest .grow, .phone.outing.outing-in.fp-lean .stage > .stage-svg .grow { rotate: -4deg; }
.phone.outing.outing-in.fp-side .guest .grow, .phone.outing.outing-in.fp-side .stage > .stage-svg .grow { rotate: 3deg; }
.phone.outing.outing-in.fp-back .guest .grow, .phone.outing.outing-in.fp-back .stage > .stage-svg .grow { scale: -1 1; }
@media (prefers-reduced-motion: reduce) { .phone.outing.fp-close .guest, .phone.outing.fp-close .stage > .stage-svg { animation: none !important; } }
/* a friend talking at the park: a small meter under its words */
.pk-fp { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pk-fp .fp-heart { width: 12px; height: 12px; }
.pk-fp > i { position: relative; flex: 1; min-width: 34px; height: 4px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.pk-fp > i > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--bird-accent, #7f93a8); }
.pk-fp.neg > i > i { left: auto; right: 0; background: #cf6a64; }

/* the message pill sits under the meter while the meter is out */
.phone:has(.fp-meter.show) .toast { top: calc(168px + env(safe-area-inset-top)); }

/* 0.13.2 (Tyler): the Standoff bird waiting in the park pond for my turn. It wades (its feet under the water),
   with a small "Your turn" pill over its head. Tap it or the pond to play. */
.pk-bird.so-wait { transition: none; }
.pk-bird.so-wait .pk-face { -webkit-mask-image: linear-gradient(to bottom, #000 79%, transparent 85%); mask-image: linear-gradient(to bottom, #000 79%, transparent 85%); animation: pkWade 2.6s ease-in-out infinite; }
.pk-bird.so-wait .pk-shade { left: 24%; right: 18%; bottom: 20.5%; height: 4%; background: none; border: 2px solid rgba(255,255,255,.85); box-sizing: border-box; animation: pkRing 2.6s ease-out infinite; }
@keyframes pkWade { 50% { translate: 0 1.5%; } }
@keyframes pkRing { 0% { scale: .7; opacity: .9; } 100% { scale: 1.25; opacity: 0; } }
.pk-sowait { position: absolute; left: 50%; bottom: calc(100% + 4px); translate: -50% 0; /* 0.13.7 (Tyler): above its head, not over its face */ padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.08); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pk-bird.so-wait .pk-face, .pk-bird.so-wait .pk-shade { animation: none; } }
/* 0.13.2: the map's park pond: the right-hand bird only stands there while a Standoff waits for my turn. */
/* 0.13.4 (Tyler): the pond is empty unless a Standoff waits for my turn; then one bird waits on the right. */
.sm-world .sm-me { display: none; }
.sm-world:not(.so-turn) .sm-foe { opacity: 0; }
.sm-foe { transition: opacity .4s ease; }

/* ---------- 0.13.3: hat trades and gifts ---------- */
.acc-tabs button { position: relative; }
.tr-dot { position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }
.tr-set { display: flex; flex-direction: column; gap: 2px; }
.tr-set-sub { display: block; font-size: 13px; color: var(--text-2); }
.tr-note { margin-top: 12px; }
.tr-row { align-items: flex-start; gap: 10px; padding: 10px 14px; }
.tr-row.past { opacity: .72; }
.tr-head { width: 40px; height: 40px; margin-top: 2px; }
.tr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-info b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-sides { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tr-side-l { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.tr-mini { display: inline-flex; gap: 3px; }
.tr-mini-hat { width: 30px; height: 23px; border-radius: 7px; background: var(--fill); display: grid; place-items: center; padding: 1px 2px; }
.tr-when { font-size: 13px; color: var(--text-2); }
.tr-row .inv-btns { align-self: center; }
.tr-start { margin: 18px 0 10px; }
.tr-who { display: flex; align-items: center; gap: 12px; margin: 2px 4px 4px; }
.tr-who b { font-size: 17px; }
.tr-who-head { width: 48px; height: 48px; }
.tr-cell { border: 0; font: inherit; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.tr-cell:active { transform: scale(.95); }
.tr-cell.on { background: color-mix(in srgb, var(--bird-accent, var(--accent)) 16%, transparent); box-shadow: inset 0 0 0 2.5px var(--bird-accent, var(--accent)); }
.tr-check { position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--bird-accent, var(--accent)); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tr-cell-r { position: absolute; left: 7px; bottom: 6px; width: 7px; height: 7px; border-radius: 50%; background: #c9cdc6; }
.tr-cell-r.uncommon { background: #5b86d6; }
.tr-cell-r.rare { background: #9a4fd6; }
.tr-cell-r.seasonal { background: #e08a1a; }
.tr-sum { margin: 14px -4px 0; padding: 14px 14px 12px; border-radius: 18px; background: var(--surface-solid); box-shadow: 0 -1px 0 var(--separator); display: grid; gap: 8px; }
.tr-sum-row { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.tr-sum-row .tr-side-l { width: 66px; flex: none; }
.tr-none { font-size: 14px; color: var(--text-2); }
.tr-sum .btn { margin-top: 4px; }
.tr-sum .btn:disabled { opacity: .4; }
.tr-sum .tr-set-sub { text-align: center; }
.tr-card-head { display: block; width: 56px; height: 56px; margin: 0 auto 8px; }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; text-align: center; }
.tr-col { display: flex; flex-direction: column; gap: 8px; padding: 10px 8px 12px; border-radius: 18px; background: var(--fill); }
.tr-col-hat, .tr-arrive .tr-col-hat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tr-col-hat .hat-pic { width: 64px; }
.tr-col-name { font-size: 14px; font-weight: 600; }
.tr-col .hat-tag, .tr-arrive .hat-tag { font-size: 11px; padding: 2px 8px; }
.tr-arrive { display: flex; justify-content: center; gap: 14px; margin: 0 auto 10px; padding: 12px 16px; border-radius: 28px; background: var(--fill); width: fit-content; }
.tr-arrive .hat-pic { width: 80px; }
.hat-give .hat-pic { width: 104px; }

/* ---------- 0.13.7 (Tyler): High scores, from the ⋯ menu ---------- */
.hs-sheet { z-index: 32; }
.hs-sheet .admin-head { padding-bottom: 2px; }
.hs-tabs-wrap { flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 6px 16px 4px; }
.hs-tabs-wrap::-webkit-scrollbar { display: none; }
.hs-tabs { position: relative; display: flex; gap: 4px; width: max-content; min-width: 100%; padding: 4px; border-radius: 999px; background: var(--fill); box-sizing: border-box; }
.hs-tabs button { position: relative; z-index: 1; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color .3s; -webkit-tap-highlight-color: transparent; }
.hs-tabs button svg { width: 16px; height: 16px; flex: none; }
.hs-tabs button[aria-selected="true"] { color: #fff; }
.hs-ink { position: absolute; z-index: 0; left: 0; top: 4px; height: 36px; border-radius: 999px; background: var(--accent); pointer-events: none;
  transition: transform .45s cubic-bezier(.3,1.25,.4,1), width .45s cubic-bezier(.3,1.25,.4,1); }
.hs-subs { flex: none; display: flex; gap: 8px; padding: 8px 16px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hs-subs::-webkit-scrollbar { display: none; }
.hs-subs[hidden] { display: none; }
.hs-subs button { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--fill); transition: background-color .25s, color .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.hs-subs button[aria-selected="true"] { background: var(--text); color: var(--surface-solid); box-shadow: none; }
.hs-subs.two { display: grid; grid-template-columns: 1fr 1fr; }
.hs-body { padding-top: 4px; touch-action: pan-y; }
.hs-page.fade { animation: hsFade .3s ease both; }
.hs-page.from-right { animation: hsRight .38s cubic-bezier(.2,.9,.25,1) both; }
.hs-page.from-left { animation: hsLeft .38s cubic-bezier(.2,.9,.25,1) both; }
@keyframes hsFade { from { opacity: 0; } }
@keyframes hsRight { from { opacity: 0; transform: translateX(28px); } }
@keyframes hsLeft { from { opacity: 0; transform: translateX(-28px); } }
.hs-cap { margin: 8px 4px 4px; font-size: 13px; color: var(--text-2); }

/* the podium: 2nd, 1st, 3rd */
.hs-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 8px; margin: 10px 0 14px; }
.hs-step { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.hs-step .fp-head.hs-big { width: 62px; height: 62px; }
.hs-step.s1 .fp-head.hs-big { width: 78px; height: 78px; }
.hs-crown { position: relative; z-index: 1; margin-bottom: -10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2.5px var(--group); }
.hs-crown.gold, .hs-rank.gold { background: #e9b824; }
.hs-crown.silver, .hs-rank.silver { background: #a3adb8; }
.hs-crown.bronze, .hs-rank.bronze { background: #c98a52; }
.hs-pname { max-width: 100%; margin: 6px 0 6px; font-size: 14px; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-bar { width: 100%; display: flex; justify-content: center; padding-top: 10px; border-radius: 14px 14px 6px 6px; background: var(--surface-solid); box-sizing: border-box; }
.hs-step.s1 .hs-bar { height: 96px; background: #fbefc6; }
.hs-step.s2 .hs-bar { height: 74px; background: #e7ebef; }
.hs-step.s3 .hs-bar { height: 58px; background: #f3e1d0; }
.hs-step.mine .hs-bar { box-shadow: inset 0 0 0 3px var(--accent); }
.hs-step.mine .hs-pname { color: var(--accent); }
.hs-bar .hs-score { flex-direction: column; align-items: center; color: #1c1c1e; }
.hs-bar .hs-score b { font-size: 22px; }
.hs-step.s1 .hs-bar .hs-score b { font-size: 26px; }
.hs-bar .hs-score small { color: rgba(28,28,30,.6); }

/* the rows */
.hs-list { border-radius: 16px; background: var(--surface-solid); overflow: hidden; }
.hs-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px 8px 10px; box-sizing: border-box; }
.hs-row + .hs-row { border-top: 0.5px solid var(--sep, rgba(120,130,140,.2)); }
.hs-row.mine { background: color-mix(in srgb, var(--accent) 20%, var(--surface-solid)); } /* 0.13.8 (Tyler): your rows in your bird's color, no "You" tag */
.hs-row.mine .hs-name, .hs-row.mine .hs-score b { color: var(--accent); }
.hs-row.mine + .hs-row, .hs-row + .hs-row.mine { border-top-color: transparent; }
.hs-rank { flex: none; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; box-sizing: border-box; }
.hs-rank.gold, .hs-rank.silver, .hs-rank.bronze { color: #fff; }
.hs-row .fp-head { width: 40px; height: 40px; }
.hs-pair { flex: none; display: flex; }
.hs-pair .fp-head + .fp-head { margin-left: -12px; }
.hs-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hs-score { flex: none; display: flex; align-items: baseline; gap: 4px; }
.hs-score b { font-family: var(--round); font-size: 19px; font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.hs-score small { font-size: 12px; font-weight: 600; color: var(--text-2); }
.hs-row .hs-score { flex-direction: column; align-items: flex-end; gap: 0; }
.hs-heart { display: inline-flex; width: 16px; height: 16px; align-self: center; }
.hs-heart svg { width: 100%; height: 100%; }
.hs-score .hs-lv { display: inline-flex; align-items: center; gap: 4px; }
.hs-gap { margin: 18px 4px 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.hs-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; color: var(--text-2); }
.hs-empty svg { width: 40px; height: 40px; color: var(--text-3, #c7c7cc); }
.hs-empty p { margin: 0; font-size: 15px; line-height: 1.4; }
/* loading */
.hs-ghost .hs-ph { display: block; width: 62px; height: 62px; border-radius: 50%; background: var(--fill); margin-bottom: 8px; }
.hs-ghost .s1 .hs-ph { width: 78px; height: 78px; }
.hs-ghost .hs-bar { background: var(--fill) !important; }
.hs-row.hs-ghost { background: var(--surface-solid); border-radius: 16px; margin-top: 8px; }
.hs-ghost .hs-ph.sm { width: 40px; height: 40px; margin: 0; }
.hs-ghost .hs-line { flex: 1; height: 14px; border-radius: 7px; background: var(--fill); }
.hs-ghost { animation: hsPulse 1.2s ease-in-out infinite; }
@keyframes hsPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .hs-page, .hs-ghost { animation: none !important; } .hs-ink { transition: none; } }
@media (prefers-color-scheme: dark) {
  .hs-step.s1 .hs-bar { background: #4a3f1c; } .hs-step.s2 .hs-bar { background: #3a3f45; } .hs-step.s3 .hs-bar { background: #45362a; }
  .hs-bar .hs-score { color: #fff; } .hs-bar .hs-score small { color: rgba(255,255,255,.65); }
}

/* ---------- 0.13.7 (Tyler): Troubleshoot, from the ⋯ menu ---------- */
.dg-sheet { z-index: 32; }
.dg-send { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 4px; padding: 16px; border-radius: 16px; background: var(--surface-solid); }
.dg-send-t b { display: block; font-size: 17px; margin-bottom: 3px; }
.dg-send-t span { font-size: 14px; line-height: 1.35; color: var(--text-2); }
.dg-send-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; }
.dg-send-btn svg { width: 20px; height: 20px; }
.dg-send-btn:active { scale: .98; }
.dg-check { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.dg-check + .dg-check { border-top: 0.5px solid var(--sep, rgba(120,130,140,.2)); }
.dg-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.dg-dot.ok { background: #34c759; } .dg-dot.bad { background: #ff3b30; } .dg-dot.unk { background: #c7c7cc; }
.dg-ct { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dg-ct b { font-size: 15px; font-weight: 600; }
.dg-ct small, .dg-test-t small { font-size: 13px; color: var(--text-2); line-height: 1.3; }
.dg-code { flex: none; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); background: var(--fill); padding: 3px 7px; border-radius: 6px; }
.dg-test { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 13px 14px; border-radius: 14px; background: var(--surface-solid); text-align: left; }
.dg-test:disabled { opacity: 1; }
.dg-test:disabled b { color: var(--accent); }
.dg-test-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dg-test-t b { font-size: 16px; font-weight: 600; color: var(--accent); }
.dg-chev { font-size: 22px; color: var(--text-3, #c7c7cc); }
.dg-item { padding: 12px 14px; }
.dg-item + .dg-item { border-top: 0.5px solid var(--sep, rgba(120,130,140,.2)); }
.dg-ih { display: flex; align-items: center; gap: 8px; }
.dg-ih b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.dg-ih small { flex: none; font-size: 12px; color: var(--text-2); }
.dg-n { flex: none; font-size: 12px; font-weight: 700; color: var(--text-2); }
.dg-item p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.dg-more { display: block; width: 100%; margin: 8px 0 0; padding: 12px; border-radius: 14px; background: var(--surface-solid); color: var(--accent); font-size: 15px; font-weight: 600; }
.dg-none p { margin: 0; padding: 14px; font-size: 15px; color: var(--text-2); }
.dg-foot { margin: 14px 4px 0; font-size: 12px; color: var(--text-2); text-align: center; }

/* ---------------- 0.14.0: the market (approved scene, Tyler 2026-11-20: a swipe row of four stalls) ---------------- */
.market-screen { z-index: 30; --mk-sheet: 196px; --mk-pathh: 150px; --mk-sw: 214px; --mk-gap: 46px; background: #efe0bf; touch-action: none; }
.mk-sky { position: absolute; inset: 0 0 auto 0; height: 70%; background: radial-gradient(130% 100% at 50% 0%, #e6f4f7 0%, #c6e6ef 50%, #b0dbe8 100%); }
.mk-glow { position: absolute; width: 300px; height: 220px; left: 50%; top: 7%; translate: -50% 0; border-radius: 50%; background: #fff3cf; filter: blur(70px); opacity: .75; }
.mk-ground { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--mk-sheet) + var(--mk-pathh) + 14px + var(--mk-sw) * .7); background: #efe0bf; }
.mk-hedge { position: absolute; left: -20px; width: calc(100% + 40px); bottom: calc(var(--mk-sheet) + var(--mk-pathh) + 14px + var(--mk-sw) * .66); height: calc(var(--mk-sw) * .37); z-index: 2; }
.mk-h1 { fill: #9ccb8e; } .mk-h2 { fill: #8bbf7e; }
.mk-bunting { position: absolute; left: -15px; width: calc(100% + 30px); top: calc(108px + env(safe-area-inset-top) * .3); height: 52px; z-index: 3; }
.mk-path { position: absolute; left: 0; right: 0; bottom: calc(var(--mk-sheet) - 2px); height: var(--mk-pathh); background: #e6cfa2; z-index: 3; }
.mk-path::before, .mk-path::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background: #d8bd8a; }
.mk-path::before { top: 0; } .mk-path::after { bottom: 0; }
.mk-cob { position: absolute; inset: 10px 0; background-image: radial-gradient(ellipse at center, #dcc392 0 38%, transparent 40%); background-size: 34px 20px; opacity: .85; }
.mk-cob.b { background-position: 17px 10px; }
.mk-swipe { position: absolute; left: 0; right: 0; bottom: calc(var(--mk-sheet) + var(--mk-pathh) + 14px); height: calc(var(--mk-sw) * 1.4); z-index: 10; overflow: visible; outline: none; }
.mk-track { position: absolute; left: 0; bottom: 0; display: flex; align-items: flex-end; will-change: transform; }
.mk-gap { width: var(--mk-gap); flex: none; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.mk-gap svg { width: 46px; height: 60px; }
.mk-stall { position: relative; flex: none; width: var(--mk-sw); height: calc(var(--mk-sw) * 1.4); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mk-awn { position: absolute; left: -6%; width: 112%; top: 0; height: 24.7%; z-index: 5; }
.mk-back { position: absolute; left: 6%; right: 6%; top: 16%; bottom: 20%; }
.mk-post { position: absolute; top: 13%; bottom: 10%; width: 4%; border-radius: 4px; z-index: 4; }
.mk-post.l { left: 4%; } .mk-post.r { right: 4%; }
.mk-who { position: absolute; left: 50%; top: 15%; width: 70%; aspect-ratio: 262 / 370; translate: -50% 0; z-index: 2; }
.mk-who .birdbox { position: absolute; left: -9%; top: -5.4%; width: 122%; height: 108%; }
.mk-counter { position: absolute; left: 0; right: 0; bottom: 10%; height: 32%; z-index: 6; }
.mk-ctop { height: 12.5%; background: #b98a5a; border-radius: 6px; }
.mk-cfront { height: 87.5%; margin: 0 8px; border-radius: 0 0 8px 8px; background: #d6a874; background-image: repeating-linear-gradient(90deg, transparent 0 44px, #c99a66 44px 47px); }
.mk-slots { position: absolute; left: 6%; right: 6%; bottom: 39%; display: flex; justify-content: space-around; align-items: flex-end; z-index: 7; }
.mk-slot { position: relative; width: 31%; display: flex; flex-direction: column; align-items: center; }
.mk-slot .mk-it { width: 100%; height: auto; }
.mk-slot.gone { opacity: .35; }
.mk-rar { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; max-width: calc(100% + 3px); box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 700; letter-spacing: -.01em; line-height: 14px; color: #fff; border-radius: 8px; padding: 1px 4px; white-space: nowrap; } /* 0.14.3: centred under its own item, never wider than its slot */
.mk-rar.common { background: #7d8b84; } .mk-rar.uncommon { background: #3e8ed0; } .mk-rar.rare { background: #8b5cf6; } .mk-rar.special { background: #e2a020; }
.mk-cloth { position: absolute; left: 4%; right: 4%; top: 18%; bottom: 13%; z-index: 7; border-radius: 3px 3px 0 0; background: #d9c6a8; display: flex; justify-content: space-evenly;
  -webkit-mask: radial-gradient(10px 7px at 50% 100%, #0000 98%, #000) 0 0 / 20% 100% repeat-x; mask: radial-gradient(10px 7px at 50% 100%, #0000 98%, #000) 0 0 / 20% 100% repeat-x; }
.mk-cloth i { width: 2px; height: 100%; background: #c8b392; }
.mk-sign { position: absolute; bottom: 0; left: 50%; translate: -50% 0; z-index: 8; display: flex; gap: 6px; align-items: baseline; padding: 5px 14px; border-radius: 14px; background: #fff; color: #1f2a2e; font-weight: 800; font-size: 14px; white-space: nowrap; }
.mk-sign span { font-weight: 600; font-size: 11.5px; opacity: .6; }
.mk-sign.mine { background: #1f2a2e; color: #fff; }
.mk-stall.covered .mk-sign:not(.mine) { color: #8a7a64; font-weight: 700; }
.mk-me { position: absolute; left: 50%; bottom: calc(var(--mk-sheet) + var(--mk-pathh) * .17); width: 118px; translate: -50% 0; z-index: 20; pointer-events: none; }
.mk-walker { position: relative; width: min(118px, calc(var(--mk-pathh) * .76)); /* 0.14.3: about 23% bigger (Tyler) */ aspect-ratio: 262 / 370; transform: scaleX(-1); transform-origin: 50% 100%; }
.mk-me.left .mk-walker { transform: none; }
.mk-walker .birdbox { position: absolute; left: -9%; top: -5.4%; width: 122%; height: 108%; }
.mk-shadow { position: absolute; left: 2px; right: 2px; bottom: -6px; height: 14px; border-radius: 50%; background: rgba(80,60,30,.18); }
.mk-me.walking .mk-walker { animation: mkWalk .32s ease-in-out infinite; }
@keyframes mkWalk { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -5px; rotate: 3deg; } }
@media (prefers-reduced-motion: reduce) { .mk-me.walking .mk-walker { animation: none; } }
.mk-dots { position: absolute; left: 0; right: 0; bottom: calc(var(--mk-sheet) + 10px); display: flex; justify-content: center; gap: 7px; z-index: 12; }
.mk-dots i { width: 7px; height: 7px; border-radius: 4px; background: #c9ad7a; transition: width .3s, background .3s; }
.mk-dots i.on { width: 20px; background: #66798f; }
.mk-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: var(--mk-sheet); z-index: 40; padding: 12px 22px calc(20px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--surface-solid); }
.mk-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto 14px; }
.mk-sheet h2 { margin: 0 0 3px; font-size: 21px; color: var(--text); }
.mk-sheet p { margin: 0 0 14px; font-size: 15px; line-height: 1.35; color: var(--text-2); }
.mk-sheet .btn { width: 100%; }
.mk-sheet .btn:disabled { opacity: .45; }
.mk-top { z-index: 30; }
.mk-pill { height: 44px; padding: 0 18px; border-radius: 22px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface-solid); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; box-shadow: 0 0 0 1px var(--bezel); }
.mk-pill svg { width: 18px; height: 18px; margin-left: -6px; }
.mk-say { bottom: 96%; }
@media (prefers-color-scheme: dark) {
  .market-screen { background: #3a3127; }
  .mk-sky { background: radial-gradient(130% 100% at 50% 0%, #2c3b47 0%, #22313c 60%, #1d2a33 100%); }
  .mk-glow { background: #6b5d3a; opacity: .35; }
  .mk-ground { background: #3a3127; } .mk-path { background: #4a3d2c; } .mk-path::before, .mk-path::after { background: #57482f; }
  .mk-cob { background-image: radial-gradient(ellipse at center, #54452f 0 38%, transparent 40%); }
  .mk-h1 { fill: #3f6a45; } .mk-h2 { fill: #36603c; }
  .mk-dots i { background: #6d5c45; }
}
/* the stall card */
.mk-hooks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; padding-top: 10px; border-top: 4px solid var(--mk-counter, #b8875c); }
.mk-hook { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 6px 10px; border-radius: 14px; background: var(--fill); color: var(--text); font: inherit; transition: scale .2s cubic-bezier(.3,1.4,.5,1), box-shadow .2s; }
.mk-hook:active { scale: .96; }
.mk-hook.on { background: var(--surface-solid); box-shadow: 0 0 0 2px var(--accent); }
.mk-hook.gone { opacity: .5; }
.mk-peg { position: absolute; top: -10px; left: 50%; width: 8px; height: 12px; translate: -50% 0; border-radius: 4px; background: #9a7552; }
.mk-hook .neck-pic { width: 72px; height: 54px; }
.mk-hname { font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.mk-gone { font-size: 11px; font-weight: 700; color: var(--text-2); }
.mk-new { text-align: center; margin: 8px 0 2px; }
.mk-cross { position: relative; height: 70px; margin-top: 8px; }
.mk-cross > span { position: absolute; top: 6px; width: 72px; height: 54px; }
.mk-x-hat { left: 8%; animation: mkCrossR .9s cubic-bezier(.5,0,.3,1) forwards; }
.mk-x-neck { left: calc(92% - 72px); animation: mkCrossL .9s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes mkCrossR { 50% { left: calc(50% - 36px); top: -8px; } 100% { left: calc(92% - 72px); top: 6px; } }
@keyframes mkCrossL { 50% { left: calc(50% - 36px); top: 20px; } 100% { left: 8%; top: 6px; } }
@media (prefers-reduced-motion: reduce) { .mk-x-hat, .mk-x-neck { animation: none; } }
.neck-pic { width: 100%; height: auto; display: block; }
.hat-cell.lost .neck-pic, .hat-cell.lost .hat-pic { filter: brightness(0); opacity: .16; }
/* neckwear that moves (Special) */
.nx-glow { animation: nxGlow 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nxGlow { 0%,100% { opacity: .25; transform: scale(.85); } 50% { opacity: .5; transform: scale(1.1); } }
.nx-flutter { animation: nxFlutter 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: left center; }
@keyframes nxFlutter { 0%,100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-6deg) scaleX(.94); } }
.nx-blink { animation: nxBlink 1.6s ease-in-out infinite; }
@keyframes nxBlink { 0%,100% { opacity: .1; } 50% { opacity: .7; } }
.nx-spin { animation: nxSpin 4s linear infinite; transform-box: view-box; }
@keyframes nxSpin { to { transform: rotate(360deg); } }
.nx-swing { animation: nxSwing 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes nxSwing { 0%,100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.nx-twinkle { animation: nxTwinkle 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nxTwinkle { 0%,100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
.nx-rise { animation: nxRise 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nxRise { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5px) scale(1.12); } }
.nx-pulse { animation: nxPulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 40%; }
@keyframes nxPulse { 0%,100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.nx-hue { animation: nxHue 6s linear infinite; }
@keyframes nxHue { to { filter: hue-rotate(360deg); } }
.nx-snow { animation: nxSnow 3s ease-in-out infinite; transform-box: fill-box; }
@keyframes nxSnow { 0% { transform: translateY(-2px); opacity: .4; } 50% { opacity: 1; } 100% { transform: translateY(3px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .nx-glow, .nx-flutter, .nx-blink, .nx-spin, .nx-swing, .nx-twinkle, .nx-rise, .nx-pulse, .nx-hue, .nx-snow { animation: none; } }
@media (prefers-reduced-motion: reduce) { [class*="nx-"] { animation: none !important; } }

/* 0.14.0: small explanations */
.intro-pic { width: 120px; height: 90px; margin: 4px auto 6px; }
.intro-pic svg { width: 100%; height: 100%; }
.intro-i { width: 32px; height: 32px; margin-left: auto; margin-right: 6px; border-radius: 50%; color: var(--text-2); display: grid; place-items: center; }
.intro-i svg { width: 22px; height: 22px; }
.intro-i[hidden] { display: none; }
.learn-pop.heard-pop { top: 34%; padding: 5px 11px; font-size: 14px; color: var(--text-2); box-shadow: 0 4px 12px rgba(0,0,0,.06), 0 0 0 1px var(--bezel); }
.learn-pop.heard-pop span { color: var(--text); }
.learn-pop.heard-pop i { font-style: normal; font-weight: 500; font-size: 13px; }
.fp-delta { white-space: nowrap; }
.today-drop { position: absolute; left: 50%; top: calc(10px + env(safe-area-inset-top)); z-index: 40; width: min(360px, calc(100% - 24px)); translate: -50% -140%; opacity: 0; pointer-events: none;
  transition: translate .55s cubic-bezier(.2,.9,.25,1.05), opacity .3s ease; touch-action: none; }
.today-drop.show { translate: -50% 0; opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .today-drop { transition: opacity .2s; } }
.td-card { position: relative; padding: 14px 16px 16px; border-radius: 22px; background: var(--surface-solid); box-shadow: 0 10px 30px rgba(0,0,0,.12), 0 0 0 1px var(--bezel); }
.td-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.td-hi { margin: 4px 0 8px; font-size: 16px; font-weight: 600; color: var(--text); }
.td-quiet { margin: 0; font-size: 14px; color: var(--text-2); }
.td-lines { display: grid; gap: 2px; }
.td-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 4px; border-radius: 12px; font: inherit; font-size: 15px; color: var(--text); text-align: left; }
.td-line:active { background: var(--fill); }
.td-line span:not(.td-ic):not(.td-hat) { flex: 1; }
.td-ic, .td-hat { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.td-ic svg { width: 17px; height: 17px; }
.td-hat .hat-pic { width: 26px; }
.td-hat.lost .hat-pic { filter: brightness(0); opacity: .35; }
.td-grab { position: absolute; left: 50%; bottom: 6px; width: 36px; height: 4px; translate: -50% 0; border-radius: 2px; background: var(--fill); }

/* 0.14.0: Tuppence's bust (approved close-up) at the top of her stall card and on the market first-visit card */
.mk-bust { position: relative; height: 128px; margin: 0 0 12px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 90% at 60% 40%, #fff3d4 0%, #f3e6cc 70%); }
.mk-bust .birdbox { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-bust .stage-svg { width: 100%; height: 100%; display: block; }
.mk-bust.intro-bust { height: 120px; margin: 4px 0 14px; }
@media (prefers-color-scheme: dark) { .mk-bust { background: radial-gradient(120% 90% at 60% 40%, #4a4034 0%, #3a332b 70%); } }

/* 0.14.0: Tuppence's swap card (approved design r1). Selection, rings and the Swap button use the bird's color. */
.mk-card { --mk-acc: var(--bird-accent, var(--accent)); }
.mk-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.mk-bust.mk-av { flex: none; width: 66px; height: 66px; margin: 0; border-radius: 50%; }
.mk-tname { flex: 1; min-width: 0; text-align: left; }
.card .mk-tname h2 { margin: 0; font-size: 22px; }
.card .mk-tname p { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.mk-x { flex: none; align-self: flex-start; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--fill); position: relative; cursor: pointer; }
.mk-x::before, .mk-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 1px; background: var(--text-2); translate: -50% -50%; rotate: 45deg; }
.mk-x::after { rotate: -45deg; }
.mk-rail { height: 7px; margin: 0 -4px -3px; border-radius: 4px; background: #b8875c; }
.mk-card .mk-hooks { border-top: 0; margin: 0 0 14px; padding-top: 0; gap: 8px; }
.mk-card .mk-hook { padding: 16px 6px 10px; border: 0; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); cursor: pointer; }
.mk-card .mk-hook.on { background: color-mix(in srgb, var(--mk-acc) 12%, var(--surface-solid)); box-shadow: inset 0 0 0 2.5px var(--mk-acc); }
.mk-card .mk-peg { top: -4px; }
.mk-lbl { text-align: left; font-size: 14px; font-weight: 700; color: var(--text-2); margin: 0 2px 8px; }
.mk-spares { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 14px; max-height: 236px; overflow-y: auto; }
.mk-spare { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.mk-spare.on { background: color-mix(in srgb, var(--mk-acc) 12%, var(--surface-solid)); box-shadow: inset 0 0 0 2.5px var(--mk-acc); }
.mk-spare svg { width: 54px; height: 44px; }
.mk-sname { font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; }
.mk-n { position: absolute; top: 5px; right: 8px; font-size: 11px; font-weight: 700; color: var(--text-2); }
.mk-empty { text-align: left; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); color: var(--text-2); font-size: 14px; line-height: 1.4; }
.mk-card .btn.mk-go { background: var(--mk-acc); }
.card .mk-fine { margin: 10px 4px 0; font-size: 12px; color: var(--text-2); text-align: center; }
@media (prefers-color-scheme: dark) {
  .mk-card .mk-hook, .mk-spare, .mk-empty { background: var(--fill); }
}
.card.mk-card { background: var(--surface-solid); }

/* 0.14.1: What's new titles. The card's big title is the big update's; in Earlier updates it sticks on top and swaps as you scroll. */
.wn-sticky { position: sticky; top: -1px; z-index: 2; display: grid; gap: 1px; margin: -4px -16px 10px; padding: 10px 20px 12px;
  background: var(--group); border-bottom: 1px solid var(--separator); }
.wn-st-v { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.wn-st-t { font-family: var(--round); font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
.wn-sticky.swap .wn-st-v, .wn-sticky.swap .wn-st-t { animation: wnSwap .38s cubic-bezier(.2,.9,.25,1); }
@keyframes wnSwap { from { opacity: 0; translate: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .wn-sticky.swap .wn-st-v, .wn-sticky.swap .wn-st-t { animation: none; } }
.card .wn-scroll .wn-older:first-child { margin-top: 0 !important; }

/* 0.14.1: one top bar for every place (like the market): ‹ Map, the name centered, (i) */
.tb-top { z-index: 30; }
.tb-pill { height: 44px; padding: 0 18px; border-radius: 22px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface-solid); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; box-shadow: 0 0 0 1px var(--bezel); }
.tb-back { cursor: pointer; transition: transform .2s cubic-bezier(.3,1.4,.5,1); }
.tb-back:active { transform: scale(.94); }
.tb-back svg { width: 18px; height: 18px; margin-left: -6px; }
.tb-title { position: absolute; left: 50%; translate: -50% 0; white-space: nowrap; pointer-events: none; }
/* 0.14.1: the lake's fish count and tilt switch moved off the top bar, into a small row under the instructions */
.lake-row { position: absolute; left: 0; right: 0; top: calc(146px + env(safe-area-inset-top)); display: flex; justify-content: center; gap: 8px; z-index: 3; pointer-events: none; }
.lake-row > * { pointer-events: auto; }
.lake-row .lake-pill { height: 34px; padding: 0 13px; font-size: 14px; gap: 7px; }
.lake-row .lake-pill svg { width: 19px; height: 11px; }
.lake-row .lake-tilt { width: auto; border-radius: 17px; color: var(--text-2); font-weight: 600; cursor: pointer; }
.lake-row .lake-tilt svg { width: 17px; height: 17px; color: currentColor; }
.lake-row .lake-tilt.on { background: var(--accent); color: #fff; box-shadow: none; }
.lake-chips { top: calc(192px + env(safe-area-inset-top)); }
/* 0.14.1: the lake's heading, instructions, count/tilt row and caught words stack under the top bar (a long heading can't overlap) */
.lake-head { position: absolute; left: 16px; right: 16px; top: calc(74px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 3; pointer-events: none; }
.lake-head > .lake-title, .lake-head > .lake-hint, .lake-head > .lake-row, .lake-head > .lake-chips { position: static; left: auto; right: auto; top: auto; }
.lake-head > .lake-title { line-height: 1.15; }
.lake-head > .lake-row { margin-top: 6px; }
.lake-head > .lake-chips { margin-top: 4px; width: 100%; }

/* 0.14.1: golden goldfish, one entry; From friends window */
.inv-gold-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-from { border: 0; background: var(--accent-soft, rgba(10,132,255,.12)); color: var(--accent, #0a84ff); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.gf-list { margin-top: 14px; text-align: left; }
.gf-row { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.gf-row .fp-head, .gf-head { width: 36px; height: 36px; flex: none; }
.gf-me svg { width: 36px; height: 36px; display: block; }
.gf-name { flex: 1; font-weight: 600; }
.gf-n { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- 0.14.2: player stalls (approved looks: market-design-0142 player-stalls-r1) ---------- */
.mk-pslots { align-items: flex-end; bottom: 40%; }
.mk-pslot { position: relative; width: 30%; aspect-ratio: 1 / .8; border: 0; padding: 0; background: none; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mk-pslot .mk-pit { width: 100%; height: auto; max-height: 100%; display: block; filter: drop-shadow(0 2px 0 rgba(90, 60, 30, .18)); transition: scale .2s cubic-bezier(.3, 1.4, .5, 1); }
.mk-pslot:active .mk-pit { scale: .92; }
.mk-pslot.empty { border: 2px dashed color-mix(in srgb, #8a6a45 55%, transparent); border-radius: 12px; align-items: center; aspect-ratio: 1 / .78; }
.mk-pslot.empty span { font-size: 24px; font-weight: 600; color: #8a6a45; line-height: 1; }
.mk-pslot.none { cursor: default; }
.mk-pbadge { position: absolute; top: -8px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ff3b30; color: #fff; font-size: 12.5px; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.mk-pbadge.static { position: static; box-shadow: none; flex: none; }
.mk-stall.player .mk-who { top: 17.5%; width: 67%; } /* 0.15.2 (Tyler: heads were cut off by the awning): lower and a bit bigger, just under Tuppence's size, so the head and some of the hat show */
.mk-stall.player .mk-who .birdbox { position: absolute; left: -9%; top: -5.4%; width: 122%; height: 108%; }
.mk-sh-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mk-sh-row h2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mk-sh-badge { font-size: 12.5px; font-weight: 700; color: #fff; background: #ff3b30; border-radius: 10px; padding: 3px 8px; white-space: nowrap; }
.mk-sh-link { flex: none; border: 0; background: none; padding: 4px 0; color: var(--bird-accent, var(--accent)); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
/* the cards */
.ps-card { text-align: left; }
.ps-head { display: flex; align-items: flex-start; gap: 12px; margin: 2px 0 14px; }
.ps-head > div { flex: 1; min-width: 0; }
.ps-head h2 { margin: 0 0 3px; font-size: 22px; line-height: 1.15; text-align: left; }
.ps-head p { margin: 0; font-size: 14.5px; color: var(--text-2); text-align: left; }
.ps-to .fp-head, .ps-ohead .ps-oitem { width: 56px; height: 56px; }
.ps-oitem { flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-oitem svg { width: 42px; height: 34px; }
.ps-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ps-slot { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 96px; padding: 10px 4px 8px; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-slot.empty { background: color-mix(in srgb, var(--mk-acc) 8%, var(--surface-solid)); border: 2px dashed color-mix(in srgb, var(--mk-acc) 55%, transparent); color: var(--mk-acc); }
.ps-plus { font-size: 26px; font-weight: 600; line-height: 1; }
.ps-off { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #1f2a2e; color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--surface-solid); }
.ps-off svg { width: 13px; height: 13px; }
.ps-pic { width: 58px; height: 46px; display: block; }
.ps-mini { width: 34px; height: 28px; display: block; }
.ps-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--text); }
.ps-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; margin-bottom: 10px; border-radius: 11px; background: var(--fill); }
.ps-tabs button { border: 0; padding: 7px 4px; border-radius: 9px; background: none; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.ps-tabs button[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ps-red { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b30; color: #fff; font-size: 11.5px; line-height: 18px; }
.ps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; max-height: 236px; overflow-y: auto; padding: 3px; }
.ps-cell { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 4px 9px; border: 0; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); font: inherit; cursor: pointer; transition: scale .15s, box-shadow .2s, background .2s; }
.ps-cell:active { scale: .95; }
.ps-cell.on { background: color-mix(in srgb, var(--mk-acc) 12%, var(--surface-solid)); box-shadow: inset 0 0 0 2.5px var(--mk-acc); }
.ps-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--mk-acc); color: #fff; display: grid; place-items: center; }
.ps-check svg { width: 12px; height: 12px; }
.ps-empty { padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); color: var(--text-2); font-size: 14px; line-height: 1.4; }
.ps-want { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 14px; border-radius: 16px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-want > div:first-of-type { display: grid; gap: 5px; justify-items: start; flex: 1; }
.ps-want b { font-size: 18px; }
.ps-wpic { width: 78px; height: 62px; flex: none; }
.ps-wother { display: flex; gap: 6px; }
.ps-wo { border: 0; padding: 4px; border-radius: 10px; background: var(--surface-solid); cursor: pointer; }
.ps-tray { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-tray > span:first-child { font-size: 14px; font-weight: 600; color: var(--text-2); margin-right: 4px; }
.ps-tslot { width: 48px; height: 40px; display: grid; place-items: center; border: 0; padding: 0; border-radius: 10px; background: var(--surface-solid); cursor: pointer; }
.ps-tslot.empty { background: none; border: 2px dashed color-mix(in srgb, var(--text-3, #999) 60%, transparent); cursor: default; }
.ps-offers { display: grid; margin-bottom: 6px; }
.ps-orow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--separator); }
.ps-orow .fp-head { width: 40px; height: 40px; }
.ps-oname { font-weight: 600; font-size: 16px; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-ogive { display: flex; gap: 6px; flex: 1; justify-content: flex-start; }
.ps-og { border: 0; padding: 4px; border-radius: 10px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); cursor: pointer; transition: box-shadow .2s; }
.ps-og.on { box-shadow: inset 0 0 0 2.5px var(--mk-acc); background: color-mix(in srgb, var(--mk-acc) 12%, var(--surface-solid)); }
.ps-trade { flex: none; border: 0; padding: 8px 16px; border-radius: 10px; background: var(--mk-acc); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.ps-trade:disabled { opacity: .5; }
.ps-decline { display: block; margin: 8px auto 0; border: 0; background: none; color: #d0342c; font: inherit; font-size: 16px; font-weight: 700; padding: 8px 16px; cursor: pointer; }
.ps-res { display: flex; justify-content: center; margin-bottom: 8px; }
.ps-res .fp-head { width: 64px; height: 64px; }
.ps-swap { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 16px; }
.ps-swap > span { width: 84px; height: 72px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-swap > i { width: 24px; height: 24px; color: var(--text-2); }
.ps-swap > i svg { width: 100%; height: 100%; }
.ps-mlist { display: grid; max-height: 50vh; overflow-y: auto; }
.ps-mrow { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--separator); background: none; font: inherit; color: inherit; text-align: left; width: 100%; }
.ps-mrow.done { opacity: .72; }
.ps-mrow .fp-head { width: 40px; height: 40px; }
.ps-mitem { cursor: pointer; }
.ps-mtext { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ps-mtext b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-msub { font-size: 13.5px; color: var(--text-2); }
.ps-mgive { display: flex; gap: 4px; }
.ps-mg { padding: 2px; border-radius: 8px; background: color-mix(in srgb, #f3ead9 70%, var(--surface-solid)); }
.ps-mg.took { box-shadow: inset 0 0 0 2px #34a853; }
.ps-mg .ps-mini { width: 28px; height: 22px; }
.ps-back { flex: none; border: 0; padding: 7px 12px; border-radius: 10px; background: var(--fill); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ps-state { flex: none; font-size: 13px; font-weight: 700; color: var(--text-2); }
.ps-state.done { color: #2f8f4e; }

.sm-red { position: absolute; left: 62%; top: 4px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #ff3b30; color: #fff; font-size: 13px; font-weight: 800; line-height: 24px; text-align: center; box-shadow: 0 0 0 2.5px #fff; z-index: 3; pointer-events: none; }
.td-ic.td-red { background: none; }
.td-red::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #ff3b30; }

/* ---------- 0.14.2: SiriBird Online as tiles (approved r2). Flat tiles in shades of the bird's color; red only when something waits on you. ---------- */
.online-sheet { --ot-a: var(--bird-accent, #5f7590); }
/* SiriBird Online tiles r3 (design thread 2026-11-21). Drop-in for the 0.14.2 .ot-* rules. */
.online-sheet { --ot-a: var(--bird-accent, #5f7590); --ot-gap: 10px; --ot-pad: 12px; --ot-row: 88px; --ot-r: 20px; --ot-cut: var(--ot-a); --sheet-bg: var(--group, #f2f2f7); }

/* 1. Header: stays put, the list scrolls and clips under it */
.ot-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ot-head { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 8px 16px 12px; background: var(--sheet-bg); }
.ot-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .5px; background: rgba(60, 60, 67, .29); opacity: 0; transition: opacity .2s; }
.ot-head.scrolled::after { opacity: 1; } /* toggled by an IntersectionObserver on a 1px sentinel above the grid */
.ot-hicon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ot-a); color: #fff; }
.ot-hicon .ot-ic { width: 24px; height: 24px; }
.ot-htext { min-width: 0; }
.ot-eyebrow { display: block; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--text-2, rgba(60, 60, 67, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-title { display: block; margin: 0; color: var(--text); font-size: 24px; font-weight: 800; line-height: 28px; letter-spacing: -.02em; white-space: nowrap; }
.ot-done { border: 0; background: none; padding: 8px 0 8px 8px; font: inherit; font-size: 17px; font-weight: 600; color: var(--ot-a); }

/* 2. Grid: 4 equal columns, 16 px outer margins, 10 px gutters, 88 px rows */
.ot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--ot-row); gap: var(--ot-gap); padding: 4px 16px 0; }
.ot-w2 { grid-column: span 2; }
.ot-w4 { grid-column: 1 / -1; }
.ot-h2 { grid-row: span 2; }

/* 3. Every tile: 12 px padding all round, content top-left, label row pinned to the bottom-left */
.ot-tile { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; padding: var(--ot-pad); border: 0; border-radius: var(--ot-r); background: var(--ot-a); color: #fff; font: inherit; text-align: left; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: scale .18s cubic-bezier(.3, 1.4, .5, 1), filter .2s; }
.ot-tile:active { scale: .965; filter: brightness(.95); }
.ot-lines { display: flex; flex-direction: column; min-width: 0; }
.ot-l1, .ot-l2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-l1 { font-size: 15px; font-weight: 700; line-height: 20px; }
.ot-l2 { font-size: 13px; font-weight: 500; line-height: 17px; opacity: .82; }
.ot-corner .ot-lines { padding-right: 32px; } /* room for the top-right slot */
.ot-lbl { display: flex; align-items: center; gap: 6px; margin-top: auto; min-width: 0; font-size: 13px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.ot-lbl > span { overflow: hidden; text-overflow: ellipsis; }
.ot-ic { width: 18px; height: 18px; flex: none; }
.ot-big { display: block; font-size: 34px; font-weight: 800; line-height: 36px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* top-right slot: one thing only, 28 px, 10 px from the corner (badge, avatar) */
.ot-badge { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ff3b30; color: #fff; font-size: 13px; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.ot-tile > .fp-head { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }

/* small 1x1 tiles: icon and label centred */
.ot-small { align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.ot-small .ot-ic { width: 24px; height: 24px; }
.ot-small .ot-slbl { font-size: 12px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.ot-small .ot-badge { top: 7px; right: 7px; }

/* colors: shades of the bird color, red only when something waits on you */
.ot-offers { background: color-mix(in srgb, var(--ot-a) 88%, #000); }
.ot-offers.red { background: #ff3b30; }
.ot-so, .ot-boards { background: color-mix(in srgb, var(--ot-a) 78%, #1d2a38); }
.ot-req, .ot-gifts, .ot-trades { background: color-mix(in srgb, var(--ot-a) 72%, #fff); --ot-cut: color-mix(in srgb, var(--ot-a) 72%, #fff); }
.ot-dates { background: var(--surface-solid, #fff); color: var(--text, #1c1c1e); }
.ot-dates .ot-ic { color: #ff4f6d; }
.ot-hs { background: color-mix(in srgb, var(--ot-a) 55%, #1f2c3a); }

/* Friends 2x2 */
.ot-sub { display: block; font-size: 13px; font-weight: 600; line-height: 17px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-heads { display: flex; margin: auto 0 10px; }
.ot-heads .fp-head { width: 36px; height: 36px; margin-right: -8px; box-shadow: 0 0 0 2px var(--ot-a); }
.ot-heads .ot-ghost { width: 36px; height: 36px; margin-right: -8px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .55); }

/* 4. Leaderboards 4x2 */
.ot-hs { padding: 14px; }
.ot-hs-in { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; height: 120px; }
.ot-hs-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ot-hs-l .ot-big { font-size: 32px; line-height: 36px; }
.ot-hs-board { font-size: 13px; font-weight: 600; line-height: 17px; opacity: .9; }
.ot-hs-r { display: grid; grid-template-rows: repeat(3, 36px); gap: 6px; min-width: 0; }
.ot-hs-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 10px 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 14px; font-weight: 600; line-height: 18px; }
.ot-hs-row.mine { background: rgba(255, 255, 255, .24); }
.ot-hs-rank { flex: none; min-width: 18px; text-align: center; opacity: .75; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ot-hs-row .fp-head { flex: none; width: 24px; height: 24px; }
.ot-hs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-hs-v { flex: none; font-variant-numeric: tabular-nums; opacity: .9; }
.ot-hs-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.ot-hs-foot .ot-lbl { margin-top: 0; }
.ot-dots { position: relative; display: flex; gap: 6px; }
.ot-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.ot-dots b { position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 3px; background: #fff; transform: translateX(calc(var(--i, 0) * 12px)); transition: transform .32s cubic-bezier(.3, .7, .2, 1); }

/* page change: old content fades up and out (160 ms), new content rises 8 px and fades in (280 ms),
   rank + board name together, then rows 40 ms apart. The tile never changes size. */
.ot-hs-in.out > * > *, .ot-hs-in.out .ot-hs-row { animation: ot-out .16s cubic-bezier(.4, 0, 1, 1) both; }
.ot-hs-in.in .ot-hs-l > *, .ot-hs-in.in .ot-hs-row { animation: ot-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.ot-hs-in.in .ot-hs-row:nth-child(1) { animation-delay: 40ms; }
.ot-hs-in.in .ot-hs-row:nth-child(2) { animation-delay: 80ms; }
.ot-hs-in.in .ot-hs-row:nth-child(3) { animation-delay: 120ms; }
@keyframes ot-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes ot-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .ot-hs-in.out > * > *, .ot-hs-in.out .ot-hs-row, .ot-hs-in.in .ot-hs-l > *, .ot-hs-in.in .ot-hs-row { animation-name: ot-fade; animation-delay: 0ms; }
  .ot-dots b { transition: none; }
}
@keyframes ot-fade { from { opacity: 0; } }

/* 5. Add and Sync: one slim row under the grid */
.ot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ot-gap); padding: var(--ot-gap) 16px calc(24px + env(safe-area-inset-bottom)); }
.ot-act { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 0; border-radius: 14px; background: var(--surface-solid, #fff); color: var(--ot-a); cursor: pointer; font: inherit; font-size: 15px; font-weight: 600; }
.ot-act .ot-ic { width: 18px; height: 18px; }

/* 0.14.3: app glue for the r3 drop-in */
.online-sheet .ot-scroll { flex: 1; min-height: 0; height: auto; }
.ot-pad { padding: 0 16px 24px; }
.ot-done { cursor: pointer; }
.ot-tile .fp-head { background: #f3e7cd; }
.ot-tile .fp-head::after { box-shadow: none; }
.ot-hs-in { overflow: hidden; }
.ot-hs-row { overflow: hidden; }

/* a tile's window */
.ot-page { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--group-bg, var(--bg, #f2f2f7)); translate: 100% 0; visibility: hidden; transition: translate .32s cubic-bezier(.2, .85, .25, 1), visibility 0s linear .32s; }
.ot-page.show { translate: 0 0; visibility: visible; transition: translate .32s cubic-bezier(.2, .85, .25, 1); }
.ot-page.instant { transition: none; }
.ot-phead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px 8px; }
.ot-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--bird-accent, var(--accent)); font: inherit; font-size: 17px; font-weight: 600; padding: 6px 4px; cursor: pointer; }
.ot-back svg { width: 20px; height: 20px; }
.ot-ptitle { margin: 0; font-size: 18px; font-weight: 700; }
.ot-pbody { flex: 1; overflow-y: auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
.ot-gift .fp-head { width: 38px; height: 38px; margin-right: 10px; }
@media (prefers-reduced-motion: reduce) { .ot-page, .ot-page.show, .ot-hs-in { transition: none; } }
.ot-sub.ot-last { display: flex; min-width: 0; } /* 0.14.3: a long name truncates; the time always shows */
.ot-lastnm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-lastt { flex: none; }

/* ---------- 0.14.3: Drops (a gift that pops up once). Flat choice tiles; the box opens with a little reveal. ---------- */
.dr-card h2 { margin: 4px 0 16px; font-size: 22px; line-height: 28px; letter-spacing: -.01em; } /* 0.14.3 r3: 2 to 3 lines */
.dr-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.dr-choice { margin: 0; height: auto; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 14px; border: 0; border-radius: 20px; background: var(--fill); color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: scale .18s cubic-bezier(.3, 1.4, .5, 1); }
.dr-choice:active { scale: .96; }
.dr-choice b { font-size: 15px; line-height: 1.2; }
.dr-choice > span:last-child { font-size: 12.5px; color: var(--text-2); line-height: 1.25; }
.dr-choice .item-catch { width: 100%; height: 88px; margin: 0 0 6px; border-radius: 16px; }
.dr-boxpic { display: grid; place-items: center; width: 100%; height: 88px; margin-bottom: 6px; border-radius: 16px; background: color-mix(in srgb, #6d5bd0 12%, var(--fill)); }
.dr-box-svg { width: 84px; height: 78px; overflow: visible; }
.dr-boxbtn .dr-box-svg { animation: drWiggle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.dr-fine { position: relative; margin: 0 !important; padding-top: 16px; clear: both; text-align: center; font-size: 13px; color: var(--text-3); }
@keyframes drWiggle { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -6deg; } 82% { rotate: 5deg; } 88% { rotate: -3deg; } 94% { rotate: 1deg; } }
.dr-open { display: grid; place-items: end center; height: 112px; margin-top: 4px; }
.dr-open .dr-box-svg { width: 96px; height: 88px; }
.dr-reveal .dr-lid { transform-box: fill-box; transform-origin: 0% 100%; animation: drLid .7s cubic-bezier(.3, 1.3, .5, 1) .45s both; }
.dr-reveal .dr-q { animation: drFade .2s .45s both; }
.dr-reveal .dr-open { animation: drShake .45s ease-in-out both; }
.dr-hats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.dr-hat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 6px 10px; border-radius: 16px; background: var(--fill); animation: drPop .5s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(1s + var(--d) * 110ms); }
.dr-hatpic { width: 60px; height: 46px; }
.dr-hname { max-width: 100%; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-hat .hat-tag { font-size: 10.5px; padding: 1px 7px; }
.dr-n { position: absolute; top: 6px; right: 7px; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bird-accent, var(--accent)); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
@keyframes drLid { to { transform: translate(-4px, -14px) rotate(-20deg); } }
@keyframes drFade { to { opacity: 0; } }
@keyframes drShake { 0%, 100% { rotate: 0deg; } 20% { rotate: -5deg; } 40% { rotate: 5deg; } 60% { rotate: -3deg; } 80% { rotate: 2deg; } }
@keyframes drPop { from { opacity: 0; transform: translateY(14px) scale(.8); } }
.dr-reveal.still .dr-lid { animation: none; transform: translate(-4px, -14px) rotate(-20deg); }
.dr-reveal.still .dr-open, .dr-reveal.still .dr-q, .dr-reveal.still .dr-hat { animation: none; }
.dr-reveal.still .dr-q { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .dr-boxbtn .dr-box-svg { animation: none; } }

/* ---------------- 0.15.0: the mountain (placeholder art until the finals) ---------------- */
.mountain-screen { z-index: 30; background: #f3f1ec; touch-action: none; }
@media (prefers-color-scheme: dark) { .mountain-screen { background: #1a1f26; } }
.mt-c { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
/* climb final: a fixed golden sky behind a scrolling strip of cliff */
.mt-sky, .mt-sky > div { position: absolute; inset: 0; }
.mt-sky svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-sky-w { opacity: 0; }
.mt-strip { position: absolute; left: 0; top: 0; right: 0; will-change: transform; pointer-events: none; }
.mt-strip svg { display: block; }
.mt-meter { position: absolute; left: 14px; top: calc(env(safe-area-inset-top) + 120px); bottom: calc(env(safe-area-inset-bottom) + 110px); width: 3px; border-radius: 2px; background: rgba(255,255,255,.7); z-index: 6; pointer-events: none; }
.mt-meter[hidden] { display: none; }
.mt-meter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--me, 0%); border-radius: 2px; background: var(--bird-accent, #66798f); }
.mt-meter b, .mt-meter-me { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.6px var(--bird-accent, #66798f); }
.mt-meter-r1 { bottom: var(--r1); } .mt-meter-r2 { bottom: var(--r2); }
.mt-meter .mt-meter-top { bottom: 100%; margin-bottom: 4px; background: #ffd77a; box-shadow: none; }
.mt-meter-me { bottom: var(--me, 0%); width: 11px; height: 11px; margin: 0 0 -5.5px -5.5px; background: var(--bird-accent, #66798f); box-shadow: 0 0 0 2px #fff; }
.mt-bird { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; }
.mt-flip { position: absolute; inset: 0; transform-origin: 50% 80%; }
.mt-flip .birdbox { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mt-flip #lid { display: none; }
.mt-top { z-index: 30; }
.mt-hud { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 26px); z-index: 20; display: flex; gap: 8px; justify-content: center; pointer-events: none; }
.mt-hud .mt-pill { height: 30px; padding: 0 11px; border-radius: 15px; background: rgba(255,255,255,.92); box-shadow: none; color: #62716e; font-size: 13px; gap: 5px; }
.mt-hud .mt-pill b { color: #1f2a2e; }
.mt-hud .mt-tilt { pointer-events: auto; }
.mt-hud .mt-tilt.on { background: var(--bird-accent, #66798f); color: #fff; }
.mt-fishicon { width: 20px; height: auto; }
.mt-hud[hidden] { display: none; }
.mt-pill { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--surface-solid); display: flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--text); box-shadow: 0 0 0 1px var(--bezel); font-variant-numeric: tabular-nums; border: 0; font-family: inherit; }
.mt-tilt { margin-left: auto; pointer-events: auto; cursor: pointer; color: var(--text-2); }
.mt-tilt.on { background: var(--bird-accent, var(--accent)); color: #fff; box-shadow: none; }
.mt-msg { position: absolute; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 64px); z-index: 20; max-width: calc(100% - 120px); text-align: center; font-size: 13px; font-weight: 600; color: #fff; background: var(--bird-accent, #66798f); border-radius: 13px; padding: 6px 12px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.mt-msg.on { opacity: 1; }
.mt-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 22px calc(20px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--surface-solid); transition: transform .35s cubic-bezier(.3,.9,.3,1); }
.mt-sheet[hidden] { display: block; transform: translateY(110%); pointer-events: none; }
.mt-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto 14px; }
.mt-sheet h2 { margin: 0 0 3px; font-size: 21px; color: var(--text); }
.mt-sheet p { margin: 0 0 14px; font-size: 15px; line-height: 1.35; color: var(--text-2); }
.mt-sheet .btn { width: 100%; }
/* the peak (peak r2, transitions r1): a 375 x 812 stage scaled to cover the screen; the UI stays at screen size */
.mt-summit { position: absolute; inset: 0; z-index: 35; opacity: 0; transition: opacity .3s; overflow: hidden; }
.mt-summit.on { opacity: 1; }
.mt-summit[hidden] { display: none; }
.mountain-screen.at-peak .mt-top { z-index: 50; }
.mountain-screen.at-peak .mt-tilt, .mountain-screen.at-peak .mt-hud { display: none; }
.peak-bg { position: absolute; inset: 0; background: radial-gradient(circle at 69% 23%, #fffaf0 0%, #f8dc9c 22%, #efc278 46%, #dcb48a 74%, #cdb9a6 100%); }
.peak-stage { position: absolute; left: 0; top: 0; width: 375px; height: 812px; transform-origin: 0 0; pointer-events: none; }
.peak-scene-box, .peak-scene-box > svg { position: absolute; left: 0; top: 0; width: 375px; height: 812px; overflow: visible; }
.peak-me { position: absolute; left: 0; top: 0; }
.peak-me .stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.peak-me #lid { display: none; }
.peak-spread { display: none; }
.peak-flying .peak-spread { display: inline; }
.peak-flying #wing { display: none; }
/* 0.15.2 (Tyler: the legs "fly off the body" on landing): the real cause. The pivot was only set while flying, so on
   landing it jumped to the svg's corner (0, 0) while the rotation was still easing back, and the legs swung far off
   the body. The pivot is now always at the hips. */
.legs { transform-origin: 190px 312px; }
.peak-flying .legs { transform: rotate(32deg); }
.god-svg .m, .god-svg .lid, .god-svg .baby-shine, .god-svg .unlock-cape, .god-svg .unlock-crown, .god-svg .hat-slot { display: none; }
.god-svg .brow { opacity: 1; }
.god-svg .grow { filter: none !important; }
.god-silver { opacity: 0; transition: opacity 3s ease-in-out; } /* (Tyler, peak r2) back to gold over about 3 s */
.peak-god.fed .god-silver { opacity: 1; transition-duration: 1.5s; } /* gold to silver over about 1.5 s while it eats */
.peak-jar { position: absolute; top: calc(env(safe-area-inset-top) + 76px); /* 0.15.3: a clear gap under the (i) */ right: 18px; width: 40px; height: 42px; background: rgba(255,255,255,.92); border-radius: 13px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.peak-jar-n { position: absolute; bottom: -6px; right: -6px; background: #c98a45; color: #fff; font-weight: 800; font-size: 10px; border-radius: 8px; padding: 1px 5px; }
.peak-plus { position: absolute; top: calc(env(safe-area-inset-top) + 66px); right: 66px; font-weight: 800; color: #c98a45; font-size: 15px; opacity: 0; z-index: 2; }
.peak-word { position: absolute; top: calc(env(safe-area-inset-top) + 60px); left: 18px; max-width: calc(100% - 100px); background: rgba(255,255,255,.95); border-radius: 12px; padding: 6px 11px; display: flex; flex-direction: column; color: #1f2a2e; z-index: 2; }
.peak-word[hidden], .peak-mini[hidden], .peak-sheet[hidden], .peak-paper[hidden], .peak-ok[hidden] { display: none; }
.peak-word b { font-size: 15px; overflow-wrap: anywhere; }
.peak-word span { font-size: 11px; color: #62716e; }
.peak-mini { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 28px); left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.92); border-radius: 14px; font-size: 13px; font-weight: 600; padding: 6px 12px; color: #1f2a2e; white-space: nowrap; z-index: 2; }
.peak-sheet { position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 22px); background: rgba(255,255,255,.95); border-radius: 18px; padding: 12px 12px 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 3; color: #1f2a2e; }
.peak-sheet b { font-size: 16px; }
.peak-sheet .btn, .peak-ok .btn { width: auto; height: 38px; min-height: 0; border-radius: 12px; padding: 0 16px; font-size: 14px; margin: 0; white-space: nowrap; }
.peak-paper { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 84px); display: flex; justify-content: center; z-index: 3; pointer-events: none; }
.peak-paper .bless-paper { max-width: calc(100vw - 30px); height: auto; }
.peak-ok { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 22px); display: flex; justify-content: space-between; align-items: center; z-index: 3; }
.peak-read { background: rgba(255,255,255,.75); border: 0; border-radius: 12px; height: 34px; padding: 0 12px; font: inherit; font-size: 13px; color: #5d5246; }
.peak-white, .peak-veil { position: absolute; inset: 0; background: radial-gradient(circle at 66% 22%, #ffffff 0, #fffdf6 50%, #fbf4e4 100%); opacity: 0; pointer-events: none; z-index: 60; }
.peak-veil { z-index: 200; opacity: 1; }
.peak-fly-layer { position: absolute; inset: 0; }
/* the Blessing paper's ink: IM Fell English, self-hosted */
@font-face { font-family: Fell; font-style: normal; font-display: swap; src: url(../fonts/fell.woff2) format('woff2'); }
@font-face { font-family: Fell; font-style: italic; font-display: swap; src: url(../fonts/fell-i.woff2) format('woff2'); }
.bless-ink { font-family: Fell, Georgia, serif; }
.bless-ink-h { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.bless-ink-t { font-style: italic; line-height: 1.2; }
.bless-ink-w { font-size: 12px; margin-top: 8px; opacity: .75; }
.mt-fly { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; width: 64px; }
.mt-fly.treat { width: 20px; }
.mt-treat { display: block; width: 18px; height: 13px; border-radius: 50%; background: var(--treat); box-shadow: inset 0 0 0 1.5px var(--treat-dark); }
.holy-fish { display: block; width: 100%; height: auto; }
.item-catch.holy .holy-fish { width: 120px; margin: 0 auto; }
.inv-thumb.holy .holy-fish { width: 38px; }
.bless-text { font-size: 19px; line-height: 1.4; font-weight: 600; color: var(--text); }
.bless-words { color: var(--text-2); font-size: 14px; }
.bless-row { flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 10px; padding-bottom: 10px; }
.bless-q { font-size: 15px; line-height: 1.35; color: var(--text); }
/* 0.15.0: The Mountain's intro card picture (map mountain r1) and the map island's glow */
.sm-in svg { overflow: visible; }
.mt-intro-pic { position: relative; width: 100%; max-width: 296px; aspect-ratio: 296 / 160; margin: 4px auto 8px; border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 69% 38%, #fffaf0 0%, #f8dc9c 30%, #efc278 60%, #dcb48a 100%); container-type: inline-size; }
.mt-ip-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-ip-god { position: absolute; left: 32.4%; top: 0; width: 84.5%; }
.mt-ip-god svg { width: 100%; height: auto; display: block; }
.mt-intro-me { position: absolute; left: 6%; top: 22%; width: 22%; aspect-ratio: 320 / 400; transform: scaleX(-1); }
.mt-intro-me .stage-svg { width: 100%; height: 100%; overflow: visible; }
.mt-intro-me #lid { display: none; }
/* 0.15.0 (Tyler): birds with offers on your stall wait in front of it, newest first (up to 3, then +N) */
.mk-visitors { position: absolute; left: -22%; bottom: 8%; width: 100%; height: 62%; z-index: 7; pointer-events: none; }
.mk-visitor { position: absolute; bottom: 0; width: 46%; aspect-ratio: 320 / 400; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; transform-origin: 50% 96%; animation: mk-vidle 3.2s ease-in-out infinite; }
.mk-visitor.v0 { left: 0; z-index: 3; }
.mk-visitor.v1 { left: 24%; bottom: 6%; width: 40%; z-index: 2; animation-delay: -1.1s; }
.mk-visitor.v2 { left: 44%; bottom: 11%; width: 35%; z-index: 1; animation-delay: -2.2s; }
.mk-visitor .birdbox { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); } /* facing the stall */
.mk-visitor .birdbox .stage-svg { width: 100%; height: 100%; }
.mk-visitor:active { transform: scale(.95); }
.mk-vmore { position: absolute; left: 18%; top: 4%; background: #fff; color: #1f2a2e; font-weight: 800; font-size: 12px; border-radius: 10px; padding: 2px 7px; box-shadow: 0 1px 3px rgba(0,0,0,.18); pointer-events: none; }
@keyframes mk-vidle { 0%, 100% { transform: rotate(0deg) translateY(0); } 30% { transform: rotate(-2deg) translateY(-1.5px); } 60% { transform: rotate(1.5deg) translateY(0); } }
@media (prefers-reduced-motion: reduce) { .mk-visitor { animation: none; } }
/* 0.15.1: reads the safe areas for the peak layout */
.peak-safe { position: absolute; left: 0; top: 0; width: 0; height: 0; visibility: hidden; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); pointer-events: none; }
/* 0.15.1 (Tyler: the legs "go crazy" on landing): legs switch between the flying pose and standing quickly and
   smoothly, without the growth spring (which overshot and wobbled every time the bird landed or hopped) */
.mt-me .legs, .peak-me .legs, .mt-me #wing, .peak-me #wing { transition: transform .18s ease-out, stroke-width .18s ease-out; }

/* ---------------- 0.15.2: History (what the bird heard and said) ---------------- */
.hist-btn { position: absolute; z-index: 6; top: calc(16px + 46px + 12px + env(safe-area-inset-top, 0px)); right: 23px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--well); color: var(--accent); box-shadow: 0 0 0 1px var(--bezel) inset; transition: transform .2s cubic-bezier(.3,1.4,.5,1), opacity .3s; }
.hist-btn svg { width: 20px; height: 20px; }
.hist-btn:active { transform: scale(.9); }
.phone:not([data-phase="bird"]) .hist-btn, .phone.outing .hist-btn, .phone.viewing .hist-btn { opacity: 0; pointer-events: none; }
.hist-sheet .admin-body { flex: 1; padding-bottom: 24px; }
.hy-list { padding: 4px 2px 10px; }
.hy-day { margin: 18px 4px 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.hy-day:first-child { margin-top: 6px; }
.hy-session { background: var(--surface-solid); border-radius: 18px; padding: 10px 12px 14px; margin-bottom: 10px; }
.hy-head { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; border-bottom: .5px solid var(--separator); margin-bottom: 10px; }
.hy-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--hy-said, var(--accent)); }
.src-date .hy-ic { background: #c9895b; }
.src-park .hy-ic { background: #6f9d63; }
.hy-ic svg { width: 17px; height: 17px; }
.hy-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hy-t b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hy-t small { font-size: 12.5px; color: var(--text-2); }
.hy-share { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--well); }
.hy-share svg { width: 18px; height: 18px; }
.hy-share:active { transform: scale(.9); }
.hy-lines { display: flex; flex-direction: column; gap: 6px; }
.hy-line { max-width: 80%; padding: 5px 13px 6px; border-radius: 19px; text-align: left; font-size: 16px; font-weight: 500; line-height: 1.22; user-select: text; -webkit-user-select: text; }
.hy-line.heard { align-self: flex-start; background: var(--well); color: var(--text); border-bottom-left-radius: 6px; }
.hy-line.said { align-self: flex-end; background: var(--hy-said, var(--accent)); color: #fff; border-bottom-right-radius: 6px; }
.hy-who { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; opacity: .7; margin-bottom: 1px; }
.hist-sheet:not(.picking) .hy-line { pointer-events: none; }
.hist-sheet.picking .hy-line { transition: opacity .15s, transform .15s; }
.hist-sheet.picking .hy-line:not(.on) { opacity: .38; }
.hist-sheet.picking .hy-line.on { box-shadow: 0 0 0 2px var(--bg-top, #fff), 0 0 0 3.5px var(--hy-said, var(--accent)); }
.hist-sheet.picking .hy-line:active { transform: scale(.96); }
.hy-more { margin: 4px auto 0; display: block; }
.hy-note { margin: 14px 6px 4px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); text-align: center; }
.hy-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 70px 30px 20px; color: var(--text-2); }
.hy-empty svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 6px; }
.hy-empty b { font-size: 19px; color: var(--text); }
.hy-foot { display: none; flex: none; gap: 10px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--surface-solid); border-top: .5px solid var(--separator); }
.hist-sheet.picking .hy-foot { display: flex; }
.hy-foot { align-items: center; justify-content: space-between; box-sizing: border-box; width: 100%; }
/* 0.15.3 (Tyler's iPhone: Cancel sat in the middle and the button ran off the right edge): .btn is width 100%, so
   Cancel took the whole row. Cancel is now its own width on the left, the button fills the rest on the right. */
.hy-foot .btn { margin: 0; min-width: 0; height: 50px; }
.hy-foot .btn.plain { flex: 0 0 auto; width: auto; padding: 0 14px 0 4px; text-align: left; }
.hy-foot .btn[data-make] { flex: 1 1 0; width: auto; max-width: 260px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 16px; }
.hy-hidden { position: absolute; left: -9999px; top: 0; width: 300px; height: 400px; overflow: hidden; pointer-events: none; }
.hy-all { align-self: center; margin: 0 0 4px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--well); }

/* 0.15.2: the Market's card has 3 pages (swipe, dots, Next) */
.ip-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -4px; overscroll-behavior-x: contain; }
.ip-track::-webkit-scrollbar { display: none; }
.ip-page { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; padding: 0 4px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; }
.ip-page .mk-bust.intro-bust { width: 100%; }
.ip-page .intro-pic { width: 100%; height: 120px; margin: 4px 0 14px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(120% 90% at 60% 40%, #fff3d4 0%, #f3e6cc 70%); }
@media (prefers-color-scheme: dark) { .ip-page .intro-pic { background: radial-gradient(120% 90% at 60% 40%, #4a4034 0%, #3a332b 70%); } }
.ip-page .intro-pic svg { width: 160px; height: 120px; }
.ip-page p { min-height: 4.2em; margin-bottom: 4px; }
.ip-dots { display: flex; justify-content: center; gap: 4px; margin: 6px 0 4px; }
.ip-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.ip-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); opacity: .3; transition: opacity .2s, transform .2s; }
.ip-dot.on::before { opacity: 1; background: var(--accent); transform: scale(1.15); }
.ip-note { font-size: 13px; color: var(--text-2); margin: 2px 0 12px; }
/* 0.15.3 (Tyler): stall birds and the birds waiting at your stall are sized by age like on the home screen (an adult is the
   reference; younger birds stand on the same baseline, smaller and lower). The 0.15.2 one-size scaling is gone. */

/* 0.15.4: tap God Bird (once a visit): a big quiet tap target over its head, a faint pulse on the eye */
.peak-godtap { position: absolute; z-index: 4; width: 170px; height: 170px; translate: -50% -50%; border-radius: 50%; background: transparent; padding: 0; -webkit-tap-highlight-color: transparent; }
.peak-godhint { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; translate: -50% -50%; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 246, 214, .75), 0 0 18px 6px rgba(255, 236, 170, .45); animation: peak-godpulse 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes peak-godpulse { 0%, 100% { opacity: .15; scale: .85; } 50% { opacity: .8; scale: 1.15; } }
@media (prefers-reduced-motion: reduce) { .peak-godhint { animation: none; opacity: .5; } }
.peak-said { position: absolute; z-index: 5; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 34px); padding: 14px 18px; border-radius: 18px; background: rgba(251, 246, 234, .94); color: #4a3f33;
  font-family: Fell, Georgia, serif; font-style: italic; font-size: 22px; line-height: 1.25; text-align: center; box-shadow: 0 6px 24px rgba(90, 70, 40, .18); }
.peak-think { position: absolute; z-index: 3; width: 58px; height: 40px; border-radius: 20px; background: #fff; color: #6b6f78; font: 700 26px/34px var(--round, system-ui); text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.12); animation: peak-thinkin .4s ease-out both; }
.peak-think::after { content: ""; position: absolute; left: 34px; bottom: -12px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
@keyframes peak-thinkin { from { opacity: 0; transform: translateY(8px) scale(.8); } to { opacity: 1; transform: none; } }

/* 0.15.4: Blessings in the bag */
.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; padding: 8px 4px 20px; align-items: center; overflow: hidden; }
.bl-paper { padding: 8px; border-radius: 14px; background: transparent; display: block; width: 100%; min-width: 0; margin: 0; }
/* 0.15.6: every paper the same width, its height from its shape (aspect-ratio is set on the svg), all inside the screen */
.bl-paper svg { width: 100% !important; height: auto !important; max-width: 100%; display: block; filter: drop-shadow(0 3px 6px rgba(90, 70, 40, .18)); }
.bl-paper:active { transform: scale(.96); }
.bl-full { margin: 4px auto 14px; display: grid; place-items: center; max-height: 62vh; overflow: hidden; padding: 6px; }
.bl-full svg { width: 100% !important; height: auto !important; max-height: 60vh; }
.bl-tape { display: flex; align-items: center; justify-content: center; gap: 10px; }
.bl-tape-ic { display: inline-flex; width: 34px; height: 21px; }
.bl-tape-ic svg { width: 100%; height: 100%; margin: 0 !important; }
.bl-tape.playing .bl-tape-ic { animation: tape-nudge 1.6s ease-in-out infinite; }
.bag-obj-scroll svg { width: 100%; height: 100%; }

/* 0.15.5 (Tyler): Accessories collection: had before = the real picture, no color, half see-through */
.hat-cell.had .hat-pic, .hat-cell.had .neck-pic { filter: grayscale(1); opacity: .5; }
.acc-had-note { margin-top: -4px; }

/* 0.15.5: "This is your last one" (above any open card) */
.lo-wrap { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; pointer-events: none; }
.lo-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.lo-card { position: relative; width: 100%; max-width: 330px; background: var(--surface-solid, var(--bg-top, #fff)); border-radius: 26px; padding: 22px 20px 18px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); transform: scale(.94); opacity: 0; transition: transform .25s cubic-bezier(.2,.9,.25,1), opacity .2s; pointer-events: auto; }
.lo-wrap.show .lo-scrim { opacity: 1; }
.lo-wrap.show .lo-card { transform: none; opacity: 1; }
.lo-pics { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.lo-pic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; background: rgba(127,127,127,.1); }
.lo-pic svg { width: 54px; height: 54px; }
.lo-card h3 { font-family: var(--round); font-size: 22px; margin: 0 0 6px; color: var(--text); }
.lo-card p { font-size: 15px; line-height: 1.4; color: var(--text-2); margin: 0 0 16px; }
.lo-btns { display: flex; gap: 10px; }
.lo-btns .btn { flex: 1 1 0; width: auto; margin: 0; min-height: 44px; height: 44px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .lo-card, .lo-scrim { transition: none; } }

/* 0.15.6 (Tyler): the open Blessing card is solid, and the window behind it is dimmed more */
.card.bl-card { background: var(--surface-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card.bl-card ~ .scrim.show, .scrim.show:has(~ .card.bl-card.show) { background: rgba(0,0,0,.45); }

/* 0.15.6 (Tyler): "Hold still." then "(name) is fishing." on its own line */
.lake-title { white-space: pre-line; }
/* 0.15.6 (Tyler): what's left in the lake: colored icon + number per kind; a kind at 0 is gone and the row closes up */
.lake-row .lake-counts { gap: 12px; padding: 0 14px; }
.lake-counts[hidden], .lake-counts .lc[hidden] { display: none; }
.lake-counts .lc { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.lake-row .lake-counts .lc svg { width: 18px; height: 18px; flex: none; }
:root { --ic-goldfish: #e9a90c; --ic-fish: #3f8fb5; --ic-accessory: #9b5de5; --ic-trash: #7d8590; } /* 0.15.6 icon rule: each thing's one color */
@media (prefers-color-scheme: dark) { :root { --ic-fish: #6cb6db; --ic-accessory: #b98af0; --ic-trash: #a3aab3; } }
.lake-counts .lc-goldfish svg { color: var(--ic-goldfish); }
.lake-counts .lc-fish svg { color: var(--ic-fish); }
.lake-counts .lc-accessory svg { color: var(--ic-accessory); }
.lake-counts .lc-trash svg { color: var(--ic-trash); }
/* 0.15.6 (Tyler): little birds around the park pond on the map; some bob down to peck now and then */
.sm-pb.pk { animation: smPeck 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes smPeck { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(14deg) translateY(1px); } 86% { transform: none; } 92% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .sm-pb.pk { animation: none; } }
/* 0.15.6: the purple top hat's shimmer is slower and softer than the golden one's */
.hx-shine.hx-shine-slow { animation-duration: 4.6s; }
/* 0.15.6 (Tyler): the purple top hat's glints pop at different spots (crown, band, brim), one after another */
.hx-glint { transform-origin: 50% 50%; opacity: 0; animation: hxGlint 5.2s ease-out infinite; }
@keyframes hxGlint { 0% { opacity: 0; transform: scale(.1) rotate(-20deg); } 6% { opacity: 1; transform: scale(1.1) rotate(0deg); } 12% { opacity: 1; transform: scale(.85) rotate(10deg); } 18%, 100% { opacity: 0; transform: scale(.1) rotate(20deg); } }
.hat-pic .hx-glint { animation: none !important; opacity: 0; }
.hat-pic .hx-glint:nth-child(1), .hat-pic .hx-glint:nth-child(4) { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hx-glint { animation: none; } }

/* ---------- 0.16.0: Grimsby's cave (cave-r5, approved by Tyler 2026-11-25) ---------- */
.mt-door { position: absolute; left: 0; top: 0; z-index: 15; width: 112px; height: 132px; border-radius: 50%; background: radial-gradient(closest-side, rgba(230,243,154,.32), rgba(230,243,154,0)); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 4px; animation: mtDoor 1.8s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.mt-door[hidden] { display: none; }
@keyframes mtDoor { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

.cave-screen { z-index: 33; background: #121a16; touch-action: manipulation; }
.cv-stage { position: absolute; left: 0; top: 0; width: 300px; height: 640px; transform-origin: 0 0; }
.cv-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-grims, .cv-youpos { position: absolute; transition: left .6s cubic-bezier(.3,.9,.3,1), top .6s cubic-bezier(.3,.9,.3,1), width .6s cubic-bezier(.3,.9,.3,1); }
.cv-grims { left: 150px; top: 214px; width: 170px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cv-grims.big { left: 168px; top: 224px; width: 162px; }
.cv-youpos { left: 28px; top: 252px; width: 140px; }
.cv-youpos.big { left: 16px; top: 212px; width: 172px; }
.cv-flip { transform: scaleX(-1); }
.cv-me, .cv-grims.birdbox { display: block; }
.cv-me .stage-svg, .cv-grims .stage-svg { display: block; width: 100%; height: auto; overflow: visible; }
.grims .g-head { transform: rotate(16deg) translate(6px, 10px) !important; }
.grims #lid { display: none; }
.cv-youpos.sipping .cv-me { filter: drop-shadow(0 0 3px #e6f39a) drop-shadow(0 0 10px #cfe36a) drop-shadow(0 0 22px rgba(207,227,106,.7)) brightness(1.08); animation: cvShudder .16s linear infinite; }
.cv-youpos.changed .cv-me { filter: drop-shadow(0 0 3px #e6f39a) drop-shadow(0 0 12px #cfe36a) brightness(1.15); transition: filter .5s ease; }
.cv-me { transition: filter .6s ease; }
@keyframes cvShudder { 0% { translate: 0 0; } 25% { translate: -1.2px .4px; } 50% { translate: 1px -.4px; } 75% { translate: -.6px 0; } 100% { translate: 0 0; } }
.cv-bubble { position: absolute; left: 188px; top: 190px; transform: translateX(-50%); background: #e9f1c8; color: #2b3317; border-radius: 14px; padding: 6px 10px; font-size: 13px; font-weight: 600; font-style: italic; white-space: nowrap; max-width: 260px; pointer-events: none; }
.cv-bubble[hidden] { display: none; }
.cv-bubble.pop { animation: cvPop .35s cubic-bezier(.3,1.4,.5,1); }
@keyframes cvPop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
.cv-drips ellipse { animation: cvDrip 2.6s cubic-bezier(.55,0,1,.6) infinite; transform-box: fill-box; }
.cv-drips ellipse:nth-child(2) { animation-delay: .87s; } .cv-drips ellipse:nth-child(3) { animation-delay: 1.73s; } .cv-drips ellipse:nth-child(4) { animation: cvDripGlow 2.6s ease-in-out infinite; }
@keyframes cvDrip { 0% { translate: 0 -12px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { translate: 0 70px; opacity: 0; } }
@keyframes cvDripGlow { 0%, 100% { opacity: .2; } 50% { opacity: .38; } }
.cv-worms circle { animation: cvWorm 3.4s ease-in-out infinite; }
.cv-worms circle:nth-child(4n) { animation-delay: -1.1s; } .cv-worms circle:nth-child(4n+1) { animation-delay: -2.3s; } .cv-worms circle:nth-child(3n) { animation-duration: 4.6s; }
@keyframes cvWorm { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.cv-ripple ellipse { transform-box: fill-box; transform-origin: center; animation: cvRipple 2.6s ease-out infinite; }
.cv-ripple ellipse:nth-child(2) { animation-delay: .4s; }
@keyframes cvRipple { 0% { scale: .5; opacity: .9; } 100% { scale: 1.6; opacity: 0; } }
.gr-eyeglow { animation: cvWorm 2.8s ease-in-out infinite; }
.cv-top { z-index: 30; }
.cv-gold { position: absolute; z-index: 30; right: 16px; top: calc(env(safe-area-inset-top) + 62px); display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.92); color: #1d2228; border-radius: 14px; padding: 5px 10px; font-size: 14px; }
.cv-gold-ic, .cv-cost svg { color: var(--ic-goldfish, #f0b21e); }
.cv-gold-ic svg { width: 18px; height: 18px; display: block; }
.cv-card { position: absolute; z-index: 30; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; background: #fff; color: #1d2228; border-radius: 22px; padding: 14px 16px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cv-card.under { visibility: hidden; } /* 0.16.2: while the intro card is up */
.cv-card[hidden] { display: none; }
.cv-card.in { animation: cvCardIn .4s cubic-bezier(.3,1.2,.5,1); }
@keyframes cvCardIn { from { translate: 0 30px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.cv-card h3 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 6px; color: #1d2228; }
.cv-card p { margin: 0 0 12px; font-size: 14.5px; color: #4a525c; line-height: 1.4; }
.cv-card p.s { margin: 0 0 8px; font-size: 13px; color: #7a838c; }
.cv-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; background: #fbf1d6; border-radius: 10px; padding: 2px 7px; color: #8a6410; }
.cv-cost svg { width: 15px; height: 15px; }
.cv-btns { display: flex; gap: 8px; justify-content: flex-end; }
.cv-card .btn { width: auto; min-width: 84px; height: 42px; padding: 0 18px; border-radius: 21px; background: #5f7a4a; color: #fff; font-weight: 600; font-size: 15px; margin: 0; }
.cv-card .btn.ghost { background: #eef0ec; color: #3c4a32; }
.cv-card .btn:disabled { opacity: .4; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip { background: #eef0ec; color: #1d2228; border-radius: 15px; padding: 6px 11px; font-size: 14px; transition: background .2s, color .2s; }
.cv-chip.on { background: #5f7a4a; color: #fff; }
.cv-chip:disabled { opacity: .4; }
.cv-sep { height: 1px; background: #e6e8e4; margin: 12px 0; }
.cv-row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cv-all { text-align: left; flex: 1; border-radius: 14px; padding: 6px 8px; margin: -6px -8px; background: transparent; color: inherit; transition: background .2s; }
.cv-all.on { background: #eef3e6; box-shadow: inset 0 0 0 2px #5f7a4a; }
.cv-all:disabled { opacity: .4; }
.cv-all p.s { margin: 0; }
.cv-need { margin: 10px 0 0 !important; font-size: 13px !important; color: #8a6410 !important; }
.cv-hint { position: absolute; z-index: 30; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(255,255,255,.92); color: #1d2228; border-radius: 16px; padding: 7px 14px; font-weight: 600; }
.cv-hint[hidden] { display: none; }
.cv-intro-pic { position: relative; height: 170px; margin: 0 -6px 14px; border-radius: 18px; overflow: hidden; background: #121a16; }
/* 0.16.2: the moving close-up (caveart.js introPic) */
.cip > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cip-gpos { position: absolute; width: 50%; max-width: 172px; right: 0; top: 6px; transform-origin: 56% 100%; rotate: -30deg; }
.cip-gpos .stage-svg { width: 100%; height: auto; display: block; }
.cip-lit { display: none; }
.cip-uplight { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(48% 60% at 36% 100%, rgba(215,236,110,.34), rgba(215,236,110,0)); }
.cip-g .birdbox { filter: brightness(.8) saturate(.9); }
.cip-refl { position: absolute; inset: 0; clip-path: ellipse(29% 8.5% at 36% 87.6%); opacity: .38; filter: blur(.6px); mix-blend-mode: multiply; }
.cip-rb { position: absolute; inset: 0; transform-origin: 50% 87%; transform: scaleY(-.38); animation: cipWobble 3.6s ease-in-out infinite; }
@keyframes cipWobble { 0%, 100% { translate: 0 0; scale: 1 1; } 50% { translate: 2px 0; scale: 1.03 .94; } }
.cip-worm { animation: cvWorm 3s ease-in-out infinite; }
.cip-drop { animation: cipDrop 2.5s cubic-bezier(.55,0,1,.45) infinite; transform-box: fill-box; }
@keyframes cipDrop { 0% { translate: 0 -2px; opacity: 0; scale: .6; } 24% { translate: 0 0; opacity: 1; scale: 1; } 30% { translate: 0 0; } 52% { translate: 0 74px; opacity: 1; } 53%, 100% { translate: 0 74px; opacity: 0; } }
.cip-ripples ellipse { transform-box: fill-box; transform-origin: center; opacity: 0; animation: cipRing 2.5s ease-out infinite; }
.cip-r2 { animation-delay: .25s !important; }
@keyframes cipRing { 0%, 52% { scale: .2; opacity: 0; } 54% { opacity: .9; } 100% { scale: 3.6; opacity: 0; } }
.cip-mist ellipse { animation: cipMist 9s ease-in-out infinite alternate; transform-box: fill-box; }
.cip-m2 { animation-duration: 12s !important; animation-delay: -4s !important; } .cip-m3 { animation-duration: 10s !important; animation-delay: -7s !important; }
@keyframes cipMist { from { translate: -14px 2px; } to { translate: 16px -6px; } }
.cip .gr-eyeglow { animation: cipEye 4.2s ease-in-out infinite; }
@keyframes cipEye { 0%, 100% { opacity: .18; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .cip *, .cip-rb { animation: none !important; } .cip-drop { opacity: 1; } }
.intro-lead { margin-bottom: 12px !important; }
.intro-rows { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 auto 14px; width: fit-content; max-width: 100%; text-align: left; }
.intro-row { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.intro-row small { font-weight: 500; color: var(--text-3); font-size: 13px; }
.intro-cost { display: inline-flex; align-items: center; gap: 3px; min-width: 44px; justify-content: center; font-size: 15px; font-weight: 700; background: #fbf1d6; color: #8a6410; border-radius: 12px; padding: 3px 8px; }
.intro-cost svg { width: 18px; height: 18px; color: var(--ic-goldfish, #f0b21e); }
.card p.intro-small { font-size: 14px; color: var(--text-3); margin: 0 0 16px; }
@media (prefers-color-scheme: dark) {
  .cv-card { background: #22262a; color: #f2f2f2; }
  .cv-card h3 { color: #f2f2f2; } .cv-card p { color: #c3c8cc; } .cv-card p.s { color: #8d959c; }
  .cv-chip { background: #33383c; color: #f2f2f2; } .cv-card .btn.ghost { background: #33383c; color: #dfe6d6; }
  .cv-sep { background: #33383c; } .cv-all.on { background: #2c3527; } .cv-cost { background: #3a3320; color: #f0cf7a; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-drips ellipse, .cv-worms circle, .cv-ripple ellipse, .gr-eyeglow, .mt-door, .cv-youpos.sipping .cv-me { animation: none !important; }
  .cv-grims, .cv-youpos { transition: none; }
}
.cv-top .tb-pill { padding: 0 14px; font-size: 15px; }
/* 0.16.2: under a stall's awning every bird stands at the regular height (a big, long-necked bird poked its head above the
   awning); bill, colors, tuft and wings still show. */
.mk-pbird, .mk-vbird { --t-s: 1 !important; --t-neck: 1 !important; --t-neck-y: 0px !important; --t-bill: 1 !important; --t-plump: 1 !important; }
/* 0.16.3 (Tyler: some stall birds were tiny, some huge): at a stall every bird stands at the same height, whatever its
   age (a chick keeps its big head and small bill, just not its small size) or its size, bill and neck traits. */
/* 0.16.4 (Tyler: adults are right, but younger birds should be smaller next to them, placed so their faces show):
   chicks, fledglings and young birds keep their own smaller size and stand on a hidden step behind the counter. */
.mk-pbird[data-growth="old"] { --g-s: .95 !important; }
.mk-pbird[data-growth="chick"] { translate: 0 -16%; }
.mk-pbird[data-growth="fledgling"] { translate: 0 -11%; }
.mk-pbird[data-growth="young"] { translate: 0 -5%; }
/* 0.16.3: the Soggy sock drips now and then */
.sock-drip { transform-box: fill-box; animation: sockDrip 3.2s ease-in infinite; }
.sock-drip.d2 { animation-delay: 1.4s; animation-duration: 4.1s; }
@keyframes sockDrip { 0%, 55% { translate: 0 0; opacity: 1; } 85% { translate: 0 7px; opacity: 0; } 86% { translate: 0 0; opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sock-drip { animation: none; } }
