@font-face {
  font-family: "Curion Sans Latin";
  src: url("./assets/fonts/sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Curion Sans Japanese";
  src: url("./assets/fonts/sans-jp.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --surface: #fff;
  --ink: #20211f;
  --muted: #696a66;
  --border: #deded9;
  --hover: #f0f0ec;
  --header-height: 66px;
  font-family: "Curion Sans Latin", "Curion Sans Japanese", "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-gutter: stable; }
  html.help-menu-overflowing { overflow-y: hidden; }
}
body { min-width: 320px; margin: 0; padding-top: var(--header-height); background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 60; top: -60px; left: 12px; padding: 10px 14px; background: var(--surface); }
.skip-link:focus { top: 8px; }

.help-header {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 clamp(22px, 3.5vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}
.help-brand { display: inline-flex; align-items: baseline; gap: .28em; flex: none; color: var(--ink); font-size: 1.32rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; text-decoration: none; white-space: nowrap; }
.help-brand strong { font-weight: 700; }
.help-brand span { font-weight: 500; letter-spacing: -.025em; }
.help-header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 168px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--hover);
  color: var(--muted);
  font-size: .83rem;
  text-align: left;
}
.search-trigger span { flex: 1; }
.search-trigger kbd { padding: 2px 4px; border: 1px solid #d4d4ce; border-radius: 4px; background: var(--surface); color: var(--muted); font: inherit; font-size: .69rem; }
.search-trigger:hover { border-color: #b8b9b2; background: #e9e9e5; }
.search-launch:hover { border-color: #a9aaa3; background: #fbfbfa; }
.search-trigger svg, .search-launch svg, .search-dialog-top svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-trigger svg { width: 16px; height: 16px; }
.menu-toggle {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.menu-toggle-line { display: block; width: 18px; height: 1px; background: currentColor; }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) { visibility: hidden; }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:last-child { transform: translateY(-6px) rotate(-45deg); }
.help-menu {
  position: fixed;
  z-index: 35;
  inset: var(--header-height) 0 0;
  padding: 0 24px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
}
.help-menu a { display: block; max-width: 760px; margin: 0 auto; padding: 21px 8px; border-bottom: 1px solid var(--border); font-size: clamp(1.2rem, 3vw, 1.45rem); font-weight: 600; line-height: 1.4; text-decoration: none; }

.search-dialog {
  position: fixed;
  width: min(640px, calc(100% - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  margin: min(12vh, 88px) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 70px #20211f24;
}
.search-dialog::backdrop { background: #20211f78; }
.search-dialog-top { display: flex; align-items: center; gap: 13px; height: 66px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.search-dialog-top input { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 1rem; }
.search-dialog-top input::placeholder { color: #858681; }
.search-close { flex: none; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.search-close:hover { color: var(--ink); }
.search-dialog-body { min-height: 230px; max-height: calc(min(720px, 100dvh - 32px) - 66px); padding: 24px; overflow-y: auto; }
.search-status { margin: 0 0 18px; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.search-results a { display: block; padding: 16px 0; border-top: 1px solid var(--border); text-decoration: none; }
.search-results a:hover strong { text-decoration: underline; text-underline-offset: .25em; }
.search-results strong { display: block; margin-bottom: 5px; font-size: 1rem; }
.search-results span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.6; }

.help-main { min-height: calc(100vh - var(--header-height)); }
.main-inner { width: min(100%, 1160px); margin: 0 auto; padding: 76px 40px 34px; }
.home-intro { max-width: 760px; margin-bottom: 72px; }
.home-intro h1 { margin: 0 0 32px; font-size: clamp(2.65rem, 5vw, 4.2rem); font-weight: 600; letter-spacing: -.025em; word-spacing: .09em; line-height: 1.12; }
.search-launch { display: flex; align-items: center; gap: 13px; width: min(100%, 600px); height: 58px; padding: 0 19px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); text-align: left; }
.search-launch span { flex: 1; }
.search-launch kbd { padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font: inherit; font-size: .73rem; }
#categories { scroll-margin-top: calc(var(--header-height) + 20px); }
.collection-title { margin: 0 0 23px; font-size: 1.38rem; font-weight: 700; letter-spacing: -.03em; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.collection-card { display: flex; min-height: 148px; padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-decoration: none; }
.collection-card:hover { border-color: #b8b9b2; background: #fcfcfb; }
.collection-copy { min-width: 0; }
.collection-copy h3 { margin: 0 0 11px; font-size: 1.04rem; font-weight: 700; letter-spacing: -.02em; }
.collection-copy p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }

.article-inner { width: min(100%, 860px); padding-top: 55px; }
.help-article { scroll-margin-top: calc(var(--header-height) + 72px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 42px; color: var(--muted); font-size: .82rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.help-article h1, .contact-intro h1 { margin: 0 0 26px; font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.2; }
.article-lead { max-width: 700px; margin: 0 0 34px; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.article-body { max-width: 710px; padding-top: 30px; border-top: 1px solid var(--border); }
.article-body p, .article-body li { color: #363733; font-size: .97rem; line-height: 1.95; }
.article-body p { margin: 0 0 22px; }
.article-body ol, .article-body ul { margin: 0 0 28px; padding-left: 1.5em; }
.article-body li + li { margin-top: 13px; }
.article-body h2 { margin: 36px 0 12px; font-size: 1.18rem; letter-spacing: -.02em; }
.article-body section[id] { scroll-margin-top: 100px; }
.article-next { display: flex; flex-wrap: wrap; gap: 10px 24px; max-width: 710px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .88rem; font-weight: 700; }
.article-next a { text-underline-offset: 3px; }

.contact-intro { max-width: 700px; }
.contact-panel { max-width: 710px; margin: 28px 0 48px; padding: 32px 34px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.contact-panel h2 { margin: 0 0 10px; font-size: 1.13rem; }
.contact-panel p { margin: 0 0 20px; color: var(--muted); font-size: .92rem; line-height: 1.8; }
.contact-button { display: inline-flex; align-items: center; min-height: 43px; padding: 10px 17px; border-radius: 6px; background: var(--ink); color: #fff; font-size: .87rem; font-weight: 700; text-decoration: none; }
.contact-button:hover { background: #42433e; color: #fff; }
.contact-address { margin: 16px 0 0 !important; color: var(--ink) !important; font-size: .86rem !important; }
.contact-topics { max-width: 710px; }
.contact-topics h2 { margin: 0 0 18px; font-size: 1.16rem; }
.contact-topics dl { margin: 0; }
.contact-topics dl div { padding: 19px 0; border-top: 1px solid var(--border); }
.contact-topics dt { margin-bottom: 5px; font-size: .95rem; font-weight: 700; }
.contact-topics dd { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }
.contact-note { max-width: 710px; margin-top: 36px; color: var(--muted); font-size: .87rem; line-height: 1.8; }

.help-footer { width: min(100%, 1160px); margin: 70px auto 0; padding: 24px 40px 36px; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }

@media (min-width: 981px) {
  .help-menu { right: auto; width: 260px; padding: 20px 16px 30px; border-right: 1px solid var(--border); }
  .help-menu a { max-width: none; padding: 10px 11px; border: 0; border-radius: 5px; font-size: .9rem; line-height: 1.45; }
  .help-menu a:hover { background: var(--hover); }
  .help-main { margin-left: 260px; }
}
@media (max-width: 980px) {
  .menu-toggle { display: flex; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --header-height: 60px; }
  .help-header { padding: 0 18px; }
  .help-brand { font-size: 1.16rem; }
  .help-header-actions { gap: 8px; }
  .search-trigger { justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: var(--ink); }
  .search-trigger span, .search-trigger kbd { display: none; }
  .main-inner { padding: 52px 20px 24px; }
  .home-intro { margin-bottom: 56px; }
  .home-intro h1 { margin-bottom: 26px; font-size: clamp(2.5rem, 10vw, 3.25rem); }
  .search-launch { height: 54px; }
  .search-launch kbd { display: none; }
  .collection-title { margin-bottom: 12px; font-size: 1.25rem; }
  .collection-grid { display: block; }
  .collection-card { min-height: 0; padding: 19px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
  .collection-card:last-child { border-bottom: 1px solid var(--border); }
  .collection-card:hover { border-color: var(--border); background: transparent; }
  .collection-copy h3 { margin-bottom: 5px; font-size: 1rem; }
  .collection-copy p { font-size: .82rem; }
  .article-inner { padding-top: 29px; }
  .breadcrumb { margin-bottom: 32px; }
  .help-article h1, .contact-intro h1 { font-size: 2.15rem; }
  .article-body { padding-top: 24px; }
  .contact-panel { padding: 25px 20px; }
  .help-footer { margin-top: 48px; padding: 24px 20px 34px; }
  .search-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); margin-top: 12px; }
  .search-dialog-body { max-height: calc(100dvh - 90px); }
}
