:root {
  --ink: #4a3f3c;
  --sub: #5c5553;
  --line: #f0e6e8;
  --soft: #fdf7f8;
  --pink: #f4a9b8;
  --pink-l: #fde3e8;
  --lav: #c9b8f0;
  --lav-l: #ece6fb;
  --mint: #9fd9c0;
  --mint-l: #dff5ec;
  --butter: #f5d36b;
  --butter-l: #fff4cf;
  --peach: #f7b999;
  --peach-l: #fee6d8;
  --accent: #cf5673;
  --shadow: rgba(120, 80, 90, 0.10);
  padding-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  background-color: #fff;
  background-image: radial-gradient(#f6e9ed 1.3px, transparent 1.3px);
  background-size: 24px 24px;
}

dd {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

header {
  position: relative;
  text-align: center;
  padding: 8px 16px 20px;
}

.lead .note {
  display: block;
  margin-top: 1.2em;
  font-size: 0.8em;
  opacity: 0.85;
}

.rules .hl {
  color: var(--accent);
  font-weight: 700;
}

.nav-menu {
  position: fixed !important;
  top: 10px !important;
  right: 12px !important;
  left: auto !important;
  z-index: 9999;
  display: flex;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.nav-link:hover {
  background: var(--pink-l);
  color: var(--accent);
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 480px) {
  header {
    padding-top: 6px;
  }

  .nav-menu {
    top: 8px;
    right: 8px;
    gap: 4px;
  }

  .nav-link {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.b1 {
  width: 220px;
  height: 220px;
  background: var(--pink-l);
  left: -40px;
  top: -30px;
}

.b2 {
  width: 200px;
  height: 200px;
  background: var(--lav-l);
  right: -30px;
  top: 0px;
}

.b3 {
  width: 170px;
  height: 170px;
  background: var(--butter-l);
  left: 40%;
  top: -40px;
}

header>*:not(.blob) {
  position: relative;
  z-index: 1;
}

h1 {
  margin: 28px 0 0;
  font-size: 2rem;
  letter-spacing: 0.1em;
  font-family: "Zen Maru Gothic", sans-serif;
}

.lead {
  margin: 10px 0 0;
  color: var(--sub);
  font-size: 0.9rem;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
}

footer {
  text-align: center;
  color: var(--sub);
  font-size: 0.8rem;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 26px;
  padding: 10px 10px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card.rise {
  animation: rise 0.55s both;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px) rotate(-0.6deg);
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 12px 24px var(--shadow);
}

.card.bday-today {
  border: 2px solid var(--butter);
  box-shadow: 0 0 16px rgba(245, 211, 107, 0.5);
  animation: bdayGlow 2s infinite alternate, rise 0.55s both;
}

.bday-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f5d36b, #e0a32b);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

@keyframes bdayGlow {
  0% {
    border-color: #f5d36b;
    box-shadow: 0 0 8px rgba(245, 211, 107, 0.4);
  }

  100% {
    border-color: #e0a32b;
    box-shadow: 0 0 20px rgba(224, 163, 43, 0.7);
  }
}

.card .name {
  display: block;
  margin-top: 10px;
  font-weight: 700;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--sub);
}

.stats .hl {
  color: var(--accent);
}

.photo {
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--pink-l);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo .no-image {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 0.08em;
  user-select: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 40, 45, 0.38);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}

.overlay.open {
  display: flex;
}

.sheet {
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 92%;
  overflow-y: auto;
  border-radius: 30px 30px 0 0;
  padding: 30px 22px calc(30px + env(safe-area-inset-bottom, 0px));
  position: relative;
  animation: slide 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@media (min-width: 600px) {
  .overlay {
    align-items: center;
  }

  .sheet {
    border-radius: 30px;
  }
}

.close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: var(--soft);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.sheet h2 {
  text-align: center;
  margin: 0 0 14px;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
}

.sheet .photo {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  border-radius: 20px;
  font-size: 5rem;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--pink), 0 10px 20px var(--shadow);
}
.sheet .photo.dphoto-bday {
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px #e0a32b, 0 0 0 10px #f5d36b, 0 0 24px rgba(224, 163, 43, 0.6);
  animation: goldFramePulse 2s infinite alternate;
}

@keyframes goldFramePulse {
  0% {
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px #e0a32b, 0 0 0 10px #f5d36b, 0 0 12px rgba(224, 163, 43, 0.4);
  }

  100% {
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px #ffd700, 0 0 0 11px #f5d36b, 0 0 28px rgba(255, 215, 0, 0.8);
  }
}

.plike {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px auto 8px;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border: 1.5px solid var(--pink);
  border-radius: 99px;
  padding: 7px 22px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.plike.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plike.pop {
  animation: pop 0.35s;
}

dl {
  margin: 12px 0 0;
}

.row {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 2px;
  border-bottom: 1.5px dashed var(--line);
}

.row:last-child {
  border-bottom: 0;
}

dt {
  justify-self: start;
  font-size: .78rem;
  font-weight: 700;
  padding: 1px 12px;
  border-radius: 99px;
  background: var(--pink-l);
  border: 1px solid var(--pink);
}

.row:nth-child(5n+2) dt {
  background: var(--lav-l);
  border-color: var(--lav);
}

.row:nth-child(5n+3) dt {
  background: var(--mint-l);
  border-color: var(--mint);
}

.row:nth-child(5n+4) dt {
  background: var(--butter-l);
  border-color: var(--butter);
}

.row:nth-child(5n+5) dt {
  background: var(--peach-l);
  border-color: var(--peach);
}

.comments {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1.5px solid var(--line);
}

.comments h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.rules {
  background: #fffaf0;
  border: 1.5px dashed var(--butter);
  border-radius: 16px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: .82rem;
}

.rules-t {
  margin: 0 0 2px;
  font-weight: 700;
}

.rules ul {
  margin: 0;
  padding-left: 1.2em;
}

.rules li::marker {
  color: var(--butter);
}

#cList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty {
  color: var(--sub);
  font-size: .88rem;
  text-align: center;
  padding: 8px 0;
}

.c {
  display: flex;
  gap: 10px;
}

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.bubble {
  flex: 1;
  min-width: 0;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px 18px 18px 18px;
  padding: 8px 14px;
}

.meta {
  font-size: .75rem;
  color: var(--sub);
}

.meta b {
  color: var(--ink);
  font-size: .85rem;
  margin-right: 6px;
}

.body {
  margin: 2px 0 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.acts {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
}

.acts button {
  border: 0;
  background: none;
  color: var(--sub);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.acts .liked {
  color: var(--accent);
  font-weight: 700;
}

.acts .ask {
  color: var(--accent);
}

.acts .yes {
  color: var(--accent);
  font-weight: 700;
}

.cform {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cform input,
.cform textarea {
  font: inherit;
  color: inherit;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 8px 14px;
  background: #fff;
  resize: vertical;
  width: 100%;
}

.cform input:focus,
.cform textarea:focus {
  outline: none;
  border-color: var(--pink);
}

.cform button {
  align-self: flex-end;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 99px;
  cursor: pointer;
}

.cform button:disabled {
  opacity: .5;
  cursor: default;
}

.msg {
  margin: 0;
  min-height: 1.2em;
  font-size: .8rem;
  color: var(--accent);
}

.contact-container {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 26px;
  padding: 28px 22px;
  box-shadow: 0 6px 18px var(--shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  font: inherit;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pink);
}

.submit-btn {
  align-self: center;
  margin-top: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 10px 36px;
  border-radius: 99px;
  cursor: pointer;
  transition: opacity .2s;
}

.submit-btn:hover {
  opacity: .9;
}

.cal-controls {
  text-align: center;
  margin-bottom: 16px;
}

.today-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 700;
  padding: 8px 22px;
  border-radius: 99px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform .2s, opacity .2s;
}

.today-btn:hover {
  transform: translateY(-2px);
  opacity: .9;
}

.calendar-grid-container {
  max-width: 760px;
  margin: 0 auto;
}

.month-card.single-month {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 6px 18px var(--shadow);
}

.calendar-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-title {
  margin: 0;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: .05em;
  font-family: "Zen Maru Gothic", sans-serif;
}

.nav-arrow-btn {
  background: var(--soft);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.nav-arrow-btn:hover {
  background: var(--pink-l);
  border-color: var(--pink);
  color: var(--accent);
}

.weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-weight: 700;
  font-size: .8rem;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.weekday-cell {
  color: var(--sub);
}

.weekday-cell.sun {
  color: #e57373;
}

.weekday-cell.sat {
  color: #64b5f6;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-cell {
  background: var(--soft);
  border-radius: 10px;
  min-height: 72px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  border: 1.5px solid transparent;
  position: relative;
}

.day-cell.empty {
  background: transparent;
  min-height: 0;
  border: none;
}

.day-num {
  font-size: .8rem;
  color: var(--sub);
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sun-num {
  color: #e57373;
}

.sat-num {
  color: #64b5f6;
}

.day-cell.is-today {
  background: #fff;
  border: 2px dashed var(--accent);
  box-shadow: 0 0 10px rgba(207, 86, 115, 0.2);
}

.today-badge {
  font-size: .75rem;
}

.day-cell.has-bday {
  background: #fff;
  border-color: var(--pink-l);
}

.bday-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.bday-item {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--pink-l);
  border-radius: 6px;
  padding: 2px 4px;
  font-size: .68rem;
}

.bday-item img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bday-initial {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  flex-shrink: 0;
}

.bday-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-weight: 700;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slide {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 600px) {
  .month-card.single-month {
    padding: 12px;
  }

  .month-grid,
  .weekdays-row {
    gap: 3px;
  }

  .day-cell {
    min-height: 54px;
    padding: 2px;
  }

  .bday-name {
    display: none;
  }

  .bday-item {
    justify-content: center;
  }
}

img {
  max-width: 100%;
  height: auto;
}

.container,
.sheet,
.card {
  max-width: 100%;
}

#dLike.liked {
  background: var(--pink, #ff6b81);
  color: #ffffff;
  border-color: var(--pink, #ff6b81);
  box-shadow: 0 4px 12px rgba(255, 107, 129, 0.35);
  transform: scale(1.05);
}

#dLike.liked:hover {
  background: var(--pink, #ff6b81);
  transform: scale(1.05);
}

.c-del-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #a0a0a0;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.c-del-btn:hover {
  color: #ff6b81;
  background: #fff0f2;
}