/* ===== CSS変数 ===== */
:root {
  --green-900: #0d2b1f;
  --green-700: #1a4731;
  --green-500: #1e8a5e;
  --green-400: #25a870;
  --green-100: #e6f7f0;
  --green-50:  #f0faf5;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 24px rgba(30,138,94,0.14), 0 2px 8px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== リセット & ベース ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background: #f0f2f5;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30,138,94,0.08) 0%, transparent 70%);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ===== ヘッダー ===== */
.header {
  background: rgba(13, 43, 31, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  padding: 0 32px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.05);
}

.header-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.2);
}

.header-logo-text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}

.header-username {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

.btn-logout {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.75);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
}

/* ===== メインビジュアル（ヒーロー） ===== */
.hero {
  background:
    linear-gradient(135deg, rgba(10,28,18,0.88) 0%, rgba(13,55,35,0.80) 100%),
    url('logo.jpg') center/cover no-repeat;
  background-color: var(--green-900);
  color: var(--white);
  padding: 56px 32px 52px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 14px;
}

.hero-slogan {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 36px;
  max-width: 720px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-store {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  backdrop-filter: blur(8px);
  min-width: 160px;
  transition: background var(--transition), border-color var(--transition);
}
.hero-store:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

.hero-store-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}

.hero-store-slogan {
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ===== メイン ===== */
.main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  flex: 1;
  width: 100%;
}

/* ===== セクション ===== */
.section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.section-title-icon {
  font-size: 16px;
}

/* ===== 新着情報 ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  font-size: 14px;
  transition: background var(--transition);
}
.news-item:hover { background: var(--green-50); }

.news-date {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 76px;
  font-variant-numeric: tabular-nums;
}

.news-category {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.cat-important { background: #fff0f0; color: #dc2626; border: 1px solid #fecaca; }
.cat-info      { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.news-text {
  flex: 1;
  line-height: 1.55;
  color: var(--gray-700);
  font-size: 13.5px;
}

/* ===== 新着物件 ===== */
.property-stores {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.property-store-section {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.property-store-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-50);
  padding: 10px 16px;
  border-bottom: 1px solid var(--green-100);
  letter-spacing: 0.04em;
}

.property-sheet-wrap {
  width: 100%;
  height: 500px;
}

.property-sheet-embed {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== クイックリンク ===== */
.pinned-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}

.btn-pinned {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-400) 100%);
  color: var(--white);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 2px 10px rgba(30,138,94,0.3);
  letter-spacing: 0.01em;
}
.btn-pinned:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30,138,94,0.38);
  filter: brightness(1.05);
}
.btn-pinned:active { transform: translateY(0); }

.btn-pinned.disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  box-shadow: none;
  pointer-events: none;
}

/* リンクグループ */
.link-group {
  margin-bottom: 26px;
}
.link-group:last-child { margin-bottom: 0; }

.link-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.link-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-100);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.link-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green-400);
  opacity: 0;
  transition: opacity var(--transition);
}
.link-card:hover {
  background: var(--white);
  border-color: var(--green-100);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.link-card:hover::before { opacity: 1; }

.link-card-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.3;
}

.link-card-desc {
  font-size: 11.5px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ===== 新着情報ヘッダー（タイトル＋投稿ボタン） ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header .section-title {
  margin-bottom: 0;
}

.news-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.news-tab {
  background: none;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
}
.news-tab.active {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.btn-post {
  background: var(--green-500);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-post:hover {
  background: var(--green-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,138,94,0.3);
}

/* ===== 新着情報 追加カテゴリ ===== */
.cat-tool     { background: #f3e8ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.cat-event    { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.cat-property { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ===== 新着情報 その他 ===== */
.news-loading,
.news-empty {
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
  padding: 24px 0;
}

.news-item-clickable {
  cursor: pointer;
}
.news-item-clickable:hover {
  background: var(--green-50);
  border-color: var(--green-100);
}

.news-arrow {
  color: var(--gray-300);
  font-size: 18px;
  margin-left: auto;
  flex-shrink: 0;
}

.news-load-more {
  text-align: center;
  margin-top: 12px;
}
.btn-load-more {
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-500);
  padding: 8px 28px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-load-more:hover {
  border-color: var(--green-400);
  color: var(--green-500);
}

/* ===== 詳細モーダル ===== */
.modal-detail {
  max-width: 600px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-target {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.detail-body {
  padding: 16px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-date {
  font-size: 12px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
}

.detail-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.8;
  white-space: pre-wrap;
}

.detail-image {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  max-height: 320px;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-500);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--green-100);
  border-radius: var(--radius-sm);
  background: var(--green-50);
  transition: all var(--transition);
  align-self: flex-start;
}
.detail-link:hover {
  background: var(--green-100);
  border-color: var(--green-400);
}

.detail-draft-actions {
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-edit {
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-edit:hover {
  border-color: var(--gray-500);
  background: var(--gray-50);
}

.btn-publish {
  background: var(--green-500);
  border: none;
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-publish:hover { background: var(--green-400); }
.btn-publish:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== モーダル（共通） ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(16px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.modal-form {
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-required { color: #dc2626; margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(30,138,94,0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

.btn-cancel {
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-500);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-cancel:hover {
  border-color: var(--gray-500);
  color: var(--gray-700);
}

.btn-submit {
  background: var(--green-500);
  border: none;
  color: var(--white);
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-submit:hover { background: var(--green-400); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== フッター ===== */
.footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 18px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .hero { padding: 36px 20px 32px; }
  .hero-slogan { font-size: 24px; }
  .hero-stores { gap: 8px; }
  .hero-store { min-width: 140px; }
  .main { padding: 20px 16px 48px; }
  .section { padding: 20px; }
  .link-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .header-username { display: none; }
  .link-grid { grid-template-columns: 1fr; }
  .news-item { flex-wrap: wrap; gap: 8px; }
}
