:root {
  --bg: #05160a;
  --panel: #0a1a13;
  --accent: #39ff8a;
  --muted: #3c524b;
  --neon: #2aff99;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: radial-gradient(ellipse at top left, #071226 0%, var(--bg) 40%), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 6px);
  color: #e6eef6;
  font-family: 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding: 2rem 1rem;
}

.frame {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border: 3px solid rgba(0, 0, 0, 0.06);
  padding: 1.6rem 2rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(2, 20, 10, 0.5);
}

header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  align-items: center
}

h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 0.6px
}

.handle {
  color: var(--accent);
  font-weight: 700
}

.tag {
  margin: 0;
  color: #d8fff0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center
}

a {
  color: #0eaa69;
  text-decoration: underline;
  transition: color .12s ease
}

a:hover,
a:focus {
  color: #0b985d
}

a:visited {
  color: #14532f
}

header nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px
}

.nav-btn {
  display: inline-block;
  padding: 6px 10px;
  background: linear-gradient(180deg, #e9fff4, #c9fbe0);
  border: 2px solid #05683d;
  color: #03210f;
  text-decoration: none;
  font-weight: 800;
  border-radius: 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08)
}

.nav-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98)
}

.nav-btn.active {
  background: linear-gradient(180deg, #ccffeb, #39ff8a);
  box-shadow: inset 0 0 0 2px rgba(0, 20, 10, 0.15);
  border-color: #044b2f
}

.social-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  background: #effff5;
  border: 2px solid rgba(4, 75, 47, 0.12);
  color: #023218
}

.social-table td {
  padding: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.04);
  vertical-align: middle
}

.social-table tr:first-child td {
  border-top: none
}

.social-icon {
  display: inline-block;
  width: 28px;
  text-align: center;
  font-size: 18px;
  margin-right: 8px
}

.social-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 4px;
  background: #7b2ff7;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.social-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none
}

.social-table small {
  color: #0b3b22
}


.counter-num {
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 1.4rem;
  background: #04210b;
  color: #a6ffcc;
  padding: 6px;
  border-radius: 0;
  display: inline-block
}

main {
  margin-top: 1rem
}

.three-col {
  display: grid;
  grid-template-columns: 220px minmax(560px, 1fr) 220px;
  gap: 18px;
  align-items: start;
  justify-items: stretch
}

.col-left,
.col-mid,
.col-right {
  min-height: 60px
}

.col-left .silly-box,
.col-right .silly-box {
  margin-bottom: 16px
}

.col-left .silly-box:last-child,
.col-right .silly-box:last-child {
  margin-bottom: 0
}

.silly-box {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 6px, transparent 6px 12px);
  padding: 8px;
  border: 2px solid #2ecc71;
  border-radius: 0;
  color: #05320f;
  background-color: #c0ddc7
}

.silly-box h3 {
  margin: 0 0 6px 0;
  color: #05683d
}

.silly-banner {
  background: linear-gradient(90deg, var(--accent), #2ecc71);
  color: #03210f;
  padding: 8px;
  border-radius: 0;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 50, 30, 0.25)
}

.marquee-wrap {
  overflow: hidden;
  border: 2px dotted var(--accent);
  padding: 4px
}

.marquee {
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%;
  animation: marquee 12s linear infinite;
  color: #023218;
  font-weight: 700
}

@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-100%)
  }
}

.silly-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px
}

.post {
  background: #e6fff5;
  padding: 10px;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
  color: #03220f
}

.post-title {
  margin: 0;
  color: #004e36;
  font-weight: 800
}

.post-meta {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.85rem
}

.post-images {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}

