/* サービススタンダード教育デモ — 共通スタイル */
:root {
  --ink: #141c27;
  --ink2: #3a4757;
  --muted: #6b7787;
  --navy: #2b4c7e;
  --navy-d: #1b3255;
  --navy-l: #e4ebf4;
  --brass: #8c6f30;
  --brass-d: #5e4a1f;
  --brass-l: #f3eee2;
  --rule: #d9e0e7;
  --soft: #f5f7f9;
  --white: #ffffff;
  --good: #2f6b52;
  --good-l: #e6f1eb;
  --bad: #8e3b34;
  --bad-l: #f6e9e7;
  --shadow: 0 1px 2px rgba(20, 28, 39, 0.05), 0 10px 28px -18px rgba(20, 28, 39, 0.3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 15px;
  line-height: 1.8;
}
.serif { font-family: "Zen Old Mincho", "Yu Mincho", serif; }

/* ---- header ---- */
.site-head {
  background: var(--navy-d);
  color: #fff;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-head a.home {
  color: #d6c8a6;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
  white-space: nowrap;
}
.site-head .t {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-head .demo-tag {
  margin-left: auto;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 99px;
  padding: 0.1rem 0.6rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--brass);
  margin: 0 0 0.4rem;
}
h1.page-title {
  font-family: "Zen Old Mincho", serif;
  font-size: clamp(21px, 4.5vw, 28px);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.lede { color: var(--ink2); font-size: 13.5px; margin: 0 0 1.4rem; }

/* ---- cards / buttons ---- */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.65rem 1.5rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn.brass { background: var(--brass); }
.btn.ghost {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn:disabled { opacity: 0.4; cursor: default; }

.chip {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 0.05rem 0.6rem;
  white-space: nowrap;
}
.chip.new { color: var(--brass); }
.chip.live { color: var(--good); }
.chip.future { color: var(--muted); }

/* ---- home menu ---- */
.menu { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .menu { grid-template-columns: 1fr 1fr; } }
.menu a.item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.1rem 1.25rem;
  position: relative;
  border-top: 3px solid var(--navy);
}
.menu a.item.static-page { border-top-color: var(--rule); }
.menu .num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brass);
}
.menu .verb {
  font-family: "Zen Old Mincho", serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--navy-d);
  margin: 0.1rem 0 0.05rem;
}
.menu .name { font-size: 14px; font-weight: 700; }
.menu .desc { font-size: 12px; color: var(--muted); margin-top: 0.25rem; line-height: 1.65; }
.menu .chip { position: absolute; top: 1.05rem; right: 1.1rem; }

/* ---- brand select ---- */
.brand-grid { display: grid; gap: 0.8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .brand-grid { grid-template-columns: 1fr 1fr 1fr; } }
.brand-btn {
  cursor: pointer;
  border: 1.5px solid var(--rule);
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, transform 0.1s;
}
.brand-btn:hover { border-color: var(--navy); transform: translateY(-2px); }
.brand-btn img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.brand-btn .bn { padding: 0.6rem 0.8rem 0.15rem; font-weight: 700; font-size: 14px; }
.brand-btn .bp {
  padding: 0 0.8rem 0.7rem;
  font-size: 11.5px;
  color: var(--brass);
  font-family: "Zen Old Mincho", serif;
}

/* ---- learn player ---- */
.player { overflow: hidden; }
.player .stage { position: relative; background: #0b1422; }
.player .stage img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.player .slide-label {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: rgba(11, 20, 34, 0.78);
  color: #f0e3c6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
}
.player .caption {
  padding: 1rem 1.2rem;
  min-height: 5.2em;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.player .controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1.2rem;
}
.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex: none;
}
.dots { display: flex; gap: 0.45rem; }
.dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rule);
  cursor: pointer;
}
.dots span.on { background: var(--brass); }
.controls .spacer { flex: 1; }
.controls .brandname { font-size: 11.5px; color: var(--muted); }

/* ---- quiz ---- */
.q-progress { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; }
.q-progress i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--rule);
}
.q-progress i.done { background: var(--navy); }
.q-progress i.now { background: var(--brass); }
.q-card { padding: 1.3rem 1.3rem 1.5rem; }
.q-brand { font-size: 11.5px; font-weight: 700; color: var(--brass); }
.q-text {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0.3rem 0 1rem;
  line-height: 1.7;
}
.q-img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 1rem;
  display: block;
}
.choices { display: grid; gap: 0.6rem; }
.choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  padding: 0.7rem 0.9rem;
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.choice:hover:not(:disabled) { border-color: var(--navy); }
.choice .k { font-weight: 700; color: var(--brass); flex: none; }
.choice.correct { border-color: var(--good); background: var(--good-l); }
.choice.wrong { border-color: var(--bad); background: var(--bad-l); }
.choice:disabled { cursor: default; }
.verdict { font-size: 17px; font-weight: 700; margin: 1rem 0 0.4rem; }
.verdict.ok { color: var(--good); }
.verdict.ng { color: var(--bad); }
.why-box {
  background: var(--brass-l);
  border-left: 3px solid var(--brass);
  padding: 0.8rem 1rem;
  margin-top: 0.5rem;
  border-radius: 0 3px 3px 0;
}
.why-box .wl {
  font-size: 11px;
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}
.why-box .wt { font-size: 13.5px; color: var(--brass-d); line-height: 1.8; }
.q-nav { margin-top: 1.1rem; display: flex; justify-content: flex-end; }

