/* 旅の記録 閲覧サイト
 * デザイン: 職業診断ページ (jobsurvey) のラボトーンを踏襲
 *  - 白背景＋グリッドライン＋ambientオーブ
 *  - フォント: Zen Kaku Gothic New (本文) / Roboto Mono (ラベル)
 *  - ベース: SP (390px想定)
 *  - 個別ページのみ和紙×明朝（旅感）
 */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Roboto+Mono:wght@400;500&family=Shippori+Mincho:wght@400;500;700&display=swap');

:root {
  --lab-bg: #F8FAFC;
  --lab-surface: #FFFFFF;
  --lab-primary: #0F172A;
  --lab-secondary: #64748B;
  --lab-accent: #3B82F6;
  --lab-accent-purple: #8B5CF6;
  --lab-text: #0F172A;
  --lab-text-light: #94A3B8;
  --lab-text-muted: #64748B;
  --lab-border: #E2E8F0;
  --lab-border-soft: #F1F5F9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--lab-bg);
  color: var(--lab-text);
  font-family: 'Zen Kaku Gothic New', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===== 背景: グリッド + ambient orbs ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(226, 232, 240, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
  background-size: 30px 30px;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 10s ease-in-out infinite;
}

.orb-1 {
  width: min(80vw, 500px);
  height: min(80vw, 500px);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0) 70%);
  top: -20%;
  right: -20%;
}

.orb-2 {
  width: min(80vw, 500px);
  height: min(80vw, 500px);
  background: radial-gradient(circle, rgba(100, 116, 139, 0.2) 0%, rgba(100, 116, 139, 0) 70%);
  bottom: -10%;
  left: -20%;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-30px); }
}

/* ===== ヘッダー ===== */
.site-header {
  position: relative;
  z-index: 1;
  padding: 72px 24px 28px;
  text-align: center;
}

.brand {
  max-width: 600px;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}
.brand:hover { opacity: 0.85; }

.brand-logo {
  display: block;
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 18px;
  opacity: 0.92;
}

.brand-sub {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--lab-text-muted);
  margin-bottom: 8px;
}

.brand-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--lab-primary);
  margin-bottom: 6px;
}

.brand-lead {
  font-size: 12px;
  color: var(--lab-text-muted);
  letter-spacing: 0.06em;
}

/* ===== コンテナ ===== */
.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 18px 80px;
}

/* ===== 一覧（rounds-view）===== */
.rounds {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.round-card {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 16px;
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.12s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.round-card::after {
  content: "→";
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 14px;
  color: var(--lab-text-light);
  transition: color 0.2s, transform 0.2s;
}

.round-card:hover,
.round-card:focus-visible {
  border-color: var(--lab-accent);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.round-card:hover::after { color: var(--lab-accent); transform: translateX(3px); }

.round-card .label {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--lab-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.round-card h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lab-primary);
  line-height: 1.45;
}

.round-card .meta {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--lab-text-muted);
  margin-top: 2px;
}

.round-card .cast {
  font-size: 12.5px;
  color: var(--lab-primary);
  letter-spacing: 0.04em;
  margin-top: 10px;
  line-height: 1.55;
  font-weight: 500;
}

.round-card .count {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--lab-text-muted);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--lab-border-soft);
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.round-card .count .num {
  font-size: 16px;
  color: var(--lab-primary);
  font-weight: 700;
}

/* ===== 回詳細（round-detail-view）===== */
.back-btn {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  color: var(--lab-text-muted);
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 10px 16px;
  margin-bottom: 20px;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

.back-btn:hover {
  border-color: var(--lab-accent);
  color: var(--lab-accent);
}

.round-header {
  border-bottom: 1px solid var(--lab-border);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.round-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--lab-text-muted);
  margin-bottom: 6px;
}

.round-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: var(--lab-primary);
}

.round-meta {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--lab-text-muted);
}

