/* かすみちゃんクラブ — Guestbook */

*, ::after, ::before { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink:       #e8779a;
  --pink-light: #f9d0df;
  --pink-pale:  #fff0f5;
  --pink-mid:   #f4b8ce;
  --sakura:     #ffb7c5;
  --red:        #c0004a;
  --text:       #4a1a2e;
  --text-mid:   #7a3a54;
  --white:      #fffbfd;
  --radius:     8px;
}

html { font-size: 16px; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--pink-pale);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SPLASH ─── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--pink-pale);
  display: flex;
  align-items: stretch;
  transition: opacity 0.8s ease, visibility 0.8s;
  overflow: hidden;
}

#splash.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* before.png fills left ~60%, Kasumi faces right toward text */
.splash-bg {
  width: 60%;
  object-fit: cover;
  object-position: center top;
  display: block;
  flex-shrink: 0;
  -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%);
  mask-image: linear-gradient(to right, black 60%, transparent 100%);
}

.splash-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 60px 40px 20px;
  gap: 12px;
}

.kscc-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  color: var(--red);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.kscc-en {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 24px;
  letter-spacing: 0.08em;
}

.enter-btn {
  padding: 14px 48px;
  border: 2px solid var(--pink);
  border-radius: 30px;
  background: linear-gradient(135deg, var(--pink-pale), var(--pink-light));
  color: var(--red);
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 16px rgba(200, 0, 80, 0.15);
  transition: 0.2s;
  margin-bottom: 16px;
}

.enter-btn:hover {
  background: linear-gradient(135deg, var(--pink-light), var(--pink-mid));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 0, 80, 0.22);
}

.splash-sub {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-mid);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

/* ─── MAIN ─── */
#main {
  position: relative;
  min-height: 100vh;
}

#main[hidden] { display: none; }

.sakura-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,183,197,0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(248,176,213,0.25) 0%, transparent 50%),
    var(--pink-pale);
  pointer-events: none;
}

/* ─── PETALS ─── */
.petals { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.petal {
  position: absolute;
  top: -30px;
  width: 12px;
  height: 10px;
  background: radial-gradient(ellipse at 40% 35%, #fff0f5 0%, #ffb7c5 60%, #f48fb1 100%);
  border-radius: 50% 0 50% 0;
  opacity: 0.7;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0.7; }
  50%  { transform: translateY(50vh) rotate(180deg) translateX(30px); }
  100% { transform: translateY(110vh) rotate(360deg) translateX(-20px); opacity: 0; }
}

/* ─── LAYOUT ─── */
.gb-wrap {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0;
  padding: 0 20px 80px 60px;
}

/* entered.png — fixed right, fades left */
.main-bg {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: auto;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to bottom, black 50%, transparent 92%),
    linear-gradient(to right, transparent 0%, black 30%);
  mask-image:
    linear-gradient(to bottom, black 50%, transparent 92%),
    linear-gradient(to right, transparent 0%, black 30%);
  -webkit-mask-composite: intersect;
  mask-composite: intersect;
}

/* ─── HEADER ─── */
.gb-page-title {
  max-width: 480px;
  padding: 40px 0 10px;
  position: relative;
  z-index: 2;
}

.gb-en {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.gb-subtitle {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  color: var(--red);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.gb-desc {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-mid);
}

.section-divider {
  border: none;
  border-top: 2px solid var(--pink-mid);
  margin: 24px 0;
}

/* ─── SECTION TITLES ─── */
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem;
  color: var(--red);
  padding: 16px 0 14px;
  border-bottom: 2px solid var(--pink-mid);
  margin-bottom: 20px;
}

.section-title span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-mid);
  margin-left: 8px;
}

/* ─── FORM ─── */
.gb-form-section {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--pink-mid);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
  margin: 20px 0;
  backdrop-filter: blur(4px);
}

.gb-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.gb-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.gb-form .req { color: var(--red); }
.gb-form .hint { font-weight: 400; color: var(--text-mid); font-size: 0.72rem; }

.gb-form input,
.gb-form textarea {
  padding: 10px 14px;
  border: 1px solid var(--pink-mid);
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gb-form textarea {
  border-radius: 12px;
  resize: vertical;
  min-height: 100px;
}

.gb-form input:focus,
.gb-form textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 119, 154, 0.15);
}

.form-actions {
  display: flex;
  justify-content: center;
}

.btn-submit {
  padding: 12px 36px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--red) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 12px rgba(192, 0, 74, 0.25);
  transition: 0.2s;
}

.btn-submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(192, 0, 74, 0.3);
}

.form-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-mid);
  opacity: 0.7;
  margin-top: -6px;
}

/* ─── ENTRIES ─── */
.gb-entries-section {
  margin-top: 10px;
}

.gb-entries {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gb-entry {
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--pink-light);
  border-left: 3px solid var(--pink);
  border-radius: var(--radius);
  padding: 16px 20px;
  backdrop-filter: blur(4px);
}

.entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.entry-name {
  font-weight: 700;
  color: var(--red);
  font-size: 0.95rem;
}

.entry-loc {
  font-size: 0.78rem;
  color: var(--text-mid);
}

.entry-date {
  font-size: 0.75rem;
  color: var(--text-mid);
  opacity: 0.65;
  margin-left: auto;
}

.entry-msg {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
}

/* ─── FOOTER ─── */
.gb-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-mid);
  opacity: 0.5;
  line-height: 1.8;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 680px) {
  #splash { flex-direction: column; }
  .splash-bg { width: 100%; height: 50vh; -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%); mask-image: linear-gradient(to bottom, black 60%, transparent 100%); }
  .splash-content { align-items: center; padding: 20px; text-align: center; }
  .main-bg { width: 100%; height: auto; top: 0; opacity: 0.3; }
  .gb-wrap { max-width: 100%; padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
}
.back-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9999;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    text-shadow: 0 1px 4px #000, 0 0 8px #000;
    transition: opacity 0.2s;
    opacity: 0.55;
}
.back-link:hover { opacity: 1; }
