
:root {
  --cream: #fcf9f4;
  --ink: #333;
  --link: #1f7083;
  --brown: #8a6137;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Meiryo, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }

.sr-only,
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 12px; background: #fff; border: 2px solid #333; }

.site-header {
  width: 1000px;
  min-height: 86px;
  margin: 20px auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.brand-block { display: flex; align-items: flex-end; gap: 26px; }
.logo { display: block; width: 227px; height: 54px; }
.brand-block p { width: 390px; margin: 0 0 5px; color: #6d5a41; font-size: 12px; white-space: nowrap; }
.header-tools { padding-top: 3px; }
.socials { display: flex; justify-content: flex-end; gap: 3px; margin-bottom: 8px; }
.socials img { display: block; width: 24px; height: 24px; }
.search { width: 224px; height: 25px; display: flex; padding: 2px; border: 1px solid #d4cab8; border-radius: 4px; background: #f1ece3; }
.search input { min-width: 0; flex: 1; height: 19px; border: 1px solid #bfb7aa; background: #fff; }
.search button { width: 48px; height: 19px; padding: 0; color: #fff; border: 0; background: #88735c; font-size: 11px; line-height: 19px; cursor: pointer; }

.primary-nav { width: 100%; min-width: 1000px; height: 100px; background: #ece6dc; border-top: 1px solid #ddd3c5; border-bottom: 1px solid #d8cdbd; }
.primary-nav ul { width: 1000px; height: 100%; margin: 0 auto; display: grid; grid-template-columns: 100px 142px 150px 150px 142px 166px 150px; }
.primary-nav li { position: relative; display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,.65); text-align: center; }
.primary-nav li:first-child { border-left: 1px solid rgba(255,255,255,.65); }
.primary-nav li::before { content: ""; position: absolute; top: 19px; width: 31px; height: 25px; border-radius: 50% 50% 45% 45%; background: rgba(255,255,255,.5); box-shadow: 9px 5px 0 -6px rgba(77,55,31,.18); }
.primary-nav a { position: relative; z-index: 1; width: 100%; padding-top: 42px; color: #5e554b; font-size: 13px; font-weight: 700; }
.primary-nav .home { background: #f3e6c3; }
.primary-nav .about { background: #e7e0b7; }
.primary-nav .dog { background: #d8e6c2; }
.primary-nav .cat { background: #f6d9c9; }
.primary-nav .event { background: #d8e5eb; }
.primary-nav .volunteer { background: #eadbf0; }
.primary-nav .help { background: #f2e1b9; }

.important-note { width: 1000px; min-height: 48px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; color: #4b4035; font-size: 13px; border-bottom: 1px dotted #a99c88; }
.important-note a { font-size: 12px; }
.breadcrumb { width: 1000px; margin: 16px auto 20px; font-size: 12px; color: #777; }

.page-shell { width: 1000px; margin: 0 auto 60px; display: grid; grid-template-columns: 200px 760px; gap: 40px; align-items: start; }
.sidebar { width: 200px; }
.menu-title { display: block; width: 200px; height: 38px; }
.side-nav { margin-bottom: 20px; border-right: 1px solid #d9cdbf; border-left: 1px solid #d9cdbf; }
.side-nav li { border-bottom: 1px dotted #baa88f; background: #f7f1e9; }
.side-nav li:nth-child(n+2):nth-child(-n+5) { background: #fff; }
.side-nav a { display: block; padding: 7px 11px; color: #625445; font-size: 12px; }
.side-nav li:nth-child(n+2):nth-child(-n+5) a { padding-left: 25px; }
.side-nav .current { background: #e3ead2; font-weight: 700; }
.banner-stack { display: grid; gap: 3px; margin: 0 0 18px; }
.banner-stack a, .banner-stack img { display: block; width: 200px; }
.donation { margin: 18px 0; padding: 13px 14px; border: 1px solid #dbcbb6; background: #fffaf3; }
.donation > a { display: block; margin: -13px auto 10px; text-align: center; }
.donation h3 { margin: 11px 0 5px; padding: 2px 5px; color: #694d32; background: #eee1cf; font-size: 12px; }
.donation p { margin: 0 0 11px; font-size: 11px; line-height: 1.65; }
.reprint { font-size: 11px; }

.profile-card { width: 760px; min-height: 750px; }
.graduation-number { margin: 0 0 11px; color: #b05959; font-size: 14px; }
.tags { display: flex; gap: 6px; margin-bottom: 7px; }
.tags a { padding: 3px 9px; color: #fff; border-radius: 2px; background: #a4af7b; font-size: 11px; }
.profile-card > h1 { margin: 0; padding: 8px 0 10px; border-top: 1px dotted #b9a792; border-bottom: 1px dotted #b9a792; color: #4c4035; font-size: 20px; font-weight: 700; }
.profile-summary { display: grid; grid-template-columns: 200px 440px; gap: 55px; margin-top: 20px; align-items: start; }
.hero-photo { display: block; width: 200px; height: 267px; overflow: hidden; background: #eee; }
.hero-photo img { width: 200px; height: 267px; object-fit: cover; }
.details { width: 440px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.details tr { border-bottom: 1px dotted #b9a792; }
.details th, .details td { padding: 5px 9px; vertical-align: middle; }
.details th { width: 142px; color: #6e5d4c; text-align: left; font-weight: 700; background: #f1eadf; }
.details td { background: rgba(255,255,255,.38); }
.creator-note { display: block; margin-top: 1px; color: #8c7d6c; font-size: 10px; line-height: 1.35; }
.published { margin: 10px 0 0; text-align: right; color: #777; font-size: 11px; }
.photo-section { margin-top: 40px; padding-top: 12px; border-top: 1px dotted #b9a792; }
.photo-section h2 { margin: 0 0 14px; line-height: 1; }
.photo-section h2 img { width: 60px; height: 16px; }
.photo-grid { display: flex; align-items: flex-start; gap: 12px; }
.photo-grid a { display: block; height: 150px; padding: 3px; border: 1px solid #cfbfaa; background: #fff; }
.photo-grid img { display: block; width: auto; height: 142px; object-fit: cover; }

.site-footer { border-top: 1px solid #d8cbb8; background: #ece3d5; }
.footer-grid { width: 1000px; margin: 0 auto; padding: 28px 0 25px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.footer-grid h2 { display: flex; align-items: center; gap: 5px; margin: 0 0 8px; color: #5b4e40; font-size: 12px; }
.footer-grid h2 img { width: 20px; height: 20px; }
.footer-grid li { margin: 2px 0; font-size: 10px; line-height: 1.45; }
.footer-grid a { color: #6c5a48; }
.copyright { margin: 0; padding: 9px; border-top: 1px solid rgba(127,106,79,.25); text-align: center; color: #7a6b59; font-size: 10px; }
.to-top { position: fixed; right: 22px; bottom: 20px; display: grid; width: 42px; height: 42px; place-items: center; color: #fff; border-radius: 50%; background: rgba(112,89,64,.76); font-size: 20px; }

.lightbox { position: fixed; z-index: 50; inset: 0; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox:target { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(28,24,20,.85); }
.lightbox figure { position: relative; z-index: 1; max-width: min(760px, 90vw); max-height: 88vh; margin: 0; padding: 10px; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.lightbox figure img { display: block; max-height: calc(88vh - 56px); margin: auto; }
.lightbox .close { display: block; padding: 7px 3px 0; text-align: right; color: #5b4e40; font-size: 12px; }

@media (max-width: 1040px) {
  .site-header, .important-note, .breadcrumb, .page-shell, .footer-grid { width: calc(100% - 32px); }
  .primary-nav { min-width: 0; overflow-x: auto; }
  .primary-nav ul { width: 1000px; }
  .page-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
  .profile-card { width: 100%; }
  .profile-summary { grid-template-columns: 180px minmax(0, 1fr); gap: 28px; }
  .hero-photo { width: 180px; height: 240px; }
  .hero-photo img { width: 180px; height: 240px; }
  .details { width: 100%; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-block p { width: auto; white-space: normal; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .site-header { min-height: 0; margin-top: 12px; flex-direction: column; gap: 12px; }
  .brand-block { display: block; }
  .brand-block p { margin-top: 5px; font-size: 11px; }
  .header-tools { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .socials { margin: 0; }
  .search { width: 190px; }
  .primary-nav { height: 84px; margin-top: 14px; }
  .primary-nav ul { width: 840px; grid-template-columns: repeat(7, 120px); }
  .primary-nav li::before { top: 12px; }
  .primary-nav a { padding-top: 37px; font-size: 11px; }
  .important-note { padding: 10px 0; align-items: flex-start; flex-direction: column; gap: 2px; font-size: 11px; }
  .breadcrumb { margin-top: 12px; }
  .page-shell { display: flex; flex-direction: column; margin-bottom: 35px; }
  .profile-card { order: 1; }
  .sidebar { order: 2; width: 100%; margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); justify-content: center; gap: 18px; }
  .sidebar > * { margin-top: 0; }
  .menu-title, .side-nav, .reprint { grid-column: 1 / -1; }
  .menu-title { width: 200px; max-width: 100%; height: 38px; object-fit: contain; object-position: left center; }
  .side-nav, .reprint { width: 100%; }
  .side-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); }
  .profile-summary { grid-template-columns: 120px minmax(0, 1fr); gap: 15px; }
  .hero-photo { width: 120px; height: 160px; }
  .hero-photo img { width: 120px; height: 160px; }
  .details { font-size: 11px; }
  .details th, .details td { padding: 3px 5px; }
  .details th { width: 102px; }
  .published { text-align: left; }
  .photo-grid { overflow-x: auto; padding-bottom: 8px; }
  .photo-grid a { flex: 0 0 auto; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .site-header, .important-note, .breadcrumb, .page-shell, .footer-grid { width: calc(100% - 22px); }
  .header-tools { align-items: flex-end; flex-direction: column; gap: 8px; }
  .search { width: 100%; }
  .profile-card > h1 { font-size: 17px; }
  .profile-summary { display: block; }
  .hero-photo { width: 200px; height: 267px; margin: 0 auto 18px; }
  .hero-photo img { width: 200px; height: 267px; }
  .details th { width: 120px; }
  .sidebar { display: block; }
  .sidebar > * { margin-bottom: 18px; }
  .banner-stack { align-items: start; grid-template-columns: repeat(2, 1fr); }
  .banner-stack a, .banner-stack img { width: 100%; }
  .side-nav ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
