/* =============================
   基本レイアウト
============================= */
html {
  overflow-y: scroll;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 5px solid #3B83ED;
  gap: 40px;
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1000;
}

.logo {
  width: 140px;
  height: auto;
}

.search-bar {
  flex-grow: 1;
}

#searchInput {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background-color: #fff;
  color: #000;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#searchInput:hover,
#searchInput:focus {
  border: 1px solid #ccc;
  background-color: #fff;
  outline: none;
  box-shadow: none;
}

#searchInput:-webkit-autofill,
#searchInput:-webkit-autofill:hover,
#searchInput:-webkit-autofill:focus,
#searchInput:-internal-autofill-selected {
  background-color: #fff !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #000 !important;
}

input:-moz-autofill {
  background-color: #fff !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  color: #000 !important;
}

.main-area {
  flex: 1;
}

.container {
  display: flex;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 40px;
  gap: 40px;
}

.content {
  flex: 3;
  border-right: 1px solid #ccc;
  padding-right: 40px;
}

.sidebar {
  flex: 1;
}

.ad-placeholder {
  background-color: #f1f1f1;
  padding: 20px;
  text-align: center;
  border: 1px solid #ccc;
}

/* =============================
   検索結果の件数タイトルサイズ調整
============================= */
.main-area main.content h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #222;
}

