*{box-sizing:border-box}

body{
    margin:0;
    background:#f7f7f7;
    color:#333;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Yu Gothic",Meiryo,sans-serif;
    font-size:14px;
}

a{text-decoration:none;color:inherit}

.header{
    background:#fff;
    border-bottom:1px solid #e5e5e5;
}

.header-in,.container{
    max-width:1000px;
    margin:0 auto;
    padding:12px 16px;
}

.header-in{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.brand{
    font-size:1rem;
    font-weight:700;
    color:#555;
    line-height:1.2;
}

.nav{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:0 10px;
    border:1px solid #d8d8d8;
    border-radius:999px;
    background:#fff;
    color:#555;
    font:inherit;
    line-height:1;
    cursor:pointer;
    transition:.15s;
    white-space:nowrap;
}

.btn:hover{
    background:#f3f3f3;
}

.btn-primary{
    border-color:#5dc7bb;
    background:#5dc7bb;
    color:#fff;
}

.btn-primary:hover{
    background:#4db7ab;
}

.btn-danger{
    border-color:#d85d5d;
    background:#d85d5d;
    color:#fff;
}

.btn-danger:hover{
    background:#c84d4d;
}

.page-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.page-title{
    margin:0;
    font-size:1.35rem;
    font-weight:700;
    color:#666;
    line-height:1.2;
}

.toolbar{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom:10px;
}

.toolbar-form{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

select,
input[type="text"],
input[type="password"],
input[type="file"],
input[type="number"],
textarea{
    width:100%;
    min-height:34px;
    padding:6px 10px;
    border:1px solid #d9d9d9;
    border-radius:8px;
    background:#fff;
    font:inherit;
    color:#333;
}

textarea{
    min-height:96px;
    resize:vertical;
}

.toolbar-form select{
    min-width:170px;
}

.list-wrap{
    background:#fff;
    border:1px solid #e5e5e5;
    overflow:hidden;
}

.list-head,
.list-row{
    display:grid;
grid-template-columns:72px 120px minmax(180px, 1.4fr) 120px minmax(240px, 2.2fr);    gap:12px;
    align-items:center;
    padding:10px 14px;
}

.list-head{
    font-weight:700;
    font-size:.92rem;
    color:#777;
    background:#fafafa;
    border-bottom:1px solid #e5e5e5;
}

.list-row{
    border-top:1px solid #ededed;
    background:#fff;
    min-height:52px;
}

.list-row:first-of-type{
    border-top:none;
}

.title-cell{
    min-width:0;
}

.title-link{
    display:inline-block;
    font-size:1rem;
    font-weight:700;
    color:#4a4a4a;
    word-break:break-word;
    line-height:1.35;
}

.title-link:hover{
    color:#5dc7bb;
}

.date-text{
    display:block;
    font-size:.78rem;
    color:#8a8a8a;
    line-height:1.35;
}

.memo-text{
    color:#5f5f5f;
    word-break:break-word;
    line-height:1.45;
    font-size:.9rem;
}

.cat-text{
    color:#666;
    font-size:.88rem;
    line-height:1.35;
    word-break:break-word;
}

.icon-btn-wrap{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.icon-btn{
    min-width:60px;
    min-height:28px;
    padding:0 8px;
    font-size:.9rem;
}

.form-card{
    max-width:900px;
    background:#fff;
    border:1px solid #e5e5e5;
    padding:18px;
    margin: 0 auto;
}

.form{
    display:grid;
    gap:12px;
}

.row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.group{
    display:grid;
    gap:6px;
}

label{
    font-weight:700;
    color:#666;
    font-size:.92rem;
    line-height:1.3;
}

.help{
    margin:0;
    font-size:.8rem;
    color:#888;
}

.actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

.alert{
    margin:0 0 12px;
    padding:10px 12px;
    border-radius:8px;
    font-weight:700;
    font-size:.92rem;
}

.alert-success{
    background:#dcfce7;
    color:#166534;
}

.alert-error{
    background:#fee2e2;
    color:#991b1b;
}

.empty{
    padding:18px 14px;
    color:#777;
    background:#fff;
    border:1px solid #e5e5e5;
    font-size:.92rem;
}

.auth-wrap{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:20px;
}

.auth-card{
    width:100%;
    max-width:420px;
    background:#fff;
    border:1px solid #e5e5e5;
    padding:20px;
}

.auth-title{
    margin:0 0 14px;
    font-size:1.2rem;
    color:#666;
    line-height:1.2;
}

.inline-form{
    display:inline;
}

@media (max-width: 980px){
    .list-head{
        display:none;
    }

    .list-row{
        grid-template-columns:1fr;
        gap:8px;
        padding:12px;
    }

    .row{
        grid-template-columns:1fr;
    }
}
.category-section{
    margin-bottom:18px;
}

.category-heading{
    margin:0 0 8px;
    padding:0 2px;
    font-size:1rem;
    font-weight:700;
    color:#666;
    line-height:1.3;
}