/* === FONTS === */
@font-face {
  font-family: "LT Remark";
  src: url("https://valjdakosta.com/assets/ltremark/LTRemark-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LT Remark";
  src: url("https://valjdakosta.com/assets/ltremark/LTRemark-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redaction";
  src: url("https://valjdakosta.com/assets/redaction/Redaction-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redaction 10";
  src: url("https://valjdakosta.com/assets/redaction/Redaction10-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redaction 20";
  src: url("https://valjdakosta.com/assets/redaction/Redaction20-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Human Sans";
  src: url("https://valjdakosta.com/assets/other_fonts/HumanSans-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Human Sans";
  src: url("https://valjdakosta.com/assets/other_fonts/HumanSans-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("https://valjdakosta.com/assets/other_fonts/Geist-Medium.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VCR OSD Mono";
  src: url("https://valjdakosta.com/assets/other_fonts/VCR_OSD_MONO_1.001.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Blaster";
  src: url("https://valjdakosta.com/assets/other_fonts/BlasterFont-Demo.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Sans MS";
  src: url("https://valjdakosta.com/assets/other_fonts/comic-sans.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("https://valjdakosta.com/assets/other_fonts/RobotoMono-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* RobotoMono-Regular.ttf has no Block Elements glyphs (U+2580-U+259F).
   Fall back to a system mono font for that range so chars like ▒░█▓ render. */
@font-face {
  font-family: "Roboto Mono";
  src: local("Cascadia Mono"), local("Consolas"), local("Menlo"),
       local("DejaVu Sans Mono"), local("Courier New"), local("monospace");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2580-259F;
}

@font-face {
  font-family: "Chetkiy";
  src: url("https://valjdakosta.com/assets/other_fonts/CHETKIYTYPEFACE.otf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Wingdings 3";
  src: url("https://valjdakosta.com/assets/other_fonts/WINGDNG3.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* === ANIMATED CUSTOM PROPERTIES (for holiday color fade) === */
@property --color-dark       { syntax: "<color>"; inherits: true; initial-value: #445f74; }
@property --color-mid        { syntax: "<color>"; inherits: true; initial-value: #80a4ba; }
@property --color-light-mid  { syntax: "<color>"; inherits: true; initial-value: #C8DCE8; }
@property --color-light      { syntax: "<color>"; inherits: true; initial-value: #F7FAFC; }
@property --color-border     { syntax: "<color>"; inherits: true; initial-value: #EDE9E4; }
@property --color-table-row  { syntax: "<color>"; inherits: true; initial-value: #E8F2F8; }

/* === VARIABLES === */
:root {
  --color-dark:       #445f74;
  --color-mid:        #80a4ba;
  --color-light-mid:  #C8DCE8;
  --color-light:      #F7FAFC;
  --color-border:     #EDE9E4;
  --color-table-row:  #E8F2F8;
  --border:           3px solid var(--color-border);
  --font-body:        "LT Remark", "Times New Roman", serif;
  --font-heading:     "Redaction 10", "Times New Roman", serif;
  --font-mono:        "Courier New", monospace;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: #B3BAB3;
}

/* === CURSORS === */
body {
  cursor: auto;
}

a,
.photo-placeholder,
.photo-placeholder img,
#lightbox,
#lb-prev,
#lb-next {
  cursor: pointer;
}

/* === CURSOR TOGGLE === */
body.default-cursor,
body.default-cursor #lb-center,
body.default-cursor #lightbox-wrap,
body.default-cursor .gb-field label { cursor: auto; }

body.default-cursor a,
body.default-cursor .photo-placeholder,
body.default-cursor .photo-placeholder img,
body.default-cursor #lightbox,
body.default-cursor #lb-prev,
body.default-cursor #lb-next,
body.default-cursor #lb-full,
body.default-cursor .sidebar-disclaimer-details summary,
body.default-cursor .sidebar-disclaimer-fonts > summary,
body.default-cursor .older-updates > summary,
body.default-cursor .album-heading,
body.default-cursor .gear-heading,
body.default-cursor .fav-more > summary,
body.default-cursor .gb-submit,
body.default-cursor .gb-read-more,
body.default-cursor .memorial-photos img,
body.default-cursor .video-item a,
body.default-cursor #sidebar-toggle,
body.default-cursor #sidebar-font-btn,
body.default-cursor #mobile-disclaimer summary,
body.default-cursor #main-content-dropdown > summary { cursor: pointer; }

body.default-cursor .gb-field input,
body.default-cursor .gb-field textarea { cursor: text; }

#cursor-toggle-btn,
#font-toggle-btn {
  width: 36px;
  padding: 0;
  border: 2px outset var(--color-light-mid);
  background: var(--color-light-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

#cursor-toggle-btn { right: 6px; }
#font-toggle-btn   { right: 6px; }

#font-toggle-btn {
  font-family: "Geist", Arial, sans-serif;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--color-dark);
}

body.arial-mode #font-toggle-btn {
  font-family: var(--font-heading) !important;
}

body.arial-mode .font-blaster {
  font-weight: bold !important;
}

#cursor-toggle-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  image-rendering: pixelated;
}
#cursor-toggle-btn,
#font-toggle-btn { cursor: pointer; }
#cursor-toggle-btn:hover,
#font-toggle-btn:hover { border-style: inset; background: var(--color-light); }
body.default-cursor #cursor-toggle-btn,
body.default-cursor #font-toggle-btn { cursor: pointer; }
.gb-font-btn { cursor: pointer; }
body.default-cursor .gb-font-btn { cursor: pointer; }

/* === ARIAL MODE === */
body.arial-mode *:not(.wave-letter) {
  font-family: "Geist", Arial, sans-serif !important;
}
body:not(.default-cursor) #cursor-toggle-btn img { transform: translateX(1px) translateY(-4px); }
body.default-cursor #cursor-toggle-btn img { transform: translateX(-2px) translateY(0px); }

/* === BACKGROUND === */
@keyframes bgfadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("wallpaper.jpg");
  background-size: cover;
  background-position: center;
  animation: bgfadein 1s ease-in-out;
}

/* === BODY & BACKGROUND === */
body {
  margin: 0;
  padding: 20px 12px;
  font-family: var(--font-body);
  color: var(--color-dark);
}

body.holiday-fading {
  transition: --color-dark 0.7s, --color-mid 0.7s, --color-light-mid 0.7s,
              --color-light 0.7s, --color-border 0.7s, --color-table-row 0.7s;
}
body.holiday-fading #sidebar,
body.holiday-fading .marquee-bar {
  transition: background 0.7s;
}

/* Background crossfade layer — sits between wallpaper and content */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--overlay-img, none);
  background-color: var(--overlay-color, transparent);
  background-size: var(--overlay-bg-size, cover);
  background-repeat: var(--overlay-bg-repeat, no-repeat);
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s;
}
body.holiday-bg-transitioning::after {
  opacity: 1;
  transition: none;
}

/* === CENTERED WRAPPER === */
#wrapper {
  position: relative;
  width: 100%;
  max-width: 704px;
  margin: 0 auto;
}

/* === HEADER === */
#header {
  background: var(--color-dark);
  border: var(--border);
  padding: 28px 10px;
  text-align: center;
  user-select: none;
}

#header h1 {
  margin: 14px 0 0;
  font-size: 2.4em;
  font-family: "Redaction 20", "Times New Roman", serif;
  color: var(--color-light);
  text-shadow: 3px 3px var(--color-mid);
  letter-spacing: 4px;
  text-transform: uppercase;
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.wave-letter {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

#header p.tagline {
  margin: 6px 0 0;
  color: var(--color-light-mid);
  font-size: 0.9em;
  font-style: italic;
}

/* === MARQUEE === */
@keyframes marquee-scroll {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

.marquee-bar {
  background: var(--color-mid);
  color: var(--color-light);
  font-weight: bold;
  font-size: 0.85em;
  padding: 4px 0;
  overflow: hidden;
  border-left: var(--border);
  border-right: var(--border);
  user-select: none;
}

.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 20s linear infinite;
  animation-delay: -10s;
}

/* === NAV === */
#nav {
  background: var(--color-dark);
  border-left: var(--border);
  border-right: var(--border);
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  position: relative;
}

#nav a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 0.95em;
  padding: 6px 10px;
  border: 2px outset var(--color-light-mid);
  background: var(--color-light-mid);
  color: var(--color-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

#nav a:hover,
#nav a.active {
  border-style: inset;
  background: var(--color-light);
  color: var(--color-dark);
}

/* === MAIN CONTENT AREA === */
#content {
  display: flex;
  border-top: var(--border);
}

#sidebar {
  width: 160px;
  flex-shrink: 0;
  background: var(--color-mid);
  border-left: var(--border);
  border-bottom: var(--border);
  padding: 10px;
}

#sidebar-toggle {
  display: none;
}

#sidebar h3 {
  margin: 0 0 8px;
  color: var(--color-light);
  font-size: 0.85em;
  font-family: var(--font-heading);
  text-transform: uppercase;
  border-bottom: 1px dashed var(--color-light-mid);
  padding-bottom: 4px;
}

#sidebar ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

#sidebar ul li::before {
  content: "> ";
  color: var(--color-light-mid);
}

#sidebar ul li a {
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.85em;
}

#sidebar ul li a:hover {
  color: var(--color-light-mid);
  text-decoration: underline;
}

#sidebar ul li a.evil:hover {
  color: #cc3333;
}

.hit-counter {
  margin: 0 0 16px;
  padding: 10px;
  border: 2px outset var(--color-light-mid);
  background: var(--color-light-mid);
  text-align: center;
  line-height: 1.4;
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
}

.hit-counter-label {
  margin: 0 0 1px;
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-dark);
}

.hit-counter-number {
  display: block;
  font-family: "VCR OSD Mono", var(--font-mono);
  font-size: 0.95em;
  color: var(--color-dark);
  letter-spacing: 2px;
}
.hit-counter-rainbow {
  animation: rainbow-bg 1.5s linear;
}
.hit-counter-rainbow .hit-counter-label,
.hit-counter-rainbow .hit-counter-number {
  animation: rainbow-text 1.5s linear;
}
@keyframes rainbow-bg {
  0%   { background: #ff0000; }
  16%  { background: #ff8800; }
  33%  { background: #ffff00; }
  50%  { background: #00cc00; }
  66%  { background: #0066ff; }
  83%  { background: #8800ff; }
  100% { background: var(--color-light-mid); }
}
@keyframes rainbow-text {
  0%   { color: #fff; }
  33%  { color: #000; }
  50%  { color: #fff; }
  83%  { color: #fff; }
  100% { color: var(--color-dark); }
}

.linkback-box {
  position: relative;
  display: block;
  margin: 16px 0;
  width: 100%;
  cursor: pointer;
  image-rendering: pixelated;
  border: 2px outset var(--color-light-mid);
}

.linkback-img {
  display: block;
  width: 100%;
  height: auto;
}

.linkback-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0);
  color: transparent;
  font-size: 0.7em;
  font-weight: bold;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  pointer-events: none;
}

.linkback-box:hover .linkback-overlay {
  background: rgba(255, 255, 255, 0.75);
  color: #000;
}

.linkback-res {
  font-size: 1em;
  opacity: 0.6;
}

.linkback-code {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-size: 0.65em;
  color: var(--color-light);
  background: var(--color-dark);
  border: 1px inset var(--color-light-mid);
  box-sizing: border-box;
}

.cool-sites-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cool-sites-buttons img {
  display: block;
  image-rendering: pixelated;
}
@media (max-width: 600px) {
  .cool-sites-buttons a {
    width: calc((100% - 18px) / 4);
  }
  .cool-sites-buttons img {
    width: 100%;
    height: auto;
  }
}

.sidebar-disclaimer-details {
  margin-top: 16px;
}

.sidebar-disclaimer-details summary {
  color: var(--color-light-mid);
  font-size: 0.85em;
  font-family: var(--font-heading);
  text-transform: uppercase;
  padding-bottom: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.sidebar-disclaimer-details[open] > summary,
#mobile-disclaimer[open] > summary {
  border-bottom: 1px dashed var(--color-light-mid);
}

.sidebar-disclaimer-details[open] > summary::after,
#mobile-disclaimer[open] > summary::after,
.sidebar-disclaimer-fonts[open] > summary::after {
  content: " [-]";
  font-size: 0.85em;
  color: var(--color-light-mid);
}

.sidebar-disclaimer {
  font-size: 0.72em;
  color: var(--color-light-mid);
  line-height: 1.5;
  margin: 0 0 6px;
}

.sidebar-disclaimer a,
.sidebar-disclaimer a:visited,
.sidebar-disclaimer a:hover {
  color: var(--color-light-mid);
}

.sidebar-disclaimer-fonts > summary {
  cursor: pointer;
  user-select: none;
}

.sidebar-real-site-btn {
  display: block;
  margin: 16px 8px 8px;
  padding: 10px 14px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.95em;
  text-decoration: none;
  color: var(--color-light);
  background: var(--color-dark);
  border: var(--border);
  cursor: pointer;
}

.sidebar-real-site-btn:hover {
  background: var(--color-mid);
}

.sidebar-real-site-btn:visited {
  color: var(--color-light);
}

.sidebar-disclaimer-privacy,
.sidebar-disclaimer-privacy:visited,
.sidebar-disclaimer-privacy:hover {
  display: block;
  color: var(--color-light-mid);
  font-size: 0.85em;
  font-family: var(--font-heading);
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 6px;
  cursor: pointer;
  user-select: none;
}

#main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: var(--border);
  border-right: var(--border);
  border-bottom: var(--border);
}

#main {
  flex: 1;
  min-width: 0;
  background: var(--color-light);
  padding: 14px;
  border-left: var(--border);
  border-right: var(--border);
  border-bottom: var(--border);
}

#main-col > #main {
  border-top: var(--border);
  border-left: none;
  border-right: none;
  border-bottom: none;
}

#main h2 {
  font-size: 1.3em;
  font-family: var(--font-heading);
  text-transform: uppercase;
  border-bottom: 2px dashed var(--color-mid);
  padding-bottom: 4px;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

#main h2:first-child {
  margin-top: 0;
}

#main p {
  font-size: 0.9em;
  line-height: 1.6;
}

#main a {
  color: var(--color-dark);
}

#main a:hover {
  color: var(--color-mid);
}

.highlight {
  color: var(--color-mid);
}

/* === TABLE === */
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  margin-top: 12px;
}

.content-table th {
  background: var(--color-dark);
  color: var(--color-light);
  padding: 5px 8px;
  text-align: left;
  border: 1px solid var(--color-border);
}

.content-table td {
  background: var(--color-table-row);
  color: var(--color-dark);
  padding: 5px 8px;
  border: 1px solid var(--color-border);
}

.content-table tr:nth-child(even) td {
  background: var(--color-light-mid);
}

/* === SPECIFIC LINK HOVER COLORS === */
#main a[href*="ULTRAKILL"]:hover { color: #C41230; }
#main a[href*="clairo.com"]          { font-weight: bold; }
#main a[href*="clairo.com"]:hover    { color: #6B9E52; }
#main a[href*="getpaint.net"]:hover  { color: #0066CC; font-weight: bold; }

/* === FAVOURITES TABLE === */
.fav-table {
  table-layout: fixed;
  font-size: 0.95em;
}

.fav-table td {
  vertical-align: top;
  font-family: Arial, sans-serif;
}

#home-music {
  margin-top: 14px;
}

