/* =========================================================
  SunStripe / Programming Lab - University Notebook Theme
  - 白っぽい紙 / 薄い青罫線 / 赤いマージン線 / 文具っぽいUI
  - 既存HTML構造（topbar/layout/panel/md/notes）にそのまま適用OK
========================================================= */

/* =========================
  Tokens (Light Notebook)
========================= */
:root{
  /* paper base */
  --bg:#eef2f7;              /* 背景：机/空気感 */
  --paper:#ffffff;           /* 紙 */
  --paper2:#fbfdff;          /* 紙の薄い陰影 */
  --paperEdge:#e6edf5;       /* 紙の縁 */
  --text:#0f172a;            /* 文字（濃紺） */
  --muted:#52607a;           /* サブ文字 */

  /* stationery accents */
  --primary:#2563eb;         /* 青（ペン） */
  --accent:#f59e0b;          /* オレンジ（マーカー） */
  --good:#16a34a;            /* 緑 */
  --bad:#dc2626;             /* 赤 */

  /* notebook lines */
  --ruleBlue: rgba(37,99,235,.12); /* 青罫線 */
  --ruleBlue2: rgba(37,99,235,.08);
  --marginRed: rgba(220,38,38,.22); /* 赤マージン */
  --grid: rgba(15,23,42,.06);       /* うっすら区切り */

  /* UI */
  --border: rgba(15,23,42,.10);
  --border2: rgba(15,23,42,.14);
  --radius: 14px;
  --shadow: 0 10px 26px rgba(15,23,42,.10);
  --shadow2: 0 16px 44px rgba(15,23,42,.14);
}

/* =========================
  Base
========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:"Noto Sans JP", system-ui, -apple-system, Segoe UI, sans-serif;
  color:var(--text);
  line-height:1.75;

  /* 机っぽい明るい背景 + 紙の反射 */
  background:
    radial-gradient(1100px 520px at 20% 10%, rgba(37,99,235,.10), transparent 55%),
    radial-gradient(900px 480px at 85% 0%, rgba(245,158,11,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.75), rgba(238,242,247,1));
}

a{ color:inherit; text-decoration:none; }
code, pre{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Noto Sans Mono", monospace; }

::selection{
  background: rgba(245,158,11,.28);
  color: var(--text);
}

.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  border:0;
}

/* =========================
  Topbar (light)
========================= */
.topbar{
  position:sticky; top:0; z-index:30;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{
  max-width:1280px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
}
.brand{ display:flex; gap:12px; align-items:center; }

.brand__logo{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:14px;
  border:1px solid var(--border);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.95), transparent 60%),
    linear-gradient(135deg, rgba(37,99,235,.14), rgba(245,158,11,.12));
  box-shadow: 0 10px 26px rgba(15,23,42,.10);
  font-weight:900;
  color: rgba(15,23,42,.86);
}
.brand__title{ display:block; font-weight:900; letter-spacing:.02em; }
.brand__sub{ display:block; font-size:12px; color:var(--muted); margin-top:2px; }

.topbar__actions{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}

/* =========================
  Buttons (stationery)
========================= */
.btn{
  appearance:none;
  border:1px solid rgba(37,99,235,.20);
  background: rgba(37,99,235,.08);
  color: rgba(15,23,42,.92);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  transition:.16s transform, .16s background, .16s border, .16s box-shadow;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(37,99,235,.11);
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}
.btn:active{ transform: translateY(0px); }

.btn--outline{
  background: #fff;
  border:1px solid var(--border2);
}
.btn--outline:hover{ background: rgba(255,255,255,.92); }

.btn--ghost{
  background: transparent;
  border:1px solid transparent;
}
.btn--ghost:hover{
  border:1px solid var(--border);
  background: rgba(15,23,42,.04);
}

.btn--sm{
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
}

/* =========================
  Layout
========================= */
.layout{
  max-width:1280px;
  margin:0 auto;
  padding:16px;
  display:grid;
  grid-template-columns: 320px 1fr 300px;
  gap:16px;
}
@media (max-width: 1080px){
  .layout{ grid-template-columns: 300px 1fr; }
  .panel--toc{ display:none; }
}
@media (max-width: 860px){
  .layout{ grid-template-columns: 1fr; }
  .panel--nav{ order:2; }
  .panel--toc{ order:3; display:block; }
}

