:root{--bg:#f7f9f5;--card:#fff;--text:#1e1f22;--muted:#6b7180;--primary:#3a7bd5;--ok:#2d9d57}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,"Noto Sans",sans-serif}
.wrap{max-width:960px;margin:32px auto;padding:0 16px}
.page-header{display:grid;grid-template-columns:1fr auto 1fr;column-gap:16px;align-items:center;margin-bottom:20px}
.page-header .back{justify-self:start}
.page-header h1{margin:0;justify-self:center;font-size:24px}
.page-header h1 a{color:inherit;text-decoration:none}
.page-header .actions{justify-self:end;display:flex;gap:10px}
.btn{display:inline-block;border:none;background:#e9edf5;color:#1e1f22;border-radius:10px;padding:10px 14px;text-decoration:none;cursor:pointer}
.btn.primary{background:var(--primary);color:#fff}
.btn.ok{background:var(--ok);color:#fff}
.btn.warn{background:#f4c346;color:#fff}
.btn[disabled]{opacity:.6;cursor:not-allowed;background:#e0e3ea;color:#999}
.card{background:var(--card);border-radius:14px;box-shadow:0 6px 24px rgba(0,0,0,.06);padding:18px;margin-top:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin-top:16px}
.tile{background:#fff;border-radius:14px;box-shadow:0 4px 16px rgba(0,0,0,.06);padding:16px;text-align:center}
.tile .icon{margin-bottom:8px;color:#333}
.tile{border:2px solid var(--tile-color,#eee)}

.field{margin:12px 0}
.field label{display:block;font-weight:600;margin-bottom:6px}
.field input{width:100%;padding:10px;border-radius:10px;border:1px solid #e3e7ef}

.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.color-item{display:block}
.color-item input{display:none}
.color-item span{display:block;height:36px;border-radius:10px;border:2px solid transparent;box-shadow:inset 0 0 0 1px #ddd;background:var(--c)}
.color-item input:checked+span{border-color:#111}

.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:8px}
.icon-item{display:flex;align-items:center;justify-content:center;border:1px dashed #e3e7ef;border-radius:10px;height:44px;gap:8px;background:#fff;position:relative}
.icon-item input{position:absolute;opacity:0;pointer-events:none}
.icon-item .icon-wrap{display:inline-flex;align-items:center;justify-content:center;width:100%}
.icon-item input:checked+.icon-wrap{outline:2px solid #111;outline-offset:2px;border-radius:8px}

.weekpick{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.weekpick label{display:flex;align-items:center;gap:6px;background:#f4f6fb;border:1px solid #e3e7ef;border-radius:10px;padding:8px;justify-content:center;white-space:nowrap}
@media (max-width:640px){.weekpick{grid-template-columns:repeat(4,1fr)}}
@media (max-width:420px){.weekpick{grid-template-columns:repeat(3,1fr)}}

.empty{color:var(--muted);text-align:center}