/* =============================
   検索結果
============================= */
.search-result {
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.favicon {
  width: 16px;
  height: 16px;
}

.result-meta .site-name {
  font-weight: bold;
  font-size: 13px;
}

.result-meta .url {
  font-size: 12px;
  color: #666;
}

.search-result h3 {
  margin: 2px 0;
  font-size: 18px;
  font-weight: 400;
}

.search-result a {
  color: #3B83ED;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
}

.search-result a:hover {
  text-decoration: underline;
}

.search-result a:visited {
  color: #0E479C;
}

.search-result p {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* =============================
   通常文章
============================= */
p {
  font-size: 14px;
  font-weight: 400;
  color: #555;
  line-height: 1.6;
}

/* =============================
   ページネーション
============================= */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 30px 0;
  font-size: 14px;
}

.pagination a {
  display: inline-block;
  padding: 6px 12px;
  color: #3B83ED;
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.pagination a.active {
  background-color: #CCCCCC;
  color: #fff;
  cursor: default;
}

.pagination a:hover {
  cursor: pointer;
}

.pagination span {
  display: inline-block;
  padding: 6px 12px;
  color: #aaa;
  font-weight: 500;
  cursor: default;
}

/* =============================
   フッター（PC）
============================= */
.site-footer {
  background-color: #F7F7F7;
  padding: 0;
  font-size: 13px;
  color: #666;
  border-top: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.footer-left a {
  color: #3B83ED;
  text-decoration: none;
  margin: 0 6px;
  white-space: nowrap;
}

.footer-left a:hover {
  text-decoration: underline;
}

.divider {
  margin: 0 6px;
  color: #aaa;
}

.footer-right a {
  color: #3B83ED;
  text-decoration: none;
}

.footer-right a:hover {
  text-decoration: underline;
}

.footer-bottom {
  background-color: #3B83ED;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 35px;
  padding: 0 20px;
  font-size: 13px;
}

.footer-h1 {
  text-align: left;
}

.footer-copy {
  text-align: right;
}

/* =============================
   レスポンシブ対応（スマホ）
============================= */
@media screen and (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
  }

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

  .search-bar {
    width: 90%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #searchInput {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #000;
    outline: none;
    box-shadow: none;
  }

  .container {
    flex-direction: column;
    padding: 0 20px;
  }

  .content {
    border-right: none;
    padding-right: 0;
  }

  .sidebar {
    margin-top: 40px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    gap: 5px;
  }

  .footer-left {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-left a {
    margin-right: 12px;
    white-space: nowrap;
  }

  .footer-right {
    text-align: center;
    margin-top: 5px;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 20px;
    gap: 5px;
    text-align: left;
  }

  .footer-h1 {
    text-align: left;
    width: 100%;
  }

  .footer-copy {
    text-align: center;
    width: 100%;
  }
}

/* =============================
   ログイン（編集エリア内にはレイアウトCSSを当てない）
============================= */
.main-editable {
  min-height: 380px;
}

/* =============================
   ログインフォームの装飾はOK
============================= */
.login-form {
  background: #fff;
  padding: 40px 32px 32px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  min-width: 320px;
  max-width: 400px;
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.login-form label {
  font-size: 16px;
  color: #222;
  margin-bottom: 8px;
  font-weight: bold;
}
.login-form input[type="password"] {
  width: 100%;
  font-size: 20px;
  padding: 14px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  letter-spacing: 0.15em;
  background: #fafbff;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.form-group-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.form-group-remember label {
  font-weight: normal;
  font-size: 14px;
  margin-bottom: 0;
}
.login-btn {
  width: 100%;
  padding: 13px 0;
  background: #3B83ED;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.login-btn:hover {
  background: #1d63c2;
}

/* =============================
   ダッシュボード タブ（ズレ解消！）
============================= */
.dashboard-tabs {
  display: flex;
  gap: 0;
  margin-top: 30px; /* ここだけ追加 */
  margin-bottom: 30px;
  border-bottom: 1.5px solid #ddd;
  align-items: flex-end;
}

.dashboard-tabs .tab {
  background: #f1f1f1;
  color: #222;
  border-radius: 5px 5px 0 0;
  padding: 8px 30px;
  text-decoration: none;
  font-size: 15px;
  border-top: 2px solid transparent;
  border-left: 1.5px solid #ccc;
  border-right: 1.5px solid #ccc;
  border-bottom: 1.5px solid transparent;
  margin-right: 4px;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
  outline: none;
  position: relative;
  top: 0;
  font-weight: normal;
  z-index: 1;
  box-sizing: border-box;
}

.dashboard-tabs .tab.active,
.dashboard-tabs .tab:focus,
.dashboard-tabs .tab:hover {
  background: #fff;
  color: #1976d2;
  border-top: 2px solid #3B83ED;
  border-bottom: 1.5px solid #fff;
  z-index: 2;
}

/* フォーム */
.dashboard-form {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 32px 30px 24px 30px;
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(90, 110, 150, 0.03);
  align-items: flex-start;
}

/* 通常1行入力 */
.dashboard-form .form-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 0px;
  width: 100%;
  justify-content: flex-start;
}
.dashboard-form .form-row label {
  min-width: 160px;
  font-size: 15px;
  color: #222;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-align: left;
}
.dashboard-form .form-row input[type="text"],
.dashboard-form .form-row input[type="email"] {
  flex: 1;
  font-size: 15px;
  padding: 7px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s;
}
.dashboard-form .form-row input:focus {
  border-color: #3B83ED;
  outline: none;
}
.dashboard-form .form-row .crawler-btn {
  background: #3B83ED;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 22px;
  font-size: 15px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 4px;
  transition: background 0.15s;
}
.dashboard-form .form-row .crawler-btn:hover {
  background: #1d63c2;
}

/* 入力欄の下に左寄せボタン（input-area） */
.dashboard-form .input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.dashboard-form .input-area input[type="password"] {
  width: 100%;
  font-size: 15px;
  padding: 7px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  margin-bottom: 12px;
  box-sizing: border-box;
}

/* 保存ボタン */
.save-btn {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 40px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  margin: 0;
  display: inline-block;
  transition: background 0.15s;
  letter-spacing: 0.04em;
  text-align: left;
  margin-left: 180px;
  margin-top: 10px;
}
.save-btn:hover {
  background: #3B83ED;
  color: #fff;
}

/* 2カラム・テキストエリア用 */
.dashboard-form .form-row-textarea {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  width: 100%;
  margin-bottom: 0px;
}
.dashboard-form .form-row-textarea label {
  min-width: 160px;
  font-size: 15px;
  color: #222;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-align: left;
  margin-top: 6px;
  line-height: 1.6;
}
.dashboard-form .form-row-textarea .input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;  /* ボタンも左揃え */
  gap: 0;
}
.dashboard-form .form-row-textarea .input-area textarea {
  width: 100%;
  font-size: 15px;
  font-family: inherit;
  padding: 9px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  margin-top: 2px;
  resize: vertical;
  line-height: 1.6;
  color: #222;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.dashboard-form .form-row-textarea .input-area textarea[style*="background"] {
  background: #fafafa !important;
  color: #444 !important;
}

/* ボタン（青・黒） */
.dashboard-form .form-row-textarea .input-area .blue-btn,
.dashboard-form .form-row-textarea .input-area .black-btn {
  min-width: 120px;
  font-size: 15px;
  padding: 9px 28px;
  display: inline-block;
  align-self: flex-start; /* ←左下にボタン */
  margin: 0;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.dashboard-form .form-row-textarea .input-area .blue-btn {
  background: #3B83ED;
  color: #fff;
}
.dashboard-form .form-row-textarea .input-area .blue-btn:hover {
  background: #1d63c2;
}
.dashboard-form .form-row-textarea .input-area .black-btn {
  background: #222;
  color: #fff;
}
.dashboard-form .form-row-textarea .input-area .black-btn:hover {
  background: #3B83ED;
  color: #fff;
}

/* デザイン編集 */
/* --- dash_design.html専用追加 --- */

.logo-area {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo-sample {
  font-size: 2.1rem;
  font-weight: bold;
  font-family: Arial,sans-serif;
  display: inline-block;
}
.auto-color {
  color: #2494F5;
}
.moccii-color {
  color: #222;
  font-style: italic;
}

.color-group .color-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row.mini,
.color-area .form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
label.mini {
  min-width: 120px;
  font-size: 14px;
  font-weight: 400;
}
.color-input {
  max-width: 120px;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: #222;
}
.gray-btn {
  background: #888;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 14px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  margin: 0;
  display: inline-block;
  transition: background 0.15s;
}
.gray-btn:hover {
  background: #333;
  color: #fff;
}
.small-btn {
  font-size: 14px;
  padding: 5px 18px;
  margin-left: 0;
}

/* 広告管理 */
.form-row-textarea .input-area .row-btn {
  min-width: 120px;
  font-size: 15px;
  padding: 9px 28px;
  display: inline-block;
  align-self: flex-start;
  margin: 0;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.save-btn {
  margin-top: 18px;
  padding: 9px 32px;
  font-size: 15px;
}

/* ログアウトボタン */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-title {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: #222;
  margin: 0;
}
.logout-btn {
  background: #bbb;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 28px;
  font-size: 15px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 16px;
  transition: background 0.15s;
}
.logout-btn:hover {
  background: #ff5151;
  color: #fff;
}

/* 汎用：クリックできるものは全部ポインタ */
button,
input[type="submit"],
input[type="button"],
input[type="file"],
label[for],
a,
.logo-link,
.dashboard-tabs .tab,
.menu-item,
.pointer,
select
{
  cursor: pointer;
}