/* =========================
  Panels = "大学ノート紙"
  - 青罫線 + 赤マージン線 + 紙のエッジ
========================= */
.panel{
  border-radius: var(--radius);
  overflow:hidden;
  min-height: 40px;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  background:
    /* 赤いマージン線（縦） */
    linear-gradient(90deg,
      transparent 0,
      transparent 44px,
      var(--marginRed) 44px,
      var(--marginRed) 45px,
      transparent 45px,
      transparent 100%
    ),
    /* 青罫線（横） */
    repeating-linear-gradient(
      180deg,
      rgba(37,99,235,.00) 0px,
      rgba(37,99,235,.00) 26px,
      var(--ruleBlue) 27px,
      var(--ruleBlue) 28px
    ),
    /* 紙の陰影 */
    linear-gradient(180deg, var(--paper), var(--paper2));
}

/* 罫線弱めたい時用（任意） */
.panel.is-softlines{
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 44px,
      rgba(220,38,38,.16) 44px,
      rgba(220,38,38,.16) 45px,
      transparent 45px,
      transparent 100%
    ),
    repeating-linear-gradient(
      180deg,
      rgba(37,99,235,.00) 0px,
      rgba(37,99,235,.00) 30px,
      var(--ruleBlue2) 31px,
      var(--ruleBlue2) 32px
    ),
    linear-gradient(180deg, var(--paper), var(--paper2));
}

/* panel head = 見出しの帯（マーカー） */
.panel__head{
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(15,23,42,.08);
  position:relative;
  background:
    linear-gradient(90deg, rgba(245,158,11,.18), transparent 70%),
    rgba(255,255,255,.40);
}
.panel__head::after{
  content:"";
  position:absolute;
  left:14px; bottom:-1px;
  width:72px; height:3px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(245,158,11,.70), rgba(37,99,235,.55));
  opacity:.85;
}

.panel__title{ font-weight:900; letter-spacing:.02em; }
.panel__sub{ color:var(--muted); font-size:12px; margin-top:2px; }

.panel__foot{
  padding:12px 14px;
  border-top:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.40);
}

/* =========================
  Utilities
========================= */
.muted{ color:var(--muted); }
.tiny{ font-size:12px; }

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  font-size:12px;
  color: rgba(15,23,42,.86);
}

/* =========================
  Nav + Search (notebook field)
========================= */
.search{ padding:12px 14px 10px; }

