.jr-shell {
    --jr-ink: #203d34;
    --jr-muted: #596c63;
    --jr-line: #dce3db;
    --jr-green: #234f42;
    color: var(--jr-ink);
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 56px;
    box-sizing: border-box;
}
.jr-shell *, .jr-shell *::before, .jr-shell *::after { box-sizing: border-box; }
.jr-shell button, .jr-shell input { font: inherit; }
.jr-shell button { cursor: pointer; }
.jr-shell button:disabled, .jr-shell input:disabled { cursor: default; }
.jr-shell button:focus-visible, .jr-shell input:focus-visible, .jr-shell a:focus-visible {
    outline: 3px solid #59927a;
    outline-offset: 3px;
}
.jr-icon { width: 20px; height: 20px; display: inline-block; flex: none; vertical-align: middle; }
.jr-view-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--jr-line); }
.jr-view-nav { display: flex; gap: 25px; }
@media (max-width: 555px) {
    .jr-view-bar { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
}
.jr-view-nav button {
    color: var(--jr-muted); background: transparent; padding: 9px 2px 12px; position: relative;
    display: inline-flex; align-items: center; gap: 7px; border: 0; font-weight: 600; font-size: .94rem;
}
.jr-view-nav button:hover, .jr-view-nav button.jr-view-active { color: var(--jr-green); }
.jr-view-active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: var(--jr-green); border-radius: 4px 4px 0 0; }
.jr-view-nav .jr-icon { width: 17px; height: 17px; }
.jr-toolbar { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; padding: 8px 14px 8px 8px; border-radius: 13px; background: var(--jr-green); }
.jr-status { display: inline-flex; align-items: center; gap: 6px; color: #e2eee4; font-size: .82rem; white-space: nowrap; }
.jr-status .jr-icon { width: 17px; height: 17px; }
.jr-date-picker { position: relative; }
.jr-date-controls { display: inline-flex; align-items: center; gap: 3px; }
.jr-arrow, .jr-date-button {
    border: 1px solid var(--jr-line); color: var(--jr-ink); background: #fff;
    min-height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
}
.jr-arrow { width: 35px; padding: 0; }
.jr-arrow .jr-icon { width: 15px; height: 15px; }
.jr-date-button { padding: 0 11px; gap: 8px; font-size: .88rem !important; font-weight: 620 !important; }
.jr-date-button .jr-icon { width: 15px; height: 15px; }
.jr-date-button .jr-icon:last-child { width: 12px; height: 12px; }
.jr-date-short { display: none; }
.jr-date-controls { white-space: nowrap; }
.jr-date-controls button { border-color: #638377; background: #315d50; color: #fff; }
.jr-date-controls button:focus-visible { outline-color: #d3efb1; }
.jr-arrow:hover:not(:disabled), .jr-date-button:hover { background: #edf2eb; }
.jr-date-controls button:hover:not(:disabled) { background: #426d5e; }
.jr-calendar-dismiss { position: fixed; inset: 0; z-index: 20; background: transparent; border: none; cursor: default !important; }
.jr-calendar { position: absolute; top: calc(100% + 6px); left: 0; z-index: 21; background: #fff; border: 1px solid var(--jr-line); border-radius: 15px; padding: 12px; width: min(292px, 88vw); box-shadow: 0 12px 35px #183d3026; }
.jr-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.jr-calendar-head strong { font-size: .95rem; }
.jr-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jr-calendar-grid > span { color: var(--jr-muted); font-size: .74rem; padding: 5px 0; }
.jr-calendar-grid > button, .jr-calendar-today { border: 0; background: transparent; color: var(--jr-ink); border-radius: 7px; min-height: 33px; }
.jr-calendar-grid > button:hover { background: #edf2eb; }
.jr-calendar-grid .jr-selected-day { background: var(--jr-green); color: white; }
.jr-calendar-grid .jr-selected-day:hover { background: #153d30; }
.jr-calendar-grid .jr-today { box-shadow: inset 0 0 0 1px #91b6a0; }
.jr-calendar-today { display: block; width: 100%; margin-top: 6px; font-weight: 600 !important; background: #edf2eb; }
.jr-progress-band { display: flex; align-items: center; gap: 14px; margin-left: auto; color: white; }
.jr-progress-text { white-space: nowrap; font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.jr-segments { display: flex; gap: 4px; width: clamp(50px, 9vw, 110px); }
.jr-segments span { height: 6px; background: #527165; border-radius: 6px; flex: 1; }
.jr-segments span.jr-segment-on { background: #c1e39a; }
.jr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.jr-card {
    --jr-accent: #406d53; --jr-tint: #e9f1e5;
    margin: 0; padding: 17px 18px 16px; border-radius: 16px; border: 1px solid var(--jr-line); background: #fff;
    display: flex; flex-direction: column; min-width: 0;
}
.jr-card.jr-moon { --jr-accent: #685790; --jr-tint: #efebf5; }
.jr-card.jr-water { --jr-accent: #36778a; --jr-tint: #e4f2f5; }
.jr-card.jr-calories { --jr-accent: #aa613d; --jr-tint: #fbecdf; }
.jr-card.jr-steps { --jr-accent: #487956; --jr-tint: #e7f2e7; }
.jr-card.jr-workout { --jr-accent: #9a6b22; --jr-tint: #faf0d7; }
.jr-card.jr-stairs { --jr-accent: #8d5f73; --jr-tint: #f5eaf0; }
.jr-card.jr-weight {
    --jr-accent: #476b71; --jr-tint: #e6eff0;
    grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 16px;
}
.jr-weight .jr-card-heading { flex-wrap: nowrap; }
.jr-weight .jr-value-line { margin: 0; }
.jr-card-heading { display: flex; align-items: center; gap: 10px; }
.jr-calories .jr-card-heading { column-gap: 6px; }
.jr-food-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.jr-water, .jr-calories, .jr-workout { container-type: inline-size; }
@container (max-width: 13.5rem) {
    .jr-calories .jr-card-heading:has(.picker-add) { display: grid; grid-template-columns: 1fr auto; }
    .jr-calories .jr-card-heading:has(.picker-add) > h3 { grid-column: 1 / -1; grid-row: 2; }
}
@container (max-width: 10.5rem) {
    .jr-card-heading:has(.picker-add) { display: grid; grid-template-columns: 1fr auto; }
    .jr-card-heading:has(.picker-add) h3 { grid-column: 1 / -1; grid-row: 2; }
}
.jr-card-heading h3 { margin: 0; font-size: 1.06rem; letter-spacing: -.02em; line-height: 1.15; font-weight: 680; }
.jr-icon-tile { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: var(--jr-accent); background: var(--jr-tint); border-radius: 11px; }
.jr-icon-tile .jr-icon { width: 21px; height: 21px; }
.jr-stairs .jr-card-heading { margin-bottom: 8px; }
.jr-sleep-guide { margin-top: auto; color: var(--jr-muted); font-size: .78rem; }
.jr-stair-counter {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px;
    width: 100%; margin-top: auto; padding: 3px; border-radius: 10px; background: var(--jr-tint);
}
.jr-stair-counter button {
    display: grid; place-items: center;
    width: 34px; min-height: 34px; padding: 0; border-radius: 8px; border: 1px solid #d5c7cf;
    background: white; color: var(--jr-accent);
}
.jr-stair-counter .jr-icon { display: block; width: 18px; height: 18px; stroke-width: 2; }
.jr-stair-counter button:disabled { color: #8d878b; background: #f4eff2; border-color: #e1d8dd; }
.jr-stair-counter button:hover:not(:disabled) { background: #fcf9fb; border-color: var(--jr-accent); }
.jr-stair-counter output { text-align: center; font-weight: 650; color: var(--jr-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.jr-value-line { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 4px; }
.jr-value-line > span { font-size: .83rem; color: var(--jr-muted); }
.jr-amount {
    appearance: textfield; -moz-appearance: textfield; border: 0; border-bottom: 1px dashed #b6c8b9; border-radius: 0;
    background: transparent; color: var(--jr-ink); font-size: 1.72rem !important; font-weight: 650 !important; line-height: 1.2 !important;
    font-variant-numeric: tabular-nums; letter-spacing: -.035em; min-width: 0; width: 6ch; padding: 0 1px;
}
.jr-amount::-webkit-inner-spin-button, .jr-amount::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.jr-amount:disabled { border-color: transparent; opacity: 1; -webkit-text-fill-color: currentColor; }
.jr-amount::placeholder { color: #86978d; }
.jr-goal { margin-top: 5px; color: var(--jr-muted); font-size: .78rem; }
.jr-meter { height: 5px; margin: 9px 0 5px; border-radius: 5px; background: var(--jr-tint); overflow: hidden; }
.jr-meter span { display: block; height: 100%; background: var(--jr-accent); border-radius: inherit; }
.jr-meter.jr-over span { background: #b35a45; }
.jr-over-label { color: #93452d; }
.jr-toast {
    position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(460px, calc(100% - 32px));
    padding: 12px 12px 12px 16px; background: #fffaf6; border: 1px solid #d6b8a6; border-left: 4px solid #ab6041;
    border-radius: 12px; color: #633c2b; box-shadow: 0 5px 25px #30241d26; font-size: .9rem; line-height: 1.4;
}
.jr-toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jr-toast button, .jr-load-again { border: 0; border-radius: 6px; background: transparent; color: inherit; }
.jr-toast button:hover { background: #f3e7df; }
.jr-toast-action, .jr-load-again { padding: 6px 4px; font-weight: 600 !important; text-decoration: underline; }
.jr-toast-close { flex: none; width: 34px; min-height: 34px; line-height: 1; font-size: 1.35rem !important; }
.jr-load-again { color: var(--jr-green); margin-top: 12px; }
.jr-loading { padding: 16px 0; color: var(--jr-muted); }
@media (max-width: 820px) {
    .jr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .jr-date-long { display: none; }
    .jr-date-short { display: inline; }
    .jr-status span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 540px) {
    .jr-shell { width: calc(100% - 28px); padding: 17px 0 36px; }
    .jr-toolbar { margin: 12px 0 10px; padding: 5px 8px 5px 5px; gap: 6px; }
    .jr-date-controls { gap: 2px; }
    .jr-date-controls .jr-arrow { width: 28px; }
    .jr-date-button { padding: 0 5px; gap: 4px; font-size: .80rem !important; }
    .jr-date-button .jr-icon:last-child { display: none; }
    .jr-progress-band { gap: 6px; }
    .jr-progress-text { font-size: .83rem; }
    .jr-segments { width: clamp(27px, 8vw, 40px); gap: 2px; }
    .jr-cards { gap: 8px; }
    .jr-cards > .jr-moon, .jr-cards > .jr-stairs { grid-column: 1 / -1; }
    .jr-card { padding: 12px 10px; border-radius: 12px; }
    .jr-card-heading { gap: 6px; flex-wrap: wrap; }
    .jr-card-heading h3 { font-size: .94rem; }
    .jr-icon-tile { width: 26px; height: 26px; border-radius: 8px; }
    .jr-icon-tile .jr-icon { width: 17px; height: 17px; }
    .jr-goal { font-size: .73rem; }
    .jr-amount { font-size: 1.45rem !important; width: 5.3ch; }
    .jr-value-line { gap: 4px; }
    .jr-value-line > span { font-size: .76rem; }
}
@media (max-width: 355px) {
    .jr-date-button .jr-icon { display: none; }
    .jr-cards { grid-template-columns: 1fr; }
}
