:root{
  --paper:#f8f2e6;
  --paper2:#f4efe3;
  --ink:#1f2328;
  --muted:#6b7280;
  --line:rgba(31,35,40,.12);
  --shadow: 0 12px 30px rgba(0,0,0,.08);
  --radius: 18px;
  --pad: 14px;
  --max: 980px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(800px 500px at 110% 10%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper2) 100%);
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  background: rgba(248,242,230,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:38px; height:38px; border-radius:14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.35)),
    linear-gradient(135deg, rgba(0,0,0,.08), transparent 60%);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  position:relative;
}
.logo::after{
  content:"";
  position:absolute; inset:10px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
}

.title{font-weight:800; letter-spacing:-.02em; font-size:16px}
.subtitle{font-size:12px; color:var(--muted); margin-top:2px}

.main{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background: rgba(255,255,255,.65);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel{border-radius: var(--radius)}
.panelHead{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  background: rgba(255,255,255,.35);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kicker{font-size:12px; color:var(--muted); font-weight:700}
.date{font-size:18px; font-weight:900; letter-spacing:-.02em}

.tools{
  display:flex; align-items:center; gap:10px;
  margin-top:10px;
}
.spacer{flex:1}

.btn{
  appearance:none;
  border:1px solid rgba(31,35,40,.18);
  background: rgba(255,255,255,.78);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  cursor:pointer;
  color:var(--ink);
}
.btn:active{transform: translateY(1px)}
.btn.ghost{
  background: transparent;
}
.btn.danger{
  background: rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.25);
  color: #b91c1c;
}
label.btn.file{display:inline-flex; align-items:center; gap:8px}

.input, .textarea, select.input{
  width:100%;
  border:1px solid rgba(31,35,40,.16);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255,255,255,.72);
  outline:none;
  font-size: 14px;
}
.textarea{resize: vertical; min-height: 220px}

.label{font-weight:900; font-size:12px; margin:12px 0 6px}
.muted{color:var(--muted)}
.small{font-size:12px}

.list .card{padding: 0}
.listHead{
  padding: 14px;
  display:flex; align-items:flex-end; justify-content:space-between;
  border-bottom:1px solid var(--line);
  background: rgba(255,255,255,.35);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.h2{font-weight:900; font-size:15px}

.items{display:flex; flex-direction:column}
.item{
  padding: 14px;
  display:flex; gap:12px;
  border-top:1px solid var(--line);
  cursor:pointer;
}
.item:hover{background: rgba(255,255,255,.35)}
.itemThumb{
  width:46px; height:46px;
  border-radius: 14px;
  background: rgba(31,35,40,.06);
  border:1px solid rgba(31,35,40,.10);
  overflow:hidden;
  flex:0 0 auto;
}
.itemThumb img{width:100%; height:100%; object-fit:cover}
.itemBody{flex:1; min-width:0}
.itemTitle{font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.itemMeta{margin-top:4px; font-size:12px; color:var(--muted); display:flex; gap:8px; flex-wrap:wrap}
.itemExcerpt{
  margin-top:6px;
  font-size:13px;
  color: rgba(31,35,40,.78);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.editor .card{padding: 14px}
.editorHead{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px;
  margin-bottom: 6px;
}
.row{display:flex; gap:10px; align-items:center}
.divider{height:1px; background: var(--line); margin: 12px 0}

.photoBlock{margin-top: 8px}
.photoGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top: 10px;
}
.photo{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(31,35,40,.12);
  background: rgba(255,255,255,.65);
  aspect-ratio: 1 / 1;
}
.photo img{width:100%; height:100%; object-fit:cover}
.photo button{
  position:absolute; top:8px; right:8px;
  border:1px solid rgba(31,35,40,.16);
  background: rgba(255,255,255,.78);
  border-radius: 12px;
  padding:6px 8px;
  font-weight:900;
}

.dangerZone{margin-top: 14px}

.lock{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding: 18px;
  background: rgba(244,239,227,.88);
  backdrop-filter: blur(14px);
  z-index: 50;
}
.h1{margin:0 0 6px; font-size:18px; font-weight:1000}
.details summary{cursor:pointer; font-weight:900; margin-top: 12px}
.grid{display:grid; gap:10px; margin-top: 10px}
.group{padding: 10px; border:1px dashed rgba(31,35,40,.18); border-radius: 16px; background: rgba(255,255,255,.35)}

.dialog::backdrop{background: rgba(0,0,0,.25)}
.dialog{border:none; background: transparent; padding:0}
.dialog .card{width:min(520px, 92vw)}
.dialogHead{display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom: 8px}

@media (max-width: 520px){
  .photoGrid{grid-template-columns: repeat(2, 1fr)}
  .btn{padding:10px 11px}
}