.home-music-link {
  text-decoration: none;
  color: inherit;
}

.home-music-block {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.home-music-block.now-playing-block:hover {
  opacity: 0.85;
}

.home-music-block.recent-block:hover .highlight {
  text-decoration: underline;
}

.font-vcr        { font-family: "VCR OSD Mono", Arial, sans-serif; }
.font-tnr        { font-family: "Times New Roman", Arial, sans-serif; }
.font-human      { font-family: "Human Sans", Arial, sans-serif; }
.font-blaster    { font-family: "Blaster", Arial, sans-serif; }
.font-ltremark   { font-family: var(--font-body); }
.font-redaction10 { font-family: var(--font-heading); }
.font-redaction20 { font-family: "Redaction 20", "Times New Roman", serif; }

/* === HOLIDAY DEV PANEL === */
#holiday-dev-panel {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  background: #1a1a1a;
  border: 2px solid #444;
  padding: 10px;
  width: 280px;
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: #eee;
  min-width: 200px;
}

#holiday-dev-panel.holiday-dev-open {
  display: block;
}

#holiday-dev-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: none;
}

#holiday-dev-title-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#holiday-dev-expand {
  display: none;
}

#holiday-dev-minimize,
#holiday-dev-close,
#holiday-dev-expand {
  color: #666;
  font-size: 1.1em;
  line-height: 1;
}

#holiday-dev-close:hover,
#holiday-dev-minimize:hover,
#holiday-dev-expand:hover {
  color: #ccc;
}

#holiday-dev-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

#holiday-dev-title-text {
  white-space: nowrap;
  flex-shrink: 0;
}

#holiday-dev-disp {
  background: none;
  border: 1px solid #555;
  color: #777;
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  padding: 1px 5px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

#holiday-dev-disp:hover {
  border-color: #999;
  color: #ccc;
}

#holiday-dev-disp[data-active] {
  border-color: #bbb;
  color: #eee;
}

#holiday-dev-test {
  text-decoration: none;
}

#holiday-dev-body {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

#holiday-dev-calendar {
  display: none;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

#holiday-dev-panel.holiday-dev-monthview #holiday-dev-body { display: none; }
#holiday-dev-panel.holiday-dev-monthview #holiday-dev-calendar { display: block; }

#holiday-dev-grid {
  display: none;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}

#holiday-dev-panel.holiday-dev-calendarview #holiday-dev-body { display: none; }
#holiday-dev-panel.holiday-dev-calendarview #holiday-dev-grid { display: block; }

#holiday-dev-panel.holiday-dev-minimized #holiday-dev-grid { display: none !important; }

.hdg-month { margin-bottom: 6px; }

.hdg-month-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin: 6px 0 4px;
  padding-top: 4px;
  border-top: 1px solid #444;
}

.hdg-month:first-child .hdg-month-label {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.hdg-tiles {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hdg-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  border: 2px solid transparent;
  box-sizing: border-box;
}

.hdg-dow-row { margin-bottom: 2px; }

.hdg-dow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  color: #555;
  aspect-ratio: 1;
}

.hdg-tile:not(.hdg-tile-empty):hover { border-color: rgba(255,255,255,0.7); }
.hdg-tile-active { border-color: #fff !important; outline: 1px solid #fff; }
.hdg-tile-empty { background: #222; color: #3a3a3a; cursor: default; }

#holiday-dev-panel.holiday-dev-minimized #holiday-dev-body {
  display: none;
}

#holiday-dev-panel.holiday-dev-minimized #holiday-dev-calendar {
  display: none !important;
}

.hdc-month { margin-bottom: 4px; }

.hdc-month-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin: 6px 0 2px;
  padding-top: 4px;
  border-top: 1px solid #444;
}

.hdc-month:first-child .hdc-month-label {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.hdc-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  margin-top: 2px;
  cursor: pointer;
  border: 1px solid #333;
  background: #222;
}

