/* Brew Club — 1970s tea room, soft and squishy */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2-variations"), url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  --paper: #FBF1DC;
  --cream: #F6E7C8;
  --card: #FFF8EA;
  --brown: #4E301B;       /* text — 11:1 on paper */
  --brown-2: #7A5233;     /* secondary text — 5.6:1 on paper */
  --kettle: #DD6B2A;
  --orange: #B44D17;      /* button fill — cream text 5:1 */
  --orange-press: #973F12;
  --mustard: #E3A83A;
  --avocado: #6E7B2C;     /* 4.9:1 on paper */
  --cheek: #EE8F6A;
  --sun-1: #F2C66B;
  --sun-2: #EDB24F;
  --steam: #FFFDF6;
  --light-off: #9C7A5B;
  --light-on: #FF5A2E;
  --line: rgba(78,48,27,.14);
  --k-ink: #4E301B;        /* kettle outlines, same in dark mode */

  --display: "Fraunces", "Cooper Black", Georgia, serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;

  /* Shared spacing scale (4pt grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --r-card: 26px; --r-btn: 22px;
  --tap: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  body { background: var(--paper); }
  :root {
    --paper: #2A1B10; --cream: #3A2617; --card: #34220F;
    --brown: #F7E6C6; --brown-2: #D9BE98;
    --kettle: #E07432; --orange: #E2803F; --orange-press: #C96A2B;
    --avocado: #B6C26A; --sun-1: #5A3A1C; --sun-2: #6A4521;
    --steam: #FFF3DE; --light-off: #6B4D33; --line: rgba(247,230,198,.16);
  }
  .btn.primary { color: #2A1B10 !important; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--era-paper, var(--paper)); transition: background-color .6s ease; color: var(--brown);
  font: 17px/1.45 var(--text);   /* iOS body size */
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
#app {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  padding: calc(var(--safe-t) + var(--s4)) var(--s5) calc(var(--safe-b) + var(--s8));
  display: flex; flex-direction: column; gap: var(--s5);
}

h1, h2, .display {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.05;
}
h1 { font-size: 34px; }   /* iOS large title */
h2 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--brown-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 70s triple stripe */
.stripes { display: grid; gap: 4px; }
.stripes i { display: block; height: 6px; border-radius: 3px; }
.stripes i:nth-child(1) { background: var(--orange); }
.stripes i:nth-child(2) { background: var(--mustard); }
.stripes i:nth-child(3) { background: var(--avocado); }

/* Top bar */
.top { display: flex; align-items: center; gap: var(--s3); }
.top h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none;
  background: var(--cream); color: var(--brown); display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 24px; height: 24px; }

/* Cards */
.card {
  background: var(--card); border-radius: var(--r-card); padding: var(--s5);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(78,48,27,.45);
}

/* Hero */
.hero { text-align: center; padding: var(--s4) var(--s4) var(--s6); position: relative; overflow: hidden; }
.hero .kettle { width: min(72vw, 290px); height: auto; display: block; margin: 0 auto var(--s3); overflow: visible; }
.status { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; font-size: 24px; line-height: 1.15; }
.substatus { margin-top: var(--s2); color: var(--brown-2); font-variant-numeric: tabular-nums; }

