/* Dog Watcher only (spel-dogwatcher.html).
   Split out of css/style.css so pages do not download rules they cannot use; tests/css-scope.test.js checks the scope. */

/* ---------------------------------------------------------- Dog Watcher --- */
.dw-sub { font-size: .9rem; font-weight: 800; color: var(--ink-soft); margin-left: 6px; }
.dw3d .adv-btns { grid-template-areas: "call drop" "call action"; align-items: end; }
.dw3d .adv-call { align-self: end; }
.dw-hud { position: absolute; inset: 10px 10px auto 10px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.dw-hud > * { pointer-events: auto; }
.dw-left { display: grid; gap: 6px; max-width: 46%; }
.dw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-hud button.chip { cursor: pointer; }
.dw-walk { background: #fff1c2 !important; }
.dw-dogcards { display: grid; gap: 6px; width: 172px; }
.dw-card { background: rgba(255,255,255,.94); border-radius: 16px; padding: 5px 8px 6px; box-shadow: 0 3px 0 rgba(31,35,72,.12); border-left: 6px solid var(--c); }
.dw-call { all: unset; display: flex; gap: 6px; align-items: center; width: 100%; cursor: pointer; font-weight: 900; font-size: .9rem; box-sizing: border-box; border-radius: 10px; }
.dw-call:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.dw-call .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-top: 3px; }
.dw-bar { display: flex; align-items: center; gap: 3px; font-size: .7rem; }
.dw-bar .m { flex: 1; height: 7px; border-radius: 99px; background: #eee6da; overflow: hidden; }
.dw-bar .m i.low { background: var(--sun); }
.dw3d .adv-sign { top: auto; bottom: 14px; max-width: 54%; }
.dw-hold { position: absolute; left: 50%; top: 42%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: conic-gradient(#ffc93c var(--p, 0%), rgba(255,255,255,.7) 0); box-shadow: 0 4px 0 rgba(31,35,72,.2); pointer-events: none; }
.dw-hold i { position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.dw-hold i::after { content: '✋'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; }
.dw-hold[hidden] { display: none; }
.dw-ask { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(31,35,72,.3); padding: 12px; }
.dw-ask[hidden] { display: none; }
.dw-story { margin: 0 0 4px; font-weight: 700; }
.dw-q { font-size: 2.3rem; font-weight: 900; margin: 4px 0 10px; }
.dw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dw-opts .opt { font: inherit; font-size: 1.5rem; font-weight: 900; min-height: 58px; border: 0; border-radius: 18px; background: #f3eeff; color: var(--ink); box-shadow: 0 4px 0 #d9d0f5; cursor: pointer; position: relative; }
.dw-opts .opt:hover, .dw-opts .opt:focus-visible { background: #e6ddff; outline: 3px solid var(--sky); outline-offset: 1px; }
.dw-later { margin-top: 10px; }
.dw-explain { background: #fff6d8; border-radius: 14px; padding: 8px 10px; margin-bottom: 10px; }
.dw-dots { display: grid; gap: 4px; justify-content: center; }
.dw-dots i { width: 13px; height: 13px; border-radius: 50%; background: var(--plum); opacity: .8; }
.dw-evening { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: none; }
.dw3d.playing .dw-evening { display: inline-flex; }
.dw-shop .dw-who { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.dw-shop .rec { cursor: default; }
.dw-owned { font-weight: 800; color: #2a8f6f; font-size: .85rem; }
.dw-names { text-align: left; }
.dw-name-field { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.dw-swatch { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c); flex: none; }
.dw-breed { font-size: .8rem; font-weight: 800; color: var(--ink-soft); width: 92px; flex: none; }
.dw-name-field input:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
@media (max-width: 760px) {
  .dw-left { max-width: 52%; }
  .dw-dogcards { width: 118px; gap: 3px; }
  .dw-card { padding: 3px 6px 4px; border-left-width: 4px; }
  .dw-call { font-size: .8rem; }
  .dw-bar { font-size: .6rem; }
  .dw3d .adv-sign { top: auto; bottom: 112px; max-width: 92%; font-size: .85rem; padding: 5px 12px; }
  .dw-hud { inset: 6px 6px auto 6px; }
  .dw-chips { gap: 4px; }
  .dw-left { max-width: 58%; }
  .dw-q { font-size: 2rem; }
  .dw-evening { left: auto; right: 12px; bottom: auto; top: 50%; display: none !important; }
}
@media (max-width: 480px) {
  .dw-dogcards { width: 106px; }
  .dw-card { padding: 2px 5px 3px; border-radius: 12px; }
  .dw-call { font-size: .74rem; gap: 3px; }
  .dw-bars { gap: 1px 5px; margin-top: 1px; }
  .dw-bar { font-size: .52rem; gap: 2px; }
  .dw-bar .m { height: 5px; }
  .dw-hud { inset: 5px 5px auto 5px; }
}
/* Rain: a soft blue-grey veil over the scene; with reduced motion it also carries calm, still drops instead of falling streaks. */
.dw3d::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; border-radius: inherit;
  background: linear-gradient(180deg, rgba(84,104,150,.30) 0%, rgba(110,130,170,.12) 60%, rgba(110,130,170,.06) 100%); }
.dw3d.dw-rain::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .dw3d::after { transition: none; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.55) 0 2px, transparent 3px) 0 0 / 46px 58px, radial-gradient(circle at 70% 60%, rgba(255,255,255,.45) 0 2px, transparent 3px) 0 0 / 38px 50px, linear-gradient(180deg, rgba(84,104,150,.32), rgba(110,130,170,.1)); }
}
body.reduce-motion .dw3d::after { transition: none; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.55) 0 2px, transparent 3px) 0 0 / 46px 58px, radial-gradient(circle at 70% 60%, rgba(255,255,255,.45) 0 2px, transparent 3px) 0 0 / 38px 50px, linear-gradient(180deg, rgba(84,104,150,.32), rgba(110,130,170,.1)); }

/* ===================== v0.4.1: phones first ============================== */
@media (max-width: 760px), (max-height: 500px) {
  .game-top .dw-sub { display: none; }
}
/* Dog Watcher: the dog toggle only matters on small stages. */
.dw-dogsbtn { display: none !important; }
.dw-dogcards.mini { width: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dw-dogcards.mini .dw-card { width: 44px; height: 44px; padding: 0; border-left: 0; border-radius: 50%; box-shadow: 0 0 0 3px var(--c), 0 3px 0 rgba(31,35,72,.18); position: relative; }
.dw-dogcards.mini .dw-call { width: 44px; height: 44px; justify-content: center; border-radius: 50%; }
.dw-dogcards.mini .dw-call .mood { font-size: 1.35rem; }
.dw-dogcards.mini .dw-call .nm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dw-dogcards.mini .dw-bars { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dw-dogcards.mini .dw-card::after { content: attr(data-ini); position: absolute; left: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #fff; font-size: .62rem; font-weight: 900; display: grid; place-items: center; pointer-events: none; }
.dw-dogcards.mini .dw-card.low::before { content: '!'; position: absolute; right: -4px; top: -4px; width: 18px; height: 18px; border-radius: 50%; background: #ffc93c; color: var(--ink); font-size: .7rem; font-weight: 900; display: grid; place-items: center; z-index: 1; pointer-events: none; }
@media (max-width: 760px), (max-height: 500px) {
  .dw-dogsbtn { display: inline-flex !important; }
  .dw-hud button.chip { position: relative; }
  .dw-hud button.chip::after { content: ''; position: absolute; top: -10px; bottom: -10px; left: -3px; right: -3px; }
  .g3d-wrap.dw3d .dw-evening { display: inline-flex !important; position: absolute; left: max(8px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); top: auto; right: auto; min-height: 44px; padding: 4px 12px; font-size: .8rem; z-index: 3; }
  .dw3d .adv-sign { bottom: max(120px, calc(env(safe-area-inset-bottom) + 112px)); }
}
@media (max-width: 760px), (max-height: 500px) {
  .dw-hud button.chip { min-width: 44px; justify-content: center; }
}
