/* =========================================================================
   oshiete.biyoshithebest.jp — single hand-written stylesheet.
   Reproduces the *feel* of the main site (Laravel/Livewire/Tailwind/DaisyUI)
   without that stack: brand teal #114f65, near-white bg, system sans stack,
   comfortable Japanese reading column.
   ========================================================================= */

:root {
  --brand: #114f65;
  --brand-dark: #0d3e50;
  --brand-tint: #e7eef1;
  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --text: #1b1f23;
  --text-soft: #51616b;
  --border: #e4e6e8;
  --footer-bg: #111827;        /* gray-900 — exact main-site footer colour */
  --footer-text: #9ca3af;      /* gray-400 */
  --radius: 8px;               /* rounded-lg — main site card radius */
  --shadow: 0 1px 3px rgba(16, 38, 49, 0.06), 0 6px 20px rgba(16, 38, 49, 0.05);
  --maxw: 1080px;
  --readw: 720px;
  --font: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
          "Segoe UI Emoji";
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.85;            /* generous for Japanese body text */
  font-size: 16px;
  letter-spacing: 0.01em;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header (two-tier) ---------- */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Tier 1: wordmark + search */
.site-header__bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 72px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Brand: real logo image + small おしえて marker, tagline beneath */
.brand { display: inline-flex; flex-direction: column; gap: 4px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__logobox { display: inline-flex; align-items: flex-start; gap: 7px; }
.brand__logo { height: 44px; width: auto; display: block; }
.brand__badge {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--brand);
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1;
  margin-top: 4px;
}
.brand__tagline {
  font-size: 0.72rem;        /* text-xs */
  color: #4b5563;            /* gray-600 (main site) */
}

/* Right-side actions: search + login */
.site-header__actions { display: flex; align-items: center; gap: 16px; }

/* Login (avatar + label), links to the main site */
.site-login {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--text-soft);
}
.site-login:hover { text-decoration: none; color: var(--brand); }
.site-login__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}
.site-login__avatar svg { display: block; }
.site-login__label { font-size: 0.7rem; line-height: 1; white-space: nowrap; }

