:root {
    --ink: #24364b;
    --muted: #536579;
    --paper: #fffdf8;
    --blue: #21496c;
    --red: #bd303e;
    --yellow: #f5c547;
    --line: #becbd2;
    font-family:
        "Trebuchet MS",
        ui-sans-serif,
        system-ui,
        -apple-system,
        sans-serif;
    color: var(--ink);
    background: #f2f5ee;
    font-synthesis: none;
    line-height: 1.5;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background-image: radial-gradient(#ccd7cc 0.8px, transparent 0.8px);
    background-size: 20px 20px;
}
button,
input,
select {
    font: inherit;
}
button,
a,
input,
select,
summary {
    touch-action: manipulation;
}
button {
    min-height: 44px;
    border: 2px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: 10px;
    padding: 11px 16px;
    cursor: pointer;
    box-shadow: 0 3px 0 #d9e1e3;
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.15s;
}
button:hover:not(:disabled) {
    background: #edf3f7;
    border-color: var(--blue);
}
button:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #d9e1e3;
}
button:disabled {
    background: #e9edf0;
    color: #637185;
    border-color: #c7d0d8;
    box-shadow: none;
    cursor: not-allowed;
}
a {
    color: var(--blue);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid #0b68b1;
    outline-offset: 4px;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px max(24px, calc((100vw - 1180px) / 2));
    border-top: 5px solid var(--red);
    border-bottom: 2px solid #d4dddf;
    background: var(--paper);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.brand-name {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}
.brand-name small {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--muted);
    font-weight: 700;
}
.pokeball {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 3px solid var(--ink);
    border-radius: 50%;
    background: linear-gradient(
        var(--red) 0 45%,
        var(--ink) 45% 55%,
        var(--paper) 55%
    );
    box-shadow: inset -4px -3px 0 #24364b14;
}
.pokeball::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34%;
    height: 34%;
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.privacy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #bdcfc2;
    border-radius: 8px;
    background: #eef5ed;
    font-size: 12px;
    font-weight: 700;
    color: #205e49;
}
main {
    max-width: 1240px;
    margin: auto;
    padding: 32px 30px 16px;
}
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 24px;
    padding: 8px 0 34px;
}
.hero-copy {
    min-width: 0;
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: var(--blue);
}
.edition {
    flex-shrink: 0;
    padding: 5px 9px;
    background: var(--yellow);
    color: #493c14;
    border: 1px solid #b9972d;
    border-radius: 5px;
    letter-spacing: 0.7px;
    box-shadow: 0 2px 0 #d6b649;
}
h1 {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: -1.7px;
    margin: 0 0 20px;
    font-weight: 900;
}
h1 span {
    color: var(--blue);
}
h1:focus {
    outline: none;
}
h2 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.4px;
}
h3 {
    font-size: 16px;
    line-height: 1.4;
    margin: 24px 0 12px;
}
p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}
.hero-description {
    max-width: 570px;
    margin: 0 0 22px;
    font-size: 16px;
}
.journey {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.journey li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}
.journey li span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #b8c7d4;
    border-radius: 50%;
    background: var(--paper);
    color: var(--blue);
    font:
        11px ui-monospace,
        monospace;
}
.hero-art {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 310px;
    isolation: isolate;
}
.orbit {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
}
.orbit-one {
    width: 270px;
    height: 270px;
    background: #f5c54745;
    border: 2px dashed #b79b45;
}
.orbit-two {
    width: 215px;
    height: 215px;
    background: #e1ead4;
    border: 1px solid #c1d0b6;
}
.spark {
    position: absolute;
    color: #88701d;
    font-size: 26px;
}
.spark-one {
    top: 28px;
    right: 31px;
}
.spark-two {
    left: 15px;
    bottom: 75px;
    font-size: 19px;
}
.walker {
    width: 184px;
    padding: 13px 15px 18px;
    border: 4px solid var(--ink);
    border-radius: 42px 42px 65px 65px;
    background: linear-gradient(#cb3b43 0 26%, var(--paper) 26%);
    box-shadow:
        8px 9px 0 #24364b1c,
        inset -5px -4px 0 #d8ddd6;
    transform: rotate(-9deg);
}
.walker-top,
.walker-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.walker-top {
    margin-bottom: 10px;
}
.walker-top span {
    width: 5px;
    height: 5px;
    background: #fffdf8b3;
    border-radius: 50%;
}
.walker-screen {
    display: flex;
    align-items: center;
    flex-direction: column;
    border: 4px solid #43534e;
    border-radius: 18px;
    background: #e6edcf;
    box-shadow: inset 0 3px 0 #bcc9a4;
    padding: 7px 4px;
}
.screen-label,
.screen-steps,
.walker-name {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    text-align: center;
    color: #43513c;
}
.screen-label {
    font-size: 9px;
    letter-spacing: 1px;
}
.electric-companion {
    width: 114px;
    height: 101px;
}
.screen-steps {
    font-size: 7px;
}
.walker-controls {
    gap: 11px;
    margin: 12px 0 7px;
}
.walker-controls span {
    width: 16px;
    height: 16px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: #d9e2df;
    box-shadow: 0 2px 0 #bbc7c3;
}
.walker-controls span:nth-child(2) {
    width: 24px;
    height: 24px;
    background: var(--yellow);
}
.walker-name {
    display: block;
    color: var(--ink);
    font-size: 7px;
    letter-spacing: 1.5px;
}
.art-note {
    position: absolute;
    bottom: -7px;
    right: 0;
    padding: 8px 11px;
    background: var(--paper);
    border: 1px solid #c5cfbf;
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    transform: rotate(3deg);
}
.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
}
.panel {
    min-width: 0;
    background: var(--paper);
    border: 2px solid var(--line);
    border-top: 5px solid var(--blue);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 5px 0 #d7dfdf;
}
.save-panel {
    border-top-color: var(--red);
}
.companion-panel {
    border-top-color: #c5a03b;
}
.recovery-panel {
    background: #f8faf7;
}
.recovery-panel h3 {
    margin: 0 0 8px;
}
.recovery-panel p {
    margin: 0 0 16px;
    font-size: 13px;
}
.section-title {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.step {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    font:
        700 13px ui-monospace,
        monospace;
    border: 2px solid var(--blue);
    border-radius: 8px;
    background: #eaf1f7;
    color: var(--blue);
    box-shadow: 0 2px 0 #c1d1df;
}
.save-panel .step {
    border-color: var(--red);
    color: var(--red);
    background: #fff0ed;
    box-shadow: 0 2px 0 #ecc7c4;
}
.companion-panel .step {
    border-color: #94701c;
    color: #654e14;
    background: #fff3c9;
    box-shadow: 0 2px 0 #e3d5a4;
}
.upload {
    display: block;
    background: #f0f5ee;
    border: 2px dashed #8aab97;
    padding: 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}
.upload-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}
.upload-ball {
    width: 27px;
    height: 27px;
    border-width: 2px;
}
.upload-ball::after {
    border-width: 2px;
}
.upload-hint {
    display: block;
    margin-top: 9px;
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}
.upload input {
    display: block;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin-top: 17px;
    font-size: 12px;
    color: var(--muted);
}
input::file-selector-button {
    min-height: 44px;
    margin-right: 10px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 700;
    border: 1px solid var(--blue);
    border-radius: 6px;
    background: var(--paper);
    color: var(--blue);
    cursor: pointer;
}
input:disabled::file-selector-button {
    background: #e9edf0;
    color: #637185;
    border-color: #c7d0d8;
    cursor: not-allowed;
}
.upload.small {
    padding: 14px;
    font-size: 13px;
    border-color: #a3b8c8;
    background: #eff4f8;
}
.trainer {
    margin: 20px 0;
    padding: 16px 18px;
    background: #edf3f8;
    border: 1px solid #bfd0df;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    display: flex;
    gap: 6px;
    flex-direction: column;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.trainer small {
    color: var(--muted);
    font-size: 12px;
}
.party,
.box-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.pokemon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    min-height: 110px;
    padding: 14px 6px;
    overflow-wrap: anywhere;
}
.pokemon strong {
    font-size: 14px;
    line-height: 1.3;
}
.pokemon small {
    font-size: 11px;
    color: var(--muted);
}
.pokemon.selected {
    background: #e6f0fa;
    border-color: var(--blue);
    box-shadow: 0 3px 0 #a9bed0;
}
.pokemon.selected::after {
    content: "✓";
    position: absolute;
    top: -8px;
    right: -5px;
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 13px;
}
.avatar {
    padding: 4px 8px;
    border: 1px solid #dccb8c;
    border-radius: 5px;
    background: #fff3c9;
    font:
        12px ui-monospace,
        monospace;
    color: #654e14;
}
.pokemon-sprite {
    display: block;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    max-width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}
