.masthead{flex-wrap:wrap;gap:6px 16px}
.masthead-actions{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px}
.masthead-actions .plain{margin:0}
#music-toggle{gap:6px}
.record{width:17px;height:17px;border-radius:50%;border:1px solid #263634;background:radial-gradient(circle,#f5ead1 0 1px,#9e423a 1.5px 3px,transparent 3.5px),conic-gradient(from 12deg,#213d3b 0 18%,#6f8276 19% 25%,#263634 27% 67%,#708376 69% 74%,#263634 77%)}
@media(prefers-reduced-motion:no-preference){
  #music-toggle .record{animation:record-turn 4s ease-in-out infinite;animation-play-state:paused}
  #music-toggle[aria-pressed=true] .record{animation-play-state:running}
}

.cat-target{left:0;top:0;transition:none!important}

@keyframes record-turn{to{transform:rotate(1turn)}}
.together-tag{width:fit-content;margin:-7px 0 19px;padding:3px 11px;border:1px dashed #b67d67;border-radius:3px;background:#f6e9d4;color:#874737;font:600 14px/1.7 var(--serif)}

.postcard-scene{position:relative}
#picture{aspect-ratio:680/600}
.cat-targets{position:absolute;inset:0;pointer-events:none;container-type:inline-size}
.cat-target{position:absolute;min-width:26px;min-height:40px;transform:translate(-50%,-50%);pointer-events:auto;touch-action:manipulation;border:0;border-radius:45%;padding:0;background:transparent}
.cat-target:focus-visible{outline:2px solid #f9df9c;outline-offset:3px}
.cat-bubble{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);pointer-events:none;width:max-content;max-width:108px;overflow-wrap:anywhere;padding:3px 9px;border-radius:8px;background:#fff0ce;color:#273736;box-shadow:0 2px 4px #203b3930;font:600 14px/1.4 var(--sans)}
.cat-bubble::after{content:"";position:absolute;top:100%;left:calc(50% - 4px);width:0;height:0;border-inline:4px solid transparent;border-top:5px solid #fff0ce}
.cat-hint,.cat-secret{margin:5px 2px 0;color:var(--muted);font-size:13px;line-height:1.55}
.cat-secret{border-left:2px solid #bf8270;padding-left:8px;color:var(--red)}
.pet-status{position:absolute;margin:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

@media(max-width:760px){
  .masthead-actions{gap:4px 12px;font-size:14px}
  .together-tag{margin:-3px 0 14px}
}

.cat-target{min-width:44px;min-height:44px}
.cat-envelope{position:absolute;left:clamp(36px,var(--offer-x,50%),calc(100% - 36px));top:73%;z-index:2;transform:translateX(-50%) rotate(-3deg);pointer-events:auto;padding:2px 8px;min-height:44px;min-width:56px;background:#f8e4bf;border:1px solid #997453;border-radius:5px;color:#6c3f30;box-shadow:1px 2px 0 #513b334d;font:600 14px var(--serif)}
.cat-envelope span{display:inline-block}
.cat-hint,.cat-secret{font-size:15px;line-height:1.4}
.art:has(.cat-secret:not([hidden])){width:min(96cqw,calc((100cqh - 104px)*1.1),650px)}
.art:has(.cat-secret:not([hidden])) .cat-hint{display:none}
.cat-bubble:not([hidden]){animation:bubble-in .25s ease-out}
@keyframes bubble-in{from{opacity:0;transform:translate(-50%,4px)}}


@media(prefers-reduced-motion:reduce){
  button:not(:disabled){transition:opacity .24s ease-out}
  .primary:hover,.primary:active{transform:none}
  #progress i{opacity:.65;transition:opacity .24s ease-out}
  #progress i.active{transform:none;opacity:1}
  .cat-bubble:not([hidden]){animation:bubble-fade .24s ease-out}
  @keyframes bubble-fade{from{opacity:0}to{opacity:1}}
}
.together-tag{font-size:15px}

.art-frame{grid-template:100% / 100%}
@media(max-height:500px) and (orientation:landscape){
  #picture{aspect-ratio:680/455}
  .art{width:min(96cqw,calc((100cqh - 62px)*1.45),470px)}
  .art:has(.cat-secret:not([hidden])){width:min(96cqw,calc((100cqh - 92px)*1.45),470px)}
  .art-caption{letter-spacing:0}
  .art-caption [lang]{font-size:13px}
  .cat-envelope{top:auto;bottom:0}
}
@media(max-width:768px) and (orientation:portrait){
  #picture{aspect-ratio:var(--card-ratio)}
  .art{--caption-space:62px}
  .art:has(.cat-secret:not([hidden])){--caption-space:88px}
  .art,.art:has(.cat-secret:not([hidden])){width:min(var(--card-width),calc((100cqh - var(--caption-space)) * (var(--card-ratio))))}
  .art-caption{letter-spacing:0;padding-top:5px}
  .art-caption [lang]{font-size:13px}
  .cat-envelope{top:auto;bottom:0}
}
