/* ============================================================
   style.css — 韓デリ口コミ スマホWebアプリ
   app.kan-deli.net
   ============================================================ */

/* ---- リセット & 基本 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:       #173450;
  --red-dark:  #0f2438;
  --red-light: #e8eef4;
  --gold:      #d4ac0d;
  --bg:        #f5f5f5;
  --surface:   #ffffff;
  --border:    #e0e0e0;
  --text:      #1a1a1a;
  --text-muted:#666;
  --text-hint: #999;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
  --header-h:  52px;
  --nav-h:     60px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- ヘッダー ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--red);
  height: var(--header-h);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 14px;
}
.header-logo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
}
.logo-kr {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .05em;
}
.logo-jp {
  font-size: 12px;
  color: rgba(255,255,255,.8);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border-radius: 50%;
}
.header-icon:hover { background: rgba(255,255,255,.15); }
.icon-post { background: rgba(255,255,255,.2); }
.btn-login-sm {
  font-size: 13px;
  padding: 6px 14px;
  background: #fff;
  color: var(--red);
  border-radius: 20px;
  font-weight: 500;
  text-decoration: none;
}

/* ---- ボトムナビ ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--nav-h);
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  text-decoration: none;
}
.bnav-item svg { opacity: .6; }
.bnav-item.active { color: var(--red); }
.bnav-item.active svg { opacity: 1; stroke: var(--red); }
.bnav-post { color: var(--red); }
.bnav-post svg { opacity: 1; stroke: var(--red); }

/* ---- メインコンテンツ ---- */
.app-main { min-height: calc(100dvh - var(--header-h) - var(--nav-h)); }
.page-container { padding: 12px 14px 24px; max-width: 680px; margin: 0 auto; }

/* ---- ページタイトル ---- */
.page-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--text); }
.clear-filter { font-size: 12px; color: var(--text-muted); }
.count { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-left: 4px; }

/* ---- 検索フォーム ---- */
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  stroke: var(--text-hint);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}
.search-input:focus { outline: none; border-color: var(--red); }
.btn-search {
  height: 40px;
  padding: 0 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

/* ---- 記事カード（一覧） ---- */
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.entry-link {
  display: flex;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}
.entry-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
}
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-body { flex: 1; min-width: 0; }
.entry-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.entry-excerpt { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.entry-comments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- ページネーション ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.pager-btn {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

/* ---- 記事詳細 ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-muted); }
.entry-detail {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.entry-detail-img { width: 100%; max-height: 220px; overflow: hidden; background: #eee; }
.entry-detail-img img { width: 100%; height: 100%; object-fit: cover; }
.entry-detail-title {
  font-size: 17px;
  font-weight: 700;
  padding: 14px 14px 6px;
  line-height: 1.4;
}
.entry-detail-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 14px 12px;
}
.entry-detail-body {
  font-size: 14px;
  line-height: 1.9;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--bg);
  white-space: pre-wrap;
  word-break: break-all;
}
.entry-detail-footer { padding: 0 14px 16px; }
.btn-external {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}

/* ---- コメント ---- */
.comments-section { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.comment-list { display: flex; flex-direction: column; gap: 0; margin: 10px 0; }
.comment-item { padding: 10px 0; border-bottom: 1px solid var(--bg); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.comment-author { font-size: 12px; font-weight: 500; color: var(--red); }
.comment-date { font-size: 11px; color: var(--text-hint); }
.comment-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.comment-form-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bg); }
.form-subtitle { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.comment-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: var(--text);
}
.comment-textarea:focus { outline: none; border-color: var(--red); }
.login-prompt { text-align: center; padding: 10px 0; }

/* ---- 店舗一覧 ---- */
.shop-area-section { margin-bottom: 20px; }
.area-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.shop-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shop-item { border-bottom: 1px solid var(--bg); }
.shop-item:last-child { border-bottom: none; }
.shop-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.shop-link:hover { background: var(--bg); }
.shop-name { font-weight: 400; }

/* ---- 検索ヒント（チップ） ---- */
.search-hint { margin-top: 16px; }
.hint-label { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.shop-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip-more { background: var(--red-light); color: var(--red); border-color: transparent; }

/* ---- 投稿フォーム ---- */
.post-form { display: flex; flex-direction: column; gap: 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--red); }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.post-textarea { resize: vertical; line-height: 1.7; }
.char-count { display: block; text-align: right; font-size: 12px; color: var(--text-hint); margin-top: 4px; }
.post-rules {
  background: var(--red-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.post-rules h3 { font-size: 13px; font-weight: 700; color: var(--red-dark); margin-bottom: 6px; }
.post-rules ul { padding-left: 16px; list-style: disc; }
.post-rules li { font-size: 12px; color: var(--red-dark); line-height: 1.7; }

/* ---- マイページ ---- */
.mypage-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--red);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  color: #fff;
}
.mypage-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.mypage-name { font-size: 16px; font-weight: 700; }
.mypage-email { font-size: 12px; opacity: .8; }
.btn-logout {
  margin-left: auto;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.stats-row { display: flex; gap: 10px; margin-bottom: 20px; }
.stat-box {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { display: block; font-size: 26px; font-weight: 700; color: var(--red); }
.stat-label { font-size: 12px; color: var(--text-muted); }
.mypage-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.my-entry-list { margin-top: 8px; }
.my-entry-item { border-bottom: 1px solid var(--bg); }
.my-entry-item:last-child { border-bottom: none; }
.my-entry-link {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
}
.my-entry-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.my-entry-meta { font-size: 12px; color: var(--text-muted); }
.badge-pending {
  display: inline-block;
  background: #fef9c3;
  color: #854d0e;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ---- 認証ページ ---- */
.auth-page { background: var(--bg); }
.auth-container { max-width: 400px; margin: 0 auto; padding: 40px 16px 60px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo a { text-decoration: none; }
.logo-mark { font-size: 26px; font-weight: 700; color: var(--red); }
.logo-sub { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.auth-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,.1); overflow: hidden; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--bg);
}
.auth-tab.active { color: var(--red); background: var(--surface); border-bottom: 2px solid var(--red); }
.auth-form { padding: 20px 20px 24px; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .form-group label { font-size: 13px; font-weight: 500; margin-bottom: 6px; display: block; }
.auth-form .form-group input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.auth-form .form-group input:focus { outline: none; border-color: var(--red); }
.terms-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 16px; }
.auth-back { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* ---- ボタン ---- */
.btn-primary {
  display: inline-block;
  padding: 13px 24px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  -webkit-appearance: none;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-full { width: 100%; display: block; }
.btn-outline {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 14px;
  background: transparent;
  text-decoration: none;
}

/* ---- アラート ---- */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f8f5; color: #1e8449; border: 1px solid #a9dfbf; }

/* ---- ヒント・空状態 ---- */
.hint { font-size: 11px; font-weight: 400; color: var(--text-hint); }
.required { font-size: 11px; font-weight: 400; color: var(--red); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.empty-state-sm { font-size: 14px; color: var(--text-muted); padding: 12px 0; }