.search__input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.92);
  outline:none;
}
.search__input:focus{
  border-color: rgba(37,99,235,.32);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.search__meta{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
  min-height: 16px;
}

.lessonList{
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.lessonItem{
  display:block;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.74);
  transition:.16s transform, .16s border, .16s background, .16s box-shadow;
}
.lessonItem:hover{
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.22);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}
.lessonItem.is-active{
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.12);
}
.lessonItem__title{ font-weight:900; }
.lessonItem__meta{ margin-top:6px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.lessonItem__tags{ margin-top:6px; font-size:12px; color:var(--muted); }
.lessonItem__desc{ margin-top:8px; font-size:12px; color: rgba(15,23,42,.78); }

/* =========================
  Content head
========================= */
.contentHead{
  padding:16px 16px 10px;
  border-bottom:1px solid rgba(15,23,42,.08);
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  background: rgba(255,255,255,.40);
}
.contentTitle{
  margin:0;
  font-size:22px;
  letter-spacing:.01em;
  font-weight:900;
  position:relative;
  display:inline-block;
}
.contentTitle::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-2px;
  height:10px;
  background: linear-gradient(90deg, rgba(245,158,11,.28), rgba(37,99,235,.14));
  border-radius:999px;
  filter: blur(10px);
  opacity:.9;
}
.contentMeta{ margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.contentHead__right{ display:flex; gap:10px; flex-wrap:wrap; }

/* =========================
  Markdown body (paper)
========================= */
.md{ padding: 16px; }

.md h1, .md h2, .md h3, .md h4{
  line-height:1.35;
  margin: 18px 0 10px;
  font-weight:900;
}
.md h1{ font-size: 26px; }
.md h2{
  font-size: 20px;
  padding-top: 8px;
  border-top:1px dashed rgba(15,23,42,.14);
}
.md h3{ font-size: 16px; }
.md p{ margin: 10px 0; }
.md ul, .md ol{ margin: 8px 0 12px 22px; }
.md li{ margin: 6px 0; }

.md a{
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.md blockquote{
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(245,158,11,.70);
  background: rgba(245,158,11,.12);
  border-radius: 10px;
}
.md hr{
  border: none;
  border-top:1px dashed rgba(15,23,42,.16);
  margin: 18px 0;
}
.md pre{
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.05);
  overflow:auto;
}
.md pre code{ font-size: 13px; }
.md code{
  padding: 2px 6px;
  border-radius: 8px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(245,158,11,.18);
}

.md table{
  width:100%;
  border-collapse: collapse;
  margin: 12px 0;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
}
.md th,.md td{
  padding:10px;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.md th{
  text-align:left;
  background: rgba(37,99,235,.06);
}

/* =========================
  Card note
========================= */
.card{
  margin: 14px 16px 18px;
  padding: 14px 14px;
  border-radius: 16px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}
.card--note h2{ margin:0 0 10px; font-size:16px; }

.details{
  margin-top:10px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  background: rgba(255,255,255,.76);
  overflow:hidden;
}
.details summary{
  cursor:pointer;
  padding:10px 12px;
  font-weight:900;
  background: rgba(37,99,235,.06);
}
.details__body{ padding: 0 12px 12px; color: rgba(15,23,42,.84); }

/* =========================
  TOC
========================= */
.toc{
  padding: 10px 12px 14px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.toc a{
  display:block;
  padding:8px 10px;
  border-radius: 12px;
  border:1px solid transparent;
  background: transparent;
  color: rgba(15,23,42,.86);
}
.toc a:hover{
  border-color: rgba(37,99,235,.18);
  background: rgba(37,99,235,.06);
}
.toc .lvl-2{ padding-left: 10px; font-weight:900; }
.toc .lvl-3{ padding-left: 18px; font-size: 13px; color: rgba(15,23,42,.76); }
.toc .lvl-4{ padding-left: 26px; font-size: 12px; color: rgba(15,23,42,.66); }

/* =========================
  Footer (light)
========================= */
.footer{
  padding: 20px 16px 26px;
  color: var(--muted);
}
.footer__inner{
  max-width:1280px;
  margin: 0 auto;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

/* =========================
  Notes UI (white notebook)
========================= */
.notes{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.notesHead{
  padding:14px 16px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background: rgba(255,255,255,.40);
}
.notesHead__title{
  margin:0;
  font-size:18px;
  font-weight:900;
}
.notesHead__sub{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}
.notesHead__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.noteBar{
  padding:12px 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  border-bottom:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.35);
}
.noteBar__left,
.noteBar__right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.noteBar__left{ flex: 1 1 320px; }
.noteBar__right{ flex: 0 0 auto; }

.noteInput{
  flex: 1 1 260px;
  min-width: 220px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.92);
  outline:none;
}
.noteInput:focus{
  border-color: rgba(37,99,235,.32);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.noteSelect{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.92);
  outline:none;
}
.noteSelect:focus{
  border-color: rgba(37,99,235,.32);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

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

.noteCard{
  position:relative;
  padding:14px 14px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadow);
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 40px,
      rgba(220,38,38,.20) 40px,
      rgba(220,38,38,.20) 41px,
      transparent 41px,
      transparent 100%
    ),
    repeating-linear-gradient(
      180deg,
      rgba(37,99,235,.00) 0px,
      rgba(37,99,235,.00) 26px,
      rgba(37,99,235,.12) 27px,
      rgba(37,99,235,.12) 28px
    ),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(251,253,255,.92));
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  overflow:hidden;
}
.noteCard:hover{
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.20);
  box-shadow: var(--shadow2);
}
.noteCard.is-pinned{
  border-color: rgba(245,158,11,.35);
}
.noteCard.is-pinned::before{
  content:"📌";
  position:absolute;
  top:10px; right:10px;
  font-size:14px;
  opacity:.9;
}