.hdc-entry:hover { background: #3a3a3a; border-color: #888; }
.hdc-entry-active { background: #3a3a3a; border-color: #ccc; color: #fff; }

.hdc-swatch {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
}

.hdc-date {
  color: #888;
  min-width: 46px;
  flex-shrink: 0;
}

.hdc-name {
  color: #ccc;
  word-break: break-word;
}

#holiday-dev-panel.holiday-dev-minimized #holiday-dev-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.holiday-dev-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
  padding: 4px 8px;
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #555;
  font-family: var(--font-mono);
  font-size: 1em;
  text-align: left;
  cursor: pointer;
}

.holiday-dev-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-left: 8px;
  border: 1px solid #888;
}

.holiday-dev-btn:hover {
  background: #3a3a3a;
  border-color: #888;
}

.holiday-dev-btn-active {
  background: #3a3a3a;
  border-color: #ccc;
  color: #fff;
}

@media (max-width: 600px) {
  #holiday-dev-panel {
    bottom: 0;
    right: 0;
    left: 0;
    min-width: 0;
    width: 100%;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 14px 16px;
    font-size: 0.85em;
  }
  #holiday-dev-title-btns {
    gap: 14px;
  }
  #holiday-dev-minimize,
  #holiday-dev-close,
  #holiday-dev-expand {
    font-size: 1.4em;
    padding: 4px;
  }
  #holiday-dev-expand {
    display: inline;
    order: 1;
  }
  #holiday-dev-minimize {
    order: 0;
  }
  #holiday-dev-close {
    order: 2;
  }
  #holiday-dev-body,
  #holiday-dev-calendar,
  #holiday-dev-grid {
    max-height: calc(33vh - 60px);
  }
  .holiday-dev-btn {
    padding: 5px 8px;
    margin-top: 4px;
  }
  #holiday-dev-panel.holiday-dev-fullscreen .holiday-dev-btn {
    padding: 10px 12px;
    font-size: 1.1em;
    margin-top: 6px;
  }
  #holiday-dev-panel.holiday-dev-fullscreen {
    top: 25vh;
    border-top: 2px solid #444;
  }
  #holiday-dev-panel.holiday-dev-fullscreen:not(.holiday-dev-monthview):not(.holiday-dev-calendarview) #holiday-dev-body,
  #holiday-dev-panel.holiday-dev-fullscreen.holiday-dev-monthview #holiday-dev-calendar,
  #holiday-dev-panel.holiday-dev-fullscreen.holiday-dev-calendarview #holiday-dev-grid {
    display: block !important;
    max-height: calc(75vh - 60px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open) #wrapper {
    padding-bottom: calc(33vh + 20px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-fullscreen) #wrapper {
    padding-bottom: calc(75vh + 20px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-minimized) #wrapper {
    padding-bottom: 60px;
  }
}

/* === HOLIDAY BANNER === */
#holiday-banner,
#holiday-banner-2 {
  display: none;
  text-align: center;
  padding: 8px 10px;
  margin-bottom: 14px;
  background: var(--color-mid);
  color: var(--color-light);
  font-family: var(--font-heading);
  font-size: 0.9em;
  border: 2px dashed var(--color-light-mid);
}

body[class*="holiday-"] #holiday-banner {
  display: block;
}

body.holiday-zabeograd #holiday-banner   { display: none; }
body.holiday-zabeograd #holiday-banner-2 { display: block; }

.anniversary-photo {
  display: none;
  margin-bottom: 14px;
}

.anniversary-photo img {
  display: block;
  width: 100%;
  border: var(--border);
}

body.holiday-oslobodjenje .anniversary-photo-oslobodjenje,
body.holiday-masinac .anniversary-photo-masinac {
  display: block;
}

body.holiday-oslobodjenje #holiday-banner {
  background: #f0e0c8;
  border-color: #bf7a3a;
  color: #3a1f00;
}

body.holiday-masinac #holiday-banner {
  background: #ddeedd;
  border-color: #4a8a5a;
  color: #1a3a22;
}

body.holiday-zabeograd #holiday-banner-2 {
  background: #c8d8f0;
  border-color: #4a7abf;
  color: #1a2e4a;
}

body.holiday-vidovdan #holiday-banner {
  background: #c8e6c9;
  border-color: #4caf50;
  color: #1b4a1b;
}

/* === ENTRY ARROW === */
.entry-gt {
  font-size: 1.15em;
}

/* === OLDER UPDATES === */
.older-updates {
  margin-top: 0;
}

.older-updates > summary {
  cursor: pointer;
  font-size: 0.85em;
  color: var(--color-mid);
  user-select: none;
  padding: 4px 8px;
  background: var(--color-table-row);
  border: 1px solid var(--color-border);
  border-top: none;
  display: block;
}

.older-updates > summary:hover {
  color: var(--color-dark);
}

#s-updates ~ .table-scroll .content-table td:first-child,
#s-updates ~ .older-updates .content-table td:first-child {
  font-family: "Roboto Mono", var(--font-mono);
  width: 100px;
}

.older-updates .table-scroll {
  margin-top: 0;
}

.older-updates .content-table {
  margin-top: 0;
  border-top: none;
}

.older-updates .content-table td {
  border-top: none;
}

.load-more-btn {
  display: block;
  margin: 12px auto 0;
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: bold;
  padding: 5px 20px;
  border: 2px outset var(--color-light-mid);
  background: var(--color-light-mid);
  color: var(--color-dark);
  cursor: pointer;
}
.load-more-btn:hover { border-style: inset; background: var(--color-light); }
body.default-cursor .load-more-btn { cursor: pointer; }

/* === UNDER CONSTRUCTION === */
.under-construction {
  text-align: center;
  padding: 10px;
  background: var(--color-table-row);
  border: 2px dashed var(--color-border);
  margin-top: 14px;
  font-size: 0.8em;
  color: var(--color-dark);
}

/* === FOOTER BANNER === */
.footer-banner {
  display: block;
  width: 60%;
  margin: 0 auto 10px;
  opacity: 0.99;
}

.footer-banner-top {
  width: 100%;
  margin: 0 0 7px 0;
  border: none;
}

/* === FOOTER === */
#footer {
  background: var(--color-dark);
  border: var(--border);
  border-top: none;
  padding: 10px;
  text-align: center;
  font-size: 0.92em;
  color: var(--color-light-mid);
}

#footer a {
  color: var(--color-light);
  display: inline-block;
  margin-top: 6px;
}

.footer-privacy {
  font-size: 0.85em;
  color: var(--color-light-mid) !important;
  text-decoration: none;
}
.footer-privacy:hover { text-decoration: underline; }

/* === DIVIDER === */
hr.fancy {
  border: none;
  border-top: var(--border);
  margin: 0;
}

/* === ALBUM SHORTCUTS === */
#album-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 5px;
}

#album-shortcuts a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.72em;
  padding: 3px 8px;
  border: var(--border);
  background: var(--color-light);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#album-shortcuts a.featured-shortcut {
  border-color: var(--color-mid);
}

#album-shortcuts a:hover {
  background: var(--color-dark);
  color: var(--color-light);
}

/* === PHOTO GRID === */
#main > .view-btn {
  display: block;
  width: calc(50% - 2.5px);
  background: var(--color-light);
  border: var(--border);
  color: var(--color-dark);
  font-family: var(--font-mono);
  font-size: 0.72em;
  font-weight: normal;
  padding: 4px 12px;
  cursor: pointer;
  margin-bottom: 14px;
}

#main > .view-btn:hover {
  background: var(--color-dark);
  color: var(--color-light);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.photo-item {
  text-align: center;
  border: var(--border);
  padding: 4px;
  background: var(--color-light);
  min-width: 0;
  overflow: hidden;
}

/* Shared border-flash utility: briefly fades any bordered element's
   border-color from light → dark → light. Used by photo thumbnails and
   guestbook entries to draw attention after a deep-link scroll. */
@keyframes border-flash {
  0%   { border-color: var(--color-border); }
  50%  { border-color: var(--color-dark); }
  100% { border-color: var(--color-border); }
}

@keyframes border-flash-thumb {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}

.border-flash {
  animation: border-flash 1.5s ease-in-out 0.2s;
}

.border-flash .photo-placeholder {
  animation: border-flash-thumb 1.5s ease-in-out 0.2s;
}

/* Photo pairs (invisible wrapper in default/dense/denser) */
.photo-pair {
  display: contents;
}

/* Enlarged view — justified rows, 2 photos per row, matched heights */
.photo-grid.view-large {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.photo-grid.view-large .photo-pair {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.photo-grid.view-large .photo-item {
  flex: var(--photo-ar, 1.333) 1 0;
  box-sizing: content-box;
  min-width: 0;
  width: auto;
  overflow: hidden;
}

/* Lone trailing photo in an odd-count album — cap it at half width */
.photo-grid.view-large .photo-item:only-child {
  flex: 0 0 calc(50% - 5px);
  max-width: calc(50% - 5px);
}

/* Super featured: full-width hero in large view */
.photo-grid.view-large .super-featured-pair {
  display: flex;
}
.photo-grid.view-large .super-featured-pair .photo-item {
  flex: 1 1 100%;
  max-width: 100%;
}

/* Super featured: span full row in default (medium) grid */
.photo-grid:not(.view-large):not(.view-dense):not(.view-denser) .photo-item.super-featured {
  grid-column: 1 / -1;
}
.photo-grid:not(.view-dense):not(.view-denser) .photo-item.super-featured .photo-placeholder {
  aspect-ratio: var(--photo-ar, 1.333);
}

.photo-grid.view-large .photo-placeholder {
  aspect-ratio: var(--photo-ar, 1.333);
  font-size: 0;
  line-height: 0;
}

.photo-grid.view-large .photo-placeholder img:not(.photo-hover-full) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Denser: hide album headings except the primary "All Photos" one */
.view-denser-active .album-heading:not(.denser-primary) {
  display: none !important;
}

.view-denser-active .album-heading.denser-primary {
  border-bottom: none;
}

.view-denser-active .album-heading.denser-primary .album-name::after,
.view-denser-active .album-heading.denser-primary::after {
  display: none;
}

.photo-grid.view-dense {
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 0 -12px;
}

.photo-grid.view-dense .photo-item {
  border: none;
  padding: 0;
  background: none;
}

.photo-grid.view-dense .photo-caption {
  display: none;
}

/* Denser grid view */
.view-denser-active {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-left: -12px;
  margin-right: -12px;
}

#photos-container {
  overflow-anchor: none;
}
#photos-container.view-denser-active h2.album-heading {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.photo-grid.view-denser {
  display: contents;
}

