/* Monochrome, boxy, pre-webfont aesthetic */
:root { --bg:#f7f7f7; --fg:#111; --muted:#666; --link:#0000ee; --border:#ccc; }
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.4 system-ui, Arial, Helvetica, sans-serif}
header,footer{padding:8px 12px;border-bottom:1px solid var(--border)}
footer{border-top:1px solid var(--border);border-bottom:none;color:var(--muted)}
header h1{margin:0;font-size:18px;display:inline-block}
header nav{display:inline-block;margin-left:12px}
header nav a{margin-right:8px}
main{padding:12px}
a{color:var(--link);text-decoration:underline}

.boards{list-style:none;padding:0}
.boards li{padding:4px 0}

.postbox{border:1px solid var(--border);padding:8px;margin:12px 0;background:#fff}
.postbox label{display:block;margin:6px 0}
.postbox input[type="text"], .postbox input[type="password"], .postbox input[type="file"], .postbox textarea{width:100%}
.postbox button{padding:4px 12px}
.postbox .error{color:#b00;font-weight:600;margin:8px 0}

.thread{border:1px solid var(--border);background:#fff}
.threads{display:flex;flex-direction:column;gap:8px}
.thread-list-item{display:flex;align-items:center;gap:10px;padding:8px;flex-wrap:wrap}
.thread-list-item .thread-title{margin:0;font-size:14px}
.thread-preview-images{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.thread-preview-link{display:inline-block;line-height:0}
.thread-preview-thumb{width:54px;height:54px;object-fit:cover;display:block;border:1px solid var(--border);background:#f0f0f0}
.post{border-top:1px solid var(--border);padding:8px;overflow-wrap:anywhere;word-break:break-word}
.post:first-child{border-top:none}
.post header{font-size:12px;color:var(--muted);margin-bottom:4px;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:flex-end}
.post header .meta{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.post header .controls{display:flex;gap:8px;align-items:center}
.post header .controls a{color:var(--muted);text-decoration:none}
.post header .controls a:hover{text-decoration:underline;color:var(--link)}
.post .name{color:#070}
.post .trip{color:#a50;margin-left:4px}
.post .thumb{max-width:150px;max-height:150px;display:block;margin:6px 0}
.post .body{white-space:pre-wrap;font-family:monospace}
.post .body .quote{color:#789922}
.quotelink{color:var(--link)}
.post .replies{margin-top:6px;font-size:12px;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.post .replies span{font-weight:600}
.post .replies .quotelink{color:var(--muted)}
.post .replies .quotelink:hover{color:var(--link)}
.post .image-link{display:inline-block}
.post.is-target{background:#eef;border-left:4px solid #99f}

@media (max-width: 720px){
  body{font-size:15px;line-height:1.5;background:#f0f0f2}
  header,footer{padding:10px 16px}
  main{padding:14px 16px}
  header h1{display:block;margin-bottom:8px}
  header nav{display:flex;flex-wrap:wrap;gap:10px;margin:0}
  header nav a{margin:0;padding:4px 0}
  .postbox,.thread{margin-left:-4px;margin-right:-4px;border-radius:4px}
  .thread-list-item{align-items:flex-start}
  .thread-preview-thumb{width:48px;height:48px}
  .postbox{padding:10px 12px}
  .post{padding:10px 12px}
  .post header{flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:8px}
  .post header .controls{order:3;margin-left:0}
  .post .thumb{max-width:100%;margin:8px 0}
  .post .attachments{gap:10px}
  .post .attachments .image-link{display:block}
}

@media (max-width: 480px){
  header,footer{padding:8px 12px}
  main{padding:12px}
  header nav{gap:8px}
  .postbox button{width:100%}
}
