.telemo-concierge {
  position: fixed;
  z-index: 90;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  --character-width: 88px;
  width: min(328px, calc(100vw - 48px));
  color: #0a2a44;
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0;
  pointer-events: none;
}
.telemo-concierge *, .telemo-concierge *::before { box-sizing: border-box; }
.telemo-concierge [hidden] { display: none; }
.telemo-concierge__scene { position: relative; display: flex; flex-direction: row-reverse; align-items: flex-end; }
.telemo-concierge__bubble { position: relative; flex: 1; min-width: 0; padding: 18px 18px 12px; border: 1px solid #cce4e8; border-radius: 18px 18px 4px 18px; background: #fff; box-shadow: 0 6px 28px #0a2a4410; pointer-events: auto; }
.telemo-concierge__bubble::before { content: ""; position: absolute; right: -7px; bottom: 48px; width: 12px; height: 12px; background: #fff; border-right: 1px solid #cce4e8; border-top: 1px solid #cce4e8; transform: rotate(45deg); }
.telemo-concierge__comment { margin: 0; min-height: 5.4em; font-size: 14px; font-weight: 700; line-height: 1.8; overflow-wrap: anywhere; }
.telemo-concierge__booking { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 14px; padding: 10px 12px; border-radius: 999px; background: #fd8e44; color: #102c40; font-size: 13px; font-weight: 800; line-height: 1.5; text-decoration: none; }
.telemo-concierge__booking:hover { background: #ffa263; }
.telemo-concierge__character { width: 100px; height: 146px; object-fit: contain; flex: none; filter: drop-shadow(0 5px 5px #0a2a4415); }
.telemo-concierge a:focus-visible { outline: 3px solid #007d8c; outline-offset: 4px; }
.menu-open .telemo-concierge { visibility: hidden; }
@media (max-width: 640px) {
  .telemo-concierge { --character-width: 64px; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: min(310px, calc(100vw - 24px)); }
  .telemo-concierge__bubble { padding: 12px 14px 8px; }
  .telemo-concierge__comment { min-height: 0; font-size: 13px; line-height: 1.7; }
}
@media print { .telemo-concierge { display: none; } }

.telemo-booking__panel { padding: clamp(32px, 5vw, 64px) 24px; border-radius: 24px; background: #eaf6f8; text-align: center; color: #0a2a44; }
.page-home .telemo-booking__panel h2 { margin: 0; font-size: clamp(24px, 3vw, 40px); line-height: 1.6; font-weight: 800; }
.telemo-booking__panel > p { margin: 20px 0 28px; line-height: 1.9; }
.telemo-booking__button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 60px; padding: 16px 28px; border: 1px solid #e17b32; border-radius: 999px; background: #fd8e44; color: #102c40; font-size: clamp(15px, 1.5vw, 18px); font-weight: 800; text-decoration: none; }
.telemo-booking__button[aria-disabled="true"] { cursor: not-allowed; }
.telemo-booking__button[href]:hover { background: #ffa263; }
.telemo-booking__button:focus-visible { outline: 3px solid #007d8c; outline-offset: 4px; }
.telemo-booking__panel > .telemo-booking__status { margin: 14px 0 0; color: #536b78; font-size: 13px; }

/* Ground the standalone guide with only a soft shadow beneath its feet. */
.telemo-concierge__avatar { position: relative; display: block; width: var(--character-width); height: calc(var(--character-width) * 1.5); flex: none; margin-bottom: 24px; isolation: isolate; }
.telemo-concierge__avatar::before { content: ""; position: absolute; z-index: -1; inset: auto 10px 4px; height: 10px; border-radius: 50%; background: #0a2a4418; filter: blur(3px); }
.telemo-concierge__avatar .telemo-concierge__character { width: 100%; height: 100%; }
.telemo-concierge__sprite { display: none; width: 100%; height: 100%; background: var(--guide-idle, url('./assets/concierge/president-cutout/idle.webp')) 0 0 / auto 100% no-repeat; filter: drop-shadow(0 4px 3px #0a2a4412); }
.has-walker .telemo-concierge__sprite { display: block; }
.has-walker .telemo-concierge__character { display: none; }
.has-walker.is-motion-paused .telemo-concierge__character { display: block; }
.has-walker.is-motion-paused .telemo-concierge__sprite { display: none; }
.telemo-concierge__avatar[data-state="idle"] .telemo-concierge__sprite { --frames: 6; animation: president-frames 1.5s steps(6) infinite; }
.telemo-concierge__avatar[data-state="talk"] .telemo-concierge__sprite { --frames: 8; background-image: var(--guide-talk); animation: president-frames 1.4s steps(8) infinite; }
.telemo-concierge__avatar[data-state="wave"] .telemo-concierge__sprite { --frames: 8; background-image: var(--guide-wave); animation: president-frames 1.1s steps(8) infinite; }
@keyframes president-frames { to { background-position-x: calc(-1 * var(--character-width) * var(--frames)); } }
@media (prefers-reduced-motion: reduce) {
  .telemo-concierge__sprite { animation: none !important; background-position-x: 0 !important; }
}

.telemo-concierge.is-page-hidden .telemo-concierge__sprite { animation-play-state: paused; }
