:root {
  --primary: #ff6847;
  --primary-dark: #e84f32;
  --primary-soft: #fff1ed;
  --ink: #202124;
  --muted: #6f7479;
  --line: rgba(32,33,36,.09);
  --shadow-sm: 0 4px 16px rgba(25, 32, 38, .12);
  --shadow-md: 0 12px 32px rgba(25, 32, 38, .18);
  --bs-primary: #ff6847;
  --bs-primary-rgb: 255, 104, 71;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: #eef1f3;
  font-family: "Roboto", -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
}

.app-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right));
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(32,33,36,.08);
  box-shadow: 0 3px 18px rgba(25,32,38,.10);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 1100;
}

.app-bar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.app-bar-brand::before {
  content: "";
  width: 8px;
  height: 28px;
  margin-right: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), #ff9a6f);
  box-shadow: 0 4px 10px rgba(255,104,71,.28);
}

.app-bar-brand span {
  color: var(--ink);
  letter-spacing: .055em;
  font-weight: 700;
  font-size: 17px;
}

.official-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted) !important;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.6);
  transition: color .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.official-link:hover {
  color: var(--primary-dark) !important;
  background: var(--primary-soft);
  border-color: rgba(255,104,71,.25);
}
.official-link svg { width: 13px; height: 13px; flex-shrink: 0; }
.official-link.is-active {
  color: var(--primary-dark) !important;
  background: var(--primary-soft);
  border-color: rgba(255,104,71,.25);
}

main { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }

.blog-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 20px 40px;
}
.blog-footer a { color: var(--muted); }

/* --- blog index --- */
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.post-card .post-date {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .06em;
}
.post-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 8px;
  color: var(--ink);
}
.post-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.page-lead {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 28px;
}

/* --- article page --- */
.article-header { margin-bottom: 24px; }
.article-date { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.article-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0 0;
}
.article-body {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  line-height: 1.95;
}
.article-body h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-top: 4px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--primary-dark); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--primary-dark); }

/* --- blog card --- */
/* 参考: https://katasuke-web.com/blog-card/ */
.blog-card {
  display: flex;
  width: 100%;
  background-color: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 16px 0;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-img-container {
  flex: 0 0 40%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card-img-container svg { width: 34px; height: 34px; fill: #fff; opacity: .95; }

.card-content {
  flex: 1;
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.card-description {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 576px) {
  .card-img-container { flex-basis: 30%; }
  .card-title { font-size: 1.1rem; }
}

@media (max-width: 576px) {
  .app-bar { height: 58px; padding-left: 14px !important; padding-right: 14px !important; }
  .official-link span { display: none; }
  .official-link { padding: 7px; }
  main { padding: 24px 16px 48px; }
  .article-body { padding: 22px 18px; }
}