/* Search — sharp-cornered input with the icon on the left (matches main site) */
.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d1d5db; /* gray-300 (main site) */
  border-radius: 0;          /* main site search has NO rounding */
  padding: 0 14px;
  height: 40px;
  min-width: 240px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(17, 79, 101, 0.35);
}
.site-search__icon { flex: 0 0 auto; color: #9ca3af; }
.site-search__input {
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
  min-width: 0;
}
/* Submit happens on Enter; keep the button for a11y/no-JS but visually hidden */
.site-search__btn {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Tier 2: category tabs */
.site-tabs {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-tabs__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.site-tabs__inner::-webkit-scrollbar { display: none; }
.site-tabs__tab {
  flex: 0 0 auto;
  position: relative;
  padding: 13px 14px 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.site-tabs__tab:hover { color: var(--brand); text-decoration: none; }
.site-tabs__tab.is-active {
  color: var(--text);
  border-bottom-color: var(--brand);
}

/* ---------- Home: hero banner ---------- */
.hero {
  position: relative;
  margin: 24px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {              /* dark scrim for text legibility */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 30, 38, 0.35), rgba(8, 30, 38, 0.55));
}
.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 40px 24px;
}
.hero__title {
  font-size: 2rem;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hero__tagline {
  margin: 0;
  font-size: 0.98rem;
  opacity: 0.95;
}

/* ---------- Home: sections + cards ---------- */
.article-section { margin: 40px 0; }
.article-section__heading {
  font-size: 1.25rem;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  line-height: 1.4;
}
.article-section__heading a { color: inherit; }
.article-section__heading a:hover { color: var(--brand); }
.result-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-left: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__link { display: block; color: inherit; }
.card__link:hover { text-decoration: none; }
.card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: block; padding: 16px 18px 20px; }
.card__metarow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card__cat {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 2px 8px;
  border-radius: 3px;
}
.card__pref { font-size: 0.72rem; color: var(--text-soft); }
.card__title {
  display: block;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
  margin-bottom: 6px;
}
.card__desc {
  display: block;
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.empty { color: var(--text-soft); padding: 24px 0; }
.back-link { margin-top: 24px; }
.section-more { margin-top: 16px; font-size: 0.9rem; }
.section-more a { font-weight: 600; }

/* ---------- Hub pages (category / area) ---------- */
.hub-header {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.hub-header__title { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: 0.02em; }
.hub-header__count { margin: 0; color: var(--text-soft); font-size: 0.88rem; }

/* ---------- Find-by-area block ---------- */
.area-finder__lead { color: var(--text-soft); margin: -6px 0 18px; font-size: 0.92rem; }
.area-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.area-chip {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.area-chip:hover {
  text-decoration: none;
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
}

/* ---------- Article ---------- */
.article {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 28px 0 64px;
}
/* pillar pages get a slightly wider column for richer layouts */
.article--pillar { max-width: 780px; }

.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--brand); }

.article__title {
  font-size: 1.7rem;
  line-height: 1.5;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
.article__dates {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0 0 24px;
}
.article__updated { color: var(--brand); }

.article__hero {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article__hero img { width: 100%; }

/* Body — author-supplied trusted HTML */
.article__body { font-size: 1.02rem; }
.article__body h2 {
  font-size: 1.32rem;
  line-height: 1.5;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-tint);
}
.article__body h3 {
  font-size: 1.12rem;
  margin: 30px 0 10px;
  color: var(--brand-dark);
}
.article__body p { margin: 0 0 18px; }
.article__body ul,
.article__body ol { margin: 0 0 18px; padding-left: 1.4em; }
.article__body li { margin-bottom: 8px; }
.article__body a { text-decoration: underline; }
.article__body img { border-radius: 8px; margin: 18px 0; }
.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 0.94rem;
}
.article__body th,
.article__body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.article__body th { background: var(--bg-soft); }
.article__body blockquote {
  margin: 0 0 20px;
  padding: 12px 18px;
  border-left: 4px solid var(--brand);
  background: var(--bg-soft);
  color: var(--text-soft);
  border-radius: 0 8px 8px 0;
}
/* A TL;DR / summary box the author may place near the top of body_html */
.article__body .summary,
.article__body .tldr {
  background: var(--brand-tint);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 28px;
}
.article__body .summary :last-child,
.article__body .tldr :last-child { margin-bottom: 0; }

/* ---------- Related articles ---------- */
.related {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related__heading { font-size: 1.2rem; margin: 0 0 18px; }
.related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.related__list--dense { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.related__item a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.related__item a:hover {
  text-decoration: none;
  border-color: var(--brand);
  background: var(--bg-soft);
}
.related__thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
.related__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related__text { display: flex; flex-direction: column; gap: 4px; }
.related__title { font-weight: 600; line-height: 1.5; }
.related__desc { font-size: 0.82rem; color: var(--text-soft); }

/* ---------- Local stylist CTA block ---------- */
.local-stylists {
  margin-top: 44px;
  padding: 26px 24px;
  background: var(--brand-tint);
  border-radius: var(--radius);
}
.local-stylists__heading {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--brand-dark);
}
.local-stylists__lead {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.local-stylists__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.local-stylists__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.15s ease;
}
.local-stylists__link:hover { background: var(--brand-dark); text-decoration: none; }
.local-stylists__id { opacity: 0.75; font-weight: 400; font-size: 0.85em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--brand); margin: 0; }

/* ---------- Footer (dark) ---------- */
.site-footer {
  margin-top: 72px;
  background: var(--footer-bg);
  color: var(--footer-text);
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 48px 20px 40px;
}

/* Footer brand block */
.site-footer__brand { max-width: 360px; }
.site-footer__logo { display: inline-flex; align-items: flex-start; gap: 7px; }
.site-footer__logo img { height: 40px; width: auto; display: block; }
.brand__badge--footer { background: rgba(255, 255, 255, 0.18); }
.site-footer__tagline {
  margin: 16px 0 0;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--footer-text);
}
.site-footer__social { margin-top: 18px; }
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s ease;
}
.site-footer__social a:hover { color: #fff; }

/* Footer link columns */
.site-footer__cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-col__title {
  margin: 0 0 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}
.footer-col__list { list-style: none; margin: 0; padding: 0; }
.footer-col__list li { margin-bottom: 12px; }
.footer-col__list a {
  color: var(--footer-text);
  font-size: 0.88rem;
  transition: color 0.15s ease;
}
.footer-col__list a:hover { color: #fff; text-decoration: none; }

/* Footer bottom bar */
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px;
}
.site-footer__copy {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer__legal { margin: 0; font-size: 0.78rem; display: flex; gap: 10px; align-items: center; }
.site-footer__legal a { color: rgba(255, 255, 255, 0.75); }
.site-footer__legal a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  /* Header tier 1 stacks: brand row, then full-width search */
  .site-header__bar-inner {
    min-height: 0;
    gap: 12px;
    align-items: stretch;
  }
  .brand { align-self: flex-start; }
  .site-header__actions { width: 100%; }
  .site-search { flex: 1 1 auto; min-width: 0; }

  /* Footer columns sit below the brand block */
  .site-footer__top { gap: 32px; padding: 36px 20px 28px; }
  .site-footer__cols { gap: 40px; width: 100%; }
  .site-footer__bottom-inner { justify-content: center; text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .article__title { font-size: 1.42rem; }
  .hero { min-height: 200px; }
  .hero__title { font-size: 1.5rem; }
  .brand__logo { height: 38px; }
}
