* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f0f2f6;
  color: #171b22;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
a { color: #215db0; text-underline-offset: 3px; }
a:hover { color: #123d7c; }
img { display: block; max-width: 100%; height: auto; }
:target { scroll-margin-top: 24px; }
h1, h2, h3 { line-height: 1.5; }
h1 { margin: 0; font-size: 2rem; }
h2 { margin: 0 0 14px; font-size: 1.4rem; color: #244e87; }
h3 { margin: 0 0 8px; font-size: 1.1rem; }
p { margin: 0 0 12px; }
ul { padding-left: 1.4em; margin: 12px 0; }
li { margin: 9px 0; }
section, article { margin: 0 0 32px; }
main > :last-child, section > :last-child, article > :last-child { margin-bottom: 0; }
.nav-container { background: white; }
.site-nav { max-width: 1160px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.site-nav a { padding: 5px 10px; color: #253e60; text-decoration: none; }
.site-nav a:hover, .site-nav [aria-current="page"] { background: #eaf1fa; color: #174b92; }
.site-nav [aria-current="page"] { font-weight: bold; }
.page-header { background: #265ca4; color: white; }
.header-inner { max-width: 1160px; margin: 0 auto; padding: 32px; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 24px; max-width: 1160px; margin: 0 auto; align-items: start; }
main { background: white; padding: 30px 32px 44px; min-width: 0; min-height: 60vh; }
.profile-column { padding: 24px 16px 24px 0; min-width: 0; }
.profile { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px 12px; background: white; padding: 20px; margin: 0; }
.profile h2 { color: #171b22; font-size: 1.125rem; margin: 0 0 4px; }
.profile-name p { font-size: 0.875rem; margin: 0; }
.profile-info { grid-column: 1 / -1; }
.profile-info > p { margin-bottom: 16px; }
.avatar { width: 64px; height: 64px; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.social-links li { margin: 0; }
.social-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: var(--social-color, #24292f); color: white; text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.5; }
.social-links a:hover { filter: brightness(0.9); }
.social-links a:focus-visible { outline: 2px solid #215db0; outline-offset: 3px; }
.social-link--linkedin { --social-color: #0a66c2; }
.social-link--github, .social-link--x { --social-color: #24292f; }
.social-link--pixiv { --social-color: #0076c5; }
.social-link--youtube { --social-color: #c00; }
.social-icon { flex: none; width: 14px; height: 14px; fill: currentColor; }
.social-purpose { font-weight: 400; }
.social-x { flex-basis: 100%; }
.profile-tagline { margin: 0 0 20px; }
.profile-divider { border: 0; border-top: 1px solid #cdd5e0; margin: 0 0 28px; }
.activity-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.activity-date { margin-bottom: 4px; color: #44536a; }
.activity h2 { font-size: 1.2rem; margin-bottom: 8px; }
figure { margin: 0; }
#devil-connection { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif; }
summary { cursor: pointer; font-size: 1.25rem; font-weight: bold; }
.book-entry { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; margin: 20px 0; }
.book-cover { max-width: 170px; }
.book-description h3 { font-size: 1.3rem; }
.book-spec { margin: 16px 0; }
.book-spec > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 12px; margin: 8px 0; }
.book-spec dd { margin: 0; }
.illustration-link { margin-top: 24px; }
.skip-link { position: absolute; top: -100px; left: 24px; background: white; z-index: 1; }
.skip-link:focus { top: 0; }
a:focus-visible, summary:focus-visible { outline: 2px solid; outline-offset: 3px; }
@media (max-width: 800px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .profile-column { padding: 20px; }
  .home .profile-column { grid-row: 1; }
  .profile { grid-template-columns: 64px minmax(0, 1fr); max-width: none; }
  .profile-info > p { margin-bottom: 8px; }
  .header-inner { padding: 24px; }
  .site-nav { padding: 10px 14px; gap: 4px 6px; }
  .site-nav a { padding: 6px 8px; }
  main { padding: 26px 24px 40px; min-height: 0; }
  h1 { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .profile-column { padding: 16px; }
  .profile { padding: 16px; }
  .header-inner, main { padding-left: 20px; padding-right: 20px; }
  .site-nav { gap: 2px; padding-left: 12px; padding-right: 12px; }
  .book-entry { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media print {
  body { background: white; }
  .page-layout { display: block; }
  .site-nav, .skip-link, .profile-column { display: none; }
  .page-header { color: black; background: white; }
  main, .header-inner { padding: 0; }
  article { break-inside: avoid; }
}

/* Language navigation */
.site-nav .language-switch { margin-left: auto; border: 1px solid #ccd9e9; border-radius: 6px; min-width: 48px; text-align: center; white-space: nowrap; }
.site-nav .language-switch:focus-visible { outline: 2px solid #215db0; outline-offset: 2px; }
html[lang="en"] #devil-connection { font-family: Georgia, "Times New Roman", serif; }
