
* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --left-pad: 96px;
  --top-pad: 34px;
  --title-size: 44px;

  --panel-bg: rgba(255,255,255,0.08);
  --panel-border: rgba(255,255,255,0.16);
}


html, body{
  height: 100%;
  background: #000;
}

body{
  font-family: "Times New Roman", serif;
  color: #fff;
  min-height: 100vh;
  background: #000;
}


.logo-link{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
}

.logo-img{
  width: 120px;
  image-rendering: pixelated;
  transition: transform 0.2s ease;
}

.logo-link:hover .logo-img{
  transform: scale(1.1);
}


.topbar{
  padding-top: var(--top-pad);
  padding-left: var(--left-pad);
}

.page-title{
  font-family: "Press Start 2P", monospace;
  font-size: var(--title-size);
  text-shadow: 0 3px 0 rgba(0,0,0,0.7);
}

.diary-container{
  padding-left: var(--left-pad);
  padding-right: 60px;
  padding-top: 36px;
  padding-bottom: 120px;
  max-width: 1200px;
}


.calendar-mini-nav{
  display: flex;
  gap: 14px;
  margin-bottom: 34px;
}

.calendar-mini-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 6px 16px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.calendar-mini-btn:hover{
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
}

.calendar-mini-btn.active{
  background: linear-gradient(to bottom, rgba(255,255,255,0.14), rgba(255,255,255,0.07));
  border-color: rgba(255,255,255,0.28);
}


.converter-box{
  margin-bottom: 48px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: var(--panel-bg);
}

.converter-title{
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  margin-bottom: 26px;
}

.converter-row{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.date-box{
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-label{
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  opacity: 0.9;
}

.date-input,
.converted-date{
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
}

.date-input{
  outline: none;
}

.arrow-box{
  font-family: "Press Start 2P", monospace;
  font-size: 28px;
  opacity: 0.9;
  padding-top: 18px;
}


.calendar-text{
  max-width: 1000px;
  margin-bottom: 40px;
}

.calendar-text p{
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 18px;
  text-indent: 40px;
}


.calendar-gallery{
  max-width: 1000px;
}

.calendar-frame{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.calendar-image-btn{
  flex: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.calendar-image{
  width: 100%;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
}

.calendar-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
  z-index: 20;
}

.calendar-nav:hover{
  transform: translateY(-50%) scale(1.06);
  background: rgba(255,255,255,0.16);
}

.prev-btn{
  left: -90px;
}

.next-btn{
  right: -90px;
}

.calendar-caption{
  margin-top: 16px;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  opacity: 0.9;
}


.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.76);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.modal.is-open{
  display: flex;
}

.modal-close{
  position: fixed;
  top: 18px;
  left: 18px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

.modal-img{
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.65);
}


@media (max-width: 980px){
  :root{
    --left-pad: 48px;
    --title-size: 38px;
  }

  .converter-row{
    gap: 18px;
  }

  .calendar-nav{
    width: 58px;
    height: 58px;
    font-size: 34px;
  }

  .prev-btn{
    left: -70px;
  }

  .next-btn{
    right: -70px;
  }
}

@media (max-width: 760px){
  :root{
    --left-pad: 24px;
    --title-size: 30px;
  }

  .diary-container{
    padding-right: 24px;
  }

  .calendar-text p{
    font-size: 17px;
  }

  .converter-title{
    font-size: 15px;
  }

  .date-input,
  .converted-date{
    font-size: 12px;
  }

  .calendar-mini-nav{
    flex-wrap: wrap;
  }

  .calendar-frame{
    gap: 10px;
  }

  .calendar-nav{
    display: none;
  }
}