/* inryokü INFO · silver 0, white 1, and one rainbow core. */
#inryoku-chat.chat-rpg {
  --rpg-silver: #e9edf1;
  --rpg-muted: #9aa3ab;
  --rpg-dark: #4a5259;
  --rpg-font-size: 16px;
  --rpg-line-height: 1.65;
  --rpg-safe-top: env(safe-area-inset-top, 0px);
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--rpg-silver) !important;
  font-family: 'DotGothic16', monospace !important;
  font-size: var(--rpg-font-size);
  letter-spacing: .025em;
  text-shadow: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 0;
  transform: none !important;
  transition: none !important;
  pointer-events: none !important;
  z-index: 9999;
  -webkit-font-smoothing: none;
}
#inryoku-chat.chat-rpg.chat-visible { opacity: 1; }
#inryoku-chat.chat-rpg [hidden] { display: none !important; }
#inryoku-chat.chat-rpg *,
#inryoku-chat.chat-rpg *::before,
#inryoku-chat.chat-rpg *::after { box-sizing: border-box; }
#inryoku-chat.chat-rpg .rpg-stack {
  position: absolute;
  left: var(--rpg-dock-center, 50%);
  right: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
  width: min(560px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 312px;
  align-items: stretch;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}
#inryoku-chat.chat-rpg .rpg-win {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 6px solid transparent;
  border-image: url('assets/rpg-frame.svg') 6 fill / 6px / 0 stretch;
  border-radius: 0 !important;
  background: #000 !important;
  background-clip: padding-box !important;
  color: var(--rpg-silver);
  box-shadow: none !important;
  text-shadow: none !important;
  pointer-events: auto;
  image-rendering: pixelated;
  transform-origin: center bottom;
}
#inryoku-chat.chat-rpg.chat-visible .rpg-win { animation: rpg-window-open 120ms steps(4, end) both; }
/* Input feedback is visible on the first paint, including the name and dots. */
#inryoku-chat.chat-rpg.chat-visible .rpg-dialog { animation: none; }
#inryoku-chat.chat-rpg .rpg-dialog {
  flex: 0 0 auto;
  width: 100%;
  padding: 20px 14px 22px;
  min-height: calc(3 * var(--rpg-font-size) * var(--rpg-line-height) + 54px);
  cursor: pointer;
}
#inryoku-chat.chat-rpg .rpg-tag {
  position: absolute;
  left: 8px;
  top: -22px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 6px 8px;
  border: 2px solid var(--rpg-silver);
  background: #000;
  font: 9px/1 'Press Start 2P', monospace;
  letter-spacing: .14em;
  white-space: nowrap;
}
#inryoku-chat.chat-rpg .rpg-tag i {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid var(--rpg-silver);
  border-radius: 50%;
  font-size: 0;
}
#inryoku-chat.chat-rpg .rpg-tag i::before,
#inryoku-chat.chat-rpg .rpg-tag i::after {
  content: '';
  position: absolute;
  left: 4px;
  width: 2px;
  background: var(--rpg-silver);
}
#inryoku-chat.chat-rpg .rpg-tag i::before { top: 1px; height: 2px; }
#inryoku-chat.chat-rpg .rpg-tag i::after { top: 4px; height: 5px; }
#inryoku-chat.chat-rpg .rpg-udots,
#inryoku-chat.chat-rpg .rpg-next {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #000;
  padding: 2px 6px;
  line-height: 1;
  pointer-events: none;
}
#inryoku-chat.chat-rpg .rpg-udots { right: 10px; top: -15px; }
#inryoku-chat.chat-rpg .rpg-next { right: 4px; bottom: 1px; }
#inryoku-chat.chat-rpg .rpg-udots b,
#inryoku-chat.chat-rpg .rpg-next b {
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--rpg-silver);
  border-radius: 50%;
  background: var(--rpg-silver);
}
#inryoku-chat.chat-rpg .rpg-udots b + b,
#inryoku-chat.chat-rpg .rpg-next b + b { background: #000; }
#inryoku-chat.chat-rpg .rpg-next { visibility: hidden; }
#inryoku-chat.chat-rpg .rpg-next.is-ready { visibility: visible; }
#inryoku-chat.chat-rpg .rpg-next.is-ready b { animation: rpg-binary-breath 1.8s ease-in-out infinite; }
#inryoku-chat.chat-rpg .rpg-next.is-ready b + b { animation-delay: -.9s; }
#inryoku-chat.chat-rpg .rpg-thinking {
  display: none;
  position: absolute;
  left: 14px;
  bottom: 10px;
  gap: 6px;
}
#inryoku-chat.chat-rpg[data-rpg-stage="waiting"] .rpg-thinking { display: flex; }
#inryoku-chat.chat-rpg .rpg-thinking b {
  width: 8px;
  height: 8px;
  border: 2px solid var(--rpg-silver);
  border-radius: 50%;
  background: var(--rpg-silver);
  animation: rpg-binary-breath 1.8s ease-in-out infinite;
}
#inryoku-chat.chat-rpg .rpg-thinking b + b { background: #000; animation-delay: -.9s; }
#inryoku-chat.chat-rpg .rpg-text {
  margin: 0;
  min-height: calc(3 * var(--rpg-font-size) * var(--rpg-line-height));
  max-height: calc(3 * var(--rpg-font-size) * var(--rpg-line-height));
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-break: strict;
  word-break: normal;
  font: var(--rpg-font-size)/var(--rpg-line-height) 'DotGothic16', monospace;
  letter-spacing: .025em;
}
#inryoku-chat.chat-rpg .rpg-page {
  position: absolute;
  left: 14px;
  bottom: 3px;
  color: var(--rpg-muted);
  font: 8px/1.4 'Press Start 2P', monospace;
  letter-spacing: 0;
}
#inryoku-chat.chat-rpg .rpg-commands {
  align-self: stretch;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  overflow: visible;
  padding: 7px 8px 6px;
}
#inryoku-chat.chat-rpg .rpg-command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}
#inryoku-chat.chat-rpg .rpg-command-content {
  display: contents;
}
#inryoku-chat.chat-rpg .rpg-command-exits {
  display: contents;
}
#inryoku-chat.chat-rpg .rpg-command-exits .rpg-command {
  color: var(--rpg-muted);
  border-top: 1px solid var(--rpg-dark);
}
#inryoku-chat.chat-rpg .rpg-commands h2,
#inryoku-chat.chat-rpg .rpg-menu h4,
#inryoku-chat.chat-rpg .rpg-motions h4 {
  margin: 0 0 4px;
  color: var(--rpg-muted);
  font: normal 12px/1.5 'DotGothic16', monospace;
  letter-spacing: .08em;
}
#inryoku-chat.chat-rpg .rpg-commands h2 { flex: 0 0 auto; }
#inryoku-chat.chat-rpg button {
  appearance: none;
  -webkit-appearance: none;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  border-radius: 0 !important;
  background: #000;
  color: var(--rpg-silver);
  font: normal 15px/1.5 'DotGothic16', monospace;
  text-shadow: none !important;
  box-shadow: none !important;
  letter-spacing: .025em;
  cursor: pointer;
  touch-action: manipulation;
}
#inryoku-chat.chat-rpg .rpg-command,
#inryoku-chat.chat-rpg .rpg-menu button,
#inryoku-chat.chat-rpg .rpg-motions button {
  position: relative;
  display: block;
  width: 100%;
  padding: 9px 5px 9px 28px;
  border: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}
