/* pebbles magazine — shared style
   静かな抵抗のための、磨かれないアーカイブ。 */

:root {
  --bg: #FFFFFF;
  --thumb-bg: #E1E4E4;
  --card-bg: rgba(255, 255, 255, 0.5);
  --ink: #1E1C16;
  --ink-secondary: #3A362C;
  --muted: #8C8570;
  --meta: #9C9583;
  --border: #D3D6D5;
  --border-strong: #1E1C16;
  --accent: #EB5B1E;

  --c-essay: #BC4E29;
  --c-culture: #D9A44E;
  --c-travel: #1C4A54;
  --c-eat: #5B1E2E;

  --font-main: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}

a { color: inherit; text-decoration: none; }

/* condensed / "縦長" treatment — mostly visible on latin glyphs */
.tight {
  transform: scaleX(0.94);
  transform-origin: left top;
  display: inline-block;
}
.tight-strong {
  transform: scaleX(0.88);
  transform-origin: left top;
  display: inline-block;
}

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dotted var(--border-strong);
  padding-bottom: 10px;
  margin-bottom: 22px;
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark {
  font-weight: 400;
  font-size: 27px;
  letter-spacing: -0.3px;
  color: var(--ink);
  transform: scaleX(0.88);
  transform-origin: left top;
  display: inline-block;
  line-height: 1.1;
  white-space: nowrap;
}
@media (max-width: 460px) {
  .wordmark { font-size: 18px; }
}
@media (max-width: 370px) {
  .wordmark { font-size: 16px; }
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sundial { color: var(--muted); }

.channel-links {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.channel-links a { display: flex; align-items: center; gap: 4px; }
.channel-links a:hover { color: var(--accent); }

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}

.nav-row {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  font-weight: 400;
}
.nav-row a.active { color: var(--ink); }
.nav-row a:hover { color: var(--accent); }

/* ---------- category colors (always-on tint on the [ label ] tag; hover is unified accent) ---------- */
.cat-essay { --item-color: var(--c-essay); }
.cat-culture { --item-color: var(--c-culture); }
.cat-travel { --item-color: var(--c-travel); }
.cat-eat { --item-color: var(--c-eat); }

.cat-essay .label,
.cat-culture .label,
.cat-travel .label,
.cat-eat .label,
.cat-essay .archive-date,
.cat-culture .archive-date,
.cat-travel .archive-date,
.cat-eat .archive-date {
  color: var(--item-color);
}

.cat-icon { display: block; margin-bottom: 10px; color: var(--muted); }

/* ---------- article rows / cards ---------- */
.label {
  display: block;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
}

.headline {
  display: block;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 8px;
}

.headline-hero { font-size: 36px; font-weight: 500; letter-spacing: -0.3px; }
.headline-card { font-size: 16px; font-weight: 500; }

/* ---------- edge mark ---------- */
.edge-mark {
  display: block;
  width: 40px;
  height: 14px;
  background: var(--accent);
  margin-bottom: 14px;
}

.dek {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 440px;
}

.meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--meta);
  margin-top: 8px;
}

.article-row {
  padding: 20px 0;
  border-bottom: 1.5px dotted var(--ink-secondary);
  cursor: pointer;
}
.article-row:hover .headline,
.article-row:hover .label { color: var(--accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1.5px dotted var(--ink-secondary);
}

/* ---------- images ---------- */
.thumb {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--thumb-bg);
  border: 1.5px solid var(--ink-secondary);
  margin-bottom: 12px;
  color: var(--muted);
}
.thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.4s ease;
}
.article-row:hover .thumb > img,
.hero-row:hover .thumb > img,
.map-list-entry:hover .thumb > img,
.gallery figure:hover .thumb > img {
  transform: scale(1.06);
}
.thumb-hero { aspect-ratio: 16 / 9; margin-bottom: 16px; }
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-small {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

/* ---------- archive ---------- */
.archive-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--ink-secondary);
  align-items: baseline;
}
.archive-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--meta);
  flex-shrink: 0;
  width: 92px;
}
.archive-title { color: var(--ink); font-size: 14px; margin-top: 2px; }
.archive-row:hover .archive-title { color: var(--accent); }

/* ---------- body text ---------- */
.body-text {
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.65;
  max-width: 460px;
}
.body-text p { margin: 0 0 1em; }

.about-body h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin: 36px 0 12px;
}
.about-body a { color: var(--accent); text-decoration: underline; }

