:root {
    --accent: #ffd500;
    --accent-dark: #e6c000;
    --ink: #22252a;
    --gray: #5a5f66;
    --bg: #f6f7f8;
    --card: #ffffff;
    --border: #e2e4e8;
    --danger: #c0392b;
    --ok: #2e7d32;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-header {
    background: var(--ink);
    color: #fff;
    padding: 12px 0;
}
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.3rem; display: inline-flex; align-items: center; gap: 8px; }
.logo .accent { color: var(--accent); }
.stud { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
.site-header nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-header nav a { color: #dfe2e6; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.userchip { color: #9aa0a6; font-size: 0.82rem; }
main { padding: 24px 16px 48px; min-height: 60vh; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; }
.sub { color: var(--gray); margin: 0 0 20px; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
}
.searchform { display: flex; gap: 8px; }
.searchform input[type="text"] {
    flex: 1;
    padding: 12px 14px;
    font-size: 1rem;
    border: 2px solid var(--ink);
    border-radius: 8px;
}
.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--ink);
    border: none;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-secondary { background: var(--gray); color: #fff; }
.btn-secondary:hover { background: #44484e; }
.btn-danger { background: var(--danger); color: #fff; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { background: #eef0f2; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.field { border-bottom: 1px dashed var(--border); padding: 6px 0; }
.field .lbl { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray); }
.field .val { font-weight: 600; word-break: break-word; }
.pending {
    background: #fff8e1;
    border-left: 4px solid var(--accent);
    padding: 10px 12px;
    border-radius: 4px;
    margin: 8px 0;
}
.pending .tag {
    display: inline-block;
    background: var(--accent);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
}
.photo-box {
    width: 220px;
    height: 180px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--gray);
    background: #fafafa;
    font-size: 0.9rem;
}
.photo-box img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.msg { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.msg-ok { background: #e8f5e9; color: var(--ok); border: 1px solid #c8e6c9; }
.msg-err { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; }
form.stack { max-width: 420px; }
form.stack label { display: block; font-weight: 600; margin: 12px 0 4px; }
form.stack input, form.stack textarea, form.stack select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
form.stack textarea { min-height: 80px; }
.result-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.result-item a { color: var(--ink); font-weight: 600; text-decoration: none; }
.result-item a:hover { color: var(--accent-dark); text-decoration: underline; }
.muted { color: var(--gray); font-size: 0.9rem; }
.actions { display: flex; gap: 8px; }
.site-footer {
    background: var(--ink);
    color: #9aa0a6;
    padding: 18px 0;
    font-size: 0.8rem;
    text-align: center;
}
.notice-empty { color: var(--gray); font-style: italic; }


/* --- item page additions --- */
.topsearch { margin-top: 10px; margin-bottom: 12px; }
.topsearch .searchform { display:flex; gap:8px; max-width:520px; }
.gallery-thumbs { display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.gallery-thumbs .thumb, img.thumb { width:56px; height:56px; object-fit:cover; border:2px solid #ddd; border-radius:4px; cursor:pointer; }
.gallery-thumbs .thumb.active { border-color:#2d5016; }
.contents-table { border-collapse: collapse; }
.contents-table td { padding: 2px 10px 2px 0; vertical-align: top; }
.contents-table td:first-child { color:#666; white-space:nowrap; }
