:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #27292d;
  --muted: #62666d;
  --line: #e3e4e7;
  --brand: #27292d;
  --brand-soft: #f7f7f8;
  --accent: #505761;
  --accent-soft: #f4f4f5;
  --shadow: none;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15.5px;
  line-height: 1.8;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  position: relative;
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  /* Match the app landing title without adding a font download. */
  font-family: Optima, "Avenir Next", "Helvetica Neue", ui-sans-serif,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-kerning: normal;
  color: #505761;
}

.logo-mark {
  display: block;
  width: 29px;
  height: 31px;
  flex-shrink: 0;
  overflow: visible;
}

.logo-mark.quilloc-feather {
  color: rgba(80, 87, 97, 0.72);
  transform: scale(1.17);
  transform-origin: center;
}

.logo-mark:not(.quilloc-feather) path {
  fill: currentColor;
  fill-opacity: 0.12;
  stroke: currentColor;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--muted);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

a:focus-visible,
.faq summary:focus-visible,
.site-language:focus-visible,
.site-menu-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.site-language {
  flex-shrink: 0;
  margin-left: auto;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
}

/* Header navigation only. Native details keeps the menu usable without JavaScript. */
.site-menu {
  flex: 0 0 44px;
}

.site-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--muted);
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.site-menu-toggle::-webkit-details-marker {
  display: none;
}

.site-menu-toggle:hover,
.site-menu[open] > .site-menu-toggle {
  color: var(--text);
  background: var(--brand-soft);
}

.site-menu-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 18px;
}

.site-menu-icon > span {
  position: absolute;
  left: 0;
  top: 8px;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 140ms ease, opacity 140ms ease;
}

.site-menu-icon > span:first-child { transform: translateY(-6px); }
.site-menu-icon > span:last-child { transform: translateY(6px); }
.site-menu[open] .site-menu-icon > span:first-child { transform: rotate(45deg); }
.site-menu[open] .site-menu-icon > span:nth-child(2) { opacity: 0; }
.site-menu[open] .site-menu-icon > span:last-child { transform: rotate(-45deg); }

.site-menu .site-nav {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(280px, 100%);
  max-height: calc(100vh - 92px);
  max-height: calc(100dvh - 92px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-flow: column nowrap;
  align-items: stretch;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg);
}

.site-menu .site-nav a {
  flex-shrink: 0;
  min-height: 48px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
}

.site-menu .site-nav a:last-child {
  border-bottom: 0;
}

.site-menu .site-nav a:hover {
  background: var(--brand-soft);
}

@media (prefers-reduced-motion: reduce) {
  .site-menu-icon > span { transition: none; }
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

main {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  overflow-wrap: anywhere;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--panel);
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

/* Download links are enabled only after their official URL is configured. */
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.section {
  padding: 34px 0;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  letter-spacing: normal;
}

.section-lead {
  max-width: 760px;
  color: var(--muted);
  margin: 0 0 22px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.page {
  padding: 48px 0 64px;
}

.page h1 {
  margin: 0 0 24px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
}

.page h2 {
  margin: 32px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6;
}

.page p,
.page li {
  color: var(--text);
}

.page ul {
  padding-left: 22px;
}

/* Native disclosure widgets keep the FAQ usable without JavaScript. */
.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding: 16px 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  cursor: pointer;
}

.faq summary::marker {
  color: var(--muted);
}

.faq details p {
  margin: 0 0 20px;
}

.notice {
  margin: 0 0 32px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.9;
}

.page .notice {
  color: var(--muted);
}

.home-page {
  padding-top: 64px;
}

.home-description,
.home-concept p {
  max-width: 42em;
  margin: 0;
  line-height: 2;
}

.home-concept {
  margin-top: 48px;
}

.home-concept h2 {
  margin: 0 0 20px;
  padding-top: 0;
  border-top: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.home-concept p + p {
  margin-top: 1.5em;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-inner {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .site-header-inner {
    min-height: 68px;
    padding: 8px 0;
    gap: 4px;
  }

  .site-menu .site-nav {
    width: 50%;
  }

  .page {
    padding: 32px 0 48px;
  }

  .home-page {
    padding-top: 48px;
  }

  .grid.three {
    grid-template-columns: 1fr;
  }
}
