/* TYKI Site styles. Colors come from the Yoshukai logo: red ring, black kanji, white field. */

/* Fonts are served from tyki.org itself (T20), not Google: Latin letters only, open license (OFL). */
@font-face {
  font-family: "Noto Serif"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/assets/fonts/noto-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/source-sans-3-italic-latin.woff2") format("woff2");
}

:root {
  --red: #b22316;
  --red-dark: #8c1a10;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --paper: #faf7f2;
  --card: #ffffff;
  --line: #e7e1d8;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; }

/* Header */
.site-header {
  background: var(--card);
  border-top: 6px solid var(--red);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { width: 64px; height: 64px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 1.2rem/1.25 var(--serif); }
.brand-sub { font-size: .875rem; color: var(--ink-soft); letter-spacing: .02em; }
@media (max-width: 899px) {
  .brand { gap: 10px; }
  .brand img { width: 52px; height: 52px; }
  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: .8rem; }
}
@media (max-width: 420px) { .brand-sub { display: none; } }

/* Menu: a button that opens a list on phones, a plain row on wide screens */
.site-header { position: relative; }
.menu-btn {
  flex: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  font: 600 1rem var(--sans); color: var(--ink); background: var(--card);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px;
}
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--card); border-bottom: 1px solid var(--line);
  flex-direction: column; padding: 4px 16px 12px;
}
.site-nav.open { display: flex; }
.site-nav a {
  color: var(--ink); text-decoration: none; padding: 10px 4px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a[aria-current="page"] { color: var(--red); }

@media (min-width: 900px) {
  .header-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .menu-btn { display: none; }
  .site-nav, .site-nav.open {
    display: flex; position: static; padding: 0; border: 0; background: none;
    flex-direction: row; flex-wrap: wrap; gap: 4px 24px;
  }
  .site-nav a { border: 0; padding: 4px 0; border-bottom: 2px solid transparent; }
  .site-nav a:last-child { border-bottom: 2px solid transparent; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--ink); }
  .brand img { width: 72px; height: 72px; }
  .brand-name { font-size: 1.45rem; }
}

