/* Conversation occupies the equipment caption, keeping home within its viewport. */
#game-shell #skin-options .skin-option[data-skin="yuna"] > div > img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
#game-shell #home-operator-talk {
  display: block; position: relative; padding: 0; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-main); touch-action: manipulation;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#game-shell #home-operator-talk:focus-visible {outline: 3px solid var(--operator-color); outline-offset: -4px;}
#game-shell .home-talk-hint {
  position: absolute; z-index: 4; bottom: 8px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 8px); padding: 5px 8px; border: 1px solid #8da89e;
  border-radius: 4px; background: #152e34f2; color: #f2f5e8;
  font-size: 12px; line-height: 1.6; letter-spacing: 0; white-space: nowrap;
}
#game-shell #home-operator-talk.is-speaking > :is(#home-operator, #home-operator-sprite),
#game-shell #shop-clerk-talk.is-speaking > :is(#shop-clerk-image, #shop-clerk-sprite) {visibility: hidden;}
#game-shell .conversation-sprite {pointer-events: none; image-rendering: pixelated;}
#game-shell .conversation-sprite[hidden], #game-shell #home-conversation[hidden] {display: none !important;}
#game-shell #shop-conversation-sprite {
  position: absolute; inset: auto 8px 0; width: calc(100% - 16px); height: calc(100% - 35px);
  object-fit: contain; object-position: center bottom; max-height: none;
}
#game-shell #title-screen #home-caption {position: relative;}
#game-shell #home-caption[data-conversation="true"] > :not(.home-conversation) {visibility: hidden;}
#game-shell #title-screen .home-conversation {
  position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: 44px minmax(0, 1fr);
  gap: 4px; min-width: 0; min-height: 0; padding: 8px 12px 12px;
  border: 1px solid var(--operator-color); background: #142d33; color: #f2f5e8;
  text-align: left; overflow: hidden;
}
#game-shell .home-dialogue-heading {display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;}
#game-shell .home-dialogue-heading > strong {font-size: 18px; line-height: 1.5; color: var(--operator-color); letter-spacing: .5px;}
#game-shell #home-dialogue-close {
  min-width: 72px; min-height: 44px; padding: 6px 8px; border: 1px solid #78928b;
  background: #203e44; color: #f2f5e8; font-size: 13px; line-height: 1.5; touch-action: manipulation;
}
#game-shell #title-screen #home-operator-dialogue {
  display: block; margin: 0; min-height: 0; min-width: 0; padding: 4px 2px;
  font-size: 15px; line-height: 1.85; letter-spacing: 0; color: #f2f5e8;
  overflow: auto; overflow-wrap: anywhere; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: #a7c3b8 #142d33;
}
@media (max-width: 740px) {
  #game-shell #shop-conversation-sprite {inset-inline: 6px; width: calc(100% - 12px); height: calc(100% - 29px);}
}
@media (max-width: 600px) {
  #game-shell #shop-conversation-sprite {height: calc(100% - 44px);}
}
@media (max-width: 420px), (max-height: 560px) {
  #game-shell #title-screen .home-conversation {padding: 4px 8px 8px; gap: 2px;}
  #game-shell #title-screen #home-operator-dialogue {font-size: 14px; line-height: 1.75;}
  #game-shell .home-talk-hint {white-space: normal; padding: 4px; line-height: 1.4;}
}
