.goals-page { display:flex;flex-direction:column;flex:1;min-height:0; }
.goals-page > :not(.goals-grid) { flex-shrink:0; }
.goals-heading { display:flex;align-items:center;gap:18px;margin:0 0 13px; }
.goals-heading h1 { font-size:25px;letter-spacing:-.8px;margin:0;font-weight:650; }
.goals-heading > .primary-button { display:flex;align-items:center;gap:6px;font-size:11px;min-height:34px;padding:8px 13px;margin-left:auto; }
.goals-heading > .primary-button svg { width:14px;height:14px; }
.goals-stats { display:flex;align-items:center;gap:16px;font-size:10px;color:#8b9d91; }
.goals-stats > span { white-space:nowrap; }
.goals-stats strong { font-size:14px;font-weight:650;color:#3d654b;margin-right:4px; }
.goals-yearbar { display:flex;align-items:center;gap:8px;margin-bottom:10px;min-height:32px; }
.goals-year-control { display:flex;align-items:center;gap:3px; }
.goals-year-control .icon-button { width:28px;height:28px;background:#fff; }
.goals-year-control svg { width:14px;height:14px; }
#goals-year { appearance:textfield;width:67px;border:0;padding:3px;background:none;text-align:center;font-size:21px;letter-spacing:-.7px;color:#31533e;font-weight:600; }
#goals-year::-webkit-inner-spin-button,#goals-year::-webkit-outer-spin-button { appearance:none; }
.goals-year-shortcut { padding:7px 11px;background:#fff;color:#82998a;border-radius:17px;font-size:10px;white-space:nowrap; }
.goals-year-shortcut[aria-pressed="true"] { color:var(--green);background:var(--soft); }
.goal-year-short { display:none; }
#goals-year-note { font-size:10px;color:#8da394;margin-left:auto; }
.goals-history { position:relative;min-width:0; }
.goals-history summary { cursor:pointer;display:flex;align-items:center;gap:5px;padding:7px 10px;font-size:10px;color:#789683;border-radius:17px;background:#fff;list-style:none; }
.goals-history summary::-webkit-details-marker { display:none; }
.goals-history summary svg { width:12px;height:12px; }
.goals-history[open] summary { background:var(--soft);color:var(--green); }
.goals-history-years { position:absolute;top:calc(100% + 6px);left:0;width:230px;max-width:calc(100vw - 28px);max-height:290px;overflow:auto;z-index:9;background:#fff;border:1px solid #e6ede8;border-radius:15px;padding:6px;box-shadow:0 12px 35px #1a4a2b14; }
.goals-history-years button { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 10px;font-size:11px;border-radius:10px; }
.goals-history-years button span { color:#8ca193;font-size:10px; }
.goals-history-years button:hover,.goals-history-years button[aria-pressed="true"] { background:var(--soft); }
.goals-history-years p { font-size:11px;color:#8da192;padding:8px;line-height:1.7; }
.goals-filterbar { display:flex;align-items:center;gap:8px;margin-bottom:12px;min-height:31px; }
.goal-label-filters { display:flex;align-items:center;gap:6px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#c0d2c5 transparent; }
.goal-label-filter { display:flex;align-items:center;gap:5px;flex-shrink:0;white-space:nowrap;border:1px solid transparent;border-radius:17px;padding:7px 10px;font-size:10px;color:#7d9485;background:#fff;max-width:210px; }
.goal-label-filter > span { overflow:hidden;text-overflow:ellipsis; }
.goal-label-filter small { font-size:9px;color:#98aaa0; }
.goal-label-filter i { width:5px;height:5px;border-radius:50%;background:var(--goal-filter-color,#719780);flex-shrink:0; }
.goal-label-filter[aria-pressed="true"] { background:var(--goal-filter-bg,var(--soft));border-color:var(--goal-filter-color,#9ac9ae);color:var(--goal-filter-color,var(--green)); }
#goals-status-filter { min-width:114px;max-width:140px;border:0;border-radius:17px;padding:7px 9px;background:#fff;font-size:10px;color:#7d9485; }
.goals-grid { display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:12px;overflow-x:auto;overflow-y:hidden;min-height:0;flex:1;padding:0 1px 4px;scrollbar-width:thin;scrollbar-color:#c0d2c5 transparent;overscroll-behavior:contain; }
.goal-year-column { display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#eaf0eb;border:1px solid #e3ebe5;border-radius:18px; }
.goal-year-column.is-current-year { background:#e6efe8;border-color:#d1e2d6; }
.goal-year-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 15px 12px;flex-shrink:0; }
.goal-year-heading h2 { display:flex;align-items:center;gap:9px;font-size:23px;letter-spacing:-.6px;font-weight:650;color:#36563f;margin:0; }
.goal-year-heading h2 span { font-size:10px;font-weight:500;letter-spacing:0;color:#8a9b8f;background:#fff9;border-radius:9px;padding:3px 6px; }
.goal-year-heading p { color:#829688;font-size:10px;margin:3px 0 0; }
.goal-year-add { display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#fff9;color:#6c8c77;flex-shrink:0; }
.goal-year-add svg { width:15px;height:15px; }
.goal-year-add:hover { background:#fff;color:var(--green); }
.goal-year-list { display:flex;flex-direction:column;gap:9px;min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;padding:1px 9px 9px;scrollbar-width:thin;scrollbar-color:#bccfc1 transparent;overscroll-behavior:contain; }
.goal-year-list > .goal-card { flex-shrink:0; }
.goal-column-add { display:flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;padding:11px;font-size:10px;color:#779582;border-top:1px solid #dce7df;background:#ffffff35; }
.goal-column-add svg { width:13px;height:13px; }
.goal-column-add:hover { background:#ffffff80;color:var(--green); }
.goal-card { position:relative;display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid #e5ece7;border-radius:13px;padding:12px;transition:box-shadow .15s; }
.goal-card:before { content:'';position:absolute;left:13px;right:13px;top:0;height:2px;border-radius:0 0 4px 4px;background:var(--goal-tint); }
.goal-card:hover { box-shadow:0 5px 18px #29493308; }
.goal-card-top { display:flex;align-items:flex-start;gap:5px; }
.goal-main { display:flex;align-items:flex-start;gap:8px;text-align:left;min-width:0;flex:1;padding:0; }
.goal-main strong { font-size:15px;line-height:1.45;font-weight:700;color:#294633;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;padding-top:2px; }
.goal-card-icon { display:grid;place-items:center;background:var(--goal-tint);color:var(--goal-color);width:28px;height:28px;flex-shrink:0;border-radius:9px; }
.goal-card-icon svg { width:17px;height:17px; }
.goal-drag-handle { display:grid;place-items:center;width:22px;height:28px;flex-shrink:0;color:#a5b5aa;touch-action:none;cursor:grab;border-radius:7px;padding:3px; }
.goal-drag-handle svg { width:16px;height:16px; }
.goal-drag-handle:hover { color:var(--green);background:var(--soft); }
.goal-card-description { color:#8a9b90;font-size:10px;line-height:1.5;margin:7px 0 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden; }
.goal-criterion { display:flex;align-items:baseline;gap:5px;margin-top:5px;font-size:10px;color:#82978a;min-width:0; }
.goal-criterion > span { color:#9aad9e;font-size:8px;flex-shrink:0; }
.goal-criterion p { margin:0;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.goal-card-bottom { margin-top:auto;padding-top:11px; }
.goal-progress-line { display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px; }
.goal-progress-line > strong { font-size:13px;color:var(--goal-color);letter-spacing:-.3px;font-weight:600; }
.goal-progress-line > strong > span { font-size:9px;margin-left:1px;letter-spacing:0; }
.goal-status { display:inline-flex;align-items:center;gap:4px;font-size:9px;padding:4px 7px;border-radius:10px;color:#8c9c91;background:#f4f7f4;white-space:nowrap; }
.goal-status svg { width:12px;height:12px; }
.goal-status.status-active { color:#4e8d6d;background:#edf7f1; }
.goal-status.status-achieved { color:#0a8c59;background:#e4f4eb; }
.goal-status.status-paused { color:#a0834e;background:#faf5e9; }
.goal-progress-track { height:3px;overflow:hidden;border-radius:6px;background:#edf2ee; }
.goal-progress-track > span { display:block;height:100%;background:var(--goal-color);border-radius:6px;transition:width .2s; }
.goal-card-meta { display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:8px;min-width:0;font-size:9px;color:#8da192; }
.goal-direction { display:flex;align-items:center;gap:5px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0;max-width:50%; }
.goal-direction i { width:5px;height:5px;border-radius:50%;background:var(--goal-color);flex-shrink:0; }
.goal-deadline { display:flex;align-items:center;gap:3px;white-space:nowrap;min-width:0; }
.goal-deadline svg { width:11px;height:11px; }
.goal-deadline.overdue { color:#ab8a62; }
.goal-card.goal-achieved { background:#f1f3f1;border-color:#e1e6e2;--goal-color:#9ba69e!important;--goal-tint:#e5eae6!important; }
.goal-achieved .goal-main strong { text-decoration:line-through;text-decoration-thickness:1px;color:#859088;font-weight:600; }
.goal-achieved .goal-card-icon,.goal-achieved .goal-progress-line > strong { color:#98a39b; }
.goal-achieved .goal-status { color:#88978d;background:#e8ede9; }
.goal-achieved .goal-card-description,.goal-achieved .goal-criterion,.goal-achieved .goal-card-meta { color:#9aa59e; }
.goal-achieved .goal-drag-handle { color:#b0bab3; }
.goals-empty { display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:160px;width:100%;text-align:center;color:#96a99b;padding:16px; }
.goals-empty > svg { width:28px;height:28px;color:#abc1b2;margin-bottom:11px; }
.goals-empty h3 { font-size:13px;color:#7b9383;margin:0;font-weight:550; }
.goals-empty p { font-size:10px;line-height:1.7;margin:7px 0 13px; }
.goals-empty button { font-size:10px;color:#6d947d;background:#fff; }
.goals-footer { display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:21px;font-size:10px;color:#8fa394;margin-top:6px; }
#goals-feedback { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#goals-feedback button { color:var(--green);font-size:10px;text-decoration:underline; }
#goals-visible-count { white-space:nowrap; }
.goal-dialog { padding:24px; }
.goal-dialog .dialog-heading { margin-bottom:15px; }
.goal-dialog label { margin:12px 0 6px;font-size:11px; }
.goal-dialog select,.goal-dialog input:not([type="range"]):not([type="checkbox"]),.goal-dialog textarea { min-width:0;width:100%;border:1px solid #e4ebe6;border-radius:11px;background:var(--wash);padding:9px 11px;color:#3a5143;font-size:13px; }
.goal-dialog textarea { min-height:52px; }
.goal-form-pair { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.goal-form-pair > div { min-width:0; }
.goal-form-pair .optional { font-size:9px;margin-left:3px; }
.goal-icon-control { display:flex;align-items:center;gap:12px; }
.goal-icon-preview { display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;border-radius:14px;background:var(--soft);color:var(--green); }
.goal-icon-preview svg { width:25px;height:25px; }
.goal-icon-control > div { display:flex;flex-direction:column;align-items:flex-start;gap:6px; }
#goal-icon-name { font-size:11px;color:#7a9585; }
#choose-goal-icon-text { font-size:10px;color:var(--green);text-decoration:underline;padding:0; }
.goal-form-hint { font-size:10px;line-height:1.7;color:#8ba191;margin:7px 0 0; }
.goal-progress-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px; }
.goal-progress-heading label { margin:0; }
.goal-progress-inputs { display:flex;align-items:center;gap:14px;margin-top:8px; }
#goal-progress-range { min-width:0;flex:1;accent-color:var(--green);margin:0; }
.goal-progress-inputs > div { display:flex;align-items:center;gap:5px;color:#7e9988;font-size:12px;width:83px;flex-shrink:0; }
.goal-dialog #goal-progress { text-align:center;padding-inline:7px; }
.goal-dialog .goal-pause-toggle { display:flex;align-items:center;gap:7px;font-weight:400; }
#goal-paused { margin:0;width:15px;height:15px;accent-color:var(--green); }
.goal-dialog .dialog-actions { margin-top:18px;padding-top:16px; }
.goal-icon-dialog { width:490px;padding:24px; }
.goal-icon-dialog .dialog-heading { margin-bottom:18px; }
#goal-icon-search { width:100%;background:var(--wash);border:1px solid #e4ebe6;border-radius:12px;padding:12px;font-size:13px;color:#3a5143; }
.goal-icons-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:17px;max-height:330px;overflow:auto;padding:3px;scrollbar-width:thin; }
.goal-icons-grid button { display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:12px 5px 9px;border-radius:13px;border:1px solid transparent;background:#f7f9f7;color:#7f9a89; }
.goal-icons-grid button svg { width:25px;height:25px; }
.goal-icons-grid button span { width:100%;font-size:8px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap; }
.goal-icons-grid button:hover,.goal-icons-grid button[aria-pressed="true"] { border-color:#92c4a6;color:var(--green);background:var(--soft); }
.goal-dragging { opacity:.35; }
.goal-drop-before { box-shadow:inset 0 3px var(--green); }
.goal-drop-after { box-shadow:inset 0 -3px var(--green); }
.goal-drag-ghost { position:fixed;z-index:20;pointer-events:none;opacity:.92;box-shadow:0 15px 35px #23493228;transform:rotate(1deg);margin:0; }
@media(max-width:820px) {
  .goals-heading { gap:8px;margin-bottom:9px;flex-wrap:wrap; }
  .goals-heading h1 { font-size:22px; }
  .goals-heading > .primary-button { padding:7px 10px;min-height:32px;font-size:10px; }
  .goals-stats { order:3;flex-basis:100%;gap:13px;font-size:9px; }
  .goals-stats strong { font-size:12px; }
  .goals-yearbar { gap:4px;margin-bottom:8px;flex-wrap:wrap; }
  #goals-year { width:55px;font-size:19px; }
  .goals-year-control .icon-button { width:25px;height:27px; }
  .goals-year-shortcut { padding:7px 8px;font-size:9px; }
  .goal-year-wide { display:none; }
  .goal-year-short { display:inline; }
  .goals-history summary { padding:7px 8px;font-size:9px; }
  #goals-year-note { display:none; }
  .goals-history-years { left:0;right:auto;width:220px; }
  .goals-filterbar { flex-wrap:wrap;gap:6px;margin-bottom:8px; }
  .goal-label-filters { flex-basis:100%;order:0; }
  .goal-label-filter { padding:7px 9px;font-size:9px;min-height:30px; }
  #goals-status-filter { padding:7px 9px;font-size:10px;min-height:29px;max-width:160px; }
  #goals-manage-labels { margin-left:auto;min-height:29px;font-size:9px; }
  .goals-grid { grid-template-columns:repeat(3,minmax(min(285px,calc(100vw - 52px)),1fr));gap:10px;scroll-snap-type:x mandatory; }
  .goal-year-column { scroll-snap-align:start;border-radius:15px; }
  .goal-year-heading { padding:11px 12px 10px; }
  .goal-year-heading h2 { font-size:21px; }
  .goal-year-heading p { font-size:9px; }
  .goal-year-list { padding-inline:7px;gap:8px; }
  .goal-year-add { width:32px;height:32px; }
  .goal-card { padding:11px;border-radius:12px; }
  .goal-main strong { font-size:15px; }
  .goal-drag-handle { width:30px;height:32px; }
  .goal-card-bottom { padding-top:10px; }
  .goal-card-meta { font-size:9px; }
  .goal-drop-before { box-shadow:inset 0 3px var(--green); }
  .goal-drop-after { box-shadow:inset 0 -3px var(--green); }
  .goals-footer { font-size:9px; }
  #goals-feedback button { font-size:9px; }
  .goal-dialog,.goal-icon-dialog { padding:20px; }
  .goal-dialog select,.goal-dialog input:not([type="range"]):not([type="checkbox"]),.goal-dialog textarea,#goal-icon-search { font-size:16px; }
  .goal-dialog select,.goal-dialog input:not([type="range"]):not([type="checkbox"]) { min-height:42px; }
  .goal-form-pair { gap:8px; }
  .goal-form-pair label { font-size:10px; }
  .goal-form-pair .optional { display:block;font-size:9px;margin-left:0; }
  .goal-form-pair > div:first-child label { min-height:27px; }
  .goal-dialog .goal-pause-toggle { min-height:31px; }
  .goal-icons-grid { gap:5px;max-height:290px; }
  .goal-icons-grid button { padding:10px 4px 8px; }
  .goal-icons-grid button svg { width:23px;height:23px; }
}
