/* ==========================================================
   Coin Map トップページ専用CSS (page-top.php)
   既存のCocoon / cocoon-child-master style.css とは独立
   ========================================================== */

:root {
  --ink: #0b0e14;
  --ink-2: #171d2b;
  --ink-3: #232c40;
  --ink-line: rgba(255,255,255,.10);
  --paper: #f5f6f8;
  --paper-card: #ffffff;
  --line: #e3e6eb;
  --text: #12151c;
  --text-soft: #5b6472;
  --gold: #e8a83c;
  --indigo: #4c6fff;
  --coral: #f0664b;
  --violet: #8b6cf0;
  --teal: #1fa98d;
  --cyan: #3fd0c9;
  --font-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
}

/* ブランド統一のためダークモード自動切替は無効化（常にライト基調） */
:root[data-theme="light"] {
  --paper: #f5f6f8;
  --paper-card: #ffffff;
  --line: #e3e6eb;
  --text: #12151c;
  --text-soft: #5b6472;
}

#page-top-wrap * { box-sizing: border-box; }
#page-top-wrap {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-jp);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#page-top-wrap a { color: inherit; text-decoration: none; }
#page-top-wrap ul { margin: 0; padding: 0; list-style: none; }
#page-top-wrap h1, #page-top-wrap h2, #page-top-wrap h3 { margin: 0; text-wrap: balance; }
#page-top-wrap img, #page-top-wrap svg { display: block; }
#page-top-wrap :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

#page-top-wrap .eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ---------------- HERO ---------------- */
#page-top-wrap .hero {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbf9f6 55%, #f5f1ea 100%);
  color: var(--text);
  overflow: hidden;
  padding-bottom: 190px;
}

#page-top-wrap .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, rgba(11,14,20,.02) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

#page-top-wrap .stars { display: none; }

#page-top-wrap .topbar {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#page-top-wrap .logo {
  display: flex;
  align-items: baseline;
  gap: .45em;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 1.05rem;
}
#page-top-wrap .logo .dot { color: var(--gold); }
#page-top-wrap .topnav {
  display: flex;
  gap: clamp(.9rem, 2vw, 1.6rem);
  font-size: .85rem;
  color: rgba(18,21,28,.72);
}
#page-top-wrap .topnav a { transition: color .15s ease; }
#page-top-wrap .topnav a:hover { color: var(--gold); }

#page-top-wrap .hero-body {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem) 0;
  text-align: center;
}
#page-top-wrap .hero-title {
  font-size: clamp(2rem, 1.15rem + 3.6vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
}
#page-top-wrap .hero-title .accent { color: var(--gold); }
#page-top-wrap .hero-sub {
  margin-top: .9rem;
  color: var(--text-soft);
  font-size: clamp(.95rem, .85rem + .3vw, 1.05rem);
}

#page-top-wrap .search-bar {
  margin: 2.2rem auto 0;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(11,14,20,.04);
  border-radius: 999px;
  padding: .4rem .4rem .4rem 1.25rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
#page-top-wrap .search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232,168,60,.15);
}
#page-top-wrap .search-bar svg { flex: none; opacity: .6; }
#page-top-wrap .search-bar input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: .95rem;
  padding: .7rem 0;
  min-width: 0;
}
#page-top-wrap .search-bar input::placeholder { color: var(--text-soft); opacity: .7; }
#page-top-wrap .search-bar input:focus { outline: none; }
#page-top-wrap .search-bar button {
  flex: none;
  background: var(--gold);
  color: #1a1102;
  border: 0;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: .9rem;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
#page-top-wrap .search-bar button:hover { filter: brightness(1.08); transform: translateY(-1px); }

#page-top-wrap .ticker {
  margin: 1.6rem auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
}
#page-top-wrap .ticker-chip {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .9rem;
  background: #ffffff;
}

/* ---------------- SKYLINE (pixel city) ---------------- */
#page-top-wrap .skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding: 0 4%;
  pointer-events: none;
}
#page-top-wrap .bldg {
  position: relative;
  flex: 0 0 auto;
  background-color: var(--ink-2);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 9px);
}
#page-top-wrap .b1 { width: 46px; height: 108px; }
#page-top-wrap .b2 { width: 66px; height: 162px; }
#page-top-wrap .b3 { width: 40px; height: 86px; }
#page-top-wrap .b4 { width: 84px; height: 200px; background-color: var(--ink-3); }
#page-top-wrap .b5 { width: 56px; height: 132px; }
#page-top-wrap .b6 { width: 36px; height: 74px; }
#page-top-wrap .b7 { width: 62px; height: 150px; }
#page-top-wrap .b8 { width: 48px; height: 118px; }
#page-top-wrap .lit {
  position: absolute;
  width: 5px; height: 5px;
  background: var(--gold);
}
#page-top-wrap .lit.cyan { background: var(--cyan); }

