:root {
  --yellow: #f7c900;
  --yellow-hover: #ffe033;
  --yellow-light: #fff9d0;
  --yellow-border: #f7e060;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #fff;
  color: #111;
  min-height: 100vh;
}

/* 英字にJosefin Sans適用 */
h1, h2, h3, .en,
.section-title, .section-sub,
.profile-name, .tab-label,
.card-date, .date-label,
.modal-date, .img-caption,
nav, .sns-link {
  font-family: 'Josefin Sans', sans-serif;
}

/* ===== LAYOUT ===== */
.wrap {
  position: relative;
  min-height: 100vh;
  background: #fff;
  overflow: hidden;
}

.main {
  min-height: 100vh;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}

.page { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }

/* ===== TABS ===== */
.tabs {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.tab-item {
  display: flex;
  align-items: center;
  height: 36px;
  width: 115px;
  padding-left: 14px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  background: #111;
  border-radius: 0 18px 18px 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.18);
  transform: translateX(-74px);
  transition: transform 0.22s ease, background 0.15s, color 0.15s;
}

.tab-item:hover {
  transform: translateX(0);
  background: #2a2a2a;
  color: #fff;
}

.tab-item.active {
  transform: translateX(0);
  background: var(--yellow);
  color: #111;
  font-weight: 400;
}

.tab-label-text { flex: 1; }

.tab-icon-box {
  width: 48px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tab-icon { width: 14px; height: 14px; display: block; }

/* ===== PROFILE ===== */
.profile-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

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

.avatar svg { color: #b89000; }

.profile-name {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #111;
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 12px;
  color: #999;
  line-height: 1.8;
  max-width: 280px;
  margin-bottom: 22px;
}

.sns-row { display: flex; gap: 10px; }

.sns-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}

.sns-link:hover {
  background: var(--yellow-hover);
  transform: scale(1.1);
}

.sns-link svg { width: 14px; height: 14px; }

/* ===== SECTION ===== */
.section-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #111;
  margin-bottom: 3px;
}

.section-sub {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #bbb;
  margin-bottom: 22px;
}

.content-inner { padding: 0 30px; }

/* ===== WAVEBOX ===== */
.date-group { margin-bottom: 28px; }

.date-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #111;
  background: var(--yellow);
  border-radius: 3px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 10px;
}

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

.card {
  background: #fff;
  border: 0.5px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--yellow);
  box-shadow: 0 2px 10px rgba(247,201,0,0.15);
}

.card-snippet {
  font-size: 12px;
  color: #444;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.card-date {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #ccc;
}

/* ===== PICTURE ===== */
.picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.pic-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: var(--yellow-light);
  border: 0.5px solid #f0e090;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, opacity 0.15s;
}

.pic-thumb:hover { border-color: var(--yellow); opacity: 0.85; }
.pic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-thumb svg { color: #ddd; }

/* ===== OVERLAY / MODAL ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.overlay.active { display: flex; }

.modal-wave {
  background: #fff;
  border: 0.5px solid #e8e8e8;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover { background: var(--yellow); color: #111; }

.modal-date {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #bbb;
  margin-bottom: 14px;
}

.modal-body {
  font-size: 13px;
  color: #444;
  line-height: 1.9;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.modal-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-images img {
  width: 100%;
  border-radius: 6px;
  border: 0.5px solid #eee;
  object-fit: cover;
}

.img-placeholder {
  background: var(--yellow-light);
  border: 0.5px solid var(--yellow-border);
  border-radius: 6px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  color: #bbb;
}

.modal-pic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-pic img {
  max-width: 100%;
  max-height: calc(85vh - 3rem);
  border-radius: 8px;
  display: block;
}

.modal-pic-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255,255,255,0.18);
  border: 0.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-pic-close:hover { background: rgba(255,255,255,0.28); }

.pic-placeholder {
  width: 300px;
  height: 300px;
  background: var(--yellow-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  color: #bbb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .main { padding: 1.5rem 1.25rem 1.5rem 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .picture-grid { grid-template-columns: repeat(3, 1fr); }
}
