@charset "utf-8";

/* =================================================
   Design Tokens（色・影・角丸）
================================================= */
:root{
  --bg: #f6f7fb;
  --text: #333;

--header-bg: #8ecae6;
  --nav-bg: #5f7f8f;
  --nav-divider: #cfd8e3;

  --card-bg: #fff;
  --shadow-sm: 0 6px 18px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

    /* buttons */
  --btn-blue: #219ebc;
  --btn-blue-d: #126782;

  --btn-yellow: #ffb703;
  --btn-yellow-d: #c48a02;

  --btn-red: #d96b4f;
  --btn-red-d: #a4161a;

  --btn-gray: #e0e0e0;
  --btn-gray-d: #bdbdbd;

  --btn-brown: #b08968;
  --btn-brown-d: #7f5539;
}

/* =================================================
   Base / Reset-ish
================================================= */
*{ box-sizing: border-box; }

html{
  scroll-padding-top: 75px;
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.hidden{ display:none !important; }

/* Layout */
.container{
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}


/* =================================================
   Header / Nav
================================================= */
.site-header{
  background: var(--header-bg);
  padding: 20px 0 0;
}

.site-title{ margin:0; }

.site-logo{
  max-height: 80px;
  width: auto;
  display: block;
}

.site-header .container{
  position: relative;
}

.header-actions{
  position: absolute;
  right: 0;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-switch{
  gap: 10px;
}

.auth-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.7);
  color: #1f2937;
  background: rgba(255,255,255,0.9);
  justify-content: center;
}

.auth-history,
.auth-account{
  padding: 6px 12px;
}

.account-list{
  display: grid;
  gap: 12px;
  margin: 0;
}

.account-list div{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

.account-list dt{
  font-weight: 700;
  color: #6b7280;
}

.account-list dd{
  margin: 0;
}

.account-actions{
  margin-top: 16px;
  text-align: right;
}

.auth-chip-icon{
  width: 20px;
  height: 20px;
  display: block;
}

.auth-chip:hover{
  background: #ffffff;
}

/* full-width nav bar */
.nav{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 20px;
  background: var(--nav-bg);
  overflow: visible;
}

.nav ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display:flex;
  justify-content:center;
  gap: 36px;
  flex-wrap: wrap;
}

.nav .nav-group{
  position: relative;
  min-width: 140px;
  text-align: center;
  display: flex;
  align-items: center;
}

.nav .nav-group-title{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #fff;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
  line-height: 1;
}

.nav .nav-group-title .nav-icon{
  vertical-align: middle;
}