.noteCard__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.noteCard__title{
  margin:0;
  font-size:15px;
  font-weight:900;
  line-height:1.35;
}
.noteCard__meta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.noteCard__actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.iconBtn{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: rgba(15,23,42,.88);
  cursor:pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.iconBtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
}
.iconBtn:active{ transform: translateY(0); }

.noteCard__preview{
  margin-top:10px;
  font-size:12px;
  color: rgba(15,23,42,.78);
  line-height:1.7;
  display:-webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.noteTags{
  margin-top:10px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.noteTag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  font-size:12px;
  color: rgba(15,23,42,.84);
}
.noteTag--accent{ border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.10); }
.noteTag--primary{ border-color: rgba(37,99,235,.26); background: rgba(37,99,235,.08); }
.noteTag--good{ border-color: rgba(22,163,74,.22); background: rgba(22,163,74,.08); }
.noteTag--bad{ border-color: rgba(220,38,38,.22); background: rgba(220,38,38,.08); }

.noteEmpty{
  padding:18px 14px;
  margin: 12px 14px 16px;
  border-radius:16px;
  border:1px dashed rgba(15,23,42,.18);
  background: rgba(255,255,255,.70);
  color: var(--muted);
}
.noteEmpty strong{ color: rgba(15,23,42,.90); }

.noteEditor{
  padding:14px;
  border-top:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.35);
}
.noteForm{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 860px){
  .noteForm{ grid-template-columns: 1fr; }
}
.noteField{ display:flex; flex-direction:column; gap:8px; }
.noteLabel{
  font-size:12px;
  color: var(--muted);
  font-weight:900;
  letter-spacing:.02em;
}
.noteHelp{ font-size:12px; color: rgba(82,96,122,.95); }

.noteText,
.noteArea,
.chipInput{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.82);
  color: rgba(15,23,42,.92);
  outline:none;
}
.noteArea{ min-height: 160px; resize: vertical; }
.noteText:focus,
.noteArea:focus,
.chipInput:focus{
  border-color: rgba(37,99,235,.32);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.chipRow{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

.noteEditor__actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}
.noteEditor__left,
.noteEditor__right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.noteHint{ font-size:12px; color: var(--muted); }

.noteStatus{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.76);
  font-size:12px;
  color: rgba(15,23,42,.86);
}
.noteStatus--warn{ border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.10); }
.noteStatus--ok{ border-color: rgba(22,163,74,.22); background: rgba(22,163,74,.08); }
.noteStatus--bad{ border-color: rgba(220,38,38,.22); background: rgba(220,38,38,.08); }

.notePreview{
  padding:14px 16px 16px;
  border-top:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.35);
}
.notePreview__title{
  margin:0 0 10px;
  font-size:14px;
  font-weight:900;
  color: rgba(15,23,42,.90);
}
.notePreview .md{ padding:0; }

/* =========================
  Modal (light)
========================= */
.noteModal{
  position:fixed;
  inset:0;
  z-index:80;
  display:none;
}
.noteModal.is-open{ display:block; }

.noteModal__backdrop{
  position:absolute; inset:0;
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(8px);
}
.noteModal__dialog{
  position:relative;
  max-width: 980px;
  margin: 48px auto;
  padding: 0;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,.12);
  background: var(--paper);
  box-shadow: 0 24px 66px rgba(15,23,42,.22);
  overflow:hidden;
}
@media (max-width: 860px){
  .noteModal__dialog{ margin: 18px 12px; }
}

.noteModal__head{
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background: rgba(37,99,235,.05);
}
.noteModal__title{
  margin:0;
  font-size:16px;
  font-weight:900;
}
.noteModal__body{ padding:14px 14px 16px; }
.noteModal__foot{
  padding:12px 14px;
  border-top:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  background: rgba(15,23,42,.03);
}

/* collapsed */
.is-hidden{ display:none !important; }

/* =========================
  🗒️ NOTES UI (全体ノート統一版)
========================= */

/* extra tokens (no override needed, but keep) */
:root{
  --note-surface: rgba(0,0,0,.12);
  --note-surface2: rgba(255,255,255,.03);
  --note-ring: rgba(96,165,250,.28);
  --note-warn: rgba(245,158,11,.55);
  --note-ok: rgba(34,197,94,.55);
  --note-danger: rgba(239,68,68,.55);
}

