:root {
  color-scheme: dark;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", cursive;
  color: #ffff66;
  background: #000033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12px 18px, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 54px 42px, #66ffff 0 1px, transparent 2px),
    radial-gradient(circle at 93px 8px, #ff66ff 0 1px, transparent 2px),
    #000033;
  background-size: 110px 76px;
}

a {
  color: #00ffff;
  font-weight: 700;
}

a:visited {
  color: #ff99ff;
}

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.55) 49%, transparent 51%),
    linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.35) 49%, transparent 51%);
  background-size: 32px 32px;
  opacity: 0.3;
}

.site-shell {
  position: relative;
  width: min(100% - 24px, 980px);
  margin: 12px auto 32px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  border: 4px ridge #00ffff;
  background: #110044;
  text-align: center;
}

.badge {
  width: clamp(64px, 13vw, 112px);
  height: clamp(64px, 13vw, 112px);
  image-rendering: pixelated;
}

.tiny-note {
  margin: 0 0 6px;
  color: #ffcc00;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.counter {
  display: inline-flex;
  gap: 3px;
  padding: 5px;
  border: 3px inset #bbbbbb;
  background: #111111;
}

.counter span {
  display: grid;
  width: 24px;
  height: 34px;
  place-items: center;
  border: 1px solid #666666;
  background: linear-gradient(#222222, #000000);
  color: #66ff66;
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: 700;
}

.title-card {
  margin-top: 12px;
  padding: 18px;
  border: 6px groove #ff00ff;
  background: linear-gradient(90deg, #000080, #660099 45%, #000080);
  text-align: center;
}

.rainbow {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 900;
  text-shadow: 2px 2px #ff0000, 4px 4px #00ff00, 6px 6px #0000ff;
}

h1 {
  margin: 12px 0;
  color: #ffcc00;
  font-size: clamp(2.7rem, 10vw, 5.6rem);
  line-height: 0.95;
  text-shadow: 3px 3px #ff0000, 6px 6px #000000;
}

marquee {
  padding: 8px;
  border: 2px dashed #ffff00;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.button-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0;
}

.button-bar a,
button {
  min-height: 38px;
  padding: 8px 14px;
  border: 4px outset #cccccc;
  background: #c0c0c0;
  color: #000080;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.button-bar a:active,
button:active {
  border-style: inset;
}

.construction {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 12px 0;
  text-align: center;
}

.construction img {
  width: min(100%, 620px);
  image-rendering: pixelated;
}

.construction-banner {
  display: inline-block;
  max-width: 100%;
  image-rendering: pixelated;
}

.layout {
  width: 100%;
  border: 5px ridge #ffff00;
  background: rgba(0, 0, 0, 0.55);
}

.sidebar,
.content {
  padding: 10px;
  vertical-align: top;
}

.sidebar {
  width: 29%;
  min-width: 230px;
  background: rgba(255, 0, 255, 0.18);
}

.content {
  background: rgba(0, 255, 255, 0.1);
}

.panel {
  margin-bottom: 12px;
  padding: 14px;
  border: 4px double #00ff00;
  background: #000066;
  box-shadow: 6px 6px 0 #000000;
}

.panel.compact {
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

h2 {
  margin: 0 0 10px;
  padding: 5px;
  border: 2px solid #ffcc00;
  background: #660000;
  color: #ffffff;
  font-size: 1.35rem;
  text-align: center;
  text-transform: uppercase;
}

p {
  line-height: 1.45;
}

.blink {
  color: #00ff00;
  font-weight: 900;
}

.mood {
  color: #ff99ff;
  font-weight: 700;
}

.award {
  margin: 8px auto;
  padding: 8px 4px;
  width: 110px;
  border: 3px ridge #ffcc00;
  border-radius: 50%;
  background: radial-gradient(circle, #ffff99, #ff6600);
  color: #000000;
  font-family: Impact, "Arial Black", sans-serif;
  text-align: center;
}

.divider {
  height: 28px;
  margin: 10px 0 16px;
  border-block: 3px dotted #ff00ff;
  background:
    repeating-linear-gradient(90deg, #ff0000 0 18px, #ffff00 18px 36px, #00ff00 36px 54px, #00ffff 54px 72px, #0000ff 72px 90px, #ff00ff 90px 108px);
}

.link-list {
  margin: 0;
  padding-left: 24px;
}

.link-list li {
  margin: 8px 0;
}

.guestbook-form {
  display: grid;
  gap: 12px;
}

.guestbook-entries {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.guestbook-entry {
  padding: 10px;
  border: 3px inset #00ffff;
  background: #110044;
}

.guestbook-entry h3 {
  margin: 0 0 5px;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 1rem;
}

.guestbook-entry p {
  margin: 0 0 6px;
}

.guestbook-entry time {
  color: #ff99ff;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

/* TASK-1392[Q]: where the guestbook says what happened. Signing used to write
   to the signer's own browser and report nothing; a refusal now has somewhere
   to be read. Built to match .admin-notice, the same job on the admin page:
   #00ff00 on #000000 is about 15:1, well over the 4.5:1 floor, at full body
   size rather than the 9px this codebase keeps having to sweep out. */
.guestbook-notice {
  margin: 12px 0 0;
  padding: 8px;
  border: 2px dashed #00ffff;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
}

.guestbook-notice[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 4px;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 3px inset #cccccc;
  background: #ffffff;
  color: #000000;
  font: 1rem "Courier New", monospace;
}

textarea {
  resize: vertical;
}

.webring {
  text-align: center;
}

.webring-widget {
  display: grid;
  grid-template-columns: minmax(92px, 132px) 1fr;
  gap: 14px;
  align-items: center;
  margin: 12px auto;
  padding: 10px;
  border: 4px ridge #ff00ff;
  background: #000000;
  text-align: left;
}

.webring-widget img {
  width: 100%;
  image-rendering: pixelated;
}

.webring-copy p {
  margin: 6px 0;
}

.ring-title {
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

code {
  padding: 1px 4px;
  background: #ffff00;
  color: #000000;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.webring-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.webring-controls a {
  min-height: 40px;
  padding: 8px 6px;
  border: 4px outset #c0c0c0;
  background: linear-gradient(#ffffff, #bdbdbd);
  color: #000080;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.webring-controls a:active {
  border-style: inset;
}

.webring-code {
  overflow-wrap: anywhere;
  padding: 7px;
  border: 2px dashed #00ffff;
  background: #220022;
  color: #ffccff;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.webring-result {
  margin: 10px 0;
  padding: 8px;
  border: 2px dotted #ffff00;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.admin-shell {
  max-width: 1040px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.link-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.5fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 3px inset #ff00ff;
  background: #110044;
}

.link-row button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.admin-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
}

.admin-notice {
  margin: 0;
  padding: 8px;
  border: 2px dashed #00ffff;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

footer {
  margin-top: 12px;
  padding: 10px;
  border: 3px ridge #00ffff;
  background: #000000;
  color: #cccccc;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 760px) {
  .hero {
    align-items: stretch;
  }

  .layout,
  .layout tbody,
  .layout tr,
  .layout td {
    display: block;
    width: 100%;
  }

  .sidebar {
    min-width: 0;
  }

  .badge {
    width: 58px;
    height: 58px;
  }

  .counter span {
    width: 19px;
    height: 29px;
    font-size: 1rem;
  }

  .webring-widget {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .webring-widget img {
    width: min(148px, 70%);
    margin: 0 auto;
  }

  .webring-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid,
  .link-row,
  .admin-actions {
    grid-template-columns: 1fr;
  }
}
