#nav #blog-info { display: flex; align-items: center; gap: 8px; }
.cl-pet-home { position: relative; display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; }
.cl-pet-launch, .cl-pet-recall { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%; touch-action: manipulation; }
.cl-pet-launch { position: relative; isolation: isolate; flex: 0 0 40px; }
.cl-pet-launch::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; }
.cl-pet-launch img { grid-area: 1 / 1; width: 36px; height: 36px; object-fit: contain; }
.cl-pet-recall { position: absolute; inset: 0; visibility: hidden; color: currentColor; opacity: .48; transition: opacity .2s, background .2s; }
.cl-pet-recall svg { width: 17px; height: 17px; fill: currentColor; }
.cl-pet-away:not(.cl-pet-occupied) .cl-pet-recall { visibility: visible; }
.cl-pet-recall:hover, .cl-pet-recall:focus-visible { opacity: 1; background: rgba(73,177,245,.13); }
/* Reparented outside the PJAX/header transforms: only this 40px button catches input. */
.cl-pet-launch.cl-pet-roaming { position: fixed; left: 0; top: 0; z-index: 98; margin: 0; transition: none; will-change: transform; overflow: visible; }
.cl-pet-sprite { display: none; grid-area: 1 / 1; width: 40px; height: 40px; background-repeat: no-repeat; background-size: 1700% 100%; transform-origin: 50% 88%; pointer-events: none; }
.cl-pet-launch.cl-pet-animated img { visibility: hidden; }
.cl-pet-animated .cl-pet-sprite { display: block; }
.cl-pet-shadow { display: none; position: absolute; z-index: -1; width: 23px; height: 4px; left: 9px; bottom: 1px; border-radius: 50%; background: #426675; filter: blur(1.5px); opacity: .2; pointer-events: none; }
.cl-pet-roaming .cl-pet-shadow { display: block; }
.cl-pet-launch.cl-pet-room-hidden { visibility: hidden; }
.cl-pet-invite { position: absolute; bottom: calc(100% + 7px); left: 0; padding: 5px 10px; border: 1px solid rgba(73,177,245,.2); border-radius: 10px 10px 10px 3px; color: #486676; background: rgba(255,255,255,.96); box-shadow: 0 3px 12px #29465b0d; font: 11px/1.6 var(--font-body); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s; }
.cl-pet-hint-left .cl-pet-invite { left: auto; right: 0; border-radius: 10px 10px 3px 10px; }
.cl-pet-hint-below .cl-pet-invite { top: calc(100% + 7px); bottom: auto; }
.cl-pet-launch:focus-visible .cl-pet-invite { opacity: 1; visibility: visible; }
@media (hover: hover) { .cl-pet-launch:hover .cl-pet-invite { opacity: 1; visibility: visible; } }
.cl-pet-launch[aria-busy='true'] { cursor: progress; }
.cl-pet-launch:focus-visible, .cl-pet-recall:focus-visible, #cl-pet button:focus-visible, #cl-pet canvas:focus-visible { outline: 2px solid #168bc7; outline-offset: 3px; }
#cl-pet { --pet-ink: #4a493a; --pet-muted: #747460; --pet-surface: rgba(255,250,239,.92); position: fixed; inset: 0; width: 100%; height: 100dvh; z-index: 2000; color: var(--pet-ink); font-family: var(--font-body); letter-spacing: 0; }
#cl-pet[hidden], #cl-pet [hidden] { display: none !important; }
/* Keep Butterfly's global canvas fade from washing out the room on reopen. */
#cl-pet canvas { display: block; width: 100%; height: 100%; touch-action: none; pointer-events: auto; cursor: grab; animation: none; opacity: 1; }
#cl-pet canvas:active { cursor: grabbing; }
#cl-pet.cl-pet-room { width: 100%; height: 100dvh; height: var(--pet-height, 100dvh); inset: 0; transform: none !important; z-index: 2000; background: #eaf0f0; pointer-events: auto; }
#cl-pet.cl-pet-night { --pet-ink: #fff0d9; --pet-muted: #ded8e8; --pet-surface: rgba(43,44,65,.92); background: #22283e; }
.cl-pet-hud { position: absolute; inset: 0; pointer-events: none; }
.cl-pet-hud::before { content: ''; position: absolute; inset: 0 0 auto; height: 155px; background: linear-gradient(180deg, rgba(249,241,224,.86), rgba(249,241,224,0)); }
#cl-pet.cl-pet-night .cl-pet-hud::before { background: linear-gradient(180deg, rgba(29,33,54,.78), rgba(29,33,54,0)); }
.cl-pet-heading { position: absolute; left: max(28px, env(safe-area-inset-left)); top: max(24px, env(safe-area-inset-top)); }
.cl-pet-heading p { margin: 0 0 6px; font: 11px/1.4 var(--font-mono); color: var(--pet-muted); }
.cl-pet-heading h2 { font-size: 26px; line-height: 1.3; margin: 0; color: inherit; }
.cl-pet-state { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-top: 9px; }
.cl-pet-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #34a997; }
.cl-pet-toptools { position: absolute; right: max(24px, env(safe-area-inset-right)); top: max(24px, env(safe-area-inset-top)); display: flex; gap: 8px; pointer-events: auto; }
#cl-pet button { color: inherit; font: inherit; border: 1px solid rgba(114,140,147,.24); background: var(--pet-surface); cursor: pointer; }
#cl-pet .cl-pet-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; position: relative; padding: 0; font-size: 16px; box-shadow: 0 3px 12px #51452c09; transition: background .2s, border-color .2s; }
#cl-pet button:hover { border-color: #849c82; background: #f6ebd5; }
#cl-pet.cl-pet-night button:hover { background: #5b5674; color: #fff5e4; }
#cl-pet .cl-pet-icon svg { width: 18px; height: 18px; fill: currentColor; }
#cl-pet button[aria-pressed='true'] { background: #dfe8d8; color: #405b47; border-color: #a4b89e; }
#cl-pet.cl-pet-night button[aria-pressed='true'] { background: #655c7b; color: #ffe3ad; border-color: #b5a0c0; }
#cl-pet button:disabled { opacity: .45; cursor: default; }
#cl-pet [data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); background: var(--pet-surface); color: var(--pet-ink); padding: 5px 9px; border: 1px solid rgba(114,140,147,.2); border-radius: 5px; white-space: nowrap; font-size: 12px; opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
#cl-pet [data-tip]:hover::after, #cl-pet [data-tip]:focus-visible::after { opacity: 1; visibility: visible; }
#cl-pet .cl-pet-toptools [data-tip]::after { top: calc(100% + 9px); bottom: auto; }
#cl-pet .cl-pet-toptools button:last-child::after { left: auto; right: 0; transform: none; }
.cl-pet-bottom { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; flex-direction: column; gap: 12px; width: min(440px, calc(100% - 32px)); padding: 12px 20px 10px; border: 1px solid #f5eddb80; border-radius: 22px; background: var(--pet-surface); box-shadow: 0 8px 36px #3d302418; backdrop-filter: blur(14px); }
.cl-pet-meters { display: flex; align-items: center; justify-content: center; gap: 22px; width: 100%; font-size: 12px; color: var(--pet-ink); }
.cl-pet-meter { display: grid; grid-template-columns: auto 64px; align-items: center; gap: 8px; }
.cl-pet-meter meter { width: 64px; height: 7px; appearance: none; border: none; background: #cbd8d8; border-radius: 6px; overflow: hidden; }
.cl-pet-meter meter::-webkit-meter-bar { border: 0; background: #cbd8d8; height: 7px; }
.cl-pet-meter meter::-webkit-meter-optimum-value { background: #879e7e; }
.cl-pet-meter meter::-moz-meter-bar { background: #879e7e; }
.cl-pet-actions { display: flex; gap: 8px; pointer-events: auto; }
.cl-pet-toast { min-height: 21px; font-size: 13px; line-height: 21px; color: var(--pet-ink); text-align: center; }
.cl-pet-toast:empty { display: none; }
.cl-pet-hint { margin: 0; color: var(--pet-muted); font-size: 11px; line-height: 1.5; text-align: center; }
.cl-pet-error { position: fixed; z-index: 2100; left: 16px; top: 72px; max-width: calc(100% - 32px); padding: 12px 16px; background: #fff; border: 1px solid #badbe7; border-radius: 8px; color: #253c46; font-size: 14px; }
.cl-pet-loading { position: fixed; z-index: 2100; top: 70px; left: 22px; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 10px; color: #293f3d; background: rgba(255,255,255,.96); border: 1px solid #c6d9d2; border-radius: 8px; box-shadow: 0 8px 32px #253c4614; font: 14px/1.5 var(--font-body); }
.cl-pet-loading img { object-fit: contain; }
@media (max-width: 600px) {
  .cl-pet-heading { left: 18px; top: max(18px, env(safe-area-inset-top)); }
  .cl-pet-heading h2 { font-size: 22px; }
  .cl-pet-heading p { max-width: 140px; font-size: 9px; }
  .cl-pet-toptools { right: 16px; top: max(18px, env(safe-area-inset-top)); gap: 6px; }
  #cl-pet .cl-pet-toptools .cl-pet-icon { width: 38px; height: 40px; }
  .cl-pet-meters { gap: 12px; }
  .cl-pet-meter { grid-template-columns: auto 48px; gap: 5px; }
  .cl-pet-meter meter { width: 48px; }
  .cl-pet-bottom { bottom: max(18px, env(safe-area-inset-bottom)); gap: 10px; }
  .cl-pet-hint { font-size: 10px; }
}
@media (max-height: 480px) {
  .cl-pet-heading h2 { font-size: 18px; }
  .cl-pet-heading p, .cl-pet-meters, .cl-pet-hint { display: none; }
  .cl-pet-bottom { bottom: 12px; gap: 4px; }
}
@media (max-width: 370px) and (min-height: 481px) {
  .cl-pet-toptools { display: grid; grid-template-columns: repeat(3, 38px); }
  .cl-pet-heading p { display: none; }
  .cl-pet-heading h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #cl-pet *, .cl-pet-launch img { transition: none !important; }
  .cl-pet-recall, .cl-pet-invite { transition: none; }
  .cl-pet-animated .cl-pet-sprite { display: none; animation: none; }
  .cl-pet-launch.cl-pet-animated img { visibility: visible; }
}

/* The playbook is optional. Direct room picking remains the main interaction. */
.cl-pet-explore { position: absolute; top: 142px; bottom: 26px; left: max(24px, env(safe-area-inset-left)); width: 340px; max-width: calc(100% - 32px); padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--pet-surface); border: 1px solid #c5baa85c; border-radius: 22px; box-shadow: 0 16px 60px #3d302426; backdrop-filter: blur(18px); pointer-events: auto; }
.cl-pet-explore-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cl-pet-explore-title small { font: 9px/1.4 var(--font-mono); letter-spacing: 1.4px; color: var(--pet-muted); }
.cl-pet-explore-title h3 { margin: 5px 0 0; font-size: 21px; color: inherit; }
#cl-pet .cl-pet-explore-title button { flex: 0 0 44px; height: 44px; border-radius: 50%; font-size: 24px; }
.cl-pet-collection, .cl-pet-panel-help, .cl-pet-album-score { margin: 0; color: var(--pet-muted); font-size: 12px; line-height: 1.7; }
.cl-pet-collection { font-size: 13px; color: var(--pet-ink); }
.cl-pet-collection-bar { height: 4px; background: #9caf932f; border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.cl-pet-collection-bar span { display: block; height: 100%; background: #91a581; transition: width .4s; }
.cl-pet-activity-list { display: flex; flex-direction: column; gap: 6px; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; }
.cl-pet-tricks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
#cl-pet .cl-pet-activity-list .cl-pet-tricks button { justify-content: center; min-height: 44px; padding: 7px 4px; font-size: 12px; }
#cl-pet .cl-pet-activity-list button { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 61px; text-align: left; border-radius: 12px; font-size: 14px; background: transparent; }
.cl-pet-activity-number { font: 12px var(--font-mono); color: #a09074; }
.cl-pet-activity-list small { display: block; margin-top: 3px; font-size: 10px; color: var(--pet-muted); line-height: 1.5; }
.cl-pet-stamp { margin-left: auto; color: #899e7c; }
#cl-pet .cl-pet-activity-list .is-collected { border-color: #8da47c63; }
.cl-pet-extra-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cl-pet-music { display: grid; gap: 5px; border-top: 1px solid #a0907430; padding-top: 8px; font-size: 11px; }
.cl-pet-explore { overflow-y: auto; overscroll-behavior: contain; }
.cl-pet-explore > * { flex-shrink: 0; }
.cl-pet-explore .cl-pet-activity-list { flex-shrink: 1; }
.cl-pet-now-playing { margin: 0; color: var(--pet-ink); line-height: 1.6; }
.cl-pet-music label { display: flex; align-items: center; gap: 8px; }
.cl-pet-music select { flex: 1; min-width: 0; min-height: 34px; padding: 4px 7px; border: 1px solid #a0907460; border-radius: 7px; color: var(--pet-ink); background: var(--pet-surface); font: inherit; }
.cl-pet-music input { flex: 1; min-width: 0; height: 32px; margin: 0; accent-color: #839b79; touch-action: pan-y; }
.cl-pet-music output { width: 32px; text-align: right; }
#cl-pet .cl-pet-music small, #cl-pet .cl-pet-music a { font-size: 10px; color: var(--pet-muted); }
#cl-pet .cl-pet-music a { text-decoration: underline; text-underline-offset: 3px; }
#cl-pet input:focus-visible, #cl-pet select:focus-visible, #cl-pet a:focus-visible { outline: 2px solid #168bc7; outline-offset: 2px; }
#cl-pet .cl-pet-extra-actions button { border-radius: 10px; min-height: 44px; padding: 5px 7px; font-size: 12px; }
.cl-pet-object-tip { position: absolute; border-radius: 9px; padding: 7px 13px; color: var(--pet-ink); background: var(--pet-surface); font-size: 13px; box-shadow: 0 4px 18px #382c2820; pointer-events: none; }
.cl-pet-activity-progress { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); width: 280px; max-width: calc(100% - 36px); padding: 8px 10px 8px 15px; background: var(--pet-surface); border-radius: 15px; box-shadow: 0 4px 24px #382c2814; display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; pointer-events: auto; }
.cl-pet-activity-progress > span { flex: 1; }
#cl-pet .cl-pet-activity-progress button { width: 44px; height: 44px; background: transparent; border: 0; font-size: 22px; }
.cl-pet-activity-progress > div { width: 100%; height: 3px; background: #9caf932f; border-radius: 3px; overflow: hidden; }
.cl-pet-activity-progress i { display: block; height: 100%; background: #91a581; }
@media (max-width: 600px) {
  .cl-pet-toptools { display: grid; grid-template-columns: repeat(3, 44px); gap: 5px; }
  #cl-pet .cl-pet-toptools .cl-pet-icon { width: 44px; height: 44px; }
  .cl-pet-heading { max-width: calc(100% - 182px); }
  .cl-pet-heading p { font-size: 8px; }
  .cl-pet-bottom { width: calc(100% - 24px); padding: 11px 10px 9px; }
  .cl-pet-actions { gap: 5px; }
  .cl-pet-explore { top: 126px; bottom: max(168px, calc(150px + env(safe-area-inset-bottom))); left: 12px; width: calc(100% - 24px); max-width: none; padding: 14px; z-index: 2; gap: 8px; }
  .cl-pet-explore .cl-pet-activity-list { max-height: 180px; flex-shrink: 1; min-height: 64px; }
  .cl-pet-exploring .cl-pet-activity-progress { visibility: hidden; }
  .cl-pet-explore-title h3 { font-size: 18px; }
  .cl-pet-panel-help { display: none; }
  .cl-pet-extra-actions { grid-template-columns: repeat(3, 1fr); }
  .cl-pet-album-score { font-size: 10px; }
  .cl-pet-activity-progress { top: 132px; width: 250px; }
}
@media (max-height: 650px) and (min-width: 601px) {
  .cl-pet-explore { top: 100px; bottom: 14px; padding: 14px; gap: 7px; }
  .cl-pet-panel-help { display: none; }
  .cl-pet-activity-progress { top: 100px; }
}
@media (max-height: 600px) and (max-width: 600px) {
  .cl-pet-explore { top: 122px; bottom: 130px; }
  .cl-pet-exploring .cl-pet-bottom .cl-pet-toast, .cl-pet-exploring .cl-pet-bottom .cl-pet-hint { display: none; }
  .cl-pet-explore-title small, .cl-pet-album-score { display: none; }
  .cl-pet-explore-title h3 { font-size: 16px; }
  .cl-pet-explore-title { flex-shrink: 0; }
  .cl-pet-activity-list { min-height: 48px; }
  .cl-pet-collection { font-size: 11px; }
  #cl-pet .cl-pet-extra-actions button { min-height: 44px; }
}
@media (max-height: 480px) {
  .cl-pet-explore { top: 12px; bottom: 12px; left: 12px; width: 330px; z-index: 3; }
  .cl-pet-activity-progress { top: 88px; left: auto; right: 16px; transform: none; width: 245px; }
}
