/* ============================================================
   スロットジャパン - style.css
   配置先: assets/css/style.css
   ============================================================ */

/* ---------- CSS変数 ---------- */
:root {
  --bg:         #0a0a0f;
  --surface:    #12121a;
  --surface2:   #1a1a26;
  --border:     #2a2a40;
  --gold:       #f5c842;
  --gold2:      #e8a800;
  --red:        #e83535;
  --cyan:       #00c8ff;
  --text:       #e8e8f0;
  --muted:      #7878a0;
  --header-bg:  rgba(10,10,15,0.95);
}

/* ---------- ライトモード ---------- */
body.light {
  --bg:        #f4f4f8;
  --surface:   #ffffff;
  --surface2:  #eeeef5;
  --border:    #d0d0e0;
  --gold:      #b08800;
  --gold2:     #8a6a00;
  --red:       #cc2222;
  --cyan:      #0077bb;
  --text:      #1a1a2e;
  --muted:     #666688;
  --header-bg: rgba(244,244,248,0.95);
}

/* ---------- リセット ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(245,200,66,0.4);
  text-decoration: none;
}
.logo span { color: var(--red); }

nav { display: flex; gap: 4px; }

nav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
nav a:hover { color: var(--gold); background: rgba(245,200,66,0.08); }

.header-right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--gold); }

.btn-post {
  background: var(--gold);
  border: none;
  color: #000;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-post:hover { background: var(--gold2); }

/* ============================================================
   FLASH MESSAGE
   ============================================================ */
.flash {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
}
.flash-error   { background: rgba(232,53,53,0.15);  color: var(--red); }
.flash-success { background: rgba(109,200,109,0.15); color: #6dc86d; }

/* ============================================================
   TICKER
   ============================================================ */
.ticker-wrap {
  background: var(--red);
  padding: 8px 0;
  overflow: hidden;
}
.ticker {
  display: flex;
  gap: 60px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.ticker-tag {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
}
.ticker-link {
  color: #fff;
  text-decoration: none;
}
.ticker-link:hover {
  text-decoration: underline;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245,200,66,0.06) 0%, transparent 70%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(245,200,66,0.03) 39px, rgba(245,200,66,0.03) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(245,200,66,0.03) 39px, rgba(245,200,66,0.03) 40px);
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
}
.hero-sub {
  font-size: 13px;
  color: var(--muted);
  position: relative;
  margin-bottom: 28px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
}
.hero-stat-num {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}
.hero-stat-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 32px 0;
}

