body {
  max-width: 860px;
  margin: auto;
  padding: 20px;
  font-family: "adelle", Noto, "Hiragino Sans", serif;
  font-size: 16px;
  color: #333;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 2-column layout: sidenav + main content. Single column when no sidenav. */
.layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  align-items: start;
}
.layout.no-sidenav {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: auto;
}
.main { min-width: 0; }

aside.sidenav {
  position: sticky;
  top: 20px;
  align-self: start;
  font-size: 13px;
}
aside.sidenav h4 {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  font-weight: 600;
}
aside.sidenav a {
  display: block;
  padding: 4px 0 4px 10px;
  margin-left: -10px;
  color: #666;
  border-left: 2px solid transparent;
}
aside.sidenav a.current {
  color: #2121d3;
  border-left-color: #2121d3;
  font-weight: 500;
}
aside.sidenav a:hover { color: #333; }

@media (max-width: 760px) {
  body { max-width: 680px; }
  .layout { grid-template-columns: 1fr; gap: 0; }
  aside.sidenav {
    position: static;
    margin: 0 -20px 20px;
    padding: 10px 20px 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  aside.sidenav::-webkit-scrollbar { display: none; }
  aside.sidenav h4 { display: none; }
  aside.sidenav a {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 6px 4px 0;
    border-radius: 20px;
    background: #f2f2f2;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    border-left: none;
  }
  aside.sidenav a.current {
    background: #222;
    color: #fff;
    border-left: none;
  }
}
a { color: #2121d3d9; text-decoration: none; }
a:hover { text-decoration: underline; }

h1.logo {
  font-size: 26px;
  font-weight: 600;
  margin: 12px 0 4px;
  letter-spacing: -0.01em;
}
h1.logo a { color: #333; }
p.tagline {
  font-size: 14px;
  color: #777;
  margin: 0 0 28px;
  line-height: 1.7;
}

nav.top {
  font-size: 13px;
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
nav.top a { color: #555; margin-right: 18px; letter-spacing: 0.02em; }
nav.top a.current { color: #333; font-weight: 600; }

h2.section-label {
  font-size: 14px;
  color: #888;
  font-weight: normal;
  margin: 32px 0 10px;
  letter-spacing: 0.02em;
  font-family: "adelle", serif;
}

ul.toppage {
  font-size: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
}
ul.toppage li {
  display: flex;
  padding: 4px 0;
  line-height: 1.7;
}
ul.toppage time {
  flex: 0 0 110px;
  color: #888;
  font-size: 14px;
}
ul.toppage a, ul.toppage span.t { flex: 1; }
ul.toppage span.t { color: #333; }
ul.toppage span.tag {
  display: inline-block;
  font-size: 11px;
  color: #888;
  background: #f5f5f5;
  padding: 1px 7px;
  margin-right: 8px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

details {
  margin: 4px 0;
  padding: 0;
}
details > summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  display: flex;
  line-height: 1.7;
  font-size: 16px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "▸";
  color: #bbb;
  margin-right: 8px;
  font-size: 12px;
  flex: 0 0 12px;
}
details[open] > summary::before { content: "▾"; }
details > summary time {
  flex: 0 0 95px;
  color: #888;
  font-size: 14px;
}
details > summary > span.label { flex: 1; color: #333; }
details .body {
  margin: 8px 0 14px 20px;
  padding: 12px 14px;
  background: #fafafa;
  border-left: 2px solid #eee;
  font-size: 14.5px;
  line-height: 1.85;
  color: #444;
}
details .body p { margin: 0 0 8px; }
details .body p:last-child { margin-bottom: 0; }
details .body ul {
  margin: 6px 0 6px 18px;
  padding: 0;
  list-style: disc;
  font-size: 14px;
  line-height: 1.8;
  background: none;
  outline: none;
}
details .body li { display: list-item; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 20px;
}
.stat {
  padding: 12px 10px;
  background: #fafafa;
  border: 1px solid #eee;
  text-align: left;
}
.stat .k { font-size: 11px; color: #888; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.stat .v { font-size: 20px; color: #222; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 11px; color: #aaa; margin-top: 2px; }

.search {
  margin: 8px 0 18px;
}
.search input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
}
.search input:focus { outline: none; border-color: #999; }

footer.site {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
  color: #888;
  text-align: left;
  line-height: 1.7;
}
footer.site a { color: #888; }

hr.sep {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin: 20px 0;
}

.note {
  font-size: 12px;
  color: #aaa;
  font-style: italic;
  margin: 4px 0 0;
}

/* Book cover + Amazon link at the top of expanded book details */
.book-meta {
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px dashed #e4e4e4;
}
.book-meta .book-cover {
  display: block;
  max-width: 120px;
  max-height: 180px;
  width: auto;
  height: auto;
  margin: 0 0 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.book-meta .book-link {
  display: inline-block;
  font-size: 12.5px;
  color: #777;
  letter-spacing: 0.02em;
}
.book-meta .book-link:hover { color: #2121d3d9; }

/* Kindle highlight — simple "> " prefix + italic */
blockquote.hl {
  margin: 8px 0 10px;
  padding: 0;
  border: none;
}
blockquote.hl p {
  font-style: italic;
  color: #555;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
}
blockquote.hl p::before {
  content: "> ";
  color: #999;
  font-style: normal;
}
blockquote.hl p b {
  display: inline;
  margin-left: 6px;
  font-style: normal;
  color: #333;
}

/* Food log — structured format */
.food-log .meal {
  margin: 0 0 2px;
  font-size: 14.5px;
  line-height: 1.7;
  display: flex;
  gap: 12px;
}
.food-log .meal-time {
  flex: 0 0 48px;
  color: #999;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  padding-top: 1px;
}
.food-log .meal-items {
  flex: 1;
  color: #333;
}
.food-log .meal-summary {
  margin: 2px 0 14px 60px;
  color: #888;
  font-size: 13px;
  line-height: 1.6;
}
.food-log .meal-summary:last-child { margin-bottom: 0; }
.food-log .body-note {
  margin: 0 0 14px;
  padding: 8px 12px;
  background: #fff8e7;
  border-left: 2px solid #e8c866;
  color: #6a5a2a;
  font-size: 13.5px;
  line-height: 1.7;
}
.food-log .body-note strong {
  color: #8a6a00;
  letter-spacing: 0.03em;
  margin-right: 4px;
}
.food-log .meal-photos {
  margin: 6px 0 14px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.food-log .meal-photos a {
  display: block;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 3px;
  background: #f5f5f5;
}
.food-log .meal-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.food-log .meal-photos a:hover img { transform: scale(1.05); }

/* Supplement table (health.php) */
.supp-summary {
  font-size: 13px;
  color: #888;
  margin: 0 0 14px;
}
.supp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 14px;
}
.supp-table th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.supp-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: top;
  line-height: 1.6;
}
.supp-table td.name { color: #333; font-weight: 500; }
.supp-table td.timing { color: #666; font-size: 13px; }
.supp-table td.dose { color: #666; font-size: 13px; }
.supp-table td.since { color: #888; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.supp-table tr.new td.name,
.supp-table tr.new td.since { color: #2121d3; font-weight: 600; }
.supp-table tr.as-needed { opacity: 0.72; }
.supp-table td .timing-jp { color: #999; font-size: 12px; margin-left: 4px; }
.supp-table td.name .brand { color: #999; font-weight: normal; font-size: 13px; }
.supp-table td.since .since-note { color: #999; font-size: 12px; }

/* Idea: date-grouped compact list */
.idea-grouped {
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  margin: 8px 0 12px;
}
.idea-grouped .idea-day {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.idea-grouped .idea-day-date {
  color: #333;
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.idea-grouped .idea-day-items {
  font-size: 13px;
  line-height: 1.75;
}
.idea-grouped .idea-item {
  display: flex;
  gap: 10px;
  padding: 2px 0;
  color: #555;
}
.idea-grouped .idea-item .idea-time {
  flex: 0 0 46px;
  color: #aaa;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding-top: 2px;
}
.idea-grouped .idea-item .idea-text { flex: 1; color: #444; }
.idea-grouped details.idea-more {
  margin: 0;
  padding: 0;
}
.idea-grouped details.idea-more > summary {
  cursor: pointer;
  list-style: none;
  display: block;
  padding: 12px 0 6px;
  color: #888;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.idea-grouped details.idea-more > summary::-webkit-details-marker { display: none; }
.idea-grouped details.idea-more > summary::before {
  content: "▸ ";
  color: #bbb;
  flex: none;
  margin-right: 0;
  font-size: inherit;
}
.idea-grouped details.idea-more[open] > summary::before { content: "▾ "; }
.idea-grouped details.idea-more > summary:hover { color: #2121d3; }

/* To Do list */
ul.todo-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  background: none;
  outline: none;
  font-size: 14px;
}
ul.todo-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
  line-height: 1.6;
}
ul.todo-list li.done { opacity: 0.55; }
ul.todo-list li.done .todo-title { text-decoration: line-through; color: #888; }
ul.todo-list .todo-check { color: #bbb; font-size: 16px; padding-top: 1px; }
ul.todo-list li.done .todo-check { color: #2121d3; }
ul.todo-list .todo-title { color: #333; font-weight: 500; }
ul.todo-list .todo-detail { color: #666; font-size: 13px; margin-top: 4px; }
ul.todo-list .todo-date { color: #aaa; font-size: 11.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Cannabis 2-column compact list */
.cannabis-list {
  column-count: 2;
  column-gap: 32px;
  font-size: 13px;
  line-height: 1.9;
  margin: 8px 0 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
}
.cannabis-list .row {
  break-inside: avoid;
  padding: 2px 0;
  display: grid;
  grid-template-columns: 52px 64px 1fr 54px;
  gap: 6px;
  color: #555;
}
.cannabis-list .row .date { color: #888; font-variant-numeric: tabular-nums; font-weight: 500; }
.cannabis-list .row .time { color: #999; font-variant-numeric: tabular-nums; font-size: 12px; }
.cannabis-list .row .type { color: #333; }
.cannabis-list .row .amt { color: #666; font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 600px) {
  .cannabis-list { column-count: 1; }
}

/* Workout log — clean text block */
.workout {
  font-size: 14.5px;
  line-height: 1.9;
  color: #333;
  font-variant-numeric: tabular-nums;
}

/* Home page 3-column layout */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin: 40px 0 20px;
}
.col {
  padding: 0 26px;
  border-right: 1px solid rgba(0,0,0,0.08);
}
.col:first-child { padding-left: 0; }
.col:last-child { border-right: none; padding-right: 0; }
.col h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.col h3::before { content: "• "; color: #333; }
.col h3 a { color: #333; }
.col ul {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 0;
  background: none;
  outline: none;
}
.col li {
  font-size: 15px;
  line-height: 1.9;
  color: #555;
}
.col li::before { content: "– "; color: #bbb; }
.col a { color: #555; }
.col a:hover { color: #2121d3d9; }

@media (max-width: 620px) {
  .columns { grid-template-columns: 1fr; }
  .col {
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 18px 0;
  }
  .col:first-child { padding-top: 0; }
  .col:last-child { border-bottom: none; padding-bottom: 0; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  ul.toppage time, details > summary time { flex: 0 0 90px; font-size: 13px; }
}
