.reward-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rewards-dialog::backdrop {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(1px);
}

.rewards-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
}

/* Keep the reflection controls fixed while only its reference quotes scroll. */
.reflection-dialog {
    max-height: 50vh;
    max-height: 50dvh;
    overflow: hidden;
}

.reflection-dialog__form {
    max-height: calc(50vh - 2rem);
    max-height: calc(50dvh - 2rem);
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}

.reflection-dialog__highlights {
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
}

.reflection-dialog__highlight-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

/* Keep the garden anchored while selected notes change its content height. */
.rewards-dialog.garden-dialog {
    --garden-dialog-top: clamp(0.5rem, 2vh, 1.25rem);
    top: var(--garden-dialog-top);
    bottom: auto;
    margin: 0 auto;
    max-height: calc(100vh - var(--garden-dialog-top) - 1rem);
    max-height: calc(100dvh - var(--garden-dialog-top) - 1rem);
}

.garden-dialog > section {
    max-height: calc(100vh - var(--garden-dialog-top) - 1rem);
    max-height: calc(100dvh - var(--garden-dialog-top) - 1rem);
}

.garden-canvas {
    filter: none !important;
}

.garden-remove-button .material-symbols-outlined {
    line-height: 1;
}

.reward-plant-radio {
    accent-color: var(--color-primary);
}

.reward-counting-dot {
    width: 0.35rem;
    height: 0.35rem;
    margin-top: 0.1rem;
    border-radius: 9999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.reward-counting-dot--active {
    background: #22c55e;
}

.reward-counting-dot--inactive {
    background: #ef4444;
}

/* Keep the current tree compact while its outline shows the current goal. */
.reward-garden-button--reading {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    padding: 0.25rem;
    overflow: hidden;
    border-color: transparent;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.reward-reading-progress,
.reward-reading-progress svg {
    display: block;
    width: 100%;
    height: 100%;
}

.reward-reading-progress.hidden {
    display: none;
}

.reward-reading-progress {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.reward-reading-progress__track,
.reward-reading-progress__value {
    fill: none;
    stroke-width: 1;
}

.reward-reading-progress__track {
    stroke: rgba(148, 163, 184, 0.38);
}

.reward-reading-progress__value {
    stroke: #22c55e;
    stroke-linecap: round;
    stroke-dasharray: 0 100;
    transition: stroke-dasharray 0.35s linear;
}

html.amoled-mode .reward-garden-button--reading {
    background: rgba(0, 0, 0, 0.82) !important;
}

.reward-garden-button--reading [data-tree-status] {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.reward-garden-button--reading [data-current-tree] {
    width: 1.75rem;
    height: 1.75rem;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.reward-garden-button--reading [data-counting-dot] {
    display: none;
}