.photo-grid.view-denser .photo-item {
  border: none;
  padding: 0;
  background: none;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.photo-grid.view-denser .photo-placeholder {
  background: none;
}

.photo-grid.view-denser .photo-caption {
  display: none;
}

.photo-hover-full {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: clip-path 0.07s linear;
  pointer-events: none;
}

.photo-placeholder {
  position: relative;
  background: var(--color-light-mid);
  border: none;
  color: var(--color-dark);
  font-size: 0.8em;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === LIGHTBOX === */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 5vh;
}

#lb-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: auto;
}

#lightbox.open {
  display: flex;
}

#lightbox-wrap {
  position: relative;
  cursor: auto;
  box-shadow: 0 0 0 3px #ffffff;
}

#lb-thumb {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

#lb-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.5s ease, clip-path 0.07s linear;
}

#lb-prev,
#lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  height: 30vh;
  display: flex;
  align-items: center;
  padding: 0 40px;
  color: var(--color-border);
  font-size: 2em;
  font-family: var(--font-mono);
  user-select: none;
  z-index: 1001;
}

#lb-prev { left: 0; }
#lb-next { right: 0; }

#lb-prev:hover,
#lb-next:hover {
  color: #0000EE;
}

#lightbox:has(.gb-share-open) #lb-prev,
#lightbox:has(.gb-share-open) #lb-next,
#lightbox:has(.gb-share-open) #lb-full {
  pointer-events: none;
}

#lightbox:has(.gb-share-open) #lb-prev,
#lightbox:has(.gb-share-open) #lb-next {
  opacity: 0.3;
}

#lb-caption {
  color: var(--color-border);
  font-size: 0.85em;
  font-family: var(--font-mono);
  text-align: center;
  user-select: none;
  padding: 0 95px;
  box-sizing: border-box;
}

#lb-meta {
  color: var(--color-mid);
  font-size: 0.75em;
  font-family: var(--font-mono);
  text-align: center;
  user-select: none;
  padding: 0 95px;
  box-sizing: border-box;
}

#lb-meta a {
  color: var(--color-light-mid);
  text-decoration: underline;
}

#lb-share-wrap {
  position: absolute;
  top: 100%;
  right: -3px;
  margin-top: 8px;
}

#lb-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-light);
  border: var(--border);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1;
  color: var(--color-dark);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

#lb-share-btn:hover {
  background: var(--color-dark);
  color: var(--color-light);
}

#lb-share-btn .gb-share-icon {
  width: 1em;
  height: 1em;
}

.lb-share-label {
  user-select: none;
}

#lb-share-menu {
  right: 0;
  bottom: 100%;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

body.default-cursor #lb-share-btn { cursor: pointer; }

.album-heading {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.album-heading::after {
  content: none;
}

.album-name::after {
  content: " V";
  font-size: 0.75em;
  color: var(--color-mid);
}

.album-heading.collapsed .album-name::after {
  content: " >";
}

/* No-JS fallback: albums as collapsible <details> */
.album-details {
  margin: 0;
}
.album-details > summary.album-heading {
  list-style: none;
}
.album-details > summary.album-heading::-webkit-details-marker {
  display: none;
}
.album-details > summary.album-heading .album-name::after {
  content: " V";
  font-size: 0.75em;
  color: var(--color-mid);
}
.album-details:not([open]) > summary.album-heading .album-name::after {
  content: " >";
}

.photo-caption {
  margin: 4px 0 0;
  font-size: 0.75em;
  color: var(--color-mid);
  font-style: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* === CAMERA STATS === */
#camera-stats {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px dashed var(--color-mid);
}

#camera-stats h2 {
  margin-top: 0;
}

#camera-stats-graph {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.camera-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
}

.camera-stat-name {
  width: 145px;
  flex-shrink: 0;
  text-align: left;
  color: var(--color-dark);
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-stat-bar-wrap {
  flex: 1;
  height: 18px;
  background: var(--color-light);
  border: 1px solid var(--color-mid);
}

.camera-stat-bar {
  height: 100%;
  background: var(--color-dark);
}

.camera-stat-count {
  min-width: 36px;
  text-align: left;
  font-family: var(--font-mono);
}

.camera-stat-total {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--color-mid);
}

@media (max-width: 600px) {
  .camera-stat-name {
    min-width: 100px;
    font-size: 0.75em;
  }
  .camera-stat-bar-wrap {
    height: 14px;
  }
}

/* === GEAR HEADINGS === */
.gear-heading {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gear-toggle {
  font-size: 0.65em;
  color: var(--color-mid);
  font-family: var(--font-mono);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  flex-shrink: 0;
}

.gear-toggle-img {
  display: block;
  text-align: right;
  cursor: pointer;
  font-size: 0.82em;
  color: var(--color-dark);
}

/* === GEAR LIST === */
.gear-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.gear-item {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.gear-img-wrap {
  flex-shrink: 0;
  width: 160px;
  text-align: center;
}

.gear-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  display: block;
  border: 2px inset var(--color-border);
  cursor: pointer;
}

.gear-img-label {
  font-size: 0.72em;
  color: var(--color-mid);
  font-style: italic;
  margin: 3px 0 0;
  word-break: break-all;
}

.gear-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.gear-desc {
  font-size: 0.9em;
  color: var(--color-dark);
  line-height: 1.6;
  margin: 2px 0 0;
}

.gear-period {
  font-size: 0.78em;
  color: var(--color-mid);
  font-style: italic;
  margin: 0;
}

/* === MOBILE DISCLAIMER === */
#mobile-disclaimer {
  display: none;
}

#sidebar-font-btn {
  display: none;
}

.hit-counter-mobile {
  display: none;
}

/* === TABLE SCROLL === */
.table-scroll {
  overflow-x: auto;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  body {
    padding: 6px;
  }

  #wrapper {
    max-width: 100%;
    border: none;
  }

  #header {
    padding: 18px 8px;
  }

  #header h1 {
    font-size: 9vw;
    letter-spacing: 2px;
  }

  .h1-line2 {
    display: block;
  }

  @keyframes wave {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
  }

  #nav {
    flex-wrap: nowrap;
    align-items: stretch;
  }

  #nav a {
    font-size: clamp(8px, 3.2vw, 0.72em);
    padding: 8px 2px;
    min-height: unset;
    flex: 1;
    justify-content: center;
  }

  #content {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    border-right: var(--border);
    border-bottom: none;
  }

  #sidebar-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    margin: -10px;
  }

  #sidebar-toggle {
    display: block;
    color: var(--color-light);
    font-size: 0.85em;
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    padding: 6px 2px;
    cursor: pointer;
    user-select: none;
  }

  #sidebar-font-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 2px outset var(--color-light-mid);
    background: var(--color-light-mid);
    color: var(--color-dark);
    font-family: "Geist", Arial, sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
  }
  #sidebar-font-btn:hover { border-style: inset; background: var(--color-light); }
  body.arial-mode #sidebar-font-btn { font-family: var(--font-heading) !important; }
  #sidebar .hit-counter { margin-top: 16px; margin-right: -4px; display: flex; align-items: baseline; justify-content: center; gap: 8px; }
  #sidebar .hit-counter .hit-counter-label { margin: 0; }
  #sidebar .hit-counter .hit-counter-label::after { content: ":"; }
  #sidebar .hit-counter .hit-counter-number { position: relative; top: 1px; }

  #sidebar.sidebar-collapsed > *:not(#sidebar-toggle-row) {
    display: none;
  }
  #sidebar.sidebar-collapsed #sidebar-font-btn {
    display: none;
  }

  .linkback-box {
    width: 50%;
    margin: 16px auto;
  }

  #main {
    border-top: none;
  }

  #main-col {
    border: var(--border);
  }

  #main h2 {
    font-size: 1.1em;
  }

  #footer {
    font-size: clamp(0.55em, 3.2vw, 0.92em);
    white-space: nowrap;
    border-bottom: var(--border);
  }

  /* Baseline mobile: 2 per row for all photo grids (index.html, test.html). */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Photos page medium view on mobile: 3 per row, matching dense view spacing
     (2px gap, 2px edge padding via -12px margin against #main's 14px). */
  #photos-container .photo-grid:not(.view-large):not(.view-dense):not(.view-denser) {
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-left: -12px;
    margin-right: -12px;
  }

  #photos-container .photo-grid:not(.view-large):not(.view-dense):not(.view-denser) .photo-item {
    border: none;
    padding: 0;
    background: none;
  }

  #photos-container .photo-grid:not(.view-large):not(.view-dense):not(.view-denser) .photo-caption {
    display: none;
  }

  #photos-container .photo-grid:not(.view-large):not(.view-dense):not(.view-denser) .photo-placeholder {
    aspect-ratio: 1;
  }

  .photo-grid.view-dense .photo-placeholder,
  .photo-grid.view-denser .photo-placeholder {
    aspect-ratio: 1;
  }

  .photo-grid.view-dense {
    grid-template-columns: repeat(4, 1fr);
  }

  .view-denser-active {
    grid-template-columns: repeat(5, 1fr);
  }

  .gear-img-wrap {
    width: 140px;
  }

  .gear-img {
    width: 140px;
    height: 140px;
  }

  #lb-prev,
  #lb-next {
    font-size: 1.4em;
    padding: 0 12px;
  }

  #lightbox-wrap {
    margin-top: 34px;
  }

  #lb-share-wrap {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 8px;
  }

  /* On mobile the share button sits ABOVE the photo — open the menu to
     the left of the button, top-aligned. */
  #lb-share-menu {
    top: 0;
    bottom: auto;
    right: 100%;
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 6px;
  }

  #lb-caption,
  #lb-meta {
    padding: 0;
  }

  .footer-banner {
    width: 100%;
    margin: 0;
  }

  /* On non-home pages, show disclaimer above the banner */
  body:not(.page-home) #wrapper {
    display: flex;
    flex-direction: column;
  }
  body:not(.page-home) #mobile-disclaimer { order: 1; }
  body:not(.page-home) .footer-banner     { order: 2; }
  body:not(.page-home) #footer            { order: 3; }

  .hit-counter-mobile {
    display: block;
    margin-bottom: 0;
    border: var(--border);
  }

  #main,
  #main-col {
    border-bottom: none;
  }

  #mobile-disclaimer {
    display: block;
    background: var(--color-mid);
    border-left: var(--border);
    border-right: var(--border);
    border-bottom: var(--border);
    padding: 4px 10px;
    text-align: center;
  }

  #mobile-disclaimer summary {
    color: var(--color-light-mid);
    font-size: 0.85em;
    font-family: var(--font-heading);
    text-transform: uppercase;
    padding-bottom: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    user-select: none;
    list-style: none;
  }

  #latest-photos .photo-item:nth-child(3) {
    display: none;
  }

  #cursor-toggle-btn,
  #font-toggle-btn {
    display: none;
  }

  #main .gb-entry-message.gb-font-comic { font-size: 0.8em; }

  #ctx-menu { font-size: 1.05em; min-width: 220px; }
  #ctx-menu li { padding: 10px 14px; }
  #ctx-btn-desc { padding: 8px 14px; }
  #ctx-link-preview { padding: 6px 14px; }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HOLIDAY THEMES
   Override CSS variables per holiday. All colours cascade
   automatically — no other changes needed.
   ============================================================ */

