:root {
  --bg: #ffffff;
  --ink: #1c1d20;
  --muted: #808080;
  --line: #d3d3d3;
  --link: #0000ea;
  --link-hover: #696969;
  --hover-bg: #eff2f8;
  --note-bg: #f7f7f7;
  --code-bg: #f7f7f7;
  --sidebar-w: 220px;
  --main-w: 1400px;
  --toc-w: 220px;
  --shell-gap: 40px;
  --layout-gap: 100px;
  --sidebar-align: 18px;
  --figure-standard-w: 900px;
  --figure-small-w: 800px;
  --figure-detail-w: 460px;
  --figure-detail-small-w: 300px;
  --inline-icon-w: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "BIZ UDPGothic", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, var(--main-w));
  justify-content: center;
  column-gap: var(--shell-gap);
}

.sidebar {
  position: sticky;
  top: 67px;
  height: calc(100vh - 67px);
  padding: 18px 0 18px 18px;
  background: #fff;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 5;
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar:hover {
  scrollbar-width: thin;
}

.sidebar:hover::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #d3d3d3;
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar__nav {
  padding: 0 12px 0 0;
}

.nav-section + .nav-section {
  margin-top: 2px;
}

.nav-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.nav-section__toggle:hover,
.nav-list a:hover {
  background: var(--hover-bg);
  color: var(--link-hover);
  text-decoration: none;
}

.nav-section__toggle.is-open {
  color: var(--link-hover);
}

.nav-section__toggle.is-active {
  color: var(--link);
}

.nav-section__toggle::after {
  content: "+";
  color: inherit;
  font-size: 14px;
}

.nav-section__toggle.is-open::after {
  content: "−";
}

.nav-section__title {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
}

.nav-list {
  margin: 0;
  padding: 0 0 0 10px;
  list-style: none;
}

.nav-list li + li {
  margin-top: 1px;
}

.nav-list a {
  display: block;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}

.nav-list a.is-active {
  background: #fff;
  color: var(--link);
  font-weight: 700;
}

.nav-list a.is-active:hover {
  background: #fff;
  color: var(--link);
}

.nav-section__content[hidden] {
  display: none;
}

.sidebar-overlay {
  display: none;
}

.main {
  min-width: 0;
  padding: 0 16px 40px 60px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 67px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar__inner {
  display: grid;
  grid-template-columns:
    var(--sidebar-w)
    var(--shell-gap)
    minmax(0, calc(var(--main-w) - var(--toc-w) - var(--layout-gap)))
    var(--layout-gap)
    var(--toc-w);
  align-items: center;
  max-width: calc(var(--sidebar-w) + var(--shell-gap) + var(--main-w));
  height: 100%;
  margin: 0 auto;
}

.topbar__menu {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  margin-left: var(--sidebar-align);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.topbar__home:hover {
  color: var(--ink);
  text-decoration: none;
}

.topbar__logo {
  display: block;
  width: auto;
  height: 44px;
  object-fit: contain;
}

.topbar__brand {
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.topbar__spacer {
  min-width: 0;
}

.search-panel {
  position: relative;
  grid-column: 5;
  justify-self: start;
  width: var(--toc-w);
  margin-left: -10px;
}

.search-panel::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.search-panel__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-panel__input {
  width: 100%;
  padding: 9px 38px 9px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(28, 29, 32, 0.12);
}

.search-panel__input:focus {
  outline: 0;
  border-color: #6495ed;
  box-shadow:
    0 10px 22px rgba(28, 29, 32, 0.12),
    0 0 0 3px rgba(100, 149, 237, 0.22);
}

.search-panel__hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.search-panel__input::placeholder {
  color: var(--muted);
}

.search-panel__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  padding: 6px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 28px rgba(28, 29, 32, 0.12);
}

.search-panel[data-has-results="true"] .search-panel__results {
  display: block;
}

.search-results {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results li + li {
  margin-top: 6px;
}

.search-results a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--hover-bg);
  color: var(--link-hover);
  text-decoration: none;
}

.search-results__section {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.search-results__title {
  display: block;
  font-weight: 700;
  line-height: 1.45;
}

.search-results__heading {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.search-results__excerpt {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.search-results__empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: var(--layout-gap);
  align-items: start;
}

.page {
  min-width: 0;
}

.breadcrumbs {
  margin: 4px 0 18px;
  font-size: 14px;
  line-height: 1.7;
}

.breadcrumbs a {
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumbs__sep {
  margin: 0 7px;
  color: var(--muted);
}

.content {
  padding: 0 0 40px;
  background: #fff;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  line-height: 1.35;
  scroll-margin-top: 88px;
}

.content h1 {
  margin: 0 0 18px;
  font-size: 30px;
  white-space: nowrap;
}

.content h2 {
  margin: 34px 0 12px;
  padding-top: 0;
  border-top: 0;
  font-size: 22px;
}

.content h3 {
  margin: 24px 0 10px;
  font-size: 16px;
}

.content p,
.content li,
.content blockquote,
.content td,
.content th {
  font-size: 15px;
  line-height: 1.85;
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content table {
  margin: 12px 0 18px;
}

.content ul,
.content ol {
  padding-left: 22px;
}

.content li + li {
  margin-top: 6px;
}

.content a {
  color: var(--link);
  text-decoration: underline;
}

.content a:hover {
  color: var(--link-hover);
}

.content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 4px;
  background: var(--note-bg);
}

.content blockquote.blockquote--note {
  background: #fff3cd;
}

.content blockquote.blockquote--tip {
  background: var(--note-bg);
}

.content code {
  padding: 0.15em 0.45em;
  border-radius: 2px;
  background: transparent;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.95em;
  font-weight: 700;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content table.table--numbered-index th:first-child,
.content table.table--numbered-index td:first-child {
  width: 5em;
  white-space: nowrap;
}

.content th,
.content td {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.content tr:last-child td {
  border-bottom: 0;
}

.content th:last-child,
.content td:last-child {
  border-right: 0;
}

.content th {
  background: var(--hover-bg);
}

.doc-figure {
  margin: 24px 0 30px;
}

.doc-figure img {
  display: block;
  width: min(100%, var(--figure-standard-w));
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 29, 32, 0.14);
}

.doc-figure.doc-figure--standard img {
  width: min(100%, var(--figure-standard-w));
}

.doc-figure.doc-figure--small img {
  width: min(100%, var(--figure-small-w));
}

.doc-figure.doc-figure--detail img,
.doc-figure.doc-figure--detail-modal img {
  width: min(100%, var(--figure-detail-w));
}

.doc-figure.doc-figure--detail-small img {
  width: min(100%, var(--figure-detail-small-w));
}

.doc-figure img[src$="app-left-menu.png"] {
  width: min(100%, 272px);
}

.doc-figure img[src$="usage-guide-notifications-list.png"] {
  width: min(100%, 336px);
}

.content p > img,
.content li > img,
.content blockquote p > img,
.content td > img,
.content th > img {
  display: inline-block;
  width: var(--inline-icon-w);
  max-width: 100%;
  height: auto;
  margin: 0 0.1em;
  vertical-align: text-bottom;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.doc-figure figcaption {
  display: none;
}

.page-toc {
  position: sticky;
  top: 86px;
  padding: 8px 0 0;
}

.page-toc__title {
  display: none;
}

.page-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc__list li + li {
  margin-top: 2px;
}

.page-toc__list a {
  display: block;
  padding: 6px 0 6px 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}

.page-toc__list a:hover {
  background: var(--hover-bg);
  color: var(--link-hover);
  text-decoration: none;
}

.page-toc__list a.is-active {
  color: var(--link);
  font-weight: 700;
}

.page-toc__list a.is-active:hover {
  background: #fff;
  color: var(--link);
}

.page-toc__list .level-3 a {
  padding-left: 18px;
  color: var(--muted);
}

.page-toc__list .level-3 a.is-active {
  color: var(--link);
  font-weight: 700;
}

.page-toc__list .level-3 a.is-active:hover {
  background: #fff;
  color: var(--link);
}

.page-toc__meta {
  display: none;
}

.page-toc__eyebrow {
  display: none;
}

.redirect-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #fff;
}

.redirect-page__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-toc {
    position: static;
  }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .sidebar {
    position: fixed;
    inset: 67px auto 0 0;
    width: min(82vw, 280px);
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay.is-open {
    display: block;
    position: fixed;
    inset: 67px 0 0;
    background: rgba(29, 39, 48, 0.28);
    z-index: 4;
  }

  .main {
    padding: 0 18px 30px;
  }

  .topbar {
    height: 67px;
  }

  .topbar__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: none;
    padding: 0 18px;
    margin: 0;
  }

  .topbar__menu {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .topbar__brand {
    font-size: 16px;
  }

  .topbar__home {
    margin-left: 0;
  }

  .topbar__spacer {
    flex: 1 1 auto;
  }

  .search-panel {
    flex: 0 1 min(220px, calc(100vw - 120px));
    width: auto;
    margin-left: 0;
  }

  .content {
    padding-bottom: 32px;
  }

  .content h1 {
    font-size: 26px;
    white-space: normal;
  }

  .content h2 {
    font-size: 20px;
  }
}
