@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;600;700;800&family=Noto+Serif+JP:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Day One × GolfShot Light × Things 3 系: 紙質感オフホワイト + 木色 */
  --bg: #faf8f3;
  --bg-soft: #f4efe6;
  --surface: #ffffff;
  --surface-2: #f7f3ea;
  --border: #e6dfd0;
  --border-soft: #efe9dc;
  --border-strong: #d4ccb8;
  --text: #1c1917;
  --text-soft: #44403c;
  --text-mute: #78716c;
  --accent: #a16d3a;          /* モルックの木色（深め、紙の上で読める） */
  --accent-hover: #845830;
  --accent-light: #c89868;
  --accent-soft: rgba(161, 109, 58, 0.08);
  --accent-glow: rgba(161, 109, 58, 0.18);
  --win: #15803d;
  --lose: #b91c1c;
  --draw: #78716c;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.011em;
  margin: 0;
}

.font-mono {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-feature-settings: 'zero', 'cv01';
}

.font-serif {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-feature-settings: 'ss01';
}

a { color: inherit; }
button { font-family: inherit; }

/* === Layout === */
.container-app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.app-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.012em;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo svg { color: var(--accent); }

.nav-link {
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover { color: var(--text); }

/* === Hero stats === */
.hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat {
  position: relative;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border-strong);
}
.stat.stat-accent { border-top-color: var(--accent); }

.stat-value {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-accent .stat-value { color: var(--accent); }

.stat-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 10px;
}

/* === Section === */
.section { padding: 32px 0 48px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* === Tournament list (日記タイムライン風) === */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.18s;
}
.timeline-item:first-child { border-top: none; }
.timeline-item:hover { opacity: 0.62; }

.timeline-date {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding-top: 4px;
}
.timeline-date .day {
  display: block;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-top: 2px;
}

.timeline-body { min-width: 0; padding-top: 6px; }

.timeline-title {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.timeline-meta {
  font-size: 12px;
  color: var(--text-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.timeline-meta .dot { color: var(--border-strong); }
.timeline-meta .record {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-soft);
}

.rank-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 5px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(161, 109, 58, 0.3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-top: 6px;
}
.rank-pill .num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-right: 1px;
}

/* === Empty === */
.empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-mute);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
}
.empty-title {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 12px;
  color: var(--text-mute);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover:not(:disabled) {
  background: #2a2520;
  border-color: #2a2520;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-soft);
  border-color: var(--border-strong);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
}

.btn-link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-mute);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.btn-link:hover { color: var(--text); }

.btn-danger { color: var(--lose); }
.btn-danger:hover { color: #991b1b; }

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 20px; font-size: 14px; }

/* === Form === */
.field { margin-bottom: 22px; }
.field-row { display: grid; gap: 12px; }
.field-row-2 { grid-template-columns: 1fr 1fr; }

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 8px;
  letter-spacing: 0.005em;
}

.input,
.textarea,
.select {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: -0.005em;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder, .textarea::placeholder { color: #a8a29e; }

.help {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
}

/* === Segmented control === */
.segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.segment-3 { grid-template-columns: repeat(3, 1fr); }
.segment input { display: none; }
.segment label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 11px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mute);
  transition: all 0.15s;
  text-align: center;
}
.segment label:hover { color: var(--text-soft); }
.segment input:checked + label {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06), 0 0 0 1px var(--border-strong);
}
.segment label .seg-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-mute);
  letter-spacing: 0.01em;
  margin-top: 2px;
}
.segment input:checked + label .seg-sub { color: var(--text-soft); }

.segment-wl input:checked + label[data-wl="win"] {
  background: rgba(21, 128, 61, 0.06);
  color: var(--win);
  box-shadow: 0 1px 2px rgba(21, 128, 61, 0.08), 0 0 0 1px rgba(21, 128, 61, 0.35);
}
.segment-wl input:checked + label[data-wl="lose"] {
  background: rgba(185, 28, 28, 0.06);
  color: var(--lose);
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.08), 0 0 0 1px rgba(185, 28, 28, 0.35);
}
.segment-wl input:checked + label[data-wl="draw"] {
  background: rgba(120, 113, 108, 0.06);
  color: var(--draw);
  box-shadow: 0 1px 2px rgba(120, 113, 108, 0.08), 0 0 0 1px rgba(120, 113, 108, 0.35);
}

