


body {
  font-family: "Segoe UI", "Meiryo", sans-serif;
  margin: 0;
  padding: 0;
  background: #fcf7f0;
}
.screen {
  width: 100vw;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #fcf7f0;
  z-index: 10;
}
#title-screen {
  background: #fcf7f0;
}
.guide-popup {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  padding: 32px 24px 20px 24px;
  min-width: 320px;
  max-width: 96vw;
  text-align: left;
}
.guide-title {
  font-size: 1.25em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-lock { font-size: 1.5em; }
.guide-list {
  list-style: none;
  padding: 0 0 10px 0;
  margin: 0 0 18px 0;
}
.guide-list li {
  margin-bottom: 5px;
  font-size: 1.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
#start-chat-btn {
  background: #ffe066;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 1.1em;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  transition: background 0.2s;
}
#start-chat-btn:hover {
  background: #ffd24a;
}

/* ======== チャット画面の新レイアウト ========= */
#chat-screen {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 0;
  box-sizing: border-box;
  width: 100vw;
  overflow-y: auto;
  background: #fcf7f0;
}
.chat-header ｛
  width: 100vw;
  z-index: 100;
  background: #fcf7f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 0;
  box-sizing: border-box;
  height: 52px;
  border-bottom: 1.5px solid #eee;
}
.chat-title {
  font-size: 1.6rem;
  color: #444;
  text-align: center;
  flex-grow: 1;
  margin: 0;
  padding-right: 20px;
}
.menu-button {
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #444;
  padding: 0;
}
img.icon {
  position: fixed;
  top: 200px;
  right: 55px;
  width: 300px;
  height: 300px;
  margin: 0;
}

#appMenu.menu-list {
  position: fixed;
  top: 62px;
  right: 16px;
  background: #fff;
  border: 1px solid #e0dbcd;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 200;
  display: none;
  padding: 10px;
  max-width: 200px;
}
.menu-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-list li {
  padding: 10px 15px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 1.03em;
}
.menu-list li:hover {
  background: #f0f0f0;
}
.container {
  width: 100%;
  max-width: 400px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 190px; /* ヘッダー＋アイコン分のスペース */
}
.bubble {
  position: fixed;
  left: 0;
  bottom: 110px;   /* 入力欄の上にピッタリ（input-groupのheight+α） */
  width: 100vw;
  background: #fffbcc;
  border-radius: 16px;
  padding: 12px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  min-height: 48px;
  box-sizing: border-box;
  z-index: 2000;
  transition: box-shadow 0.3s;
}

.input-group {
  display: flex;
  gap: 8px;
  position: relative;
  margin-top: 32px;
  width: 100%;
}
.input-group input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.input-group button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #eee;
  cursor: pointer;
}

.input-group .ainat-peek {
  position: fixed;
  right: 8px;
  bottom: 150px;
  width: 200px !important;
  height: 200px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  z-index: 1200;
  transform: translateY(100%) scale(1) rotate(-7deg);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(.62,1.7,.16,1), opacity 0.2s;
  pointer-events: none;
}
.input-group .ainat-peek.active {
  transform: translateY(-40px) scale(1.1) rotate(-7deg);
  opacity: 1;
}


.greeting-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  background: #fffbe6;
  border-radius: 28px;
  box-shadow: 0 10px 32px rgba(220,160,40,0.16), 0 2px 12px rgba(0,0,0,0.08);
  padding: 38px 22px 32px 22px;
  min-width: 320px;
  max-width: 92vw;
  z-index: 3000;
  text-align: left;
  font-size: 1.08em;
  display: none;
  border: 4px solid #ff99b7;
  position: fixed;
  animation: popUpShow 0.42s cubic-bezier(.6,1.3,.2,1) both;
}



.greeting-title {
  font-weight: bold;
  font-size: 1.35em;
  margin-bottom: 20px;
  letter-spacing: 1.2px;
  color: #d4b12d;
  text-shadow: 0 2px 12px #fff8c7, 0 1px 2px #fffde6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-title::before {
  content: "⭐";
  font-size: 1.2em;
  margin-right: 2px;
}

.greeting-message {
  line-height: 1.82;
  color: #53461e;
  margin-bottom: 30px;
  font-size: 1.12em;
}

.close-modal-btn {
  display: block;
  margin: 0 auto;
  background: #ffe066;
  border: none;
  border-radius: 14px;
  padding: 12px 38px;
  font-size: 1.14em;
  font-weight: bold;
  color: #7d6100;
  box-shadow: 0 2px 10px rgba(250,240,170,0.15);
  cursor: pointer;
  letter-spacing: 2px;
  transition: background 0.18s, color 0.15s, transform 0.13s;
}
.close-modal-btn:active {
  background: #fffbe6;
  color: #d4b12d;
  transform: scale(0.98);
}

/* アニメーション追加 */
@keyframes popUpShow {
  from { opacity: 0; transform: scale(0.8) translate(-50%,-50%);}
  to   { opacity: 1; transform: scale(1) translate(-50%,-54%);}
}


.simple-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 30px 16px 24px 16px;
  min-width: 270px;
  max-width: 95vw;
  z-index: 3000;
  text-align: left;
  font-size: 1em;
  display: none;
  border: 1.5px solid #dadada;
}

.simple-popup .greeting-title {
  color: #3d3d3d;
  font-size: 1.08em;
  font-weight: bold;
  margin-bottom: 14px;
  text-shadow: none;
  letter-spacing: 0.2px;
  display: block;
}

.simple-popup .greeting-title::before {
  content: none !important;
}



.simple-popup .greeting-message {
  color: #444;
  line-height: 1.6;
  font-size: 0.98em;
  margin-bottom: 18px;
}

.simple-popup .close-modal-btn {
  background: #eee;
  color: #666;
  border-radius: 10px;
  padding: 7px 22px;
  font-size: 1em;
  border: none;
  box-shadow: none;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 0 auto;
  display: block;
  cursor: pointer;
}
.simple-popup .close-modal-btn:active {
  background: #fafafa;
  color: #222;
}


.guide-popup,
.simple-popup {
  max-height: 70vh;
  overflow-y: auto;
}
