body {
  font-family: -apple-system, "Noto Sans JP", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #ececec;
  color: #2d3748;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.inner-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 20px;
  box-sizing: border-box;
}

.hero-image {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ececec;
  padding-top: 15px;
  padding-bottom: 5px;
  margin-bottom: 5px;
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 24px;
  color: #1a202c;
}

.form-accordion {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}
.form-accordion[open] {
  flex: 1 1 auto;
  min-height: 0;
}
.form-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  background: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  color: #2d3748;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
  flex-shrink: 0;
}

.summary-left-group,
.summary-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-title-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.form-summary::-webkit-details-marker {
  display: none;
}

.form-summary:hover {
  background: #f7fafc;
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-icon::after {
  content: "▼";
  font-size: 0.8rem;
  color: #718096;
  transition: transform 0.25s ease;
  display: inline-block;
}

.form-accordion[open] .summary-icon::after {
  transform: rotate(180deg);
}

.form-accordion-content {
  padding: 0 16px 16px;
  border-top: 1px solid #edf2f7;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.form-accordion-content .form-group:first-child {
  margin-top: 12px;
}

.form-group {
  margin-bottom: 8px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 1.05rem;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.label-row label {
  margin-bottom: 0;
}
.char-count {
  font-size: 0.85rem;
  color: #718096;
}
.char-count.over {
  color: #e53e3e;
  font-weight: bold;
}
.info-btn {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #cbd5e0;
  background: #fff;
  color: #4a5568;
  font-size: 0.85rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.info-btn:active {
  background: #edf2f7;
}

footer.page-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #a0aec0;
  margin-top: 5px;
  padding-bottom: 8px;
}

input[type="text"], textarea {
  width: 100%;
  padding: 14px;
  box-sizing: border-box;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.2s;
}
input[type="text"]:focus, textarea:focus {
  border-color: #3182ce;
  outline: none;
}
textarea {
  height: 160px;
  resize: vertical;
}
.field-note {
  font-size: 0.8rem;
  color: #718096;
  margin: 0 0 10px 2px;
}
.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 0;
  max-height: 120px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-bottom 0.3s ease;
}
.turnstile-wrap:has(iframe) {
  margin-bottom: 20px;
}
.turnstile-wrap.verified {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0 !important;
  pointer-events: none;
}

.submit-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.submit-row input[type="text"] {
  width: 140px;
  flex-shrink: 0;
  text-align: center;
  letter-spacing: 0.1em;
  font-size: 16px;
}
.submit-row button {
  flex: 1;
  margin: 0;
}

button {
  background: #812991;
  color: white;
  border: none;
  padding: 16px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  width: 100%;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background 0.2s;
}
button:active {
  background: #6a2178;
  transform: scale(0.98);
}
button:disabled {
  background: #8c808f;
  cursor: not-allowed;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: nowrap;
}
.pagination button {
  width: auto;
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 8px;
  border: 2px solid #cbd5e0;
  background: #fff;
  color: #2d3748;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: bold;
  box-shadow: none;
  white-space: nowrap;
}
.pagination button:active {
  background: #edf2f7;
  transform: none;
}
.pagination button:disabled {
  background: #f1f3f5;
  border-color: #e2e8f0;
  color: #a0aec0;
  cursor: not-allowed;
}
.pagination .page-indicator {
  font-size: 0.95rem;
  color: #4a5568;
  white-space: nowrap;
  min-width: 3.5em;
  text-align: center;
}
@media (max-width: 420px) {
  .pagination {
    gap: 6px;
  }
  .pagination button {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  .pagination .page-indicator {
    font-size: 0.85rem;
    min-width: 3em;
  }
  .submit-row input[type="text"] {
    width: 110px;
    font-size: 16px;
    padding: 14px 8px;
  }
}

hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 40px 0;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.message-card {
  background: white;
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: relative;
}
.message-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 6px;
  padding-right: 28px;
}
.message-body {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 1.05rem;
  color: #2d3748;
}
.msg-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #edf2f7;
  color: #718096;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}
.msg-close-btn:active {
  background: #e2e8f0;
}

.edit-mode-banner {
  border-radius: 8px;
  padding: 4px 2px;
  font-size: 0.85rem;
  margin-top: -6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.edit-mode-banner button {
  width: auto;
  flex: 0 0 auto;
  background: #ed8936;
  color: white;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  box-shadow: none;
  margin-left: auto;
}

/* モーダル共通 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.show {
  display: flex;
}
.modal-box {
  background: white;
  border-radius: 14px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.modal-box h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #1a202c;
}
.modal-box p {
  font-size: 0.9rem;
  color: #4a5568;
  margin: 0 0 14px;
}
.modal-box input[type="text"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.3em;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.modal-box input[type="text"]:focus {
  border-color: #3182ce;
  outline: none;
}
.modal-error {
  color: #e53e3e;
  font-size: 0.85rem;
  margin: -4px 0 10px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.modal-actions-vertical {
  flex-direction: column;
}
.modal-actions button {
  flex: 1;
  width: auto;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  box-shadow: none;
}
.modal-btn-primary {
  background: #3182ce;
  color: white;
}
.modal-btn-cancel {
  background: #edf2f7;
  color: #2d3748;
}
.modal-btn-danger {
  background: #e53e3e;
  color: white;
}

.terms-modal-box {
  max-width: 360px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.terms-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.terms-modal-header h3 {
  margin: 0;
}
.modal-close-x {
  width: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 8px;
  box-shadow: none;
}
.modal-close-x:active {
  color: #718096;
}
.terms-modal-content {
  overflow-y: auto;
  font-size: 0.9rem;
  color: #4a5568;
  padding-right: 4px;
}
.terms-modal-content h4 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
  color: #1a202c;
}
.terms-modal-content h4:first-child {
  margin-top: 0;
}
.terms-modal-content p {
  margin: 0 0 8px;
}
.terms-modal-content ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.terms-modal-content li {
  margin-bottom: 4px;
}

.sticky-top-group {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ececec;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  max-height: 100dvh;
}

/* フォーム入力中は上部固定を解除してスクロール可能にする */
.sticky-top-group.form-open {
  position: static;
  max-height: none;
}

.hero-header {
  flex-shrink: 0;
  padding-top: 16px;
  padding-bottom: 12px;
  margin-bottom: 10px;
}

.guide-text-group {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  border-left: 4px solid #8b5cf6;
  border-image: linear-gradient(to bottom, #8b5cf6, #ec4899) 1;
}

.guide-main-text {
  font-weight: 800;
  letter-spacing: 0.03em;
  display: block;
  color: #4c455c;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin-bottom: 0;
}

.top-page-indicator {
  font-size: 0.95rem;
  font-weight: normal;
  color: #718096;
  margin-left: 8px;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  max-width: 600px;
  width: calc(100% - 32px);
  background: white;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 1000;
  transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s;
  opacity: 0;
  border-left: 5px solid #3182ce;
  pointer-events: none;
}
#toast.show {
  bottom: 24px;
  opacity: 1;
  pointer-events: auto;
}
#toast.error {
  border-left-color: #e53e3e;
}
#toast.success {
  border-left-color: #38a169;
}
#toast .toast-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
#toast .toast-text {
  font-size: 0.95rem;
  color: #2d3748;
}
#toast .toast-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
}

/* ==========================================
   いいねボタン用スタイル (Facebookライク版)
   ========================================== */
.message-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  padding-top: 4px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}

.like-btn:active {
  transform: scale(0.92);
  background: transparent !important;
}

.like-btn.liked {
  color: #596576;
  background: transparent;
}

.like-btn .like-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.like-btn .like-count {
  line-height: 1;
}

@keyframes like-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.5); }
  55%  { transform: scale(0.85); }
  75%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.like-btn .like-icon-img.pop {
  animation: like-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}