:root{
  --bg:#0b1220;
  --card:#0f1b33;
  --card2:#0c1730;
  --text:#e7eefc;
  --muted:#9fb0d3;

  --primary:#60a5fa;
  --accent:#f59e0b;

  --border:rgba(255,255,255,.12);
  --radius:16px;
  --shadow:0 18px 44px rgba(0,0,0,.35);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: "Noto Sans JP", system-ui, -apple-system, Segoe UI, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--sans);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(96,165,250,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(245,158,11,.16), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.7;
}

.wrap{ max-width:1100px; margin:0 auto; padding:0 16px; }

.top{
  position:sticky; top:0; z-index:10;
  backdrop-filter:saturate(1.2) blur(10px);
  background:rgba(11,18,32,.65);
  border-bottom:1px solid var(--border);
}
.top__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0;
  gap:12px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand__badge{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background:linear-gradient(135deg, rgba(96,165,250,.35), rgba(245,158,11,.22));
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  font-weight:800;
}
.brand__title{ font-size:16px; font-weight:800; }
.brand__sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.top__actions{ display:flex; gap:10px; flex-wrap:wrap; }

.hero{ padding:18px 0 6px; }
.hero__card{
  background:linear-gradient(180deg, rgba(255,255,255,.04), transparent 70%), var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.hero h1{ margin:0 0 6px; font-size:22px; }
.muted{ color:var(--muted); }

.hero__grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 920px){
  .hero__grid{ grid-template-columns:1fr; }
}

.section{ padding:20px 0; }
.section__head{ margin:6px 0 12px; }
.section__head h2{ margin:0 0 6px; font-size:18px; }

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:14px;
}
@media (max-width: 920px){
  .grid{ grid-template-columns:1fr; }
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 65%), var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.card__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.card__title{ margin:0; font-size:16px; }
.desc{ margin:10px 0 0; color:var(--muted); }

.tags{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.tag{
  font-size:12px;
  color:rgba(231,238,252,.9);
  background:rgba(96,165,250,.15);
  border:1px solid rgba(96,165,250,.22);
  padding:2px 8px;
  border-radius:999px;
}

.detail{ margin-top:10px; }
.detail summary{
  cursor:pointer;
  color:rgba(231,238,252,.92);
  user-select:none;
}
.detail__body{
  margin-top:10px;
  color:var(--muted);
  background:rgba(0,0,0,.15);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
}

.callout{
  margin-top:14px;
  background:rgba(245,158,11,.10);
  border:1px solid rgba(245,158,11,.25);
  border-radius:14px;
  padding:10px 12px;
  color:rgba(231,238,252,.92);
}

.list{ margin:10px 0 0; padding-left:18px; color:var(--muted); }
.list code{ font-family:var(--mono); font-size:12px; }

.code{
  margin:0;
  white-space:pre-wrap;
  word-break:break-word;
  font-family:var(--mono);
  font-size:12px;
  background:rgba(0,0,0,.18);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  cursor:copy;
}

.mini__label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
}
.mini{ min-width:0; }

.btn{
  appearance:none; border:none;
  background:rgba(255,255,255,.06);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:9px 12px;
  cursor:pointer;
  font-weight:700;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.18); }
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background:rgba(96,165,250,.18);
  border-color:rgba(96,165,250,.30);
}
.btn--primary:hover{
  background:rgba(96,165,250,.23);
  border-color:rgba(96,165,250,.40);
}

.tool{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 920px){
  .tool{ grid-template-columns:1fr; }
}

.tool__col{
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 65%), var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  min-width:0;
}
.tool__head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.tool__head h3{ margin:0; font-size:15px; }
.tool__btns{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.textarea{
  width:100%;
  min-height:280px;
  resize:vertical;
  font-family:var(--mono);
  font-size:12px;
  color:var(--text);
  background:rgba(0,0,0,.18);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  outline:none;
}
.textarea:focus{
  border-color:rgba(96,165,250,.45);
  box-shadow:0 0 0 3px rgba(96,165,250,.12);
}

.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
  align-items:center;
}
.file input{ display:none; }

.hint{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  min-height: 1.2em;
}

.mt{ margin-top:14px; }

.footer{
  margin:22px 0 26px;
  border-top:1px solid var(--border);
  padding-top:16px;
}
.footer__grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
@media (max-width: 920px){
  .footer__grid{ grid-template-columns:1fr; }
}
.footer__title{ font-weight:800; margin-bottom:6px; }
.footer__copy{ margin-top:12px; color:var(--muted); font-size:12px; }


/* =========================
  Footer (SunStripe / Programming Lab)
  対象HTML:
  <footer class="footer">
    <div class="foot__copy">...</div>
    <nav class="foot__nav"><ul>...</ul></nav>
  </footer>
========================= */

footer{
  margin-top:18px;
  padding:18px 14px;
  border:1px solid rgba(33,115,70,.22);
  border-radius:14px;
  background:
    radial-gradient(900px 200px at 20% 0%, rgba(33,115,70,.18), transparent 65%),
    radial-gradient(700px 200px at 85% 10%, rgba(15,123,108,.12), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.06));
  box-shadow:0 14px 34px rgba(0,0,0,.25);
  color:var(--muted);
}

.foot__copy{
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  justify-content:flex-start;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.foot__copy a{
  color:var(--excelWhite2, #d9ffe9);
  text-decoration:none;
  font-weight:800;
  border-bottom:1px solid rgba(33,115,70,.35);
}

.foot__copy a:hover{
  filter:brightness(1.08);
  border-bottom-color:rgba(33,115,70,.60);
}

.foot__nav{
  margin-top:12px;
}

.foot__nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.foot__nav li{
  margin:0;
}

/* Excel風リンクチップ */
.foot__nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(33,115,70,.26);
  background:
    linear-gradient(180deg, rgba(33,115,70,.18), rgba(0,0,0,.06));
  color:var(--excelWhite, #f3fff8);
  font-size:12px;
  letter-spacing:.02em;
  text-decoration:none;
  transition:transform .12s ease, filter .12s ease, border-color .12s ease;
  box-shadow:0 10px 22px rgba(0,0,0,.18);
  white-space:nowrap;
}

.foot__nav a:hover{
  filter:brightness(1.08);
  border-color:rgba(33,115,70,.55);
  transform:translateY(-1px);
}

.foot__nav a:active{
  transform:translateY(0);
}

/* 今いるページが分かるように（任意：bodyにdata-current="/programming/xlsx/"とか付けると便利） */
/*
body[data-current="/programming/xlsx/"] .foot__nav a[href="/programming/xlsx/"]{
  border-color:rgba(33,115,70,.75);
  background:linear-gradient(180deg, rgba(33,115,70,.40), rgba(33,115,70,.18));
  color:var(--excelWhite2, #d9ffe9);
}
*/

/* スマホで詰まりすぎないように */
@media (max-width:560px){
  footer{
    padding:16px 12px;
  }
  .foot__nav a{
    padding:7px 9px;
    font-size:12px;
  }
}