/* Buttons — big, squishy */
.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  min-height: var(--tap); padding: var(--s4) var(--s5); border-radius: var(--r-btn);
  font: 700 19px/1.2 var(--text); color: var(--brown); background: var(--cream);
  transition: transform .18s cubic-bezier(.3,1.6,.5,1), background-color .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
}
.btn:active { transform: scale(.96); }
.btn.primary {
  min-height: 72px; font-size: 21px; color: #FFF6E5; background: var(--orange);
  box-shadow: 0 6px 0 var(--orange-press), 0 14px 24px -10px rgba(150,60,15,.6);
  margin-bottom: 6px;
}
.btn.primary:active { transform: translateY(4px) scale(.98); box-shadow: 0 2px 0 var(--orange-press); }
.btn.primary.join { background: var(--avocado); box-shadow: 0 6px 0 #525C1F, 0 14px 24px -10px rgba(80,90,30,.6); animation: nudge 2.4s ease-in-out infinite; }
.btn[disabled] { cursor: default; animation: none; }
.btn.primary[disabled] { background: var(--cream); color: var(--brown-2); box-shadow: inset 0 0 0 2px var(--line); transform: none; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { min-height: 48px; font-size: 17px; width: auto; padding: var(--s3) var(--s4); }
.btn-row { display: flex; gap: var(--s3); }
.btn-row > * { flex: 1; }
:focus-visible { outline: 3px solid var(--avocado); outline-offset: 3px; }

/* Mug counter */
.mugs { display: flex; align-items: center; gap: var(--s4); }
.mugs .num { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 900; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--orange); }
.mugs .label { font-weight: 600; }
.mug-icon { width: 56px; height: 56px; flex: none; }
.pop { animation: pop .6s cubic-bezier(.3,1.8,.5,1); }

/* Friends */
.friends { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--cream); font-weight: 600; font-size: 16px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--light-off); }
.chip.on .dot { background: var(--light-on); box-shadow: 0 0 0 3px rgba(255,90,46,.25); }

