/* ============================================================
   STYLE.CSS  —  shared by index.html and home.html
   Palette taken from 90s anime poster art: a flat yellow ground,
   vermilion red, heavy black linework, cream paper stock.
   ============================================================ */

/* ---- THE MUSIC TOGGLE BUTTON -------------------------------- */
.music-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-family: "Comic Sans MS", cursive;
  font-size: 12px;
  color: var(--sun);
  background: var(--red);
  border: 2px solid var(--ink);
  padding: 6px 4px;
  cursor: pointer;
}
.music-btn:hover { background: var(--pink); color: var(--ink); }

.volume-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.volume-label {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: var(--ink);
  letter-spacing: 1px;
}
.volume-row input[type="range"] {
  flex: 1;
  accent-color: var(--red);
}

/* ---- THE GUESTBOOK WIDGET ---------------------------------- */
.guestbook-embed {
  display: block;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  margin: 16px auto;
}



/* ---- THE REAL VISITOR COUNTER --------------------------
   Wraps whatever the counter service's code renders (an <img>
   or a <script>-generated widget) so it sits centred in the
   sidebox with a small black frame — matching the old fake
   .counter span it replaces.                                  */
.counter-real {
  display: inline-block;
  padding: 4px 8px;
  line-height: 0;
  max-width: 100%;
}
.counter-real img { display: block; max-width: 100%; }




/* ---- 1. THE COLOR PALETTE ---------------------------------
   Change a hex code here and the whole site re-colors itself.  */
:root {
  --sun:      #f5d84e;   /* the yellow ground                   */
  --sun-deep: #e8c534;   /* halftone dots, shadows              */
  --red:      #e23127;   /* the loud vermilion                  */
  --red-deep: #b21f17;   /* darker red for edges                */
  --ink:      #1a1816;   /* black linework and body text        */
  --cream:    #fbf3dc;   /* paper stock — the content panels    */
  --pink:     #ef5da8;   /* accent, from the print poster       */
  --teal:     #2aa198;   /* accent, from the print poster       */
  --navy:     #2b3a8c;   /* links (and the classic 90s link)    */
  --grey:     #7a736a;   /* captions, small print               */
}

/* ---- 2. THE PAGE ITSELF -----------------------------------
   background-image on <body> = wallpaper for the whole page.
   `repeat` tiles the 64x64 halftone square edge to edge.       */
html { scroll-behavior: smooth; }   /* anchor links glide instead of jump */

body {
  background-color: var(--sun);              /* fallback if the image fails */
  background-image: url("images/bg_tile.png");
  background-repeat: repeat;
  background-attachment: fixed;              /* dots hold still while scrolling */
  color: var(--ink);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding: 18px 10px 60px;
}

/* ---- 3. THE 800x600-ERA CENTERED COLUMN ------------------- */
.shell { width: 100%; max-width: 780px; margin: 0 auto; }

/* Heavy black outline + hard offset shadow. This is the manga-
   panel look, and it doubles as the 90s web "solid box" look.  */
.panel {
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

/* ---- 4. HEADER / SITE TITLE ------------------------------- */
.header {
  background: var(--red);
  padding: 16px 10px 12px;
  text-align: center;
}
.header h1 {
  font-family: "Comic Sans MS", "Chalkboard", cursive;
  font-size: 36px;
  margin: 0;
  color: var(--sun);
  letter-spacing: 2px;
  /* Hard black offset — poster lettering, not a soft blur */
  text-shadow: 3px 3px 0 var(--ink);
}
.header .tagline {
  font-family: "Courier New", monospace;
  color: var(--cream);
  font-size: 12px;
  margin: 8px 0 0;
}
/* The row of dots under the title, echoing the poster lettering */
.dots { margin: 10px 0 0; font-size: 0; }
.dots i {
  display: inline-block;
  width: 9px; height: 9px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
}
.dots i:nth-child(even) { background: var(--cream); }

/* ---- 5. THE MARQUEE (scrolling news bar) ------------------
   The old <marquee> tag is deprecated. This does the same job
   and will not stop working.                                  */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--ink);
  padding: 5px 0;
  font-family: "Courier New", monospace;
  color: var(--sun);
  font-size: 12px;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;                 /* start off-screen right */
  animation: slide 18s linear infinite;
}
@keyframes slide { to { transform: translateX(-100%); } }

