/* SporT 運動小將 — individual transparent poses, with the original atlas as fallback. */
.sport-mascot {
  --sm-ink: #06172c;
  --sm-blue: #2b60a5;
  --sm-lime: #c6ed0b;
  --sm-orange: #ff5b2a;
  --sm-size: 112px;
  --sm-edge: 20px;
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 0;
  height: 0;
  font-family: var(--sans, "Noto Sans TC", sans-serif);
  color: #fff;
}

.sport-mascot [hidden] { display: none !important; }
.sport-mascot button { -webkit-tap-highlight-color: transparent; }

.sport-mascot__actor {
  position: fixed;
  left: 0;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: block;
  width: var(--sm-size);
  height: var(--sm-size);
  padding: 0;
  border: 0;
  border-radius: 28%;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  will-change: transform;
  outline-offset: 2px;
}

.sport-mascot__actor:focus-visible,
.sport-mascot__panel button:focus-visible,
.sport-mascot__service-info a:focus-visible,
.sport-mascot__download:focus-visible,
.sport-mascot__restore:focus-visible {
  outline: 3px solid var(--sm-lime);
  outline-offset: 4px;
}

.sport-mascot__sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: 100% 0;
  filter: drop-shadow(0 5px 7px rgb(0 12 28 / 20%));
  transform-origin: 50% 80%;
  pointer-events: none;
  will-change: transform;
}

.sport-mascot__sprite--individual {
  background-size: contain;
  background-position: center;
}

.sport-mascot__panel {
  position: fixed;
  right: var(--sm-edge);
  bottom: max(144px, calc(env(safe-area-inset-bottom, 0px) + 140px));
  z-index: 51;
  width: min(336px, calc(100vw - 32px));
  max-height: calc(100dvh - 164px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgb(190 210 232 / 25%);
  border-radius: 18px;
  background: rgb(6 23 44 / 97%);
  box-shadow: 0 12px 44px rgb(0 10 28 / 25%);
  box-sizing: border-box;
  text-align: left;
}

.sport-mascot__heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .04em;
}

.sport-mascot__heading::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--sm-lime);
  border-radius: 50%;
}

.sport-mascot__close {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 6px 0 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #c8d3e0;
  font: 600 12px/1.5 var(--sans, "Noto Sans TC", sans-serif);
  letter-spacing: 0;
  cursor: pointer;
}

.sport-mascot__close:hover { color: var(--sm-lime); }

.sport-mascot__hint {
  margin: 0 0 14px;
  color: #b7c5d5;
  font-size: 12px;
  line-height: 1.65;
}

.sport-mascot__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.sport-mascot__actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 90px;
  margin: 0;
  padding: 5px 6px 7px;
  border: 1px solid rgb(183 205 231 / 25%);
  border-radius: 9px;
  background: #112e50;
  color: #fff;
  font: 800 18px/1.3 var(--sans, "Noto Sans TC", sans-serif);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.sport-mascot__thumbnail {
  display: block;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  background-repeat: no-repeat;
  background-size: 300% 200%;
  pointer-events: none;
}

.sport-mascot__thumbnail--individual { background-size: contain; }
.sport-mascot__action-name { pointer-events: none; }

.sport-mascot__service { margin-top: 9px; }

.sport-mascot__service-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 5px 11px;
  border: 1px solid rgb(198 237 11 / 60%);
  border-radius: 9px;
  background: #112e50;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.sport-mascot__service-toggle:hover,
.sport-mascot__service-toggle[aria-expanded="true"] { background: #26588d; }

.sport-mascot__service-thumbnail {
  position: relative;
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  background-repeat: no-repeat;
  background-size: 300% 200%;
  pointer-events: none;
}

.sport-mascot__service-thumbnail--individual { background-size: contain; }

.sport-mascot__service-question {
  position: absolute;
  top: -1px;
  right: -3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--sm-ink);
  border-radius: 50%;
  background: var(--sm-lime);
  color: var(--sm-ink);
  font: 900 15px/1 sans-serif;
}

.sport-mascot__service-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.sport-mascot__service-copy strong { font-size: 17px; line-height: 1.4; }
.sport-mascot__service-copy small { color: #c8d3e0; font-size: 12px; }
.sport-mascot__service-indicator { flex-shrink: 0; margin-left: auto; color: var(--sm-lime); font-size: 20px; }

.sport-mascot__service-info {
  margin-top: 7px;
  padding: 12px;
  border: 1px solid rgb(183 205 231 / 25%);
  border-radius: 9px;
  background: #0d2540;
  overflow-wrap: anywhere;
}

.sport-mascot__service-status { margin: 0 0 10px; color: #fff; font-size: 13px; line-height: 1.65; }

.sport-mascot__service-line,
.sport-mascot__service-contact {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid var(--sm-lime);
  border-radius: 5px;
  background: var(--sm-lime);
  color: var(--sm-ink);
  font: 700 12px/1.5 var(--sans, "Noto Sans TC", sans-serif);
  text-decoration: none;
  box-sizing: border-box;
}

.sport-mascot__service-line:disabled { border-color: #71909f; background: #263d51; color: #c8d3e0; cursor: not-allowed; }
.sport-mascot__service-contact { padding: 3px 0; border: 0; background: none; color: #d8f36f; text-decoration: underline; text-underline-offset: 3px; }
.sport-mascot__service-info a:hover { filter: brightness(1.15); }
.sport-mascot__service-privacy { margin: 0; color: #b7c5d5; font-size: 11px; line-height: 1.6; }

.sport-mascot__download {
  display: block;
  width: fit-content;
  margin: 11px auto 0;
  padding: 3px 5px;
  border-radius: 4px;
  color: #d8f36f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sport-mascot__download:hover { color: #fff; }

.sport-mascot__actions button:hover { background: #26588d; }
.sport-mascot__actions button[aria-pressed="true"] {
  border-color: var(--sm-lime);
  background: var(--sm-lime);
  color: var(--sm-ink);
}

.sport-mascot__tools {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgb(183 205 231 / 18%);
}

.sport-mascot__tools button {
  min-height: 34px;
  flex: 1;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c8d3e0;
  font: 600 13px/1.4 var(--sans, "Noto Sans TC", sans-serif);
  cursor: pointer;
}

.sport-mascot__tools button:hover { background: #193654; color: #fff; }
.sport-mascot__tools button[aria-pressed="true"] { color: var(--sm-lime); }

.sport-mascot__restore {
  position: fixed;
  right: var(--sm-edge);
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 50;
  min-width: 46px;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgb(184 204 229 / 30%);
  border-radius: 24px;
  background: var(--sm-ink);
  box-shadow: 0 4px 18px rgb(0 10 28 / 16%);
  color: #fff;
  font: 700 12px/1.4 var(--sans, "Noto Sans TC", sans-serif);
  cursor: pointer;
}

.sport-mascot__restore::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--sm-lime);
  vertical-align: 1px;
}

.sport-mascot__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .sport-mascot { --sm-size: 84px; --sm-edge: 14px; }
  .sport-mascot__panel {
    bottom: max(110px, calc(env(safe-area-inset-bottom, 0px) + 106px));
    max-height: calc(100dvh - 132px);
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sport-mascot__actor,
  .sport-mascot__sprite { will-change: auto; }
  .sport-mascot button { transition: none; }
}
