:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --card:#ffffff;
  --primary:#2563eb;
  --primary-2:#1d4ed8;
  --danger-bg:#fee2e2;
  --danger:#991b1b;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{ color:var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width:980px;
  margin:0 auto;
  padding:16px;
}

/* ====== Header (両方のHTML構造に対応) ====== */
header,
.header{
  border-bottom:1px solid var(--border);
  background:#fff;
  position:sticky;
  top:0;
  z-index:10;
}

.nav,
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand,
.logo{
  font-size:22px;
  font-weight:700;
  margin:0;
}

.brand a,
.logo a{ color:inherit; }

.navlinks,
.header .nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}

.navlinks a,
.header .nav a{
  padding:8px 10px;
  border-radius:999px;
}

.navlinks a.active,
.header .nav a.active{
  background:#e8f0ff;
}

/* ====== Forms / Buttons (class無しbuttonも綺麗に) ====== */
button,
input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--primary);
  color:#fff;
  font-weight:600;
  cursor:pointer;
}
button:hover,
input[type="submit"]:hover{ background:var(--primary-2); }
button:disabled{ opacity:.6; cursor:not-allowed; }

button.secondary{
  background:#fff;
  color:var(--text);
}
button.secondary:hover{ background:#f1f5f9; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--primary);
  color:#fff;
  font-weight:600;
  cursor:pointer;
}
.btn:hover{ background:var(--primary-2); text-decoration:none; }
.btn:disabled{ opacity:.6; cursor:not-allowed; }
.btn.secondary{
  background:#fff;
  color:var(--text);
}
.btn.secondary:hover{
  background:#f1f5f9;
}

/* ====== Base blocks ====== */
main{ padding:18px 0; }

.card{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:16px;
  padding:16px;
  margin:12px 0;
}

.muted{ color:var(--muted); }

.error{
  border:1px solid #fca5a5;
  background:var(--danger-bg);
  color:var(--danger);
  border-radius:16px;
  padding:14px;
  margin:12px 0;
}

.meta{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 0; }
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:13px;
  background:#f8fafc;
}

.rows{ margin-top:10px; }
.row{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap:10px;
  padding:8px 0;
  border-top:1px dashed var(--border);
}
.row:first-child{ border-top:none; }
.k{ color:var(--muted); font-size:13px; }
.v{ font-size:14px; }

.section{ margin-top:14px; }
.section h3{ margin:0 0 8px 0; }

/* ====== Top page hero / headings ====== */
.hero{
  padding:10px 0 0;
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
}
.link{ color:var(--primary); }

/* ====== Searchbar ====== */
.searchbar{
  display:flex;
  gap:10px;
  align-items:center;
}
.searchbar input{
  flex:1;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  font-size:16px;
}

/* ====== Jobs list layout (sidebar) ====== */
.layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:16px;
  align-items:start;
}
.sidebar{
  position:sticky;
  top:74px;
}
.filter{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  padding:10px 12px;
}
.filter summary{
  cursor:pointer;
  font-weight:700;
}
.form{ margin-top:10px; }
.field{ margin:10px 0; }
.field label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}
.field input,
.field select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
}

.actions{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}

/* ====== ★Account page: filters grid ====== */
.filters{
  display:grid;
  gap:12px;
  grid-template-columns: 1fr 1fr;
  margin-top:10px;
}
.filters label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}
.filters input,
.filters select,
.filters textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  font-size:14px;
  background:#fff;
}
.filters input:focus,
.filters select:focus,
.filters textarea:focus{
  outline:2px solid rgba(37,99,235,.15);
  border-color: rgba(37,99,235,.35);
}

/* ====== a11y ====== */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ====== Header auth display ====== */
.nav-user{
  color: var(--muted);
  font-size: 12px;
  padding: 0 6px;
  white-space: nowrap;
}
.nav-logout{
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
}

/* ====== Favorites ====== */
.fav-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
}
.btn.fav-btn{
  background:#fff;
  color:var(--text);
}
.btn.fav-btn:hover{
  background:#f1f5f9;
}
.btn.fav-btn.is-fav{
  background:#fff7ed;
  border-color:#fdba74;
  color:#9a3412;
}
.fav-hint{
  color: var(--muted);
  font-size: 12px;
}

/* ====== PR ====== */
.pr-section-title{
  margin: 16px 0 6px 0;
  font-size: 14px;
  color: var(--muted);
}
.pr-badge{
  display:inline-block;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff7ed;
  color:#9a3412;
  margin-bottom:6px;
}
.pr-plan{
  display:inline-block;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f3f4f6;
  color:var(--text);
  margin-left:6px;
}

/* ====== Company ====== */
.company-header{
  display:flex;
  gap:14px;
  align-items:center;
}
.company-logo-wrap{
  width:140px;
  height:80px;
  border:1px solid var(--border);
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  overflow:hidden;
}
.company-logo{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

/* ====== LINE follow (位置＆見た目を安定化) ====== */
.line-follow{
  margin: 24px auto;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 16px;
  background: #fff;
  max-width: 980px;
}
.line-follow__box{
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.line-follow__btn{
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  background: #06c755;
  color: #fff;
}
.line-follow__btn:hover{ filter: brightness(0.95); }
.line-follow__qr{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.line-follow__qr img{
  width:160px;
  height:160px;
  object-fit:contain;
  display:block;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  padding:10px;
}

/* ====== Responsive ====== */
@media (max-width: 820px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position:static; top:auto; }
}
@media (max-width: 640px){
  .filters{ grid-template-columns: 1fr; }
  .row{ grid-template-columns: 1fr; }
}