/* ---- 6. THE STICKY FOLDER TABS ---------------------------
   Each tab links to an #id further down this same page.
   position:sticky pins the bar to the top once you scroll
   past it, so navigation is always within reach.              */
.tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0;
  padding: 8px 0 0 6px;
  list-style: none;                 /* kills the bullet points */
  background: var(--ink);
  white-space: nowrap;              /* keep tabs on one line... */
  overflow-x: auto;                 /* ...and let narrow screens swipe */
  font-size: 0;
}
.tabs li { display: inline-block; }
.tabs a {
  display: block;
  font-family: "Comic Sans MS", cursive;
  font-size: 13px;
  text-decoration: none;
  color: var(--sun);
  background: var(--red);
  padding: 6px 14px 5px;
  margin-right: 3px;
  border: 2px solid var(--ink);
  border-bottom: none;
  border-radius: 9px 9px 0 0;       /* rounded top corners = folder tab */
  position: relative;
  top: 2px;
}
.tabs a:hover, .tabs a:focus { background: var(--pink); color: var(--ink); }

/* The tab for the section you're LOOKING AT. It turns cream so it
   merges into the panel below. The script at the bottom of
   home.html moves this class as you scroll.                    */
.tabs a.here {
  background: var(--cream);
  color: var(--red);
  padding-bottom: 8px;
  top: 0;
}

/* ---- 7. SECTIONS -----------------------------------------
   Each chunk of the long scroll. scroll-margin-top stops the
   sticky tab bar covering a heading you jumped to.             */
.section {
  background: var(--cream);
  padding: 18px;
  overflow: hidden;                 /* makes the box wrap around floats */
  scroll-margin-top: 56px;
  border-top: 3px solid var(--ink);
}
.section:first-of-type { border-top: none; }