/* ---------- セクションヘッダー ---------- */
.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sec-title {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}
.sec-more {
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s;
}
.sec-more:hover { color: var(--gold); }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.cat-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cat-btn:hover { background: var(--surface2); border-color: rgba(245,200,66,0.4); transform: translateY(-1px); }
.cat-icon  { font-size: 22px; margin-bottom: 6px; }
.cat-name  { font-size: 11px; font-weight: 700; }
.cat-count { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   MACHINES LIST (台別スレ一覧)
   ============================================================ */
.machines-year-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 12px;
}
.machines-year-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.machine-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
  line-height: 1.4;
}
/* Aタイプ → 緑 */
.machine-type-a    { background: #1a6634; color: #fff; }
/* A+AT → 青緑 */
.machine-type-aplus { background: #0e7490; color: #fff; }
/* ART → オレンジ */
.machine-type-art  { background: #b45309; color: #fff; }
/* AT → 青 */
.machine-type-at   { background: #1d4ed8; color: #fff; }
/* ST → 赤 */
.machine-type-st   { background: #b91c1c; color: #fff; }
/* Sタイプ → 紫 */
.machine-type-s    { background: #6d28d9; color: #fff; }
/* その他 → グレー */
.machine-type-other { background: #4b5563; color: #fff; }

/* ============================================================
   THREAD LIST
   ============================================================ */
.thread-list { display: flex; flex-direction: column; gap: 2px; }

.thread-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.thread-item:hover {
  background: var(--surface2);
  border-color: rgba(245,200,66,0.3);
  transform: translateX(2px);
}

.thread-rank {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--border);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.thread-rank.top1 { color: var(--gold); }
.thread-rank.top2 { color: #c0c0c0; }
.thread-rank.top3 { color: #cd7f32; }

.thread-body  { flex: 1; min-width: 0; }
.thread-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  gap: 12px;
}
.thread-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 2px;
}
.reply-count {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.reply-label { font-size: 9px; color: var(--muted); }
.new-badge {
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
}

/* ---------- スレッドタグ ---------- */
.thread-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.tag-machine   { background: rgba(0,200,255,0.15);  color: var(--cyan); }
.tag-report    { background: rgba(245,200,66,0.15);  color: var(--gold); }
.tag-hall      { background: rgba(232,53,53,0.15);   color: var(--red); }
.tag-news      { background: rgba(100,200,100,0.15); color: #6dc86d; }
.tag-performer { background: rgba(200,100,255,0.15); color: #c864ff; }
.tag-beginner  { background: rgba(255,150,0,0.15);   color: #ff9600; }
.tag-setting   { background: rgba(0,200,255,0.12);   color: var(--cyan); }
.tag-chat      { background: rgba(245,200,66,0.10);  color: var(--muted); }

/* ============================================================
   THREAD DETAIL
   ============================================================ */
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }

.thread-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}
.thread-headline {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
  margin: 8px 0;
}
.thread-meta-row {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 16px;
}

/* ---------- レス ---------- */
.reply-wrap { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }

.reply-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.reply-num {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  width: 32px;
  padding-top: 2px;
}
.reply-body { flex: 1; min-width: 0; }
.reply-name { font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.reply-text { font-size: 13px; line-height: 1.7; word-break: break-all; }
.reply-date { font-size: 10px; color: var(--muted); margin-top: 6px; }

/* ---------- レス投稿フォーム ---------- */
.reply-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.locked-notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   FORM PARTS
   ============================================================ */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 700;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.btn-submit {
  background: var(--gold);
  border: none;
  border-radius: 6px;
  padding: 10px 28px;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--gold2); }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ============================================================
   NEWS GRID
   ============================================================ */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.news-card:hover { background: var(--surface2); border-color: rgba(245,200,66,0.3); }
.news-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}
.news-card-date { font-size: 10px; color: var(--muted); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ---------- 演者マップカード ---------- */
.map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.map-header {
  background: linear-gradient(135deg, #1a0a2e, #12121a);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.map-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.performer-list { padding: 4px 0; }

.performer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(42,42,64,0.5);
}
.performer-item:last-child { border-bottom: none; }
.performer-item:hover { background: var(--surface2); }

.performer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c864ff, #6400c8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.performer-info   { flex: 1; min-width: 0; }
.performer-name   { font-size: 12px; font-weight: 700; }
.performer-location {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.performer-time {
  font-size: 10px;
  color: var(--red);
  flex-shrink: 0;
  font-weight: 700;
}

/* ---------- 演者マップページ ---------- */
.performer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.performer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 14px;
}
.performer-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c864ff, #6400c8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}
.performer-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.performer-name-lg  { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.performer-hall     { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.performer-time-lg  { font-size: 12px; color: var(--red); font-weight: 700; margin-bottom: 3px; }
.performer-note     { font-size: 11px; color: var(--muted); }
.performer-twitter  { font-size: 11px; color: var(--cyan); margin-top: 6px; display: inline-block; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 8px;
}
.footer-desc { margin-bottom: 12px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 10px; }

/* ============================================================
   SCROLL ANIMATION
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}
/* ============================================================
   ハンバーガーメニュー
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sp-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
.sp-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.sp-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.sp-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.sp-nav a:hover, .sp-nav a:active { background: var(--hover); }
.sp-menu-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.sp-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: 'Noto Sans JP', sans-serif;
  transition: opacity 0.15s;
}
.sp-btn-login { background: transparent; border: 1px solid var(--border); color: var(--text); }
.sp-btn-register { background: var(--gold); color: #000; }
.sp-btn-post { background: var(--gold); color: #000; }
.sp-btn-user { color: var(--gold); background: transparent; border: 1px solid var(--border); }
.sp-btn-logout { color: var(--muted); background: transparent; border: 1px solid var(--border); }
.sp-btn:hover { opacity: 0.8; }

.sp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(0,0,0,0.4);
}
.sp-overlay.open { display: block; }

@media (max-width: 600px) {
  nav { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 20px; }
  header { padding: 0 12px; }
  .btn-login, .btn-register, .btn-logout, .btn-post, .header-username { display: none; }
  .header-right { gap: 6px; }
  .hamburger { display: flex; }
  .sp-menu { display: block; }
}


/* ============================================================
   STATIC PAGES (利用規約 / プライバシーポリシー / お問い合わせ)
   ============================================================ */
.static-page {
  background: var(--card);
  border-radius: 12px;
  padding: 40px 48px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
}
.static-page-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent);
}
.static-section {
  margin-bottom: 28px;
}
.static-section h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}
.static-section p, .static-section ul {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
}
.static-section ul {
  padding-left: 20px;
}
.static-section ul li {
  margin-bottom: 6px;
}
.static-date {
  font-size: 12px;
  color: var(--text-muted, #888);
  text-align: right;
  margin-top: 32px;
}
.required {
  color: #f56565;
  font-size: 12px;
  margin-left: 4px;
}
@media (max-width: 600px) {
  .static-page { padding: 24px 20px; }
}

/* ============================================================
   ヘッダー ログイン状態
   ============================================================ */
.header-username {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.btn-login, .btn-register {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-login {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-login:hover { background: var(--hover); }
.btn-register {
  background: var(--gold);
  color: #000;
  border: 1px solid var(--gold);
}
.btn-register:hover { opacity: 0.85; }
.btn-logout {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-logout:hover { color: var(--text); background: var(--hover); }

/* ============================================================
   認証フォーム
   ============================================================ */
.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
}
.auth-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}
.auth-errors {
  margin-bottom: 20px;
}
.auth-error-item {
  background: rgba(229,62,62,.12);
  border: 1px solid rgba(229,62,62,.35);
  color: #fc8181;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 6px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.auth-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--gold);
}
.auth-btn {
  margin-top: 8px;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: opacity .15s;
}
.auth-btn:hover { opacity: 0.85; }
.auth-sub {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.auth-sub a {
  color: var(--gold);
  font-weight: 700;
}
@media (max-width: 480px) {
  .auth-wrap { padding: 28px 20px; border-radius: 0; border-left: none; border-right: none; }
}

/* ページネーション */
.pagination-wrap {
  text-align: center;
  padding: 16px 0;
}
.pagination-wrap a,
.pagination-wrap span {
  display: inline-block;
  padding: 10px 16px;
  margin: 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #643200;
  text-decoration: none;
  font-size: 15px;
  min-width: 44px;
  min-height: 44px;
  line-height: 24px;
  box-sizing: border-box;
}
.pagination-wrap a:hover {
  background: #643200;
  color: #fff;
  border-color: #643200;
}
.pagination-wrap span,
.pagination-wrap strong {
  background: #643200;
  color: #fff;
  border-color: #643200;
}

/* メーカーカード */
.maker-card {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.maker-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.maker-card__name {
  font-weight: 700;
  font-size: 16px;
  color: var(--fg);
  margin-bottom: 2px;
}
.maker-card__kana {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.maker-card__note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.maker-card__url {
  font-size: 11px;
  color: var(--gold);
  word-break: break-all;
}

/* メーカーバナー（トップ） */
.maker-banner {
  display: block;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s;
}
.maker-banner:hover {
  background: var(--surface-2, var(--surface));
  border-left-color: var(--gold);
}

/* ============================================================
   マイページ
   ============================================================ */
.mypage-wrap {
  max-width: 540px;
  margin: 0 auto;
}
.mypage-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 0.05em;
}
.mypage-success {
  background: rgba(80,200,80,.12);
  border: 1px solid rgba(80,200,80,.35);
  color: #7dd87d;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
}
.mypage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.mypage-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.mypage-info-row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.mypage-info-row:last-child { border-bottom: none; }
.mypage-info-key {
  width: 130px;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 700;
}
.mypage-info-val { color: var(--text); }
.mypage-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mypage-logout-link {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}
.mypage-logout-link:hover { opacity: 0.75; }
a.header-username {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
a.header-username:hover { opacity: 0.8; }

/* マイページ タブ */
.mypage-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}
.mypage-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mypage-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.mypage-tab:hover { color: var(--text); }

.mypage-empty {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
}

/* 写真アップロード */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: border-color .2s;
  cursor: pointer;
}
.photo-upload-area:hover { border-color: var(--gold); }
.photo-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
}
.photo-upload-icon { font-size: 28px; }

/* 写真グリッド */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photo-cell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.photo-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity .15s;
}
.photo-thumb:hover { opacity: .85; }
.photo-caption {
  font-size: 11px;
  color: var(--text);
  padding: 4px 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-meta {
  font-size: 10px;
  color: var(--muted);
  padding: 2px 8px 6px;
}
.photo-delete-form { position: absolute; top: 4px; right: 4px; }
.photo-delete-btn {
  background: rgba(0,0,0,.55);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  cursor: pointer;
  line-height: 22px;
  text-align: center;
}
.photo-delete-btn:hover { background: var(--red); }

/* 写真モーダル */
.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-modal-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}
.photo-modal-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}
.photo-modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
#photo-modal-caption {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  margin-top: 10px;
}

/* ブックマーク */
.bookmark-list { display: flex; flex-direction: column; }
.bookmark-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.bookmark-item:last-child { border-bottom: none; }
.bookmark-info { flex: 1; min-width: 0; }
.bookmark-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bookmark-name:hover { color: var(--gold); }
.bookmark-maker {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  display: block;
}
.bookmark-remove-form { margin: 0; }
.bookmark-remove-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.bookmark-remove-btn:hover { border-color: var(--red); color: var(--red); }

/* ブックマークボタン（台ページ） */
.btn-bookmark {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-bookmark:hover, .btn-bookmark.bookmarked {
  border-color: var(--gold);
  color: var(--gold);
}

/* 閲覧履歴 */
.history-list { display: flex; flex-direction: column; }
.history-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.history-item:last-child { border-bottom: none; }
.history-type {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.type-thread { background: rgba(0,200,255,.15); color: var(--cyan); }
.type-machine { background: rgba(245,200,66,.15); color: var(--gold); }
.history-title {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-title:hover { color: var(--gold); }
.history-date {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.mypage-clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}
.mypage-clear-btn:hover { border-color: var(--red); color: var(--red); }

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .mypage-tab { padding: 8px 12px; font-size: 12px; }
}

/* ============================================================
   極小画面対応 (～480px)
   ============================================================ */
@media (max-width: 480px) {
  /* コンテナのパディングを縮小 */
  .container { padding: 0 12px; }

  /* 全要素がはみ出さないよう補強 */
  img, video, iframe, embed, object { max-width: 100%; height: auto; }

  /* ヒーロー */
  .hero { padding: 32px 12px 28px; }
  .hero-stats { gap: 12px; }
  .hero-stat-num { font-size: 22px; }

  /* スレッド一覧 */
  .thread-item { padding: 10px 12px; gap: 8px; }
  .thread-rank { width: 22px; font-size: 16px; }
  .thread-title { font-size: 12px; }
  .thread-meta { flex-wrap: wrap; gap: 6px; }

  /* スレッド詳細 */
  .thread-header { padding: 14px 12px; }
  .thread-headline { font-size: 15px; word-break: break-word; overflow-wrap: break-word; }
  .thread-meta-row { flex-wrap: wrap; gap: 8px; }
  .reply-item { padding: 10px 12px; gap: 8px; }
  .reply-form-wrap { padding: 14px 12px; }
  .reply-text { word-break: break-word; overflow-wrap: break-word; }

  /* 台情報ページ */
  .machine-info-card { padding: 14px 12px !important; }
  .machine-info-flex { flex-direction: column !important; gap: 10px !important; }
  .machine-info-flex h1 { font-size: 18px !important; word-break: break-word; }

  /* 演者カード */
  .performer-card { flex-direction: column; gap: 10px; }
  .performer-grid { grid-template-columns: 1fr; }

  /* マイページ */
  .mypage-info-row { flex-direction: column; gap: 4px; }
  .mypage-info-key { width: auto; }

  /* フッター */
  .footer-links { flex-wrap: wrap; gap: 12px; }

  /* モーダル */
  .modal { padding: 12px; }
  .modal-inner { padding: 20px 14px; }
}