/* === Segment 2x2 grid === */
.segment-grid-2 {
  grid-template-columns: 1fr 1fr;
}

/* === Opponent block === */
.opponent-block {
  margin-top: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.opponent-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.opponent-block .field:last-child { margin-bottom: 0; }

/* === Score row === */
.score-row {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.score-cell {
  flex: 1;
  min-width: 0;
}
.score-cell .label-mini {
  font-size: 10px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.score-num {
  text-align: center !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-variant-numeric: tabular-nums;
  padding: 12px 6px !important;
  letter-spacing: -0.025em;
}

/* === Checkbox === */
.checkbox-row { margin-top: 14px; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* === Set rows === */
.set-row {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.set-row .set-cell { flex: 1; min-width: 0; }
.set-row .set-label { flex: 0 0 auto; min-width: 80px; }
.set-row .remove-set { flex: 0 0 auto; }
.set-label {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding-bottom: 12px;
  font-style: italic;
}
.set-row .label-mini {
  font-size: 10px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.set-row .score-num {
  font-size: 22px !important;
  padding: 10px 4px !important;
}
.remove-set {
  font-size: 11px !important;
  color: var(--text-mute) !important;
  padding-bottom: 14px !important;
}
.remove-set:hover { color: var(--lose) !important; }

/* === Format tag (in entry) === */
.format-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(161, 109, 58, 0.25);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* === Multiple opponents in entry === */
.entry-opponents { display: flex; flex-direction: column; gap: 8px; }
.entry-opponent { padding-left: 0; }

/* === Score dash === */
.score-dash {
  color: var(--text-mute);
  margin: 0 8px;
  font-weight: 300;
}

/* === Set details in entry === */
.set-detail-block {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.set-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.set-detail-label {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-style: italic;
  color: var(--text-mute);
  font-size: 12px;
}
.set-detail-score {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.015em;
}

/* === Score input === */
.score-input {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.score-input .label-mini {
  font-size: 10px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.score-input input {
  text-align: center;
  font-size: 38px;
  font-weight: 600;
  font-family: 'Source Serif 4', Georgia, serif;
  font-variant-numeric: tabular-nums;
  padding: 14px 8px;
  letter-spacing: -0.025em;
}
.score-input .dash {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 30px;
  font-weight: 300;
  color: var(--text-mute);
  padding-bottom: 22px;
}

/* === Tournament header === */
.tournament-head {
  padding: 40px 0 32px;
}
.tournament-eyebrow {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 13px;
  color: var(--text-mute);
  font-style: italic;
  margin-bottom: 8px;
  letter-spacing: 0.005em;
}
.tournament-title {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 14px;
}
.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--text-mute);
}
.tournament-stats {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}
.tournament-stats .stat-mini {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tournament-stats .stat-mini-value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tournament-stats .stat-mini-label {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.tournament-stats .stat-mini-win .stat-mini-value { color: var(--win); }
.tournament-stats .stat-mini-lose .stat-mini-value { color: var(--lose); }
.tournament-stats .stat-mini-rate .stat-mini-value { color: var(--accent); }

.note {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent-light);
  border-radius: 8px;
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
  white-space: pre-wrap;
  font-style: italic;
}

/* === Form heading === */
.form-eyebrow {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 14px;
  color: var(--text-mute);
  font-style: italic;
  margin-bottom: 8px;
}
.form-eyebrow-name {
  color: var(--text-soft);
  font-style: normal;
  font-weight: 600;
}
.form-title {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
}
.form-section {
  margin-bottom: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.form-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.form-section-help {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-mute);
  line-height: 1.7;
  margin: -6px 0 16px;
}
.form-section-help strong {
  color: var(--text-soft);
  font-weight: 600;
  font-style: normal;
}

.recap-textarea {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -0.005em;
  padding: 16px 18px;
  min-height: 200px;
  background: var(--surface);
}
.recap-textarea::placeholder {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-style: italic;
  line-height: 1.75;
}

/* === Match Entry (日記の1ページ風) === */
.entry {
  padding: 24px 0 28px;
  border-top: 1px solid var(--border-soft);
}
.entry:first-child {
  border-top: none;
  padding-top: 0;
}

.entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.entry-head-main {
  flex: 1;
  min-width: 0;
}

.entry-round {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 12px;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.entry-round-mute {
  color: var(--text-mute);
}

.entry-vs {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 6px;
}
.entry-vs .vs-prefix {
  color: var(--text-mute);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-style: italic;
  margin-right: 4px;
}
.entry-members {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: -0.005em;
}

.entry-result {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.entry-score {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.entry-recap {
  margin-top: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent-light);
  border-radius: 8px;
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.85;
  white-space: pre-wrap;
  letter-spacing: -0.003em;
}

.entry-foot {
  margin-top: 14px;
  display: flex;
  gap: 16px;
}
.entry-foot a,
.entry-foot button {
  font-size: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-mute);
  text-decoration: none;
  padding: 0;
  font-family: inherit;
  font-weight: 500;
}
.entry-foot a:hover, .entry-foot button:hover { color: var(--text); }
.entry-foot .danger:hover { color: var(--lose); }

/* === Match item (旧。残しておく場合用) === */
.match {
  padding: 18px 0;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 16px;
  align-items: center;
}
.match:first-child { border-top: none; }
.match-num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  font-style: italic;
}
.match-vs {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.match-vs .vs-prefix {
  color: var(--text-mute);
  margin-right: 6px;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: italic;
}
.match-members {
  font-size: 12px;
  color: var(--text-mute);
}
.match-result {
  display: flex;
  align-items: center;
  gap: 14px;
}
.match-score {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  color: var(--text);
}
.match-wl {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid;
}
.match-wl-win { background: rgba(21, 128, 61, 0.06); color: var(--win); border-color: rgba(21, 128, 61, 0.28); }
.match-wl-lose { background: rgba(185, 28, 28, 0.06); color: var(--lose); border-color: rgba(185, 28, 28, 0.28); }
.match-wl-draw { background: rgba(120, 113, 108, 0.06); color: var(--draw); border-color: rgba(120, 113, 108, 0.28); }

.match-actions {
  margin-top: 8px;
  display: flex;
  gap: 14px;
}
.match-actions button,
.match-actions a {
  font-size: 11px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-mute);
  text-decoration: none;
  padding: 0;
  font-family: inherit;
  font-weight: 500;
}
.match-actions button:hover, .match-actions a:hover { color: var(--text); }
.match-actions .danger:hover { color: var(--lose); }

.match-note {
  grid-column: 2 / -1;
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  white-space: pre-wrap;
  line-height: 1.7;
  font-style: italic;
}

/* === Login page === */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 800px 500px at 50% 0%, rgba(161, 109, 58, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 600px 400px at 50% 100%, rgba(161, 109, 58, 0.04) 0%, transparent 60%),
    var(--bg);
}
.login-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 18px;
  margin-bottom: 30px;
  color: var(--accent);
  box-shadow: 0 12px 32px -12px var(--accent-glow), 0 1px 2px rgba(28, 25, 23, 0.04);
}
.login-title {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.login-sub {
  font-family: 'Source Serif 4', 'Noto Serif JP', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--text-mute);
  margin: 0 0 32px;
  letter-spacing: 0;
}
.btn-google {
  background: var(--text);
  color: var(--bg);
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--text);
}
.btn-google:hover:not(:disabled) {
  background: #2a2520;
  border-color: #2a2520;
}
.login-foot {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-mute);
}

/* === Settings === */
.settings-section { margin-bottom: 40px; }
.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  object-fit: cover;
  background: var(--bg-soft);
}
.account-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.account-email {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.player-row:first-child { border-top: none; }
.player-row .name { font-size: 14px; font-weight: 500; }

/* === Misc === */
.divider { height: 1px; background: var(--border-soft); margin: 28px 0; }

.fab-container {
  position: sticky;
  bottom: 24px;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  margin-top: 24px;
}
.fab {
  pointer-events: auto;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow:
    0 14px 36px -8px var(--accent-glow),
    0 2px 6px rgba(28, 25, 23, 0.06);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: transform 0.18s, box-shadow 0.18s;
}
.fab:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow:
    0 18px 40px -8px var(--accent-glow),
    0 4px 8px rgba(28, 25, 23, 0.08);
}

@media (max-width: 480px) {
  .stats { gap: 14px; }
  .timeline-item { grid-template-columns: 60px 1fr auto; gap: 14px; padding: 20px 0; }
  .timeline-date .day { font-size: 24px; }
  .timeline-title { font-size: 17px; }
  .field-row-2 { grid-template-columns: 1fr; }
  .match { grid-template-columns: 28px 1fr auto; gap: 10px; }
}
