/* ==========================================================================
   site.css — SillyLaird global stylesheet
   Sections: Variables, Reset, Layout, Typography, Header, Navigation,
             Components, Pages, Footer, Utilities, Responsive, Theme
   ========================================================================== */

/* ==========================================================================
   1. Variables
   ========================================================================== */
:root {
  --bg: #000000;
  --ink: #8b0000;
  --muted: #8b0000;
  --accent: #a00000;
  --gold: #8b0000;
  --border: #3a0000;
  --shadow: rgba(0, 0, 0, .40);

  --wrap: 960px;
  --r: 6px;

  /* Unified spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.35rem;
  --space-2xl: 1.75rem;
  --space-3xl: 2.5rem;

  /* Fluid typography scale (clamp: min, preferred, max) */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);
  --fs-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --fs-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --fs-lg: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-xl: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  --fs-2xl: clamp(1.3rem, 1.15rem + 0.75vw, 1.5rem);
  --fs-3xl: clamp(1.5rem, 1.3rem + 1vw, 1.8rem);
}

/* ==========================================================================
   2. Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
}

/* ==========================================================================
   3. Base / Typography
   ========================================================================== */
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-base);
  overflow-x: hidden;
}

p {
  margin: var(--space-sm) 0;
  line-height: 1.6;
}

p:first-child {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

video {
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: 0.1s;
}

a:hover {
  background: var(--accent);
  color: #e0e0e0;
}

h1 {
  margin: 0 0 var(--space-md) 0;
  color: var(--gold);
  font-weight: 700;
  font-size: var(--fs-2xl);
  letter-spacing: .2px;
  line-height: 1.2;
}

h2 {
  margin: 0 0 var(--space-md) 0;
  color: var(--gold);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: .1px;
  line-height: 1.3;
}

blockquote {
  margin: var(--space-md) 0 0 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-style: italic;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* Comic Sans headers (intentional retro style) */
h1 {
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  padding-left: 40px;
}

pre {
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
  font-size: 12px;
  padding-left: 40px;
}

/* ==========================================================================
   4. Accessibility
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .5rem .75rem;
  border-radius: var(--r);
  z-index: 2000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-3xl);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.stack-small {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

section {
  margin: var(--space-xl) 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-lg);
  background: var(--bg);
}

/* ==========================================================================
   6. Header
   ========================================================================== */
header.site-header,
footer.site-footer {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 240px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
}

.logo img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  border: 2px solid var(--border);
  border-radius: var(--r);
}

header.site-header .logo:hover img,
header.site-header .logo:focus-visible img {
  border-color: var(--accent, #6b0000);
  box-shadow: 0 0 10px var(--accent, #6b0000);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: var(--fs-lg);
  color: var(--ink, #8b0000);
  letter-spacing: .2px;
}

.brand-text span {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-button {
  font-size: var(--fs-sm);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}

.header-button:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

/* ==========================================================================
   7. Navigation Menu
   ========================================================================== */
.menu-wrapper {
  position: relative;
}

#menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform .25s ease;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  padding: 0;
}

#menu-toggle:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

#menu-toggle.active {
  transform: rotate(90deg);
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border);
}

#menu-toggle.active:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

nav.site-nav {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-xs));
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: var(--space-md) var(--space-md);
  min-width: 200px;
  box-shadow: 0 10px 22px var(--shadow);
  z-index: 1200;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

nav.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.site-nav li {
  margin: var(--space-sm) 0;
}

nav.site-nav a {
  display: block;
  padding: var(--space-xs) var(--space-xs);
  transition: background .15s, color .15s;
  color: var(--ink);
  font-size: var(--fs-xl);
  margin: 0;
}

nav.site-nav a:hover {
  background: var(--accent);
  color: var(--ink);
}

nav.site-nav .nav-section {
  margin-bottom: var(--space-sm);
}

nav.site-nav .nav-section:last-child {
  margin-bottom: 0;
}

nav.site-nav .nav-section+.nav-section {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
}

nav.site-nav .nav-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  padding: var(--space-xs);
}

/* Language dropdown */
.lang {
  position: relative;
}

.lang-toggle-wrapper {
  display: inline-block;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-xs));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 10px 22px var(--shadow);
  min-width: 160px;
  padding: var(--space-sm);
  z-index: 1200;
}

.lang-menu a {
  display: block;
  padding: var(--space-sm) var(--space-sm);
  color: var(--ink);
  transition: background .15s;
}

.lang-menu a:hover {
  background: var(--accent);
  color: var(--ink);
}

/* ==========================================================================
   8. Components — Cards, Lists, Tiles, Embeds
   ========================================================================== */

/* Changelog */
.changelog-title {
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.changelog-date {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--muted);
  margin: var(--space-sm) 0 var(--space-lg) 0;
  line-height: 1.1;
}

/* Video */
.video-wrap {
  margin: var(--space-md) 0 0 0;
}

.video-wrap video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--r);
}

/* Contact list */
.contact-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0 0;
}

.contact-list li {
  margin: var(--space-sm) 0;
  line-height: 1.6;
}