.section h2 {
  font-family: "Comic Sans MS", cursive;
  color: var(--red);
  font-size: 24px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ink);
  text-shadow: 2px 2px 0 var(--sun);
}
.section h3 {
  color: var(--ink);
  font-size: 15px;
  margin: 20px 0 4px;
  border-left: 8px solid var(--teal);
  padding-left: 8px;
}
.section a         { color: var(--navy); }
.section a:visited { color: #7a3a9c; }
.section a:hover   { color: var(--cream); background: var(--red); }

/* Two columns that stack on a phone */
.columns { display: flex; flex-wrap: wrap; gap: 16px; }
.sidebar { flex: 1 1 170px; min-width: 0; text-align: center; }
.main    { flex: 3 1 320px; min-width: 0; }

.sidebox {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 8px;
  margin-bottom: 14px;
}
.sidebox h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- 8. THE TEXT BOX (update log, notebook-paper style) --- */
.textbox {
  background: #fff;
  border: 3px solid var(--ink);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 12.5px;
  padding: 10px 12px;
  height: 190px;             /* fixed height... */
  overflow-y: scroll;        /* ...so long logs get their own scrollbar */
}
.textbox p { margin: 0 0 12px; }
.textbox .stamp { color: var(--red); font-weight: bold; }

/* ============================================================
   9. IMAGE TOOLKIT
   Add these to an <img>. GUIDE.md explains each one in full.
   ============================================================ */

/* --- 9a. WHERE IT SITS --- */
.gif-inline { vertical-align: middle; }                /* in a line of text  */
.gif-center { display: block; margin: 12px auto; }     /* own line, centered */
.gif-left   { float: left;  margin: 4px 14px 10px 0; } /* text wraps right   */
.gif-right  { float: right; margin: 4px 0 10px 14px; } /* text wraps left    */
.clear      { clear: both; }                           /* put AFTER a float  */

/* Pinned to an exact spot. The PARENT needs position:relative
   or the image flies to the corner of the whole page.          */
.pin-area      { position: relative; }
.pin-topright  { position: absolute; top: 6px;  right: 8px; }
.pin-topleft   { position: absolute; top: 6px;  left: 8px; }
.pin-bottomright { position: absolute; bottom: 6px; right: 8px; }

/* --- 9b. HOW BIG --- */
.img-full  { display: block; width: 100%; height: auto; }  /* fills its box  */
.img-half  { width: 48%; height: auto; }
.img-small { width: 80px; height: auto; }

/* --- 9c. HOW IT LOOKS --- */
.framed {                       /* black cel outline + hard shadow */
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  background: #fff;
}
.framed-red { border: 3px solid var(--red); box-shadow: 5px 5px 0 var(--sun-deep); }

.sticker {                      /* tilted, like something taped on */
  transform: rotate(-4deg);
  border: 3px solid var(--ink);
  background: #fff;
  padding: 4px;
}
.sticker-right { transform: rotate(3deg); }

.round { border-radius: 50%; }  /* circular crop — needs a square image */

.grayscale { filter: grayscale(100%); transition: filter .2s; }
.grayscale:hover { filter: none; }   /* colour returns on hover */

/* Swap one image for another on hover, the 1998 rollover button.
   Both files must be the same size. See GUIDE.md section 6.     */
.rollover img         { display: block; }
.rollover .on         { display: none; }
.rollover:hover .off  { display: none; }
.rollover:hover .on   { display: block; }

/* --- 9d. A BOX WITH ITS OWN BACKGROUND IMAGE --- */
.hero-box {
  background-image: url("images/breakingneku.jpg");
  background-repeat: no-repeat;     /* one copy only */
  background-position: center;      /* dead center of the box */
  background-size: cover;           /* crop to fill, never squash */
  min-height: 130px;                /* a background can't hold a box open */
  padding: 24px;
  text-align: center;
  border: 3px solid var(--ink);
}

/* The wide banner slot under the header */
.banner { display: block; width: 100%; height: auto; border-top: 3px solid var(--ink); }

/* ---- 10. LINK LISTS (the bit you'll keep adding to) ------- */
.linklist { list-style: none; padding: 0; margin: 0 0 14px; }
.linklist li {
  border-left: 8px solid var(--red);
  background: #fff;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 6px 10px;
  margin-bottom: 6px;
}
.linklist .note { color: var(--grey); font-size: 11px; display: block; }

/* An empty slot waiting for a link. Delete the class when filled. */
.linklist li.empty {
  border-left: 8px dashed var(--grey);
  background: none;
  color: var(--grey);
  font-style: italic;
}

/* The wall of 88x31 buttons */
.buttonwall { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.buttonwall img { display: block; }
.buttonwall .slot {
  width: 88px; height: 31px;
  border: 2px dashed var(--grey);
  color: var(--grey);
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}

/* ---- 11. GALLERY GRID ------------------------------------ */
.gallery { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.gallery figure { margin: 0 0 6px; width: 165px; text-align: center; }
.gallery img { width: 100%; height: auto; display: block; }
.gallery figcaption {
  font-size: 11px;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-top: none;
  padding: 3px;
}

/* ---- 12. GUESTBOOK ENTRIES ------------------------------- */
.entry {
  background: #fff;
  border: 2px solid var(--ink);
  border-left: 8px solid var(--teal);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.entry .who  { color: var(--red); font-weight: bold; margin: 0; }
.entry .when { color: var(--grey); font-size: 11px; margin: 4px 0 0; }

/* ---- 13. ODDS AND ENDS ----------------------------------- */
.divider { display: block; width: 100%; height: 10px; margin: 16px 0; }

.blink { animation: blinker 1s steps(2, start) infinite; }
@keyframes blinker { to { visibility: hidden; } }

.counter {
  display: inline-block;
  background: var(--ink);
  color: var(--sun);
  font-family: "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 4px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
}

/* Floating back-to-top button, bottom right of the window */
.totop {
  position: fixed;
  bottom: 14px; right: 14px;
  z-index: 60;
  background: var(--red);
  color: var(--sun);
  font-family: "Comic Sans MS", cursive;
  font-size: 12px;
  text-decoration: none;
  padding: 7px 11px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.totop:hover { background: var(--sun); color: var(--red); }

.footer {
  background: var(--ink);
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--cream);
}
.footer a { color: var(--sun); }

/* ---- 14. GOOD MANNERS -----------------------------------
   Keyboard users get a visible outline, and anyone who asked
   their computer to reduce motion gets no animation.          */
a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee span, .blink, .enter-btn { animation: none !important; }
}
