:root {
  --bg: #f5f2ef;
  --panel: #fff;
  --ink: #302d2b;
  --muted: #6e6862;
  --rose: #a97373;
  --rose-soft: #f3e8e5;
  --line: #ded6d0;
  --navy: #343138;
  --green: #3f7558;
  --shadow: 0 20px 55px rgba(48,45,43,.09);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans JP", sans-serif; line-height: 1.7; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.admin-head { min-height: 68px; padding: 10px max(20px, calc((100% - 1180px) / 2)); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.9); }
.admin-head > a { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.admin-head strong { font: 800 16px/1 "Manrope", sans-serif; }
.admin-head span { padding: 4px 8px; border-radius: 99px; background: var(--rose-soft); color: var(--rose); font-size: 9px; font-weight: 700; }
.admin-head nav { display: flex; gap: 20px; }
.admin-head nav a { color: var(--muted); font-size: 11px; font-weight: 700; }
main { width: min(100% - 40px, 1180px); margin: 0 auto; padding: 68px 0 100px; }
.login-card { width: min(100%, 480px); margin: 30px auto; padding: 48px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); }
.kicker, .card-title p { margin: 0 0 8px; color: var(--rose); font: 800 10px/1 "Manrope", sans-serif; letter-spacing: .16em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.login-card h1, .dashboard-title h1 { margin: 0; font-size: 30px; line-height: 1.4; }
.login-lead { margin: 14px 0 30px; color: var(--muted); font-size: 13px; }
label { margin-bottom: 18px; display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
label > span { margin-left: 6px; color: var(--rose); font-size: 9px; }
input, textarea, select { width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: 0; }
input, select { height: 46px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(169,115,115,.12); }
label small { margin-top: 6px; display: block; color: var(--muted); font-size: 9px; font-weight: 500; }
.primary-button { width: 100%; min-height: 50px; border: 0; border-radius: 9px; background: var(--rose); color: white; cursor: pointer; font-weight: 700; }
.primary-button:hover { background: #925f5f; }
.demo-notice { margin: 22px 0 0; padding: 15px; border: 2px solid var(--rose); border-radius: 8px; background: var(--rose-soft); color: var(--muted); font-size: 10px; }
.demo-notice strong { margin-bottom: 4px; display: block; color: var(--ink); font-size: 12px; }
.dashboard-title { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.dashboard-actions { display: flex; gap: 8px; }
.text-button { padding: 7px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.demo-banner { margin-bottom: 24px; padding: 16px 18px; border: 2px solid var(--rose); border-radius: 10px; background: var(--rose-soft); color: var(--muted); font-size: 11px; }
.demo-banner strong { margin-right: 10px; color: var(--rose); }
.dashboard-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.editor-card, .posts-card { padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.card-title { margin-bottom: 28px; display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.card-title h2 { margin: 0; font-size: 19px; }
.card-title > span { color: var(--muted); font-size: 11px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.image-preview { margin: -6px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 14px; }
.image-preview img { width: 80px; height: 62px; border-radius: 6px; object-fit: cover; }
.image-preview button { border: 0; background: transparent; color: var(--rose); cursor: pointer; font-size: 10px; font-weight: 700; }
.post-list { border-top: 1px solid var(--line); }
.post-item { padding: 22px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 7px 20px; }
.post-meta { display: flex; align-items: center; gap: 10px; }
.post-meta time { color: var(--muted); font: 600 10px/1 "Manrope", sans-serif; }
.status { padding: 3px 7px; border-radius: 99px; font-size: 8px; font-weight: 700; }
.status-published { background: #e5f1e9; color: var(--green); }
.status-draft { background: #eeecea; color: var(--muted); }
.post-item h3 { grid-column: 1; margin: 0; font-size: 14px; }
.post-item > p { grid-column: 1; margin: 0; color: var(--muted); font-size: 10px; }
.post-actions { grid-column: 2; grid-row: 1 / 4; display: flex; align-items: center; gap: 5px; }
.post-actions a, .post-actions button { padding: 6px 8px; border: 0; border-radius: 6px; background: #f3f1ef; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; text-decoration: none; }
.post-actions .delete-button { background: #fbefef; color: #a24e4e; }
@media (max-width: 820px) {
  main { width: min(100% - 28px, 1180px); padding: 46px 0 80px; }
  .admin-head nav a:first-child { display: none; }
  .dashboard-title { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .editor-card, .posts-card { padding: 24px 20px; }
}
@media (max-width: 520px) {
  .admin-head { min-height: 62px; }
  .admin-head nav { gap: 0; }
  .login-card { padding: 34px 24px; }
  .login-card h1, .dashboard-title h1 { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .post-item { grid-template-columns: 1fr; }
  .post-actions { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
