/* =========================================
   remaketop-sp.css
   tousiportal.jp トップページ専用・スマホ最適化
   既存CSSを壊さず、.remaketop-sp 配下だけ上書き
   ========================================= */

@media (max-width: 768px) {

  /* =========================
     全体設計
     ========================= */
  .remaketop-sp {
    --remaketop-sp-gap-xs: 6px;
    --remaketop-sp-gap-sm: 8px;
    --remaketop-sp-gap-md: 10px;
    --remaketop-sp-gap-lg: 12px;
    --remaketop-sp-gap-xl: 14px;

    --remaketop-sp-radius-sm: 10px;
    --remaketop-sp-radius-md: 12px;
    --remaketop-sp-radius-lg: 14px;

    --remaketop-sp-text-xs: 0.72rem;
    --remaketop-sp-text-sm: 0.78rem;
    --remaketop-sp-text-md: 0.84rem;
    --remaketop-sp-text-base: 0.88rem;
    --remaketop-sp-text-lg: 0.95rem;
    --remaketop-sp-text-xl: 1.06rem;
    --remaketop-sp-text-hero: 1.22rem;

    --remaketop-sp-line-tight: 1.38;
    --remaketop-sp-line-base: 1.55;
    --remaketop-sp-line-loose: 1.68;

    --remaketop-sp-shadow: 0 4px 12px rgba(18, 40, 72, 0.08);
    --remaketop-sp-shadow-hover: 0 8px 18px rgba(18, 40, 72, 0.1);

    --remaketop-sp-border: #d9e3ec;
    --remaketop-sp-text: #223548;
    --remaketop-sp-muted: #5b6b79;

    --remaketop-sp-securities: #0653a6;
    --remaketop-sp-securities-bg: #eef6ff;

    --remaketop-sp-fx: #1f7a5a;
    --remaketop-sp-fx-bg: #eefaf5;

    --remaketop-sp-crypto: #7a46b8;
    --remaketop-sp-crypto-bg: #f5f0ff;

    --remaketop-sp-gold: #9a7422;
    --remaketop-sp-gold-bg: #fff8e8;

    --remaketop-sp-beginner: #0b6fb8;
    --remaketop-sp-beginner-bg: #eef7ff;
  }

  .remaketop-sp {
    font-size: 16px;
  }

  .remaketop-sp p,
  .remaketop-sp li,
  .remaketop-sp a,
  .remaketop-sp span,
  .remaketop-sp small {
    font-size: var(--remaketop-sp-text-base);
    line-height: var(--remaketop-sp-line-loose);
  }

  .remaketop-sp .anime-item {
    margin: 0.45rem 0 0.55rem;
    padding: 0.72rem 0.72rem;
    border-radius: var(--remaketop-sp-radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .remaketop-sp .anime-item:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .remaketop-sp .top-section {
    margin: 0.55rem 0 0.75rem;
    scroll-margin-top: 72px;
  }

  .remaketop-sp .top-section__head {
    margin-bottom: var(--remaketop-sp-gap-sm);
  }

  .remaketop-sp .top-section__title,
  .remaketop-sp .anime-title,
  .remaketop-sp .top-nav-title {
    font-size: var(--remaketop-sp-text-lg);
    line-height: 1.42;
    margin-bottom: var(--remaketop-sp-gap-sm);
    padding-left: 9px;
    border-left-width: 4px;
  }

  .remaketop-sp .top-sub-title {
    margin: 0.9rem 0 0.55rem;
    padding: 6px 10px;
    font-size: var(--remaketop-sp-text-md);
    line-height: 1.42;
    border-left-width: 4px;
    border-radius: 8px;
  }

  /* =========================
     Hero
     ========================= */
  .remaketop-sp .top-hero {
    padding: 12px;
    border-radius: var(--remaketop-sp-radius-lg);
  }

  .remaketop-sp .top-hero__inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .remaketop-sp .top-hero__eyebrow {
    min-height: 24px;
    margin-bottom: 8px;
    padding: 0.16rem 0.58rem;
    font-size: var(--remaketop-sp-text-xs);
  }

  .remaketop-sp .top-hero__title {
    max-width: 100%;
    font-size: var(--remaketop-sp-text-hero);
    line-height: 1.28;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  .remaketop-sp .top-hero__lead {
    margin-top: 10px;
    font-size: var(--remaketop-sp-text-base);
    line-height: 1.62;
    color: #2a3f56;
  }

  .remaketop-sp .top-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .remaketop-sp .top-button {
    min-height: 42px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    font-size: var(--remaketop-sp-text-md);
    line-height: 1.2;
  }

  .remaketop-sp .top-hero__actions .top-button--secondary {
    min-width: 0;
  }

  /* =========================
     Hero trust
     ========================= */
  .remaketop-sp .top-hero__trust {
    margin-top: 10px;
  }

  .remaketop-sp .top-hero__trust-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .remaketop-sp .top-hero__trust-item {
    min-height: auto;
    padding: 10px 10px 9px;
    gap: 5px;
    border-radius: 11px;
    box-shadow: none;
  }

  .remaketop-sp .top-hero__trust-label {
    min-height: 20px;
    padding: 0 8px;
    font-size: 0.64rem;
    font-weight: 800;
  }

  .remaketop-sp .top-hero__trust-text {
    font-size: 0.74rem;
    line-height: 1.36;
    font-weight: 700;
  }

  /* =========================
     Hero proof
     ========================= */
  .remaketop-sp .top-proof {
    margin: 10px 0 12px;
    padding: 10px 11px;
    border-radius: 12px;
    border-width: 1.5px;
    box-shadow: none;
  }

  .remaketop-sp .top-proof__text {
    font-size: var(--remaketop-sp-text-sm);
    line-height: 1.58;
  }

  .remaketop-sp .top-proof__text strong {
    display: inline;
    font-size: var(--remaketop-sp-text-sm);
    line-height: inherit;
  }

  /* =========================
     Top nav cards
     ========================= */
  .remaketop-sp .top-nav-section {
    margin: 16px 0;
  }

  .remaketop-sp .top-nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .remaketop-sp .top-nav-card {
    padding: 10px 10px;
    border-radius: 10px;
    min-height: 82px;
    box-shadow: none;
  }

  .remaketop-sp .top-nav-card strong {
    margin-bottom: 2px;
    font-size: 0.88rem;
    line-height: 1.3;
    color: var(--remaketop-sp-text);
  }

  .remaketop-sp .top-nav-card span {
    font-size: 0.73rem;
    line-height: 1.42;
    color: #617283;
  }

  .remaketop-sp .top-nav-card:hover {
    transform: none;
    box-shadow: none;
  }

  /* カテゴリ別の色分け */
  .remaketop-sp .top-nav-card[href*="sec-securities"] {
    background: linear-gradient(180deg, #ffffff 0%, var(--remaketop-sp-securities-bg) 100%);
    border-color: #cddff3;
  }

  .remaketop-sp .top-nav-card[href*="sec-fx"] {
    background: linear-gradient(180deg, #ffffff 0%, var(--remaketop-sp-fx-bg) 100%);
    border-color: #d0e9de;
  }

  .remaketop-sp .top-nav-card[href*="sec-crypto"] {
    background: linear-gradient(180deg, #ffffff 0%, var(--remaketop-sp-crypto-bg) 100%);
    border-color: #dfd5f7;
  }

  .remaketop-sp .top-nav-card[href*="ryoukinn"] {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border-color: #d6e3ef;
  }

  /* =========================
     Site brief / diagnosis / policy
     ========================= */
  .remaketop-sp .top-site-brief__lead,
  .remaketop-sp .top-diagnosis-lead,
  .remaketop-sp .top-category-intro,
  .remaketop-sp .top-editorial-policy__lead,
  .remaketop-sp .top-shortcuts-lead,
  .remaketop-sp .top-pick-group__lead {
    font-size: 0.82rem;
    line-height: 1.62;
    margin-bottom: 10px;
  }

  .remaketop-sp .top-site-brief__links,
  .remaketop-sp .top-editorial-policy__links,
  .remaketop-sp .top-cta-band__actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .remaketop-sp .top-diagnosis-section .diagnosis-box {
    border-radius: 12px;
  }

  .remaketop-sp .top-diagnosis-section .diagnosis-btn {
    min-height: 42px;
    font-size: 0.84rem;
    border-radius: 10px;
  }

  /* =========================
     Pick groups / recommendation cards
     ========================= */
  .remaketop-sp .top-pick-group {
    padding: 10px;
    border-radius: 12px;
  }

  .remaketop-sp .top-pick-group + .top-pick-group {
    margin-top: 12px;
  }

  .remaketop-sp .top-pick-group__title {
    font-size: 0.94rem;
    line-height: 1.35;
    margin-bottom: 4px;
  }

  .remaketop-sp .top-pick-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .remaketop-sp #top-shortcuts .top-pick__box {
    min-height: auto;
    padding: 10px 10px 9px;
    border-radius: 11px;
    border-width: 1.5px;
    box-shadow: none;
  }

  .remaketop-sp #top-shortcuts .top-pick__head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
  }

  .remaketop-sp #top-shortcuts .top-pick__rank {
    margin-bottom: 4px;
    font-size: 0.64rem;
    line-height: 1.2;
  }

  .remaketop-sp #top-shortcuts .top-pick__title {
    font-size: 0.92rem;
    line-height: 1.34;
  }

  .remaketop-sp #top-shortcuts .top-pick__tag {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .remaketop-sp #top-shortcuts .top-pick__points {
    gap: 4px;
  }

  .remaketop-sp #top-shortcuts .top-pick__points li {
    font-size: 0.77rem;
    line-height: 1.45;
    color: #536577;
  }

  /* 色分け */
  .remaketop-sp #top-shortcuts .top-pick__box--total {
    background: linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
    border-color: #d8c27a;
  }

  .remaketop-sp #top-shortcuts .top-pick__box--beginner {
    background: linear-gradient(180deg, var(--remaketop-sp-beginner-bg) 0%, #ffffff 100%);
    border-color: #a9cfee;
  }

  /* =========================
     Company card grids
     ========================= */
  .remaketop-sp .my-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .remaketop-sp .card {
    padding: 8px 8px 9px;
    border-radius: 10px;
    min-height: 0;
    box-shadow: none;
  }

  .remaketop-sp .card img {
    width: 100%;
    max-width: 100%;
    height: 56px;
    object-fit: contain;
    margin: 4px 0 7px;
    box-shadow: none;
  }

  .remaketop-sp .card span {
    display: block;
    font-size: 0.76rem;
    line-height: 1.38;
    color: var(--remaketop-sp-text);
  }

  .remaketop-sp .card small,
  .remaketop-sp .card .card-label {
    display: inline-block;
    margin-top: 5px;
    padding: 1px 7px;
    font-size: 0.62rem;
    line-height: 1.3;
    border-radius: 999px;
  }

  /* セクション色 */
  .remaketop-sp #sec-securities .card small,
  .remaketop-sp #sec-securities .card .card-label {
    background: var(--remaketop-sp-securities-bg);
    color: var(--remaketop-sp-securities);
  }

  .remaketop-sp #sec-fx .card small,
  .remaketop-sp #sec-fx .card .card-label {
    background: var(--remaketop-sp-fx-bg);
    color: var(--remaketop-sp-fx);
  }

  .remaketop-sp #sec-crypto .card small,
  .remaketop-sp #sec-crypto .card .card-label {
    background: var(--remaketop-sp-crypto-bg);
    color: var(--remaketop-sp-crypto);
  }

  /* =========================
     Policy cards
     ========================= */
  .remaketop-sp .top-grid.top-grid--3 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .remaketop-sp .top-card.top-card--panel {
    min-height: auto;
    padding: 10px 10px 9px;
    border-radius: 11px;
    box-shadow: none;
  }

  .remaketop-sp .top-badge {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .remaketop-sp .top-card__title {
    margin: 6px 0 5px;
    font-size: 0.86rem;
    line-height: 1.38;
  }

  .remaketop-sp .top-card__text {
    font-size: 0.77rem;
    line-height: 1.48;
  }

  /* =========================
     FAQ
     ========================= */
  .remaketop-sp .faq-list {
    display: grid;
    gap: 8px;
  }

  .remaketop-sp .faq-item {
    border-radius: 10px;
    overflow: hidden;
  }

  .remaketop-sp .faq-item summary {
    padding: 10px 10px;
    min-height: 42px;
    gap: 8px;
    align-items: flex-start;
  }

  .remaketop-sp .faq-item summary span {
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 700;
    color: var(--remaketop-sp-text);
  }

  .remaketop-sp .faq-answer {
    padding: 0 10px 10px;
    font-size: 0.78rem;
    line-height: 1.56;
    color: #4d6174;
  }

  .remaketop-sp .faq-caret {
    font-size: 0.78rem;
    margin-left: auto;
  }

  /* =========================
     Bottom CTA
     ========================= */
  .remaketop-sp .top-cta-band__inner {
    padding: 12px 11px;
  }

  .remaketop-sp .top-cta-band__title {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.42;
  }

  /* =========================
     Back link / misc
     ========================= */
  .remaketop-sp .top-back-link {
    min-height: 36px;
    margin-top: 10px;
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .remaketop-sp .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 0.82rem;
  }
}

/* =========================================
   さらに小さい端末
   ========================================= */
@media (max-width: 480px) {

  .remaketop-sp .top-hero__title {
    font-size: 1.14rem;
  }

  .remaketop-sp .top-hero__lead {
    font-size: 0.84rem;
  }

  .remaketop-sp .top-hero__trust-list {
    grid-template-columns: 1fr;
  }

  .remaketop-sp .top-nav-grid,
  .remaketop-sp .my-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .remaketop-sp .top-nav-card {
    min-height: 76px;
    padding: 9px 9px;
  }

  .remaketop-sp .top-nav-card strong {
    font-size: 0.84rem;
  }

  .remaketop-sp .top-nav-card span {
    font-size: 0.7rem;
  }

  .remaketop-sp .card img {
    height: 52px;
  }

  .remaketop-sp .card span {
    font-size: 0.73rem;
  }

  .remaketop-sp #top-shortcuts .top-pick__title {
    font-size: 0.88rem;
  }

  .remaketop-sp #top-shortcuts .top-pick__points li {
    font-size: 0.74rem;
  }
}

/* =========================================
   モーション抑制
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  .remaketop-sp *,
  .remaketop-sp *::before,
  .remaketop-sp *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}