/* Brew-together chat */
.brew { display: flex; flex-direction: column; gap: var(--s3); }
.brew-head { display: flex; align-items: center; gap: var(--s3); }
.brew-head h2 { flex: 1; }
.timer { font: 800 22px/1 var(--text); font-variant-numeric: tabular-nums; background: var(--cream); padding: 10px 14px; border-radius: 14px; }
.progress { height: 10px; border-radius: 5px; background: var(--cream); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--orange) 0 33%, var(--mustard) 33% 66%, var(--avocado) 66%); transform-origin: left; transition: transform 1s linear; }
.msgs { display: flex; flex-direction: column; gap: var(--s2); max-height: 38vh; overflow-y: auto; padding: var(--s1) 2px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 20px; background: var(--cream); align-self: flex-start; overflow-wrap: anywhere; }
.msg b { display: block; font-size: 13px; color: var(--brown-2); margin-bottom: 2px; }
.msg.me { align-self: flex-end; background: var(--orange); color: #FFF6E5; border-bottom-right-radius: 6px; }
.msg.me b { color: #FFE3C2; }
.msg.sys { align-self: center; background: none; color: var(--brown-2); font-size: 15px; text-align: center; padding: 2px; }
.quick { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--brown); font: 600 16px var(--text); cursor: pointer; }
.compose { display: flex; gap: var(--s2); }
input[type=text], input:not([type]) {
  flex: 1; min-width: 0; min-height: var(--tap); border-radius: 18px; border: 2px solid var(--line);
  background: var(--paper); color: var(--brown); padding: 0 var(--s4); font: 17px var(--text);
}
input:focus { border-color: var(--avocado); outline: none; }
.field { display: grid; gap: var(--s2); }
.field label { font-weight: 700; }

/* Welcome */
.welcome { text-align: center; gap: var(--s4); display: flex; flex-direction: column; padding-top: var(--s4); }
.welcome .kettle { width: min(70vw, 260px); margin: 0 auto; overflow: visible; }
.welcome h1 { font-size: 46px; }
.code { font: 800 30px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-align: center; padding: var(--s4); background: var(--cream); border-radius: 18px; }
.err { color: #B3261E; font-weight: 600; }
@media (prefers-color-scheme: dark) { .err { color: #FFB4A9; } }

/* Sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(40,24,12,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--paper); border-radius: 28px 28px 0 0; padding: var(--s5) var(--s5) calc(var(--safe-b) + var(--s6)); display: flex; flex-direction: column; gap: var(--s4); animation: up .32s cubic-bezier(.2,1.2,.4,1); max-height: 92vh; overflow-y: auto; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--tap); }

#toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 24px); transform: translate(-50%, 140%); background: var(--brown); color: var(--paper); padding: 14px 20px; border-radius: 18px; font-weight: 600; max-width: 90vw; transition: transform .35s cubic-bezier(.2,1.3,.4,1); z-index: 20; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }

/* Change-kettle pill */
.pill-btn { position: absolute; top: 14px; right: 14px; z-index: 2; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--card); color: var(--brown); font: 700 15px var(--text); box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.pill-btn:active { transform: scale(.95); }
.welcome-kettle { display: grid; place-items: center; }
.welcome-kettle .kettle { animation: fade .5s; }

/* Club members */
.members { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.member { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2); border-radius: 18px; background: var(--paper); }
.member.on { box-shadow: inset 0 0 0 2px var(--light-on); }
.m-kettle { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; overflow: hidden; }
.kettle.tiny { width: 48px; height: 48px; }
.kettle.tiny .steam { stroke-width: 9; }
.m-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.m-text .muted { font-size: 15px; }
.m-mug { flex: none; }

/* Nudge card */
.nudge { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.nudge > div { flex: 1; min-width: 160px; }
.btn.festive { background: var(--mustard); color: #3A2414; font-weight: 800; }

/* Kettle picker */
.kettle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.kettle-opt { border: 0; border-radius: 22px; padding: var(--s3) var(--s2) var(--s4); display: grid; justify-items: center; gap: 2px; cursor: pointer; color: #3A2414;
  box-shadow: inset 0 0 0 2px rgba(78,48,27,.12); transition: transform .18s cubic-bezier(.3,1.6,.5,1); }
.kettle-opt:active { transform: scale(.96); }
.kettle-opt.on { box-shadow: inset 0 0 0 4px var(--orange), 0 8px 20px -12px rgba(78,48,27,.6); }
.kettle-opt .kettle { width: 100%; max-width: 150px; height: auto; overflow: visible; }
.k-era { font: 800 13px var(--text); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.k-name { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; font-size: 18px; line-height: 1.1; text-align: center; }

/* Tea chooser */
.tea-top { display: flex; align-items: center; gap: var(--s4); }
.tea-preview { flex: none; }
.label { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip-opt { min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--brown); font: 600 16px var(--text); cursor: pointer; }
.chip-opt.on { background: var(--orange); border-color: var(--orange); color: #FFF6E5; }
.stepper { display: flex; align-items: center; gap: var(--s4); }
.stepper .btn { width: 56px; font-size: 26px; }
.sugar-n { font: 800 28px var(--text); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }

/* Brew mates */
.mates { display: grid; gap: var(--s2); }
.mate { display: flex; align-items: center; gap: var(--s2); font-size: 15px; color: var(--brown-2); }
.mate b { color: var(--brown); }

/* Cuppa reminders */
.rems { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.rem { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s3); border-radius: 18px; background: var(--paper); }
.rem-time { font: 800 18px var(--text); min-width: 4.2em; font-variant-numeric: tabular-nums; color: var(--orange); }
.rem-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.rem-text .muted { font-size: 15px; overflow-wrap: anywhere; }
.time-in { min-height: 64px !important; font: 800 26px var(--text) !important; border-radius: 18px; border: 2px solid var(--line); background: var(--paper); color: var(--brown); padding: 0 var(--s4); width: 100%; }
.nudge-card { display: grid; gap: var(--s2); text-align: center; background: var(--mustard); color: #3A2414; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.nudge-card .muted { color: #5A3A1E; }
.nudge-card .note { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 20px; }
.nudge-card .btn.ghost { justify-self: center; box-shadow: inset 0 0 0 2px rgba(58,36,20,.3); color: #3A2414; }
input[type=url] { flex: 1; min-width: 0; min-height: var(--tap); border-radius: 18px; border: 2px solid var(--line); background: var(--paper); color: var(--brown); padding: 0 var(--s4); font: 17px var(--text); }

/* Year in tea */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.stat { background: var(--card); border-radius: 20px; padding: var(--s4); display: grid; gap: 2px; }
.stat .num { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 900; font-size: 40px; line-height: 1; color: var(--orange); }
.buddy { text-align: center; display: grid; gap: 4px; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.board li { display: grid; grid-template-columns: 28px minmax(0, 7.5em) 1fr 3ch; align-items: center; gap: var(--s2); min-height: 44px; }
.rank { font: 800 17px var(--text); color: var(--brown-2); }
.b-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-bar { height: 14px; border-radius: 7px; background: var(--cream); overflow: hidden; }
.b-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--orange), var(--mustard)); }
.b-n { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- Kettle animation ---------------- */
.kettle .puff { opacity: 0; stroke-dasharray: 90; stroke-dashoffset: 90; }
.kettle .pot, .kettle .lid, .kettle .rays { transform-box: view-box; }
.kettle .pot { transform-origin: 130px 200px; }
.kettle .rays { transform-origin: 130px 128px; }

/* era extras: lights, flames, LEDs, bubbles while hot */
.kettle .light { fill: var(--light-off); }
.kettle .led { fill: #3C4A5A; transition: fill .4s; }
.kettle .flame { opacity: 0; transition: opacity .4s; }
.kettle .flame path { transform-box: fill-box; transform-origin: 50% 100%; }
.kettle .bubble { opacity: 0; transform-box: fill-box; }
.kettle.hot .light { fill: var(--light-on); }
.kettle.brewing .light { fill: var(--mustard); }
.kettle.hot .flame { opacity: .7; }
.kettle.rumbling .flame, .kettle.boiling .flame { opacity: 1; }
.kettle.hot .flame path { animation: flicker .25s ease-in-out infinite alternate; }
.kettle.hot .flame path:nth-child(4n) { animation-delay: .1s; }
.kettle.hot .led { fill: #4FC3FF; }
.kettle.hot[data-kettle="glass"] .led { fill: #8E6BFF; }
.kettle.rumbling .bubble, .kettle.boiling .bubble { animation: bubble 1.2s ease-in infinite; }
.kettle.boiling .bubble { animation-duration: .7s; }
.kettle .b1 { animation-delay: .3s !important; } .kettle .b2 { animation-delay: .7s !important; }
.kettle .b3 { animation-delay: .15s !important; } .kettle .b4 { animation-delay: .9s !important; }
@keyframes flicker { to { transform: scaleY(.75); } }
@keyframes bubble { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: .9; } 100% { opacity: 0; transform: translateY(-44px); } }

/* ---------- faces: show only the parts for the current expression ---------- */
.kettle .face .part { display: none; }
.kettle .eyes, .kettle .e-wide, .kettle .e-happy { transform-box: fill-box; transform-origin: center; }
.kettle[data-face="happy"] .face .e-open, .kettle[data-face="happy"] .face .m-smile,
.kettle[data-face="beam"] .face .e-happy, .kettle[data-face="beam"] .face .m-grin,
.kettle[data-face="surprised"] .face .e-wide, .kettle[data-face="surprised"] .face .b-up, .kettle[data-face="surprised"] .face .m-oo,
.kettle[data-face="excited"] .face .e-wide, .kettle[data-face="excited"] .face .m-grin,
.kettle[data-face="oo"] .face .e-open, .kettle[data-face="oo"] .face .m-oo,
.kettle[data-face="shout"] .face .e-squeeze, .kettle[data-face="shout"] .face .m-shout,
.kettle[data-face="hopeful"] .face .e-open, .kettle[data-face="hopeful"] .face .b-hope, .kettle[data-face="hopeful"] .face .m-smile,
.kettle[data-face="content"] .face .e-happy, .kettle[data-face="content"] .face .m-smile,
.kettle[data-face="sleepy"] .face .e-closed, .kettle[data-face="sleepy"] .face .m-smile { display: inline; }
.kettle[data-face="shout"] .cheek, .kettle[data-face="beam"] .cheek { opacity: 1; fill: #F07A55; }

/* blinking and glancing while awake */
.kettle .e-open { animation: blink 5s infinite, glance 9s ease-in-out infinite; animation-delay: var(--hop-delay), var(--hop-delay); }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes glance { 0%, 40%, 100% { translate: 0 0; } 48%, 58% { translate: -3px 0; } 66%, 76% { translate: 3px -1px; } 84% { translate: 0 0; } }

/* ---------- motion by boil stage ---------- */
/* idle: awake, a little hop now and then, can't wait for a brew */
.kettle.idle .pot { animation: hop 4.2s ease-in-out infinite; animation-delay: var(--hop-delay); }
/* night time: dozing, slow breathing */
.kettle.sleepy .pot { animation: breathe 4s ease-in-out infinite; }
/* warming: a faint tremble and the odd wisp */
.kettle.warming .pot { animation: tremble .5s ease-in-out infinite; }
.kettle.warming .p1 { animation: steam 2.6s ease-out infinite; }
/* rumbling: shaking, lid starting to go */
.kettle.rumbling .pot { animation: rumble .16s linear infinite; }
.kettle.rumbling .lid { animation: rattle .45s ease-in-out infinite; }
.kettle.rumbling .rays { animation: spin 24s linear infinite; }
.kettle.rumbling .p1, .kettle.rumbling .p2 { animation: steam 1.9s ease-out infinite; }
.kettle.rumbling .p2 { animation-delay: .6s; }
/* boiling: full boil, everything going */
.kettle.boiling .pot { animation: rumble .11s linear infinite; }
.kettle.boiling .lid { animation: rattle .22s ease-in-out infinite; }
.kettle.boiling .rays { animation: spin 12s linear infinite; }
.kettle.boiling .puff { animation: steam 1.3s ease-out infinite; }
.kettle.boiling .p2 { animation-delay: .3s; } .kettle.boiling .p3 { animation-delay: .65s; } .kettle.boiling .p4 { animation-delay: .95s; }
/* boiled: clicked off, steaming gently, waiting hopefully for a friend */
.kettle.boiled .pot { animation: sway 3.4s ease-in-out infinite; }
.kettle.boiled .rays { animation: spin 40s linear infinite; }
.kettle.boiled .p1, .kettle.boiled .p4 { animation: steam 3s ease-out infinite; }
.kettle.boiled .p4 { animation-delay: 1.4s; }
/* brewing together: calm and happy */
.kettle.brewing .pot { animation: sway 3s ease-in-out infinite; }
.kettle.brewing .rays { animation: spin 40s linear infinite; }
.kettle.brewing .puff { animation: steam 3.2s ease-out infinite; }
.kettle.brewing .p2 { animation-delay: 1s; } .kettle.brewing .p3 { animation-delay: 2s; } .kettle.brewing .p4 { display: none; }
/* tapped: a surprised little jump */
.kettle.jump .pot { animation: jump .55s cubic-bezier(.3,1.6,.5,1) !important; }
.kettle { cursor: pointer; -webkit-user-select: none; user-select: none; }

@keyframes hop { 0%, 70%, 100% { transform: translateY(0) scale(1, 1); } 76% { transform: translateY(0) scale(1.04, .95); } 82% { transform: translateY(-7px) scale(.98, 1.03); } 88% { transform: translateY(0) scale(1.03, .97); } 93% { transform: translateY(-2px) scale(1,1); } }
@keyframes tremble { 50% { transform: translateX(.6px) rotate(.3deg); } }
@keyframes jump { 0% { transform: scale(1.05, .92); } 40% { transform: translateY(-16px) scale(.95, 1.06); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes breathe { 50% { transform: scale(1.015, .99); } }
@keyframes rumble { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-1.2px,.6px) rotate(-1deg); } 50% { transform: translate(.8px,-.6px) rotate(.8deg); } 75% { transform: translate(-.6px,.4px) rotate(-.4deg); } }
@keyframes rattle { 0%,100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-5px) rotate(-4deg); } 60% { transform: translateY(-2px) rotate(3deg); } }
@keyframes sway { 50% { transform: rotate(1.6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes steam {
  0% { opacity: 0; stroke-dashoffset: 90; transform: translateY(6px); }
  25% { opacity: .95; }
  70% { opacity: .6; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: -60; transform: translateY(-26px); }
}
@keyframes nudge { 0%,80%,100% { transform: scale(1); } 88% { transform: scale(1.03); } }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .kettle.hot .puff { animation: steam-still 2.6s ease-in-out infinite !important; animation-iteration-count: infinite !important; animation-duration: 2.6s !important; stroke-dashoffset: 0; }
  .kettle.idle .puff, .kettle.sleepy .puff { opacity: 0; }
  @keyframes steam-still { 0%,100% { opacity: .25; } 50% { opacity: .85; } }
}