/* Christmas (Dec 24–26, Jan 6–8) */
body.holiday-christmas {
  --color-dark:       #1b4332;
  --color-mid:        #c0392b;
  --color-light-mid:  #d4edda;
  --color-border:     #c3e6cb;
  --color-table-row:  #e8f5e9;
}

/* Halloween (Oct 30–31) */
body.holiday-halloween {
  --color-dark:       #2d1b00;
  --color-mid:        #e67e22;
  --color-light-mid:  #f9c784;
  --color-border:     #f0d9a0;
  --color-table-row:  #fdf3dc;
}

/* Valentine's Day (Feb 13–15) */
body.holiday-valentine {
  --color-dark:       #b06080;
  --color-mid:        #e8a0bc;
  --color-light-mid:  #fce4ee;
  --color-border:     #f9d0e2;
  --color-table-row:  #fdf0f6;
}

/* New Year (Dec 31, Jan 1–3, Jan 13–15) */
body.holiday-newyear {
  --color-dark:       #1a1a2e;
  --color-mid:        #c9a84c;
  --color-light-mid:  #f5e6b8;
  --color-border:     #f0dfa0;
  --color-table-row:  #fdf8e1;
}

/* Women's Day (Mar 8–9) */
body.holiday-womensday {
  --color-dark:       #7b6fa0;
  --color-mid:        #b8a9d9;
  --color-light-mid:  #e8e0f5;
  --color-border:     #ded6f0;
  --color-table-row:  #f3effb;
}

/* April Fools (April 1) */
body.holiday-fools {
  --color-dark:       #1b4a1b;
  --color-mid:        #4caf50;
  --color-light-mid:  #c8e6c9;
  --color-border:     #b2dfb2;
  --color-table-row:  #e8f5e9;
}

/* === SHARED ARTIST THEME RULES ===
   All artist anniversary themes share: solid wallpaper, panel bg,
   and identical holiday-banner styling. Each theme defines
   --theme-wallpaper, --theme-panel, and optionally --theme-alt-row. */

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-alice, .holiday-strokes, .holiday-arctic-monkeys)::before {
  background-image: none;
  background-color: var(--theme-wallpaper);
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-alice, .holiday-strokes, .holiday-arctic-monkeys) :is(#sidebar, .marquee-bar, #holiday-banner, #holiday-banner-2) {
  background: var(--theme-panel);
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-alice, .holiday-strokes, .holiday-arctic-monkeys) :is(#holiday-banner, #holiday-banner-2) {
  color: var(--color-light);
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-alice, .holiday-strokes, .holiday-arctic-monkeys) :is(#holiday-banner, #holiday-banner-2) a {
  color: var(--color-light);
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-alice, .holiday-strokes, .holiday-arctic-monkeys) :is(#holiday-banner, #holiday-banner-2) a:hover {
  color: var(--color-light-mid);
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-arctic-monkeys) .gb-field :is(input, textarea) {
  background: #ffffff;
}

body:is(.holiday-clairo, .holiday-marias, .holiday-tyler, .holiday-strokes, .holiday-arctic-monkeys) .gb-entry:nth-child(even) {
  background: var(--theme-alt-row);
}

.artist-photos figure.artist-photos-featured.artist-theme-inactive {
  border-color: var(--color-border);
}
.artist-photos figure.artist-theme-active {
  border-color: var(--color-mid);
}

/* === INDIVIDUAL ARTIST THEMES (colors only) === */

/* Clairo Charm Anniversary (July 12) */
body.holiday-clairo {
  --color-dark:       #363436;
  --color-mid:        #888740;
  --color-light-mid:  #c4c39a;
  --color-border:     #777638;
  --color-table-row:  #f5f4ec;
  --color-light:      #f8f8ee;
  --theme-wallpaper:  #888740;
  --theme-panel:      #6b6c34;
  --theme-alt-row:    #ececde;
}

#clairo-svg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("Clairo_Charm.svg");
  background-size: 300px 180px;
  background-repeat: space;
  background-position: center;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.7s;
}

.footer-banner-wrap {
  background-image: url("wallpaper.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  line-height: 0;
}

/* The Marías Submarine Anniversary (May 31) */
body.holiday-marias {
  --color-dark:       #0a0d32;
  --color-mid:        #275187;
  --color-light-mid:  #788eb5;
  --color-border:     #3c5786;
  --color-table-row:  #dce5f2;
  --color-light:      #d8e3f0;
  --theme-wallpaper:  #275187;
  --theme-panel:      #132954;
  --theme-alt-row:    #c8d4e8;
}

/* Tyler, The Creator Flower Boy Anniversary (July 21) */
body.holiday-tyler {
  --color-dark:       #18130B;
  --color-mid:        #D6512F;
  --color-light-mid:  #EAA330;
  --color-border:     #4A4330;
  --color-table-row:  #F5E0BC;
  --color-light:      #FBF0D5;
  --theme-wallpaper:  #E14318;
  --theme-panel:      #4A4330;
  --theme-alt-row:    #E6B26C;
}

/* Alice Phoebe Lou Witches Anniversary (March 13) */
body.holiday-alice {
  --color-dark:       #031707;
  --color-mid:        #CC1401;
  --color-light-mid:  #808B21;
  --color-border:     #3F7505;
  --color-table-row:  #E3D4CD;
  --color-light:      #DBC8B3;
  --theme-wallpaper:  #3F6A65;
  --theme-panel:      #2A4F4B;
}

/* The Strokes Comedown Machine Anniversary (March 26) */
body.holiday-strokes {
  --color-dark:       #7A1519;
  --color-mid:        #B6292F;
  --color-light-mid:  #C89B78;
  --color-border:     #9E7055;
  --color-table-row:  #E8D5BC;
  --color-light:      #D1B89A;
  --theme-wallpaper:  #5C0F12;
  --theme-panel:      #7A1519;
  --theme-alt-row:    #E8D5BC;
}

/* Arctic Monkeys Humbug Anniversary (August 19) */
body.holiday-arctic-monkeys {
  --color-dark:       #641145;
  --color-mid:        #703656;
  --color-light-mid:  #B18A8C;
  --color-border:     #796F7D;
  --color-table-row:  #DEC7B5;
  --color-light:      #E2D7BB;
  --theme-wallpaper:  #631E50;
  --theme-panel:      #662446;
  --theme-alt-row:    #B6AD9C;
}

/* Kosta's Birthday (August 31) */
body.holiday-birthday {
  --color-dark:       #8b0000;
  --color-mid:        #cc2222;
  --color-light-mid:  #f5c0c0;
  --color-border:     #e8a0a0;
  --color-table-row:  #fdf0f0;
}

/* Novi Sad Memorial Day (November 1) */
/* Filter on #wrapper's children (not #wrapper itself) so #wrapper never creates
   a stacking context — keeps position:fixed siblings (dev panel, lightbox, toast)
   correctly positioned and painted on top */
body.memorial-greyscale #wrapper > *,
body.memorial-greyscale #ctx-menu,
body.memorial-greyscale::before {
  filter: grayscale(1);
}

#memorial-nav-link {
  display: none;
  text-align: left;
  padding: 6px;
  font-size: 0.9em;
  font-family: 'Times New Roman', Times, serif;
}

