:root {
  color-scheme: light;
  --paper: #fffef8;
  --ink: #18262d;
  --muted: #586b72;
  --line: #abc4c2;
  --teal: #b9e3dc;
  --blue: #215b83;
  --pink: #ffc1c7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 28px 16px 42px;
  background-color: #b9e3dc;
  background-image: radial-gradient(#78b8b4 1px, transparent 1px), radial-gradient(#dff2e3 1px, transparent 1px);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
  color: var(--ink);
  font-family: Verdana, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
a { color: #075c9b; }
button, input { font: inherit; }
.site-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 5px ridge #67aaa5;
  box-shadow: 8px 8px 0 #285f6233;
}
.site-header {
  min-height: 122px;
  padding: 12px 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 3px ridge #85bfba;
  background: var(--teal);
}
.wordmark {
  color: #d7474b;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.site-header nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.site-header nav a {
  min-height: 32px;
  padding: 5px 13px;
  border: 2px outset #eefaf2;
  background: #f8ffed;
  color: #174f73;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.site-header nav a:hover { border-style: inset; background: var(--pink); }
.site-header nav a span { color: #d7474b; }
main { background: var(--paper); }
.intro {
  padding: 30px 30px 0;
  text-align: center;
  position: relative;
}
.intro-copy { display: flex; flex-direction: column; align-items: center; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.status-dot { display: inline-block; width: 9px; height: 9px; border: 1px solid #53722b; border-radius: 50%; background: #9cd542; margin: 0 7px 0 1px; }
h1, h2, p, figure { margin-top: 0; }
h1 { max-width: 100%; overflow-wrap: anywhere; margin: 15px 0 9px; font-family: Georgia, 'Times New Roman', serif; font-size: 62px; line-height: 1; font-weight: 700; text-transform: uppercase; }
.title-dot { color: #d7474b; }
.intro-bottom { display: flex; justify-content: center; align-items: center; gap: 14px; }
.intro-bottom p { margin: 0; color: #3d5660; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-style: italic; }
.round-link { display: grid; place-items: center; width: 28px; height: 28px; border: 2px outset #f6f6dc; background: #eafa79; font-size: 16px; text-decoration: none; }
.round-link:hover { border-style: inset; }
.featured-photos { width: min(680px, 100%); margin: 22px auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.feature-image { width: 100%; height: 320px; margin: 0; position: relative; overflow: hidden; border: 7px solid white; outline: 1px solid #536d71; background: #a4a796; box-shadow: 4px 4px 0 #a5c7c1; animation: arrive .7s ease both; }
.feature-image img { width: 100%; height: 100%; object-fit: contain; display: block; filter: saturate(.9); }
.feature-image img[hidden] { display: none; }
.hero-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: repeating-linear-gradient(135deg, #dcebe0, #dcebe0 12px, #eaf2db 12px, #eaf2db 24px); color: #214e69; }
.hero-placeholder[hidden] { display: none; }
.hero-placeholder strong { font-family: Georgia, 'Times New Roman', serif; font-size: 23px; }
.hero-placeholder span { font-size: 12px; }
.feature-image figcaption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; background: #152d39b8; color: white; font-size: 10px; font-weight: 700; }
.feature-change-button { flex: 0 0 auto; padding: 4px 7px; border: 2px outset #eefaf2; background: #f8ffed; color: #174f73; cursor: pointer; font-size: 9px; font-weight: 700; }
.feature-change-button:hover { border-style: inset; background: var(--pink); }
.feature-change-button:focus-visible { outline: 2px solid #eafa79; outline-offset: 2px; }
.image-sticker { position: absolute; z-index: 3; top: 14px; right: 14px; width: 68px; height: 68px; display: grid; place-content: center; transform: rotate(8deg); border: 2px dotted #4f6531; border-radius: 50%; background: #eafa79; font-family: Georgia, 'Times New Roman', serif; font-size: 11px; line-height: 1.05; font-weight: 700; text-align: center; white-space: pre-line; }
.image-sticker[hidden] { display: none; }
.month-sticker { transform: rotate(-7deg); }
.upload-dialog { width: min(390px, calc(100vw - 32px)); padding: 0; border: 5px ridge #67aaa5; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 #285f6233; }
.upload-dialog::backdrop { background: #152d39a6; }
.upload-dialog form { padding: 22px; }
.upload-dialog h2 { margin-bottom: 9px; font-size: 25px; }
.upload-dialog form > p { color: var(--muted); font-size: 12px; }
.upload-dialog form > label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.upload-dialog input { width: 100%; min-height: 36px; padding: 6px 8px; border: 2px inset #cadbd4; background: white; color: var(--ink); }
.upload-dialog input:focus-visible { outline: 2px solid #d7474b; outline-offset: 2px; }
.upload-dialog-actions { display: flex; justify-content: end; gap: 8px; }
.upload-dialog-actions button { min-height: 34px; padding: 5px 11px; border: 2px outset #eefaf2; background: #f8ffed; color: #174f73; cursor: pointer; font-size: 10px; font-weight: 700; }
.upload-dialog-actions button:hover { border-style: inset; background: var(--pink); }
.upload-dialog-actions .add-button { border-color: #f5f2c9; background: #eafa79; color: var(--ink); }
.empty-upload-button { padding: 0; border: 0; background: transparent; color: #075c9b; font-size: 12px; text-decoration: underline; cursor: pointer; }
.empty-upload-button:focus-visible { outline: 2px solid #d7474b; outline-offset: 3px; }
.intro-ribbon { height: 30px; margin: 23px -30px 0; display: flex; align-items: center; gap: 45px; overflow: hidden; background: var(--blue); color: white; font-size: 10px; font-weight: 700; white-space: nowrap; }
.intro-ribbon span { flex: 0 0 auto; animation: marquee 24s linear infinite; }
.photo-section { width: min(760px, 100%); padding: 42px 24px 48px; margin: auto; }
.section-heading { display: flex; flex-direction: column; align-items: center; gap: 13px; padding-bottom: 17px; border-bottom: 2px dotted #88aaa8; text-align: center; }
.section-heading .eyebrow { margin-bottom: 6px; }
h2 { margin: 0; color: #214e69; font-family: Georgia, 'Times New Roman', serif; font-size: 37px; line-height: 1.1; }
.add-button { min-height: 38px; padding: 5px 13px; border: 2px outset #f5f2c9; display: inline-flex; align-items: center; gap: 8px; background: #eafa79; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.add-button span { font-family: Arial, sans-serif; font-size: 20px; line-height: 1; }
.add-button:hover { border-style: inset; background: var(--pink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.visually-hidden:focus-visible { outline: 2px solid #d7474b; outline-offset: 3px; }
.upload-status { min-height: 27px; padding-top: 9px; color: var(--muted); font-size: 11px; text-align: center; }
#homepage-status:empty { display: none; }
.photo-wall-link { color: var(--ink); text-decoration: none; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-tile { min-width: 0; margin: 0; overflow: hidden; border: 5px solid white; outline: 1px solid #8aa09e; background: #e5e8df; box-shadow: 2px 2px 0 #b3c7c3; animation: arrive .35s ease both; }
.photo-open-button { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; border: 0; background: #e5e8df; cursor: zoom-in; }
.photo-open-button:focus-visible { outline: 3px solid #d7474b; outline-offset: -3px; }
.photo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease; }
.photo-tile:hover img { transform: scale(1.035); }
.photo-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 4px; background: #fffef8; }
.photo-caption { min-height: 44px; padding: 8px 5px 3px; background: #fffef8; overflow-wrap: anywhere; }
.photo-caption { display: block; width: 100%; border: 0; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.photo-caption:hover { background: #f9fbed; }
.photo-caption:focus-visible { outline: 2px solid #d7474b; outline-offset: -2px; }
.photo-caption h2 { margin: 0; color: #214e69; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; }
.photo-caption p { margin: 4px 0 2px; color: var(--muted); font-size: 11px; }
.photo-edit-hint { display: block; padding-top: 5px; color: #075c9b; font-size: 9px; font-weight: 700; }
.photo-delete-button { align-self: start; padding: 6px; border: 2px outset #f7d6d6; background: #ffe8e8; color: #8f2428; cursor: pointer; font-size: 9px; font-weight: 700; }
.photo-delete-button:hover { border-style: inset; background: var(--pink); }
.photo-library { width: min(760px, 100%); min-height: 190px; padding: 20px 24px 40px; margin: auto; }
.photo-page-rule { margin-bottom: 17px; }
.photo-page-rule + .add-button { margin: 0 auto; }
.photo-metadata-fields { max-height: min(48vh, 450px); overflow-y: auto; }
.photo-metadata-field { min-width: 0; padding: 10px; margin: 0 0 10px; border: 2px ridge #a9c9c4; background: #f9fbed; }
.photo-metadata-field legend { max-width: 100%; padding: 0 5px; overflow-wrap: anywhere; color: #214e69; font-size: 11px; font-weight: 700; }
.photo-metadata-field label { display: block; margin: 6px 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.photo-metadata-field input, .photo-metadata-field textarea { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; border: 2px inset #cadbd4; background: white; color: var(--ink); font: inherit; }
.upload-dialog textarea { display: block; width: 100%; min-height: 80px; padding: 6px 8px; border: 2px inset #cadbd4; background: white; color: var(--ink); font: inherit; resize: vertical; }
.photo-metadata-field textarea { resize: vertical; }
.photo-metadata-field input:focus-visible, .photo-metadata-field textarea:focus-visible { outline: 2px solid #d7474b; outline-offset: 2px; }
.photo-viewer { width: min(1000px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 14px; border: 5px ridge #67aaa5; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 #285f6233; }
.photo-viewer::backdrop { background: #152d39c7; }
.photo-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 130px); margin: auto; object-fit: contain; }
.photo-viewer-close { display: block; width: 36px; height: 36px; padding: 0; margin: 0 0 8px auto; border: 2px outset #eefaf2; background: #f8ffed; color: #174f73; cursor: pointer; font-size: 25px; line-height: 1; }
.photo-viewer-close:hover { border-style: inset; background: var(--pink); }
.photo-viewer-caption { padding-top: 10px; text-align: center; }
.photo-viewer-caption h2 { font-size: 22px; }
.photo-viewer-caption p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.empty-state { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #9ab9b5; background: #f9fbed; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-mark { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 9px; border: 2px outset #f5f2c9; background: #eafa79; font-size: 21px; }
.empty-state p { margin: 0 0 5px; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-weight: 700; }
.empty-state label { color: #075c9b; font-size: 12px; text-decoration: underline; cursor: pointer; }
.photo-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.games-page-main { min-height: 70vh; }
.games-page-heading { padding: 42px 24px 0; text-align: center; }
.games-page-heading h1 { margin: 12px 0 4px; color: #214e69; font-size: 58px; }
.games-page-deck { margin: 0; color: #3d5660; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-style: italic; }
.games-page-rule { width: min(590px, 100%); min-height: 32px; padding: 5px 9px; margin: 23px auto 0; display: flex; justify-content: space-between; gap: 8px; background: var(--blue); color: white; font-size: 9px; font-weight: 700; }
.games-library { width: min(760px, 100%); min-height: 190px; padding: 21px 24px 40px; margin: auto; }
.games-status { min-height: 28px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.arcade-game { min-width: 0; padding: 11px; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 2px ridge #a9c9c4; background: #f9fbed; animation: arrive .35s ease both; animation-delay: calc(var(--tile-index, 0) * 35ms); }
.arcade-game-art { width: 62px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 2px inset #9ab9b5; background: #18262d; color: #ffc1c7; font-size: 24px; }
.arcade-game-cover { display: block; width: 100%; height: 100%; padding: 2px; background: #18262d; object-fit: contain; }
.arcade-game-info { min-width: 0; }
.arcade-game h2 { margin: 0 0 4px; overflow-wrap: anywhere; color: #214e69; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; }
.arcade-game-info h2 { margin: 0; }
.arcade-play-button { min-height: 36px; padding: 5px 10px; border: 2px outset #f5f2c9; background: #eafa79; color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 700; }
.arcade-play-button[href] { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.arcade-play-button:hover { border-style: inset; background: var(--pink); }
.games-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #9ab9b5; background: #f9fbed; text-align: center; }
.games-empty[hidden] { display: none; }
.games-empty-symbol { color: #d7474b; font-size: 27px; }
.games-empty h2 { margin: 8px 0 0; font-size: 17px; }
.games-page-main .site-footer { margin-top: 14px; }
.game-player-dialog { width: min(900px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 16px; border: 5px ridge #67aaa5; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 #285f6233; }
.game-player-dialog::backdrop { background: #152d39c7; }
.game-player-dialog:has(.game-player-surface.is-fullscreen) { width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
.game-player-surface.is-fullscreen { position: fixed; z-index: 1; inset: 0; width: 100vw; height: 100dvh; padding: 0; display: flex; flex-direction: column; background: #101b21; color: #f9fbed; }
.game-player-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.game-player-heading h2 { min-width: 0; overflow-wrap: anywhere; font-size: 22px; }
.game-player-surface.is-fullscreen .game-player-heading { flex: 0 0 auto; min-height: 54px; padding: 8px 14px; border-bottom: 3px ridge #67aaa5; background: #18262d; }
.game-player-surface.is-fullscreen .game-player-heading h2 { color: #f9fbed; }
.game-player-actions { display: flex; align-items: center; gap: 8px; }
.game-player-control { min-height: 34px; padding: 5px 9px; border: 2px outset #eefaf2; background: #f8ffed; color: #174f73; cursor: pointer; font-size: 10px; font-weight: 700; }
.game-player-close { flex: 0 0 34px; width: 34px; padding: 0; font-size: 23px; line-height: 1; }
#game-player-status { min-height: 21px; margin: 8px 0; color: var(--muted); font-size: 11px; }
.game-player-surface.is-fullscreen #game-player-status { flex: 0 0 auto; min-height: 0; margin: 0; padding: 5px 14px; background: #18262d; color: #f9fbed; font-size: 11px; }
.game-player-surface.is-fullscreen #game-player-status:empty { display: none; }
.game-player-stage { width: 100%; aspect-ratio: 4 / 3; max-height: calc(100dvh - 120px); background: #111; }
.game-player-stage ruffle-player { display: block; }
.game-player-surface.is-fullscreen .game-player-stage { flex: 1 1 auto; min-height: 0; width: 100%; aspect-ratio: auto; max-height: none; border: 3px ridge #67aaa5; border-top: 0; background: #071015; }
.browser-game-frame { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.links-section { width: min(760px, 100%); padding: 0 24px 42px; margin: auto; text-align: center; }
.links-section > .eyebrow { margin-bottom: 6px; }
.links-section h2 { margin-bottom: 17px; }
.link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-link { min-width: 0; padding: 16px 12px; border: 2px ridge #a9c9c4; background: #f9fbed; }
.info-link h3 { margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.info-link a, .server-address { overflow-wrap: anywhere; font-weight: 700; }
.info-link p { margin-bottom: 0; }
.server-address { color: #174f73; font-family: 'Courier New', monospace; font-size: 16px; }
.server-version { color: var(--muted); font-size: 12px; }
.site-footer { min-height: 66px; border-top: 2px ridge #b3cfcb; padding: 13px 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; background: #e8f3ec; color: var(--muted); font-size: 10px; text-align: center; }
.site-footer a { color: #075c9b; font-weight: 700; }
.site-footer a span { color: #d7474b; }
.site-footer .footer-secret-link { color: inherit; font-weight: 400; text-decoration: none; }
.site-footer .footer-secret-link:focus-visible { outline: 2px solid #075c9b; outline-offset: 2px; }
.secret-login { width: min(390px, calc(100% - 28px)); margin: 24px auto 0; text-align: left; }
.secret-login label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.secret-login input { width: 100%; min-height: 38px; padding: 6px 8px; margin-bottom: 10px; border: 2px inset #cadbd4; background: white; color: var(--ink); }
.secret-login input:focus-visible { outline: 2px solid #d7474b; outline-offset: 2px; }
.secret-login .add-button { display: flex; margin-left: auto; }
.secret-login-status { min-height: 24px; margin: 8px 0 0; color: #8f2428; font-size: 11px; }
.secret-library-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.secret-photo-grid { margin-top: 18px; }
.secret-photo-grid .photo-tile { animation-delay: calc(var(--tile-index, 0) * 35ms); }
.secret-photo-empty { width: min(760px, 100%); margin: 18px auto 0; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes marquee { to { transform: translateX(-150%); } }

@media (max-width: 760px) {
  body { padding: 12px 8px 24px; }
  .site-shell { border-width: 4px; box-shadow: 4px 4px 0 #285f6233; }
  .site-header { min-height: 112px; }
  .intro { padding: 25px 18px 0; }
  h1 { font-size: 52px; }
  .feature-image { height: 270px; }
  .hero-placeholder strong { font-size: 19px; }
  .feature-image figcaption { font-size: 9px; }
  .intro-ribbon { margin-right: -18px; margin-left: -18px; }
  .photo-section { padding: 33px 14px 38px; }
  .photo-library { padding: 18px 14px 32px; }
  .games-page-heading { padding: 34px 14px 0; }
  .games-library { padding: 20px 14px 32px; }
  .links-section { padding: 0 14px 34px; }
  h2 { font-size: 32px; }
  .photo-grid { gap: 9px; }
}

@media (max-width: 390px) {
  body { padding: 6px 4px 16px; }
  .site-header nav { gap: 5px; }
  .site-header nav a { padding-right: 9px; padding-left: 9px; font-size: 10px; }
  .feature-image { height: 220px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-grid { grid-template-columns: 1fr; }
  .link-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