.contact-address {
  font-style: normal;
}

/* Iframe loading overlay */
.iframe-clip {
  position: relative;
}

.iframe-clip iframe {
  position: relative;
  z-index: 1;
}

.iframe-clip.is-loading::before {
  content: "Loading...";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  color: var(--ink);
  font-size: var(--fs-sm);
  z-index: 2;
}

.iframe-clip.is-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  top: calc(50% + 16px);
  left: 50%;
  transform: translateX(-50%);
  animation: iframe-spin 0.8s linear infinite;
  z-index: 3;
}

@keyframes iframe-spin {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

/* Friends grid */
.friends-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0 0 0;
  padding: 0;
  list-style: none;
}

.friends-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-sm) var(--space-sm);
  color: var(--accent);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.friends-list a:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent) inset;
}

/* Tiles */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0 0;
}

.tile-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-sm);
  transition: background .15s, border-color .15s, box-shadow .15s;
}

.tile-grid a:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent) inset;
}

.tile-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-grid li.tile--wide a {
  height: 128px;
}

.tile-grid--three {
  grid-template-columns: repeat(3, 1fr);
}
.tile-grid--three li.tile--wide {
  grid-column: auto;
}
@media (max-width: 640px) {
  .tile-grid--three {
    grid-template-columns: 1fr;
  }
}

/* Embeds */
.embed-frame {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: #000;
  margin: var(--space-md) 0 0 0;
}

.guestbook-form-frame {
  height: 450px;
  min-height: 450px;
}

.iframe-clip {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: #000;
}

.iframe-clip>iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  color-scheme: dark;
}
.guestbook-form-frame {
  height: 500px;
  min-height: 500px;
}

#guestbook-comments-iframe {
  height: 500px;
  width: 100%;
  border: 0;
  background: #000;
  color-scheme: dark;
}

#guestbook-form-iframe {
  height: 500px;
  width: 100%;
  border: 0;
  background: #000;
  color-scheme: dark;
}

.changelog-frame {
  min-height: 360px;
}

/* Audio */
.audio-wrap {
  margin: var(--space-md) 0 0 0;
}

audio {
  width: 100%;
  max-width: 400px;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-sm) var(--space-md);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-base);
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

button[type="submit"],
button.button-primary {
  background: var(--accent);
  color: #e0e0e0;
  border: 1px solid var(--accent);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: var(--fs-base);
  transition: background .15s, transform .1s;
}

button[type="submit"]:hover,
button.button-primary:hover {
  background: var(--ink);
  color: var(--bg);
}

button:not(.logo):not(.reset-button):not(.header-button):not([type="submit"]):not(.button-primary) {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--r);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

button:not(.logo):not(.reset-button):not(.header-button):not([type="submit"]):not(.button-primary):hover {
  background: var(--accent);
  color: #e0e0e0;
}

button[type="submit"]:active {
  transform: translateY(1px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.field-group {
  display: block;
  width: 100%;
}

/* Guestbook Specific */
.captcha-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}

.captcha-img {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg);
}

.guestbook-entry {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: border-color .15s, box-shadow .15s;
}

.guestbook-entry:hover {
  border-color: var(--accent);
}

.guestbook-entry:last-child {
  margin-bottom: 0;
}

.guestbook-entry strong {
  color: var(--gold);
  display: block;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xs);
}

.guestbook-entry time {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.guestbook-entry p {
  margin: 0;
  line-height: 1.6;
  font-family: inherit;
  color: var(--ink) !important;
}

.anonymous {
  color: var(--ink) !important;
}

/* Blog + changelog lists */
#blog-list,
#changelog-list {
  margin: var(--space-md) 0 0 0;
}

#blog-list>div:first-child,
#changelog-list>div:first-child {
  margin-bottom: var(--space-md);
}

#blog-list ol,
#changelog-list ol {
  margin: var(--space-md) 0 0 0;
  padding-left: var(--space-xl);
}

#blog-list li,
#changelog-list li {
  margin: 0 0 var(--space-md) 0;
  line-height: 1.6;
}

#blog-list .muted,
#changelog-list .muted {
  font-size: var(--fs-sm);
  margin-top: var(--space-xs);
}

#blog-list .blog-more {
  margin-top: var(--space-xs);
}

#changelog-list .changelog-body {
  margin-top: var(--space-xs);
  white-space: pre-line;
}

#changelog-list time {
  color: var(--accent);
}

/* Reset Button */
.reset-button {
  font-size: var(--fs-sm);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: var(--r);
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}

.reset-button:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

.category-block {
  margin: var(--space-xl) 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: rgba(139, 0, 0, 0.05);
}

.category-header h2 {
  margin: 0;
  font-size: var(--fs-xl);
}

.category-content {
  padding: var(--space-lg);
}

.mini-button {
  padding: 4px 12px;
  font-size: var(--fs-xs);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--r);
  cursor: pointer;
  transition: background 0.2s;
}

.mini-button:hover {
  background: var(--accent);
  color: var(--ink);
}