#memorial-nav-link a::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  margin-right: 4px;
  vertical-align: middle;
}

body.memorial-greyscale #memorial-nav-link {
  display: block;
}

body.holiday-memorial {
  --color-dark:       #0d0d0d;
  --color-mid:        #555555;
  --color-light-mid:  #cccccc;
  --color-border:     #999999;
  --color-table-row:  #eeeeee;
}

body.holiday-memorial #wrapper > * {
  filter: grayscale(1);
}

body.holiday-memorial .marquee-bar,
body.holiday-memorial .footer-banner,
body.holiday-memorial #sidebar,
body.holiday-memorial hr.fancy,
body.holiday-memorial #nav,
body.holiday-memorial #mobile-disclaimer {
  display: none;
}

body.holiday-memorial::before {
  display: none;
}

body:not(.page-home) #footer {
  margin-top: 8px;
  border-top: var(--border);
}

body.holiday-memorial #footer {
  margin-top: 0;
}

body.holiday-memorial #content,
body.holiday-memorial #main-col > #main {
  border-top: none;
}

#main-content-dropdown > summary {
  display: none;
  cursor: pointer;
}

body.holiday-memorial #main-content-dropdown > summary {
  display: list-item;
  cursor: pointer;
  margin: 12px 0;
  color: var(--color-mid);
}

body.holiday-memorial .wave-letter,
body.memorial-greyscale .wave-letter {
  animation: none;
  display: inline;
}

body.holiday-memorial * {
  font-family: 'Times New Roman', Times, serif !important;
}

.memorial-section {
  display: none;
}

body.holiday-memorial .memorial-section {
  display: block;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.memorial-photos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  body.holiday-memorial .memorial-section {
    display: flex;
    flex-direction: column;
  }

  .memorial-section h2  { order: 0; }
  .memorial-photos      { order: 1; margin-top: 0; margin-bottom: 12px; }
  .memorial-section > p { order: 2; }
}

.memorial-photos img {
  flex: 1 1 0;
  width: 0;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border: var(--border);
  cursor: pointer;
}

/* === GUESTBOOK === */
.guestbook-form {
  margin-bottom: 20px;
}

.gb-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.gb-field {
  margin-bottom: 10px;
  position: relative;
}

.gb-field:has(.gb-toggle-row) {
  margin-bottom: 26px;
}

.gb-website-optional {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.72em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-light-mid);
}

#gb-website:focus ~ .gb-website-optional,
#gb-website:not(:placeholder-shown) ~ .gb-website-optional {
  opacity: 0;
}

.gb-field label {
  display: block;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-mid);
  margin-bottom: 3px;
  cursor: auto;
}

.gb-optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-light-mid);
  font-size: 0.9em;
}

.gb-field input,
.gb-field textarea {
  width: 100%;
  background: var(--color-light);
  border: var(--border);
  padding: 6px 8px;
  font-family: "Redaction", "Times New Roman", serif;
  font-size: 0.9em;
  color: var(--color-dark);
  resize: vertical;
  cursor: pointer;
}

#gb-message {
  font-family: var(--font-body);
  font-size: 1.0em;
  line-height: 1.5;
}

.gb-field input:focus,
.gb-field textarea:focus {
  outline: none;
  border-color: var(--color-mid);
}

.gb-field input::placeholder,
.gb-field textarea::placeholder {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-mid);
}

.gb-char-count {
  display: block;
  text-align: right;
  font-size: 0.75em;
  color: var(--color-mid);
  margin-top: 2px;
}

.gb-char-count-warn {
  color: #b45309;
}

.gb-submit {
  background: var(--color-dark);
  color: var(--color-light);
  border: var(--border);
  padding: 6px 14px;
  font-family: var(--font-heading);
  font-size: 0.9em;
  cursor: pointer;
}

.gb-submit:hover {
  background: var(--color-mid);
}

a.motd-entry-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.motd-entry-link:hover .gb-entry {
  border-color: var(--color-dark);
}

.gb-entry {
  border: var(--border);
  padding: 10px;
  margin-bottom: 10px;
  background: var(--color-table-row);
}

.gb-entry:nth-child(even) {
  background: var(--color-light-mid);
}

.gb-entry-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8em;
  color: var(--color-mid);
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--color-mid);
  padding-bottom: 4px;
}

.gb-entry-name {
  flex: 1;
  font-weight: bold;
  color: var(--color-dark);
}

.gb-ai-tag {
  font-weight: normal;
  font-size: 0.8em;
  font-family: "Roboto Mono", var(--font-mono);
  color: var(--color-mid);
}

.gb-entry-date {
  color: var(--color-mid);
  font-size: 0.85em;
}

.gb-entry-num {
  font-size: 0.95em;
  color: var(--color-dark);
  font-family: "VCR OSD Mono", var(--font-mono);
  white-space: nowrap;
}

#main .gb-entry-message {
  font-size: 1.0em;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
  /* Establish a block formatting context so the floated .gb-share-wrap-inline
     stays vertically contained inside the message instead of overflowing past
     the entry when the float drops to its own line. */
  display: flow-root;
}

.gb-font-btn {
  background: none;
  border: var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9em;
  overflow: hidden;
  color: var(--color-mid);
  padding: 0 8px;
  height: 32px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  width: fit-content;
  text-align: left;
  margin-top: 10px;
  white-space: nowrap;
}

.gb-font-btn:hover,
.gb-font-btn.gb-font-btn-used {
  color: var(--color-dark);
  border-color: var(--color-mid);
}

.gb-font-btn span:last-child {
  line-height: 1;
}

.gb-font-btn[data-font-key="chetkiy"] {
  font-family: "Chetkiy", sans-serif;
  font-size: 1.1em;
}

#main .gb-entry-message.gb-font-comic      { font-family: "Comic Sans MS", "Comic Sans", sans-serif; font-style: normal; }
#main .gb-entry-message.gb-font-blaster    { font-family: "Blaster", sans-serif; font-size: 0.9em; }
#main .gb-entry-message.gb-font-chetkiy    { font-family: "Chetkiy", sans-serif; font-size: 1.3em; line-height: 1.2; letter-spacing: 0.1em; }
#main .gb-entry-message.gb-font-robotomono { font-family: "Roboto Mono", var(--font-mono); line-height: 1.2; font-size: 0.85em; }
#main .gb-entry-message.gb-font-wingdings  { font-family: "Wingdings 3", sans-serif; font-size: 1.1em; }

.gb-entry-reply {
  margin-top: 6px;
  padding: 4px 0 0;
  border-top: 1px dashed var(--color-border);
  font-size: 0.82em;
  line-height: 1.4;
  color: var(--color-mid);
}
.gb-reply-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
  font-size: 0.85em;
}
.gb-reply-author {
  font-weight: bold;
}
.gb-reply-date {
  margin-left: auto;
  font-size: 0.9em;
  white-space: nowrap;
}

.gb-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.gb-toggle-row .gb-font-btn,
.gb-toggle-row .gb-gif-btn {
  margin-top: 0;
}

.gb-gif-btn {
  background: none;
  border: var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9em;
  color: var(--color-mid);
  padding: 0 8px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  width: fit-content;
  text-align: left;
  white-space: nowrap;
}

.gb-gif-btn[hidden] {
  display: none;
}

.gb-gif-btn:hover {
  color: var(--color-dark);
  border-color: var(--color-mid);
}

.gb-gif-btn-thumb {
  display: block;
  max-width: 20px;
  max-height: 20px;
  width: auto;
  height: auto;
}

