*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --left-pad: 72px;
  --right-panel-w: 370px;
  --title-size: 44px;
}

html, body{
  min-height: 100%;
  background: #000;
}

body{
  background: #000;
  color: #fff;
  font-family: "Times New Roman", serif;
}


.logo-link{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
}

.logo-img{
  width: 120px;
  image-rendering: pixelated;
  transition: transform 0.2s ease;
}

.logo-link:hover .logo-img{
  transform: scale(1.08);
}


.topbar{
  padding-top: 34px;
  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);
}


.planner-layout{
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding-left: var(--left-pad);
  padding-right: 0;
  padding-top: 36px;
  padding-bottom: 40px;
  min-height: calc(100vh - 110px);
}

.planner-main{
  width: calc(100% - var(--right-panel-w));
  padding-right: 34px;
}


.calendar-mini-nav{
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.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);
}


.month-switcher{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.month-btn{
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  min-height: 42px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.month-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
}

.month-btn.active{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
}


.board-wrap{
  width: 100%;
  max-width: 980px;
}

.board{
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.board-bg{
  position: relative;
  width: 100%;
  height: auto;
  display: block;
}

.days-layer{
  position: absolute;
  inset: 0;
}


.day-btn{
  position: absolute;
  border: none;
  background: transparent;
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.day-btn:hover{
  transform: scale(1.14);
  z-index: 20;
  filter: brightness(1.1);
}

.day-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}

.day-btn img{
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.day-number{
  position: absolute;
  top: 14%;
  left: 16%;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 1.7vw, 24px);
  color: #000;
  pointer-events: none;
}

.day-btn.black .day-number{
  color: #fff;
}

.day-indicator{
  position: absolute;
  width: 13%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
  pointer-events: none;
}

.day-indicator.dot-1{
  right: 23%;
  top: 23%;
}

.day-indicator.dot-2{
  right: 23%;
  top: 48%;
}

.day-btn.rest-day{
  cursor: default;
}

.day-btn.rest-day:hover{
  transform: none;
  filter: none;
}


.side-panel{
  position: sticky;
  top: 0;
  width: var(--right-panel-w);
  min-width: var(--right-panel-w);
  height: 100vh;
  background: #000;
  border-left: 3px solid rgba(255,255,255,0.35);
  overflow: hidden;
}

.side-panel-inner{
  height: 100%;
  display: flex;
  flex-direction: column;
}

.side-top{
  padding: 26px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.side-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.side-title{
  font-family: "Press Start 2P", monospace;
  font-size: 15px;
  line-height: 1.5;
}

.side-subtitle{
  margin-top: 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1.5;
  opacity: 0.85;
}

.add-entry-btn{
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.add-entry-btn:hover{
  transform: scale(1.06);
  background: rgba(255,255,255,0.14);
}

.entry-form.hidden{
  display: none;
}

.entry-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.color-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-btn{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.45);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-btn:hover{
  transform: scale(1.08);
}

.color-btn.selected{
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
}

.color-btn[data-color="#ffffff"]{ background: #ff8bb0; }
.color-btn[data-color="#ff5f5f"]{ background: #ffa58c; }
.color-btn[data-color="#5fb8ff"]{ background: #baffeb; }
.color-btn[data-color="#7dff8a"]{ background: #c1ff86; }
.color-btn[data-color="#ffd75f"]{ background: #b485ff; }

.entry-input,
.entry-textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
  font-family: "Times New Roman", serif;
}

.entry-input{
  min-height: 46px;
  padding: 12px 14px;
  font-size: 18px;
}

.entry-textarea{
  min-height: 120px;
  padding: 12px 14px;
  font-size: 18px;
  resize: vertical;
  line-height: 1.5;
}

.save-entry-btn{
  align-self: flex-start;
  min-height: 40px;
  padding: 10px 14px;
  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: 10px;
  cursor: pointer;
}

.entries-list{
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state{
  opacity: 0.72;
  font-size: 18px;
  line-height: 1.7;
  padding: 8px 4px;
}

.entry-card{
  position: relative;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 16px 16px 14px;
}

.entry-delete{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.entry-head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 30px;
  margin-bottom: 10px;
}

.entry-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.entry-card-title{
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1.6;
}

.entry-card-text{
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.6;
}


@media (max-width: 1180px){
  :root{
    --left-pad: 28px;
    --right-panel-w: 330px;
    --title-size: 34px;
  }
}

@media (max-width: 940px){
  .planner-layout{
    flex-direction: column;
    padding-right: 24px;
  }

  .planner-main{
    width: 100%;
    padding-right: 0;
  }

  .side-panel{
    position: relative;
    top: auto;
    width: 100%;
    min-width: 100%;
    height: auto;
    min-height: 420px;
    border-left: none;
    border-top: 3px solid rgba(255,255,255,0.35);
    margin-top: 28px;
  }

  .side-panel-inner{
    height: auto;
  }

  .entries-list{
    max-height: 420px;
  }
}

@media (max-width: 680px){
  :root{
    --left-pad: 18px;
    --title-size: 26px;
  }

  .day-number{
    font-size: clamp(10px, 1.8vw, 16px);
  }

  .calendar-mini-nav,
  .month-switcher{
    gap: 10px;
  }

  .month-btn,
  .calendar-mini-btn{
    font-size: 9px;
  }
}