/* 번개 is the one warm character in the otherwise quiet, neutral workspace. */
:root { --bungae-fur: #a76d43; --bungae-gold: #d8b77e; --bungae-soft: #b8a187; }
.bungae-mascot { display: inline-flex; position: relative; flex: none; width: 76px; height: 76px; align-items: center; justify-content: center; vertical-align: middle; line-height: 0; user-select: none; pointer-events: none; }
.bungae-mascot--xs { width: 28px; height: 28px; }
.bungae-mascot--sm { width: 44px; height: 44px; }
.bungae-mascot--lg { width: 108px; height: 108px; }
.bungae-mascot--hero { width: 132px; height: 132px; }
.bungae-mascot svg { display: block; flex: none; width: 100%; height: 100%; overflow: visible; fill: initial; stroke: initial; stroke-width: initial; }
.bungae-mascot .bungae-dog { transform-origin: 80px 139px; }
.bungae-mascot .bungae-shadow { transform-origin: 80px 142px; }
.bungae-mascot .bungae-head { transform-origin: 104px 82px; }
.bungae-mascot .bungae-tail { transform-origin: 43px 102px; }
.bungae-mascot .bungae-leg-back-far { transform-origin: 65px 108px; }
.bungae-mascot .bungae-leg-back-near { transform-origin: 52px 108px; }
.bungae-mascot .bungae-leg-front-far { transform-origin: 109px 107px; }
.bungae-mascot .bungae-leg-front-near { transform-origin: 92px 109px; }
.bungae-mascot .bungae-ear { transform-origin: 104px 43px; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) .bungae-dog { animation: bungae-trot .68s ease-in-out infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) .bungae-shadow { animation: bungae-shadow .68s ease-in-out infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) :is(.bungae-leg-back-far, .bungae-leg-front-near) { animation: bungae-step .68s ease-in-out infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) :is(.bungae-leg-back-near, .bungae-leg-front-far) { animation: bungae-step .68s ease-in-out -.34s infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) .bungae-ear { animation: bungae-ear .68s ease-in-out infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="running"], [data-state="sending"]) .bungae-tail { animation: bungae-wag .34s ease-in-out infinite; }
.bungae-mascot[data-animated="true"]:is([data-state="waiting"], [data-state="reconnecting"]) .bungae-head { animation: bungae-listen 3.8s ease-in-out infinite; }
.bungae-mascot[data-state="waiting"] .bungae-tongue, .bungae-mascot[data-state="reconnecting"] .bungae-tongue, .bungae-mascot[data-state="error"] .bungae-tongue { opacity: 0; }
.bungae-mascot[data-state="error"] .bungae-head { transform: rotate(-6deg); }
.bungae-mascot[data-state="done"] .bungae-head { transform: rotate(5deg); }
@keyframes bungae-trot { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes bungae-step { 0%, 100% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } }
@keyframes bungae-wag { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(11deg); } }
@keyframes bungae-ear { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes bungae-shadow { 0%, 100% { transform: scaleX(1); opacity: .16; } 50% { transform: scaleX(.86); opacity: .1; } }
@keyframes bungae-listen { 0%, 65%, 100% { transform: rotate(0); } 78%, 88% { transform: rotate(-7deg); } }

.brand-mascot { display: inline-flex; flex: none; margin: -9px -6px -6px -5px; }
img.brand-mascot { display: block; width: 48px; height: 48px; object-fit: contain; }
.brand-mascot .bungae-mascot { width: 48px; height: 48px; }
.brand > .brand-copy { flex: 1; min-width: 0; }
.welcome-mascot { display: block; width: fit-content; margin: -13px 0 12px -11px; }
.welcome-mascot .bungae-mascot { width: 112px; height: 112px; }
.auth-mascot { display: inline-flex; margin: 0 auto 13px; }
.auth-mascot .bungae-mascot { width: 105px; height: 105px; }
.auth-brand.bungae-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand.bungae-brand > .brand-copy { display: block; margin: 0; color: var(--ink); font: inherit; letter-spacing: inherit; }
.auth-brand.bungae-brand .brand-copy > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.auth-brand.bungae-brand .bungae-mascot { width: 47px; height: 47px; }
.auth-connection .auth-mascot { margin-bottom: 12px; }
.auth-card > .auth-mascot { display: flex; justify-content: center; width: 100%; margin: -15px auto 17px; }
.auth-card-mascot { display: block; width: 102px; height: 102px; margin: -18px auto 19px; object-fit: contain; }
.message-header .bungae-mascot { margin: -6px -4px -3px -3px; }

/* One persistent work card: text carries the status; motion is only a cue. */
.work-pulse { display: flex; align-items: center; gap: 13px; width: 100%; max-width: 820px; min-height: 100px; margin: 0 auto 12px; padding: 11px 16px 11px 9px; border: 1px solid #3b3b3b; border-radius: 14px; background: #222; }
.work-pulse-scene { display: flex; flex: none; align-items: center; justify-content: center; width: 76px; min-height: 76px; }
.work-pulse-scene .bungae-mascot { width: 76px; height: 76px; }
.work-pulse-copy { flex: 1; min-width: 0; }
.work-pulse-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.work-pulse-title { margin: 0; color: #e7e7e7; font-size: 14px; font-weight: 550; line-height: 1.7; word-break: keep-all; }
.work-pulse-elapsed { flex: none; color: #a3a3a3; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.work-pulse-detail { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: #aaa; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.work-pulse-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.work-pulse-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; margin: 0; padding: 3px 9px; border: 1px solid #505050; border-radius: 7px; background: transparent; color: #bbb; font-size: 11px; line-height: 1.6; text-decoration: none; }
.work-pulse-action:hover { border-color: #777; background: #303030; color: #eee; }
.work-pulse-action:focus-visible { outline: 2px solid var(--bungae-gold); outline-offset: 3px; }
.work-pulse-action svg { width: 13px; height: 13px; }
.work-pulse[data-state="waiting"] { border-color: #78644a; }
.work-pulse[data-state="waiting"] .work-pulse-title { color: #e3c394; }
.work-pulse[data-state="reconnecting"] { border-style: dashed; }
.work-pulse[data-state="error"] { border-color: #72504c; background: #262120; }
.work-pulse[data-state="error"] .work-pulse-title { color: #e4b7af; }
.work-pulse[data-state="done"] { border-color: #3d4940; background: #202320; }
.work-pulse[data-state="done"] .work-pulse-title { color: #c5d4c4; }
.work-pulse[data-state="idle"] { border-color: #3d3d3d; background: #222; }
.work-pulse-note { margin: 8px 0 0; color: #938e86; font-size: 11px; line-height: 1.65; }
@media (max-width: 640px) {
  .work-pulse { gap: 9px; min-height: 111px; margin-bottom: 10px; padding: 11px 12px 11px 5px; border-radius: 13px; }
  .work-pulse-scene { width: 65px; min-height: 72px; }
  .work-pulse-scene .bungae-mascot { width: 69px; height: 69px; }
  .work-pulse-heading { flex-wrap: wrap; justify-content: flex-start; column-gap: 9px; row-gap: 0; }
  .work-pulse-title { font-size: 13px; }
  .work-pulse-detail { font-size: 11px; }
  .work-pulse-actions { gap: 6px; margin-top: 9px; }
  .work-pulse-action { min-height: 33px; padding-inline: 8px; }
  .welcome-mascot { margin-top: -15px; margin-bottom: 7px; }
  .welcome-mascot .bungae-mascot { width: 88px; height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .bungae-mascot .bungae-dog, .bungae-mascot .bungae-shadow, .bungae-mascot .bungae-leg, .bungae-mascot .bungae-ear, .bungae-mascot .bungae-tail, .bungae-mascot .bungae-head { animation: none !important; }
}
