/* ===== Urara（ウララ） デザイン ===== */
:root {
  --bg: #fff7f7;
  --bg-grad: #fdf0f5;
  --card: #ffffff;
  --text: #3e3442;
  --muted: #8a7d8f;
  --line: #f3e3e8;
  --coral: #d9536a;        /* ボタンなど（白文字でも読みやすい濃さ） */
  --coral-soft: #ffe3e7;
  --coral-light: #ff9aa8;
  --lavender: #7b5fc7;
  --lavender-soft: #efe9ff;
  --lavender-light: #c7b6f2;
  --good: #3f9e7a;
  --good-soft: #e3f5ee;
  --normal: #b08a2e;
  --normal-soft: #fbf3dc;
  --bad: #d14b5c;
  --bad-soft: #fde6e9;
  --radius: 18px;
  --shadow: 0 2px 10px rgba(217, 83, 106, 0.07);
  --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-grad) 0%, var(--bg) 320px);
  background-color: var(--bg);
  min-height: 100vh;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.has-fixed-ad { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
a { color: var(--coral); }
img { max-width: 100%; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 250, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { text-decoration: none; color: var(--coral); font-weight: 800; font-size: 24px; letter-spacing: 0.04em; display: flex; align-items: baseline; gap: 4px; }
.logo-mark { color: var(--lavender-light); font-size: 20px; }
.logo-kana { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 4px; letter-spacing: 0.1em; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: none; border-radius: 999px; padding: 10px 20px;
  font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: transform .1s, box-shadow .2s, background .2s;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 3px 10px rgba(217, 83, 106, 0.25); }
.btn-primary:hover { background: #c94860; }
.btn-primary:disabled { background: #e6a9b4; box-shadow: none; cursor: default; }
.btn-ghost { background: #fff; color: var(--coral); border: 1.5px solid var(--coral-soft); }
.btn-small { padding: 6px 14px; min-height: 36px; font-size: 13px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--lavender); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 4px; }

/* カード */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 16px; margin: 12px 0; }
.center-card { text-align: center; padding: 28px 16px; }
.big-emoji { font-size: 40px; margin: 0; }

/* トップ */
.hero { padding: 18px 0 6px; text-align: center; }
.hero-copy { margin: 0 0 12px; font-weight: 700; color: var(--text); font-size: 15px; }
.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px;
  font: inherit; font-size: 16px; background: #fff; color: var(--text); outline: none;
}
.search input:focus { border-color: var(--coral-light); box-shadow: 0 0 0 3px var(--coral-soft); }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.tab.active { background: var(--coral); border-color: var(--coral); color: #fff; }

.sort-row { display: flex; gap: 6px; justify-content: flex-end; margin: 6px 0 0; }
.sort { font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.sort.active { background: var(--lavender-soft); color: var(--lavender); }

.thread-card { display: block; text-decoration: none; color: inherit; transition: transform .1s; }
.thread-card:active { transform: scale(0.99); }
.thread-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-title { font-size: 17px; margin: 6px 0 0; line-height: 1.5; }
.thread-domain { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.thread-meta { margin-top: 8px; }
.count-badge { font-size: 12px; font-weight: 700; color: var(--lavender); background: var(--lavender-soft); padding: 3px 10px; border-radius: 999px; }

.cat-label { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--coral-soft); color: #b8394f; }
.cat-deai { background: #e6f0ff; color: #3b62b0; }
.cat-mailfriend { background: #e5f6f1; color: #2d7f66; }
.cat-uranai { background: var(--lavender-soft); color: var(--lavender); }
.cat-other { background: #f1eeee; color: #6e6366; }

/* 評価バー */
.rating-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #f4eef0; }
.rating-bar.big { height: 14px; }
.seg-good { background: #7fcfac; }
.seg-normal { background: #f1d27d; }
.seg-bad { background: #f39aa6; }
.rating-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; margin-top: 4px; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.lg-good::before { background: #7fcfac; }
.lg-normal::before { background: #f1d27d; }
.lg-bad::before { background: #f39aa6; }
.rating-empty { font-size: 12px; color: var(--muted); }

.pager { display: flex; justify-content: space-between; margin: 16px 0; }

/* スレッド */
.breadcrumb { margin: 12px 2px 0; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.page-title { font-size: 21px; margin: 8px 0 2px; line-height: 1.45; }
.summary { background: #fffafb; border-radius: 14px; padding: 12px; margin: 8px 0 12px; border: 1px dashed var(--line); }
.summary-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.head-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-link { font-size: 11px; color: var(--muted); }

.post { padding: 14px 16px 10px; scroll-margin-top: 70px; }
.post.highlight { box-shadow: 0 0 0 3px var(--coral-light); }
.post-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.res-no {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 999px; background: var(--coral-soft); color: #b8394f; font-weight: 800; font-size: 13px;
}
.post-name { font-weight: 700; color: var(--good); font-size: 14px; }
.gender { font-size: 12px; color: var(--muted); }
.post-sub { margin: 2px 0 6px; }
.post-body { font-size: 15px; line-height: 1.85; padding: 2px 0 8px; }
.post.deleted { background: #fbf8f8; box-shadow: none; }
.anchor { font-weight: 700; color: var(--lavender); text-decoration: none; background: var(--lavender-soft); border-radius: 6px; padding: 0 4px; }

.rate-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.rate-good { background: var(--good-soft); color: var(--good); }
.rate-normal { background: var(--normal-soft); color: var(--normal); }
.rate-bad { background: var(--bad-soft); color: var(--bad); }

/* ＋／－ */
.vote { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; }
.pill {
  flex: none; border-radius: 999px; border: 1.5px solid; background: #fff; font: inherit; font-size: 13px; font-weight: 800;
  padding: 4px 14px; min-height: 34px; cursor: pointer; transition: transform .1s, background .2s;
}
.pill:active { transform: scale(0.94); }
.pill-plus { border-color: var(--coral-light); color: var(--coral); }
.pill-minus { border-color: var(--lavender-light); color: var(--lavender); }
.pill-plus.voted { background: var(--coral); border-color: var(--coral); color: #fff; }
.pill-minus.voted { background: var(--lavender); border-color: var(--lavender); color: #fff; }
.pill:disabled { cursor: default; }
.pill:disabled:not(.voted) { opacity: 0.55; }
.vote-bar { flex: 1; display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #f4eef0; }
.vote-fill { background: var(--coral-light); transition: width .3s; }
.vote-minus { background: var(--lavender-light); transition: width .3s; }
.post-actions { display: flex; justify-content: space-between; align-items: center; }

/* フォーム */
.section-title { font-size: 17px; margin: 0 0 10px; }
.form-card { margin-top: 20px; }
.form-row { margin-bottom: 12px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: block; font-weight: 700; font-size: 13px; }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], select, textarea {
  display: block; width: 100%; margin-top: 4px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: #fff; outline: none;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--coral-light); box-shadow: 0 0 0 3px var(--coral-soft); }
.req, .opt { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.req { background: var(--coral); color: #fff; }
.opt { background: #f1eeee; color: var(--muted); }
.counter { text-align: right; }
.agree { text-align: center; margin: 4px 0 8px; }
.form-msg { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--bad); text-align: center; min-height: 1em; }
.form-msg.ok { color: var(--good); }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; margin: 4px 0 0; }
.notice { background: var(--coral-soft); color: #9c3346; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.notice a { font-weight: 700; }
.radio-cards { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 6px; }
.radio-cards label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 700; cursor: pointer; background: #fff; }
.radio-cards input { accent-color: var(--coral); width: 18px; height: 18px; margin: 0; }
.radio-cards label:has(input:checked) { border-color: var(--coral-light); background: #fff7f8; }

/* ポップアップ（>>アンカー） */
.popup {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 560px; max-height: 50vh; overflow-y: auto; z-index: 40;
  background: #fff; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(62, 52, 66, 0.22); border: 1.5px solid var(--lavender-light);
  padding: 12px 14px; font-size: 14px;
}
.popup .post-body { font-size: 14px; }
.popup-foot { display: flex; justify-content: space-between; margin-top: 6px; }

/* 文章ページ */
.doc h1 { font-size: 20px; }
.doc h2 { font-size: 15px; margin: 20px 0 6px; color: var(--coral); }
.doc p, .doc li { font-size: 14px; }
.doc ol { padding-left: 1.4em; }

/* 管理 */
.admin-only { background: var(--bad); color: #fff; border: none; border-radius: 999px; font: inherit; font-size: 11px; font-weight: 700; padding: 4px 10px; cursor: pointer; }
.admin-bar { position: fixed; top: 64px; right: 10px; z-index: 30; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.admin-item { border-left: 4px solid var(--coral-light); }
.admin-item .quote { background: #faf6f7; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 6px 0; white-space: pre-wrap; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* 広告枠 */
.ad-inline { margin: 16px 0; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ad-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.ad-fixed {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; min-height: 60px;
  padding: 5px 0 calc(5px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.ad-fixed .ad-label { display: none; }
.ad-placeholder span { font-size: 11px; color: #c9b9bf; letter-spacing: 0.1em; }
.ad-inline.ad-placeholder { border: 1.5px dashed #ead8de; border-radius: var(--radius); }
.ad-fixed.ad-placeholder { border-top: 1.5px dashed #ead8de; }

/* フッター */
.site-footer { text-align: center; padding: 28px 14px 20px; color: var(--muted); font-size: 12px; }
.footer-nav { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); }
.copyright { margin: 8px 0 0; }

@media (min-width: 720px) {
  body { font-size: 16px; }
  .card { padding: 18px 22px; }
  .radio-cards { grid-template-columns: 1fr 1fr; }
}
