* {
    box-sizing: border-box; 
}

body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:#f6f1eb;
    color:#1f1a16;
}

.topbar{
    text-align:center;
    padding:16px 10px;
    background:#fffaf4;
    border-bottom:1px solid #eadfd3;
}
.topbar h1{ margin:0; font-size:1.4rem; }
.topbar p{ margin:4px 0 0; color:#7a6f65; }

.container{ padding:12px; max-width:1100px; margin:0 auto; }
.split{ display:flex; flex-direction:column; gap:14px; }
@media (min-width:900px){
.split{ flex-direction:row; align-items:flex-start; }
.split > .card{ width:50%; }
}

.card{
    background:#fffaf4;
    border:1px solid #eadfd3;
    border-radius:14px;
    padding:14px;
    box-shadow:0 4px 12px rgba(0,0,0,.04);
}

.card-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:6px;
}

h2{ margin:0; font-size:1.1rem; }
h3{ color:#1f1a16; }
p,label{ color:#3a332d; }

.muted{ color:#7a6f65; font-size:13px; }

.hint{
    margin-top:10px;
    padding:10px 12px;
    border:1px dashed #eadfd3;
    border-radius:12px;
    background:#fff7ee;
    color:#6b625b;
    font-size:13px;
}

.row{ display:flex; gap:8px; align-items:center; }
.row.between{ justify-content:space-between; }

input,select,button{
    padding:10px 12px;
    border-radius:10px;
    border:1px solid #eadfd3;
    background:#fff;
    color:#1f1a16;
    font-size:14px;
}

input:focus,select:focus{
    outline:none;
    border-color:#d97706;
    box-shadow:0 0 0 2px rgba(217,119,6,.15);
}

button{
    cursor:pointer;
    background:#d97706;
    border-color:#d97706;
    color:#fff;
    font-weight:700;
}
button:hover{ background:#b45309; }

button.ghost{
    background:#fff3e6;
    border-color:#eadfd3;
    color:#8a4b0a;
    font-weight:700;
}
button.ghost:hover{ background:#ffe8cf; }

button.danger{
    background:#fff1f1;
    border-color:#ffd3d3;
    color:#c62828;
}
button.danger:hover{ background:#ffe2e2; }

.list{
    list-style:none;
    padding:0;
    margin:10px 0 0;
    display:flex;
    flex-direction:column;
    gap:8px;
}

.item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid #eadfd3;
    border-radius:12px;
    background:#fff7ee;
}

.item-title{
    font-weight:650;
    color:#2f2823;
}

.icon-btn{
    background:transparent;
    border-color:#eadfd3;
    color:#7a6f65;
    font-weight:700;
}

.icon-btn:hover{ background:#fff1e3; }

.divider{ height:1px; background:#eadfd3; margin:14px 0; }

.calendar-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:8px;
    margin-top:10px;
}

.calendar-day{
    border:1px solid #eadfd3;
    border-radius:12px;
    background:#fffaf4;
    padding:8px 8px 10px;
    min-height:72px;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    position:relative;
}

.calendar-day.empty{
    opacity:.25;
    cursor:default;
}

.calendar-day .weekday{
    font-size:11px;
    color:#7a6f65;
    font-weight:650;
}

.calendar-day .number{
    font-size:18px;
    font-weight:800;
    align-self:flex-end;
    color:#1f1a16;
}

.calendar-day.selected{
    border-color:#d97706;
    background:#fff1e3;
}

.calendar-day.has-plans::after{
    content:"";
    position:absolute;
    bottom:8px;
    left:8px;
    width:7px;
    height:7px;
    border-radius:50%;
    background:#d97706;
}

.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(20,16,12,.45);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:14px;
    z-index:9999;
}

.hidden{ display:none; }

.modal{
    width:min(720px, 100%);
    background:#fffaf4;
    border:1px solid #eadfd3;
    border-radius:16px;
    box-shadow:0 18px 50px rgba(0,0,0,.18);
    overflow:hidden;
}

.modal-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    padding:14px;
    border-bottom:1px solid #eadfd3;
    background:#fff7ee;
}

.modal-body{
    padding:14px;
    max-height:65vh;
    overflow:auto;
}

.modal-foot{
    padding:14px;
    border-top:1px solid #eadfd3;
    background:#fff7ee;
}

.plan{
    border:1px solid #eadfd3;
    border-radius:14px;
    background:#fff;
    padding:12px;
    margin-bottom:10px;
}

.plan-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}

.badge{
    font-size:12px;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid #eadfd3;
    background:#fff3e6;
    color:#8a4b0a;
    font-weight:700;
}

.checklist{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin:0;
    padding:0;
    list-style:none;
}

.checkitem{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border:1px solid #eadfd3;
    border-radius:12px;
    background:#fff7ee;
}

.checkitem label{
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    color:#2f2823;
    font-weight:650;
}

.checkitem input[type="checkbox"]{
    width:18px;
    height:18px;
    accent-color:#d97706;
}

.checkitem.done label{
    color:#7a6f65;
    font-weight:650;
    text-decoration:line-through;
}