/* optional aside comment (toggle at publish time, no visible label) */
.aside-note {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  max-width: 400px;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* ---------- pebbles stats ---------- */
.pebbles-stats { display: inline-flex; gap: 4px; align-items: center; margin: 4px 0; }
.pebbles-stats img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  opacity: 0.3;
}
.pebbles-stats img.filled {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------- homepage hero (latest article + next 2) ---------- */
.hero-section {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 0 0 20px;
  border-bottom: 1.5px dotted var(--ink-secondary);
}
.hero-main {
  display: block;
  width: 50%;
  flex-shrink: 0;
  text-decoration: none;
  min-width: 0;
}
.hero-main .thumb {
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
}
.hero-main:hover .headline,
.hero-main:hover .label { color: var(--accent); }

.hero-secondary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hero-secondary .article-row {
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px dotted var(--border);
}
.hero-secondary .article-row:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
@media (max-width: 600px) {
  .hero-section { flex-direction: column; gap: 24px; }
  .hero-main { width: 100%; }
}

/* ---------- homepage category sections ---------- */
.home-section { margin: 52px 0; }
.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1.5px dotted var(--ink-secondary);
  padding-bottom: 10px;
  margin-bottom: 22px;
}
.home-section-title {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: clamp(32px, 9vw, 48px);
  letter-spacing: -0.3px;
  line-height: 0.95;
  color: var(--ink);
  transform: scaleX(0.88);
  transform-origin: left top;
  display: inline-block;
}
.home-section-title:hover { color: var(--accent); }
.home-section-more {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.home-section-more:hover { color: var(--accent); }

/* ---------- stone scatter (real photo pebbles) ---------- */
.stone-scatter {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 12px;
  overflow: visible;
}
.stone-scatter img {
  display: block;
  filter: grayscale(0);
  transition: transform 0.25s ease;
}
.stone-scatter.top {
  margin: -6px 0 18px;
  justify-content: flex-end;
}
.stone-scatter.bottom {
  margin: 26px 0 -4px;
  justify-content: center;
}
.stone-scatter.middle {
  margin: 30px 0 34px;
  justify-content: center;
}
.stone-scatter.center {
  margin: 22px 0;
  justify-content: center;
}
.stone-scatter.left {
  justify-content: flex-start;
}

/* ---------- category page heading (large) ---------- */
.cat-heading-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 34px 0 26px;
  flex-wrap: wrap;
}
.cat-heading {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 64px);
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 0.95;
  transform: scaleX(0.88);
  transform-origin: left top;
  display: inline-block;
}

/* ---------- homepage elsewhere band ---------- */
.home-elsewhere {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 0;
  border-top: 2.5px solid var(--border-strong);
  border-bottom: 2.5px solid var(--border-strong);
  margin: 44px 0 30px;
}
.home-elsewhere-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1;
  min-width: 160px;
  color: var(--muted);
}
.home-elsewhere-item .t { font-weight: 500; font-size: 14px; color: var(--ink); }
.home-elsewhere-item:hover { color: var(--accent); }
.home-elsewhere-item:hover .t { color: var(--accent); }

/* ---------- homepage elsewhere embeds (watch / listen / newsletter) ---------- */
.home-elsewhere-embeds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 26px;
  padding: 26px 0;
  border-top: 2px dotted var(--border-strong);
  margin: 52px 0 0;
}
@media (min-width: 600px) {
  .elsewhere-col:not(:first-child) {
    border-left: 1px dotted var(--border);
    padding-left: 24px;
  }
}
@media (max-width: 599px) {
  .elsewhere-col:not(:first-child) {
    border-top: 1px dotted var(--border);
    padding-top: 20px;
  }
}

.elsewhere-col-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}
.elsewhere-col-title:hover { color: var(--accent); }
.elsewhere-col-more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.elsewhere-col-more:hover { color: var(--accent); }

.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.yt-grid a {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--thumb-bg);
  border: 1.5px solid var(--ink-secondary);
}
.yt-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.35s ease;
}
.yt-grid a:hover img {
  transform: scale(1.06);
}

.nl-list { display: flex; flex-direction: column; gap: 10px; }
.nl-list-item { display: block; }
.nl-list-title {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.nl-list-item:hover .nl-list-title { color: var(--accent); }

/* ---------- homepage subscribe embed ---------- */
.substack-embed { margin: 20px 0 10px; text-align: center; }
.substack-embed iframe { display: inline-block; }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 2px dotted var(--border-strong);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.site-footer a:hover { color: var(--accent); }

/* ---------- gallery ---------- */
.gallery {
  columns: 2 220px;
  column-gap: 14px;
}
.gallery figure {
  break-inside: avoid;
  margin: 0 0 14px;
}
.gallery .thumb {
  aspect-ratio: auto;
  margin-bottom: 6px;
}
.gallery .thumb > img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: unset;
}
.gallery figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--meta);
}
@media (min-width: 600px) {
  .gallery { columns: 3 180px; }
}

/* ---------- filters (eat map) ---------- */
.filter-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; font-size: 13px; }
.filter-row select {
  background: #FFFFFF;
  border: 1.5px solid var(--ink-secondary);
  padding: 4px 10px;
  border-radius: 0;
  color: var(--ink-secondary);
  font-family: var(--font-main);
}

.map-list-entry { display: flex; flex-direction: row; gap: 10px; margin-bottom: 16px; align-items: center; }
.map-list-entry .thumb-small .thumb-placeholder svg { width: 18px; height: 18px; }
.map-list-entry .name { font-weight: 500; font-size: 14px; color: var(--ink); }
.map-list-entry .place { font-size: 11px; color: var(--muted); }
.map-list-entry:hover .name { color: var(--accent); }
.map-list-entry.hidden { display: none; }
