.goal-dialog {width:min(31rem,calc(100vw - 1.25rem));}
.goal-dialog .lib-body {display:grid;gap:.88rem;}
.target-kinds,.target-days {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.3rem;border:0;padding:0;margin:0;min-width:0;}
.target-kinds legend,.target-days legend {color:var(--muted);font-size:.88rem;padding:0;margin:0 0 .4rem;}
.target-kinds label,.target-days label {position:relative;cursor:pointer;min-width:0;}
.target-kinds input,.target-days input {position:absolute;opacity:0;inset:0;margin:0;cursor:pointer;}
.target-kinds span,.target-days span {background:var(--surface);border-radius:11px;display:flex;align-items:center;justify-content:center;gap:.28rem;min-height:44px;font-size:.88rem;}
.target-kinds span {flex-direction:column;min-height:55px;}
.target-kinds svg {width:18px;height:18px;}
.target-days {grid-template-columns:repeat(7,minmax(0,1fr));}
.target-kinds input:checked+span,.target-days input:checked+span {background:var(--accent-soft,var(--raised));color:var(--accent);box-shadow:inset 0 0 0 1px currentColor;}
.target-kinds input:focus-visible+span,.target-days input:focus-visible+span {outline:2px solid var(--accent);outline-offset:2px;}
.target-recap {border-radius:12px;padding:.8rem .95rem;background:var(--surface);color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums;}
.goal-dialog [data-workout-hint],.target-summary>small {display:block;color:var(--muted);font-size:.86rem;margin-top:.3rem;}
.goal-dialog input:disabled,.goal-dialog select:disabled {opacity:.8;}
.target-row {display:flex;align-items:center;gap:.25rem;min-width:0;}
.target-row .lib-open {flex:1;min-width:0;}
.target-row .lib-open>span:last-child {min-width:0;overflow-wrap:anywhere;}
.target-row .lib-open small {display:block;color:var(--muted);}
.target-row .lib-button,.target-row .icon-button {flex:none;}
.target-summary {display:grid;gap:.6rem;}
.target-total {font-size:clamp(1.25rem,4vw,1.8rem);letter-spacing:-.04em;font-variant-numeric:tabular-nums;}
.target-summary progress {width:100%;height:6px;border:0;border-radius:8px;overflow:hidden;appearance:none;background:var(--surface);accent-color:var(--accent);}
.target-summary progress::-webkit-progress-bar {background:var(--surface);}
.target-summary progress::-webkit-progress-value {border-radius:8px;background:var(--accent);}
.target-streak {display:flex;gap:1.25rem;color:var(--muted);font-size:.89rem;}
.target-streak b {color:var(--ink);font-variant-numeric:tabular-nums;}
.goal-dialog .form-error:empty {display:none;}
@media(max-width:500px){.goal-dialog .lib-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.goal-dialog [name=start]{min-width:0;}.goal-dialog .lib-body{gap:.75rem;}}
.target-summary.lib-record {padding:clamp(.85rem,3vw,1.2rem);border-radius:16px;background:var(--surface);}
.target-summary .lib-button,.target-summary progress,.target-summary progress::-webkit-progress-bar {background:var(--bg);}
.goal-dialog select:disabled {appearance:none;color:var(--ink);}
