:root {

  --background-color: #f6d6daff;
  --content-background-color: #ffffffff;

  --text-color: #85202D;
  --sidebar-text-color: #803566;
  --link-color: #803566;
  --link-color-hover: #DF9CBF;

  --font: 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', Osaka, メイリオ, Meiryo, 'ＭＳ Ｐゴシック', 'MS PGothic', 'ＭＳ ゴシック' , 'MS Gothic', 'Noto Sans CJK JP', TakaoPGothic, sans-serif;
  --heading-font: 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', Osaka, メイリオ, Meiryo, 'ＭＳ Ｐゴシック', 'MS PGothic', 'ＭＳ ゴシック' , 'MS Gothic', 'Noto Sans CJK JP', TakaoPGothic, sans-serif;
  --font-size: 12px;

  --margin: 20px;
  --padding: 26px;
  --border: 2px solid #711F25;
  --round-borders: 22px;
  --sidebar-width: 200px;

  --cursor: url("../images/cursor2.png") 4 4, auto;

  --player-background: #FFE1E1;
  --player-border: #711F25;
  --player-text: #85202D;
  --player-accent: #DF9CBF;
  --player-button-text: #85202D;
}

* {
  box-sizing: border-box;
}

html {
  cursor: var(--cursor);
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  font-size: var(--font-size);
  margin: 0;
  padding: var(--margin);
  color: var(--text-color);
  font-family: var(--font);
  line-height: 1.2;
  background: var(--background-color);
  background-image: url("https://yumenonaka.neocities.org/lightbg.webp");
  cursor: var(--cursor);
}

a, button, input[type="range"], summary {
  cursor: var(--cursor);
}

::selection {

  background: rgba(0, 0, 0, 0.2);
}

mark {
  text-shadow: 1px 1px 4px var(--link-color);
  background-color: inherit;
  color: var(--text-color);
}

a {
  text-decoration: underline;
}

a,
a:visited {
  color: var(--link-color);
}

a:hover,
a:focus {
  color: var(--link-color-hover);
  text-decoration: none;
}

.layout {
  width: 1000px;
  display: grid;
  grid-gap: var(--margin);
  grid-template: "bunny header" auto "leftSidebar main" auto / var(--sidebar-width) auto;
}

#bunny-sparkle {
  grid-area: bunny;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 190px;
  height: auto;
  pointer-events: none;
}

main {
  grid-area: main;
}

header {
  width: 800px;
  margin: 0 auto;
  grid-area: header;
  font-size: 1.2em;
  border: var(--border);
  border-radius: var(--round-borders);
  overflow: hidden;
  background: var(--content-background-color);
}

.header-image {
  position: relative;
}

.header-image img {
  width: 100%;
  height: auto;
  display: block;
}

.header-image .header-image-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.header-image:hover .header-image-hover {
  opacity: 1;
}

.marquee {
  overflow: hidden;
  border-top: var(--border);
  background: linear-gradient(90deg, rgba(133, 32, 45, 1) 0%, rgba(223, 156, 191, 1) 100%);
  color: #FFE1E1;
  text-shadow: 1px 1px 1px #85202D;
  font-size: 0.85em;
  padding: 4px 0;
}

.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.left-sidebar {
  grid-area: leftSidebar;
  color: var(--sidebar-text-color);
}

.sidebar-box {
  border: var(--border);
  border-radius: 25px;
  overflow: hidden;
  background: #85202D;
  background: linear-gradient(90deg, rgba(133, 32, 45, 1) 0%, rgba(223, 156, 191, 1) 100%);
  height: fit-content;
}

.sidebar-box + .sidebar-box {
  margin-top: var(--margin);
}

.linkCustom {
  background-color: #FFE1E1;
  border-top: 1px solid;
}

nav ul li.linkCustom:last-child {
  border-bottom: 1px solid;
}

.sidebarTitle {
  font-weight: bold;
  font-size: 1.2em;
  font-family: var(--heading-font);
  text-align: center;
  padding: 0.5em;
  color: #FFE1E1;
  text-shadow: 1px 1px 1px #DF9CBF;
}

.sidebar-blinkie {
  display: block;
  margin: 1em auto 0.75em;
  max-width: 90%;
  height: auto;
}

.sidebar-squares {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid;
}

.sidebar-squares img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.guestbook-img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid;
}

.guestbook-inner {
  background-color: #FFE1E1;
  padding: 10px;
  text-align: center;
}