#inryoku-chat.chat-rpg .rpg-command::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #ff3b3b, #ffe600, #2bff5a, #20e6ff, #3b5bff, #ff3bff, #ff3b3b);
  visibility: hidden;
}
#inryoku-chat.chat-rpg .rpg-command.is-selected::before { visibility: visible; }
#inryoku-chat.chat-rpg button:focus-visible,
#inryoku-chat.chat-rpg #chat-input:focus-visible {
  outline: 1px dashed var(--rpg-silver) !important;
  outline-offset: -2px;
}
#inryoku-chat.chat-rpg button:disabled { opacity: .5; cursor: default; }
#inryoku-chat.chat-rpg .rpg-input {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 8px;
}
#inryoku-chat.chat-rpg .rpg-input label {
  flex: 0 0 auto;
  color: var(--rpg-muted);
  font: 10px/1 'Press Start 2P', monospace;
}
#inryoku-chat.chat-rpg #chat-input {
  display: block;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 2px dotted var(--rpg-dark);
  border-radius: 0;
  background: #000;
  color: var(--rpg-silver);
  caret-color: var(--rpg-silver);
  font: 16px/1.5 'DotGothic16', monospace;
  letter-spacing: .025em;
  box-shadow: none;
}
#inryoku-chat.chat-rpg #chat-input::placeholder { color: var(--rpg-muted); opacity: 1; }
#inryoku-chat.chat-rpg #chat-send {
  flex: 0 0 auto;
  width: auto;
  min-width: 64px;
  height: 44px;
  padding: 3px 8px;
  border: 6px solid transparent;
  border-image: url('assets/rpg-frame.svg') 6 fill / 6px / 0 stretch;
}
#inryoku-chat.chat-rpg .rpg-menu-toggle {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  width: auto;
  padding: 3px 12px;
  z-index: 5;
}
#inryoku-chat.chat-rpg .rpg-menu,
#inryoku-chat.chat-rpg .rpg-motions {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  z-index: 6;
}
#inryoku-chat.chat-rpg .rpg-hint {
  margin: -16px 0 0;
  color: var(--rpg-muted);
  font: 10px/1.4 'DotGothic16', monospace;
  text-align: center;
  pointer-events: none;
}
#inryoku-chat.chat-rpg .rpg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@keyframes rpg-window-open { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rpg-binary-breath { 0%, 100% { opacity: 1; } 50% { opacity: .18; } }
/* Leave the current garment and INFO visible behind the conversation. */
body[data-chat-ui="rpg"] #root.phase-3 #store-grid .product-card-info,
body[data-chat-ui="rpg"] #root.phase-3 #store-grid .product-card-info *,
body[data-chat-ui="rpg"] #root.phase-3 .carousel-mobile-dots,
body[data-chat-ui="rpg"] #root.phase-3 .carousel-mobile-dots * { visibility: hidden !important; }
body[data-chat-ui="rpg"] #p3-menu-toggle,
body[data-chat-ui="rpg"] #p3-menu-panel { display: none !important; }
body[data-chat-ui="rpg"] .rpg-stage-grid { visibility: visible !important; pointer-events: none !important; }
body[data-chat-ui="rpg"] .rpg-stage-grid * { pointer-events: none !important; }
body[data-chat-ui="rpg"] .rpg-back-view .garment-curve-wrap,
body[data-chat-ui="rpg"] .rpg-back-view .garment-edge-img,
body[data-chat-ui="rpg"] .rpg-back-view > img:not(.rpg-back-image) { visibility: hidden !important; }
body[data-chat-ui="rpg"] .rpg-back-view .rpg-back-image { visibility: visible !important; }
body[data-chat-ui="rpg"] .rpg-back-view .garment-curve { visibility: hidden !important; }
body[data-chat-ui="rpg"] .rpg-back-image { position: absolute !important; }
/* 2026-10-26 all27: スマホは服を曲面 (data-garment-curve="on") で見せるため「服の写真 > img は透明」の決まりがあり、
   うしろの写真も同じ img なので透明になって何も映らなかった。うしろの写真だけは必ず見せる。 */
