/* -------------------------------------------------
   Easy Running Modern Style with Dark Mode
   Ver.2025-11-07
   ------------------------------------------------- */

/* ========== CSS Variables ========== */
:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #f0f4f8;
  --text-primary: #1a202c;
  --text-secondary: #2d3748;
  --text-muted: #718096;
  --accent-primary: #5b8fd8;
  --accent-secondary: #4a7fc0;
  --accent-hover: #3d6ba8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 6px 12px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 10px 20px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
  --table-odd: #ffffff;
  --table-even: #f7fafc;
  --table-header: #e2e8f0;
  --table-body-th: #f0f4f8;
  --nav-bg: rgba(255, 255, 255, 0.98);
  --backdrop: rgba(0, 0, 0, 0.5);
}

/* Dark Mode Colors */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-gradient-start: #1a202c;
    --bg-gradient-end: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --accent-primary: #6fa3e8;
    --accent-secondary: #5b8fd8;
    --accent-hover: #8bb9f0;
    --border-color: #4a5568;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 8px 16px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.7), 0 6px 12px rgba(0, 0, 0, 0.5);
    --table-odd: #2d3748;
    --table-even: #374151;
    --table-header: #374151;
    --table-body-th: #334155;
    --nav-bg: rgba(45, 55, 72, 0.98);
    --backdrop: rgba(0, 0, 0, 0.7);
  }
}

/* Manual Dark Mode Toggle Support */
[data-theme="dark"] {
  --bg-primary: #1a202c;
  --bg-secondary: #2d3748;
  --bg-gradient-start: #1a202c;
  --bg-gradient-end: #2d3748;
  --text-primary: #f7fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #a0aec0;
  --accent-primary: #6fa3e8;
  --accent-secondary: #5b8fd8;
  --accent-hover: #8bb9f0;
  --border-color: #4a5568;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 16px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 24px rgba(0, 0, 0, 0.7), 0 6px 12px rgba(0, 0, 0, 0.5);
  --table-odd: #2d3748;
  --table-even: #374151;
  --table-header: #374151;
  --table-body-th: #334155;
  --nav-bg: rgba(45, 55, 72, 0.98);
  --backdrop: rgba(0, 0, 0, 0.7);
}

/* ========== Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Maru Gothic W4 JIS2004", "游ゴシック体", "Yu Gothic", "Hiragino Sans", sans-serif;
  line-height: 1.9;
  font-size: 1.0rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ========== Header ========== */
header {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  padding: 3rem 1rem 2.5rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

header h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-family: "Shin Go Medium", "Hiragino Sans", "游ゴシック体", "Yu Gothic", "メイリオ", sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
}

.site-name {
  display: block;
  font-size: clamp(1.0rem, 3vw, 1.3rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

/* ========== Dark Mode Toggle Button ========== */
.theme-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  background: var(--nav-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(20deg);
}

/* ========== Navigation ========== */
#main-nav {
  text-align: center;
  margin: 2rem auto;
  padding: 0 1rem;
}

#main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#main-nav ul li {
  margin: 0;
}

#main-nav ul li a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

#main-nav ul li a:hover {
  background: var(--bg-primary);
  color: var(--accent-hover);
  border-color: var(--border-color);
}

/* ========== Hamburger Menu ========== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 60px;
  cursor: pointer;
  z-index: 1100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--nav-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding-bottom: 4px;
}

.menu-toggle:hover {
  box-shadow: var(--shadow-lg);
}

.menu-toggle::before {
  content: "MENU";
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.menu-toggle.active::before {
  content: "CLOSE";
  color: var(--accent-primary);
  font-weight: 700;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.35s ease;
}

.menu-toggle span:not(:last-child) {
  margin-bottom: 5px;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== Mobile Navigation ========== */
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: flex !important;
  }

  header {
    padding-top: 80px !important;
  }

  header h1 {
    text-align: left !important;
    margin-left: 15px !important;
    padding-right: 70px !important;
  }

  #main-nav {
    position: fixed !important;
    top: 0 !important;
    right: -280px !important;
    width: 280px !important;
    height: 100% !important;
    background: var(--nav-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-left: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    z-index: 1000 !important;
    margin: 0 !important;
    padding-top: 80px !important;
    overflow-y: auto !important;
    transition: right 0.3s ease !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  #main-nav.active {
    right: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #main-nav ul {
    flex-direction: column !important;
    gap: 0 !important;
  }

  #main-nav ul li {
    border-bottom: 1px solid var(--border-color) !important;
  }

  #main-nav ul li a {
    display: block !important;
    padding: 1.2rem 1.5rem !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  #main-nav ul li a:hover {
    background: var(--accent-primary) !important;
    color: white !important;
    transform: none !important;
  }

  #main-nav ul li a,
  #main-nav ul li a:focus,
  #main-nav ul li a:active {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: var(--backdrop);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .menu-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ========== Article ========== */
