:root {
    color-scheme: dark;
    --font-primary: "Oxanium", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #0b0b14;
    --panel: #151522;
    --line: #29283c;
    --text: #f4f2ff;
    --muted: #9b9ab1;
    --purple: #a855f7;
    --cyan: #06d6f0;
    --green: #5ce1a5;
    --radius: 6px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: radial-gradient(ellipse at top right, #24123c 0, transparent 36%), var(--bg);
    font-family: var(--font-primary);
    color: var(--text)
}

button,
input {
    font: inherit
}

.app {
    max-width: 620px;
    margin: 0 auto;
    padding: calc(22px + env(safe-area-inset-top)) 18px calc(100px + env(safe-area-inset-bottom))
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 2px 22px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--cyan);
    margin: 0 0 6px
}

.top h1 {
    font-size: 31px;
    letter-spacing: -1.5px;
    margin: 0
}

.top h1 span,
.xp-number span {
    color: #d8b4fe
}

.level-badge {
    width: 58px;
    height: 58px;
    border: 1px solid #8b45d8;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #251338;
    box-shadow: 0 0 22px #a855f722
}

.level-badge small {
    font-size: 9px;
    color: #d8b4fe
}

.level-badge strong {
    font-size: 21px;
    line-height: 1.1
}

.panel {
    background: linear-gradient(145deg, #191927, #12121e);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 28px #0002
}

.hero {
    border-color: #51316e;
    background: linear-gradient(135deg, #211532, #131622 70%)
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.muted {
    color: var(--muted);
    font-size: 12px;
    margin: 0
}

.xp-number {
    font-size: 29px;
    letter-spacing: -1px
}

.streak {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 7px;
    align-items: center
}

.streak span {
    font-size: 22px;
    grid-row: span 2
}

.streak b {
    font-size: 20px
}

.streak small {
    grid-column: 2;
    color: var(--muted);
    font-size: 10px
}

.progress {
    height: 9px;
    border-radius: 99px;
    background: #30263c;
    overflow: hidden;
    margin-top: 17px
}

.progress div {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    border-radius: 99px;
    transition: width .25s
}

.tiny {
    font-size: 10px;
    margin-top: 7px
}

.rank-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-color: #5e3a78;
    background: linear-gradient(135deg, #211532, #151522)
}

.rank-emblem {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 1px solid #c084fc;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 25%, #e9d5ff, #7e22ce 55%, #24103c);
    box-shadow: 0 0 22px #a855f755;
    color: #fff;
    font-weight: 900;
    font-size: 17px
}

.rank-card h2 {
    margin: 0 0 4px;
    font-size: 20px;
    letter-spacing: -.4px
}

.rank-card .eyebrow {
    margin-bottom: 4px
}

.rank-card .muted {
    line-height: 1.4
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 27px 3px 12px
}

.section-head h2 {
    font-size: 20px;
    margin: 0;
    letter-spacing: -.5px
}

.date {
    font-size: 11px;
    color: var(--muted)
}

.missions {
    padding: 7px 16px
}

.mission {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #29283a
}

.mission:last-child {
    border: 0
}

.check {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    border: 1px solid #4b4961;
    border-radius: 8px;
    background: #1a1a29;
    color: transparent;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer
}

.mission.done .check {
    background: var(--green);
    border-color: var(--green);
    color: #08150f
}

.mission-copy {
    flex: 1
}

.mission-copy strong {
    display: block;
    font-size: 13px
}

.mission-copy small {
    font-size: 11px;
    color: var(--muted)
}

.reward {
    font-size: 11px;
    color: #d8b4fe;
    font-weight: 800
}

.mission.done .mission-copy strong {
    text-decoration: line-through;
    color: var(--muted)
}

.rewards-settings {
    padding: 16px
}

.rewards-settings>p {
    line-height: 1.45;
    margin-bottom: px
}

.lp-settings {
    display: grid;
    gap: 2px
}

.reward-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #29283a
}

.reward-setting:last-child {
    border: 0;
    padding-bottom: 1px
}

.reward-setting strong,
.reward-setting small {
    display: block
}

.reward-setting strong {
    font-size: 12px
}

.reward-setting small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px
}

.lp-input {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d8b4fe;
    font-size: 11px
}

.lp-input input {
    width: 62px;
    border: 1px solid #514366;
    border-radius: 9px;
    background: #11111c;
    color: var(--text);
    padding: 7px 5px;
    text-align: center;
    font-weight: 800;
    outline: none
}

.lp-input input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px #a855f722
}

.lp-input b {
    font-size: 10px
}

.workout {
    display: flex;
    gap: 12px;
    align-items: center
}

.workout-icon {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    background: #25203b;
    display: grid;
    place-items: center;
    font-size: 22px
}

.workout-info {
    flex: 1;
    min-width: 0
}

.workout h3 {
    font-size: 14px;
    margin: 0 0 4px
}

.tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 9px
}

.tags span {
    font-size: 9px;
    color: #d7c5f4;
    background: #29203b;
    border-radius: 99px;
    padding: 5px 7px
}

.workout-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex-shrink: 0
}

.secondary,
.danger,
.import-label {
    border: 1px solid #49415c;
    border-radius: 11px;
    background: #211c30;
    color: var(--text);
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer
}

.danger {
    color: #ff9baf;
    background: #2c1824;
    border-color: #633247
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.stat {
    padding: 14px 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.stat span {
    font-size: 25px;
    color: var(--cyan);
}

.stat strong {
    font-size: 20px;
}

.stat small {
    font-size: 12px;
    color: var(--muted);
}

.tools p {
    line-height: 1.5
}

.tool-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px
}

.import-label {
    display: inline-flex;
    align-items: center
}

.import-label input {
    display: none
}

footer {
    text-align: center;
    color: #66657c;
    font-size: 10px;
    padding: 22px
}

.bottom-nav {
    position: fixed;
    z-index: 5;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 100%);
    display: flex;
    justify-content: space-around;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    background: #10101def;
    backdrop-filter: blur(18px);
    border-top: 1px solid #2a293b
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #77768e;
    text-decoration: none;
    font-size: 18px;
    min-width: 65px
}

.bottom-nav a small {
    font-size: 10px
}

.bottom-nav a.active {
    color: var(--cyan)
}

@media(min-width:560px) {
    .app {
        padding-top: 32px
    }

    .top h1 {
        font-size: 36px
    }
}
