@layer theme;

@layer base {
  * {
    text-rendering: geometricprecision;
  }

  body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    line-height: 1.2;
  }

  a, button {
    touch-action: manipulation;
  }

  [role="button"], summary, button, [type="button"] {
    -webkit-user-select: none;
    user-select: none;
  }

  *, :before, :after {
    box-sizing: border-box;
  }

  body {
    -moz-tab-size: 2;
    tab-size: 2;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    max-width: 100%;
    display: block;
  }

  html, body {
    height: -moz-available;
  }

  abbr[title] {
    text-decoration: underline dotted;
  }

  b, strong {
    font-weight: bolder;
  }

  pre, code, kbd, samp {
    font-size: 1em;
  }

  ::-moz-focus-inner {
    border-style: none;
    padding: 0;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  progress {
    vertical-align: baseline;
  }

  [type="search"] {
    appearance: textfield;
    outline-offset: -2px;
  }

  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
  }

  hr {
    height: 0;
    color: inherit;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
    position: relative;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
  }

  body, :host {
    font-family: var(--font-family-sans);
    font-feature-settings: var(--font-feature-sans, normal);
  }

  code, kbd, samp, pre {
    font-family: var(--font-family-mono);
    font-feature-settings: var(--font-feature-mono, normal);
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  button, input, optgroup, select, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    color: inherit;
    background-color: #0000;
    margin: 0;
    padding: 0;
    font-size: 100%;
  }

  *, :before, :after {
    border-style: solid;
    border-width: 0;
  }

  body, blockquote, dl, dd, hr, figure, p, pre, h1, h2, h3, h4, h5, h6 {
    margin: 0;
  }

  td, legend, fieldset {
    padding: 0;
  }

  ul, ol {
    margin: 0;
    padding: 0;
  }

  body {
    -webkit-tap-highlight-color: transparent;
  }

  ul {
    list-style: none;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  [hidden] {
    display: none;
  }
}

@layer defaults, components, utilities;

:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP",
    "Noto Sans CJK JP", "Segoe UI", sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", "Source Han Serif JP", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Mono CJK JP", monospace;
  --bg: #f5f2eb;
  --surface: #fdfcf9;
  --surface-2: #ebe7dd;
  --fg: #1c1e26;
  --muted: #5d5e66;
  --line: #d9d3c5;
  --line-strong: #1c1e26;
  --accent: #2b43b0;
  --accent-fg: #fff;
  --accent-soft: #e1e5f6;
  --sun: #f3d98f;
  --sun-soft: #f8ecc9;
  --sea: #172041;
  --sea-fg: #eef0f8;
  --sea-muted: #b4bad3;
  --sea-line: #34406b;
  --danger: #b42318;
  --danger-soft: #fde8e6;
  --ok: #17692f;
  --focus: #2b43b0;
  --key-bg: #fdfcf9;
  --key-fn-bg: #cbc6ba;
  --key-accent-bg: #2b43b0;
  --key-accent-fg: #fff;
  --kb-bg: #dcd8ce;
  --canvas-bg: #ebe7dd;
  --canvas-dot: #c2bba9;
  --select-fill: #2b43b01f;
  --drop-indicator: #e5484d;
  --panel-shadow: 0 2px 10px #28221424;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f15;
    --surface: #151821;
    --surface-2: #1e222d;
    --fg: #ece8df;
    --muted: #a6a7b0;
    --line: #2b303d;
    --line-strong: #ece8df;
    --accent: #9db0ff;
    --accent-fg: #0b0e1c;
    --accent-soft: #1f2645;
    --sun: #e9cf86;
    --sun-soft: #3a3322;
    --sea: #121a36;
    --sea-fg: #eef0f8;
    --sea-muted: #a9b1cf;
    --sea-line: #2c375e;
    --danger: #ff9a8f;
    --danger-soft: #3a1c19;
    --ok: #7bd88f;
    --focus: #9db0ff;
    --key-bg: #4a4f5e;
    --key-fn-bg: #2f333f;
    --key-accent-bg: #9db0ff;
    --key-accent-fg: #0b0e1c;
    --kb-bg: #1f222b;
    --canvas-bg: #0b0d12;
    --canvas-dot: #343a4b;
    --select-fill: #9db0ff29;
    --drop-indicator: #ff7a80;
    --panel-shadow: 0 2px 12px #00000080;
  }
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  line-height: 1.8;
}

body {
  background: var(--bg);
  min-height: 100vh;
  color: var(--fg);
  margin: 0;
  line-height: 1.7;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-underline-offset: .25em;
  text-decoration: underline 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--sun);
  color: #1c1e26;
}

:where(ul) {
  list-style: outside;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .875em;
}

.skip-link {
  z-index: 100;
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  top: -64px;
  left: 8px;
}

.skip-link:focus {
  top: 8px;
}

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 40px;
  color: var(--fg);
  cursor: pointer;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.3;
  text-decoration: none;
  display: inline-flex;
}

.btn:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn.danger {
  color: var(--danger);
}

.btn.small {
  border-radius: 8px;
  min-height: 32px;
  padding: 2px 10px;
  font-size: .8125rem;
}

