/* ===== home.css : トップページ (index.html) 専用 ===== */

/* FEATURE GRID */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 800px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.75rem 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.75; }
body.dark-home .glow-field { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
body.dark-home .glow-field .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; }
body.dark-home .stat-row { display: flex; gap: 1.8rem; margin-top: 2.3rem; }
body.dark-home .stat-row .stat b { display: block; font-family: 'Chakra Petch', sans-serif; font-size: 1.5rem; color: #fff; }
body.dark-home .stat-row .stat span { font-size: 0.72rem; color: var(--dh-ink-soft); }
body.dark-home .widget { position: relative; z-index: 1; background: var(--dh-surface); border: 1px solid var(--dh-line); border-radius: 16px; padding: 1.4rem; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
body.dark-home .widget-head { display: flex; align-items: center; gap: 0.7rem; padding-bottom: 1rem; border-bottom: 1px solid var(--dh-line); margin-bottom: 1rem; }
body.dark-home .widget-head .icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--dh-blurple), var(--dh-blurple-light)); display: flex; align-items: center; justify-content: center; font-family: 'Chakra Petch'; font-weight: 700; color: #fff; }
body.dark-home .widget-head .name { font-weight: 700; font-size: 0.98rem; }
body.dark-home .widget-head .sub { font-size: 0.74rem; color: var(--dh-green-light); display: flex; align-items: center; gap: 0.35rem; }
body.dark-home .widget-head .sub i { width: 7px; height: 7px; border-radius: 50%; background: var(--dh-green-light); }
body.dark-home .widget-head.is-offline .sub { color: #f23f42; }
body.dark-home .widget-head.is-offline .sub i { background: #f23f42; }
body.dark-home .widget-head.is-maint .sub { color: #f0b232; }
body.dark-home .widget-head.is-maint .sub i { background: #f0b232; }
body.dark-home .widget-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.4rem; border-radius: 8px; }
body.dark-home .widget-row:hover { background: var(--dh-surface2); }
body.dark-home .widget-row .slot { width: 30px; height: 30px; border-radius: 8px; background: var(--dh-blurple-dim); color: var(--dh-blurple-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.dark-home .widget-row .slot svg { width: 15px; height: 15px; stroke-width: 2.2; fill: none; }
body.dark-home .widget-row .lbl { font-size: 0.82rem; color: var(--dh-ink-soft); flex: 1; }
body.dark-home .widget-row .val { font-family: 'Share Tech Mono', monospace; font-size: 0.85rem; font-weight: 700; color: var(--dh-ink); }
body.dark-home .widget-foot { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--dh-line); display: flex; justify-content: space-between; align-items: center; }
body.dark-home .widget-foot .cnt { font-family: 'Chakra Petch', sans-serif; font-size: 0.8rem; color: var(--dh-ink-soft); }
body.dark-home .widget-foot .cnt b { color: var(--dh-green-light); }
body.dark-home .widget-foot .btn-primary { padding: 0.5rem 1rem; font-size: 0.78rem; }
body.dark-home .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; margin-top: 2.5rem; }
body.dark-home .chatlog { background: var(--dh-surface); border: 1px solid var(--dh-line); border-radius: 14px; padding: 1.3rem; box-shadow: 0 20px 50px rgba(0,0,0,0.35); max-height: 420px; overflow-y: auto; scroll-behavior: smooth; }
body.dark-home .msg { display: flex; gap: 0.75rem; padding: 0.6rem 0; }
body.dark-home .msg .av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: 'Chakra Petch'; font-weight: 700; font-size: 0.85rem; color: #fff; background: linear-gradient(135deg, var(--dh-blurple), var(--dh-blurple-light)); }
body.dark-home .msg-you .av { background: var(--dh-gold); color: #3a2a05; }
body.dark-home .msg .head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.15rem; }
body.dark-home .msg .uname { font-weight: 700; font-size: 0.86rem; }
body.dark-home .msg .botpill { background: var(--dh-blurple); color: #fff; font-size: 0.58rem; font-weight: 700; padding: 0.05rem 0.35rem; border-radius: 4px; }
body.dark-home .msg .time { font-size: 0.68rem; color: var(--dh-ink-soft); }
body.dark-home .msg .text { font-size: 0.85rem; color: #dcdfec; line-height: 1.6; }
body.dark-home .msg .text code { background: var(--dh-surface2); padding: 0.05rem 0.4rem; border-radius: 5px; color: var(--dh-green-light); }

body.dark-home .ping-cmd-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
body.dark-home .ping-cmd-row code { flex-shrink: 0; }
body.dark-home .ping-cmd-row input {
  background: var(--dh-surface2); border: 1px solid var(--dh-line); border-radius: 6px; color: var(--dh-green-light);
  font-family: 'Share Tech Mono', monospace; font-size: 0.82rem; padding: 0.3rem 0.55rem;
}
body.dark-home .ping-cmd-row input:focus { outline: 1px solid var(--dh-blurple-light); border-color: var(--dh-blurple-light); }
body.dark-home .ping-cmd-row #pingIp { width: 11rem; }
body.dark-home .ping-cmd-row #pingPort { width: 4.2rem; }
body.dark-home .ping-cmd-row button {
  border: none; background: var(--dh-blurple); color: #fff; border-radius: 6px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
body.dark-home .ping-cmd-row button:hover { background: var(--dh-blurple-light); }
body.dark-home .ping-cmd-row button:disabled { opacity: 0.5; cursor: default; }
body.dark-home .ping-cmd-row button svg { width: 15px; height: 15px; }
body.dark-home .feature-grid { margin-top: 2.5rem; }
body.dark-home .feature-card { background: var(--dh-surface); border: none; border-left: 3px solid var(--edge, var(--dh-blurple)); border-radius: 12px; box-shadow: none; }
body.dark-home .feature-icon { background: var(--slot-bg, var(--dh-blurple-dim)); }
body.dark-home .feature-icon svg { stroke: var(--edge, var(--dh-blurple-light)); }
body.dark-home .feature-card h3 { color: var(--dh-ink); }
body.dark-home .feature-card p { color: var(--dh-ink-soft); }
body.dark-home .feature-card code { background: var(--dh-surface2); color: var(--dh-green-light); }
body.dark-home .wizard { margin-top: 2.6rem; background: var(--dh-surface); border: 1px solid var(--dh-line); border-radius: 16px; padding: 2.1rem; }
body.dark-home .platform-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
body.dark-home .platform-tabs button { font-family: 'Zen Kaku Gothic New'; border: 1px solid var(--dh-line); background: var(--dh-surface2); padding: 0.55rem 1.05rem; border-radius: 8px; font-weight: 700; font-size: 0.85rem; color: var(--dh-ink-soft); cursor: pointer; display: flex; align-items: center; gap: 0.4rem; }
body.dark-home .platform-tabs button svg { width: 15px; height: 15px; stroke-width: 2.2; fill: none; }
body.dark-home .platform-tabs button.on { background: var(--dh-blurple); color: #fff; border-color: var(--dh-blurple); }
body.dark-home .step-track { display: flex; flex-direction: column; }
body.dark-home .step-track .step-row { display: flex; gap: 1.1rem; padding: 0.9rem 0; position: relative; background: none; border: none; align-items: flex-start; }
body.dark-home .step-track .step-row:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 44px; bottom: -6px; width: 2px; background: var(--dh-line); }
body.dark-home .step-track .num { width: 34px; height: 34px; border-radius: 50%; background: var(--dh-surface2); border: 1px solid var(--dh-line); color: var(--dh-ink-soft); display: flex; align-items: center; justify-content: center; font-family: 'Chakra Petch'; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; z-index: 1; }
body.dark-home .step-track .step-row.done .num { background: var(--dh-green); border-color: var(--dh-green); color: #08150e; }
body.dark-home .step-track h3 { font-size: 0.92rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--dh-ink); }
body.dark-home .step-track p { font-size: 0.83rem; color: var(--dh-ink-soft); line-height: 1.7; margin: 0; }
body.dark-home .step-track code { color: var(--dh-green-light); background: var(--dh-surface2); padding: 0.1rem 0.4rem; border-radius: 4px; }
/* スマホ表示では「主な機能」をスライド式（横スクロール）にする */
@media (max-width: 560px) {
  body.dark-home .feature-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.9rem;
    margin: 2.5rem -1.25rem 0;
    padding: 0 1.25rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  body.dark-home .feature-grid::-webkit-scrollbar { display: none; }
  body.dark-home .feature-grid .feature-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
}

@media (max-width: 900px) {
  body.dark-home .about-grid { grid-template-columns: 1fr; }
}
