/* ===== LINE-style Chat ===== */

.linePage {
  margin: 0;
  background: #e5ddd5;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* header */
.lineHeader {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  background: #06c755;
  color: #fff;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  font-weight: bold;
}
.lineHeader__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  text-decoration: none;
}
.lineHeader__name {
  flex: 1;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.lineHeader__actions {
  display: flex;
  gap: 4px;
}
.lineHeader__iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  border-radius: 8px;
}
.lineHeader__iconBtn:hover {
  background: rgba(255,255,255,.15);
}

/* chat area */
.lineChat {
  flex: 1;
  padding: 14px 10px 100px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

/* message row */
.lineMsg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* icon */
.lineMsg__iconWrap {
  width: 56px;
  text-align: center;
  flex-shrink: 0;
}
.lineMsg__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.lineMsg__charName {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  white-space: nowrap;
}

/* bubble */
.lineMsg__bubbleWrap {
  display: flex;
  flex-direction: column;
  max-width: 60%;
}
.lineMsg__bubble {
  background: #fff;
  padding: 12px 16px;
  border-radius: 18px;
  border-top-left-radius: 6px;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  color: #111;
}

/* read count */
.lineMsg__read {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  margin-left: 8px;
  opacity: 0;
  transition: opacity .3s;
}

/* self */
.lineMsg--self {
  flex-direction: row-reverse;
}
.lineMsg--self .lineMsg__bubbleWrap {
  align-items: flex-end;
}
.lineMsg--self .lineMsg__bubble {
  background: #dcf8c6;
  border-top-left-radius: 18px;
  border-top-right-radius: 6px;
}
.lineMsg--self .lineMsg__read {
  text-align: right;
  margin-left: 0;
  margin-right: 8px;
}

/* links in bubbles */
.lineMsg__bubble a {
  color: #1a73e8;
  text-decoration: underline;
}
/* images in bubbles */
.lineMsg__bubble img {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  margin: 4px 0;
}

/* fab */
.lineFab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  display: grid;
  place-items: center;
  text-decoration: none;
  z-index: 20;
  overflow: hidden;
}
.lineFab[hidden] {
  display: none !important;
}
.lineFab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lineFab:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
@keyframes fabPopIn {
  0%   { opacity: 0; transform: scale(0) translateY(20px); }
  60%  { transform: scale(1.15) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* FAB出現時の暗幕 */
.fabOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  animation: fadeIn .3s ease-out;
}

/* FAB出現時の吹き出し */
.fabTip {
  position: fixed;
  right: 80px;
  bottom: 28px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 1002;
  animation: fadeIn .3s ease-out;
  transition: opacity .3s, transform .3s;
}
.fabTip::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 16px;
  border: 8px solid transparent;
  border-left-color: #fff;
  border-right: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* composer */
.lineComposer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: #f0f0f0;
  max-width: 760px;
  width: 100%;
}
.lineComposer__plus {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lineComposer__input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
  font-size: 14px;
  outline: none;
}
.lineComposer__input:focus {
  border-color: #06c755;
}
.lineComposer__send {
  padding: 8px 14px;
  border: none;
  background: #06c755;
  color: #fff;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.lineComposer__send:hover {
  background: #05a94a;
}
