.jdg-section {
  max-width: 960px;
  margin: 24px auto;
  padding: 28px;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #d8e0d8;
  box-shadow: 0 8px 22px rgba(47,93,80,.06);
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2933;
}
.jdg-section h2 { color: #2f5d50; margin-top: 0; font-size: 26px; }
.jdg-section h3 { color: #173f32; font-size: 18px; margin: 0 0 8px; }

.jdg-login-notice {
  max-width: 480px;
  margin: 48px auto;
  padding: 32px;
  background: #fff8e8;
  border: 1px solid #f0dfb7;
  border-radius: 18px;
  text-align: center;
  font-size: 18px;
  color: #645235;
}
.jdg-login-notice a { color: #2f5d50; font-weight: 700; }

/* Form */
.jdg-form label { display: block; margin-bottom: 14px; font-weight: 600; color: #2f5d50; }
.jdg-form input, .jdg-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8e0d8;
  border-radius: 10px;
  font-size: 15px;
  margin-top: 4px;
  font-family: inherit;
}
.jdg-form input:focus, .jdg-form select:focus {
  outline: none;
  border-color: #2f5d50;
  box-shadow: 0 0 0 3px rgba(47,93,80,.12);
}

/* Button */
.jdg-btn {
  display: inline-block;
  background: #2f5d50;
  color: #fff;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.jdg-btn:hover { background: #1d4238; }
.jdg-btn-sm { padding: 8px 14px; font-size: 13px; margin-top: 6px; }
.jdg-btn[disabled] { opacity: .5; cursor: default; }

/* Preview */
.jdg-preview { margin: 16px 0; min-height: 90px; }
.jdg-preview svg { border-radius: 12px; background: #f0f7f0; padding: 6px; }

/* Dashboard */
.jdg-dog-header { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #d8e0d8; }
.jdg-dog-header svg { width: 90px; height: 90px; border-radius: 14px; background: #f0f7f0; padding: 8px; flex-shrink: 0; }
.jdg-dog-header h2 { margin: 0; }
.jdg-breed-label { color: #64737c; font-size: 14px; margin: 2px 0; }

/* Action cards */
.jdg-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.jdg-action-card {
  background: #f7faf9;
  border: 1px solid #d8e0d8;
  border-radius: 16px;
  padding: 20px;
}
.jdg-action-card p { margin: 6px 0; font-size: 14px; color: #52616b; }
.jdg-action-card label { display: block; margin: 8px 0; font-size: 13px; color: #2f5d50; font-weight: 600; }
.jdg-action-card input[type="time"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #d8e0d8;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 2px;
}

/* Other dogs list */
.jdg-other-dogs { margin-top: 10px; max-height: 340px; overflow-y: auto; }
.jdg-other-dog {
  display: flex; gap: 10px; align-items: center;
  padding: 10px; border-bottom: 1px solid #ececec;
  font-size: 13px;
}
.jdg-other-dog:last-child { border-bottom: none; }
.jdg-other-dog svg { width: 40px; height: 40px; flex-shrink: 0; }

/* Bot dogs (park visitors) */
.jdg-park-visitors { margin-top: 18px; }
.jdg-bot-dogs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.jdg-bot-dog {
  display: flex; gap: 10px; align-items: center;
  padding: 12px; border: 1px solid #d8e0d8;
  border-radius: 14px; background: #f7faf9;
  font-size: 13px; min-width: 180px;
}
.jdg-bot-dog svg { width: 40px; height: 40px; flex-shrink: 0; }

/* Bowl status */
.jdg-bowl-status { font-size: 14px; color: #52616b; margin: 6px 0; }

/* Message */
.jdg-message {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  display: none;
}
.jdg-message.jdg-success { display: block; background: #e6f4ea; color: #1b5e20; border: 1px solid #a8d8a8; }
.jdg-message.jdg-error { display: block; background: #fde8e8; color: #b71c1c; border: 1px solid #f5c6c6; }

/* Hint */
.jdg-hint { color: #888; }

/* Park News */
.jdg-park-news { margin-top: 18px; }
.jdg-news-feed { max-height: 300px; overflow-y: auto; }
.jdg-news-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e8ece8; font-size: 14px; }
.jdg-news-item:last-child { border-bottom: none; }
.jdg-news-item time { color: #888; min-width: 60px; flex-shrink: 0; font-size: 12px; }
.jdg-news-empty { color: #999; text-align: center; padding: 20px; }

/* Animated Park */
.jdg-park-scene {
  position: relative;
  height: 420px;
  margin: 16px 0 14px;
  overflow: hidden;
  border: 1px solid #b7d3ab;
  border-radius: 18px;
  background:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,.4) 0 8%, transparent 18%),
    linear-gradient(180deg, #bfe8a2 0%, #85c46c 52%, #5f9c4f 100%);
  box-shadow: inset 0 18px 40px rgba(255,255,255,.25), inset 0 -18px 32px rgba(40,85,37,.16);
  isolation: isolate;
}
.jdg-park-bg,
.jdg-dogs-layer,
.jdg-zone-labels {
  position: absolute;
  inset: 0;
}
.jdg-park-bg::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 13%;
  height: 26%;
  border-radius: 50%;
  background: rgba(235, 205, 139, .36);
  transform: rotate(-4deg);
}
.jdg-park-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(57,119,51,.32) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(255,255,255,.35) 0 1px, transparent 1.5px);
  background-size: 52px 48px, 36px 34px;
  opacity: .32;
}
.jdg-tree {
  position: absolute;
  width: 72px;
  height: 88px;
  left: 8%;
  top: 9%;
  z-index: 1;
}
.jdg-tree::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 40px;
  width: 13px;
  height: 48px;
  border-radius: 9px;
  background: #815433;
}
.jdg-tree::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 58px;
  border-radius: 50%;
  background: #2f7b43;
  box-shadow: 18px 12px 0 #3d934f, -12px 16px 0 #2b6e3d;
}
.jdg-doghouse {
  position: absolute;
  right: 9%;
  top: 13%;
  width: 86px;
  height: 68px;
  border-radius: 8px 8px 4px 4px;
  background: #b9683c;
  z-index: 1;
  box-shadow: inset -10px 0 rgba(92,48,29,.18);
}
.jdg-doghouse::before {
  content: "";
  position: absolute;
  left: -11px;
  top: -33px;
  width: 0;
  height: 0;
  border-left: 54px solid transparent;
  border-right: 54px solid transparent;
  border-bottom: 42px solid #8f3f32;
}
.jdg-doghouse::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 30px;
  height: 42px;
  border-radius: 18px 18px 0 0;
  background: #3d2b23;
}
.jdg-bowl {
  position: absolute;
  width: 58px;
  height: 24px;
  border-radius: 8px 8px 24px 24px;
  background: #c75c4c;
  bottom: 16%;
  z-index: 1;
  box-shadow: inset 0 -7px rgba(94,39,39,.18);
}
.jdg-bowl::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -8px;
  height: 14px;
  border-radius: 50%;
  background: #f3c56b;
}
.jdg-bowl-food { right: 11%; }
.jdg-bowl-water {
  left: 10%;
  background: #5c97c9;
}
.jdg-bowl-water::before {
  background: #9edaf2;
}
.jdg-park-gate {
  position: absolute;
  left: 47%;
  bottom: 3%;
  width: 62px;
  height: 52px;
  border-left: 7px solid #7d5838;
  border-right: 7px solid #7d5838;
  border-top: 7px solid #7d5838;
  border-radius: 8px 8px 0 0;
  z-index: 1;
}
.jdg-zone-labels span {
  position: absolute;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: #2f5d50;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}
.jdg-dogs-layer {
  z-index: 4;
}
.jdg-dog-on-park {
  --walk-duration: 6s;
  position: absolute;
  width: 94px;
  height: 70px;
  transform: translate(-50%, -50%);
  transition:
    left var(--walk-duration) cubic-bezier(.37,.01,.24,1),
    top var(--walk-duration) cubic-bezier(.37,.01,.24,1);
  will-change: left, top;
}
.jdg-walk-dog {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 72px;
  height: 42px;
  transform-origin: 50% 75%;
  filter: drop-shadow(0 6px 4px rgba(42,70,38,.22));
}
.jdg-facing-left .jdg-walk-dog {
  transform: scaleX(-1);
}
.jdg-walking .jdg-walk-dog {
  animation: jdg-body-bob .55s linear infinite;
}
.jdg-body {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 43px;
  height: 22px;
  border-radius: 24px 26px 20px 18px;
  background: var(--coat);
}
.jdg-chest {
  position: absolute;
  left: 44px;
  top: 17px;
  width: 18px;
  height: 22px;
  border-radius: 50%;
  background: var(--coat-light);
  opacity: .55;
}
.jdg-head {
  position: absolute;
  right: 0;
  top: 7px;
  width: 26px;
  height: 23px;
  border-radius: 48% 52% 50% 45%;
  background: var(--coat);
}
.jdg-snout {
  position: absolute;
  right: -8px;
  top: 10px;
  width: 16px;
  height: 12px;
  border-radius: 11px 13px 10px 10px;
  background: var(--coat-light);
}
.jdg-eye {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #111;
  box-shadow: 1px -1px 0 rgba(255,255,255,.7);
}
.jdg-nose {
  position: absolute;
  right: -9px;
  top: 12px;
  width: 5px;
  height: 4px;
  border-radius: 50%;
  background: #151515;
}
.jdg-ear {
  position: absolute;
  background: var(--coat-dark);
}
.jdg-ears-drop .jdg-ear {
  top: 10px;
  width: 9px;
  height: 18px;
  border-radius: 8px;
}
.jdg-ears-drop .jdg-ear-a { left: 2px; transform: rotate(18deg); }
.jdg-ears-drop .jdg-ear-b { left: 11px; transform: rotate(-8deg); opacity: .85; }
.jdg-ears-point .jdg-ear,
.jdg-ears-bat .jdg-ear {
  top: -10px;
  width: 11px;
  height: 20px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 2px;
}
.jdg-ears-point .jdg-ear-a { left: 2px; transform: rotate(-18deg); }
.jdg-ears-point .jdg-ear-b { left: 14px; transform: rotate(18deg); }
.jdg-ears-bat .jdg-ear {
  width: 14px;
  height: 24px;
}
.jdg-ears-bat .jdg-ear-a { left: -1px; transform: rotate(-24deg); }
.jdg-ears-bat .jdg-ear-b { left: 14px; transform: rotate(24deg); }
.jdg-tail {
  position: absolute;
  left: 5px;
  top: 15px;
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: var(--coat);
  transform-origin: 95% 50%;
  transform: rotate(25deg);
}
.jdg-tail-curl .jdg-tail {
  width: 23px;
  height: 23px;
  top: 8px;
  left: 1px;
  border: 6px solid var(--coat);
  border-left-color: transparent;
  background: transparent;
  border-radius: 50%;
}
.jdg-tail-nub .jdg-tail {
  left: 10px;
  width: 10px;
  height: 10px;
}
.jdg-tail-pom .jdg-tail::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--coat-light);
}
.jdg-walking .jdg-tail {
  animation: jdg-tail-wag .28s ease-in-out infinite alternate;
}
.jdg-leg {
  position: absolute;
  top: 34px;
  width: 7px;
  height: 20px;
  border-radius: 6px;
  background: var(--coat-dark);
  transform-origin: 50% 2px;
}
.jdg-leg::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: 12px;
  height: 5px;
  border-radius: 6px;
  background: var(--coat-dark);
}
.jdg-leg-front-a { left: 50px; }
.jdg-leg-front-b { left: 42px; opacity: .82; }
.jdg-leg-back-a { left: 22px; }
.jdg-leg-back-b { left: 14px; opacity: .82; }
.jdg-walking .jdg-leg-front-a,
.jdg-walking .jdg-leg-back-b {
  animation: jdg-step-front .48s ease-in-out infinite;
}
.jdg-walking .jdg-leg-front-b,
.jdg-walking .jdg-leg-back-a {
  animation: jdg-step-back .48s ease-in-out infinite;
}
.jdg-body-short .jdg-body { width: 39px; height: 19px; top: 20px; }
.jdg-body-short .jdg-head { top: 10px; }
.jdg-body-short .jdg-leg { height: 14px; top: 36px; }
.jdg-body-stock .jdg-body { width: 38px; height: 25px; top: 15px; border-radius: 18px; }
.jdg-body-stock .jdg-head { width: 29px; height: 25px; top: 6px; }
.jdg-body-tall .jdg-body { width: 37px; height: 24px; top: 13px; }
.jdg-body-tall .jdg-leg { height: 23px; }
.jdg-breed-husky .jdg-body::after,
.jdg-breed-corgi .jdg-body::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 4px;
  width: 18px;
  height: 9px;
  border-radius: 50%;
  background: var(--coat-light);
  opacity: .75;
}
.jdg-breed-poodle .jdg-head::after,
.jdg-breed-poodle .jdg-body::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--coat-light);
}
.jdg-breed-poodle .jdg-head::after {
  left: 5px;
  top: -7px;
  width: 16px;
  height: 12px;
}
.jdg-breed-poodle .jdg-body::before {
  left: 12px;
  top: -7px;
  width: 20px;
  height: 14px;
}
.jdg-dog-name {
  position: absolute;
  left: 50%;
  bottom: -3px;
  transform: translateX(-50%);
  max-width: 88px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #173f32;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jdg-dog-tooltip {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: max-content;
  max-width: 180px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(23, 63, 50, .94);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .15s, transform .15s;
  z-index: 30;
}
.jdg-dog-on-park:hover .jdg-dog-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}
.jdg-news-compact {
  max-height: 150px;
  overflow-y: auto;
  padding: 4px 2px;
}
@keyframes jdg-body-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2px; }
}
@keyframes jdg-tail-wag {
  from { rotate: -16deg; }
  to { rotate: 18deg; }
}
@keyframes jdg-step-front {
  0%, 100% { transform: rotate(18deg) translateY(0); }
  50% { transform: rotate(-26deg) translateY(-1px); }
}
@keyframes jdg-step-back {
  0%, 100% { transform: rotate(-22deg) translateY(-1px); }
  50% { transform: rotate(20deg) translateY(0); }
}

@media(max-width:720px){
  .jdg-actions { grid-template-columns: 1fr; }
  .jdg-dog-header { flex-direction: column; text-align: center; }
  .jdg-bot-dogs { flex-direction: column; }
  .jdg-section { padding: 18px; border-radius: 16px; }
  .jdg-park-scene { height: 360px; }
  .jdg-zone-labels span { font-size: 11px; padding: 3px 6px; }
  .jdg-dog-on-park { width: 84px; transform: translate(-50%, -50%) scale(.88); }
}

@media(max-width:480px){
  .jdg-park-scene { height: 310px; margin-left: -6px; margin-right: -6px; }
  .jdg-doghouse { transform: scale(.82); transform-origin: top right; }
  .jdg-tree { transform: scale(.82); transform-origin: top left; }
  .jdg-zone-labels span { display: none; }
}