.gb-gif-picker {
  margin-top: 8px;
  background: var(--color-light);
  border: var(--border);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.gb-gif-picker[hidden] {
  display: none;
}

.gb-gif-picker-dragover {
  border-color: var(--color-text);
}

.gb-gif-warning {
  color: #c0392b;
  font-weight: bold;
  margin-top: 6px;
  font-size: 0.9em;
}

.gb-gif-warning[hidden] {
  display: none;
}

.gb-gif-tile-label-error {
  color: #c0392b;
  font-weight: bold;
}

.gb-entry-preview {
  margin-top: 4px;
}

.gb-entry-preview[hidden] {
  display: none;
}

.gb-gif-picker-note {
  grid-column: 1 / -1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 0.72em;
  color: var(--color-mid);
  letter-spacing: 0.5px;
  padding: 2px 4px 6px;
  border-bottom: 1px dashed var(--color-mid);
  text-align: center;
}

.gb-gif-tile.gb-gif-tile-custom {
  display: none;
}

.gb-gif-tile.gb-gif-tile-upload-action {
  display: none;
}

.gb-gif-row-break {
  display: none;
}

.gb-gif-picker-custom .gb-gif-tile:not(.gb-gif-tile-upload):not(.gb-gif-tile-upload-action):not(.gb-gif-tile-none):not(.gb-gif-tile-custom) {
  display: none;
}

.gb-gif-picker-custom .gb-gif-tile-upload-action {
  display: flex;
  grid-column: 3 / -1;
  grid-row: 2;
  height: 66%;
  align-self: start;
  justify-content: center;
  align-items: center;
}

.gb-gif-url-row {
  display: none;
}

.gb-gif-picker-custom .gb-gif-url-row {
  display: flex;
  gap: 4px;
  grid-column: 3 / -1;
  grid-row: 2;
  align-self: end;
  height: 30%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .gb-gif-picker-custom .gb-gif-tile-upload-action {
    height: auto;
    align-self: stretch;
  }
  .gb-gif-picker-custom .gb-gif-url-row {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    height: 30px;
  }
}

.gb-gif-url-input {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 8px;
  background: var(--color-light);
  border: var(--border);
  font-family: inherit;
  font-size: 0.85em;
  color: var(--color-mid);
  height: 100%;
}

.gb-gif-url-check {
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 0 10px;
  height: 100%;
  background: none;
  border: var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75em;
  color: var(--color-mid);
  text-transform: lowercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.gb-gif-url-check:hover {
  background: var(--color-light-mid);
  color: var(--color-dark);
  border-color: var(--color-mid);
}

.gb-gif-tile-x.gb-gif-tile-glyph-back,
.gb-gif-tile-label.gb-gif-tile-label-back {
  display: none;
}

.gb-gif-picker-custom .gb-gif-tile-x.gb-gif-tile-glyph-default,
.gb-gif-picker-custom .gb-gif-tile-label.gb-gif-tile-label-default {
  display: none;
}

.gb-gif-picker-custom .gb-gif-tile-x.gb-gif-tile-glyph-back {
  display: flex;
}

.gb-gif-picker-custom .gb-gif-tile-label.gb-gif-tile-label-back {
  display: inline;
}

.gb-gif-picker-custom .gb-gif-tile-custom {
  display: flex;
}

.gb-gif-picker-custom .gb-gif-row-break {
  display: block;
  grid-column: 1 / -1;
  height: 0;
  margin: 0;
  padding: 0;
}

.gb-gif-tile {
  background: none;
  border: var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75em;
  color: var(--color-mid);
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
}

.gb-gif-tile img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.gb-gif-tile[data-gif="car"] img {
  object-fit: contain;
  background: var(--color-light);
}

.gb-gif-tile[data-gif="nyan_cat"] img {
  object-position: right center;
}

.gb-gif-tile:hover {
  background: var(--color-light-mid);
  color: var(--color-dark);
  border-color: var(--color-mid);
}

.gb-gif-tile-active {
  background: var(--color-light-mid);
  color: var(--color-dark);
  border-color: var(--color-dark);
}

.gb-gif-tile-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 2em;
  line-height: 1;
  color: var(--color-mid);
}

.gb-gif-tile-label {
  text-transform: lowercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.gb-entry-gifs {
  display: flex;
  gap: 0;
  margin-top: 6px;
}

.gb-entry-gifs-single {
  justify-content: center;
}

.gb-entry-gif {
  display: block;
  height: 100px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.gb-entry-gif:not(:only-child) {
  max-width: calc(100% / var(--gif-count, 1));
  flex-shrink: 1;
  min-width: 0;
}

.gb-censored {
  font-family: "Roboto Mono", var(--font-mono);
  letter-spacing: -0.05em;
}

.gb-read-more {
  display: block;
  margin-top: 4px;
  font-size: 0.8em;
  color: var(--color-mid);
  cursor: pointer;
  user-select: none;
}

.gb-read-more:hover {
  color: var(--color-dark);
}

#gb-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
}

#gb-readable-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: monospace;
  font-size: 0.85em;
  color: var(--color-mid);
  padding: 0;
}

#gb-readable-btn:hover {
  color: var(--color-dark);
}

body.default-cursor #gb-readable-btn { cursor: pointer; }

#guestbook-entries.gb-plain-font .gb-entry-message {
  font-family: "Roboto Mono", var(--font-mono) !important;
  font-size: 0.85em !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}

#guestbook-entries.gb-plain-font .gb-entry-name {
  font-family: "Roboto Mono", var(--font-mono) !important;
  letter-spacing: normal !important;
}

.gb-empty {
  font-size: 0.85em;
  color: var(--color-light-mid);
  font-style: italic;
}

#gb-pagination {
  overflow-x: auto;
}

.gb-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 12px 0 4px;
  min-width: min-content;
}

@media (min-width: 601px) {
  #gb-pagination .gb-pag {
    transform: translateX(-80px);
  }
}

.gb-pag-btn {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 3px 9px;
  border: var(--border);
  background: var(--color-light);
  color: var(--color-dark);
  cursor: pointer;
  min-width: 2.2em;
  text-align: center;
  transition: background 0.1s;
}

.gb-pag-btn:hover:not(:disabled) {
  background: var(--color-light-mid);
}

.gb-pag-active {
  background: var(--color-dark);
  color: var(--color-light);
  border-color: var(--color-dark);
}

.gb-pag-btn.gb-pag-active:hover {
  background: var(--color-dark);
}

.gb-pag-disabled {
  opacity: 0.35;
  cursor: default;
}

.gb-pag-ellipsis {
  font-size: 0.82em;
  color: var(--color-light-mid);
  padding: 0 2px;
  font-family: var(--font-mono);
}

.gb-pag-perpage {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 8px;
}

.gb-pag-sep {
  color: var(--color-light-mid);
  font-size: 0.82em;
  font-family: var(--font-mono);
}

.gb-pag-order-btn {
  color: var(--color-mid);
  border-color: transparent;
  background: transparent;
}

.gb-pag-order-btn:hover {
  color: var(--color-dark);
}

.gb-order-arrow {
  font-size: 0.75em;
}

.gb-pag-perpage .gb-pag-btn {
  font-size: 0.72em;
  padding: 2px 7px;
  border-color: transparent;
  background: transparent;
  color: var(--color-mid);
}

.gb-pag-perpage .gb-pag-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--color-dark);
}

.gb-pag-perpage .gb-pag-active {
  background: transparent;
  color: var(--color-dark);
  border-color: transparent;
  font-weight: bold;
  text-decoration: underline;
}

.gb-flash {
  padding: 8px 12px;
  margin-bottom: 12px;
  border: var(--border);
  font-size: 0.9em;
}
.gb-flash-ok  { background: var(--color-table-row); color: var(--color-dark); }
.gb-flash-err { background: #f8e8e8; color: #7a2020; border-color: #e0b0b0; }

/* === CUSTOM CONTEXT MENU === */
#ctx-menu {
  position: fixed;
  z-index: 9000;
  background: var(--color-light);
  border: var(--border);
  min-width: 195px;
  box-shadow: 4px 4px 0 var(--color-mid);
  display: none;
  font-family: "Redaction", "Times New Roman", serif;
  font-size: 0.88em;
  user-select: none;
}
#ctx-menu.ctx-open { display: block; }

#ctx-title {
  background: var(--color-dark);
  padding: 3px 8px 4px;
  font-family: "VCR OSD Mono", var(--font-mono);
  font-size: 0.75em;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#ctx-title span {
  animation: ctx-char 2.8s steps(1) infinite;
}