article {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--bg-primary);
  padding: 3rem 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s ease;
}

article:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

article a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

article a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

#time {
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

#time .author {
  font-weight: 600;
  color: var(--text-primary);
}

/* ========== Typography ========== */
h2, h3, h4 {
  font-family: "Shin Go Medium", "Hiragino Sans", "游ゴシック体", "Yu Gothic", "メイリオ", sans-serif;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1.25rem;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent-primary);
  background: linear-gradient(90deg, var(--accent-primary) 0%, transparent 100%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  color: var(--text-primary);
  position: relative;
  transition: all 0.3s ease;
  font-weight: 600;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent-hover);
  transition: width 0.3s ease;
}

h2:hover::before {
  width: 100%;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  padding: 0.5rem 0 0.5rem 1rem;
  margin-bottom: 1.25rem;
  background: transparent;
  border-left: 3px solid var(--accent-primary);
  transition: all 0.3s ease;
  position: relative;
  font-weight: 600;
}

h3::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--accent-hover);
  transition: height 0.3s ease;
}

h3:hover {
  padding-left: 1.25rem;
  color: var(--accent-primary);
}

h3:hover::after {
  height: 100%;
}

h4 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-primary);
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

h4:hover {
  border-left-color: var(--accent-hover);
  padding-left: 1rem;
}

p {
  margin: 1.25rem 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========== Lists ========== */
/* 箇条書きリスト（ナビゲーション除外） */
article ul {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

article ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.8;
  transition: transform 0.2s ease;
}

article ul li::before {
  content: "▸";
  position: absolute;
  left: 0.5rem;
  color: var(--accent-primary);
  font-size: 1.1em;
  font-weight: bold;
  transition: transform 0.3s ease;
}

article ul li:hover {
  transform: translateX(4px);
}

article ul li:hover::before {
  transform: scale(1.2);
  color: var(--accent-hover);
}

/* ネストされたリスト */
article ul ul {
  margin: 0.5rem 0;
}

article ul ul li::before {
  content: "◦";
  font-size: 1.2em;
}

/* 番号付きリスト */
article ol {
  list-style: none;
  counter-reset: item;
  padding-left: 0;
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

article ol li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1.8;
  counter-increment: item;
  transition: transform 0.2s ease;
}

article ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85em;
  transition: all 0.3s ease;
}

article ol li:hover {
  transform: translateX(4px);
}

