/* ============================================================
   ひとり人事 / Google-style minimal CSS
   ============================================================ */

:root {
  /* color */
  --c-bg:        #ffffff;
  --c-bg-soft:   #f8f9fa;
  --c-bg-muted:  #f1f3f4;
  --c-text:      #202124;
  --c-text-sub:  #5f6368;
  --c-text-mute: #80868b;
  --c-border:    #dadce0;
  --c-border-l:  #e8eaed;
  --c-accent:    #1f3a5f;   /* V-PRODUCE navy */
  --c-accent-h:  #16294a;
  --c-gold:      #b89968;
  --c-danger:    #d93025;
  --c-success:   #1e8e3e;
  --c-warning:   #f9ab00;

  /* typography */
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-en: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* layout */
  --container: 1100px;
  --radius:    8px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --transition: 150ms ease;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--c-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent-h); text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.4; margin: 0 0 .6em; color: var(--c-text); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
hr { border: 0; height: 1px; background: var(--c-border-l); margin: 2rem 0; }
button { font-family: inherit; cursor: pointer; }

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-l);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; color: var(--c-text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--c-accent); }
.brand-mark {
  width: 26px; height: 26px;
  background: var(--c-accent);
  border-radius: 6px;
  position: relative;
}
.brand-mark::before, .brand-mark::after {
  content:""; position: absolute; background: var(--c-gold);
}
.brand-mark::before {
  top: 7px; left: 7px; width: 4px; height: 12px; border-radius: 2px;
}
.brand-mark::after {
  top: 7px; left: 15px; width: 4px; height: 12px; border-radius: 2px;
}
.brand-text { letter-spacing: .02em; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--c-text); font-size: .92rem; font-weight: 500; text-decoration: none;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--c-accent); text-decoration: none; }
.nav-user { color: var(--c-text-sub) !important; font-size: .85rem !important; }
.nav-link-quiet { color: var(--c-text-mute) !important; font-size: .85rem !important; }
.nav-link-highlight {
  position: relative;
  color: var(--c-accent) !important;
  font-weight: 600 !important;
}
.nav-link-highlight::before {
  content: "✓";
  margin-right: 4px;
  font-size: .75em;
  color: var(--c-gold);
}

/* breadcrumb */
.breadcrumb-area {
  padding: 12px 20px 0;
}
.breadcrumb-nav {
  font-size: .82rem;
  color: var(--c-text-mute);
}
.breadcrumb-nav a { color: var(--c-text-sub); }
.breadcrumb-nav .bc-sep { margin: 0 6px; color: var(--c-text-mute); }
.breadcrumb-nav .bc-current { color: var(--c-text); }

.nav-toggle {
  display: none; background: none; border: 0;
  width: 36px; height: 36px; padding: 8px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--c-text); margin: 4px 0; transition: var(--transition);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary    { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-h); color: #fff; }
