.ears-liff-consent {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(16, 35, 61, .38);
  backdrop-filter: blur(5px);
}

.ears-liff-card {
  width: min(100%, 520px);
  padding: 24px;
  border: 1px solid rgba(202, 171, 102, .48);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 22px 64px rgba(16, 35, 61, .2);
  color: #1f2a44;
}

.ears-liff-kicker {
  margin: 0 0 8px;
  color: #b38229;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.ears-liff-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.45;
}

.ears-liff-card p {
  margin: 0 0 16px;
  color: #5d687c;
  font-size: 14px;
  line-height: 1.75;
}

.ears-liff-card .ears-liff-sharing {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f7fa;
  color: #52657a;
  font-size: 12px;
  line-height: 1.7;
}

.ears-liff-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.ears-liff-agree input { margin-top: 4px; }
.ears-liff-agree a { color: #285f9f; }

.ears-liff-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ears-liff-actions.single { grid-template-columns: 1fr; }

.ears-liff-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ears-liff-actions .primary { background: #0c315c; color: #fff; }
.ears-liff-actions .secondary { background: #edf3f8; color: #38516b; }
.ears-liff-actions button:disabled { cursor: not-allowed; opacity: .45; }

.ears-liff-error {
  min-height: 20px;
  margin: 10px 0 0 !important;
  color: #a3261f !important;
}

.ears-liff-notice {
  position: fixed;
  z-index: 10010;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid #d8e8f7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 38px rgba(16, 35, 61, .16);
  color: #43546a;
  font-size: 13px;
  line-height: 1.6;
}

.ears-liff-checking {
  position: fixed;
  inset: 0;
  z-index: 10015;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 250, 253, .94);
  backdrop-filter: blur(4px);
}

.ears-liff-checking-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(202, 171, 102, .42);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 18px 48px rgba(16, 35, 61, .14);
}

.ears-liff-checking-card p {
  margin: 0;
  color: #334a63;
  font-size: 14px;
  font-weight: 700;
}

.ears-liff-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #dce8f3;
  border-top-color: #b38229;
  border-radius: 50%;
  animation: ears-liff-spin .8s linear infinite;
}

@keyframes ears-liff-spin { to { transform: rotate(360deg); } }

/* Email/password actions belong to the normal website, never to LIFF. */
.ears-liff-context [data-liff-web-auth],
.ears-liff-context [data-liff-web-only],
.ears-liff-context.ears-liff-auth-pending [data-liff-auth-required] {
  display: none !important;
}

@media (min-width: 680px) {
  .ears-liff-consent { place-items: center; }
}

@media (max-width: 480px) {
  .ears-liff-consent {
    place-items: end stretch;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .ears-liff-card {
    width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 21px 18px;
    border-radius: 22px;
  }

  .ears-liff-card h2 {
    font-size: 20px;
    text-wrap: balance;
  }

  .ears-liff-actions {
    grid-template-columns: 1fr;
  }

  .ears-liff-actions .primary { order: -1; }

  .ears-liff-actions button {
    width: 100%;
    min-height: 48px;
  }

  .ears-liff-notice {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }
}