article ol li:hover::before {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* ネストされた番号付きリスト */
article ol ol {
  margin: 0.5rem 0;
}

article ol ol li::before {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

/* 定義リスト */
article dl {
  margin: 1.5rem 0;
  color: var(--text-secondary);
}

article dt {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-primary);
  font-size: 1.05em;
  transition: all 0.3s ease;
}

article dt:first-child {
  margin-top: 0;
}

article dt:hover {
  border-left-color: var(--accent-hover);
  padding-left: 1.25rem;
}

article dd {
  margin-left: 2rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  line-height: 1.8;
  border-left: 2px solid var(--border-color);
  color: var(--text-secondary);
}

article dd:last-child {
  margin-bottom: 0;
}


/* ========== Blockquote ========== */
blockquote {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-primary);
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  font-style: italic;
  color: var(--text-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

blockquote footer {
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: normal;
}

/* ========== Code Block ========== */
pre {
  background: var(--bg-secondary);
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

code {
  background: var(--bg-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Courier New", monospace;
  font-size: 0.9em;
  color: var(--accent-primary);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* ========== Images ========== */
.photo img,
article img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 1.0rem 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo img:hover,
article img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ========== Horizontal Rule ========== */
hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 2.5rem 0;
}

/* ========== Table ========== */
.table-wrapper {
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.table-wrapper::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 5px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.table-wrapper table {
  width: 100%;
  border-spacing: 0;
  white-space: nowrap;
}

.table-wrapper table tr:nth-child(odd) {
  background: var(--table-odd);
}

.table-wrapper table tr:nth-child(even) {
  background: var(--table-even);
}

.table-wrapper table tr:hover {
  background: var(--accent-primary);
  color: white;
}

.table-wrapper table th,
.table-wrapper table td {
  min-width: 5rem;
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.table-wrapper table th {
  background: var(--table-header);
  font-weight: 700;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-wrapper table tbody th {
  position: sticky;
  left: 0;
  background: var(--table-body-th);
  font-weight: 600;
  z-index: 9;
}

.table-wrapper table thead th:first-child {
  left: 0;
  z-index: 11;
}

.table-wrapper table :is(th.japanese-text, td.japanese-text) {
  text-align: left;
  min-width: 5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ========== Footer ========== */
footer {
  text-align: center;
  margin: 3rem 0;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent-hover);
}

footer hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 2rem auto;
  max-width: 600px;
}

/* ========== Responsive ========== */
@media screen and (max-width: 768px) {
  article {
    margin: 1rem;
    padding: 2rem 1.5rem;
    border-radius: 12px;
  }

  .table-wrapper table th,
  .table-wrapper table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media screen and (max-width: 640px) {
  body {
    font-size: 0.95rem;
  }

  article {
    padding: 1.5rem 1rem;
  }
}

/* ========== Access Counter ========== */
.access-counter {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
}

.access-counter p {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  height: 50px;
  padding: 0 20px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.access-counter:hover p {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  background: var(--bg-secondary);
}

.counter-number {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: "SF Mono", "Monaco", "Courier New", monospace;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.access-counter:hover .counter-number {
  color: var(--accent-primary);
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .access-counter {
    bottom: 20px;
    left: 20px;
  }
  
  .access-counter p {
    min-width: 70px;
    height: 45px;
    padding: 0 15px;
    opacity: 0.9;
  }
  
  .counter-number {
    font-size: 1.1rem;
  }
  
  /* タッチデバイス用のホバー効果を調整 */
  .access-counter:active p {
    transform: scale(0.95);
  }
}

/* ========== Scroll to Top Button ========== */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(100px);
}

#scroll-to-top.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

#scroll-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

#scroll-to-top svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* モバイル用の調整（906-917行目を以下に置き換え） */
@media screen and (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;  /* 少し小さめに調整 */
    height: 45px;  /* 少し小さめに調整 */
    opacity: 0.9;  /* 少し透明度を追加 */
  }
  
  #scroll-to-top.show {
    display: flex !important;
    opacity: 0.9 !important;  /* モバイルでの表示を確実にする */
  }
  
  /* タッチデバイス用のホバー効果を調整 */
  #scroll-to-top:active {
    background: var(--accent-hover);
    transform: scale(0.95);
  }
}

/* ========== Footer address の改行をPCでは半角スペースに置換 ========== */
address br {
  display: none;               /* 改行自体を非表示にする */
}

address::after {
  content: " ";                /* 代わりに半角スペースを入れる*/
  white-space: pre;            /* 連続スペースでも潰れないようにする*/
}

/* 768px以下（スマホ・タブレット）のときは従来通り改行させる */
@media screen and (max-width: 768px) {
  address br {
    display: inline;           /* スマホでは<br>を有効に戻す*/
  }
  address::after {
    content: none;             /* ::afterの半角スペースを消す*/
  }
}

/* ========== スマホ時：大会参加記・練習記の<time>後に改行（リンク色もキープ） ========== */
@media screen and (max-width: 768px) {
  #race + ul li,
  #practice-notes + ul li {
    display: flex;
    flex-direction: column;     /* 日付とタイトルを縦に */
    gap: 0.4rem;
    margin-bottom: 1.2rem;
  }

  /* 日付部分 */
  #race + ul li time,
  #practice-notes + ul li time {
    display: block;
    font-size: 0.94rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  /* リンク部分 ← ここを修正！ */
  #race + ul li a,
  #practice-notes + ul li a {
    color: var(--accent-primary) !important;   /* 青を強制 */
    font-weight: 600;
    font-size: 1.0rem;
    line-height: 1.4;
    text-decoration: none;
  }

  /* ホバー時もちゃんと色が変わるように */
  #race + ul li a:hover,
  #practice-notes + ul li a:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline;
  }
}

