/* NABE`S WORKS — 受付（右下の看板娘）
   色は css/style.css の :root 変数を使う。ライト／ダークは自動。 */

.nwr-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface, #fff);
  box-shadow: 0 2px 6px rgba(16, 20, 38, .18), 0 10px 28px -10px rgba(16, 20, 38, .35);
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, opacity .25s ease;
}
.nwr-btn:hover { transform: translateY(-2px); }
.nwr-btn:focus-visible { outline: 3px solid var(--violet, #9a78ff); outline-offset: 3px; }
.nwr-btn img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface, #fff);
}
.nwr-btn__tag {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  font: 700 11px/1 var(--font-sans, system-ui, sans-serif);
  letter-spacing: .06em;
  color: #fff;
  background: var(--navy, #101426);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}
.nwr-btn[aria-expanded="true"] { opacity: 0; pointer-events: none; transform: scale(.85); }

.nwr-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9001;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--surface, #fff);
  color: var(--text, #1a1d2b);
  border: 1px solid var(--line, #dcdee6);
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(16, 20, 38, .12), 0 20px 48px -16px rgba(16, 20, 38, .4);
  font-family: var(--font-sans, system-ui, sans-serif);
  transform-origin: 100% 100%;
  animation: nwr-pop .22s ease-out;
}
.nwr-panel[hidden] { display: none; }
@keyframes nwr-pop { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }

.nwr-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 0 14px;
}
.nwr-head__title {
  flex: 1;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-3, #7a7e91);
}
.nwr-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2, #4d5163);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nwr-close:hover { background: var(--bg-tint, #eeeff4); }
.nwr-close:focus-visible { outline: 2px solid var(--violet, #9a78ff); }

/* 音声オン／オフ（小さなスピーカー） */
.nwr-voice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line, #dcdee6);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text-2, #4d5163);
  font: 700 11px/1 var(--font-sans, system-ui, sans-serif);
  letter-spacing: .04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nwr-voice:hover { background: var(--bg-tint, #eeeff4); }
.nwr-voice:focus-visible { outline: 2px solid var(--violet, #9a78ff); outline-offset: 2px; }
.nwr-voice:disabled { opacity: .45; cursor: default; }
.nwr-voice__icon {
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 9v6h4l5 4V5L7 9H3z'/><path d='M16 8.5a4.5 4.5 0 0 1 0 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/><path d='M18.5 5.5a8 8 0 0 1 0 13' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 9v6h4l5 4V5L7 9H3z'/><path d='M16 8.5a4.5 4.5 0 0 1 0 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/><path d='M18.5 5.5a8 8 0 0 1 0 13' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>") center / contain no-repeat;
}
.nwr-voice.is-off { color: var(--text-3, #7a7e91); }
.nwr-voice.is-off .nwr-voice__icon {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 9v6h4l5 4V5L7 9H3z'/><path d='M16 9l6 6M22 9l-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 9v6h4l5 4V5L7 9H3z'/><path d='M16 9l6 6M22 9l-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
}
.nwr-voice.is-off .nwr-voice__label::after { content: "オフ"; }
.nwr-voice:not(.is-off) .nwr-voice__label::after { content: "オン"; }

.nwr-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px 14px 6px;
  align-items: start;
}
.nwr-face {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #e9e4dc;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.nwr-face canvas, .nwr-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.nwr-face img { object-fit: cover; }
.nwr-face canvas { opacity: 0; transition: opacity .3s ease; }
.nwr-face.is-live canvas { opacity: 1; }
.nwr-face.is-live img { opacity: 0; }

.nwr-bubble {
  position: relative;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  border-top-left-radius: 4px;
  background: var(--bg-tint, #eeeff4);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.nwr-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 14px;
  border: 7px solid transparent;
  border-right-color: var(--bg-tint, #eeeff4);
  border-left: 0;
}
.nwr-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -2px;
  background: currentColor;
  animation: nwr-blink 1s steps(2) infinite;
}
@keyframes nwr-blink { to { visibility: hidden; } }

.nwr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 14px 14px;
}
.nwr-actions:empty { padding-bottom: 8px; }
.nwr-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line, #dcdee6);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #1a1d2b);
  font: 500 14px/1.4 var(--font-sans, system-ui, sans-serif);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nwr-act:hover { border-color: var(--violet, #9a78ff); background: var(--bg-tint, #eeeff4); }
.nwr-act:focus-visible { outline: 2px solid var(--violet, #9a78ff); outline-offset: 2px; }
.nwr-act--link { color: var(--violet-ink, #5a3fd6); border-color: color-mix(in srgb, var(--violet, #9a78ff) 45%, var(--line, #dcdee6)); }
.nwr-act--sub { color: var(--text-2, #4d5163); font-size: 13px; min-height: 40px; }
.nwr-act__arrow { color: var(--text-3, #7a7e91); font-size: 12px; }

@media (max-width: 480px) {
  .nwr-btn { width: 56px; height: 56px; right: 12px; bottom: 12px; }
  .nwr-btn__tag { font-size: 10px; padding: 3px 7px; bottom: -6px; }
  .nwr-panel { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .nwr-body { grid-template-columns: 80px 1fr; }
  .nwr-face { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .nwr-panel { animation: none; }
  .nwr-caret { animation: none; }
}