@media (prefers-reduced-motion: no-preference) {
  #page-top-wrap .lit { animation: cm-twinkle 4.5s ease-in-out infinite; }
  #page-top-wrap .lit:nth-child(2) { animation-delay: 1.1s; }
  #page-top-wrap .lit:nth-child(3) { animation-delay: 2.3s; }
}
@keyframes cm-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (max-width: 640px) {
  #page-top-wrap .skyline { height: 130px; }
  #page-top-wrap .b2, #page-top-wrap .b4, #page-top-wrap .b7 { height: 150px; }
  #page-top-wrap .b1, #page-top-wrap .b3, #page-top-wrap .b5, #page-top-wrap .b6, #page-top-wrap .b8 { height: 90px; }
  #page-top-wrap .hero { padding-bottom: 130px; }
  #page-top-wrap .topnav { display: none; }
}

/* ---------------- MAIN / SECTIONS ---------------- */
#page-top-wrap main {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem) 0;
}

#page-top-wrap .section { --accent: var(--gold); margin-bottom: clamp(3rem, 6vw, 4.5rem); }
#page-top-wrap .section-exchange { --accent: var(--gold); }
#page-top-wrap .section-wallet { --accent: var(--indigo); }
#page-top-wrap .section-card { --accent: var(--teal); }
#page-top-wrap .section-news { --accent: var(--coral); }
#page-top-wrap .section-tools { --accent: var(--violet); }

#page-top-wrap .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .9rem;
  margin-bottom: 1.5rem;
}
#page-top-wrap .section-head .eyebrow { color: var(--accent); }
#page-top-wrap .section-title { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); font-weight: 800; margin-top: .25rem; }
#page-top-wrap .section-count {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-soft);
  white-space: nowrap;
}

#page-top-wrap .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
#page-top-wrap .card-grid.single {
  grid-template-columns: minmax(260px, 420px);
}

#page-top-wrap .card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
#page-top-wrap .card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 45%, transparent);
}

#page-top-wrap .badge {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
}
#page-top-wrap .badge svg { width: 22px; height: 22px; stroke: #fff; }

#page-top-wrap .card h3 { font-size: 1.02rem; font-weight: 700; }
#page-top-wrap .card-list { margin-top: .8rem; display: flex; flex-direction: column; gap: .45rem; }
#page-top-wrap .card-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--text-soft);
  padding: .3rem 0;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}
#page-top-wrap .card-list a:hover {
  color: var(--text);
  border-color: var(--line);
}
#page-top-wrap .card-list a .arrow { opacity: 0; transform: translateX(-3px); transition: all .15s ease; color: var(--accent); }
#page-top-wrap .card-list a:hover .arrow { opacity: 1; transform: translateX(0); }

#page-top-wrap .card-list a { min-height: 44px; }
#page-top-wrap .card-list a .brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
#page-top-wrap .brand-logo { flex: none; height: 28px; max-width: 150px; display: flex; align-items: center; }
#page-top-wrap .brand-logo img { display: block; height: 100%; width: auto; max-width: 150px; object-fit: contain; border-radius: 5px; }
#page-top-wrap .brand-logo.on-dark { background: var(--ink); padding: 4px; border-radius: 7px; box-sizing: border-box; }
#page-top-wrap .brand-logo.on-dark img { border-radius: 3px; }
#page-top-wrap .card-list a .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }

/* ---------------- ARTICLES (自社記事フィード) ---------------- */
#page-top-wrap .articles {
  border-top: 1px solid var(--line);
}
#page-top-wrap .article-row {
  display: grid;
  grid-template-columns: 92px 1fr 96px 20px;
  align-items: start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s ease;
}
#page-top-wrap .article-row:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
#page-top-wrap .article-tag {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: .25rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: .1rem;
}
#page-top-wrap .article-title {
  display: block;
  font-weight: 700;
  font-size: .98rem;
  color: var(--text);
  transition: color .15s ease;
}
#page-top-wrap .article-row:hover .article-title { color: var(--accent); }
#page-top-wrap .article-excerpt {
  display: block;
  margin-top: .35rem;
  font-size: .82rem;
  color: var(--text-soft);
  max-width: 62ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-top-wrap .article-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
  white-space: nowrap;
  margin-top: .2rem;
}
#page-top-wrap .article-arrow {
  opacity: 0;
  transform: translateX(-3px);
  transition: all .15s ease;
  color: var(--accent);
  margin-top: .1rem;
}
#page-top-wrap .article-row:hover .article-arrow { opacity: 1; transform: translateX(0); }
#page-top-wrap .article-empty {
  padding: 1.5rem 0;
  color: var(--text-soft);
  font-size: .9rem;
}

#page-top-wrap .view-all {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.25rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--accent);
}
#page-top-wrap .view-all .arrow { transition: transform .15s ease; }
#page-top-wrap .view-all:hover .arrow { transform: translateX(3px); }

@media (max-width: 640px) {
  #page-top-wrap .article-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
  #page-top-wrap .article-tag { order: 0; }
  #page-top-wrap .article-main { order: 1; }
  #page-top-wrap .article-date { order: 2; }
  #page-top-wrap .article-arrow { display: none; }
  #page-top-wrap .article-excerpt { white-space: normal; }
}

/* ---------------- FOOTER ---------------- */
#page-top-wrap footer {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}
#page-top-wrap .footer-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
}
#page-top-wrap .footer-in .logo { color: var(--text); }
#page-top-wrap .disclaimer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) 2.2rem;
  font-size: .74rem;
  line-height: 1.9;
  color: var(--text-soft);
  opacity: .75;
}
