.goal-progress-widget {
    margin: 14px 16px 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 6px 20px rgba(0,20,60,.08);
    backdrop-filter: blur(14px) saturate(1.25);
}
.goal-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.goal-progress-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text, #1f2937);
}
.goal-edit-btn {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 999px;
    padding: 6px 12px;
    background: #fff;
    color: var(--color-primary, #0055a5);
    font-size: 12px;
    font-weight: 700;
}
.goal-progress-body { display: grid; gap: 8px; }
.goal-item {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(15,23,42,.06);
}
.goal-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}
.goal-item-title { font-weight: 700; color: var(--color-text, #1f2937); }
.goal-item-val { color: var(--color-primary, #0055a5); font-weight: 800; }
.goal-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148,163,184,.25);
    overflow: hidden;
}
.goal-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary-dark, #003d80), var(--color-primary, #0055a5));
}
.goal-empty {
    font-size: 13px;
    color: var(--color-text-muted, #6b7280);
    text-align: center;
    padding: 8px 4px;
}
[data-theme="dark"] .goal-progress-widget {
    background: var(--glass-bg);
    border-color: rgba(255,255,255,.12);
}


.goals-setup {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.goals-setup-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--color-text, #0f172a);
}
.goals-setup-head p {
    margin: 4px 0 0;
    font-size: .82rem;
    color: var(--color-text-muted, #64748b);
    line-height: 1.5;
}
.goals-setup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.goals-setup-item {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    padding: 11px;
}
.goals-setup-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
}
.goals-setup-check input[type="checkbox"] {
    margin-top: 2px;
}
.goals-setup-title {
    font-size: .91rem;
    font-weight: 700;
    color: var(--color-text, #111827);
    line-height: 1.3;
}
.goals-setup-desc {
    font-size: .78rem;
    color: var(--color-text-muted, #6b7280);
    margin-top: 2px;
    line-height: 1.45;
}
.goals-setup-target {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.goals-setup-target span {
    font-size: .78rem;
    color: var(--color-text-muted, #64748b);
}
.goals-setup-target input[type="number"] {
    width: 104px;
    min-height: 36px;
    border: 1px solid rgba(15,23,42,.14);
    border-radius: 10px;
    padding: 6px 10px;
    text-align: right;
    font-weight: 700;
    font-size: .9rem;
    color: var(--color-text, #111827);
    background: #fff;
}
.goals-setup-save {
    margin-top: 6px;
}

[data-theme="dark"] .goals-setup-head h2 { color: #e5e7eb; }
[data-theme="dark"] .goals-setup-head p { color: #94a3b8; }
[data-theme="dark"] .goals-setup-item {
    background: rgba(15,23,42,.62);
    border-color: rgba(255,255,255,.14);
}
[data-theme="dark"] .goals-setup-title { color: #f3f4f6; }
[data-theme="dark"] .goals-setup-desc,
[data-theme="dark"] .goals-setup-target span { color: #94a3b8; }
[data-theme="dark"] .goals-setup-target input[type="number"] {
    background: rgba(2,6,23,.7);
    border-color: rgba(255,255,255,.18);
    color: #f8fafc;
}
.notify-settings {
    --notify-green: #18b45b;
    --notify-card: #404854;
    color: #f8fafc;
    margin: -4px -4px 0;
}
.notify-settings-head {
    text-align: center;
    margin-bottom: 14px;
}
.notify-settings-title {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.25;
    font-weight: 900;
    color: #fff;
}
.notify-settings-note {
    margin: 5px 0 0;
    color: rgba(226,232,240,.76);
    font-size: .82rem;
    line-height: 1.45;
}
.notify-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 16px;
}
.notify-tab {
    min-height: 44px;
    border: 1px solid rgba(148,163,184,.26);
    border-radius: 14px;
    background: rgba(15,23,42,.34);
    color: rgba(241,245,249,.74);
    font-size: .78rem;
    line-height: 1.16;
    font-weight: 850;
    padding: 5px 7px;
}
.notify-tab.is-active {
    background: var(--notify-green);
    border-color: rgba(74,222,128,.92);
    color: #fff;
    box-shadow: 0 12px 24px rgba(22,163,74,.28);
}
.notify-panel {
    margin-top: 0;
    border: 4px solid var(--notify-green);
    border-radius: 26px;
    padding: 16px 14px 16px;
    background: #2e3744;
    box-shadow: 0 20px 48px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
}
.notify-panel-title {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    padding: 9px 20px 11px;
    border-radius: 18px;
    background: var(--notify-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
    text-align: center;
    line-height: 1.18;
}
.notify-card {
    border-radius: 13px;
    background: rgba(75,85,99,.72);
    padding: 13px 14px;
}
.notify-card + .notify-card {
    margin-top: 12px;
}
.notify-row,
.notify-time-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.notify-time-head {
    gap: 10px;
    margin-bottom: 13px;
}
.notify-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.notify-icon {
    width: 30px;
    flex: 0 0 30px;
    text-align: center;
    color: #fff;
    font-size: 1.28rem;
}
.notify-label,
.notify-time-title,
.notify-choice-title {
    color: #fff;
    font-weight: 900;
    font-size: .9rem;
    line-height: 1.25;
}
.notify-sub {
    color: rgba(226,232,240,.72);
    font-size: .72rem;
    margin-top: 2px;
}
.notify-switch {
    position: relative;
    display: inline-flex;
    width: 76px;
    height: 40px;
    flex: 0 0 76px;
}
.notify-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.notify-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #7b8491;
    transition: background .18s ease;
}
.notify-switch span::after {
    content: '';
    position: absolute;
    width: 34px;
    height: 34px;
    top: 3px;
    left: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.22);
    transition: transform .18s ease;
}
.notify-switch input:checked + span {
    background: #22c55e;
}
.notify-switch input:checked + span::after {
    transform: translateX(36px);
}
.notify-time-value {
    border-radius: 10px;
    background: rgba(31,41,55,.66);
    padding: 8px 13px;
    color: #fff;
    min-width: 72px;
    text-align: center;
    font-size: .98rem;
    font-weight: 900;
}
.notify-choice-title {
    margin: 9px 0 8px;
}
.notify-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 8px;
}
.notify-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(31,41,55,.28);
    color: #f8fafc;
    font-size: .9rem;
    font-weight: 850;
}
.notify-choice::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 3px solid #cbd5e1;
    box-sizing: border-box;
}
.notify-choice.is-selected::before {
    border-color: #42df7b;
    box-shadow: inset 0 0 0 3px #4b5563;
    background: #42df7b;
}
.notify-save,
.pwa-guide-ok {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(22,163,74,.24);
}
.notify-save {
    margin-top: 14px;
}
.notify-save:disabled {
    opacity: .72;
    cursor: wait;
}
.modal-sheet:has(.notify-settings) {
    background: #1a2029;
    border: 1px solid rgba(148,163,184,.16);
}
.modal-sheet:has(.pwa-guide) {
    background: #111827;
    border: 1px solid rgba(148,163,184,.2);
}
.pwa-guide {
    color: #f8fafc;
    text-align: center;
    padding: 4px 0 0;
}
.pwa-guide-icon {
    width: 58px;
    height: 58px;
    margin: 4px auto 12px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 16px 34px rgba(22,163,74,.3);
    font-size: 1.8rem;
}
.pwa-guide-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.24rem;
    line-height: 1.25;
    font-weight: 950;
}
.pwa-guide-content {
    color: rgba(226,232,240,.86);
    font-size: .94rem;
    line-height: 1.58;
    text-align: left;
}
.pwa-guide-content p {
    margin: 0 0 10px;
}
.pwa-guide-content p:last-child {
    margin-bottom: 0;
}
.pwa-guide-content img,
.pwa-guide-content video,
.pwa-guide-content iframe,
.pwa-guide-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    border-radius: 16px;
}
.pwa-guide-content figure {
    margin: 14px 0;
}
.pwa-guide-content a {
    color: #86efac;
    font-weight: 800;
}
.pwa-guide-figure {
    margin: 14px 0 0;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(15,23,42,.7);
}
.pwa-guide-actions {
    margin-top: 15px;
}