.post-images img {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.post-images.gal-2 {
  grid-template-columns: repeat(2, 1fr);
}

.post-images.gal-3 {
  grid-template-columns: repeat(3, 1fr);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.load-more-btn {
  padding: 10px 18px;
  min-height: 44px;
  background: linear-gradient(180deg, #e9fff4, #c9fbe0);
  border: 2px solid #05683d;
  color: #03210f;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
}

.load-more-btn:hover {
  filter: brightness(0.98);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.tiny {
  font-size: 0.85rem;
  color: #222
}

.tiny-list {
  margin: 6px 0 0 1rem;
  color: #222
}

.tiny-list li {
  margin: 4px 0
}

.badge-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px
}

.badge-grid a {
  display: block
}

.badge-grid img {
  width: 88px;
  height: 31px;
  image-rendering: pixelated
}

.badge-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px
}

.badge-table td {
  padding: 6px;
  text-align: center
}

.badge-table img {
  width: 88px;
  height: 31px;
  image-rendering: pixelated
}

.badge-table-3 {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px
}

.badge-table-3 td {
  padding: 8px;
  text-align: center;
  vertical-align: middle
}

.badge-table-3 img {
  width: 88px;
  height: 31px;
  image-rendering: pixelated
}

@media (max-width:880px) {
  .badge-table-3 {
    display: block
  }

  .badge-table-3 tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: center
  }

  .badge-table-3 td {
    display: inline-block;
    padding: 6px
  }
}

.monika-image-wrap {
  background: #f3fff7;
  padding: 8px;
  border: 2px solid #05683d;
  margin: 6px 0;
  text-align: center;
  overflow: hidden;
  transition: height .38s cubic-bezier(.2, .9, .2, 1);
  min-height: 72px
}

.monika-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto
}

.img-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 6px
}

.monika-corner .tiny {
  display: block;
  text-align: center;
  color: #06422a
}

.monika-corner h3 {
  margin: 0 0 8px 0
}

.video-wrap {
  background: #000;
  padding: 6px;
  border: 2px solid #044b2f;
  margin: 6px 0;
  text-align: center
}

.silly-video video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  cursor: pointer
}

.silly-video .tiny {
  color: #033018
}

.silly-video video::-webkit-media-controls {
  display: none !important
}

.silly-video video::-webkit-media-controls-enclosure {
  display: none !important
}

.guestbook {
  background: linear-gradient(#fff6ec, #fff0d3);
}

.counter {
  text-align: center
}

.counter-num {
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 1.4rem;
  background: #04210b;
  color: #a6ffcc;
  padding: 6px;
  border-radius: 4px;
  display: inline-block
}

.footer-text {
  text-align: center;
  color: var(--muted);
  font-weight: 700
}

.green-heart {
  color: var(--accent);
  margin-left: 6px
}

.about-me .tiny {
  color: #062b18;
  font-weight: 700
}

.time-box .tiny {
  color: #06422a;
  font-weight: 600
}

body {
  font-family: 'Courier New', Courier, monospace
}

.handle {
  color: var(--accent)
}

.frame {
  border-radius: 0;
  border: 4px solid var(--accent);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 0 3px, transparent 3px 6px);
  box-shadow: 0 8px 36px rgba(6, 36, 20, 0.45);
}

@media (max-width:1100px) {
  .three-col {
    grid-template-columns: 180px minmax(420px, 1fr) 180px;
    gap: 14px
  }
}

@media (max-width:880px) {
  .three-col {
    grid-template-columns: 1fr !important;
  }

  .col-left,
  .col-mid,
  .col-right {
    min-width: 0;
    width: auto;
  }

  .col-right {
    order: 1;
  }

  .col-mid {
    order: 2;
  }

  .col-left {
    order: 0;
  }

  body:not([data-view="home"]) .col-left,
  body:not([data-view="home"]) .col-right {
    display: none;
  }

  .silly-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  header nav {
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .post img {
    width: auto;
    max-width: 100%;
    height: auto;
  }

  .badge-table,
  .badge-table-3,
  .social-table {
    overflow-x: auto;
    display: block;
  }

  body {
    padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }

  /* Buttons and form fields get a >=44px tap target and a >=16px font so
     mobile Safari doesn't zoom in when a field is focused. */
  button,
  .admin-btn,
  .load-more-btn,
  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px;
  }

  h1 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }
}

.badges-under-posts {
  margin-top: 16px;
}

@media (max-width:440px) {
  .frame {
    padding: 8px
  }

  h1 {
    font-size: 1.2rem
  }

  .silly-box {
    padding: 3px;
    margin-bottom: 6px;
  }

  .silly-banner {
    padding: 3px;
    font-size: 0.85rem;
  }

  header nav {
    gap: 2px;
  }

  .nav-btn {
    padding: 3px 5px;
    font-size: 0.9rem;
    min-height: 40px;
  }

  .three-col {
    gap: 6px;
  }

  body {
    font-size: 0.9rem;
  }

  .post-images.gal-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}