.nav .nav-sub{
  list-style: none;
  padding: 6px;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  background: rgba(70, 90, 100, 0.6);
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  min-width: 180px;
  display: none;
  z-index: 5;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav .nav-sub::before{
  display: none;
}

.nav .nav-sub li{
  min-width: auto;
  text-align: left;
}

.nav .nav-sub a{
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav .nav-sub a .nav-sub-icon{
  width: 12px;
  height: 12px;
  display: inline-block;
  flex: 0 0 12px;
}

.nav .nav-sub a:hover{
  background: rgba(95,127,143,0.35);
  color: #ffffff;
}

.nav .nav-group:hover .nav-sub{
  display: block;
}

.nav .nav-sub:hover{
  display: block;
}

.nav .nav-group::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  width: 100%;
  height: 12px;
}

.nav li{
  min-width: 140px;
  text-align:center;
  position: relative;
}

.nav li:not(:last-child)::after{
  content:"";
  position:absolute;
  right:-18px;
  top:50%;
  transform: translateY(-50%);
  width:1px;
  height:14px;
  background: var(--nav-divider);
}

.nav a{
  display:block;
  width:100%;
  text-decoration:none;
  color:#fff;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background .35s ease;
}

/* タブレット幅：ナビを1行で収める */
/* 1024px以上はPC表示のまま */

.nav a:hover{
  background: linear-gradient(
    to top,
    rgba(255,255,255,0.30) 0%,
    rgba(255,255,255,0.25) 12%,
    rgba(255,255,255,0.05) 24%,
    rgba(255,255,255,0.0) 100%
  );
}

.nav a.is-active{
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* TOPリンクのみは下線を表示しない */
.nav li:first-child > a.is-active{
  text-decoration: none;
}

/* 「ドットコムマスターとは」リンクも下線を表示しない */
.nav li:nth-child(2) > a.is-active{
  text-decoration: none;
}

.nav .nav-icon{
  display: none;
}

.nav-toggle{
  display: none;
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  z-index: 1200;
}

.nav-toggle-bar{
  display: block;
  width: 24px;
  height: 2px;
  background: #2f5d62;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle-bar + .nav-toggle-bar{
  margin-top: 5px;
}

.nav-backdrop{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 900;
}

.nav-backdrop.is-visible{
  display: block;
}

/* =================================================
   Hero（TOP）
================================================= */
.hero{
  background: var(--card-bg);
  margin: 40px 0;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.hero h2{
  margin-top: 0;
  font-size: clamp(20px, 5vw, 28px);
  color: var(--btn-blue);
}

.hero p{
  font-size: clamp(12px, 3vw, 16px);
  margin: 20px 0 30px;
  white-space: normal;
}

.hero p a{
  color: #1f5f73;
  text-decoration: none;
  font-weight: 700;
}

.hero p a:hover{
  text-decoration: underline;
}

.page-usage .hero-links{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 20px;
  padding-left: 18px;
  background: #f1f3f5;
  padding-top: 10px;
  padding-bottom: 12px;
  border-radius: 12px;
}

.page-usage .hero-sub-links{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  font-size: 14px;
}

.page-usage .hero-sub-links a{
  color: #1f5f73;
  text-decoration: none;
  font-weight: 700;
}

.page-usage .hero-sub-links a:hover{
  text-decoration: underline;
}

.page-usage .hero-links a{
  color: #1f5f73;
  text-decoration: none;
  font-weight: 700;
}

.page-usage .hero-links a:visited{
  color: #1f5f73;
}

.page-usage .hero-links a:hover{
  text-decoration: underline;
}

.page-usage .toc-details{
  background: #f1f3f5;
  border: 1px solid var(--nav-divider);
  border-radius: 16px;
  padding: 0;
}

.page-usage .toc-summary{
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: #1f5f73;
  padding: 10px 14px;
  position: relative;
  padding-right: 64px;
  background: #e2e6ea;
  border-radius: 16px 16px 0 0;
}

.page-usage .toc-summary::-webkit-details-marker{
  display: none;
}

.page-usage .toc-summary::after{
  content: "OPEN";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  letter-spacing: .08em;
  color: #5f7f8f;
  background: #eef2f7;
  border: 1px solid #d7e0ea;
  padding: 2px 6px;
  border-radius: 999px;
}

.page-usage .toc-details[open] .toc-summary::after{
  content: "CLOSE";
  color: #3f5866;
  background: #e6edf3;
}

.hero-buttons{
  display:flex;
  justify-content:center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-item{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}

/* =================================================
   Buttons（共通）
================================================= */
.btn-primary{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width: 220px;
  height: 100px;
  background: #ffb703;
  color:#fff;
  text-decoration:none;
  font-size: 20px;
  font-weight: 800;
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 #c48a02;
  text-align:center;
  transition: background .4s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover{
  background:#f59e0b;
  transform: translate(2px,2px);
  box-shadow: 2px 2px 0 #c48a02;
}

.btn-primary:active{
  transform: translate(4px,4px);
  box-shadow: 0 0 0 #c48a02;
}

/* =================================================
   Sections（共通）
================================================= */
.section{
  background: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
}
.section h3{
  margin: 0 0 18px;
  color:#555;
  font-size: 1.2rem;
}

.section h3 .slide-hint{
  display: inline-block;
  margin-left: 10px;
  font-size: .78em;
  color: rgba(0, 0, 0, .45);
  font-weight: 400;
  vertical-align: middle;
}

/* Category */
.category-list{
  list-style:none;
  padding:0;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.category-list li{
  background:#e0fbfc;
  padding:14px;
  border-radius: var(--radius-md);
  text-align:center;
  font-weight:700;
}

/* =================================================
   Footer
================================================= */
.site-footer{
  text-align:center;
  padding: 20px;
  color:#777;
  font-size:14px;
}

.footer-nav{
  list-style:none;
  padding:0;
  margin: 0 0 10px;
  display:flex;
  justify-content:center;
  gap: 24px;
}
.footer-nav a{
  color:#555;
  text-decoration:none;
}
.footer-nav a:hover{ text-decoration:underline; }

/* =================================================
   Exam page
================================================= */
.exam-table{
  width:100%;
  border-collapse:collapse;
  margin-top:14px;
  overflow:hidden;
  border-radius: var(--radius-sm);
  outline: 1px solid rgba(0,0,0,0.10);
  outline-offset: -1px;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.exam-table th,
.exam-table td{
  padding: 12px 14px;
  border-bottom: 1px solid #e6e8ef;
  text-align:left;
  font-size: 15px;
}
.exam-table th{
  width:32%;
  background:#f1f5f9;
  color:#334155;
  font-weight:800;
}
.exam-table td{ background:#fff; }

.exam-note{
  margin-top:12px;
  font-size:13px;
  color:#667085;
}
.exam-list,
.exam-steps{
  margin: 10px 0 0;
  padding-left: 20px;
}
.exam-list li,
.exam-steps li{ margin: 8px 0; }

/* =================================================
   Text page
================================================= */
.text-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}
.text-card{
  display:block;
  background:#fff;
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  text-decoration:none;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.text-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.09);
}
.text-badge{
  display:inline-block;
  background:#e0fbfc;
  color:#0b7285;
  font-weight:800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.text-title{
  display:block;
  font-weight:900;
  font-size: 18px;
  margin-top: 10px;
}
.text-desc{
  display:block;
  font-size: 14px;
  color:#666;
  margin-top: 6px;
}
.text-note{
  margin-top: 18px;
  font-size: 13px;
  color:#666;
}

/* =================================================
   Contact form
================================================= */
.contact-form{
  max-width: 500px;
  margin: 0 auto;
}

.form-group{ margin-bottom:18px; }
.form-group label{
  display:block;
  font-weight:700;
  margin-bottom:6px;
}

.form-group .required{
  color:#e63946;
  margin-left: 4px;
  font-weight: 800;
}

.hero h2.contact-hero-success{
  color:#e63946;
}
.form-group input,
.form-group textarea{
  width:100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}
.form-group input:focus,
.form-group textarea:focus{
  outline:none;
  border-color: var(--btn-blue);
}

.form-note{
  font-size: 12px;
  color:#777;
  margin-bottom: 10px;
  text-align:center;
}
.form-actions{ text-align:center; }

.contact-form .btn-submit{
  width: 300px;
  padding: 4px 20px;
  height: 48px;
  font-size: 18px;
  background:#e63946;
  color:#fff;
  border: 1px solid #e63946;
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 #a4161a;
  cursor:pointer;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  transition: background .3s ease, transform .15s ease, box-shadow .15s ease;
}
.contact-form .btn-submit:hover{
  background:#c1121f;
  border-color:#c1121f;
  transform: translate(1px,1px);
  box-shadow: 2px 2px 0 #a4161a;
}
.contact-form .btn-submit:active{
  transform: translate(3px,3px);
  box-shadow: 0 0 0 #a4161a;
}
.contact-form #demoSubmit{ margin-bottom: 10px; }

/* =================================================
   Quiz（共通）
================================================= */
.choices{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.choice-btn{
  width:100%;
  min-height: 40px;
  border-radius: 6px;
  border: none;
  text-align:left;
}

.choice-btn.is-selected{
  outline: 3px solid rgba(33, 158, 188, 0.45);
  background: rgba(142, 202, 230, 0.25);
}

/* category label */
.quiz-category{
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color:#8f8f8f;
  opacity: .85;
}
.quiz-category::before{ content:"〈"; margin-right:2px; }
.quiz-category::after{ content:"〉"; margin-left:2px; }
.result-header + .quiz-category,
.quiz-category:empty{ display:none; }

/* =================================================
   Quiz buttons layout（quiz-50 & quiz-category）
   ※あなたの quiz50 のHTML構造に合わせたまま
================================================= */
.quiz-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
  margin-top: 15px;
}

.quiz-sub-actions,
.quiz-check-actions{
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 270px;
}

/* button base */
.quiz-actions button{
  border: none;
  outline: none;
  border-radius: 7px;
  cursor:pointer;
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
  padding: 0;
  line-height: 30px;
  box-sizing: border-box;
}

/* disabled */
.quiz-actions button:disabled{
  opacity: .5;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:none !important;
}
/*  */
.quiz-keyboard-note{
  margin-top: 6px;
  font-size: 12px;
  color: #777;
  text-align: center;
}
/* =========================
   キーボード操作ヘルプ（1ボックス統合版）
========================= */

/* 外枠 */
.kb-help{
  margin-top: 10px;
  border-radius: 10px;
  background: #f9f9f9;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

/* 見出しボタン */
.kb-help__btn{
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  padding: 1px 17px;
  border: none;
  background: transparent;
  color: #757474;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.kb-help__btn:focus{ outline: none; }
.kb-help__btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(33,158,188,0.18);
}

/* 中央テキスト */
.kb-help__btn-text{
  text-align: center;
}

/* 左右の▼ */
.kb-help__chev{
  font-size: 12px;
  color: #9ca3af;
  transition: transform .2s ease;
}

/* 開いている時の▼ */
.kb-help__btn[aria-expanded="true"] .kb-help__chev{
  transform: rotate(180deg);
}

/* ===== 中身：デフォは「閉じ」 ===== */
.kb-help__body{
  display: block; 
  padding: 0;
  border-top: none;
  font-size: 12px;
  color: #757474;
  background: transparent;
}

/* hidden属性が付いてる時だけ閉じる（HTMLに合わせる） */
.kb-help__body[hidden]{
  display: none;
}

/* リスト */
.kb-help__list{
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.7em;;
}

/* sizes */
#btnNext{
  width: 300px;
  height: 40px;
  font-size: 18px;
  font-weight: 900;
}
#btnPrev,
#btnRestart,
#btnShowAnswer,
#btnCheckNow{
  width: calc(50% - 5px);
  height: 30px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

#btnRetry{
  width: 163px;
  height: 30px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  background: var(--btn-red);
  color:#fff;
  box-shadow: 2px 2px 0 var(--btn-red-d);
}


/* color sets */
#btnNext{
  background: var(--btn-blue);
  color:#fff;
  box-shadow: 2px 2px 0 var(--btn-blue-d);
}
#btnNext:hover{
  background:#1e7d94;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-blue-d);
}
#btnNext:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-blue-d);
}

#btnPrev,
#btnRestart{
  background: var(--btn-red);
  color:#fff;
  box-shadow: 2px 2px 0 var(--btn-red-d);
}
#btnPrev:hover,
#btnRestart:hover,
#btnRetry:hover{
  background:#bf5e45;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-red-d);
}
#btnPrev:active,
#btnRestart:active,
#btnRetry:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-red-d);
}

