/*
Theme Name: Mobile Black & White Switch OnePage
*/

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

html, body, h1, h2, h3, h4, h5, h6, p,
ul, ol, li, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

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

/* =========================================
   カラーテーマ（デフォルト＝ブラック）
========================================= */
:root{
  --bg: #000;
  --text: #fff;
  --muted: #9D9D9D;
  --card-bg: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --img-border: #333;
  --accent: #1db954;
  --max-mobile-width: 32.8125rem; /* 525px */
}

/* ---- Light Mode（whiteテーマ） ---- */
.layout.light{
  --bg: #fdfdfd;
  --text: #1a1a1a;
  --muted: #666;
  --card-bg: #ffffff;
  --border: rgba(0,0,0,0.05);
  --img-border: #ddd;
  --accent: #2680eb;
}

/* =========================================
   Base
========================================= */
html, body{
  height: 100%;
}

body{
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.layout{
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--bg);
  padding: 1.25rem 0;
}
/* ---- モバイル幅固定 ---- */
.site{
  width: 100%;
  max-width: var(--max-mobile-width);
  min-width: 20rem;
  background: transparent;
}

.layout {
  width: 100%;
  display: flex;
  justify-content: center;
}

.layout-inner {
  width: 100%;
  max-width: var(--max-mobile-width);
}

/* コンテンツ余白 */
.container{
  padding: 1rem;
}

/* =========================================
   Header
========================================= */
.site-header{
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.site-title{
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.site-description{
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.375rem;
}

/* =========================================
   Posts
========================================= */
.post{
  margin-bottom: 1.75rem;
  border-radius: 0.625rem;
  overflow: hidden;
  background: var(--card-bg);
  padding-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.entry-header{
  padding: 0.875rem 1rem 0.375rem 1rem;
}

.entry-title{
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text);
}

.entry-meta{
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.375rem;
}

/* 本文 */
.entry-content{
  padding: 0.5rem 1rem 1rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 本文内の画像 */
.entry-content img{
  width: 100%;
  height: auto;
  margin: 0.5rem 0;
  border-radius: 0.2rem;
  object-fit: cover;
  border: 1px solid var(--img-border);
}

/* コード */
.entry-content pre,
.entry-content code{
  background: var(--card-bg);
  padding: 0.5rem;
  border-radius: 0.375rem;
  overflow: auto;
  color: var(--text);
}

/* =========================================
   Pagination
========================================= */
.nav-links{
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1.5rem 1rem;
}

.nav-links a{
  padding: 0.625rem 0.875rem;
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
}

.nav-links a:hover{
  background: var(--accent);
  color: #fff;
}

/* =========================================
   Footer
========================================= */
.site-footer{
  padding: 0.75rem 1rem 5rem 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* =========================================
   小さい画面
========================================= */
@media (max-width: 22.5rem){
  :root{ --max-mobile-width: 100%; }
  body{ padding: 0.625rem; }
  .site{ min-width: unset; }
}
