:root { --ink: #3b302b; --paper: #fff8f2; --line: #e7d6df; --accent: #d65b78; --soft: #fbeef3; --bg: #f3ece8; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar strong { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layout { max-width: 720px; margin: 0 auto; padding: 12px; display: grid; gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.card h2 { margin: 0 0 8px; font-size: 15px; }
.card h3 { margin: 12px 0 6px; font-size: 13px; }
.chips, .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row.center { justify-content: center; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip:disabled { opacity: .45; cursor: default; }
.swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.button { width: 100%; border: 0; border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 800; color: #fff; background: var(--accent); cursor: pointer; }
.button:disabled { opacity: .5; }
.note { margin: 6px 0 0; font-size: 12px; color: #7a6b64; }
.name { font-size: 20px; font-weight: 800; margin-right: 6px; }
.preview-card { text-align: center; }
#preview { width: 100%; max-width: 320px; aspect-ratio: 1; background: var(--soft); border-radius: 14px; image-rendering: auto; touch-action: pan-y; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin-top: 8px; max-height: 320px; overflow: auto; }
.item { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 4px; font-size: 11px; cursor: pointer; display: grid; gap: 2px; justify-items: center; color: var(--ink); }
.item img { width: 56px; height: 56px; object-fit: contain; }
.item .icon { width: 56px; height: 56px; display: grid; place-items: center; font-size: 26px; }
.item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.adjust { margin-top: 10px; }
.adjust summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.slider { display: grid; grid-template-columns: 72px 1fr 44px; gap: 6px; align-items: center; font-size: 12px; margin: 4px 0; }
input[type="text"], input:not([type]) { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.status { font-size: 13px; margin-bottom: 8px; }
.status b { color: var(--accent); }
.tag { display: inline-block; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 1px 5px; background: var(--soft); color: var(--accent); margin-left: 4px; }
.list { display: grid; gap: 8px; }
.entry { display: grid; grid-template-columns: 26px 84px 1fr; gap: 8px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.entry img { width: 84px; height: 84px; background: var(--soft); border-radius: 10px; }
.entry .meta { font-size: 12px; line-height: 1.5; }
.entry .meta b { font-size: 14px; }
.toolbar { position: sticky; top: 46px; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--bg); padding: 6px 0; }
textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: 12px ui-monospace, Consolas, monospace; }
/* 관리자: 광장 설정·통계 */
.screen-card { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; margin-top: 8px; }
.screen-card .shot { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; background: #2b2220; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; overflow: hidden; }
.screen-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.screen-card .fields { display: grid; gap: 6px; min-width: 0; }
.screen-card input { width: 100%; }
.screen-card input[type="file"] { font-size: 12px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.stat-table th, .stat-table td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }
.entry.flagged { border-color: var(--accent); background: #fff6f8; }
.tag.flag { background: var(--accent); color: #fff; }