.btn-secondary  { background: #fff; color: var(--c-text); border-color: var(--c-border); }
.btn-secondary:hover { background: var(--c-bg-soft); color: var(--c-text); }
.btn-gold       { background: var(--c-gold); color: #fff; }
.btn-gold:hover { background: #9a7e51; color: #fff; }
.btn-ghost      { background: transparent; color: var(--c-accent); border-color: transparent; }
.btn-ghost:hover { background: var(--c-bg-soft); color: var(--c-accent); }
.btn-danger     { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---- Hero (top page) ---- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-l);
}
.hero-logo {
  font-size: 3rem; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 8px;
  color: var(--c-text);
}
.hero-tagline {
  font-size: 1.25rem; font-weight: 500; color: var(--c-text);
  margin: 24px 0 8px;
}
.hero-subtagline {
  color: var(--c-text-sub); font-size: 1rem; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { min-width: 180px; }

/* ---- Section ---- */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2 { margin: 0; font-size: 1.3rem; }
.section-head .more { font-size: .9rem; color: var(--c-text-sub); }

/* ---- Category chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 999px;
  background: var(--c-bg-soft); color: var(--c-text);
  font-size: .88rem; text-decoration: none;
  border: 1px solid var(--c-border-l);
  transition: all var(--transition);
}
.chip:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); text-decoration: none; }
.chip.is-active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

/* ---- Cards (templates) ---- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  color: var(--c-text);
}
.card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.card-cat {
  display: inline-block; font-size: .75rem; color: var(--c-text-sub);
  background: var(--c-bg-muted); padding: 3px 10px; border-radius: 4px;
  margin-bottom: 10px;
}
.card-title {
  font-size: 1rem; font-weight: 700; color: var(--c-text);
  margin: 0 0 8px; line-height: 1.5;
}
.card-summary {
  font-size: .88rem; color: var(--c-text-sub); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: 14px; display: flex; gap: 12px;
  font-size: .78rem; color: var(--c-text-mute);
}

/* ---- Forum post list ---- */
.post-list { border-top: 1px solid var(--c-border-l); }
.post-row {
  display: block; padding: 18px 4px;
  border-bottom: 1px solid var(--c-border-l);
  text-decoration: none; color: var(--c-text);
  transition: background var(--transition);
}
.post-row:hover { background: var(--c-bg-soft); text-decoration: none; color: var(--c-text); }
.post-row-head {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: .78rem; color: var(--c-text-mute); margin-bottom: 6px;
}
.post-row-title {
  font-weight: 700; font-size: 1rem; margin: 0 0 4px;
}
.post-row-body {
  color: var(--c-text-sub); font-size: .88rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.tag {
  display: inline-block; font-size: .72rem;
  padding: 2px 8px; border-radius: 3px;
  background: var(--c-bg-muted); color: var(--c-text-sub);
}
.tag-admin { background: var(--c-accent); color: #fff; }
.tag-honne { background: #fff4e5; color: #b85450; }
.tag-best { background: var(--c-gold); color: #fff; }

/* ---- Forms ---- */
.form {
  max-width: 460px; margin: 0 auto;
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: var(--radius);
  padding: 32px;
}
.form-wide { max-width: 720px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-size: .85rem; font-weight: 500;
  margin-bottom: 6px; color: var(--c-text);
}
.form-row label .req { color: var(--c-danger); margin-left: 4px; }
.form-row .hint { font-size: .78rem; color: var(--c-text-mute); margin-top: 6px; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="url"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit;
  background: #fff; color: var(--c-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(31,58,95,.12);
}
.form-row textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.form-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--c-text-mute); font-size: .82rem; margin: 24px 0;
}
.form-divider::before, .form-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--c-border-l);
}

/* Google login button */
.btn-google {
  background: #fff; color: #3c4043;
  border: 1px solid var(--c-border);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%;
  padding: 11px;
  font-weight: 500; font-size: .95rem;
}
.btn-google:hover { background: #f8f9fa; color: #3c4043; }
.btn-google svg { width: 18px; height: 18px; }

/* ---- Flash messages ---- */
.flash-area { padding-top: 16px; }
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: .9rem;
  border: 1px solid;
}
.flash-success { background: #e8f5e9; color: #1e6b32; border-color: #c8e6c9; }
.flash-error   { background: #fce8e6; color: #b3261e; border-color: #f4c7c3; }
.flash-info    { background: #e8f0fe; color: #174ea6; border-color: #d2e3fc; }
.flash-warning { background: #fef7e0; color: #8a5a00; border-color: #feefc3; }

/* ---- Article / Detail ---- */
.page-head {
  padding: 32px 0 16px;
  border-bottom: 1px solid var(--c-border-l);
}
.page-head h1 { margin: 0; }
.breadcrumb {
  font-size: .82rem; color: var(--c-text-mute); margin-bottom: 8px;
}
.breadcrumb a { color: var(--c-text-sub); }

/* template detail */
.template-detail {
  display: grid; grid-template-columns: 1fr 320px; gap: 32px;
  padding: 32px 0;
}
@media (max-width: 860px) {
  .template-detail { grid-template-columns: 1fr; }
}
.tpl-meta {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border-l);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky; top: 80px; align-self: start;
}
.tpl-meta dt { font-size: .78rem; color: var(--c-text-mute); margin-bottom: 2px; }
.tpl-meta dd { margin: 0 0 12px; font-size: .9rem; }

/* post detail */
.post-detail .post-body {
  font-size: 1rem; line-height: 1.85; color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border-l);
  border-radius: var(--radius);
  padding: 24px;
}
.post-detail .reply {
  border-left: 3px solid var(--c-border-l);
  padding: 16px 20px;
  margin: 16px 0;
  background: var(--c-bg-soft);
  border-radius: var(--radius-sm);
}
.post-detail .reply.is-admin {
  border-left-color: var(--c-accent);
  background: #f6f9ff;
}
.reply-meta {
  font-size: .8rem; color: var(--c-text-mute);
  margin-bottom: 8px; display: flex; gap: 10px; align-items: center;
}

/* CTA */
.cta-box {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-h));
  color: #fff; padding: 32px;
  border-radius: var(--radius); margin: 32px 0;
}
.cta-box h3 { color: #fff; margin: 0 0 12px; }
.cta-box p { color: rgba(255,255,255,.85); margin: 0 0 16px; }
.cta-box .btn-gold { background: var(--c-gold); }

/* ---- Footer ---- */
.site-footer {
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-border-l);
  margin-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 20px 32px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-col h4 {
  font-size: .85rem; color: var(--c-text-sub);
  margin-bottom: 12px; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: .9rem; color: var(--c-text);
}
.footer-tagline { font-size: .85rem; color: var(--c-text-sub); margin-top: 12px; }
.footer-bottom {
  border-top: 1px solid var(--c-border-l);
  padding: 16px 0; font-size: .8rem; color: var(--c-text-mute);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--c-text-sub); }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .site-nav {
    position: fixed; top: 64px; right: 0;
    background: #fff;
    flex-direction: column; gap: 0;
    border-left: 1px solid var(--c-border-l);
    border-bottom: 1px solid var(--c-border-l);
    width: 240px; padding: 16px;
    transform: translateX(110%); transition: transform var(--transition);
  }
  .site-nav a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: block; }
  body.nav-open .site-nav { transform: translateX(0); }
  .hero { padding: 64px 0 56px; }
  .hero-logo { font-size: 2.2rem; }
  .hero-tagline { font-size: 1.05rem; }
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-sub { color: var(--c-text-sub); }
.text-mute { color: var(--c-text-mute); }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .78rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ---- Pagination ---- */
.pagination {
  display: flex; gap: 4px; justify-content: center; margin: 32px 0;
}
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--c-border-l);
  border-radius: var(--radius-sm); color: var(--c-text); text-decoration: none;
  font-size: .9rem;
}
.pagination a:hover { background: var(--c-bg-soft); }
.pagination .is-current { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

/* ---- Admin ---- */
.admin-dashboard {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 760px) { .admin-dashboard { grid-template-columns: 1fr 1fr; } }
.kpi {
  background: #fff; border: 1px solid var(--c-border-l);
  border-radius: var(--radius); padding: 20px;
}
.kpi-label { font-size: .8rem; color: var(--c-text-sub); margin-bottom: 8px; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--c-accent); }
.kpi.is-alert .kpi-value { color: var(--c-danger); }

.admin-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--c-border-l); border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--c-border-l);
  font-size: .9rem;
}
.admin-table th { background: var(--c-bg-soft); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: 0; }