body[data-chat-ui="rpg"] .rpg-back-view > img.rpg-back-image { opacity: 1 !important; }
#inryoku-chat.chat-rpg .rpg-status {
  display: block; min-height: 16px; margin-top: 4px;
  color: var(--rpg-muted); font: 11px/16px 'DotGothic16', monospace;
}
#inryoku-chat.chat-rpg .rpg-status:empty { display: none; }
#inryoku-chat.chat-rpg.rpg-panel-open .rpg-commands,
#inryoku-chat.chat-rpg.rpg-panel-open .rpg-input { display: none !important; }
/* This class outlives closing by 240ms, so the original composition returns smoothly. */
#root.phase-3 .singularity-content.rpg-stage-fit {
  transform-origin: 50% 0;
  transform: translateY(var(--rpg-stage-y, 0px)) scale(var(--rpg-stage-scale, 1)) !important;
  transition: transform 220ms ease-out !important;
}
#inryoku-chat.chat-rpg #info-motion-trial { display: none !important; }
#inryoku-chat.chat-rpg.rpg-closing .rpg-win { animation: rpg-window-close 120ms steps(4, end) both; }
@keyframes rpg-window-close { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@media (max-height: 400px) {
  #inryoku-chat.chat-rpg.rpg-keyboard-open .rpg-dialog { display: none; }
}
#inryoku-chat.chat-rpg.rpg-keyboard-open.rpg-low-viewport .rpg-dialog { display: none; }
#inryoku-chat.chat-rpg.rpg-keyboard-open .rpg-stack { min-height: 0; }
@media (max-width: 359px) {
  #inryoku-chat.chat-rpg { --rpg-font-size: 15px; --rpg-line-height: 1.6; }
  #inryoku-chat.chat-rpg .rpg-stack { width: calc(100% - 16px); bottom: calc(8px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px)); }
  #inryoku-chat.chat-rpg .rpg-dialog { padding-left: 10px; padding-right: 10px; }
  #inryoku-chat.chat-rpg .rpg-input { gap: 7px; padding-left: 7px; padding-right: 7px; }
}
@media (max-width: 340px) {
  #inryoku-chat.chat-rpg .rpg-command[data-command="product"] { white-space: nowrap; }
}
@media (max-width: 767px) {
  #inryoku-chat.chat-rpg.rpg-compact .rpg-dialog {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 18px;
  }
  #inryoku-chat.chat-rpg.rpg-compact .rpg-text {
    min-height: calc(2 * var(--rpg-font-size) * var(--rpg-line-height));
    max-height: calc(2 * var(--rpg-font-size) * var(--rpg-line-height));
  }
  #inryoku-chat.chat-rpg .rpg-command,
  #inryoku-chat.chat-rpg .rpg-menu button,
  #inryoku-chat.chat-rpg .rpg-motions button {
    min-height: 44px;
    padding: 6px 2px 6px 22px;
    font-size: 14px;
    line-height: 1.35;
  }
  #inryoku-chat.chat-rpg .rpg-command::before { width: 10px; height: 10px; margin-top: -5px; left: 4px; }
}
@media (min-width: 768px) {
  #inryoku-chat.chat-rpg { --rpg-font-size: clamp(18px, 1.39vw, 20px); }
  #inryoku-chat.chat-rpg .rpg-stack {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px) + var(--chat-keyboard-inset, 0px));
    width: min(calc(100% - 40px), calc(clamp(560px, 50vw, 720px) + 280px));
    display: grid;
    min-height: 330px;
    grid-template-columns: minmax(0, 1fr) 264px;
    align-items: end;
    gap: 16px;
  }
  #inryoku-chat.chat-rpg .rpg-dialog { grid-column: 1; grid-row: 1; }
  #inryoku-chat.chat-rpg .rpg-commands,
  #inryoku-chat.chat-rpg .rpg-menu,
  #inryoku-chat.chat-rpg .rpg-motions,
  #inryoku-chat.chat-rpg .rpg-input { grid-column: 2; grid-row: 1; }
  #inryoku-chat.chat-rpg .rpg-command-list { grid-template-columns: minmax(0, 1fr); }
  #inryoku-chat.chat-rpg .rpg-menu,
  #inryoku-chat.chat-rpg .rpg-motions { grid-template-columns: minmax(0, 1fr); }
  #inryoku-chat.chat-rpg .rpg-dialog { padding-left: 18px; padding-right: 18px; }
  #inryoku-chat.chat-rpg .rpg-text { font-size: clamp(18px, 1.39vw, 20px) !important; }
  #inryoku-chat.chat-rpg .rpg-input { gap: 4px; padding-left: 4px; padding-right: 4px; }
}
@media (min-width: 768px) and (max-width: 879px) {
  #inryoku-chat.chat-rpg .rpg-stack { grid-template-columns: minmax(0, 1fr) 200px; }
}
@media (prefers-reduced-motion: reduce) {
  #inryoku-chat.chat-rpg.chat-visible .rpg-win,
  #inryoku-chat.chat-rpg.rpg-closing .rpg-win,
  #inryoku-chat.chat-rpg .rpg-next.is-ready b,
  #inryoku-chat.chat-rpg .rpg-thinking b { animation: none !important; }
  #root.phase-3 .singularity-content.rpg-stage-fit { transition: none !important; }
}
