* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Helvetica Neue', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: #f0f4ee;
  color: #1e4a18;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-wrapper {
  width: 100%;
  max-width: 430px;
  position: relative;
}

.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 14px;
  background: rgba(240, 244, 238, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.logo {
  font-size: 14px;
  font-weight: 600;
  color: #2d5a1b;
  letter-spacing: 0.12em;
}

.logo a {
  color: #2d5a1b;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.hamburger {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 0;
  cursor: pointer;
  padding: 4px;
  background: transparent;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #2d5a1b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.header-account-icon {
  display: none;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #edf5e8;
  box-shadow: 0 0 0 1px rgba(45, 90, 27, 0.18), 0 3px 10px rgba(30, 74, 24, 0.13);
}

.hamburger.logged-in {
  padding: 0;
}

.hamburger.logged-in > span {
  display: none;
}

.hamburger.logged-in .header-account-icon {
  display: block;
}

.header-notification-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #f0f4ee;
  border-radius: 999px;
  padding: 0 4px;
  background: #d9382d;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.header-notification-badge.hidden {
  display: none;
}

.footer {
  background: #1e4a18;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 28px 20px;
  font-size: 10px;
  letter-spacing: 0.1em;
  width: 100%;
}

.footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin: 0 8px;
}

.drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 260px;
  height: 100%;
  background: rgba(240, 244, 238, 0.97);
  backdrop-filter: blur(12px);
  z-index: 402;
  transition: right 0.3s ease;
  padding: 80px 32px 32px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.open { right: 0; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 401;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.drawer-nav a {
  font-size: 16px;
  font-weight: 600;
  color: #2d5a1b;
  text-decoration: none;
  letter-spacing: 0.1em;
}

.drawer-nav a:active { opacity: 0.6; }

.drawer-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 22px;
  color: #2d5a1b;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.drawer-nav-label {
  font-size: 16px;
  font-weight: 600;
  color: #2d5a1b;
  letter-spacing: 0.1em;
}

.drawer-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 16px;
  margin-top: 12px;
  border-left: 2px solid #c4e0a8;
}

.drawer-nav-sub a {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #4a7a3a !important;
}

.drawer-related-card {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(45, 90, 27, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(30, 74, 24, 0.12);
  line-height: 0;
}

.drawer-related-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (max-height: 700px) {
  .drawer { padding-top: 64px; }
  .drawer-nav { gap: 22px; }
}