/* Last.fm Widget */
.lastfm-inner-box {
  border: 1px solid var(--border);
  padding: var(--space-md);
  background: rgba(139, 0, 0, 0.03);
  border-radius: var(--r);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.lastfm-link-hint {
  font-size: var(--fs-xs);
  text-align: left;
  margin-top: var(--space-md);
  padding-top: var(--space-xs);
  border-top: 1px dotted var(--border);
}

.lastfm-text-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lastfm-text-list li {
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.lastfm-text-list li strong {
  color: var(--accent);
}

.lastfm-track {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(139, 0, 0, 0.05);
  width: 100%;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  min-height: 80px;
}

.lastfm-track:hover {
  background: rgba(139, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.lastfm-image-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}

.lastfm-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lastfm-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0; /* Prevents overflow */
}

.lastfm-status {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.lastfm-status.is-playing {
  color: var(--gold);
}

.lastfm-status.is-playing::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(178, 34, 34, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(178, 34, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(178, 34, 34, 0); }
}

.lastfm-title {
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--fs-lg);
}

.lastfm-artist {
  font-size: var(--fs-sm);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lastfm-error-msg {
  display: none;
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: var(--space-md);
  border: 1px dashed var(--border);
  border-radius: var(--r);
  text-align: center;
  width: 100%;
}

/* ==========================================================================
   9. Page-specific (from legacy style.css)
   ========================================================================== */
.button1 {
  background-color: black;
  font-family: Comic Sans MS;
  font-weight: 300;
}

.member {
  float: left;
  width: calc(20% - 2%);
  margin: 1% 1% 45px 1%;
}

.name {
  bottom: 0px;
}

.member img {
  width: 50%;
  display: block;
}

ul.flowxl {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
}

ul.flowxl>li {
  list-style-type: none;
  text-align: center;
  width: var(--xiconsize);
  min-width: var(--xiconsize);
  max-width: var(--xiconsize);
  max-height: calc(var(--xiconsize) + 60px);
  padding: 2px;
  margin: 0.125rem;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1;
}

ul.flowxl>li>a {
  display: block;
  line-height: 1;
  font-size: 1.2rem;
}

ul.flowxl li>a>img,
ul.flowxl li>img {
  display: block;
  border-radius: 9px;
  width: auto;
  max-width: var(--xiconsize);
  max-height: var(--xiconsize);
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

ul.flowxl li>a>img[src$=".svg"] {
  max-width: 170px;
  max-height: 170px;
}

.country-img {
  height: 12.5rem;
  width: 250px;
  object-fit: contain;
  max-width: 100%;
}

.countries {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.vpn-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */
footer.site-footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) var(--space-2xl);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  margin-top: var(--space-sm);
  border-radius: var(--r);
  padding: var(--space-xs);
  border: 1px solid var(--border);
  background: #2a0000;
  transition: border-color .15s;
}

.badge:hover {
  border-color: var(--accent);
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */

/* Tablet: fix tile-grid gaps */
@media (min-width: 601px) and (max-width: 900px) {
  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .friends-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tile-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tile-grid li {
    margin-bottom: 1rem;
    text-align: center;
  }

  .contact-list {
    padding-left: 20px;
  }

  .friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  header.site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }

  nav.site-nav {
    min-width: 200px;
    max-width: calc(100vw - 2 * var(--space-lg));
  }

  .lang-menu {
    right: auto;
    left: 0;
    max-width: calc(100vw - 32px);
  }

  #menu-toggle {
    display: inline-flex;
    transition: transform .25s ease;
  }

  #menu-toggle.active {
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  #menu-toggle.active {
    transform: none;
  }
}

/* ==========================================================================
   12. Theme: High Contrast (dark)
   ========================================================================== */
[data-theme="high-contrast"] {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #ccc;
  --accent: #ff0000;
  --gold: #ff4d4d;
  --border: #fff;
  --shadow: rgba(255, 255, 255, .12);
}

[data-theme="high-contrast"] a {
  color: #ff0000;
  text-decoration: underline;
}

[data-theme="high-contrast"] a:hover {
  background: #ff0000;
  color: #000;
}

[data-theme="high-contrast"] nav.site-nav a {
  color: #fff;
}

[data-theme="high-contrast"] .friends-list a {
  color: #ff0000;
}

/* ==========================================================================
   13. Theme: Light Mode
   ========================================================================== */
body.light-mode {
  --bg: #fdf0f0;
  --ink: #2a0000;
  --muted: #5a3333;
  --accent: #8b0000;
  --gold: #6b0000;
  --border: #d4b0b0;
  --shadow: rgba(100, 0, 0, .08);
}

body.light-mode a:hover {
  color: #fff;
}

body.light-mode .iframe-clip.is-loading::before {
  background: rgba(240, 235, 235, 0.92);
}
.guestbook-error { color: var(--ink) !important; margin-bottom: 20px; }

.vibe-preview-media { max-width: 100%; }
.vibe-preview-audio { width: 100%; }
.vibe-audio-full { width: 100%; }
.vibe-preview-link { font-size: var(--fs-sm); font-family: monospace; color: var(--accent); word-break: break-all; }
