.hello {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  background: var(--paper);
  color: var(--text,inherit);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
}
.hello strong {
  font-size: clamp(17px,2vw,23px);
}
.hello button {
  margin-left: auto;
  flex: none;
}
.hello-face {
  width: 52px;
  height: 50px;
  flex: none;
}
.hello-face svg,
.node-faces svg,
.stop-face svg {
  width: 100%;
  height: 100%;
}
.trail .node {
  position: relative;
  z-index: 1;
}
.node.needed {
  outline: 2px dashed #735b11;
  outline-offset: 3px;
}
.node.locked {
  background: #d9d8c6;
  color: #444e45;
}
.node.locked small {
  display: block;
  font-size: 12px;
}
.node.locked .icon {
  width: 16px;
  height: 16px;
}
.node-faces {
  position: absolute;
  left: 50%;
  top: calc(100% + 3px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3,auto);
  justify-content: center;
  gap: 2px;
}
.mini-face,
.stop-face {
  display: inline-flex;
  border: 2px solid;
  border-radius: 50%;
  background: #fff3bb;
  overflow: hidden;
}
.mini-face {
  width: var(--face-size);
  height: var(--face-size);
}
.mini-face svg,
.stop-face svg {
  transform: scale(1.45) translateY(12%);
}
.tier-0 {
  color: #777c74;
  filter: grayscale(1);
  background: #d9dcd8;
}
.tier-0 svg {
  opacity: .82;
}
.tier-1 {
  color: #9d541e;
}
.tier-2 {
  color: #788894;
}
.tier-3 {
  color: #d49000;
}
.stop-list {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(165px,1fr));
  gap: 8px;
}
.stop-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}
.stop-choice small {
  display: block;
}
.stop-face {
  width: 46px;
  height: 46px;
  flex: none;
}
.stop-choice > .icon {
  width: 14px;
  margin-left: auto;
}
.pet-voice {
  padding: 0;
  background: transparent;
  display: block;
  width: 100%;
}
.story-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-art > .tt-prize,
.gift-reveal > .tt-prize {
  width: 96px;
  margin: 0 auto;
}
.story-art .mascot,
.gift-reveal .mascot {
  display: block;
  width: 130px;
  height: 140px;
}
.monster svg {
  width: 82px;
  margin: auto;
}
.monster small {
  display: block;
}
.test-loot {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.chest-card svg {
  width: 72px;
}
.map-note {
  margin-top: 15px;
}
/* The trophy occupies the companion's panel without moving any tap targets. */
.sidekick,
.award-stage {
  position: relative;
}
#award:not(:empty) {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  max-height: 100%;
  overflow: auto;
}
.achievement-toast {
  max-width: 100%;
}
.achievement-toast {
  padding: 6px 14px;
}
.achievement-toast svg {
  width: 32px;
  height: 32px;
}
.table-medal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  margin-top: 4px;
  border-radius: 20px;
  font-size: .85rem;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--border);
}
.table-medal .icon {
  width: 20px;
  height: 20px;
}
.medal-1 circle:first-of-type {
  fill: #c68b68;
}
.medal-2 circle:first-of-type {
  fill: #b5c3cb;
}
.trophy-row > span {
  position: relative;
}
.trophy-row > span > svg + svg {
  position: absolute;
  width: 34%;
  left: 33%;
  top: 32%;
}
@media (max-width:580px) {
  .hello {
    gap: 5px;
    padding: 4px;
  }
  .hello-face {
    width: 38px;
  }
  .bar-inner nav {
    gap: 0;
  }
  .bar-inner .roundbtn {
    min-width: 40px;
    width: 40px;
  }
}

.trail {
  container-type: inline-size;
  height: auto;
  padding: 11px 0;
  row-gap: 12px;
  align-items: start;
}
.trail .node {
  --face-size: 26px;
  --face-size: clamp(14px, 4.85cqw, 32px);
  margin-bottom: calc(var(--face-size) + 4px);
}
.trail .node:has(.mini-face:nth-child(4)) {
  margin-bottom: calc(2 * var(--face-size) + 6px);
}
.mini-face svg {
  transform: scale(1.85) translateY(12%);
}

.stop-choice strong,
.stop-choice small {
  display: block;
}
@keyframes unwrap {
  0% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-6deg);
  }
  60% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes hatch {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes still-reveal {
  from {
    opacity: .3;
  }
  to {
    opacity: 1;
  }
}
.gift-reveal .tt-open .tt-gift-ribbon {
  opacity: 0;
  transition: opacity .35s;
}
@media (prefers-reduced-motion:no-preference) {
  .gift-reveal .tt-gift {
    animation: unwrap .45s ease-out;
  }
  .gift-reveal .mascot {
    animation: hatch .55s .18s both;
  }
}
@media (prefers-reduced-motion:reduce) {
  .gift-reveal .mascot {
    animation: still-reveal .35s ease-out!important;
  }
}

.welcome .profiles .chip { max-width: 100%; min-width: 0; }
.pick-name { min-width: 0; max-width: 19ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello strong, .achievement-toast > span, .story-card p, .hop-label,
.reward h1, .gift-reveal p, .setup h2, .report-summary h2 { min-width: 0; overflow-wrap: anywhere; }
