/* =========================================================
   はけぐち — FLAT theme
   白ベース × 角丸ゼロ × フラット（影なし・ボタン枠なし）
   PCCSストロングトーンの赤をアクセントに
   ========================================================= */
:root {
  --bg: #f4f4f2; /* オフホワイト */
  --panel: #ffffff;
  --chip: #ececea; /* フラットボタンの地色 */
  --chip-hover: #e0e0dd;
  --line: #e5e2dc; /* 薄い境界線 */
  --ink: #141414;
  --ink-soft: #737373;

  /* PCCS strong tone */
  --red: #c7243a; /* s2  主役アクセント */
  --red-deep: #9d0f22;
  --yellow: #e39d00; /* s8 */
  --magenta: #b0246a; /* s24 */
  --blue: #0074a8; /* s18 */
  --green: #009d55; /* s12 */

  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "DejaVu Sans Mono", monospace;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important; /* 角丸は排除 */
}

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

body {
  margin: 0;
  font-family:
    "Helvetica Neue", Arial, system-ui, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  border-top: 5px solid var(--red);
}

.wrap {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------------- header ---------------- */
.site-header {
  padding: 34px 0 20px;
  text-align: left;
}
.logo {
  margin: 0;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}
.logo span {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0 8px;
}
.logo .pu {
  background: none;
  color: inherit;
  padding: 0;
}
.tagline {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.tagline::before {
  content: "// ";
  color: var(--red);
}

/* ---------------- composer ---------------- */
.composer {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 26px;
}
#composer-input {
  width: 100%;
  border: none;
  resize: vertical;
  min-height: 84px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  outline: none;
  caret-color: var(--red);
}
#composer-input::placeholder {
  color: var(--ink-soft);
}
.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.counter {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
.counter.over {
  color: #fff;
  background: var(--red);
  padding: 2px 6px;
  font-weight: 700;
}

/* フラットボタン：枠なし・影なし */
.btn-primary {
  border: none;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 30px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover:not(:disabled) {
  background: var(--red-deep);
}
.btn-primary:disabled {
  background: #e0e0dd;
  color: #a5a5a5;
  cursor: not-allowed;
}

.error {
  margin: 12px 0 0;
  padding: 8px 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
}
.error::before {
  content: "! ";
  font-weight: 900;
}

/* ---------------- similar ---------------- */
.similar-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  padding: 16px;
  margin-bottom: 30px;
  animation: fade 0.2s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.similar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.similar-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.similar-lead {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}
.link-btn {
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 6px;
  text-transform: uppercase;
  transition: color 0.15s ease;
}
.link-btn:hover {
  color: var(--red);
}

/* ---------------- timeline ---------------- */
.tl-title {
  font-size: 13px;
  margin: 10px 0 16px;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-left: 5px solid var(--red);
  padding-left: 10px;
}
.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
}
.post-body {
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 16px;
  line-height: 1.55;
}

/* タグ */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  background: #efefec;
  color: var(--ink);
}
.tag-situation {
  color: var(--red);
}
.tag-target {
  color: var(--blue);
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.post-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.report-btn,
.delete-btn {
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 4px;
  transition: color 0.15s ease;
}
.report-btn:hover:not(:disabled),
.delete-btn:hover {
  color: var(--red);
}
.report-btn:disabled {
  color: #b7b7b7;
  cursor: default;
}

/* フラットな共感ボタン：枠なし・地色ありのチップ */
.empathy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: var(--chip);
  color: var(--ink);
  padding: 8px 15px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}
.empathy-btn .aru {
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.empathy-btn .empathy-count {
  font-family: var(--mono);
  font-weight: 700;
}
.empathy-btn:hover {
  background: var(--chip-hover);
  color: var(--red);
}
.empathy-btn.active {
  background: var(--red);
  color: #fff;
}
.empathy-btn.active:hover {
  background: var(--red-deep);
  color: #fff;
}
.empathy-btn.bump {
  animation: bump 0.22s ease;
}
@keyframes bump {
  40% {
    transform: scale(1.08);
  }
}

.post-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ---------------- misc ---------------- */
.btn-more {
  display: block;
  width: 100%;
  margin: 20px 0;
  padding: 15px;
  border: none;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-more:hover {
  background: var(--chip-hover);
}
.loading,
.empty {
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 26px 0;
}

/* ---------------- footer ---------------- */
.site-footer {
  margin: 40px auto 56px;
  text-align: left;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  line-height: 1.7;
}
.site-footer a {
  color: #fff;
  background: var(--red);
  padding: 1px 6px;
  text-decoration: none;
  font-weight: 700;
}
.site-footer a:hover {
  background: var(--red-deep);
}
.site-footer .fine {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 8px;
}

@media (max-width: 420px) {
  .logo {
    font-size: 34px;
  }
}