.notes{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.notesHead{
  padding:14px 16px 12px;
  border-bottom:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background:
    linear-gradient(90deg, rgba(245,158,11,.10), transparent 62%),
    rgba(0,0,0,.06);
}
.notesHead__title{
  margin:0;
  font-size:18px;
  font-weight:900;
  letter-spacing:.02em;
}
.notesHead__title::after{
  content:"";
  display:block;
  width:96px; height:3px;
  margin-top:6px;
  border-radius:999px;
  background: rgba(245,158,11,.55);
}
.notesHead__sub{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}
.notesHead__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* filter bar */
.noteBar{
  padding:12px 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.015) 0px,
      rgba(255,255,255,.015) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 52px
    ),
    rgba(0,0,0,.05);
}
.noteBar__left,
.noteBar__right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.noteBar__left{ flex: 1 1 320px; }
.noteBar__right{ flex: 0 0 auto; }

.noteInput{
  flex: 1 1 260px;
  min-width: 220px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 48px
    ),
    rgba(0,0,0,.16);
  color:var(--text);
  outline:none;
}
.noteInput:focus{
  border-color: rgba(96,165,250,.55);
  box-shadow: 0 0 0 4px rgba(96,165,250,.12);
}

.noteSelect{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
  color:var(--text);
  outline:none;
}
.noteSelect:focus{
  border-color: rgba(96,165,250,.55);
  box-shadow: 0 0 0 4px rgba(96,165,250,.12);
}

/* grid */
.noteGrid{
  padding:14px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 860px){
  .noteGrid{ grid-template-columns: 1fr; }
}

/* note card = paper memo */
.noteCard{
  position:relative;
  padding:14px 14px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:
    /* corner paper fold */
    linear-gradient(135deg, rgba(245,158,11,.14) 0%, transparent 26%),
    radial-gradient(700px 260px at 20% 0%, rgba(255,255,255,.05), transparent 70%),
    /* ruled lines */
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 22px,
      rgba(255,255,255,.00) 23px,
      rgba(255,255,255,.00) 44px
    ),
    rgba(0,0,0,.10);
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  transition: transform .16s ease, border-color .16s ease, filter .16s ease;
  overflow:hidden;
}
.noteCard:hover{
  transform: translateY(-1px);
  border-color: rgba(96,165,250,.30);
  filter: brightness(1.03);
}

/* pin */
.noteCard.is-pinned{
  border-color: rgba(245,158,11,.40);
}
.noteCard.is-pinned::before{
  content:"📌";
  position:absolute;
  top:10px; right:10px;
  font-size:14px;
  opacity:.9;
}

/* card head */
.noteCard__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.noteCard__title{
  margin:0;
  font-size:15px;
  font-weight:900;
  letter-spacing:.01em;
  line-height:1.35;
  position:relative;
}
.noteCard__title::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-2px;
  height:10px;
  background: linear-gradient(90deg, rgba(245,158,11,.22), rgba(96,165,250,.12));
  border-radius:999px;
  filter: blur(10px);
  opacity:.9;
}
.noteCard__meta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* icon actions */
.noteCard__actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.iconBtn{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  color: rgba(231,238,252,.92);
  cursor:pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, filter .14s ease;
}
.iconBtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(96,165,250,.25);
  filter: brightness(1.05);
}
.iconBtn:active{ transform: translateY(0); }

/* preview */
.noteCard__preview{
  margin-top:10px;
  font-size:12px;
  color: rgba(231,238,252,.88);
  line-height:1.7;
  display:-webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* tags */
.noteTags{
  margin-top:10px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.noteTag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  font-size:12px;
  color: rgba(231,238,252,.92);
  position:relative;
  overflow:hidden;
}
.noteTag::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.10), transparent);
  opacity:.8;
}
.noteTag > *{ position:relative; }

.noteTag--accent{
  border-color: rgba(245,158,11,.32);
  background: rgba(245,158,11,.08);
}
.noteTag--primary{
  border-color: rgba(96,165,250,.30);
  background: rgba(96,165,250,.08);
}
.noteTag--good{
  border-color: rgba(34,197,94,.28);
  background: rgba(34,197,94,.08);
}
.noteTag--bad{
  border-color: rgba(239,68,68,.28);
  background: rgba(239,68,68,.08);
}

