/* 尚学舎 LINE フローティングボタン（右下・追従） */
:root {
  --line-green: #06c755;
  --line-green-dark: #05a847;
  /* 画面下部に固定CTAやBGMボタンがある場合、ここで押し上げ量を調整 */
  --line-float-bottom: 24px;
  --line-float-right: 20px;
}

.line-float {
  position: fixed;
  right: calc(var(--line-float-right) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--line-float-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  background: var(--line-green);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(8, 28, 51, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.line-float:hover,
.line-float:focus-visible {
  background: var(--line-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(8, 28, 51, 0.34);
  color: #fff;
}

.line-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--line-green-dark), 0 12px 28px rgba(8, 28, 51, 0.34);
}

.line-float__icon {
  flex: none;
  width: 26px;
  height: 26px;
  display: block;
}

.line-float__sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.line-float__text {
  display: block;
}

/* 目を引くための控えめなパルス（動きを減らす設定の人には無効） */
@media (prefers-reduced-motion: no-preference) {
  .line-float::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--line-green);
    opacity: 0;
    animation: line-float-pulse 2.8s ease-out infinite;
    pointer-events: none;
  }
  @keyframes line-float-pulse {
    0% { transform: scale(1); opacity: 0.55; }
    70%, 100% { transform: scale(1.22, 1.5); opacity: 0; }
  }
}

/* スマホ：丸アイコン＋短い文言にして、コンテンツを隠しすぎない */
@media (max-width: 640px) {
  :root {
    --line-float-right: 14px;
  }
  .line-float {
    padding: 12px 16px 12px 14px;
    font-size: 14px;
  }
  .line-float__sub { display: none; }
}

@media print {
  .line-float { display: none; }
}