@charset "UTF-8";

/* box30内の本文領域 */
.box-body {
  padding: 15px 20px 20px;
}

/* フォーム */
.recipe-form {
  display: block;
}

.form-label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-textarea {
  width: 100%;
  box-sizing: border-box;
  height: 90px;
  padding: 12px 12px;
  border: 2px solid #6cc8f7;
  border-radius: 12px;
  font: inherit;
  line-height: 1.6;
  resize: none;
  background: #fff;
}

.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.button-1.isDisabled,
button.button-1:disabled,
span.button-1.isDisabled {
  pointer-events: none;
  opacity: 0.45;
}

/* 結果 */
.result-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fffef4;
  border: 1px solid #e0d8a8;
  border-radius: 8px;
}

.result-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.result-text {
  line-height: 1.8;
  word-break: break-word;
}

/* エラー */
.error-box {
  background: #fff1f1;
  border-color: #e0aaaa;
}

/* ===== AI Loading Overlay ===== */
.aiLoading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 200, 0.82);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.aiLoading.is-on {
  display: flex;
}

.aiLoadingCard {
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(120, 170, 255, 0.55);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 18px 18px 16px;
  text-align: center;
}

.aiSparkle {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
  animation: sparkle 1.2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(120, 170, 255, 0.65);
}

.aiLoadingTitle {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #1f3f8f;
}

.aiLoadingSub {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 10px;
}

.aiDots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}

.aiDots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(120, 170, 255, 0.95);
  animation: dots 1s infinite ease-in-out;
}

.aiDots span:nth-child(2) {
  animation-delay: 0.15s;
}

.aiDots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dots {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes sparkle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-4px) rotate(12deg);
    opacity: 1;
  }
}

/* ===== 名言ポスター本体 ===== */

.quoteposter-stage {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 8px auto 0;
  border: 1px solid #e5d79a;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.quoteposter-image {
  display: block;
  width: 100%;
  height: auto;
}

/* 背景が濃くても薄くても文字が読めるよう、全体にうっすらスクリーン */
.quoteposter-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.10) 22%,
      rgba(0, 0, 0, 0.14) 58%,
      rgba(0, 0, 0, 0.22)
    );
  pointer-events: none;
}

/* 中央配置 */
.quoteposter-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
}

/* 半透明で、でも読めるガラス風パネル */
.quoteposter-quote {
  max-width: 88%;
  padding: 18px 22px;
  border-radius: 18px;
  color: #ffffff;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.08em;
  word-break: break-word;
  overflow-wrap: break-word;
  background: rgba(18, 24, 38, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    0 0 1px rgba(0, 0, 0, 0.75);
}

/* 結果下の小さな補足 */
.quoteposter-caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: #666;
}

/* ログナビ */
.log-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.log-nav .button-1 {
  min-width: 72px;
  width: auto;
  text-align: center;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

.log-meta {
  margin: 0 0 14px;
  text-align: right;
  color: #666;
  font-size: 0.95rem;
}

/* 一覧 */
.trip-log-list {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d8cda5;
}

.trip-log-list-title {
  margin-bottom: 12px;
  font-weight: bold;
  color: #7a4d00;
}

.trip-log-list-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-log-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e2c36b;
  border-radius: 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.trip-log-row:hover {
  background: #fff8e8;
}

.trip-log-row.isCurrent {
  background: #fff3cd;
}

.trip-log-date {
  flex: 0 0 140px;
  color: #666;
  font-size: 0.92rem;
  white-space: nowrap;
}

.trip-log-title {
  flex: 1 1 auto;
  min-width: 0;
  color: #333;
  font-weight: 500;
  word-break: break-word;
}

/* スマホ */
@media (max-width: 640px) {
  .quoteposter-stage {
    border-radius: 14px;
  }

  .quoteposter-overlay {
    padding: 14px;
  }

  .quoteposter-quote {
    max-width: 92%;
    padding: 14px 16px;
    font-size: clamp(1.05rem, 4.8vw, 1.45rem);
    line-height: 1.55;
    letter-spacing: 0.04em;
  }

  .trip-log-row {
    display: block;
  }

  .trip-log-date {
    display: block;
    margin-bottom: 4px;
    flex: none;
  }

  .trip-log-title {
    display: block;
  }
}
