* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e5e5;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* HOME */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.home-inner { width: 100%; max-width: 560px; text-align: center; }

.logo-img {
  max-width: 480px;
  width: 100%;
  height: auto;
  margin-bottom: 40px;
  user-select: none;
}
.logo-img.small {
  max-width: 180px;
  margin: 0;
}

.post-list { list-style: none; text-align: left; }
.post-list li {
  border-bottom: 1px solid var(--border);
}
.post-list a {
  display: block;
  padding: 18px 4px;
  text-decoration: none;
  color: var(--fg);
  font-size: 17px;
  transition: padding .2s;
}
.post-list a:hover { padding-left: 12px; color: var(--accent); }
.post-list .date { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* POST VIEW */
#post { min-height: 100vh; padding: 24px; }
.post-header {
  max-width: 720px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.back:hover { color: var(--accent); }

.post-content {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 17px;
}
.post-content h1 { font-size: 32px; margin-bottom: 8px; }
.post-content .meta { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.post-content h2 { font-size: 24px; margin: 28px 0 12px; }
.post-content p { margin-bottom: 16px; }
.post-content img,
.post-content video,
.post-content iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
}
.post-content iframe { width: 100%; aspect-ratio: 16/9; }
.post-content > video { width: 100%; aspect-ratio: 16/9; background: #000; }
.post-thumb { max-width: 100%; border-radius: 8px; margin: 20px auto; display: block; }
.post-body { margin-top: 20px; }
.tags { margin-top: 32px; }
.tag { display: inline-block; padding: 4px 10px; margin: 2px; background: #eef2ff; color: var(--accent); border-radius: 12px; font-size: 13px; }
.source { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); word-break: break-all; }
.source a { color: var(--accent); }

/* BANNER OVERLAY */
.banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.banner-box {
  position: relative;
  max-width: 600px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: pop .25s ease-out;
}
@keyframes pop {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.banner-box img {
  width: 100%;
  display: block;
}
.banner-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform .2s, background .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.banner-close:hover { background: #000; transform: scale(1.1); }

.banner-hint {
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: #f9f9f9;
  border-top: 1px solid var(--border);
}
.banner-hint b { color: var(--fg); }

@media (max-width: 600px) {
  .logo { font-size: 48px; }
  .post-content h1 { font-size: 24px; }
}
