/* ポートフォリオ共通：リセット・レイアウト・左ナビ（Cloudflare Pages 向け相対パス想定） */
:root {
  --pf-primary: #667eea;
  --pf-secondary: #764ba2;
  --pf-text: #333;
  --pf-sidebar-w: 220px;
  --pf-radius: 12px;
  --pf-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

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

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

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.7;
  color: var(--pf-text);
  background: linear-gradient(135deg, var(--pf-primary) 0%, var(--pf-secondary) 100%);
  min-height: 100vh;
}

/* ---- 2カラム：左メニュー + メイン ---- */
.site-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: 100vh;
  padding: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.sidebar {
  flex: 0 0 var(--pf-sidebar-w);
  width: var(--pf-sidebar-w);
  background: linear-gradient(180deg, #5a6fd8 0%, var(--pf-primary) 40%, var(--pf-secondary) 100%);
  color: #fff;
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  padding: 24px 18px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.sidebar-brand {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
  line-height: 1.3;
}

.sidebar-brand:hover {
  opacity: 0.92;
}

.sidebar-tag {
  font-size: 0.75rem;
  opacity: 0.88;
  line-height: 1.4;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav a.is-current {
  background: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  pointer-events: none;
}

.site-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* メインの白パネル（index の .container 相当） */
.panel {
  flex: 1;
  background: #fff;
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 40px);
}

.panel > .content {
  flex: 1;
}

.panel > .tool-hanko {
  flex: 1;
}

/* ページ先頭のタイトル帯（index / ツールページ共通） */
header.hero {
  background: linear-gradient(135deg, var(--pf-primary) 0%, var(--pf-secondary) 100%);
  color: #fff;
  padding: 60px 40px;
  text-align: center;
}

header.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 700;
}

header.hero p {
  font-size: 1.2em;
  opacity: 0.95;
}

header.hero .hero-info {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px 24px;
  display: inline-block;
  font-size: 0.9rem;
  max-width: 640px;
  text-align: left;
  line-height: 1.6;
  border-left: 4px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

header.hero .hero-info p {
  font-size: inherit;
  opacity: 1;
  margin: 0;
  color: #fff;
}

.site-footer {
  background: #2d3748;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  margin-top: auto;
}

@media (max-width: 768px) {
  .site-layout {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-height: none;
    flex: none;
    top: auto;
    padding: 16px 14px;
  }

  .sidebar-tag {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-nav a {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
    text-align: center;
    padding: 10px 8px;
  }

  .panel {
    min-height: 0;
  }

  header.hero h1 {
    font-size: 2em;
  }

  header.hero p {
    font-size: 1em;
  }
}
