  :root {
    --night-1: #1e1d52;
    --night-2: #16153f;
    --night-3: #0d0c2a;
    /* 夕暮れ背景: 燃えるオレンジ → ラスト → 深いバーガンディ */
    --dusk-1: #c84a20;
    --dusk-2: #7a2818;
    --dusk-3: #2a0a08;
    --moon: #f5f3e0;
    --firefly: rgba(255, 240, 180, 0.9);
    --line: rgba(255, 255, 255, 0.3);
    --line-soft: rgba(255, 255, 255, 0.15);
    --text-main: rgba(255, 255, 255, 0.95);
    --text-mid: rgba(255, 255, 255, 0.7);
    --text-soft: rgba(255, 255, 255, 0.5);
    --warn: rgba(255, 200, 150, 0.85);
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--dusk-3);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
  }

  body {
    background: linear-gradient(to bottom, var(--dusk-1) 0%, var(--dusk-2) 50%, var(--dusk-3) 100%);
    background-attachment: fixed;
    min-height: 100vh;
  }

  .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
  }

  .stars-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  .firefly {
    position: fixed;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--firefly);
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
    box-shadow: 0 0 8px rgba(255, 240, 180, 0.5);
    z-index: 9999;
  }

  .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle ease-in-out infinite;
  }
  @keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
  }

  .shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, white, transparent);
    transform: rotate(20deg);
    opacity: 0;
  }
  @keyframes shoot {
    0% { transform: translate(0, 0) rotate(20deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(900px, 320px) rotate(20deg); opacity: 0; }
  }
  .shooting { animation: shoot 1.8s ease-out; }

  @keyframes burst {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
  }

  /* 背景装飾: 夜の地平線(雲・城・人物シルエット) — チラシ下半分の再現 */
  .deco-horizon {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 42vh;
    max-height: 460px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }
  .deco-cloud {
    position: absolute;
    left: 0;
    width: 200%;
    background-image: url(assets/deco-cloud.png);
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: left bottom;
    will-change: transform;
  }
  .deco-cloud-back {
    bottom: 18%;
    height: 55%;
    opacity: 0.22;
    z-index: 0;
    animation: decoCloudDrift 140s linear infinite;
  }
  .deco-cloud-front {
    bottom: 0;
    height: 48%;
    opacity: 0.35;
    z-index: 2;
    animation: decoCloudDrift 90s linear infinite reverse;
  }
  .deco-castle {
    position: absolute;
    right: 12%;
    bottom: 0;
    height: 70%;
    width: auto;
    opacity: 0.5;
    z-index: 1;
    will-change: transform;
    animation: decoCastleBob 26s ease-in-out infinite;
  }
  .deco-people {
    position: absolute;
    bottom: 0;
    height: 28%;
    width: auto;
    opacity: 0.55;
    z-index: 3;
    transform-origin: bottom center;
    will-change: transform;
  }
  .deco-people-l {
    left: 6%;
    animation: decoSway 11s ease-in-out infinite;
  }
  .deco-people-r {
    right: 22%;
    animation: decoSway 13s ease-in-out infinite;
    animation-delay: -4s;
  }
  @keyframes decoCloudDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
  @keyframes decoCastleBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
  }
  @keyframes decoSway {
    0%, 100% { transform: rotate(-0.6deg); }
    50%      { transform: rotate(0.6deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .deco-cloud-back, .deco-cloud-front,
    .deco-castle, .deco-people-l, .deco-people-r {
      animation: none !important;
      transform: none !important;
    }
  }

  /* Hero */
  .hero {
    text-align: center;
    padding: 80px 24px 40px;
    position: relative;
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 5px;
    color: var(--text-soft);
    margin-bottom: 16px;
  }

  .logo-svg {
    width: 280px;
    max-width: 80vw;
    height: auto;
    margin: 0 auto 8px;
    display: block;
  }
  .logo-img {
    width: 340px;
    max-width: 85vw;
    height: auto;
    margin: 0 auto 8px;
    display: block;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18));
    animation: fadeIn 1.4s ease-out;
  }

  /* New hero logo layout: メインロゴ + 縦書きSHIRAKAWA + キャッチコピー */
  .hero-logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 0 auto;
    max-width: 95vw;
    animation: fadeIn 1.4s ease-out;
  }
  .hero-logo-main img,
  .hero-logo-main .logo-img {
    width: 320px;
    max-width: 70vw;
    height: auto;
    margin: 0;
    display: block;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18));
  }
  .hero-logo-side img,
  .logo-side-img {
    width: 18px;
    max-width: 6vw;
    height: auto;
    display: block;
    opacity: 0.85;
  }
  .hero-tagline-img-wrap {
    margin: 18px auto 8px;
    text-align: center;
    animation: fadeIn 1.6s ease-out;
  }
  .hero-tagline-img-wrap img,
  .logo-tagline-img {
    max-width: 360px;
    width: 80vw;
    height: auto;
    opacity: 0.9;
    display: inline-block;
  }
  .hero-meta {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-soft);
    margin-top: 14px;
    min-height: 1em;
  }
  .logo-svg path, .logo-svg line, .logo-svg circle {
    fill: none;
    stroke: white;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .logo-svg.draw path, .logo-svg.draw line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw 2s ease-out forwards;
  }
  .logo-svg.draw circle {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: 1.6s;
  }
  @keyframes draw {
    to { stroke-dashoffset: 0; }
  }
  @keyframes fadeIn {
    to { opacity: 1; }
  }

  .hero-divider {
    width: 40px;
    height: 1px;
    background: var(--line);
    margin: 24px auto;
  }

  .hero-tagline {
    font-size: 15px;
    color: var(--text-mid);
    margin: 0 0 6px;
  }

  .hero-meta {
    font-size: 13px;
    color: var(--text-soft);
    margin: 0;
  }

  .moon {
    position: absolute;
    top: 60px;
    right: 8%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--moon);
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 3;
  }
  .moon:hover { transform: scale(1.08); }

  /* Pair badge */
  .pair-badge {
    margin: 24px auto 40px;
    max-width: 480px;
    padding: 16px 24px;
    border: 0.5px solid var(--line);
    border-radius: 8px;
    text-align: center;
  }
  .pair-badge .label {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--text-soft);
    margin-bottom: 4px;
  }
  .pair-badge .text {
    font-size: 14px;
    color: var(--text-main);
  }

  /* Section title */
  .section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 60px 0 24px;
  }
  .section-title .bar {
    width: 4px;
    height: 18px;
    background: white;
  }
  .section-title .label {
    font-size: 14px;
    letter-spacing: 4px;
    font-weight: 500;
  }
  .section-title .line {
    flex: 1;
    height: 0.5px;
    background: var(--line-soft);
  }

  /* Card grid */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }

  .event-card {
    border: 0.5px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, background 0.3s;
  }
  .event-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
  }

  .card-constellation {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
  }
  .event-card:hover .card-constellation {
    opacity: 1;
  }
  .card-constellation circle {
    fill: white;
  }
  .card-constellation line {
    stroke: white;
    stroke-width: 0.5;
    opacity: 0.4;
  }

  .card-date-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
  }
  .card-date {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
  }
  .card-dow {
    font-size: 10px;
    color: var(--text-soft);
    letter-spacing: 2px;
  }
  .card-time {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-mid);
  }

  .card-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
  }

  .card-meta {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
  }

  .progress-row {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
  }
  .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-mid);
    margin-bottom: 4px;
  }
  .progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: white;
    transition: width 0.5s;
  }
  .progress-fill.full {
    background: rgba(255, 255, 255, 0.4);
  }
  .waitlist-info {
    font-size: 10px;
    color: var(--warn);
    margin-top: 6px;
  }

  .btn-card {
    text-align: center;
    padding: 10px;
    border: 0.5px solid white;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
  }
  .btn-card.disabled {
    border-color: var(--line);
    color: var(--text-soft);
  }

  /* Bulk CTA */
  .bulk-cta {
    margin: 50px auto;
    padding: 32px;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.3s;
  }
  .bulk-cta:hover { border-color: white; }
  .bulk-cta-eyebrow {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--text-soft);
    margin-bottom: 8px;
  }
  .bulk-cta-title {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .bulk-cta-sub {
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 18px;
  }
  .bulk-cta-btn {
    display: inline-block;
    padding: 12px 36px;
    border: 0.5px solid white;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 3px;
  }

  /* Footer */
  footer {
    border-top: 0.5px solid var(--line-soft);
    padding: 40px 24px;
    background: rgba(0, 0, 0, 0.25);
    margin-top: 60px;
  }
  .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
  }
  .footer-eyebrow {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--text-soft);
    margin-bottom: 16px;
  }
  .footer-text {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.9;
  }
  .footer-text a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 0.5px solid var(--line);
  }

  /* Form styles */
  .form-section {
    max-width: 640px;
    margin: 40px auto;
    padding: 32px;
    border: 0.5px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
  }

  .form-section h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 0.5px solid var(--line-soft);
  }

  .form-row {
    margin-bottom: 20px;
  }
  .form-row label {
    display: block;
    font-size: 12px;
    color: var(--text-mid);
    margin-bottom: 6px;
    letter-spacing: 1px;
  }
  .form-row label .required {
    color: var(--warn);
    margin-left: 4px;
  }
  .form-row input[type="text"],
  .form-row input[type="email"],
  .form-row input[type="tel"],
  .form-row input[type="password"],
  .form-row input[type="number"],
  .form-row input[type="date"],
  .form-row input[type="time"],
  .form-row select,
  .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 0.5px solid var(--line);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 14px;
    font-family: inherit;
  }
  .form-row input:focus,
  .form-row select:focus,
  .form-row textarea:focus {
    outline: none;
    border-color: white;
  }
  .form-row textarea { min-height: 80px; resize: vertical; }

  .form-row .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }
  .form-row .checkbox-row input { width: auto; }

  .additional-name-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
  }
  .additional-name-row input { flex: 1; }
  .additional-name-row .remove-btn {
    width: 32px; height: 32px;
    border: 0.5px solid var(--line);
    background: transparent;
    color: var(--text-mid);
    border-radius: 4px;
    cursor: pointer;
  }

  .add-name-btn {
    background: transparent;
    border: 0.5px dashed var(--line);
    color: var(--text-mid);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
  }
  .add-name-btn:hover { border-color: white; color: white; }
  .add-name-btn:disabled { opacity: 0.4; cursor: not-allowed; }

  .submit-btn {
    width: 100%;
    padding: 14px;
    background: white;
    color: var(--night-3);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 3px;
    cursor: pointer;
    margin-top: 16px;
  }
  .submit-btn:hover { opacity: 0.9; }
  .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

  .alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
  }
  .alert-success { background: rgba(100, 200, 150, 0.15); border: 0.5px solid rgba(100, 200, 150, 0.4); }
  .alert-error { background: rgba(220, 100, 100, 0.15); border: 0.5px solid rgba(220, 100, 100, 0.4); }
  .alert-info { background: rgba(255, 200, 150, 0.1); border: 0.5px solid rgba(255, 200, 150, 0.3); }

  .back-link {
    display: inline-block;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 12px;
    margin: 24px 0;
    letter-spacing: 2px;
  }
  .back-link:hover { color: white; }

  /* Detail page */
  .detail-header {
    text-align: center;
    padding: 60px 24px 30px;
  }
  .detail-date {
    font-size: 13px;
    letter-spacing: 4px;
    color: var(--text-soft);
    margin-bottom: 12px;
  }
  .detail-title {
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 24px;
    line-height: 1.5;
  }
  .detail-info-grid {
    max-width: 640px;
    margin: 0 auto 32px;
    padding: 24px;
    border: 0.5px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
  }
  .detail-info-row {
    display: flex;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 0.5px solid var(--line-soft);
  }
  .detail-info-row:last-child { border-bottom: none; }
  .detail-info-row .key {
    width: 100px;
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 2px;
    padding-top: 2px;
  }
  .detail-info-row .val { flex: 1; }

  .detail-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    max-width: 640px;
    margin: 0 auto 32px;
  }
  .detail-photos img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
  }

  /* Admin */
  .admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
  }
  .admin-event-card {
    border: 0.5px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
  }
  .admin-event-card .title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
  .admin-event-card .meta { font-size: 11px; color: var(--text-soft); margin-bottom: 10px; line-height: 1.6; }
  .admin-event-card .actions { display: flex; gap: 6px; }
  .admin-event-card .actions button {
    flex: 1;
    padding: 6px;
    background: transparent;
    border: 0.5px solid var(--line);
    color: var(--text-main);
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
  }
  .admin-event-card .actions button:hover { border-color: white; }

  .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    overflow-y: auto;
    padding: 40px 16px;
  }
  .modal-overlay.show { display: flex; }
  .modal {
    background: var(--night-1);
    border: 0.5px solid var(--line);
    border-radius: 8px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .application-list {
    margin-top: 16px;
  }
  .application-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .application-list th, .application-list td {
    padding: 8px;
    text-align: left;
    border-bottom: 0.5px solid var(--line-soft);
  }
  .application-list th {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    border: 0.5px solid var(--line);
  }
  .status-active { background: rgba(100, 200, 150, 0.2); border-color: rgba(100, 200, 150, 0.4); }
  .status-waitlist { background: rgba(255, 200, 100, 0.15); border-color: rgba(255, 200, 100, 0.4); }
  .status-cancelled { color: var(--text-soft); opacity: 0.6; }

  /* Responsive */
  @media (max-width: 600px) {
    .hero { padding: 60px 16px 30px; }
    .moon { top: 30px; right: 20px; width: 40px; height: 40px; }
    .detail-title { font-size: 22px; }
    .form-section { padding: 24px 20px; }
    .container { padding: 0 16px; }
    .deco-horizon { height: 34vh; max-height: 300px; }
    .deco-castle { right: 4%; height: 55%; }
    .deco-people { height: 32%; }
    .deco-people-r { right: 6%; }
    .deco-cloud-back { opacity: 0.16; }
    .deco-cloud-front { opacity: 0.28; }
  }