/* result */
.score-hero {
  text-align: center;
  padding: 1.8rem 1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.score-hero .num {
  font-size: 56px;
  font-weight: 700;
  color: var(--navy);
  font-family: "Zen Old Mincho", serif;
  line-height: 1.1;
}
.score-hero .unit { font-size: 20px; color: var(--ink2); }
.score-hero .sub { font-size: 12.5px; color: var(--muted); margin-top: 0.3rem; }
.result-rows { padding: 0.4rem 1.3rem; }
.r-row {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.r-row:last-child { border-bottom: none; }
.r-row .m { font-weight: 700; flex: none; width: 1.4em; }
.r-row .m.ok { color: var(--good); }
.r-row .m.ng { color: var(--bad); }
.next-step {
  background: var(--navy-l);
  padding: 1.1rem 1.3rem;
  margin-top: 1rem;
  border-radius: 4px;
  border-left: 3px solid var(--navy);
}
.next-step .nt { font-weight: 700; font-size: 15px; color: var(--navy-d); margin-bottom: 0.2rem; }
.next-step .nd { font-size: 12.5px; color: var(--ink2); margin-bottom: 0.7rem; }

/* ---- ask (helpdesk) ---- */
.chat-frame { display: flex; flex-direction: column; height: min(66vh, 560px); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.msg { max-width: 85%; padding: 0.65rem 0.95rem; border-radius: 10px; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; }
.msg.user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.msg.ai {
  align-self: flex-start;
  background: var(--soft);
  border: 1px solid var(--rule);
  border-bottom-left-radius: 3px;
}
.msg.ai .ref {
  display: block;
  margin-top: 0.5rem;
  font-size: 11px;
  color: var(--brass);
  font-weight: 700;
}
.msg.ai.typing::after {
  content: "▍";
  animation: blink 0.9s infinite;
  color: var(--muted);
}
@keyframes blink { 50% { opacity: 0; } }
.chips-row { padding: 0.5rem 1.1rem 0.2rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip-q {
  font: inherit;
  font-size: 11.5px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: var(--white);
  border-radius: 99px;
  padding: 0.25rem 0.8rem;
  cursor: pointer;
}
.chip-q:hover { background: var(--navy-l); }
.chat-input { display: flex; gap: 0.6rem; padding: 0.8rem 1.1rem; border-top: 1px solid var(--rule); }
.chat-input input {
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--rule);
  border-radius: 99px;
  outline: none;
}
.chat-input input:focus { border-color: var(--navy); }

/* ---- static pages (roleplay / assist) ---- */
.hero-band {
  background: var(--navy-d);
  color: #fff;
  border-radius: 4px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}
.hero-band .ht {
  font-family: "Zen Old Mincho", serif;
  font-size: clamp(17px, 3.6vw, 22px);
  font-weight: 600;
  line-height: 1.6;
}
.hero-band .hd { font-size: 12.5px; color: #c6d5e9; margin-top: 0.4rem; }
.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }
.info-box { padding: 1.1rem 1.2rem; }
.info-box h3 { margin: 0 0 0.5rem; font-size: 14.5px; }
.info-box ul { margin: 0; padding-left: 1.2em; font-size: 13px; color: var(--ink2); }
.info-box li { margin-bottom: 0.4rem; }
.roleplay-mock { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.7rem; }
.rp-line { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 13px; line-height: 1.7; }
.rp-line .who {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.1rem 0.5rem;
  margin-top: 0.15rem;
}
.rp-line.guest .who { background: var(--brass-l); color: var(--brass-d); }
.rp-line.staff .who { background: var(--navy-l); color: var(--navy-d); }
.rp-line.ai .who { background: var(--good-l); color: var(--good); }
.wall {
  border-left: 3px solid var(--bad);
  background: var(--white);
  padding: 0.7rem 1rem;
  margin-bottom: 0.7rem;
  border-radius: 0 3px 3px 0;
}
.wall b { font-size: 13.5px; }
.wall p { margin: 0.15rem 0 0; font-size: 12px; color: var(--muted); }

.note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.8rem;
}

/* ---- gate ---- */
#gate {
  position: fixed;
  inset: 0;
  background: var(--navy-d);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#gate .g-card {
  background: #fff;
  border-radius: 6px;
  padding: 2rem 1.8rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
#gate .g-title { font-family: "Zen Old Mincho", serif; font-size: 17px; font-weight: 600; margin-bottom: 1rem; }
#gate input {
  width: 100%;
  font: inherit;
  text-align: center;
  padding: 0.6rem;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 0.8rem;
  outline: none;
}
#gate input:focus { border-color: var(--navy); }
#gate .g-err { color: var(--bad); font-size: 12px; min-height: 1.2em; margin-top: 0.5rem; }
