@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --bg:       #e8e8e8;
  --bg2:      #f4f4f4;
  --bg3:      #dcdcdc;
  --border:   #b8b8b8;
  --fg:       #111111;
  --muted:    #666666;
  --accent:   #cc4400;
  --accent2:  #cc6600;
  --danger:   #cc0000;
  --success:  #006600;
  --info:     #0044cc;
  --radius:   6px;
  --shadow:   0 1px 4px rgba(0,0,0,.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

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

img { max-width: 100%; border-radius: var(--radius); }

/* ========== Header ========== */
.header {
  background: var(--bg2);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  font-size: 17px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--fg); font-weight: 400; font-size: 13px; }
.header-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.header-nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: all .2s;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--fg);
  background: var(--bg3);
  text-decoration: none;
}

/* ========== Layout ========== */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== Card ========== */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ========== 投稿カード ========== */
.post {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  animation: fadeIn .3s ease;
}
.post:last-child { margin-bottom: 0; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.post-handle {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
}
.post-time {
  font-size: 11px;
  color: var(--muted);
}
.post-body {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-img {
  margin-top: 10px;
}
.post-img img {
  max-height: 280px;
  object-fit: cover;
  width: 100%;
}

/* ========== カテゴリバッジ ========== */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
}
.badge-resident  { background: #d4edda; color: #155724; border:1px solid #c3e6cb; }
.badge-owner     { background: #f8d7da; color: #721c24; border:1px solid #f5c6cb; }
.badge-opening   { background: #cce5ff; color: #004085; border:1px solid #b8daff; }
.badge-property  { background: #fff3cd; color: #856404; border:1px solid #ffeeba; }
.badge-pending   { background: #fff3cd; color: #856404; border:1px solid #ffeeba; }
.badge-approved  { background: #d4edda; color: #155724; border:1px solid #c3e6cb; }
.badge-rejected  { background: #f8d7da; color: #721c24; border:1px solid #f5c6cb; }

/* ========== リアクション ========== */
.react-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.react-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.react-btn:hover { border-color: var(--accent); color: var(--accent); }
.react-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.react-counts {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ========== コメント ========== */
.comments-section { margin-top: 12px; }
.comments-title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.comment {
  border-left: 3px solid var(--border);
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #ebebeb;
  border-radius: 0 6px 6px 0;
}
.comment-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.comment-body {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.no-comment {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
}

/* ========== フォーム ========== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-label .req {
  color: var(--accent);
  margin-left: 4px;
}
textarea,
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
  -webkit-appearance: none;
}
textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: #ffffff; }

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.form-error {
  background: #f8d7da;
  border: 1px solid var(--danger);
  color: #721c24;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}
.form-success {
  background: #d4edda;
  border: 1px solid var(--success);
  color: #155724;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}

/* ========== ボタン ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--fg);
  transition: all .2s;
  text-decoration: none;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* ========== コメント入力欄 ========== */
.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.comment-form input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}
.comment-form button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ========== フィルターバー ========== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ========== ランキングカード ========== */
.prop-list { display: flex; flex-direction: column; gap: 10px; }
.prop-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color .2s;
  text-decoration: none;
  color: var(--fg);
}
.prop-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.prop-rank {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  min-width: 36px;
  text-align: center;
  line-height: 1;
  padding-top: 4px;
}
.prop-rank.top3 { color: #facc15; }
.prop-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg3);
}
.prop-info { flex: 1; min-width: 0; }
.prop-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.prop-room {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.prop-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.prop-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
}
.prop-price span { font-size: 12px; font-weight: 400; color: var(--muted); }
.prop-rating { color: #facc15; font-size: 13px; }
.prop-type-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ========== 星評価 ========== */
.stars { color: #facc15; letter-spacing: 1px; }
.stars-gray { color: var(--border); }

/* ========== 管理画面 ========== */
.admin-header {
  background: #fff0e0;
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}
.admin-nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all .2s;
}
.admin-nav a:hover,
.admin-nav a.active {
  color: var(--fg);
  background: var(--bg3);
  text-decoration: none;
}
.admin-nav .admin-title {
  font-weight: 900;
  color: var(--accent);
  margin-right: 8px;
  font-size: 15px;
}
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== テーブル ========== */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.tbl th {
  background: #e0e0e0;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.tbl tr:hover td { background: #ececec; }

/* ========== タブ ========== */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.tab:hover { color: var(--fg); text-decoration: none; }
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}
.tab .cnt {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 4px;
}

/* ========== トークン表示 ========== */
.token-box {
  background: var(--bg3);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin: 16px 0;
}
.token-url {
  font-size: 12px;
  word-break: break-all;
  color: var(--accent2);
  margin: 8px 0;
  font-family: monospace;
}
.token-warn {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

/* ========== PIN表示ボックス ========== */
.pin-box {
  background: #fff8f0;
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  margin: 0 0 8px;
}
.pin-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pin-number {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 16px;
  line-height: 1;
  font-family: monospace;
  margin: 8px 0;
}
.pin-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* ========== 物件詳細 ========== */
.prop-detail-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.prop-detail-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.prop-detail-price span { font-size: 14px; font-weight: 400; color: var(--muted); }
.prop-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.prop-tag {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

/* ========== レビューカード ========== */
.review-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg2);
  margin-bottom: 10px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.review-rating { font-size: 18px; }
.review-body {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ========== ページヒーロー ========== */
.hero {
  background: linear-gradient(135deg, #fff0e6 0%, #f4f4f4 100%);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.hero-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--fg);
  margin-bottom: 6px;
}
.hero-title em {
  color: var(--accent);
  font-style: normal;
}
.hero-sub {
  font-size: 13px;
  color: var(--muted);
}

/* ========== 空状態 ========== */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ========== フッター ========== */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }

/* ========== ユーティリティ ========== */
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm     { font-size: 12px; }
.text-bold   { font-weight: 700; }
.mt4  { margin-top: 4px; }
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.flex-center { display: flex; align-items: center; gap: 8px; }

/* ========== レスポンシブ ========== */
@media (max-width: 600px) {
  .header-inner { padding: 0 12px; }
  .logo span    { display: none; }
  .wrap         { padding: 10px; }
  .prop-card    { flex-wrap: wrap; }
  .prop-img     { width: 100%; height: 140px; }
  .prop-rank    { font-size: 18px; min-width: 28px; }
  .admin-wrap   { padding: 10px; }
  .comment-form { flex-direction: column; }
}