.box-grid .pokemon-sprite {
    width: 64px;
    height: 64px;
}
.placeholder.companion-screen {
    width: 176px;
    height: 176px;
}
.companion-sprite {
    width: 160px;
    height: 160px;
    image-rendering: pixelated;
    object-fit: contain;
}
.electric-companion {
    image-rendering: pixelated;
    object-fit: contain;
}
.session-sprite {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    image-rendering: pixelated;
    object-fit: contain;
}
.empty-slot {
    border: 1px dashed #a5b2be;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    background: #f5f7f4;
    font-size: 24px;
    min-height: 110px;
}
.empty-slot small {
    font-size: 11px;
}
.box-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 14px;
}
.box-heading h3 {
    margin: 0;
}
.box-grid .pokemon {
    min-height: 80px;
}
.placeholder {
    width: 136px;
    height: 116px;
    margin: 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #9eaf8e;
    border-radius: 18px;
    background: #e6edcf;
    background-image: linear-gradient(transparent 97%, #bdcba645 97%);
    background-size: 100% 6px;
    box-shadow:
        inset 0 3px 0 #bfccaa,
        0 3px 0 #e1e5d8;
    font:
        700 32px ui-monospace,
        monospace;
    color: #43513c;
}
.empty-ball {
    width: 55px;
    height: 55px;
    transform: rotate(-14deg);
}
.companion,
.companion-empty {
    text-align: center;
}
.companion p {
    margin: 8px;
}
.companion-empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
}
.companion-empty p {
    max-width: 280px;
    margin: 0 auto 18px;
    font-size: 14px;
}
.empty-caption {
    font:
        10px ui-monospace,
        monospace;
    letter-spacing: 0.8px;
    color: var(--muted);
}
dl {
    display: grid;
    grid-template-columns: minmax(80px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    font-size: 13px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}
dt {
    color: var(--muted);
}
dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.primary {
    background: var(--blue);
    color: white;
    border-color: #183751;
    font-weight: 700;
    box-shadow: 0 3px 0 #163047;
}
.primary:hover:not(:disabled) {
    background: #163852;
    border-color: #163047;
}
.panel > .primary {
    width: 100%;
}
.muted {
    color: var(--muted);
}
.session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 10px;
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.session-row small {
    font-size: 11px;
    color: var(--muted);
}
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
}
.fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 16px;
    margin: 22px 0;
}
label {
    font-size: 14px;
}
input:not([type="file"]):not([type="checkbox"]),
select {
    min-width: 0;
    min-height: 44px;
    border: 2px solid #a5b5c4;
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
    color: var(--ink);
}
input::placeholder {
    color: #647486;
    opacity: 1;
}
input:disabled {
    background: #e9edf0;
    color: #637185;
}
label > input:not([type="file"]):not([type="checkbox"]) {
    display: block;
    width: 100%;
    margin: 8px 0;
}
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 8px 0 0;
    accent-color: var(--blue);
    vertical-align: middle;
}
.badge {
    max-width: 100%;
    overflow-wrap: anywhere;
    background: #eaf1f7;
    color: var(--blue);
    border: 1px solid #b8c7d4;
    padding: 6px 10px;
    border-radius: 6px;
    font:
        12px ui-monospace,
        monospace;
}
.message {
    background: #eaf4e7;
    color: #205e49;
    border: 1px solid #a9c5ad;
    border-left: 5px solid #367550;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 15px;
    overflow-wrap: anywhere;
}
.message.error {
    background: #fff0ed;
    color: #8c2732;
    border-color: #dfafb0;
    border-left-color: var(--red);
}
.result {
    padding: 22px;
    background: #edf5e6;
    border: 1px solid #b5c9a5;
    border-left: 5px solid #367550;
    border-radius: 10px;
    margin-top: 24px;
}
.result small {
    display: block;
    overflow-wrap: anywhere;
    font:
        11px/1.6 ui-monospace,
        monospace;
    color: #43513c;
}
.confirmation {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 16px 0;
    line-height: 1.6;
}
.confirmation input {
    flex-shrink: 0;
}
details {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    font-size: 14px;
}
summary {
    min-height: 44px;
    padding: 8px 0;
    color: var(--blue);
    font-weight: 700;
    cursor: pointer;
}
.walk-summary {
    padding: 14px 18px;
    background: #fff3c9;
    color: #654e14;
    border: 1px solid #dccb8c;
    border-radius: 8px;
    font-weight: 700;
}
footer {
    margin-top: 10px;
    border-top: 1px solid #c6d1d4;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    padding: 24px 0;
}
.loading-progress {
    display: block;
    margin: 35vh auto 10px;
    width: 80px;
    height: 80px;
}
.loading-progress circle {
    fill: none;
    stroke: #c4d1d9;
    stroke-width: 6px;
}
.loading-progress circle:last-child {
    stroke: var(--red);
    stroke-dasharray: 70 130;
    stroke-linecap: round;
}
.loading-progress-text {
    text-align: center;
}
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    padding: 20px;
    background: #fff0ed;
    border-top: 3px solid var(--red);
    color: #8c2732;
    width: 100%;
    z-index: 100;
}
#blazor-error-ui .dismiss {
    float: right;
    padding: 0 10px;
    font-size: 24px;
}
@media (max-width: 1000px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 12px;
    }
    .orbit-one {
        width: 220px;
        height: 220px;
    }
    .orbit-two {
        width: 185px;
        height: 185px;
    }
    .workspace {
        grid-template-columns: minmax(0, 1.35fr) minmax(285px, 1fr);
        gap: 18px;
    }
    .panel {
        padding: 20px;
    }
}
@media (max-width: 760px) {
    header {
        flex-wrap: wrap;
        padding: 16px 20px;
        gap: 12px;
    }
    .brand-name {
        font-size: 23px;
    }
    .privacy {
        font-size: 11px;
        padding: 6px 9px;
    }
    main {
        padding: 28px 18px 12px;
    }
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding-bottom: 28px;
    }
    h1 {
        font-size: clamp(30px, 7vw, 46px);
        letter-spacing: -1px;
    }
    .hero-description {
        font-size: 15px;
    }
    .eyebrow {
        font-size: 9px;
        letter-spacing: 0.7px;
    }
    .journey {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .journey li {
        flex-direction: column;
        align-items: flex-start;
        font-size: 11px;
        line-height: 1.4;
    }
    .hero-art {
        min-height: 0;
        height: 185px;
        margin-top: 12px;
    }
    .walker {
        transform: rotate(-9deg) scale(0.65);
    }
    .orbit-one {
        width: 165px;
        height: 165px;
    }
    .orbit-two {
        width: 132px;
        height: 132px;
    }
    .spark-one {
        right: calc(50% - 114px);
        top: 12px;
    }
    .spark-two {
        left: calc(50% - 115px);
        bottom: 35px;
    }
    .art-note {
        right: calc(50% - 130px);
        bottom: 0;
        font-size: 10px;
    }
    .workspace {
        display: block;
    }
    .panel {
        padding: 20px;
    }
    .fields {
        grid-template-columns: 1fr;
    }
    .actions > button {
        flex: 1 1 200px;
    }
}
@media (max-width: 380px) {
    main {
        padding-inline: 12px;
    }
    .panel {
        padding: 16px;
    }
    .upload {
        padding: 16px;
    }
    .party,
    .box-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .journey li {
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
    button:active:not(:disabled) {
        transform: none;
    }
}