.guestbook-btn {
  display: block;
  padding: 6px 8px;
  background: linear-gradient(90deg, rgba(133, 32, 45, 1) 0%, rgba(223, 156, 191, 1) 100%);
  border: 1px solid #711F25;
  border-radius: 12px;
  color: #FFE1E1 !important;
  text-decoration: none;
  font-weight: bold;
  text-shadow: 1px 1px 1px #85202D;
}

.guestbook-btn:hover {
  filter: brightness(1.15);
}

.hit-counter {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 8px;
}

.hit-counter span {
  display: inline-block;
  min-width: 16px;
  padding: 2px 3px;
  background: #2b2b2b;
  color: #fff;
  font-family: monospace;
  font-size: 1.1em;
  border: 1px solid #711F25;
  border-radius: 3px;
}

.hit-counter-label {
  margin-top: 4px;
  font-size: 0.85em;
  color: var(--text-color);
}

nav ul {
  margin: 0 -5px;
  padding: 0;
  list-style: none;
  user-select: none;
}

nav ul li {
  margin-bottom: 0
}

nav > ul li > a,
nav > ul li > strong {
  display: inline-block;
}

nav > ul li > a,
nav > ul li > details summary,
nav > ul li > strong {
  padding: 5px 10px;
}

nav > ul li > a.active,
nav > ul li > details.active summary {
  font-weight: bold;
}

nav ul summary {
  cursor: var(--cursor);
}

nav ul ul li > a {
  padding-left: 30px;
}

.link-icon {
  height: 14px;
  width: auto;
  vertical-align: -3px;
  margin-right: 4px;
}

.content-box {
  background: var(--content-background-color);
  border: var(--border);
  border-radius: var(--round-borders);
  overflow: hidden;
}

.box-border {
  width: 100%;
  height: auto;
  display: block;
}

#content-frame {
  width: 100%;
  border: 0;
  display: block;
  min-height: 80px;
  background: transparent;
}

.page-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 12px;
}

.page-nav img {
  height: 56px;
  width: auto;
  display: block;
  transition: transform 0.15s;
}

.page-nav a:hover img {
  transform: scale(1.12);
}

#corner-sprite {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 280px;
  height: auto;
  z-index: 500;
  pointer-events: none;
}

#music-player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 270px;
  padding: 10px;
  background: var(--player-background);
  border: 2px solid var(--player-border);
  border-radius: 18px;
  color: var(--player-text);
  box-shadow: 2px 3px 0 rgba(113, 31, 37, 0.25);
}

#player-art {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--player-border);
  border-radius: 10px;
  flex-shrink: 0;
}

.player-body {
  flex: 1;
  min-width: 0;
}

#player-title {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#player-artist {
  font-size: 0.9em;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 2px;
}

.player-controls button {
  font-family: inherit;
  font-size: 1em;
  line-height: 1;
  padding: 3px 7px;
  background: var(--player-accent);
  color: var(--player-button-text);
  border: 1px solid var(--player-border);
  border-radius: 8px;
}

.player-controls button:hover {
  background: var(--player-border);
  color: var(--player-background);
}

#player-time {
  margin-left: auto;
  font-size: 0.85em;
  opacity: 0.8;
}

#player-seek {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--player-border);
}

#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2000;
}

.trail-heart {
  position: fixed;
  pointer-events: none;
  z-index: 2001;
  color: #DF9CBF;
  text-shadow: 0 0 2px #fff;
  animation: heart-float 0.9s ease-out forwards;
}

@keyframes heart-float {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 0; transform: translate(-50%, -160%) scale(0.4); }
}

#skip-to-content-link {
  position: fixed;
  top: 0;
  left: 0;
  display: inline-block;
  padding: 0.375rem 0.75rem;
  line-height: 1;
  font-size: 1.25rem;
  background-color: var(--content-background-color);
  color: var(--text-color);
  transform: translateY(-3rem);
  transition: transform 0.1s ease-in;
  z-index: 99999999999;
}

#skip-to-content-link:focus,
#skip-to-content-link:focus-within {
  transform: translateY(0);
}

@media (max-width: 800px) {
  body {
    font-size: 14px;
  }

  .layout {
    width: 100%;
    grid-template: "header" auto "leftSidebar" auto "main" auto / 1fr;
  }

  #bunny-sparkle {
    display: none;
  }

  header {
    width: 100%;
  }

  main {
    max-height: none;
  }

  #corner-sprite {
    display: none;
  }

  #music-player {
    left: 10px;
    bottom: 10px;
    width: 240px;
  }

  #skip-to-content-link {
    font-size: 1rem;
  }
}
