.checkbox-list{display:grid;gap:12px}
.checkbox-list label{display:grid;grid-template-columns:18px 1fr;gap:10px;align-items:start;color:var(--muted);line-height:1.45}
.checkbox-list input[type=checkbox]{width:16px;height:16px;margin:2px 0 0;padding:0;accent-color:var(--accent)}
.checkbox-list span{min-width:0}
.craving-table{table-layout:fixed;width:100%}
.craving-table th:nth-child(1),.craving-table td:nth-child(1){width:28%}
.craving-table th:nth-child(2),.craving-table td:nth-child(2){width:auto;min-width:320px}
.craving-table th:nth-child(3),.craving-table td:nth-child(3){width:132px;text-align:center;vertical-align:middle}
.craving-occurrences-head{text-align:center}
.craving-occurrences-cell{white-space:nowrap}
.craving-slot{width:34px;height:34px;padding:0;border-radius:10px;margin-right:6px;background:#1a2947;color:var(--text);border:1px solid rgba(255,255,255,.12)}
.craving-slot.done{background:rgba(114,230,160,.16);color:var(--ok);cursor:default}
.craving-occurrence{display:inline-grid;grid-template-columns:1fr;margin:0 4px 0 0;vertical-align:middle}
.craving-occurrence input{position:absolute;opacity:0;pointer-events:none}
.craving-occurrence span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#1a2947;color:var(--text);border:1px solid rgba(255,255,255,.12);font-weight:800;cursor:pointer}
.craving-occurrence input:checked+span{background:rgba(114,230,160,.16);color:var(--ok)}
.craving-occurrence.done span{cursor:default}
.craving-matrix-wrap{max-height:72vh;border:1px solid rgba(255,255,255,.08);border-radius:14px}
.craving-matrix{width:max-content;min-width:100%;table-layout:auto}
.craving-matrix th,.craving-matrix td{min-width:42px;text-align:center;padding:8px}
.craving-matrix thead th{position:sticky;top:0;z-index:2;background:var(--panel)}
.craving-matrix th:first-child{position:sticky;left:0;z-index:3;min-width:250px;max-width:320px;text-align:left;background:var(--panel)}
.craving-matrix td.has-craving{background:rgba(124,240,197,.16);color:var(--ok);font-weight:800;border-radius:8px}
.craving-matrix small{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.62)}
.modal-panel{width:min(760px,100%);max-height:90vh;overflow:auto;background:linear-gradient(180deg,rgba(16,26,47,.99),rgba(13,22,40,.98));border:1px solid rgba(255,255,255,.12);border-radius:22px;padding:20px;box-shadow:var(--shadow)}
.checkline{display:flex;align-items:center;gap:10px}
.checkline input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.emotion-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-top:10px}
.emotion-tile{position:relative;display:block;min-height:112px;padding:12px;border:1px solid rgba(255,255,255,.10);border-radius:14px;background:rgba(255,255,255,.035);cursor:pointer;color:var(--text)}
.emotion-tile input[type=checkbox]{position:absolute;inset:10px 10px auto auto;width:16px;height:16px;margin:0;accent-color:var(--accent)}
.emotion-tile-main{display:grid;gap:4px;padding-right:22px}
.emotion-tile-main b{font-size:14px}
.emotion-tile-main small{color:var(--muted)}
.emotion-tile-main em{font-style:normal;color:var(--muted);font-size:12px;line-height:1.35}
.emotion-intensity{display:none;margin-top:12px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08);color:var(--muted);font-size:12px}
.emotion-intensity input[type=range]{margin-top:8px;padding:0}
.emotion-tile:has(input[type=checkbox]:checked){border-color:rgba(124,240,197,.55);background:rgba(124,240,197,.10)}
.emotion-tile input[type=checkbox]:checked~.emotion-intensity{display:block}
