/* Puffin Bay: the game page. The colours are art.js's PAL. */
:root {
  --ink: #24344d; --ink-soft: #4a5d7a; --muted: #7d8fa8;
  --coral: #ff7a5c; --coral-shade: #e05c42; --mustard: #f5bf45; --mustard-shade: #dc9f2a; --teal: #4fae9f;
  --card: rgba(255, 255, 255, 0.97); --shadow: 0 2px 0 rgba(36, 52, 77, 0.06), 0 18px 40px rgba(36, 52, 77, 0.2);
  --font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1d2a40; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
button, input { font: inherit; }
button, a { outline: none; -webkit-tap-highlight-color: transparent; }   /* (no focus ring round a button once it has been clicked or tabbed to) */
button:focus, button:focus-visible, a:focus-visible { outline: none; }
.hidden { display: none !important; }

#game { position: fixed; left: 0; top: 0; display: block; touch-action: none; }
#fade { position: fixed; inset: 0; background: #1d2a40; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 5; }
#fade.on { opacity: 1; transition: none; }

/* ---------- buttons ---------- */
.btn { border: none; border-radius: 16px; padding: 12px 22px; font-weight: 900; font-size: 16px; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; }
.btn.primary { background: linear-gradient(#ff8c70, var(--coral)); color: #fff; box-shadow: 0 4px 0 var(--coral-shade), 0 8px 14px rgba(224, 92, 66, 0.25); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--coral-shade), 0 10px 16px rgba(224, 92, 66, 0.28); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-shade); }
.btn.primary:disabled { opacity: 0.6; cursor: default; transform: none; }
.btn.quiet { background: #eef3f8; color: var(--ink-soft); box-shadow: 0 3px 0 #d3dde8; }
.btn.quiet:hover { background: #e4ecf4; }
.btn.quiet:active { transform: translateY(2px); box-shadow: 0 1px 0 #d3dde8; }
.btn.big { width: 100%; padding: 14px; font-size: 18px; }
.btn.small { padding: 8px 16px; font-size: 14px; }
.round-btn { width: 46px; height: 46px; border: none; border-radius: 50%; background: var(--card); box-shadow: 0 3px 0 rgba(36, 52, 77, 0.12), 0 6px 14px rgba(36, 52, 77, 0.12); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink); }
.round-btn:hover { background: #fff; transform: translateY(-1px); }
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#hud > * { pointer-events: none; }
#hud button, #hud form, #hud .pill, #hud .emote-tray { pointer-events: auto; }
#hud .catalogue-btn { pointer-events: auto; }
.hud-top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.hud-right { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.hud-right-row { display: flex; gap: 10px; align-items: center; }
#fpsCounter { padding: 3px 10px; min-width: 58px; border-radius: 11px; background: rgba(36, 52, 77, 0.55); color: #fff; font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; cursor: help; pointer-events: auto; }
#fpsCounter:empty { display: none; }
.pill { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 23px; background: var(--card); box-shadow: 0 3px 0 rgba(36, 52, 77, 0.12), 0 6px 14px rgba(36, 52, 77, 0.12); font-weight: 900; font-size: 17px; }
#roomPill > span { line-height: 1; }   /* (each centred on the pill: the room name, the time and the head count line up) */
#onlineCount, #gameClock { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
#gameClock:empty { display: none; }
#onlineCount:empty { display: none; }
.pill.gold { color: #9a6a10; font-size: 19px; }
.pill.gold.bump { animation: bump 0.4s; }
@keyframes bump { 40% { transform: scale(1.15); } }
.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--mustard) 0 40%, var(--mustard-shade) 41% 55%, var(--mustard) 56%); box-shadow: inset -2px -2px 0 rgba(0,0,0,0.08); display: inline-block; }
.hud-bottom { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; grid-template-columns: 1fr minmax(0, 400px) 1fr; gap: 10px; align-items: center; width: min(640px, calc(100% - 28px)); }   /* (the chat box in the middle, its buttons either side) */
.hud-side { display: flex; gap: 10px; }
.hud-side.left { justify-content: flex-end; }
#chatForm { display: flex; height: 46px; border-radius: 23px; background: var(--card); box-shadow: 0 3px 0 rgba(36, 52, 77, 0.12), 0 6px 14px rgba(36, 52, 77, 0.12); overflow: hidden; }
#chatInput { flex: 1; min-width: 0; border: none; outline: none; padding: 0 18px; background: transparent; font-weight: 700; font-size: 16px; color: var(--ink); user-select: text; -webkit-user-select: text; }
#chatInput::placeholder { color: var(--muted); }
#chatForm button { width: 46px; border: none; background: var(--coral); color: #fff; display: grid; place-items: center; cursor: pointer; }
#chatForm button svg { width: 20px; height: 20px; fill: currentColor; }
.emote-tray { position: absolute; right: 0; bottom: 58px; display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; padding: 10px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.emote-tray button { width: 52px; height: 52px; border: none; border-radius: 16px; background: #eef3f8; cursor: pointer; padding: 0; }
.emote-tray button:hover { background: #e1eaf3; transform: translateY(-1px); }
.emote-tray canvas { width: 52px; height: 52px; display: block; }

/* ---------- modals ---------- */
.modal-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(29, 42, 64, 0.45); backdrop-filter: blur(3px); z-index: 20; padding: 16px; }
.modal-overlay.visible { display: flex; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px 26px 22px; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); animation: pop 0.18s ease-out; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
.modal h2 { margin: 0 0 14px; font-size: 26px; font-weight: 900; letter-spacing: -0.01em; }
.fold { margin-top: 16px; }
.fold summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: #f3f6fa; font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; user-select: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; font-size: 18px; letter-spacing: 0; }
.fold[open] summary::after { content: '\2212'; }
.fold[open] summary { margin-bottom: 8px; }
.modal h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.modal p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); font-weight: 600; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.profile-rows { margin: 0; display: grid; gap: 6px; }
.profile-rows div { display: flex; justify-content: space-between; padding: 8px 14px; border-radius: 12px; background: #f3f6fa; }
.profile-rows dt { color: var(--muted); font-weight: 800; font-size: 14px; }
.profile-rows dd { margin: 0; font-weight: 900; font-size: 14px; }
.bests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bests div { padding: 10px 8px; border-radius: 14px; background: #f3f6fa; text-align: center; }
.bests b { display: block; font-size: 20px; font-weight: 900; color: #9a6a10; }
.bests span { font-size: 12px; font-weight: 800; color: var(--muted); }
.menu-row { display: flex; gap: 22px; margin-top: 18px; }
.menu-row label { display: flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.menu-row input { width: 18px; height: 18px; accent-color: var(--coral); }
.menu-row > span { font-weight: 800; }
.menu-row:has(.seg) { align-items: center; justify-content: space-between; margin-top: 12px; }
.seg { display: inline-flex; border-radius: 10px; overflow: hidden; background: #eef3f8; }
.seg button { border: none; background: transparent; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 900; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--coral); color: #fff; }
.welcome { text-align: center; }
.welcome canvas { width: 160px; height: 133px; margin: -6px auto 2px; display: block; }
.welcome-games { text-align: left; margin: 0 0 4px; padding: 12px 16px 12px 34px; border-radius: 16px; background: #f3f6fa; font-size: 15px; line-height: 1.7; color: var(--ink-soft); font-weight: 600; }
.welcome .modal-actions { justify-content: center; }

/* ---------- the map, the player card and the catalogue ---------- */
.close-x { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border: none; border-radius: 50%; background: #eef3f8; color: var(--ink-soft); font-size: 24px; font-weight: 900; line-height: 1; cursor: pointer; z-index: 2; }
.close-x:hover { background: #e1eaf3; }
.map-modal { position: relative; width: min(1000px, 100%); padding: 10px; }
#mapCanvas { display: block; width: 100%; aspect-ratio: 1000 / 620; border-radius: 18px; cursor: pointer; }
.card-modal { position: relative; width: min(760px, 100%); display: grid; grid-template-columns: 270px 1fr; gap: 22px; padding: 22px; }
.card-left { display: flex; flex-direction: column; align-items: center; padding: 14px 10px 16px; border-radius: 22px; background: linear-gradient(#cfe9f5, #eaf6fb 60%, #f3f6fa); }
#cardPuffin { width: 240px; height: 270px; display: block; }
.card-name { margin-top: 4px; font-size: 22px; font-weight: 900; }
.card-worn { margin-top: 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--muted); }
.card-worn span { padding: 3px 9px; border-radius: 10px; background: #fff; }
.card-right h2 { margin: 6px 0 2px; }
.card-hint { margin: 0 0 12px !important; font-size: 13.5px !important; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 420px; overflow: auto; padding: 2px; }
.item { position: relative; border: none; border-radius: 18px; background: #f3f6fa; padding: 8px 6px 10px; cursor: pointer; text-align: center; font-family: inherit; color: var(--ink); box-shadow: inset 0 0 0 2px transparent; transition: transform 0.08s, background 0.1s; }
.item:hover { background: #e9f0f7; transform: translateY(-1px); }
.item.on { background: #fff4e8; box-shadow: inset 0 0 0 3px var(--coral); }
.item canvas { display: block; width: 88px; height: 88px; margin: 0 auto 4px; }
.item b { display: block; font-size: 13px; font-weight: 900; line-height: 1.2; }
.item small { display: block; margin-top: 2px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.item .tag { position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 8px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.empty-note { grid-column: 1 / -1; padding: 22px; border-radius: 18px; background: #f3f6fa; color: var(--ink-soft); font-weight: 700; text-align: center; line-height: 1.5; }
.catalogue { position: relative; width: min(820px, 100%); padding: 24px 26px 26px; background: linear-gradient(#fff9ef, #fff); }
.catalogue-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 0 40px 16px 0; }
.catalogue-head h2 { margin: 2px 0 4px; font-size: 30px; }
.catalogue-head p { margin: 0; }
.item-grid.shop { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 60vh; }
.item-grid.shop .item { cursor: default; padding: 10px 10px 12px; background: #fff; box-shadow: 0 2px 0 rgba(36,52,77,0.06), 0 8px 18px rgba(36,52,77,0.08); }
.item-grid.shop .item:hover { transform: none; }
.item-grid.shop canvas { width: 120px; height: 120px; }
.price { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 8px; font-weight: 900; color: #9a6a10; }
.price .coin { width: 18px; height: 18px; }
.item .btn { width: 100%; padding: 9px; font-size: 14px; }
.item .btn.armed { background: #fff; color: #8a5d00; box-shadow: 0 0 0 2px var(--mustard-shade), 0 3px 0 var(--mustard-shade); }
.corner-btns { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 10px; pointer-events: none; }
.catalogue-btn { position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 18px; border: none; border-radius: 29px; background: linear-gradient(#ff8c70, var(--coral)); color: #fff; font-family: inherit; font-size: 18px; font-weight: 900; cursor: pointer; pointer-events: auto; box-shadow: 0 5px 0 var(--coral-shade), 0 10px 18px rgba(224, 92, 66, 0.3); animation: nudge 2.6s ease-in-out infinite; }
.catalogue-btn:hover { transform: translateY(-2px); }
.catalogue-btn.still { animation: none; }
.catalogue-btn.quiet { background: var(--card); color: var(--ink); box-shadow: 0 5px 0 #d3dde8, 0 10px 18px rgba(36,52,77,0.15); animation: none; }
#hud .corner-btns .catalogue-btn, #hud .decor-tray { pointer-events: auto; }
.decor-tray { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); width: min(760px, calc(100% - 28px)); padding: 8px 12px 10px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); z-index: 6; }
.decor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.decor-head b { font-size: 17px; font-weight: 900; }
.decor-head span { flex: 1; font-size: 13px; font-weight: 700; color: var(--muted); }
.decor-items { display: flex; gap: 8px; overflow-x: auto; min-height: 74px; }
.decor-items.drop { outline: 3px dashed var(--coral); outline-offset: 3px; border-radius: 16px; }
.decor-item { flex: none; width: 92px; padding: 4px; border-radius: 16px; background: #f3f6fa; text-align: center; cursor: grab; touch-action: none; }
.decor-item.none { opacity: 0.4; cursor: default; }
.decor-item canvas { width: 46px; height: 46px; display: block; margin: 0 auto; pointer-events: none; }
.decor-item b { display: block; font-size: 12px; font-weight: 900; }
.decor-item small { font-size: 11px; font-weight: 800; color: var(--muted); }
.decor-empty { padding: 18px 12px; color: var(--ink-soft); font-weight: 700; }
.catalogue-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: rotate(-4deg); } 95% { transform: rotate(4deg); } }
@media (max-width: 700px) {
  .card-modal { grid-template-columns: 1fr; }
  .catalogue-btn span { display: none; }
  .catalogue-btn { padding: 0 16px; }
}

/* ---------- burrows on the map, the card's tabs, and notices ---------- */
.visit-pop { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(23, 63, 99, 0.28); z-index: 2; }
.visit-pop.hidden { display: none; }
.visit-pop::before { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.visit-pop b { font-size: 15px; font-weight: 900; padding-left: 4px; }
.visit-row { display: flex; gap: 8px; }
.visit-pop input { width: 200px; height: 44px; padding: 0 14px; border: 2px solid #e2e9f1; border-radius: 14px; background: #f6f9fc; font-weight: 700; font-size: 15px; color: var(--ink); outline: none; user-select: text; -webkit-user-select: text; }
.visit-pop input:focus { border-color: #8fc6e6; background: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tabs button { padding: 7px 12px; border: none; border-radius: 12px; background: #eef3f8; color: var(--ink-soft); font-family: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.tabs button:hover { background: #e1eaf3; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button small { margin-left: 4px; font-size: 11px; opacity: 0.7; }
#toast { position: fixed; left: 50%; top: 76px; transform: translate(-50%, -10px); padding: 12px 20px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 40; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- minigames ---------- */
#mgOverlay { position: fixed; inset: 0; z-index: 10; background: #1d2a40; }
#mgCanvas { position: absolute; left: 0; top: 0; display: block; touch-action: none; }
#mgQuit { position: absolute; left: 14px; top: 14px; z-index: 2; }
.mg-card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(29, 42, 64, 0.5); backdrop-filter: blur(2px); z-index: 3; padding: 16px; }
.mg-card-inner { width: min(480px, 100%); padding: 26px 28px 24px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); text-align: center; animation: pop 0.2s ease-out; }
.mg-kicker { font-size: 12px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: var(--coral); }
.mg-card h2 { margin: 4px 0 14px; font-size: 34px; font-weight: 900; letter-spacing: -0.02em; }
.mg-card ol { text-align: left; margin: 0; padding: 14px 16px 14px 36px; border-radius: 18px; background: #f3f6fa; font-size: 15px; line-height: 1.55; color: var(--ink-soft); font-weight: 650; }
.mg-card ol li + li { margin-top: 4px; }
.mg-card .best { margin-top: 12px; font-size: 14px; font-weight: 800; color: var(--muted); }
.mg-card .earned { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 4px; font-size: 52px; font-weight: 900; color: #9a6a10; }
.mg-card .earned .coin { width: 44px; height: 44px; }
.mg-card .badge { display: inline-block; margin-top: 6px; padding: 5px 12px; border-radius: 12px; background: #fff0bf; color: #8a5d00; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.mg-card .modal-actions { justify-content: center; }
.mg-card .wait { color: var(--muted); font-weight: 800; }

/* ---------- logging in ---------- */
#loginOverlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 30; background: #9fd47f; overflow: auto; }
#loginOverlay.visible { display: flex; }
#loginScene { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-wrap { position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 16px; width: 100%; }
.login-kicker { font-size: 12px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(36, 52, 77, 0.6); text-shadow: 0 1px 0 rgba(255,255,255,0.7); }
.login-title { font-size: clamp(48px, 9vw, 80px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; color: #fff; text-shadow: 0 4px 0 #6fb4dc, 0 8px 0 rgba(36, 80, 120, 0.25), 0 14px 30px rgba(36, 52, 77, 0.25); margin: 2px 0 64px; }
.login-card { position: relative; width: min(360px, 100%); padding: 82px 24px 20px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
#loginPuffin { position: absolute; left: 50%; top: -74px; width: 170px; height: 150px; transform: translateX(-50%); pointer-events: none; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; margin: 0 0 5px 4px; font-size: 12px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; height: 48px; padding: 0 16px; border: 2px solid #e2e9f1; border-radius: 15px; background: #f6f9fc; font-size: 17px; font-weight: 700; color: var(--ink); outline: none; transition: border-color 0.12s, background 0.12s; user-select: text; -webkit-user-select: text; }
.field input:focus { border-color: #8fc6e6; background: #fff; }
.login-error { min-height: 18px; margin: 10px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: var(--coral-shade); }
.login-hint { margin: 8px 4px 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--muted); font-weight: 600; }
.login-refresh { color: inherit; font-weight: 900; text-decoration: underline; }
.login-back { margin-top: 18px; padding: 6px 14px; border-radius: 12px; background: rgba(255,255,255,0.7); font-size: 13px; font-weight: 800; color: var(--ink-soft); text-decoration: none; }
.login-back:hover { color: var(--ink); background: #fff; }
.login-beta { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 7px; padding: 6px 14px 6px 11px; border-radius: 14px; background: rgba(255, 255, 255, 0.86); font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); box-shadow: 0 2px 0 rgba(0,0,0,0.06); backdrop-filter: blur(4px); cursor: help; outline: none; z-index: 2; }
.login-beta svg { width: 15px; height: 15px; flex: none; }
.login-beta-tip { position: absolute; white-space: normal; left: 0; top: calc(100% + 8px); width: 250px; padding: 10px 13px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.45; box-shadow: 0 8px 20px rgba(0,0,0,0.18); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.login-beta:hover .login-beta-tip, .login-beta:focus .login-beta-tip { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .pill { height: 40px; padding: 0 14px; font-size: 15px; }
  .round-btn { width: 40px; height: 40px; }
  #chatForm { height: 40px; }
  .emote-tray { grid-template-columns: repeat(5, 44px); }
  .emote-tray button, .emote-tray canvas { width: 44px; height: 44px; }
}
