/* Public photo archive: ice blue, mist and deep blue captions. */
.public-nav { display: none; }
body.public-mode { --paper: #f1f7fb; --ink: #243f50; --muted: #617b8b; --navy: #35647e; --line: #d1e2ec; background: var(--paper); color: var(--ink); }
.public-mode #app { display: block; }
.public-mode #app .sidebar, .public-mode #sidebarToggle, .public-mode .global-search, .public-mode .top-actions { display: none; }
.public-mode .topbar { position: sticky; top: 0; z-index: 45; height: 80px; padding: 0 clamp(20px, 5vw, 84px); background: #f1f7fbf5; border-bottom: 1px solid #d1e2ec; box-shadow: none; }
.public-mode .brand-button { flex: initial; color: var(--ink); }
.public-mode .brand-button strong { font-size: 1.25rem; font-weight: 650; }
.public-mode .brand-button small { display: block; color: #617b8b; font: 0.5625rem/1.8 Georgia, serif; }
.public-mode .brand-mark { background: #dcecf5; border: 1px solid #b8d2e1; box-shadow: none; }
.public-mode .brand-mark i { background: #527f98; }
.public-mode .public-nav { margin-left: auto; display: flex; align-items: center; gap: 32px; }
.public-nav a { text-decoration: none; color: #617b8b; font-size: 0.8125rem; padding: 12px 0; }
.public-nav a[aria-current=page] { color: #243f50; box-shadow: 0 2px #56754a; }
.public-mode .mentor-entry { display: inline-flex; align-items: center; gap: 15px; padding: 10px 17px; min-height: 44px; border: 1px solid #a8c6d8; border-radius: 30px; background: transparent; color: #305568; font-size: 0.8125rem; }
.public-mode .mentor-entry:hover { background: #e0eef6; }
.public-mode .main-content { padding: 38px clamp(20px, 5vw, 84px) 60px; max-width: 1500px; }
.album-home-mode .main-content { padding: 0; max-width: none; }
.memory-home { overflow: hidden; }
.memory-home::before { content:''; position:fixed; inset:80px 0 0; z-index:-1; pointer-events:none; opacity:.22; background:radial-gradient(ellipse at 15% 15%,#9fd2e844,transparent 34%),radial-gradient(ellipse at 88% 28%,#6da9c433,transparent 30%),radial-gradient(ellipse at 52% 100%,#b7dce644,transparent 40%); animation: living-green-drift 18s ease-in-out infinite alternate; }
.memory-home * { box-sizing: border-box; }
.memory-hero { position: relative; isolation: isolate; padding: 35px 0 24px; background: #dcecf5; }
.memory-intro { text-align: center; position: relative; padding: 0 22px; }
.memory-kicker { display: block; font-size: 0.6875rem; font-weight: 500; color: #648399; letter-spacing: .18em !important; }
.memory-intro h1 { margin: 14px 0 12px; color: #254b63; font: 500 clamp(1.875rem, 3vw, 2.75rem)/1.37 'Noto Serif SC', 'Songti SC', 'SimSun', serif; letter-spacing: .04em !important; }
.memory-intro h1 span { display: block; color: #577e97; }
.memory-intro p { margin: 0; font-size: 0.8125rem; line-height: 1.9; color: #617b8b; }
.mobile-break { display: none; }
.memory-cta { display: inline-flex; gap: 23px; align-items: center; margin-top: 23px; min-height: 44px; padding: 11px 22px; border: 1px solid #35647e; border-radius: 28px; color: #fff; background: #35647e; font-size: 0.75rem; box-shadow: 0 4px 10px #35647e15; transition: background .2s, transform .2s; }
.memory-cta:hover { background: #254d65; transform: translateY(-2px); }
/* Character Filmstrip: original CSS 3D depth and material treatment by Meng To (MIT).
   Landscape frames preserve whole lab group photos. See character-filmstrip/LICENSE. */
.filmstrip-shell { margin-top: 8px; }
.film-years { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 18px 18px 4px; }
.film-year-chip { padding: 10px 20px; min-height: 42px; border: 1px solid #a8c6d8; border-radius: 24px; color: #365b70; background: #eff8fc; font-size: 0.75rem; }
.film-year-chip[aria-pressed=true] { color: #f5fbff; background: #305b72; border-color: #305b72; }
.film-year-chip:hover { box-shadow: 0 3px 10px #416c8220; }
.filmstrip {
  --pointer-x: 50%; position: relative; height: 480px; width: 100%;
  isolation: isolate; perspective: 1450px; overflow: hidden; touch-action: pan-y;
  cursor: ew-resize; user-select: none; outline-offset: -4px;
  background: linear-gradient(90deg, #416d8714 1px, transparent 1px) 50% 0 / 25% 100%,
    repeating-linear-gradient(0deg, transparent 0, transparent 109px, #3c698221 110px, transparent 111px),
    radial-gradient(circle at var(--pointer-x) 48%, #f8fdffc7, transparent 34%), #dcecf5;
}
.filmstrip::before, .filmstrip::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.filmstrip::before { z-index: 5; opacity: .10; mix-blend-mode: multiply;
  background: repeating-radial-gradient(circle at 12% 18%, #456d8220 0 .5px, transparent .7px 4px), repeating-radial-gradient(circle at 78% 71%, #ffffff59 0 .5px, transparent .8px 5px); }
.filmstrip::after { z-index: 4; background: linear-gradient(90deg, #39657f24, transparent 14%, transparent 86%, #39657f24); }
.film-deck { position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; }
.film-frame {
  --focus: 0; position: absolute; top: 50%; left: 50%; width: clamp(240px, 25vw, 320px); aspect-ratio: 1.12;
  display: block; padding: 7px; overflow: hidden; border: 1px solid #476a815c; border-radius: 4px;
  color: #eff8ff; background: #e8f3fa; text-decoration: none; transform-style: preserve-3d;
  will-change: transform, opacity, filter; cursor: pointer;
  box-shadow: 0 calc(7px + var(--focus) * 17px) calc(15px + var(--focus) * 26px) rgb(30 65 86 / calc(.12 + var(--focus) * .16)), inset 0 0 0 1px #ffffffa3;
}
.film-frame::before { content: ''; position: absolute; inset: 5px; z-index: 3; border: 1px solid rgb(31 65 85 / calc(.12 + var(--focus) * .12)); pointer-events: none; }
.film-frame:focus-visible { outline: 3px solid #4084ab; outline-offset: 3px; }
.film-image { position: absolute; inset: 7px 7px 25%; overflow: hidden; background: #adc6d5; display: grid; place-items: center; }
.film-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain;
  filter: sepia(calc((1 - var(--focus)) * .24)) saturate(calc(.66 + var(--focus) * .34)) contrast(1.04); }
.film-open { position: absolute; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 6px;
  color: #eff9ff; background: #16394ad9; border-radius: 16px; padding: 6px 9px; font-size: 0.625rem; opacity: 0; }
.film-frame[aria-current=true]:hover .film-open, .film-frame:focus-visible .film-open { opacity: 1; }
.film-caption { position: absolute; right: 7px; bottom: 7px; left: 7px; height: calc(25% - 7px);
  display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px;
  background: #16394a; color: #d4ebf8; text-align: left; }
.film-caption > div { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column-reverse; gap: 5px; }
.film-caption strong { font-size: 0.75rem; font-weight: 600; color: #eff9ff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.film-caption > div > span { color: #a5d3ed; font-size: 0.5625rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.frame-index { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid #72b6dd; border-radius: 50%; color: #a5d3ed; font: 600 0.625rem ui-monospace, monospace; }
.film-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px;
  margin: 0 auto; padding: 14px 28px 0; color: #466a80; font-size: 0.6875rem; }
.film-controls > div { display: flex; align-items: center; gap: 14px; }
.film-mobile-hint { display: none; }
#filmPosition { min-width: 35px; text-align: center; font-variant-numeric: tabular-nums; }
.film-arrow { display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1px solid #95b8cd; border-radius: 50%; background: #e8f3fa; color: #466a80; }
.film-arrow:disabled, .film-motion:disabled { cursor: default; opacity: .55; }
.film-arrow:not(:disabled):hover, .film-motion:not(:disabled):hover { background: #eff9ff; }
.film-motion { border: 0; border-radius: 4px; padding: 10px; background: transparent; color: #466a80; font-size: 0.6875rem; min-height: 42px; }
.filmstrip.is-dragging, .filmstrip.is-dragging .film-frame { cursor: grabbing; }
.film-image .photo-unavailable { color: #eff8ff; font-size: 0.75rem; text-align: center; }
.hero-wait { min-height: 270px; display: flex; gap: 20px; align-items: center; justify-content: center; color: #617b8b; padding: 30px; }
.home-albums { max-width: 1200px; margin: auto; padding: 62px 40px; scroll-margin-top: 100px; }
.archive-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.archive-heading h2 { margin: 11px 0 0; font: 500 1.8125rem/1.5 'Noto Serif SC', 'Songti SC', 'SimSun', serif; color: #2c4d62; }
.archive-heading > a { display: inline-flex; gap: 12px; align-items: center; padding: 12px 0; font-size: 0.75rem; text-decoration: none; white-space: nowrap; }
.home-filter-row { display: flex; gap: 16px; }
.home-search { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; border: 1px solid #c8dce9; background: #fbfdff; border-radius: 6px; padding: 0 16px; color: #6b8a9d; }
.home-search input { width: 100%; min-width: 0; height: 48px; border: 0; outline: 0; box-shadow: none; padding: 0; background: transparent; color: #2c4d62; font-size: 0.75rem; }
.home-search:focus-within { outline: 2px solid #527f98; outline-offset: 2px; }
.home-search input:focus-visible { outline: 0; }
.home-year { display: flex; align-items: center; gap: 13px; font-size: 0.75rem; color: #617b8b; }
.home-year select { min-height: 48px; min-width: 145px; color: #2c4d62; background: #fbfdff; border: 1px solid #c8dce9; border-radius: 6px; padding: 10px; font-size: 0.75rem; }
.home-category-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin: 19px 0 27px; }
.home-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chip { padding: 8px 15px; min-height: 40px; background: transparent; color: #617b8b; border: 1px solid transparent; border-radius: 24px; font-size: 0.75rem; }
.category-chip[aria-pressed=true] { color: #305568; background: #e0eef6; border-color: #bdd4e2; }
#homeAlbumCount { font-size: 0.6875rem; color: #658193; padding-top: 12px; white-space: nowrap; }
.home-album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.home-album-grid .album-card { background: transparent; box-shadow: none; border: 0; border-radius: 0; }
.home-album-grid .album-cover { height: auto; aspect-ratio: 4/3; border-radius: 4px; background: #deedf5; overflow: hidden; }
.home-album-grid .album-cover img { transition: transform .4s; }
.home-album-grid .album-card:hover img { transform: scale(1.025); }
.home-album-grid .album-card-copy { padding: 17px 0 5px; }
.home-album-grid .album-card h2 { font-size: 1rem; font-weight: 500; }
.home-album-grid .album-card p { color: #617b8b; font-size: 0.6875rem; margin-top: 8px; }
.home-empty { border: 1px dashed #b5cddd; background: #e7f2f8; text-align: center; padding: 40px 20px; border-radius: 6px; }
.home-empty h3 { font-size: 1.125rem; font-weight: 500; }
.home-empty p { line-height: 1.8; color: #617b8b; margin: 12px 0 20px; }
.photo-unavailable { display: block; padding: 30px 15px; font-size: 0.8125rem; color: #617b8b; }
.mentor-note { max-width: 1120px; margin: 0 auto 55px; border-top: 1px solid #c8dce9; border-bottom: 1px solid #c8dce9; padding: 26px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mentor-note > div { display: flex; gap: 20px; align-items: center; }
.mentor-note > div > .lucide { width: 30px; height: 30px; flex-basis: 30px; color: #5d839b; }
.mentor-note strong { display: block; font-size: 0.875rem; font-weight: 500; }
.mentor-note small { display: block; font-size: 0.6875rem; color: #688697; margin-top: 8px; }
.mentor-note button { display: flex; gap: 16px; align-items: center; padding: 12px 0; color: #35647e; background: transparent; border: 0; font-size: 0.75rem; }
.memory-footer { display: flex; gap: 24px; align-items: center; justify-content: space-between; max-width: 1200px; margin: auto; padding: 0 40px 30px; font-size: 0.6875rem; color: #688697; }
.memory-footer > span { color: #3e6176; }
.memory-footer a { text-decoration: none; }
.mentor-picker > p { color: #617b8b; line-height: 1.8; }
.mentor-options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.mentor-options button { display: flex; flex-direction: column; align-items: center; background: #eaf3f9; color: #2c4d62; padding: 18px 10px; border: 1px solid #c8dce9; border-radius: 8px; }
.mentor-options button:hover { background: #e0eef6; }
.mentor-options img { width: 100px; height: 120px; object-fit: cover; border-radius: 60px 60px 8px 8px; margin-bottom: 16px; }
.mentor-options strong { font-size: 1.25rem; font-weight: 500; }
.mentor-options span { font-size: 0.6875rem; margin-top: 12px; }
.mentor-shared { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; padding: 14px; color: #2c4d62; background: transparent; border: 1px solid #bdd3e1; border-radius: 6px; }
@media (max-width: 1200px) { .mentor-note { margin-left: 40px; margin-right: 40px; } }
@media (max-width: 700px) {
  .public-mode .topbar { height: 68px; padding: 0 18px; gap: 12px; }
  .public-mode .brand-button strong { font-size: 1rem; }
  .public-mode .brand-mark, .public-mode .brand-button small { display: none; }
  .public-mode .public-nav { gap: 16px; }
  .public-nav a { font-size: 0.75rem; }
  .public-nav a:first-child { display: none; }
  .public-mode .mentor-entry { font-size: 0.75rem; padding: 8px 12px; gap: 5px; }
  .memory-hero { padding-top: 40px; }
  .memory-intro h1 { margin-top: 18px; font-size: 2.125rem; }
  .mobile-break { display: block; }
  .memory-intro p { font-size: 0.75rem; }
  .home-albums { padding: 40px 22px; scroll-margin-top: 85px; }
  .archive-heading { align-items: start; }
  .archive-heading h2 { font-size: 1.4375rem; max-width: 230px; }
  .archive-heading h2 span { display: block; }
  .archive-heading > a { font-size: 0.6875rem; gap: 2px; margin-top: 23px; }
  .home-filter-row { flex-direction: column; gap: 12px; }
  .home-year { justify-content: space-between; }
  .home-year select { flex: 1; max-width: 210px; }
  .home-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .home-album-grid .album-card:only-child { grid-column: 1 / -1; }
  .home-album-grid .album-card h2 { font-size: 0.875rem; }
  .mentor-note { margin: 0 22px 32px; padding: 24px 0; flex-direction: column; align-items: start; gap: 10px; }
  .mentor-note strong { font-size: 0.8125rem; }
  .mentor-note button { margin-left: 50px; }
  .memory-footer { padding: 0 22px 28px; flex-wrap: wrap; gap: 12px; }
  .memory-footer p { margin: 0; }
  .memory-footer a { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .memory-home *, .memory-home *::before, .memory-home *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@keyframes living-green-drift { from { transform:translate3d(-1%,0,0) scale(1); } to { transform:translate3d(1%,1%,0) scale(1.04); } }
@media (max-width: 649px) {
  .memory-hero { padding-top: 28px; }
  .memory-intro h1 { font-size: 1.875rem; }
  .memory-cta { margin-top: 16px; }
  .filmstrip { height: 470px; cursor: grab; }
  .film-frame { width: clamp(202px, 56vw, 255px); }
  .film-caption { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; padding: 6px; }
  .frame-index { width: 23px; height: 23px; font-size: 0.5rem; }
  .film-caption strong { font-size: 0.625rem; }
  .film-caption > div > span { font-size: 0.5rem; }
  .film-open { display: none; }
  .film-controls { flex-direction: column; padding: 12px 14px 0; gap: 8px; }
  .film-controls > div { gap: 12px; }
  .film-desktop-hint { display: none; }
  .film-mobile-hint { display: inline; }
}

/* Album interiors follow the public memory archive. */
.public-mode.gallery-mode .compact-heading h1 { font:500 clamp(1.75rem,3vw,2.5rem)/1.4 'Noto Serif SC','Songti SC','SimSun',serif; color:#254b63; }
.public-mode.gallery-mode .compact-heading { padding-bottom:24px; margin-bottom:24px; border-bottom:1px solid #cedee7; }
.public-mode.gallery-mode .compact-heading p { margin-top:12px; font-size:0.8125rem; color:#617b8b; }
.public-mode .album-cover img,.public-mode .home-album-grid .album-cover img { object-fit:contain; }
.public-mode .home-album-grid .album-card:hover img { transform:none; }
.public-mode .album-cover,.public-mode .photo-open { background:#e4edf2; }
.public-mode .photo-open img { object-fit:contain; }
.public-mode .photo-caption strong { font-size:0.9375rem; font-weight:500; }
.public-mode .photo-caption small { font-size:0.75rem; line-height:1.8; color:#607589; }
.album-guestbook-entry { margin-top:46px; padding:26px 0; border-top:1px solid #c8d8e1; display:flex; gap:22px; justify-content:space-between; align-items:center; }
.album-guestbook-entry h2 { margin:0 0 10px; font:500 1.5rem/1.4 'Noto Serif SC','Songti SC','SimSun',serif; color:#345569; }
.album-guestbook-entry p { margin:0; font-size:0.8125rem; color:#637c8a; }
.album-guestbook-entry a { color:#4b5874; display:inline-flex; gap:15px; align-items:center; padding:14px 18px; border:1px solid #bac6d6; border-radius:25px; text-decoration:none; white-space:nowrap; font-size:0.8125rem; }
.album-guestbook-entry a svg { width:16px; height:16px; }
@media(max-width:700px) { .album-guestbook-entry { align-items:flex-start; flex-direction:column; } .album-guestbook-entry h2 { font-size:1.375rem; } }