/* Home hero */
.hero { background: var(--ink); color: #fff; }
.hero-row { padding-top: 44px; padding-bottom: 48px; }
.hero h1 { font: 700 clamp(1.7rem, 4vw, 2.6rem)/1.15 var(--serif); margin: 0 0 12px; }
.hero-kicker { margin: 0 0 6px; color: #f3b4ac; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.hero-lead { max-width: 62ch; margin: 0 0 20px; color: #e7e5e4; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 6px; font-weight: 600;
  background: var(--red); color: #fff; text-decoration: none; border: 2px solid var(--red);
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
@media (max-width: 640px) { .hero-row { padding-top: 28px; padding-bottom: 32px; } }

/* Inner page title band */
.page-title { background: var(--ink); color: #fff; border-bottom: 4px solid var(--red); }
.page-title h1 { font: 700 clamp(1.6rem, 3.5vw, 2.3rem)/1.2 var(--serif); margin: 0; padding: 28px 0; }

/* Page text */
.page-body { padding-top: 32px; padding-bottom: 56px; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 1.1em; }
.prose h2 {
  font: 700 1.4rem/1.3 var(--serif); margin: 1.8em 0 .5em; padding-top: .4em;
  border-top: 1px solid var(--line); scroll-margin-top: 16px;
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose .lead { font-size: 1.2rem; font-style: italic; color: var(--ink-soft); }
.prose .note {
  font-size: .95rem; color: var(--ink-soft); background: var(--card);
  border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 0 6px 6px 0;
}

/* "On this page" list for long pages such as Kata */
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 28px; }
.toc-label { margin: 0 0 6px; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.toc a { display: inline-block; margin: 2px 14px 2px 0; text-decoration: none; font-weight: 600; }
@media (min-width: 900px) {
  .has-toc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 40px; align-items: start; }
  .has-toc .toc { position: sticky; top: 16px; margin: 0; max-height: calc(100vh - 32px); overflow: auto; }
  .has-toc .toc a { display: block; margin: 0; padding: 3px 0; }
}

/* Footer */
.site-footer { background: var(--ink); color: #d6d3d1; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid p { margin: 0 0 8px; }
.footer-name { font: 700 1.05rem/1.3 var(--serif); color: #fff; }
.footer-label { font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.footer-links a { display: inline-block; margin-right: 14px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { border-top: 1px solid #3f3a36; padding-top: 14px; padding-bottom: 20px; font-size: .85rem; color: #a8a29e; }

/* Home: announcements */
.announcements { background: var(--card); border-bottom: 1px solid var(--line); padding: 28px 0 32px; }
.section-label { font: 600 .85rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin: 0 0 16px; }
.ann-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ann { border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 6px; padding: 16px 18px; background: var(--paper); }
.ann img { display: block; width: calc(100% + 36px); max-width: none; height: auto; max-height: 520px; margin: -16px -18px 14px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.ann h3 { font: 700 1.1rem/1.3 var(--serif); margin: 0 0 8px; }
.ann p { margin: 0 0 8px; }
.ann p:last-child { margin-bottom: 0; }

/* Home: text with a side column for class times and location */
.home-grid { display: grid; gap: 32px; }
@media (max-width: 899px) { .home-grid .side { order: -1; } }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; } }
.side { display: grid; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.card h2 { font: 700 1.15rem/1.3 var(--serif); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.card h3 { font: 600 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 16px 0 6px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.class-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.class-row p { margin: 0; }
.class-name { font-weight: 600; }
.class-ages { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.class-when { color: var(--ink-soft); font-size: .95rem; }
.card-more { margin-top: 12px !important; font-weight: 600; }

/* Key dates timeline (History page) */
.timeline { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px 8px; margin-top: 8px; }
.timeline h2 { font: 700 1.15rem/1.3 var(--serif); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.timeline ol { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--red);
}
.tl-date { display: block; font-weight: 700; color: var(--red); line-height: 1.3; }
.tl-text { display: block; font-size: .95rem; line-height: 1.5; color: var(--ink); }
@media (min-width: 900px) {
  .has-timeline { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
  .has-timeline .timeline { margin-top: 0; }
}
.jump-dates { font-weight: 600; }
@media (min-width: 900px) { .jump-dates { display: none; } }

/* Instructor cards (Our School page) */
.profiles { display: grid; gap: 16px; margin: 0 0 1.6em; }
.profile { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.profile h3 { font: 700 1.15rem/1.3 var(--serif); margin: 0 0 4px; }
.profile p { margin: 0; font-size: 1rem; line-height: 1.6; }
.profile strong { color: var(--red); font-weight: 600; }
.profile-pic { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.profile-initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; border: 3px solid var(--red);
  font: 700 1.5rem/1 var(--serif); letter-spacing: .02em;
}
@media (max-width: 480px) { .profile { flex-direction: column; } }

/* Belt-level groups and core kata badges (Kata page) */
.belt { --belt: var(--ink); }
.belt-beginner { --belt: linear-gradient(90deg, #ffffff 50%, #f2c94c 50%); }
.belt-green { --belt: #2f7d32; }
.belt-brown { --belt: #6d4c2f; }
.belt-black { --belt: #1c1917; }
.prose h2.group {
  font-size: 1.6rem; margin-top: 2.2em; padding-top: .6em; border-top: 3px solid var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.prose h2.group:first-child { margin-top: 0; }
.prose h2.belt::before {
  content: ""; flex: none; width: 44px; height: 14px; border-radius: 3px;
  background: var(--belt); border: 1px solid #a8a29e;
}
.prose h3 {
  font: 700 1.3rem/1.3 var(--serif); margin: 1.6em 0 .4em; scroll-margin-top: 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
}
.badge {
  font: 600 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em;
  color: #fff; background: var(--red); padding: 5px 8px; border-radius: 4px;
}
.toc a.toc-group {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 10px 0 2px; color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
}
.toc a.toc-group:first-of-type { margin-top: 0; }
.toc a.toc-group.belt::before {
  content: ""; flex: none; width: 22px; height: 8px; border-radius: 2px;
  background: var(--belt); border: 1px solid #a8a29e;
}
.toc-star { color: var(--red); font-size: .85em; }
@media (min-width: 900px) {
  .has-toc .toc a.toc-group { margin-top: 12px; }
  .has-toc .toc a:not(.toc-group) { padding-left: 30px; }
}

/* Class Schedule page */
.schedule-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .schedule-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; } }
.schedule-main > section + section { margin-top: 32px; }
.week-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.week-days li { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px; min-height: 96px; font-size: .9rem; line-height: 1.35; }
.week-days li.has-class { border-top: 4px solid var(--red); }
.week-days li.no-class { color: var(--ink-soft); background: transparent; }
.week-day { display: block; font-weight: 700; margin-bottom: 6px; }
.week-day .short { display: none; }
.week-class { display: block; margin-bottom: 6px; }
.week-none { font-size: .85rem; }
@media (max-width: 700px) {
  .week-days { grid-template-columns: 1fr; gap: 6px; }
  .week-days li { min-height: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 8px 12px; }
  .week-days li.has-class { border-top: 1px solid var(--line); border-left: 4px solid var(--red); }
  .week-day { width: 90px; margin: 0; }
  .week-class br { display: none; }
  .week-class strong::after { content: " · "; font-weight: 400; }
  .week-class strong:last-child::after { content: ""; }
}
.class-cards { display: grid; gap: 16px; }
.class-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.class-card h3 { font: 700 1.25rem/1.3 var(--serif); margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.class-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.class-card dt { font-weight: 600; color: var(--ink-soft); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.class-card dd { margin: 0; }
.class-notes { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.badge-soft { background: var(--paper); color: var(--red); border: 1px solid var(--red); }
@media (max-width: 480px) { .class-card dl { grid-template-columns: 1fr; gap: 0; } .class-card dd { margin-bottom: 8px; } }
.prose-card p { margin: 0 0 10px; }

/* New students box (Schedule page; turned on and off in the site settings) */
.new-students { margin-top: 32px; border-top: 4px solid var(--red); }
.new-students h2 { border-bottom: 0; padding-bottom: 0; font-size: 1.3rem; }
.new-students .btn { margin-top: 4px; }
.video { position: relative; aspect-ratio: 16 / 9; margin-top: 14px; border-radius: 6px; overflow: hidden; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Events page */
.events-page > * { max-width: 880px; }
.events-intro { margin-bottom: 24px; }
.empty-note { background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 16px 18px; margin: 0; }
.event-list { display: grid; gap: 16px; }
.event { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 8px; padding: 18px 20px; }
.date-block {
  flex: none; width: 72px; text-align: center; background: var(--ink); color: #fff;
  border-radius: 6px; padding: 8px 4px; align-self: flex-start; line-height: 1.1;
}
.db-top, .db-bottom { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #f3b4ac; }
.db-big { display: block; font: 700 1.6rem/1.15 var(--serif); margin: 2px 0; }
.event-body { min-width: 0; flex: 1; }
.event h3 { font: 700 1.25rem/1.3 var(--serif); margin: 0 0 10px; }
.event dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0; }
.event dt { font-weight: 600; color: var(--ink-soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.event dd { margin: 0; overflow-wrap: anywhere; }
.event-details { margin: 12px 0 0; color: var(--ink-soft); }
.event-link { margin: 10px 0 0; font-weight: 600; }
@media (max-width: 560px) {
  .event { flex-direction: column; gap: 12px; }
  .date-block { width: auto; display: flex; gap: 8px; align-items: baseline; padding: 6px 12px; }
  .db-big { font-size: 1.1rem; margin: 0; }
  .event dl { grid-template-columns: 1fr; gap: 0; }
  .event dd { margin-bottom: 8px; }
}
.archive { margin-top: 40px; }
.archive-year { font: 700 1.2rem/1.3 var(--serif); margin: 24px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.archive-date { color: var(--ink-soft); font-size: .95rem; }
.archive-title { font-weight: 600; }
.archive-where { grid-column: 2; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 560px) {
  .archive-list li { grid-template-columns: 1fr; }
  .archive-where { grid-column: 1; }
}

/* Links page */
.links-intro { margin-bottom: 24px; }
.link-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.link-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 8px; padding: 16px 18px; }
.link-card h2 { font: 700 1.15rem/1.3 var(--serif); margin: 0 0 6px; }
.link-card h2 a { color: var(--ink); text-decoration: none; }
.link-card h2 a:hover { color: var(--red); text-decoration: underline; }
.link-card h2 a::after { content: " ↗"; color: var(--red); font-size: .85em; }
.link-who { margin: 0 0 4px; }
.link-site { margin: 0; font-size: .9rem; color: var(--ink-soft); overflow-wrap: anywhere; }

/* Contact page */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; } }
.contact-main { max-width: 640px; }
.contact-intro { margin-bottom: 20px; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { display: block; font-size: .9rem; color: var(--ink-soft); margin: -2px 0 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #b8b0a6; border-radius: 6px; padding: 10px 12px;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: 3px solid rgba(178, 35, 22, .25); border-color: var(--red); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); border-width: 2px; }
.field .error { display: block; color: var(--red); font-weight: 600; font-size: .95rem; margin-top: 4px; }
.form-actions { margin: 0; }
.form-actions .btn { font: 600 1rem var(--sans); cursor: pointer; padding: 12px 22px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid; }
.notice h2 { font: 700 1.2rem/1.3 var(--serif); margin: 0 0 6px; }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice-ok { background: #edf7ee; border-color: #8cc79a; }
.notice-warn { background: #fdf1ef; border-color: #e3a49c; font-weight: 600; }
/* Admin preview banner on public pages */
.preview-bar { position: sticky; top: 0; z-index: 20; background: #9a6700; color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; }

/* Photo albums (T17) */
.photos-intro { margin-bottom: 24px; }
.album-grid, .photo-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.album-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.album-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); }
.album-card:hover { border-color: var(--red); }
.album-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.album-name { display: block; font: 700 1.1rem/1.3 var(--serif); padding: 12px 14px 2px; }
.album-n { display: block; color: var(--ink-soft); font-size: .9rem; padding: 0 14px 12px; }
.back-link { margin: 0 0 8px; font-weight: 600; }
.album-title { font: 700 1.6rem/1.25 var(--serif); margin: 0 0 6px; }
.album-desc { max-width: 72ch; margin: 0 0 6px; }
.album-count { color: var(--ink-soft); margin: 0 0 16px; }
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.photo-grid a { display: block; border-radius: 6px; overflow: hidden; }
.photo-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.photo-grid a:hover img { transform: scale(1.03); }
.photo-cap { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.35; }
@media (max-width: 480px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } .album-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .album-name { font-size: 1rem; padding: 8px 10px 0; } .album-n { padding: 0 10px 8px; } }

.lb-open, .lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 16, .95); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; max-width: calc(100vw - 120px); text-align: center; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 120px); margin: 0 auto; border-radius: 4px; }
.lb-cap { color: #fff; margin: 10px 0 0; }
.lb-count { color: #a8a29e; font-size: .9rem; margin: 4px 0 0; }
.lb-btn, .lb-close { background: rgba(255, 255, 255, .12); color: #fff; border: 0; cursor: pointer; border-radius: 50%; }
.lb-btn { width: 48px; height: 48px; font-size: 2rem; line-height: 1; margin: 0 12px; flex: none; }
.lb-btn:hover, .lb-close:hover { background: var(--red); }
.lb-btn[hidden] { visibility: hidden; display: block; }
.lb-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; }
@media (max-width: 640px) {
  .lb-fig { max-width: 100vw; }
  .lb-btn { position: absolute; bottom: 18px; margin: 0; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }
  .lb-img { max-height: calc(100vh - 170px); }
}

/* Without JavaScript the Menu button can't open the list, so on phones the page list is
   simply shown under the header instead (the "js" class is set by a one-line script). */
@media (max-width: 899px) {
  .no-js .menu-btn { display: none; }
  .no-js .site-nav { display: flex; position: static; flex: 0 0 100%; flex-direction: row; flex-wrap: wrap; gap: 0 16px; padding: 0 0 4px; border: 0; background: none; }
  .no-js .site-nav a { border: 0; padding: 6px 0; }
  .no-js .header-row { flex-wrap: wrap; }
}
main:focus { outline: none; } /* focused only by the Skip to content link */
