:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #191919;
  background: #f6f6f4;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 1.5rem; background: rgba(255,255,255,.96); border-bottom: 1px solid #ddd; backdrop-filter: blur(8px); }
.muted { color: #6a6a6a; }
.identity { font-size: .9rem; color: #555; text-align: right; }
.shell { width: min(1100px, calc(100% - 2rem)); margin: 2rem auto 5rem; }
.card, .panel { background: #fff; border: 1px solid #ddd; border-radius: 14px; padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,.03); }
.card { max-width: 620px; margin: 4rem auto; }
.panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 1.5rem; margin-bottom: .35rem; }
h2 { font-size: 1.2rem; margin-bottom: 0; }
.tabs { display: flex; gap: .4rem; margin-bottom: .75rem; }
.tab { border: 0; background: transparent; padding: .65rem .9rem; border-radius: 10px; color: #555; }
.tab.active { background: #1f1f1f; color: #fff; }
.primary, .secondary, .danger, .icon { border-radius: 10px; border: 1px solid transparent; padding: .65rem .9rem; }
.primary { background: #1f1f1f; color: #fff; }
.primary:hover { background: #000; }
.secondary { background: #fff; color: #222; border-color: #ccc; }
.danger { background: #fff5f5; color: #a11; border-color: #e7bcbc; }
.small { padding: .45rem .65rem; font-size: .9rem; }
.icon { background: transparent; padding: .25rem .5rem; font-size: 1.5rem; }
.list { display: grid; gap: .6rem; }
.list-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .9rem; border: 1px solid #e3e3e3; border-radius: 12px; }
.row-main { min-width: 0; }
.row-main strong { display: block; margin-bottom: .45rem; }
.row-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.meta { display: flex; flex-wrap: wrap; gap: .45rem .65rem; color: #696969; font-size: .85rem; align-items: center; }
.pill { display: inline-flex; align-items: center; border: 1px solid #d3d3d3; border-radius: 999px; padding: .18rem .48rem; color: #444; background: #fafafa; }
.published { border-color: #b9d9c3; background: #f2fbf5; color: #246137; }
.draft { border-color: #ddd; background: #f7f7f7; color: #666; }
.muted-pill { color: #777; border-style: dashed; }
.notice { margin: .75rem 0; border-radius: 10px; background: #f4f4f4; padding: .75rem .9rem; }
.notice.error { background: #fff2f2; color: #991b1b; border: 1px solid #efc2c2; }
.empty { padding: 2rem; text-align: center; color: #777; border: 1px dashed #ccc; border-radius: 12px; }
.hidden { display: none !important; }
dialog { width: min(860px, calc(100% - 1.5rem)); max-height: calc(100vh - 2rem); border: 1px solid #ccc; border-radius: 16px; padding: 0; box-shadow: 0 18px 80px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.35); }
.dialog-form { display: grid; gap: .9rem; padding: 1.25rem; overflow: auto; max-height: calc(100vh - 2rem); }
.dialog-form.compact { max-width: 560px; margin: auto; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; }
label small { font-weight: 400; color: #777; }
input, textarea, select { width: 100%; border: 1px solid #cfcfcf; background: #fff; border-radius: 9px; padding: .68rem .75rem; color: #171717; }
textarea { resize: vertical; }
.editor { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; }
.actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .25rem; }
@media (max-width: 720px) {
  .topbar { padding: .85rem 1rem; }
  .shell { width: min(100% - 1rem, 1100px); margin-top: 1rem; }
  .panel-head, .list-row { align-items: stretch; flex-direction: column; }
  .row-actions { justify-content: flex-end; }
  .grid2 { grid-template-columns: 1fr; }
}
