:root {
  --bg: #05050a;
  --panel: rgba(10, 12, 22, 0.66);
  --line: rgba(255,255,255,0.12);
  --text: #f4f0ff;
  --sub: #c7bfdd;
  --accent: #e8d7ff;
  --warning: #ffe8aa;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #11162a, var(--bg));
  color: var(--text);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
button, input, textarea { font: inherit; }

.screen {
  min-height: 100vh;
  padding: 40px 20px 32px;
  position: relative;
  overflow: hidden;
}

.mist {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 25%, rgba(153, 122, 255, 0.14), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(255, 207, 171, 0.10), transparent 18%),
    radial-gradient(circle at 52% 78%, rgba(255, 255, 255, 0.06), transparent 16%);
  filter: blur(10px);
}

.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0,0,0,0.38);
}

.closed-screen {
  display: grid;
  place-items: center;
}

.closed-card {
  max-width: 640px;
  width: min(92vw, 640px);
  border-radius: 24px;
  padding: 42px 32px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sub);
  font-size: 0.84rem;
}

.closed-card h1,
.flower-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.lead,
.short-line,
.essay p,
.botany-note p,
.small-note,
.action-note,
.latin {
  color: var(--sub);
  line-height: 1.9;
}

.countdown-block {
  margin: 30px auto 16px;
  padding: 18px;
  max-width: 340px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.countdown-label { color: var(--sub); margin-bottom: 8px; }
.countdown {
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.08em;
}

.hero-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 28px;
  display: grid;
  gap: 22px;
  grid-template-columns: 1.02fr 0.98fr;
}

.flower-visual-wrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}

.flower-visual {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(1.02) contrast(1.03);
}

.watermark {
  position: absolute;
  inset: auto 12px 12px auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 2;
}

.flower-copy {
  padding: 12px 8px 8px;
}

.latin { margin-top: -8px; font-size: 0.98rem; }
.short-line {
  font-size: 1.08rem;
  margin: 18px 0 24px;
  color: var(--accent);
}

.botany-note,
.essay {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.09);
}

.botany-note h2,
.essay h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #fff6d0;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  color: var(--text);
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
}

.button:hover { transform: translateY(-1px); }
.footer-note {
  text-align: center;
  color: rgba(255,255,255,0.58);
  margin-top: 18px;
}

.privacy-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3,5,9,0.74);
  color: var(--warning);
  font-size: clamp(1.2rem, 3vw, 2rem);
  z-index: 9;
  letter-spacing: 0.06em;
}
.privacy-overlay.hidden { display: none; }

body.blurred .flower-visual,
body.blurred .flower-copy {
  filter: blur(16px);
}

@media (max-width: 920px) {
  .hero-panel { grid-template-columns: 1fr; }
  .screen { padding-top: 20px; }
}

@media print {
  body * { visibility: hidden !important; }
  body::before {
    content: "この花は印刷できません";
    visibility: visible;
    display: block;
    color: #000;
    background: #fff;
    padding: 60px;
    font-size: 32px;
  }
}

/* ===== Artwork layer v2 ===== */
.night-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.15) 0 1px, transparent 1.4px),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,.08) 0 1px, transparent 1.6px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,.08) 0 1px, transparent 1.3px);
  background-size: 79px 83px, 127px 139px, 181px 173px;
  animation: grainDrift 28s linear infinite;
}

@keyframes grainDrift {
  from { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-8px,5px,0); }
  to { transform: translate3d(0,0,0); }
}

.moon-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  color: rgba(255,255,255,.66);
  font-size: 28px;
  box-shadow: 0 0 42px rgba(218,210,255,.12);
}

.open-hours {
  margin: 24px 0 0;
  letter-spacing: .16em;
  color: rgba(255,255,255,.52);
  font-size: .82rem;
}
.open-hours span { margin: 0 9px; opacity: .55; }

.portal-thread {
  display: inline-block;
  margin-left: 14px;
  color: rgba(255,255,255,.42);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: color .25s ease, border-color .25s ease;
}
.portal-thread:hover {
  color: rgba(255,255,255,.82);
  border-color: rgba(255,255,255,.4);
}

.bloom-enter {
  animation: bloomReveal 2.8s cubic-bezier(.19,.8,.23,1) both;
  transform-origin: 50% 60%;
}
@keyframes bloomReveal {
  0% { opacity: 0; transform: translateY(10px) scale(.985); filter: blur(10px); }
  45% { opacity: .65; }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.lunar-ring {
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  left: 24%;
  top: 12%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(211,201,255,.08), inset 0 0 70px rgba(255,255,255,.035);
  pointer-events: none;
  z-index: 2;
  animation: ringBreath 8s ease-in-out infinite;
}
@keyframes ringBreath {
  0%, 100% { transform: scale(.98); opacity: .52; }
  50% { transform: scale(1.02); opacity: .86; }
}

.flower-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  box-shadow: inset 0 0 120px rgba(0,0,0,.38);
  background: linear-gradient(180deg, transparent 62%, rgba(3,4,9,.17));
}

.time-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.time-strip .eyebrow { margin: 0; }
.night-clock {
  font-size: .78rem;
  letter-spacing: .16em;
  color: rgba(255,255,255,.46);
  font-variant-numeric: tabular-nums;
}

.ephemeral-meter {
  height: 1px;
  width: 100%;
  margin: 28px 0 2px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.ephemeral-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(255,255,255,.5);
  transition: width 1s linear, opacity .5s ease;
}

.closing-notice {
  position: fixed;
  z-index: 8;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(4,5,10,.72);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.74);
  backdrop-filter: blur(12px);
  font-size: .83rem;
  letter-spacing: .08em;
}
.closing-notice.hidden { display: none; }
body.flower-closing .flower-visual { filter: saturate(.82) brightness(.9); }
body.flower-closing .lunar-ring { opacity: .28; }
body.flower-closing .ephemeral-meter span { opacity: .5; }
body.last-minute .hero-panel { animation: lastMinuteFade 18s ease-in-out infinite; }
@keyframes lastMinuteFade {
  0%,100% { opacity: 1; }
  50% { opacity: .83; }
}

/* ===== Keeper preview ===== */
.admin-body {
  user-select: text;
  -webkit-user-select: text;
  background: #0a0c13;
}
.admin-preview {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 22px 70px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef0f7;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.admin-header h1 { margin: 4px 0 8px; }
.admin-header p { color: #aeb5c8; }
.admin-link { text-decoration: none; white-space: nowrap; }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.admin-card,
.admin-flower-preview {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  border-radius: 18px;
  padding: 20px;
}
.admin-card h2 { margin: 0 0 12px; font-size: .94rem; color: #bfc6d9; }
.admin-big { font-size: 1.65rem; margin: 0 0 8px; color: #fff; }
.admin-flower-preview {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) 1.2fr;
  gap: 24px;
  margin-bottom: 14px;
}
.admin-image-wrap {
  border-radius: 14px;
  overflow: hidden;
  min-height: 420px;
  background: #04050a;
}
.admin-image-wrap img { width: 100%; height: 100%; object-fit: cover; pointer-events: auto; }
.admin-flower-preview h2 { font-family: "Yu Mincho", serif; font-size: 2rem; margin: 5px 0 8px; }
.admin-flower-preview h3 { margin: 24px 0 8px; font-size: .95rem; color: #d8ddef; }
.admin-essay { line-height: 1.9; color: #d0d5e4; }
.reserve-card { margin-top: 14px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th,
.admin-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; font-size: .86rem; }
.admin-table th { color: #9ea8c0; font-weight: 600; }

@media (max-width: 800px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-flower-preview { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; }
}
