/* =========================================================
   ATAMI AI CAMP 夜レク「生成AIプロモ画像グランプリ」
   共通スタイル — ダーク&プレミアム / 3色構成 / 直角矩形
   ========================================================= */

:root {
  /* --- Hero（ミッドナイト・インディゴ） --- */
  --bg:            #0a0e24;
  --bg-2:          #0e1430;
  --surface:       #151b3b;
  --surface-2:     #1b2350;
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* --- Accent（温泉・夕景のゴールド：1色系） --- */
  --gold:          #f6c453;
  --gold-strong:   #e6a12e;
  --gold-soft:     rgba(246, 196, 83, 0.14);

  /* --- Neutral text --- */
  --text:          #f3f5ff;
  --text-muted:    #9aa3c8;
  --text-faint:    #6b74a0;

  /* --- Semantic --- */
  --danger:        #ff5a6e;
  --success:       #35d6a4;

  /* --- Spacing scale（8px基準） --- */
  --xs: 8px; --s: 16px; --m: 24px; --l: 32px; --xl: 48px; --xxl: 64px;

  --maxw: 1120px;
  --shadow-1: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 8px 28px rgba(0,0,0,0.45);
  --shadow-gold: 0 10px 40px rgba(230, 161, 46, 0.28);

  --font-gothic: "Noto Sans JP", "游ゴシック体", YuGothic, "ヒラギノ角ゴ ProN",
    "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif JP", "游明朝体", YuMincho, "ヒラギノ明朝 ProN", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-gothic);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(246,196,83,0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(90,110,255,0.14), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.8;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-feature-settings: "kern" 1;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .container { padding: 0 16px; } }

.section { padding: var(--xxl) 0; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 30, 0.72);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s); padding: 14px 24px; max-width: var(--maxw); margin: 0 auto;
}
@media (max-width: 767px) { .site-header .bar { padding: 12px 16px; } }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .mark {
  font-family: var(--font-serif); font-weight: 700; letter-spacing: 0.14em;
  color: var(--gold); font-size: 13px; text-transform: uppercase;
}
.brand .title { font-weight: 900; font-size: 15px; letter-spacing: 0.06em; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--text-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  padding: 8px 12px; border: 1px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--bg); background: var(--gold); }

/* ---------- Hero / eyebrow ---------- */
.eyebrow {
  font-family: var(--font-serif); color: var(--gold); font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; font-size: 12px; margin: 0 0 12px;
}
h1.page-title { font-size: 40px; font-weight: 900; line-height: 1.28; margin: 0 0 12px; letter-spacing: 0.02em; }
.lead { color: var(--text-muted); font-size: 16px; margin: 0 0 8px; max-width: 62ch; }
@media (max-width: 767px) { h1.page-title { font-size: 28px; } }

/* ---------- Phase banner ---------- */
.phase-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border: 1px solid var(--border-strong); background: var(--surface);
  margin: var(--m) 0 var(--l); box-shadow: var(--shadow-1);
}
.phase-banner .dot { width: 10px; height: 10px; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); animation: pulse 1.8s infinite; }
.phase-banner.is-closed .dot { background: var(--text-faint); box-shadow: none; animation: none; }
.phase-banner strong { letter-spacing: 0.04em; }
.phase-banner .sub { color: var(--text-muted); font-size: 14px; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-gothic); font-size: 16px; font-weight: 700; letter-spacing: 0.04em;
  padding: 14px 28px; border: 2px solid transparent; cursor: pointer;
  background: var(--gold); color: #201400; transition: background-color .2s ease, transform .05s ease, opacity .2s;
  min-height: 48px;
}
.btn:hover { background: var(--gold-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn.ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn.ghost:hover { color: var(--text); }
.btn.block { width: 100%; }
.btn.lg { font-size: 18px; padding: 18px 40px; }

/* ---------- Inputs ---------- */
label.field { display: block; margin-bottom: var(--m); }
label.field .lab { display: block; font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.06em; }
label.field .hint { font-size: 12px; color: var(--text-faint); font-weight: 400; margin-left: 8px; }
input[type="text"], textarea {
  width: 100%; font-family: var(--font-gothic); font-size: 16px; color: var(--text);
  background: #0b1030; border: 1px solid var(--border); padding: 12px 16px; min-height: 48px;
  letter-spacing: 0.04em;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
input:focus, textarea:focus { outline: none; border: 2px solid var(--gold); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }

/* ---------- Cards / gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--m); }
@media (max-width: 1023px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .gallery { grid-template-columns: 1fr; gap: var(--s); } }

.card {
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.card .thumb { aspect-ratio: 3 / 4; background: #070a1c; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .work-title { font-weight: 800; font-size: 16px; letter-spacing: 0.03em; line-height: 1.5; }
.card .work-comment { color: var(--text-muted); font-size: 13.5px; line-height: 1.7; }
.card .work-num { position: absolute; top: 0; left: 0; background: rgba(8,11,30,0.82); color: var(--gold);
  font-family: var(--font-serif); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; padding: 6px 10px; }
.card .vote-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .vote-count { font-family: var(--font-serif); font-weight: 700; color: var(--gold); font-size: 14px; }

/* ---------- 横並びリスト（作品を大きく：左に作品・右にタイトル/コメント） ---------- */
.gallery.list { display: flex; flex-direction: column; gap: 20px; }
.gallery.list .card { flex-direction: row; align-items: stretch; }
.gallery.list .card .thumb {
  flex: 0 0 46%; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; background: #070a1c;
}
.gallery.list .card .thumb img { width: 100%; height: 100%; max-height: 480px; object-fit: contain; }
.gallery.list .card .body { flex: 1; justify-content: center; padding: 24px 28px; gap: 12px; }
.gallery.list .card .work-title { font-size: 20px; }
.gallery.list .card .work-comment { font-size: 15px; }
.gallery.list .card .vote-foot { padding-top: 16px; }
@media (max-width: 700px) {
  .gallery.list .card { flex-direction: column; }
  .gallery.list .card .thumb { flex: none; }
  .gallery.list .card .thumb img { max-height: 62vh; }
}

/* ---------- Empty / muted ---------- */
.empty { text-align: center; color: var(--text-faint); padding: var(--xl) 0; border: 1px dashed var(--border); }

/* ---------- Vote badges ---------- */
.vote-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pips { display: inline-flex; gap: 7px; }
.pip { width: 16px; height: 16px; border: 2px solid var(--gold); background: transparent; }
.pip.filled { background: var(--gold); box-shadow: 0 0 10px rgba(246,196,83,.5); }
.remaining-num { font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--gold); }

.voted-tag { color: var(--success); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; }
.self-tag { color: var(--text-faint); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; border: 1px solid var(--border); padding: 4px 8px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 90; pointer-events: none; }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); padding: 12px 20px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-2); max-width: 90vw; animation: toastin .25s ease; }
.toast.err { border-color: var(--danger); color: #ffd7dc; }
.toast.ok { border-color: var(--success); color: #c9ffe9; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Scroll reveal（IntersectionObserver + transition） ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); color: var(--text-faint); font-size: 12px; padding: var(--l) 0; text-align: center; letter-spacing: 0.08em; }

.hidden { display: none !important; }