.sr-only {
  clip: rect(0 0 0 0);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea {
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: 38px;
  color: var(--fg);
  border-radius: 8px;
  max-width: 100%;
  padding: 4px 8px;
  font-size: 1rem;
}

textarea {
  display: block;
}

::placeholder {
  color: var(--muted);
}

:where(.doc, .wrap) :where(p, ul, ol) {
  margin-block: .9em;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: .08em;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: .8125rem;
  display: flex;
}

.eyebrow:before {
  content: "";
  background: currentColor;
  width: 24px;
  height: 1px;
}

.doc {
  box-sizing: border-box;
  overflow-wrap: anywhere;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc-head {
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 8px;
  padding: 56px 0 32px;
}

.doc-head h1 {
  font-family: var(--font-serif);
  letter-spacing: .02em;
  margin: 14px 0 12px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1.35;
}

.doc-head .lead {
  max-width: 40em;
  color: var(--muted);
  margin: 0;
}

.prose {
  max-width: 40em;
}

.prose h2 {
  font-family: var(--font-serif);
  letter-spacing: .02em;
  margin: 56px 0 14px;
  scroll-margin-top: 88px;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.5;
}

.prose h3 {
  margin: 28px 0 6px;
  font-size: 1rem;
}

.prose ul, .prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--muted);
}

.prose .note {
  color: var(--muted);
  font-size: .9375rem;
}

@layer theme{:root{--font-family-sans:var(--font-sans, ui-sans-serif), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-mono:var(--font-mono, ui-monospace), SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}}@layer utilities{.block{display:block}.bottom{bottom:0}.center{left:0;right:0;margin-left:auto;margin-right:auto}.fit{width:fit-content;height:fit-content}.full{width:100%;height:100%}.grid{display:grid}.left{left:0}.right{right:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.top{top:0}.visible{visibility:visible}}.site-header.svelte-12qhfyh{z-index:10;background:var(--bg);border-bottom:1px solid var(--line);position:sticky;top:0}.inner.svelte-12qhfyh{box-sizing:border-box;max-width:1080px;margin:0 auto;padding:0 20px}.inner.wide.svelte-12qhfyh{max-width:none}.site-header.svelte-12qhfyh .inner:where(.svelte-12qhfyh){flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 24px;min-height:60px;display:flex}.brand.svelte-12qhfyh{color:var(--fg);align-items:center;gap:10px;padding:6px 0;text-decoration:none;display:inline-flex}.brand.svelte-12qhfyh img:where(.svelte-12qhfyh){border-radius:7px;display:block}.brand.svelte-12qhfyh .name:where(.svelte-12qhfyh){font-family:var(--font-serif);letter-spacing:.04em;font-size:1.1875rem;font-weight:600}.brand.svelte-12qhfyh .kanji:where(.svelte-12qhfyh){font-family:var(--font-serif);color:var(--muted);border-left:1px solid var(--line);padding-left:10px;font-size:.875rem}.nav.svelte-12qhfyh{flex-wrap:wrap;gap:2px 22px;margin:0;padding:0;list-style:none;display:flex}.nav.svelte-12qhfyh a:where(.svelte-12qhfyh){color:var(--muted);padding:10px 0;font-size:.875rem;text-decoration:none;display:inline-block;position:relative}.nav.svelte-12qhfyh a:where(.svelte-12qhfyh):hover,.nav.svelte-12qhfyh a[aria-current=page]:where(.svelte-12qhfyh){color:var(--fg)}.nav.svelte-12qhfyh a[aria-current=page]:where(.svelte-12qhfyh):after{content:"";background:var(--fg);height:2px;position:absolute;bottom:4px;left:0;right:0}@media (width<=640px){.site-header.svelte-12qhfyh .inner:where(.svelte-12qhfyh){min-height:0;padding-top:4px}nav.svelte-12qhfyh{scrollbar-width:none;width:calc(100% + 40px);margin:0 -20px;overflow-x:auto}.nav.svelte-12qhfyh{white-space:nowrap;flex-wrap:nowrap;gap:0 18px;padding:0 20px}.nav.svelte-12qhfyh a:where(.svelte-12qhfyh){padding:8px 0 10px}}.site-footer.svelte-12qhfyh{color:var(--muted);margin-top:96px;font-size:.875rem}.site-footer.tool.svelte-12qhfyh{border-top:1px solid var(--line);margin-top:0}.site-footer.svelte-12qhfyh .inner:where(.svelte-12qhfyh){grid-template-columns:minmax(0,1fr);gap:20px 48px;padding-top:28px;padding-bottom:40px;display:grid}@media (width>=760px){.site-footer.svelte-12qhfyh .inner:where(.svelte-12qhfyh){grid-template-columns:auto minmax(0,1fr) auto;align-items:start}}.sign.svelte-12qhfyh{align-items:center;gap:14px;display:flex}.sign.svelte-12qhfyh img:where(.svelte-12qhfyh){border-radius:10px;display:block}.sign.svelte-12qhfyh p:where(.svelte-12qhfyh){margin:0;line-height:1.5}.word.svelte-12qhfyh{font-family:var(--font-serif);color:var(--fg);font-size:1rem}.word.svelte-12qhfyh span:where(.svelte-12qhfyh){font-weight:600}.def.svelte-12qhfyh{font-family:var(--font-serif)}.about.svelte-12qhfyh{margin:0}.links.svelte-12qhfyh{gap:2px;margin:0;padding:0;list-style:none;display:grid}.links.svelte-12qhfyh a:where(.svelte-12qhfyh){color:var(--fg);text-decoration:none}.links.svelte-12qhfyh a:where(.svelte-12qhfyh):hover{text-decoration:underline}#main.svelte-12qhfyh:focus{outline:none}