#btnShowAnswer{
  background: var(--btn-gray);
  color:#333;
  box-shadow: 2px 2px 0 var(--btn-gray-d);
}
#btnShowAnswer:hover{
  background:#d5d5d5;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-gray-d);
}
#btnShowAnswer:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-gray-d);
}

#btnCheckNow{
  background: var(--btn-brown);
  color:#fff;
  box-shadow: 2px 2px 0 var(--btn-brown-d);
}
#btnCheckNow:hover{
  background:#9c6644;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-brown-d);
}
#btnCheckNow:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-brown-d);
}

/* Answer box（quiz50: class="answer-box" を想定） */
.answer-box{
  width: 300px;
  margin-top: 8px;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background:#fafafa;
}
.answer-box .title{ font-weight: 900; margin-bottom: 6px; }
.answer-box .correct{ color:#2e7d32; font-weight: 900; }
.answer-box .explain{ margin-top: 6px; color:#555; }
.answer-box.hidden{ display:none; }

/* Question image */
.question-image{
  display:block;
  max-width:100%;
  width: min(90%, 520px);
  height:auto;
  margin: 12px auto 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* =================================================
   Result Table（答え合わせ一覧）
================================================= */
.result-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
}
.result-table th,
.result-table td{
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  vertical-align: top;
}
.result-table thead th{
  background: var(--bg);
  font-weight: 900;
}
.col-mark{ width: 90px; text-align:center; }

.qno{ font-weight: 900; margin-right: 6px; }
.q-cell{ line-height: 1.5; }

.result-row{ cursor:pointer; }
.result-row:hover{ background:#f9fbff; }
.result-row.is-open{ background:#f3f7ff; }

.mark-cell{
  text-align:center;
  font-weight: 900;
  font-size: 18px;
}
.mark-ok{ color:#2a9d8f; }
.mark-ng{ color:#e63946; }
.mark-na{ color:#777; }

.detail-row td{ background:#fbfcff; }

/* =================================================
   Detail（答え合わせ詳細）
================================================= */
.detail-box{
  padding: 14px;
  border-radius: 14px;
  background:#fff;
}

.detail-qno,
.detail-qtext{
  color:#333;
  font-weight: 800;
}
.detail-qno{ margin-bottom:6px; }
.detail-qtext{ line-height:1.7; margin-bottom:10px; }

.label{
  font-weight: 900;
  margin-right: 6px;
  color:#555;
}

.detail-line,
.detail-explain{
  margin: 8px 0;
  font-size: 14px;
}
.detail-explain{ color:#555; line-height:1.7; }

.detail-choices{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin: 12px 0 10px;
}

.detail-choice{
  display:flex;
  align-items:center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background:#f1f3f5;
  font-weight: 600;
  color:#333;
}
.choice-symbol{
  width: 22px;
  margin-right: 6px;
  font-weight: 900;
  text-align:center;
}

/* state coloring */
.detail-row.is-ok .detail-choice.is-user{
  border-color:#2e7d32;
  background:#e6f4ea;
  color:#2e7d32;
  font-weight: 900;
}
.detail-row.is-ng .detail-choice.is-user{
  border-color:#c62828;
  background:#fdecea;
  color:#c62828;
  font-weight: 900;
}
.detail-row.is-ng .detail-choice.is-correct{
  border-color:#2e7d32;
  background:#e6f4ea;
  color:#2e7d32;
  font-weight: 900;
}
.detail-row.is-ng .detail-choice:not(.is-user):not(.is-correct){
  color:#555;
}
.detail-row.is-na .detail-choice{
  background:#eee;
  border-color:#ccc;
  color:#555;
}

.detail-youranswer{
  margin-top: 10px;
  font-weight: 900;
}
.detail-row.is-ok .detail-youranswer{ color:#2e7d32; }
.detail-row.is-ng .detail-youranswer{ color:#c62828; }
.detail-row.is-na .detail-youranswer{ color:#333; }

.detail-correct{
  margin-top: 6px;
  font-weight: 900;
  color:#2e7d32;
}

/* summary row color（一覧の問題文だけ色付けしたい場合） */
.result-row.is-ok .q-cell{ color:#2e7d32; font-weight: 800; }
.result-row.is-ng .q-cell{ color:#c62828; font-weight: 800; }
.result-row.is-na .q-cell{ color:#333; }

/* =================================================
   Result Header / Close button / Category score
================================================= */

/* --- Result header (答え合わせの上段) --- */
.result-header{
  position: relative;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 12px;
}

.result-header h3{
  font-size: 20px;
  margin: 0 0 6px;
  text-align: left;
}

/* 右側：縦並び＋右寄せ */
.result-header__actions{
  display: flex;
  flex-direction: column;     /* ← 縦並び */
  align-items: flex-end;      /* ← 右寄せ */
  gap: 6px;                   /* ボタンと合計の間隔 */
  width: 100%;
}

/* 合計スコア */
.total-score-badge{
  order: 2;                   /* 下に */
}

/* もう一度チャレンジ */
#btnRetry{
  order: 1;                   /* 上に */
  white-space: nowrap;
}

/* =========================
   合計点バッジ（共通）
========================= */
.total-score-badge{
  margin-left: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  padding: 6px 14px;
  font-size: 20px;
  font-weight: 900;
  border-radius: 8px;
  white-space: nowrap;

  /* デフォルト（JS未実行時の保険） */
  background: #e6b2ad;
  color: #4a1f1b;
}

/* =========================
   点数別カラー
========================= */

/* 0〜60点：赤 */
.total-score-badge.is-low{
  background: #f3b3b3;
  color: #6a1a1a;
}

/* 61〜80点：黄 */
.total-score-badge.is-mid{
  background: #ffe08a;
  color: #5a3b00;
}

/* 81〜100点：緑 */
.total-score-badge.is-high{
  background: #bfe8c8;
  color: #0f3d1e;
}

/* --- 解説を閉じる --- */
.close-area{
  display:flex;
  justify-content:flex-end;
  margin: 8px 0 12px;
}

.btn-close-all{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background:#e0e0e0;
  color:#333;
  cursor:pointer;
}
.btn-close-all:hover{ background:#d5d5d5; }

/* 分野名（詳細内） */
.detail-cat{
  margin: 2px 0 10px;
  font-weight: 800;
  color:#666;
}

/* --- category score（分野別スコア） --- */
.category-score{
  margin: 0 0 36px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.category-score h4{
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
}

.category-score ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap: 10px;
}

.category-score .cat-row{
  position: relative;
  isolation: isolate;     /* この中の重なりを完結 */
  overflow: hidden;

  display:flex;
  justify-content:space-between;
  align-items:center;

  padding: 10px 12px;
  border-radius: 10px;
  background:#f3f4f6;
}

.category-score .cat-row::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: var(--p, 0%);
  z-index: 0;
  pointer-events:none;

  border-radius: 10px;

  background: repeating-linear-gradient(
    135deg,
    rgba(180, 240, 200, 0.88) 0px,
    rgba(180, 240, 200, 0.88) 12px,
    rgba(160, 230, 190, 0.88) 12px,
    rgba(160, 230, 190, 0.88) 24px
  );
  box-shadow: inset 0 0 0 1px rgba(120, 200, 150, 0.25);
  transition: width .35s ease;
}

.category-score .cat-row.is-high::before{
  background: repeating-linear-gradient(
    135deg,
    rgba(180, 240, 200, 0.9) 0px,
    rgba(180, 240, 200, 0.9) 12px,
    rgba(150, 220, 185, 0.9) 12px,
    rgba(150, 220, 185, 0.9) 24px
  );
  box-shadow: inset 0 0 0 1px rgba(120, 200, 150, 0.3);
}

.category-score .cat-row.is-mid::before{
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 226, 153, 0.9) 0px,
    rgba(255, 226, 153, 0.9) 12px,
    rgba(245, 205, 120, 0.9) 12px,
    rgba(245, 205, 120, 0.9) 24px
  );
  box-shadow: inset 0 0 0 1px rgba(220, 170, 80, 0.35);
}

.category-score .cat-row.is-low::before{
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 190, 180, 0.9) 0px,
    rgba(255, 190, 180, 0.9) 12px,
    rgba(240, 160, 150, 0.9) 12px,
    rgba(240, 160, 150, 0.9) 24px
  );
  box-shadow: inset 0 0 0 1px rgba(210, 120, 120, 0.35);
}

.category-score .cat-row > *{
  position:relative;
  z-index: 1;
}

.category-score .cat-name,
.category-score .cat-score{
  font-weight: 900;
}

.category-score .cat-row[style*="--p:0%"]{
  color:#6b7280;
}
/* =================================================
   Question table / spacing fix
================================================= */
.question-text,
#questionText{
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 12px;
  white-space: normal;
}
#questionText p{ margin: 0 0 10px; }

.question-table{
  border-collapse: collapse;
  width: 100%;
  margin: 8px auto 24px;
  font-size: 14px;
}
.question-table th,
.question-table td{
  border: 1px solid #ccc;
  padding: 8px 10px;
  text-align:center;
}
.question-table thead th{
  background:#f2f2f2;
  font-weight: 900;
}
.question-table tbody th{
  background:#fafafa;
  width: 48px;
}

/* =================================================
   quiz-category: start before hide
================================================= */
.quiz-card.is-idle .quiz-top,
.quiz-card.is-idle #questionText,
.quiz-card.is-idle #choices,
.quiz-card.is-idle #feedback,
.quiz-card.is-idle .answer-area,
.quiz-card.is-idle .quiz-actions{
  display:none;
}

/* スタート前はクイズカード自体を非表示 */
.quiz-card.is-idle {
  display: none;
}

/* misc */
.back-link:hover{ text-decoration: underline; }

/* =================================================
   Quiz Pages - 共通デザイン（quiz-50 / quiz-category 統一）
================================================= */
/* 分野選択パネルもカード化（quiz-categoryの上のセレクト部分） */
.quiz-page .panel{
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 22px;
  margin: 0 0 18px;
}

.quiz-page .panel-label{
  display:block;
  font-weight: 900;
  color:#555;
  margin-bottom: 10px;
}

.quiz-page .panel-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:center;
}

.quiz-page .select{
  min-width: 240px;
  height: 38px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d6dbe5;
  background:#fff;
  font-weight: 700;
}

/* quizの本体カード（質問エリア）も統一 */
.quiz-page .quiz-card{
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 24px 24px;
  margin: 0 0 20px;
}


.quiz-progress{
  font-weight: 600;
  color:#334155;
}

/* 「この分野で10問スタート」ボタンも統一感を出す */
.quiz-page .btn-main{
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: var(--btn-yellow);
  color:#fff;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--btn-yellow-d);
  cursor:pointer;
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
}
.quiz-page .btn-main:hover{
  background:#f59e0b;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-yellow-d);
}
.quiz-page .btn-main:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-yellow-d);
}

/* =========================
   VOCAB（用語集）
========================= */

.vocab-index{
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px); 
}
.vocab-index-row{
  margin: 6px 0;
}

.vocab-wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 0 12px;
}

/* =========================
   操作バー（検索 / カテゴリ / 並び順 / 全部閉じる）
   1段目：検索＋検索ボタン
   2段目：カテゴリ＋並び順（左）／全部閉じる（右）
========================= */

.vocab-controls{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin: 18px 0 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
}

.vocab-row{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.vocab-controls .vocab-label{
  font-size: 13px;
  color:#334155;
  font-weight: 700;
  white-space: nowrap;
}

/* --- 検索欄 --- */
.vocab-search{
  flex: 1 1 260px;     /* 伸びる */
  min-width: 200px;

  width: 100%;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  background:#fff;
  color:#0f172a;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

.vocab-search:focus{
  outline: none;
  border-color: rgba(33,158,188,0.65);
  box-shadow: 0 0 0 4px rgba(33,158,188,0.18);
}

/* --- 検索ボタン --- */
.btn-vocab-search{
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  background: var(--btn-blue, #219ebc);
  color: #fff;
  box-shadow: 2px 2px 0 var(--btn-blue-d, #126782);
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
}
.btn-vocab-search:hover{
  background:#1e7d94;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 var(--btn-blue-d, #126782);
}
.btn-vocab-search:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 var(--btn-blue-d, #126782);
}
/* --- クリアボタン（検索ボタンの灰色版） --- */
.btn-vocab-clear{
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  background: #e0e0e0;
  color: #333;
  box-shadow: 2px 2px 0 #9e9e9e;
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
}

.btn-vocab-clear:hover{
  background: #d0d0d0;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 #9e9e9e;
}

.btn-vocab-clear:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 #9e9e9e;
}
/* --- select本体--- */
.vocab-controls .select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  font-size: 14px;
  line-height: 1.2;
  padding: 10px 38px 10px 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  background:#fff;
  color:#0f172a;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
  cursor:pointer;
}

.vocab-controls .select:focus{
  outline: none;
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18);
}

/* selectの▼（select-wrap を使ってる場合だけ） */
.vocab-controls .select-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.vocab-controls .select-wrap::after{
  content:"▾";
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color:#64748b;
  pointer-events:none;
}

/* --- 2段目の左右分離 --- */
.vocab-row-bottom{
  justify-content: space-between;
}
.vocab-row-bottom .vocab-left{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- 全部閉じるボタン（2段目右） --- */
.btn-vocab-closeall{
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  background: #e0e0e0;
  color: #333;
  white-space: nowrap;
  margin-left: auto; /* ← 念押しで右寄せ */
}
.btn-vocab-closeall:hover{ background:#d5d5d5; }
.btn-vocab-closeall:active{ transform: translateY(1px); }

/* =========================
   リスト：PCでも1列固定
========================= */

/* =========================
   カード（開閉）
========================= */
.vocab-item{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  scroll-margin-top: 110px;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    border-color .12s ease;
}

.vocab-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}
/* =========================
   ヘッダー（タップ領域大）
========================= */
.vocab-head{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.vocab-head:focus{
  outline: none;
  box-shadow: none;
}

.vocab-head:focus-visible{
  box-shadow: inset 0 0 0 3px rgba(59,130,246,0.22);
}

.vocab-term{
  font-size: 16px;
  font-weight: 700;
  color:#0f172a;
  letter-spacing: .02em;
  line-height: 1.25;
}

/* 右のトグル（検索アプリっぽい丸ボタン） */
.vocab-toggle{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f1f5f9;
  color:#334155;
  font-size: 14px;
  font-weight: 900;
  flex: 0 0 auto;
  opacity: .8;
  transition: transform .18s ease, background .18s ease;
}



/* 開いてるカードに「今開いてる感」 */
.vocab-item.is-open{
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
/* =========================
   中身（カテゴリ＋説明）
========================= */

/* =========================
   vocab-body 開閉を aria-expanded に統一
========================= */

/* デフォ：閉じる（完全に高さ0） */
.vocab-body{
  display: none;
  padding: 0;
  margin: 0;
  border-top: 0;
}

/* 開いた時だけ表示 */
.vocab-head[aria-expanded="true"] + .vocab-body{
  display: block;
  padding: 12px 16px 22px;  /* 上 左右 下 */
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* 中身の余白（詰まり防止） */
.vocab-category{
  margin: 0 0 6px;
}

/* 解説文 */
.vocab-desc{
  margin: 0;
  padding: 2px 0 5px;
  font-size: 14px;
  line-height: 1.85;
  color:#111827;
  word-break: break-word;
}


/* カテゴリバッジ */
.vocab-category{
  margin: 0;
  display:inline-flex;
  align-items:center;
  gap: 3px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background:#f8fafc;
  color:#334155;
  opacity: .8;
}


/* =========================
   カテゴリ色（data-cat は glossary-data の5分類）
========================= */
.vocab-item[data-cat="usage"]    .vocab-category{ background:#eaf5ff; color:#1b4d80; border-color:#cfe7ff; }
.vocab-item[data-cat="device"]   .vocab-category{ background:#f3fff1; color:#245c1e; border-color:#d8f4d2; }
.vocab-item[data-cat="connect"]  .vocab-category{ background:#f4f1ff; color:#3b2a7a; border-color:#ddd6ff; }
.vocab-item[data-cat="security"] .vocab-category{ background:#fff1f1; color:#8a1f1f; border-color:#ffd6d6; }
.vocab-item[data-cat="law"]      .vocab-category{ background:#fff7e8; color:#7a4b00; border-color:#ffe2b8; }


/* =========================
   vocab（用語集）: index / list / anchor 調整
   ========================= */
/* クリックできるリンク */
.vocab-index-link {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-size: 14px;
}

/* ホバー（色指定は最小限。テーマの色があるならそっち優先でOK） */
.vocab-index-link:hover {
  transform: translateY(-1px);
}

/* データが無いキー（押せない表示） */
.vocab-index-dim {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px dashed rgba(0,0,0,.18);
  background: rgba(0,0,0,.03);
  color: rgba(0,0,0,.45);
  font-size: 14px;
}
.vocab-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 4px 0 24px;
}
.vocab-index-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vocab-index-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  text-decoration: none;
  font-weight: 600;
}

.vocab-index-btn:hover {
  filter: brightness(0.97);
}

.vocab-index-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.vocab-count {
  margin: 8px 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* 件数 + 全部閉じる の行 */
.vocab-meta {
  display: flex;
  align-items: center;
  justify-content: space-between; /* ← 左右に分ける */
  margin: 16px 0;
}


.vocab-pager{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.vocab-page-btn{
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;

  background: #e0e0e0;
  color: #333;
  box-shadow: 2px 2px 0 #9e9e9e;
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
}

.vocab-page-btn:hover{
  background: #d0d0d0;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 #9e9e9e;
}

.vocab-page-btn:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 #9e9e9e;
}

.vocab-page-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0 #9e9e9e;
}
/* --- moreボタン（検索ボタンのグレー版） --- */
.btn-vocab-more{
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;

  background: #e0e0e0;      /* グレー */
  color: #333;
  box-shadow: 2px 2px 0 #9e9e9e;
  transition: transform .15s ease, background .25s ease, box-shadow .15s ease;
}

.btn-vocab-more:hover{
  background: #d0d0d0;
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 #9e9e9e;
}

.btn-vocab-more:active{
  transform: translate(2px,2px);
  box-shadow: 0 0 0 #9e9e9e;
}
.vocab-more{
  text-align: center;
  margin-top: 20px;
}
.vocab-page-info{
  font-weight: 900;
  font-size: 13px;
}
/* =========================
   Topへ戻るボタン
========================= */
#btnBackToTop.btn-back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(142,202,230,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  transform: translateY(6px);
}

#btnBackToTop.btn-back-to-top.is-show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ホバーで少し濃く */
#btnBackToTop.btn-back-to-top:hover{
  background: #6fb6da;
}

/* クリック感 */
#btnBackToTop.btn-back-to-top:active{
  transform: translateY(1px);
}
/* △の底辺なし（∧っぽい矢印） */
#btnBackToTop.btn-back-to-top::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-left: 4px solid #fff;
  border-top: 4px solid #fff;
  transform: translate(-50%, -35%) rotate(45deg);
  border-radius: 2px;
}

/* =================================================
   About page（about.html）追加CSS：おすすめ/特長/表
================================================= */

/* 認定スキルのリスト（読みやすさ優先） */
.about-list{
  margin: 10px 0 0;
  padding-left: 20px;
}
.about-list li{
  margin: 8px 0;
  line-height: 1.8;
}
/* =================================================
   About intro（はじめに：2資格の説明）
================================================= */

.about-intro-text{
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.8;
}

.about-levels{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 10px 0 18px;
}

.about-level{
  position: relative;
  padding: 16px 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-sm);
}
.about-level.is-current{
  box-shadow: var(--shadow-md);
  border-color: rgba(33,158,188,0.35);
}
.about-level-title{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.about-level-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
  font-weight: 600;
}

/* BASIC（このサイト：青） */
.about-level-basic{
  background: linear-gradient(
    135deg,
    rgba(33,158,188,0.12),
    rgba(33,158,188,0.04)
  );
}
.about-level-basic .about-level-title{
  color: var(--btn-blue);
}

/* ADVANCE */
.about-level-advanced{
  background: linear-gradient(
    135deg,
    rgba(180,230,200,0.35),
    rgba(180,230,200,0.15)
  );
  border-color: rgba(120,200,150,0.4);
}
.about-level-advanced .about-level-title{
  color: #1b7a4a;
}

/* 「このサイトで扱う」バッジ（BASIC用） */
.about-current-badge{
  position: absolute;
  top: 10px;
  right: 10px;

  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;

  background: var(--btn-blue);
  color: #fff;
}

/* まとめ文 */
.about-intro-note{
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}


/* -------------------------
   こんな方にオススメ（3カード）
------------------------- */
.about-reco-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.about-card{
  position: relative;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 18px;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}

.about-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.09);
}

.about-card-img{
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.about-card-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(33,158,188,0.12);
  color: var(--btn-blue);
  border: 1px solid rgba(33,158,188,0.18);
  margin-bottom: 10px;
}

.about-card-title{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.45;
}

.about-card-text{
  margin: 0;
  font-size: 14px;
  color: #475569;
  font-weight: 700;
}

/* -------------------------
   ベーシックの特長（4カード）
------------------------- */
.about-feature-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about-feature{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 18px;
}

.about-feature-img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.about-feature-title{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.5;
  position: relative;
  padding-left: 12px;
}
.about-feature-title::before{
  content:"";
  position:absolute;
  left:0;
  top:.3em;
  width: 4px;
  height: 1.2em;
  border-radius: 999px;
  background: var(--btn-blue);
  opacity: .9;
}

.about-feature-text{
  margin: 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.85;
}

/* -------------------------
   表：横スクロール + 見やすい3列
------------------------- */
.about-table-wrap{
  margin-top: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.about-table-wrap:focus{
  outline: none;
}
.about-table-wrap:focus-visible{
  box-shadow: 0 0 0 4px rgba(33, 158, 188, 0.18), var(--shadow-sm);
}

.about-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px; /* スマホは横スクロール */
  background: #fff;
}

.about-table th,
.about-table td{
  padding: 12px 14px;
  border-bottom: 1px solid #e6e8ef;
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}

.about-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;

  background: #f1f5f9;
  color: #334155;
  font-weight: 900;
}

.about-table tbody tr:nth-child(even){
  background: #fafafa;
}

.about-no{
  font-weight: 900;
  text-align: center;
  width: 80px;
}

.col-no{ width: 80px; }
.col-theme{ width: 220px; }
.col-detail{ width: auto; }

.about-theme{
  font-weight: 900;
  color: #334155;
}

.about-table-list{
  margin: 0;
  padding-left: 18px;
}
.about-table-list li{
  margin: 6px 0;
  line-height: 1.7;
}

.about-note{
  margin-top: 10px;
  font-size: 13px;
  color: #667085;
}

/* profile info alignment */
.profile-info{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-row{
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.profile-label{
  min-width: 72px;
  font-weight: 700;
  color: #374151;
}

.profile-colon{
  width: 12px;
  text-align: center;
}

.profile-value{
  flex: 1;
}

/* =========================== */
/* ===== usage page base ===== */
/* =========================== */

.page-usage .section{
  max-width: none;
  width: 100%;
  margin: 0 auto 32px;
}

/* 見出し */
.page-usage .usage-title{
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1f5f73;
}

/* 説明文 */
.page-usage .usage-summary{
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
  color: #333;
}

/* 中身の列挙（横並びだけど折り返す） */
.page-usage .usage-inline-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-usage .usage-inline-list li{
  background: #eaf5ff;
  padding: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1b4d80;
  border: 1px solid #cfe7ff;
}

.page-usage .usage-inline-list a{
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
}

.page-usage .usage-inline-list a:hover{
  background: #d6ecff;
  box-shadow: 0 4px 10px rgba(33, 158, 188, 0.2);
}

.page-usage .usage-inline-list a:active{
  transform: translateY(1px);
  background: #c8e4ff;
}

.page-usage .usage-subtitle{
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #2f5d62;
}

/* usage slideshow */
.page-usage .pdf-viewer{
  margin-top: 12px;
  border: 1px solid var(--nav-divider);
  border-radius: 16px;
  padding: 14px;
  background: var(--card-bg);
  width: 100%;
}

.page-usage .pdf-toolbar{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
  justify-content: center;
}

.page-usage .slide-controls{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.page-usage .slide-fullscreen-btn{
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.page-usage .slide-fullscreen-icon{
  width: 50px;
  height: 50px;
  display: block;
}

.page-usage .pdf-btn{
  background: #5f7f8f;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.page-usage .pdf-btn:hover{
  background: #4f6a78;
}

.page-usage .pdf-page{
  font-size: 13px;
  color: #4f6a78;
  font-weight: 700;
}

.page-usage .slide-viewport{
  width: 100%;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.page-usage .slide-close-btn{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.page-usage .slide-viewport:fullscreen .slide-close-btn{
  display: flex;
}

.page-usage .slide-img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-usage .slide-viewport:fullscreen{
  background: #0b0b0b;
  padding: 16px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-usage .slide-viewport:fullscreen .slide-img{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.page-usage .slide-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 2px;
}

.page-usage .slide-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--btn-blue-d);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.page-usage .slide-dot.is-active{
  background: var(--btn-blue-d);
}

.page-usage .pdf-error{
  margin: 12px 0 0;
  font-size: 13px;
  color: #b42318;
}

/* =========================
   Responsive
========================= */

/* タブレット以下（ドロワー化） */
@media (max-width: 1100px){
  .site-header{
    padding: 14px 0;
  }

  .site-header .container{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  .site-logo{
    max-height: 64px;
  }

  .header-actions{
    position: static;
    margin-left: auto;
  }

  .nav-toggle{
    margin-left: 6px;
  }

  .header-auth-link{
    padding: 6px 12px;
    font-size: 12px;
  }

  .nav{
    display: none !important;
    margin-top: 0;
    width: min(84vw, 360px);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    background: #fff;
    box-shadow: -12px 0 30px rgba(0,0,0,0.12);
    z-index: 1000;
    padding-top: 70px;
    margin-left: 0;
    transform: translateX(100%);
    transition: transform .28s ease, opacity .2s ease;
    opacity: 0;
    pointer-events: none;
  }

  .nav::before{
    content: "MENU";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f1f3f5;
    color: #374151;
    font-weight: 800;
    letter-spacing: .06em;
  }

  .nav.is-open{
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    display: block !important;
  }

  .nav ul{
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .nav .nav-group{
    width: 100%;
    text-align: left;
    display: block;
  }

  .nav .nav-group-title{
    color: #1f2937;
    padding: 12px 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .nav .nav-group.nav-group-quiz .nav-group-title{
    justify-content: flex-start;
    text-align: left;
  }

  .nav .nav-sub{
    position: static;
    transform: none;
    box-shadow: none;
    background: transparent;
    display: block;
    padding: 0;
    border: none;
    border-radius: 0;
  }

  .nav .nav-sub::before{
    display: none;
  }

  .nav .nav-sub a{
    padding: 8px 32px;
    color: #1f2937;
    gap: 8px;
    border-radius: 0;
  }

  .nav .nav-sub a:hover{
    background: rgba(95,127,143,0.15);
    color: #1f2937;
  }

  .nav .nav-sub a .nav-sub-icon{
    width: 12px;
    height: 12px;
    display: inline-block;
    flex: 0 0 12px;
    filter: brightness(0) saturate(100%);
  }

  .nav a:hover{
    background: rgba(95,127,143,0.15);
  }

  .nav li{
    min-width: 0;
    width: 100%;
  }

  .nav li:not(:last-child)::after{
    display: none;
  }

  .nav a{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #1f2937;
    font-weight: 700;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
  }

  .nav a .nav-icon{
    width: 16px;
    height: 16px;
    display: inline-block;
    flex: 0 0 16px;
  }

  .nav .nav-group-title .nav-icon{
    width: 16px;
    height: 16px;
    display: inline-block;
    flex: 0 0 16px;
  }

  .nav-toggle{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .nav-toggle[aria-expanded="true"]{
    position: fixed;
    right: 20px;
    top: 18px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1){
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2){
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3){
    transform: translateY(-7px) rotate(-45deg);
  }

  body.nav-open{
    overflow: hidden;
  }
}

/* スマホ */
@media (max-width: 767px){
  .about-reco-grid,
  .about-feature-grid,
  .about-levels{
    grid-template-columns: 1fr;
  }

  .header-actions .auth-login,
  .header-actions .auth-register{
    font-size: 0;
    padding: 6px;
    gap: 0;
    min-width: 0;
  }

  .header-actions .auth-login .auth-chip-icon,
  .header-actions .auth-register .auth-chip-icon{
    width: 24px;
    height: 24px;
  }

  .header-actions .auth-history,
  .header-actions .auth-account{
    font-size: 0;
    padding: 6px;
    gap: 0;
    min-width: 0;
  }

  .header-actions .auth-history .auth-chip-icon,
  .header-actions .auth-account .auth-chip-icon{
    width: 24px;
    height: 24px;
  }

  .page-usage .slide-controls button{
    display: none;
  }
}

/* スマホ */
@media (max-width: 600px){
  .about-table th,
  .about-table td{
    padding: 10px 12px;
  }

  .footer-nav{
    flex-direction: column;
    gap: 10px;
  }

  .text-grid,
  .category-list{
    grid-template-columns: 1fr;
  }
}

.page-usage .toc-details:not([open]) .toc-summary{
  border-radius: 16px;
}

/* 学習履歴 */
.auth-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.auth-card{
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}

.auth-card h3{
  margin: 0 0 16px;
  font-size: 20px;
}

.auth-card label{
  display: block;
  margin: 12px 0 6px;
  font-weight: 700;
}

.auth-card input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.auth-card .btn-primary{
  margin-top: 16px;
}

.auth-note{
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.auth-message{
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.auth-message.is-error{
  background: #fee2e2;
  color: #b91c1c;
}

.auth-message.is-success{
  background: #dcfce7;
  color: #15803d;
}

.auth-summary{
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}

.auth-summary__row{
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
}

.auth-summary__title{
  color: #6b7280;
}

.auth-summary__actions{
  margin-top: 12px;
}

.history-section{
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
}

.history-chart-card,
.history-list-card{
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  min-width: 0;
}

.history-chart-scroll{
  overflow-x: auto;
  padding-bottom: 6px;
  position: relative;
}

.history-chart-scroll canvas{
  display: block;
}

.history-tooltip{
  position: absolute;
  left: 0;
  top: 0;
  background: rgba(31, 41, 55, 0.9);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.history-list{
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.history-chart-card h3,
.history-list-card h3{
  margin: 0 0 16px;
}

.history-hint{
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
}

.history-list ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-list li{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  border-radius: 10px;
}

.history-item--total{
  background: rgba(43, 140, 168, 0.12);
}

.history-item--category{
  background: rgba(227, 157, 44, 0.16);
}

.history-legend{
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 4px 0 8px;
  font-size: 12px;
  color: #6b7280;
}

.history-legend__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-legend__item::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.history-legend__item--total::before{
  background: #2b8ca8;
}

.history-legend__item--category::before{
  background: #e39d2c;
}

.history-date{
  font-weight: 700;
}

.history-type{
  color: #6b7280;
  font-size: 12px;
}

.history-count{
  color: #6b7280;
  font-size: 12px;
  text-align: right;
}

.history-cat{
  color: #6b7280;
  font-size: 12px;
  text-align: right;
}

.history-score{
  font-weight: 700;
  font-size: 18px;
  color: #1f2937;
  text-align: right;
}

.history-date-small{
  color: #9ca3af;
  font-size: 11px;
  text-align: right;
}

.history-type,
.history-count,
.history-cat,
.history-score,
.history-date-small{
  grid-column: 2;
}

.history-counts{
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.history-empty{
  color: #6b7280;
}

.score-save-status{
  font-size: 12px;
  color: #1f2937;
  margin-top: 6px;
  text-align: right;
}

@media (min-width: 768px) {
  .score-save-status {
    font-size: 14px;
  }
}

.score-save-status .score-link{
  color: #2b8ca8;
  font-weight: 700;
  margin-left: 6px;
}

/* auth pages (register/login) */
.auth-page{
  background: #f3f4f6;
}

.auth-container{
  max-width: 560px;
  margin: 40px auto 0;
  padding: 0 16px;
}

.auth-panel{
  background: #ffffff;
  border-radius: 22px;
  padding: 40px 36px 32px;
  box-shadow: 0 18px 50px rgba(15,23,42,0.18);
}

.auth-panel h2{
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}

.auth-form label{
  display: block;
  margin: 16px 0 8px;
  font-weight: 700;
  color: #374151;
}

.auth-input{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.auth-input--password{
  padding-right: 10px;
}

.password-toggle{
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 6px;
}

.password-toggle:hover{
  color: #6b7280;
}

.password-toggle-icon{
  width: 22px;
  height: 22px;
  display: block;
}

.auth-forgot{
  text-align: right;
  margin-top: 8px;
  font-size: 13px;
}

.auth-forgot a{
  color: #2b8ca8;
  font-weight: 700;
  text-decoration: none;
}

.auth-forgot a:hover{
  text-decoration: underline;
}

.auth-input input{
  border: none;
  outline: none;
  font-size: 16px;
  width: 100%;
}

.auth-input input::placeholder{
  color: #b0b6bf;
}

.auth-help{
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.auth-check{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  font-size: 13px;
  color: #374151;
}

.auth-submit{
  width: 50%;
  border-radius: 18px;
  height: 35px;
  padding: 0 14px;
  font-size: 16px;
  margin: 18px auto 0;
  border: none;
  box-shadow: 0 4px 0 rgba(173, 107, 0, 0.8);
}

.auth-divider{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #9ca3af;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-alt{
  text-align: center;
  font-size: 13px;
}

.auth-alt a{
  color: #2b8ca8;
  font-weight: 700;
}

@media (max-width: 600px){
  .auth-panel{
    padding: 28px 22px;
  }
}

@media (max-width: 900px){
  .auth-grid{
    grid-template-columns: 1fr;
  }
  .history-section{
    grid-template-columns: 1fr;
  }
}
