#wolf-welcome [hidden],
#wolf-guide-frame[hidden],
#wolf-guide-tip[hidden],
#wolf-shop-guide[hidden],
#wolf-purchase-guide[hidden],
#first-trip-hint[hidden] { display: none !important; }

#wolf-welcome {
  box-sizing: border-box;
  inset: 0;
  margin: auto;
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid #d8c8a0;
  border-radius: 24px;
  background: #fffaf0;
  color: #35483c;
  box-shadow: 0 16px 60px #23392d40;
}
#wolf-welcome:has(#wolf-welcome-gift-panel[hidden]) { width: min(420px, calc(100vw - 28px)); }
#wolf-welcome::backdrop, body.wolf-first-trip #prepare-trip::backdrop { background: #24372d66; }
#wolf-welcome-gift-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.32fr);
  align-items: center;
  gap: 22px;
}
#wolf-welcome-gift-panel img { width: 100%; height: auto; max-height: 28dvh; object-fit: contain; }
#wolf-welcome-title, #wolf-welcome-name-label {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
#wolf-welcome-name-label:focus { outline: none; }
#wolf-welcome-copy { margin: 10px 0 16px; line-height: 1.5; }
#wolf-welcome-naming { display: grid; gap: 15px; }
#wolf-welcome :is(button, input) { box-sizing: border-box; min-height: 46px; width: 100%; }
#wolf-welcome-name { padding: 8px 12px; font-size: 16px; }
#wolf-welcome button { white-space: normal; }
@media (max-width: 540px) {
  #wolf-welcome-gift-panel { grid-template-columns: minmax(0, 1fr); gap: 12px; text-align: center; }
  #wolf-welcome-gift-panel img { width: min(150px, 100%); margin-inline: auto; }
}

#wolf-guide-frame {
  position: fixed;
  z-index: 1100;
  box-sizing: border-box;
  border: 3px solid #d6ae58;
  border-radius: 13px;
  box-shadow: 0 0 0 2px #fff8e6d9;
  pointer-events: none;
}
#wolf-guide-tip {
  position: fixed;
  z-index: 1101;
  box-sizing: border-box;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid #c6a05a;
  border-radius: 12px;
  background: #fffaf0;
  color: #35483c;
  box-shadow: 0 8px 26px #24372d38;
  font-size: 14px;
  line-height: 1.45;
  pointer-events: none;
}
#wolf-guide-tip::after {
  position: absolute;
  left: clamp(11px, calc(var(--wolf-arrow-x) - 7px), calc(100% - 18px));
  width: 12px;
  height: 12px;
  border: solid #c6a05a;
  border-width: 0 1px 1px 0;
  background: #fffaf0;
  content: "";
}
#wolf-guide-tip[data-side="above"]::after { bottom: -7px; transform: rotate(45deg); }
#wolf-guide-tip[data-side="below"]::after { top: -7px; transform: rotate(225deg); }
.wolf-gift-received { outline: 3px solid #d6ae58; outline-offset: 3px; }

#wolf-first-trip-slot:has(#first-trip-hint[hidden]), #wolf-first-trip-slot:empty { display: none; }
.journey-heading:has(#first-trip-hint:not([hidden])) { display: block; }
.journey-heading:has(#first-trip-hint:not([hidden])) :is(#journey-copy, #travel-action),
body.editing #first-trip-hint { display: none; }
.journey-heading #first-trip-hint {
  position: static;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body > #first-trip-hint {
  box-sizing: border-box;
  inset: auto 12px calc(86px + env(safe-area-inset-bottom)) auto;
  width: min(400px, calc(100vw - 24px));
}
#first-trip-action, .wolf-guided-editing :is(#buy-confirm, #done) {
  min-height: 44px;
  white-space: normal;
}
#wolf-shop-guide, #wolf-purchase-guide {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #f0eee0;
  color: #35483c;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.4;
}
#purchase:has(#wolf-purchase-guide:not([hidden])) {
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
@media (min-width: 901px) and (pointer: coarse) {
  body.wolf-guided-editing main { padding-inline-end: 372px; }
}

html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip[open] {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  padding: 0;
  width: min(760px, calc(100vw - 24px));
  min-height: min(480px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  height: fit-content;
  margin: auto;
  border-radius: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip .trip-banner { height: clamp(82px, 16dvh, 138px); }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip .dialog-copy { padding: 12px clamp(14px, 4vw, 30px) 20px; }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip h2 { font-size: clamp(22px, 4vw, 30px); }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip :is(#close-prepare, .trip-step-footer button, #depart-trip) { min-height: 44px; }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip #close-prepare { min-width: 44px; }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip .trip-depart {
  position: sticky;
  bottom: -1px;
  z-index: 4;
  padding-block: 10px;
  background: var(--paper, #faf8ef);
}

#wolf-welcome { max-width: none; }
html :is(body.wolf-first-trip, .desktop-game-view body) #prepare-trip :is(#trip-step-next, #depart-trip) { color: #fffdf2; }

/* Keep all four durations in one row, including the locked future options. */
html body #prepare-trip #trip-mode-options {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 3px 3px 9px;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  scrollbar-width: auto;
}
html body #prepare-trip #trip-mode-options .trip-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 clamp(137px, 27vw, 181px);
  align-content: start;
  gap: 4px;
  min-height: 98px;
  padding: 9px 11px;
  scroll-snap-align: start;
  text-align: start;
}
html body #prepare-trip #trip-mode-options .trip-mode > * {
  grid-column: 1;
  grid-row: auto;
}
html body #prepare-trip #trip-mode-options .trip-mode strong {
  font-size: clamp(17px, 3.5vw, 20px);
  line-height: 1.2;
}
html body #prepare-trip #trip-mode-options .trip-mode[disabled] { opacity: .7; }
html body #prepare-trip .trip-food-cards .food-picture {
  height: clamp(60px, 9vw, 84px);
  margin-bottom: 5px;
}
html body #prepare-trip .trip-food-cards .food-picture img {
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 5px;
  object-fit: contain;
}

html.desktop-game-view #prepare-trip::backdrop { background: rgb(34 42 30 / 42%); }
