:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1f2933;
  --sub: #5b6b7b;
  --line: #e2e6eb;
  --brand: #00796b;
  --brand-light: #00897b;
  --brand-dark: #00695c;
  --brand-soft: #e0f2f1;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-fab: 0 2px 8px rgba(0, 0, 0, .2);
  --topbar-h: 150px;

  --fs-xs: .72rem;
  --fs-sm: .8rem;
  --fs-md: .85rem;
  --fs-lg: 1rem;
  --fs-xl: 1.25rem;
}

* {
  box-sizing: border-box
}

html {

  overflow-y: scroll;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow)
}

header {
  background: linear-gradient(180deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  padding: 12px 16px 12px
}

.wrap,
.tabs-inner,
main {
  max-width: 1040px;
  margin: 0 auto;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.head-updated {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.head-note {
  margin-top: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  opacity: .85;
}

.brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

.brand-logo {
  height: 34px;
  width: auto;
  flex: 0 0 auto;
}

.brand h1 {
  margin: 0;
  font-size: var(--fs-xl);
}

header p {
  margin: 0;
  opacity: .9;
  font-size: var(--fs-sm)
}

.search {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  font-size: var(--fs-lg);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 10px;
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
}

.search input:focus {
  outline: 2px solid #fff;
  outline-offset: 1px
}

.search input:disabled,
.search button:disabled {
  opacity: .55;
  cursor: default
}

.search button {
  flex: 0 0 auto;
  padding: 0 18px;
  font-size: var(--fs-lg);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--brand);
  background: var(--card);
  border: 1px solid var(--card);
  border-radius: 10px;
}

.search button:hover {
  background: var(--brand-soft)
}

nav.tabs {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.tabs-inner {
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.tabs-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;

  -ms-overflow-style: none;
}

.tabs-scroll::-webkit-scrollbar {
  display: none
}

.tabs-scroll #tabs {
  display: flex;
  gap: 4px;
  padding: 8px 8px;
  white-space: nowrap
}

#tabs button {
  flex: 0 0 auto;
  padding: 7px 13px;
  min-width: 7em;
  text-align: center;
  font-size: var(--fs-md);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--sub);
  font-family: inherit;
}

#tabs button:hover {
  background: var(--brand-soft)
}

#tabs button.active {
  background: var(--brand);
  color: #fff
}

.tabnav {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}

.tabnav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabnav:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.tabnav:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.tabnav[hidden] {
  display: none;
}

main {
  width: 100%;
  padding: 18px 16px 70px;

  flex: 1 0 auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 14px
}

.count {
  font-size: var(--fs-md);
  color: var(--sub);
  min-height: 1.2em
}

.toggle-all,
.empty-back {
  flex: 0 0 auto;
  padding: 6px 12px;
  min-width: 7.5em;
  text-align: center;
  font-size: var(--fs-md);
  cursor: pointer;
  font-family: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  box-shadow: var(--shadow);
}

.toggle-all:hover,
.empty-back:hover {
  background: var(--brand-soft)
}

.empty-back:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.empty-back {
  display: inline-block;
  text-decoration: none;
  margin-top: 12px;
}

.count-chapter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}

.count-chapter .count-num {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--sub);
}

details.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

details.qa[open] {
  border-color: #80cbc4
}

summary.q {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: flex-start
}

summary.q::-webkit-details-marker {
  display: none
}

summary.q::after {
  content: "";
  flex: 0 0 auto;
  align-self: center;
  width: .5em;
  height: .5em;
  margin-left: 4px;
  border-right: 2px solid var(--sub);
  border-bottom: 2px solid var(--sub);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease, border-color .15s ease;
}

details.qa[open] summary.q::after {
  transform: translateY(2px) rotate(225deg);
  border-color: var(--brand);
}

summary.q::before {
  content: "Q";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qbody {
  flex: 1
}

.chaptag {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap
}

.subtag {
  display: inline-block;
  font-size: var(--fs-xs);
  color: var(--sub);
  background: #eef1f4;
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap
}

summary.q:hover {
  background: #fafcff
}

.a {
  padding: 2px 16px 18px 48px;
  color: var(--ink);
  font-size: var(--fs-lg);
  border-top: 1px solid var(--line)
}

.a-inner {
  padding-top: 14px
}

.qaref {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dotted var(--brand)
}

.a-inner .ln.li {
  display: flex;
  align-items: baseline;
}

.li-mark,
.li-num {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 700;
  margin-right: .2em;
}

.li-mark {
  font-size: 1.15em;
  margin-right: .3em;
}

.a-inner .ln.li .li-body {
  flex: 1 1 auto;
  min-width: 0;
}

.a-inner .ln.blank {
  height: 1.7em;
}

.qaref:hover {
  background: var(--brand-soft)
}

.a a[href^="http"] {
  color: var(--brand);
  word-break: break-all
}

.a-inner code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1em .4em;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .92em;
  word-break: break-all
}

mark {
  background: #fff3bf;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px
}

.empty,
.loading {
  color: var(--sub);
  padding: 30px 4px;
  text-align: center
}

.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: var(--fs-lg);
  box-shadow: var(--shadow-fab);
  display: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--sub);
  padding: 20px 16px;
  flex: 0 0 auto;

}

.site-footer p {
  margin: 0 0 4px;
}

.site-footer a {
  color: var(--brand);
}

.site-footer--columns {
  padding: 0;
  color: var(--ink);
}

.site-footer--columns .footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  align-items: center;
  padding: 16px 16px;
  font-size: var(--fs-md);
  line-height: 1.5;

}

.site-footer--columns .footer-company {
  flex: 1 1 260px;
}

.site-footer--columns .footer-links {
  flex: 1 1 260px;
}

.site-footer--columns .footer-logo-link {
  display: inline-block;
  margin: 0 0 6px;
  text-decoration: none;
}

.site-footer--columns .footer-logo-img {
  display: block;
  height: 44px;
  width: auto;
}

.site-footer--columns .footer-links a {
  display: block;
  margin: 0 0 6px;
  color: var(--sub);
  text-decoration: underline;
}

.site-footer--columns .footer-links a:hover {
  color: var(--brand);
}

.site-footer--columns .footer-copybar {
  background: #000;
}

.site-footer--columns .footer-copybar .wrap {
  padding: 10px 16px;
}

.site-footer--columns .footer-copy {
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: var(--fs-sm);
}