@keyframes ctx-char {
  0%     { color: #F7FAFC; }
  7.14%  { color: #EDE9E4; }
  14.29% { color: #C8DCE8; }
  21.43% { color: #80a4ba; }
  28.57% { color: #F7FAFC; }
  35.71% { color: #EDE9E4; }
  42.86% { color: #C8DCE8; }
  50%    { color: #80a4ba; }
  57.14% { color: #F7FAFC; }
  64.29% { color: #EDE9E4; }
  71.43% { color: #C8DCE8; }
  78.57% { color: #80a4ba; }
  85.71% { color: #F7FAFC; }
  92.86% { color: #EDE9E4; }
  100%   { color: #C8DCE8; }
}

#ctx-menu ul {
  list-style: none;
  margin: 0;
  padding: 3px 0;
}

#ctx-menu li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--color-dark);
}
#ctx-menu li:hover {
  background: var(--color-dark);
  color: var(--color-light);
}
#ctx-menu li:hover .ctx-shortcut { color: var(--color-light-mid); }

.ctx-shortcut {
  font-family: "VCR OSD Mono", var(--font-mono);
  font-size: 0.72em;
  color: var(--color-mid);
  white-space: nowrap;
}

.ctx-sep {
  border: none;
  border-top: 1px dashed var(--color-mid);
  margin: 3px 8px;
  padding: 0 !important;
  cursor: default !important;
}
.ctx-sep:hover { background: none !important; color: inherit !important; }

#ctx-btn-desc {
  padding: 4px 10px 5px;
  font-family: "Redaction", "Times New Roman", serif;
  font-size: 0.82em;
  color: var(--color-mid);
  font-style: italic;
  cursor: default;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ctx-link-preview {
  padding: 3px 10px 5px;
  font-family: "VCR OSD Mono", var(--font-mono);
  font-size: 0.68em;
  color: var(--color-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  cursor: default;
}

.ctx-item-disabled {
  opacity: 0.38;
  cursor: default !important;
  pointer-events: none;
}

body.default-cursor #ctx-menu li { cursor: pointer; }

/* === VIDEO GRID === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.video-item a {
  cursor: pointer;
  display: block;
  border: 2px inset var(--color-border);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === YOUTUBE FEATURE === */
.yt-feature {
  display: none;
  margin-bottom: 16px;
}

body.holiday-saintsava .yt-saintsava,
body.holiday-zabeograd .yt-zabeograd {
  display: block;
}

.yt-thumb {
  display: block;
  width: 100%;
  border: var(--border);
}

.yt-title {
  margin: 6px 0 0;
  font-size: 0.85em;
}

.yt-quote {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px dashed var(--color-light-mid);
  font-size: 0.85em;
  font-style: italic;
}

/* === 404 PAGE === */
.content-no-top { border-top: none; }

.main-404 {
  text-align: center;
  padding: 40px 14px;
}

.error-code {
  font-size: 4em;
  margin: 0;
  line-height: 1;
}

.error-code + h2 {
  margin-top: 0.5em;
}

/* === SPOTIFY PLAYLIST BLOCK === */
.playlist-block {
  background: var(--color-dark);
  border: var(--border);
  padding: 10px;
  margin-bottom: 16px;
}

.playlist-block-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 0.75em;
  text-transform: uppercase;
  color: var(--color-light-mid);
  border-bottom: 1px dashed var(--color-light-mid);
  padding-bottom: 4px;
  letter-spacing: 2px;
}

.playlist-block-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.playlist-block-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 2px inset var(--color-border);
  flex-shrink: 0;
}

.playlist-block-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-light);
}

.playlist-block-subtitle {
  margin: 8px 0 0;
  font-size: 0.8em;
  color: var(--color-light-mid);
  font-style: italic;
}

.playlist-block-cta {
  margin: 12px 0 0;
  font-size: 0.8em;
  color: var(--color-mid);
}

/* === NOW PLAYING BLOCK === */
.recent-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-left: 13px;
}

.now-playing-block {
  background: var(--color-dark);
  border: var(--border);
  padding: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.albums-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.albums-block p {
  flex: 1;
}

.artist-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  align-items: flex-start;
}
.artist-photos figure {
  flex: 1 1 calc(33.33% - 6px);
  max-width: calc(33.33% - 6px);
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: var(--border);
  padding: 4px;
  background: var(--color-light);
}
.artist-photos-featured {
  flex: 1.25 1 calc(33.33% - 6px);
  transform: translateY(-20px);
  margin-bottom: -4px;
  position: relative;
}
.artist-photos figure.artist-photos-featured {
  border-color: var(--color-mid);
}
.artist-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}
.artist-photos img[data-holiday-fade] {
  cursor: pointer;
}
.artist-photos figcaption {
  font-size: 0.8em;
  text-align: center;
  margin-top: 4px;
  color: var(--color-mid);
}

.artist-click-hint {
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8em;
  color: var(--color-light-mid);
}

.album-cover,
.track-cover {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 2px inset var(--color-border);
  flex-shrink: 0;
  cursor: pointer;
}

.now-playing-text {
  margin: 0;
  font-size: 0.9em;
  color: var(--color-light);
}

/* No-JS fallback: favourites [more] as <details> */
.fav-more {
  display: block;
}
.fav-more > summary {
  display: block;
  text-align: right;
  list-style: none;
  cursor: pointer;
  color: var(--color-mid);
}
.fav-more > summary::-webkit-details-marker {
  display: none;
}

/* === TOAST === */
#toast {
  position: absolute;
  background: var(--color-dark);
  color: var(--color-light);
  padding: 7px 18px;
  border: 2px outset var(--color-mid);
  font-size: 0.85em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
}
#toast.toast-visible { opacity: 1; }

/* === EXTERNAL LINK POPUP === */
#ext-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ext-dialog {
  background: var(--color-light);
  border: 3px outset var(--color-border);
  width: min(340px, 90vw);
  font-family: var(--font-body);
  color: var(--color-dark);
  box-shadow: 4px 4px 0 var(--color-mid);
}

#ext-dialog-title {
  background: var(--color-dark);
  color: var(--color-light);
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 5px 10px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

#ext-dialog-body {
  padding: 14px 16px 10px;
  text-align: center;
}

#ext-dialog-body p {
  margin: 0 0 8px;
  font-size: 0.9em;
  line-height: 1.4;
}

#ext-dialog-url {
  display: block;
  word-break: break-all;
  font-family: "Roboto Mono", var(--font-mono);
  font-size: 0.78em;
  background: var(--color-light-mid);
  border: 1px inset var(--color-border);
  padding: 5px 8px;
  margin-bottom: 12px;
  color: var(--color-dark);
}

#ext-dialog-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0 16px 14px;
}

#ext-dialog-btns button {
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: bold;
  padding: 5px 16px;
  border: 2px outset var(--color-light-mid);
  background: var(--color-light-mid);
  color: var(--color-dark);
  cursor: pointer;
  min-width: 70px;
}

#ext-dialog-btns button:hover {
  border-style: inset;
  background: var(--color-light);
}

body.default-cursor #ext-dialog-btns button { cursor: pointer; }

.gb-share-wrap-inline {
  position: relative;
  float: right;
  padding: 0 0 4px 8px;
  vertical-align: baseline;
}

.gb-share-btn {
  display: block;
  background: none;
  border: none;
  font-size: 0.85em;
  line-height: 1;
  color: var(--color-dark);
  cursor: pointer;
  padding: 10px;
  transition: color 0.15s;
}

.gb-share-wrap-inline .gb-share-btn {
  padding: 0;
}

.gb-share-btn > * {
  opacity: 0.7;
  transition: opacity 0.15s;
}

.gb-share-btn:hover > * {
  opacity: 1;
}

.gb-share-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 4px;
  background: var(--color-light);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--color-mid);
  z-index: 100;
  white-space: nowrap;
  font-family: "Redaction", "Times New Roman", serif;
}

.gb-share-wrap.gb-share-open .gb-share-menu {
  display: block;
}

.gb-share-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.92em;
  color: var(--color-dark);
  text-align: left;
  cursor: pointer;
}

.gb-share-menu-item:hover {
  background: var(--color-dark);
  color: var(--color-light);
}

body.default-cursor .gb-share-menu-item { cursor: pointer; }

/* Larger tap targets on mobile so the two share-popup options are easier
   to hit individually. Placed after the base rule (rather than inside the
   main mobile media query higher up in the file) so it actually wins on
   source-order — the base rule sits later in the file otherwise. */
@media (max-width: 600px) {
  .gb-share-menu-item {
    padding: 16px 20px;
    font-size: 1em;
  }
  .gb-share-menu-item + .gb-share-menu-item {
    border-top: 1px dashed var(--color-mid);
  }
}

.gb-share-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask: url("share.svg") no-repeat center / contain;
          mask: url("share.svg") no-repeat center / contain;
}

body.default-cursor .gb-share-btn { cursor: pointer; }

/* === SECRET ATTIC EASTER EGG === */
#header {
  position: relative;
}
#header p.tagline {
  cursor: pointer;
}
#header.header-flash {
  animation: header-flash-anim 0.6s ease-out;
}
.attic-tap-counter {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-family: "Courier New", monospace;
  font-size: 0.75em;
  color: var(--color-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  letter-spacing: 1px;
}
.attic-tap-counter.visible {
  opacity: 0.55;
}
@keyframes header-flash-anim {
  0%   { filter: brightness(5); }
  100% { filter: brightness(1); }
}

.secret-flash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: #fff;
  animation: secret-flash-anim 0.55s ease-out forwards;
}
@keyframes secret-flash-anim {
  0%   { opacity: 0; background: #fff; }
  15%  { opacity: 1; background: #fff; }
  100% { opacity: 1; background: #000; }
}

/* === VIEW CYCLE (photos page) === */
#view-cycle-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: max(16px, calc(50% - 352px - 370px));
  z-index: 1000;
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-light);
  font-family: var(--font-heading);
  font-size: 1em;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--color-mid);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  max-width: 3em;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}
.grid-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  position: relative;
  flex-shrink: 0;
}
.grid-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--color-light);
  box-shadow:
    6px 0 0 var(--color-light),
    12px 0 0 var(--color-light),
    0 6px 0 var(--color-light),
    6px 6px 0 var(--color-light),
    12px 6px 0 var(--color-light),
    0 12px 0 var(--color-light),
    6px 12px 0 var(--color-light),
    12px 12px 0 var(--color-light);
}
#view-cycle-btn.visible {
  display: flex;
}
#view-cycle-btn.show-label {
  max-width: 14em;
}
#view-cycle-label {
  display: none;
  font-size: 0.8em;
}
#view-cycle-btn.show-label #view-cycle-label {
  display: inline;
}

/* === SCROLL TO TOP (photos & guestbook pages) === */
#scroll-top-btn {
  display: none;
  position: fixed;
  bottom: 72px;
  right: max(16px, calc(50% - 352px - 370px));
  z-index: 1000;
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-light);
  font-family: var(--font-heading);
  font-size: 1em;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--color-mid);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  max-width: 3em;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}
#scroll-top-btn.visible {
  display: flex;
}
#scroll-top-btn.show-label {
  max-width: 14em;
}
#scroll-top-label {
  display: none;
  font-size: 0.8em;
}
#scroll-top-btn.show-label #scroll-top-label {
  display: inline;
}
@media (min-aspect-ratio: 17/9) {
  #view-cycle-btn {
    right: max(16px, calc(50% - 352px - 60px));
  }
  #scroll-top-btn {
    right: max(16px, calc(50% - 352px - 60px));
  }
}
/* Desktop: move buttons above the Time Machine panel */
body:has(#holiday-dev-panel.holiday-dev-open) #view-cycle-btn {
  bottom: 390px;
}
body:has(#holiday-dev-panel.holiday-dev-open) #scroll-top-btn {
  bottom: 442px;
}
body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-minimized) #view-cycle-btn {
  bottom: 80px;
}
body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-minimized) #scroll-top-btn {
  bottom: 132px;
}
/* Mobile: move buttons above the Time Machine panel */
@media (max-width: 600px) {
  body:has(#holiday-dev-panel.holiday-dev-open) #view-cycle-btn,
  body:has(#holiday-dev-panel.holiday-dev-open) #scroll-top-btn {
    right: 16px;
  }
  body:has(#holiday-dev-panel.holiday-dev-open) #view-cycle-btn {
    bottom: calc(33vh + 20px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open) #scroll-top-btn {
    bottom: calc(33vh + 72px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-minimized) #view-cycle-btn {
    bottom: 60px;
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-minimized) #scroll-top-btn {
    bottom: 112px;
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-fullscreen) #view-cycle-btn {
    bottom: calc(75vh + 20px);
  }
  body:has(#holiday-dev-panel.holiday-dev-open.holiday-dev-fullscreen) #scroll-top-btn {
    bottom: calc(75vh + 72px);
  }
}