/* empty */
.noteEmpty{
  padding:18px 14px;
  margin: 12px 14px 16px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.16);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.015) 0px,
      rgba(255,255,255,.015) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 52px
    ),
    rgba(0,0,0,.08);
  color: var(--muted);
}
.noteEmpty strong{ color: rgba(231,238,252,.92); }

/* editor */
.noteEditor{
  padding:14px;
  border-top:1px solid rgba(255,255,255,.08);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.012) 0px,
      rgba(255,255,255,.012) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 52px
    ),
    rgba(0,0,0,.06);
}

.noteForm{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 860px){
  .noteForm{ grid-template-columns: 1fr; }
}

.noteField{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.noteLabel{
  font-size:12px;
  color: var(--muted);
  font-weight:900;
  letter-spacing:.02em;
}
.noteHelp{
  font-size:12px;
  color: rgba(159,176,211,.92);
}

/* inputs = ruled */
.noteText,
.noteArea,
.chipInput{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 48px
    ),
    rgba(0,0,0,.16);
  color: var(--text);
  outline:none;
}
.noteArea{ min-height: 160px; resize: vertical; }
.noteText:focus,
.noteArea:focus,
.chipInput:focus{
  border-color: rgba(96,165,250,.55);
  box-shadow: 0 0 0 4px rgba(96,165,250,.12);
}

.chipRow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* form actions */
.noteEditor__actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}
.noteEditor__left,
.noteEditor__right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.noteHint{
  font-size:12px;
  color: var(--muted);
}

/* status pills */
.noteStatus{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  font-size:12px;
  color: rgba(231,238,252,.92);
  position:relative;
  overflow:hidden;
}
.noteStatus::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.12), transparent);
  opacity:.85;
}
.noteStatus > *{ position:relative; }

.noteStatus--warn{ border-color: rgba(245,158,11,.32); background: rgba(245,158,11,.08); }
.noteStatus--ok{ border-color: rgba(34,197,94,.26); background: rgba(34,197,94,.08); }
.noteStatus--bad{ border-color: rgba(239,68,68,.26); background: rgba(239,68,68,.08); }

/* preview area */
.notePreview{
  padding:14px 16px 16px;
  border-top:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(90deg, rgba(245,158,11,.08), transparent 55%),
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.012) 0px,
      rgba(255,255,255,.012) 24px,
      rgba(255,255,255,.00) 25px,
      rgba(255,255,255,.00) 52px
    ),
    rgba(0,0,0,.06);
}
.notePreview__title{
  margin:0 0 10px;
  font-size:14px;
  font-weight:900;
  color: rgba(231,238,252,.92);
}
.notePreview .md{ padding:0; }

/* modal */
.noteModal{
  position:fixed;
  inset:0;
  z-index:80;
  display:none;
}
.noteModal.is-open{ display:block; }

.noteModal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
}
.noteModal__dialog{
  position:relative;
  max-width: 980px;
  margin: 48px auto;
  padding: 0;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(255,255,255,.05), transparent 70%),
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 22px,
      rgba(255,255,255,.00) 23px,
      rgba(255,255,255,.00) 44px
    ),
    linear-gradient(180deg, rgba(15,27,51,.96), rgba(12,23,48,.96));
  box-shadow:0 24px 66px rgba(0,0,0,.50);
  overflow:hidden;
}
@media (max-width: 860px){
  .noteModal__dialog{ margin: 18px 12px; }
}

.noteModal__head{
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background: linear-gradient(90deg, rgba(245,158,11,.10), transparent 60%);
}
.noteModal__title{
  margin:0;
  font-size:16px;
  font-weight:900;
}
.noteModal__body{ padding:14px 14px 16px; }
.noteModal__foot{
  padding:12px 14px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  background: rgba(0,0,0,.06);
}

/* drag states */
.noteCard.is-dragging{
  opacity:.78;
  transform: scale(.99);
  border-color: rgba(96,165,250,.55);
  box-shadow:0 20px 60px rgba(0,0,0,.50);
}
.noteCard.is-dropTarget{
  outline: 2px dashed rgba(96,165,250,.45);
  outline-offset: 4px;
}


/* =========================
  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;
  }
}