.records {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.record-card {
  background: var(--lab-surface);
  border: 1px solid var(--lab-border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.12s, box-shadow 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.record-card:hover,
.record-card:focus-visible {
  border-color: var(--lab-accent);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.record-card .thumb {
  background: linear-gradient(180deg, #FAFBFC 0%, #F1F5F9 100%);
  border-bottom: 1px solid var(--lab-border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  text-align: center;
  color: var(--lab-text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  min-height: 130px;
}

.record-card .thumb-aka {
  display: block;
  font-family: 'Shippori Mincho', "Hiragino Mincho ProN", serif;
  font-size: 22px;
  color: var(--lab-primary);
  letter-spacing: 0.18em;
  line-height: 1.5;
  font-weight: 500;
}

.record-card .thumb-job {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: var(--lab-text-muted);
  letter-spacing: 0.3em;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--lab-border);
  width: 60%;
  text-transform: uppercase;
}

.record-card .thumb.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      #FAFBFC,
      #FAFBFC 12px,
      #F1F5F9 12px,
      #F1F5F9 13px
    );
  font-style: italic;
  color: var(--lab-text-light);
}

.record-card .body {
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.record-card .nickname {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lab-primary);
}

.record-card .pending {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: var(--lab-text-muted);
  letter-spacing: 0.1em;
}

/* ===== 個別ページ — 旅感（白×明朝、微妙な紙感）===== */
.record-single {
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  background-image:
    radial-gradient(at 14% 6%, rgba(201, 166, 107, 0.05) 0%, transparent 38%),
    radial-gradient(at 86% 94%, rgba(120, 100, 80, 0.04) 0%, transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fbf9f3 100%);
  padding: 48px 32px 56px;
  border: 1px solid var(--lab-border);
  border-radius: 16px;
  font-family: 'Shippori Mincho', "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  color: #1a1a1a;
  position: relative;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 8px 32px rgba(15, 23, 42, 0.06);
}

/* 上下の極細罫線（紙のページ感） */
.record-single::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(25, 22, 35, 0.18), transparent);
}

.record-single::before {
  content: "FIELD RECORD";
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.35em;
  color: rgba(25, 22, 35, 0.4);
}

.record-single .record-head {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(25, 22, 35, 0.12);
  margin-bottom: 26px;
}

.record-single .record-akajob {
  color: #4a4258;
}

.record-single .record-head {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(25, 22, 35, 0.18);
  margin-bottom: 26px;
}

.record-single .record-akajob {
  font-size: 16px;
  color: #3d374e;
  letter-spacing: 0.22em;
  margin-bottom: 10px;
  font-weight: 400;
}

.record-single .record-nickname {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  color: #191623;
  line-height: 1.4;
}

.record-single .record-round {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: rgba(25, 22, 35, 0.55);
  letter-spacing: 0.25em;
}

.record-single .record-story {
  font-size: 15px;
  line-height: 2.0;
  letter-spacing: 0.04em;
  color: #191623;
  white-space: pre-wrap;
  text-align: justify;
}

/* ルーシェからの手紙 */
.record-single .record-letter {
  margin-top: 36px;
}

.record-single .letter-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: rgba(25, 22, 35, 0.45);
}

.record-single .letter-divider::before,
.record-single .letter-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(25, 22, 35, 0.18);
}

.record-single .letter-divider span {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
}

.record-single .letter-body {
  text-align: center;
  color: #4a4258;
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

.record-single .letter-body p {
  margin: 0 0 0.45em;
}

.record-single .letter-signature {
  margin-top: 1.5em;
  text-align: center;
  font-size: 12px;
  color: #4a4258;
  letter-spacing: 0.18em;
}

/* ===== フッター ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--lab-border);
  padding: 24px 24px 32px;
  text-align: center;
  color: var(--lab-text-muted);
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

/* ===== 右上追従バナー ===== */
.ticket-banner {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  border: 1px solid var(--lab-border);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ticket-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}
.ticket-banner-label {
  background: var(--lab-primary);
  color: #ffffff;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ticket-banner-arrow {
  background: var(--lab-surface);
  color: var(--lab-primary);
  border-left: 1px solid var(--lab-border);
  font-size: 12px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== チケットCTA ===== */
.ticket-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--lab-primary);
  border: 1px solid var(--lab-primary);
  color: #ffffff;
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 18px 40px;
  margin: 36px auto 0;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  width: fit-content;
  max-width: calc(100% - 16px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.ticket-cta-btn::after {
  content: "→";
  font-size: 16px;
  transform: translateY(-1px);
}
.ticket-cta-btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.24);
}

/* ===== タブレット〜PC ===== */
@media (min-width: 720px) {
  .container { max-width: 880px; padding: 24px 32px 80px; }
  .site-header { padding: 56px 32px 36px; }
  .brand-logo { width: 280px; }
  .brand-title { font-size: 28px; }
  .rounds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }
  .records {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
  .round-title { font-size: 24px; }
  .record-single { max-width: 820px; padding: 56px 64px 64px; }
  .record-single .record-nickname { font-size: 36px; }
  .record-single .record-story { font-size: 16px; line-height: 2.05; }
  .ticket-banner-label { font-size: 13px; padding: 14px 20px; }
  .ticket-banner-arrow { font-size: 13px; padding: 14px 16px; }
}
