:root { --ink: #202020; --line: #d9d9d5; --accent: #f3d126; --paper: #f5f5f2; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.8 "Yu Gothic", Meiryo, sans-serif; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; padding: 9px 14px; background: #fff; border: 1px solid #bbb; border-radius: 3px; }
button:hover { background: #ecece7; }
button:disabled { opacity: .5; cursor: wait; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #af9200; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; margin-bottom: 12px; }
p { margin-bottom: 18px; }
.admin-header { background: #080808; color: #fff; padding: 20px 4%; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-header > a { text-decoration: none; font: 22px Georgia, serif; letter-spacing: .03em; }
.admin-header > a span { font: 11px "Yu Gothic", sans-serif; margin-left: 15px; color: #bbb; }
.admin-header > div { display: flex; align-items: center; gap: 20px; font-size: 12px; }
.admin-header button { background: transparent; color: white; border-color: #777; font-size: 11px; }
main { max-width: 1450px; padding: 30px 4% 60px; margin: auto; }
.eyebrow { font: 11px Arial, sans-serif; letter-spacing: .13em; color: #777; margin-bottom: 12px; }
.auth-panel { max-width: 500px; margin: 60px auto; padding: 40px; border: 1px solid var(--line); background: white; }
.auth-panel h1 { font-size: 25px; margin-bottom: 22px; }
.auth-panel p { color: #666; font-size: 13px; }
label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 8px; }
input, textarea, select { display: block; width: 100%; border: 1px solid #bbb; border-radius: 3px; background: white; color: var(--ink); padding: 11px 12px; margin-bottom: 22px; min-height: 45px; }
textarea { resize: vertical; }
.primary { background: #171717; color: white; border-color: #171717; }
.primary:hover { background: #333; }
.publish { background: var(--accent); border-color: #c7aa1d; }
.danger { color: #a42f24; border-color: #d4aaa5; }
.hint { color: #666; font-size: 11px; line-height: 1.9; }
.required { font-size: 9px; background: #eee; padding: 2px 6px; margin-left: 7px; }
#global-status { color: #a12c22; margin: 0; font-size: 13px; }
#global-status:not(:empty) { padding: 15px 20px; margin-bottom: 20px; background: #fff1e9; border: 1px solid #e3bba4; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.workspace { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; }
.post-sidebar { background: white; border: 1px solid var(--line); padding: 20px; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.list-heading h2 { font-size: 17px; }
.list-heading button { font-size: 11px; padding: 5px 10px; }
.filter-label { font-size: 10px; }
.post-sidebar select { font-size: 12px; min-height: 40px; padding: 8px; }
#post-list { max-height: calc(100vh - 330px); overflow-y: auto; }
.post-list-item { width: 100%; display: block; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 15px 0; }
.post-list-item strong { display: block; font-size: 12px; line-height: 1.9; font-weight: 500; overflow-wrap: anywhere; }
.post-list-item span { display: block; color: #777; font-size: 10px; margin-bottom: 5px; }
.post-list-item[aria-current=true] { background: #fff8d7; padding-inline: 10px; }
.editor { min-width: 0; background: white; border: 1px solid var(--line); padding: 32px; }
.editor-heading { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 25px; padding-bottom: 20px; }
#dirty-label { color: #986d00; font-size: 11px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.cover-section, .body-section { border-top: 1px solid var(--line); padding-top: 25px; margin-top: 25px; }
#cover-preview { max-width: 100%; width: 250px; max-height: 220px; object-fit: contain; margin-bottom: 20px; background: #eee; }
.inline-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-actions button { font-size: 11px; }
.body-block { padding: 20px; background: #f7f7f4; border: 1px solid var(--line); margin-bottom: 20px; }
.block-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; }
.block-toolbar strong { font-size: 11px; font-weight: 500; }
.block-toolbar > div { display: flex; gap: 7px; }
.block-toolbar button { font-size: 11px; padding: 5px 9px; }
.body-block textarea { margin-bottom: 0; font-size: 13px; }
.body-block img { display: block; max-width: 100%; max-height: 340px; object-fit: contain; margin-bottom: 20px; }
.body-block input { font-size: 12px; margin-bottom: 15px; }
.body-block input:last-child { margin-bottom: 0; }
.add-block-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.add-block-actions button { font-size: 12px; }
.save-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; border-top: 1px solid var(--line); padding-top: 25px; margin-top: 30px; }
.save-actions a { font-size: 11px; }
#delete-post { margin-left: auto; font-size: 11px; }
#editor-status { margin: 20px 0 0; color: #36633b; font-size: 12px; white-space: pre-wrap; }
.editor-empty { background: #fff; border: 1px dashed #ccc; padding: 60px 35px; }
.editor-empty h2 { font-size: 21px; margin-bottom: 20px; }
.editor-empty p { font-size: 13px; color: #777; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 230px 1fr; gap: 22px; }
  .editor { padding: 25px; }
  .field-grid { gap: 18px; }
}
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  #post-list { max-height: 260px; }
  .post-sidebar { padding: 20px; }
  .post-sidebar select { margin-bottom: 10px; }
  .admin-header { padding: 18px 20px; }
  .admin-header > a { font-size: 18px; }
  .admin-header > a span { display: block; font-size: 9px; margin: 6px 0 0; }
  .admin-header > div { gap: 12px; font-size: 10px; }
  .admin-header button { font-size: 10px; padding: 7px; }
  main { padding-inline: 20px; }
  .dashboard-heading h1 { font-size: 22px; }
  .dashboard-heading > button { font-size: 12px; }
}
@media (max-width: 540px) {
  .auth-panel { margin: 25px auto; padding: 28px 23px; }
  .auth-panel h1 { font-size: 22px; }
  .editor { padding: 23px 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .body-block { padding: 15px; }
  .body-block textarea, input, textarea, select { font-size: 16px; }
  .body-block input { font-size: 16px; }
  .block-toolbar { gap: 10px; flex-wrap: wrap; }
  .block-toolbar strong { font-size: 10px; }
  .block-toolbar button { font-size: 10px; padding: 5px 8px; }
  .save-actions { gap: 12px; }
  .save-actions > button { font-size: 12px; }
  #delete-post { margin-left: 0; }
  .dashboard-heading { gap: 15px; align-items: start; }
  .dashboard-heading h1 { font-size: 20px; }
  .dashboard-heading > button { font-size: 11px; padding: 9px 11px; white-space: nowrap; }
  .eyebrow { font-size: 9px; }
}
