:root {
    --content-max-width: 1220px;
    --content-gutter: 30px;
    --ink: #18221d;
    --muted: #718078;
    --paper: #f4f1e9;
    --card: #fffdf8;
    --green: #1f684b;
    --green2: #dce9df;
    --gold: #c69643;
    --line: #dcd9cf;
    --detail-surface: #f5f3ec;
    --action-surface: #eef7f0;
    --support-surface: #eef5ef;
    --danger-surface: #fff0ee;
    --danger-ink: #a43e36;
    --stress-ink: #bd443a;
    --family-line: #c9d9ce;
    --next-year-background: #1f684b;
    --next-year-hover: #19563e;
    --next-year-border: #1f684b;
    --next-year-hover-border: #19563e;
    --next-year-disabled-background: #53665a;
    --next-year-disabled-ink: #f3f5f3;
    --next-year-disabled-border: #53665a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans",sans-serif;
}

main {
    max-width: var(--content-max-width);
    margin: auto;
    padding: 0 var(--content-gutter) 80px;
}

.hero {
    text-align: center;
    padding: 62px 20px 45px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--gold);
    font-weight: 700;
    font-size: 12px;
    margin: 0 0 12px;
}

.hero h1,
.decision-card>h1 {
    font: 700 clamp(38px,5vw,60px)/1.05 "Playfair Display",serif;
    margin: 0 0 14px;
}

.hero>p:last-child,
.decision-card>p {
    color: var(--muted);
}

.silhouette {
    height: 290px;
    position: relative;
    filter: drop-shadow(0 14px 18px #24453425);
}

.silhouette .head {
    position: absolute;
    width: 82px;
    height: 98px;
    background: #708e7c;
    border-radius: 48% 48% 44% 44%;
    left: calc(50% - 41px);
    top: 30px;
}

.silhouette .body {
    position: absolute;
    width: 210px;
    height: 220px;
    background: #708e7c;
    border-radius: 48% 48% 20px 20px;
    left: calc(50% - 105px);
    top: 122px;
}

.silhouette.female .body {
    width: 175px;
    left: calc(50% - 87px);
    border-radius: 48% 48% 25% 25%;
    clip-path: polygon(25% 0,75% 0,100% 100%,0 100%);
}

.dynasty-preview {
    border-top: 1px solid #9cb2a4;
    padding-top: 18px;
}

input[type=range] {
    accent-color: var(--green);
    width: 100%;
}

.primary {
    border: 0;
    background: var(--green);
    color: white;
    border-radius: 11px;
    padding: 15px 22px;
    font: 700 14px "DM Sans";
    cursor: pointer;
    box-shadow: 0 8px 22px #1f684b30;
}

.primary span {
    float: right;
    margin-left: 32px;
}

.primary.start {
    width: 100%;
    margin-top: 28px;
}

.validation {
    color: #a8473d;
    background: #f8e5df;
    border-radius: 9px;
    padding: 12px;
}

.age {
    text-align: right;
}

.age small,
.age strong {
    display: block;
}

.age small {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

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

.decision-card {
    text-align: center;
    padding: 60px 0;
}

.score-pair {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

.score-pair article {
    background: #f0f3ed;
    border-radius: 12px;
    padding: 18px;
}

.score-pair small,
.score-pair strong {
    display: block;
}

.score-pair small {
    color: var(--muted);
}

.score-pair strong {
    font: 700 40px "Playfair Display",serif;
    color: var(--green);
}

.date {
    font: 700 22px "Playfair Display",serif;
    margin-top: 0;
}

.event {
    background: #edf4ee;
    border-left: 3px solid var(--gold);
    padding: 17px;
    display: flex;
    gap: 10px;
    margin: 10px 0 22px;
}

.event span {
    color: var(--gold);
}

.event p {
    margin: 0;
    line-height: 1.45;
}

.plan-error {
    font-size: 11px;
    color: #a8473d;
    background: #f8e5df;
    padding: 8px;
    border-radius: 7px;
}

.final-age,
.final-score {
    display: block;
    font: 700 52px "Playfair Display",serif;
    color: var(--green);
    margin: 8px 0 35px;
}

.final-score {
    font-size: 84px;
    color: var(--gold);
}

@media(max-width:600px) {
    main {
        padding: 0 16px 50px;
    }

    .hero {
        padding: 40px 5px 30px;
    }

    .score-pair {
        grid-template-columns: 1fr;
    }
}

.zoom-controls {
    display: flex;
    padding: 3px;
    background: #e8e5dc;
    border-radius: 9px;
}

.zoom-controls button {
    border: 0;
    background: transparent;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}

.zoom-controls .zoom-value {
    min-width: 48px;
    background: var(--card);
    color: var(--green);
}

.positive {
    color: #168052!important;
}

.negative {
    color: #bd443a!important;
}

.axes-title {
    margin-top: 25px;
}

@media(max-width:600px) {
    .zoom-controls button {
        padding: 6px;
    }

    .zoom-controls .zoom-value {
        display: none;
    }
}

.score-pair {
    grid-template-columns: repeat(2,1fr);
}

.identity-fields {
    align-items: end;
}

.randomize {
    border: 1px solid var(--gold);
    background: #fff8e9;
    color: #825d1f;
    border-radius: 10px;
    padding: 13px;
    font-weight: 700;
    cursor: pointer;
}

.primary:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.danger-action,
.search-action {
    width: 100%;
    border-radius: 8px;
    padding: 9px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
}

.danger-action {
    border: 1px solid #d99a94;
    background: #fff0ee;
    color: #a43e36;
}

.search-action {
    border: 1px solid #9dcbb0;
    background: #ecf7ef;
    color: var(--green);
}

.decline-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
}

.battery {
    height: 9px;
    border-radius: 8px;
    background: #d7ddd8;
    overflow: hidden;
    margin-top: 4px;
}

.battery i {
    display: block;
    height: 100%;
}

.battery .low {
    background: #c74b43;
}

.battery .medium {
    background: #db8b32;
}

.battery .high {
    background: #3b9865;
}

.neutral {
    color: var(--muted)!important;
}

.portrait-label {
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
}

.simulation-progress {
    width: min(620px,100%);
    height: 24px;
    accent-color: var(--green);
    margin: 10px auto 35px;
}

.search-action {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.search-action b {
    color: #a43e36;
}

.collapsed-marker {
    font-style: normal;
    color: var(--gold);
    font-size: 10px;
    margin-top: 4px;
}

.compatibility-details {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.compatibility-details>p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.compatibility-row {
    display: grid;
    grid-template-columns: minmax(130px,1fr) 90px 34px;
    gap: 7px;
    align-items: center;
}

.compatibility-row span b,
.compatibility-row span small {
    display: block;
}

.compatibility-row span small {
    font-size: 8px;
    color: var(--muted);
}

.compatibility-bar {
    height: 7px;
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.compatibility-bar i {
    display: block;
    height: 100%;
    background: var(--green);
}

.deceased-child {
    color: #888;
    text-decoration: line-through;
}

.randomize-character {
    margin: -8px 0 18px;
}

.standalone-profile-creator {
    max-width: 900px;
    margin: 20px auto;
}

.standalone-profile-creator select {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.current-compatibility {
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: 8px;
    background: #eef5ef;
    color: var(--green);
}

.current-compatibility>summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.current-compatibility>summary::-webkit-details-marker {
    display: none;
}

.current-compatibility .compatibility-details {
    color: var(--ink);
}

.delete-all-saves {
    width: auto;
    margin: 0;
}

.negative-event-effects {
    margin: 0;
    padding: 12px;
    border-radius: 9px;
    background: #fff0ee;
    color: #a72f28;
    font-weight: 800;
}

.result-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 12px 20px;
    border: 1px solid var(--green);
    border-radius: 11px;
    background: transparent;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.secondary-link:hover {
    background: #e6f1e9;
}

@media(max-width:600px) {
    .result-actions {
        display: grid;
    }

    .result-actions>* {
        width: 100%;
    }
}

.person-energy-history {
    margin:  1rem 0;
    padding:  .9rem 1rem;
    border:  1px solid var(--line);
    border-radius:  12px;
    background:  rgba(255, 255, 255, .03);
}

.person-energy-history summary {
    cursor:  pointer;
    font-weight:  700;
}

.turn-replay-open {
    padding:  .65rem .85rem;
    border:  1px solid var(--green);
    border-radius:  9px;
    background:  #eef7f0;
    color:  var(--green);
    font:  700 .75rem "DM Sans",sans-serif;
    cursor:  pointer;
}

.person-main-occupation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .8rem;
    border-radius: 9px;
    background: #eef5ef;
    color: var(--green);
}

.person-main-occupation {
    margin: .75rem 0;
}

.person-main-occupation small {
    color: var(--muted);
}

.portrait-picker-modal {
    width: min(620px,100%);
}

.axis-input {
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 8px;
    background: linear-gradient(to right,transparent var(--axis-start),#76a98b var(--axis-start),#76a98b calc(var(--axis-start) + var(--axis-width)),transparent calc(var(--axis-start) + var(--axis-width))),linear-gradient(to right,transparent calc(50% - 1px),#1f684b calc(50% - 1px),#1f684b calc(50% + 1px),transparent calc(50% + 1px)),#dce9df;
}

.axis-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 17px;
    height: 17px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 1px 5px #1f684b66;
}

.axis-input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 1px 5px #1f684b66;
}

@media(max-width:850px) {
    main.playing-main {
        padding-bottom: calc(94px + env(safe-area-inset-bottom));
    }

    main.playing-main {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .axes-title {
        margin: 10px 0 4px;
        font-size: 8px;
    }
}

@media(max-width:600px) {
    main {
        padding-right: 10px;
        padding-left: 10px;
    }
}

.mobile-intimacy-choice {
    display: grid;
    gap: 7px;
    color: #5f6c63;
    font-size: 13px;
    font-weight: 800;
}

.mobile-intimacy-choice select {
    width: 100%;
    padding: 13px;
    border: 1px solid #d8d5cc;
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font: 600 14px "DM Sans",sans-serif;
}

.mobile-pregnancy-chance {
    margin-top: 14px;
    padding: 13px;
    border-radius: 12px;
    background: #eff6f0;
}

.mobile-pregnancy-chance>span {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.mobile-pregnancy-chance small {
    color: #5f6c63;
    font-size: 13px;
}

.mobile-pregnancy-chance strong {
    color: var(--green);
    font-size: 18px;
}

.mobile-pregnancy-chance p {
    margin: 8px 0 0;
    color: #5f6c63;
    font-size: 13px;
    line-height: 1.45;
}

@media(max-width:850px) {
    body {
        background: #f5f2e9;
    }

    main.playing-main {
        max-width: none;
        padding: 0 0 calc(88px + env(safe-area-inset-bottom));
        overflow-x: clip;
    }

    .mobile-section-heading {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 12px;
        padding: 15px 15px 11px;
    }

    .mobile-section-heading p,
    .mobile-page-heading p {
        margin: 0 0 2px;
        color: #b28845;
        font-size: 13px;
        font-weight: 900;
        letter-spacing: .13em;
        text-transform: uppercase;
    }

    .mobile-section-heading h2,
    .mobile-page-heading h2 {
        margin: 0;
        color: #183426;
        font: 800 23px/1.1 "Playfair Display",serif;
    }

    .mobile-section-heading>span {
        padding-bottom: 2px;
        color: #5f6c63;
        font-size: 13px;
    }

    .mobile-row-icon {
        display: grid!important;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 18px!important;
    }

    .mobile-row-icon.work {
        background: #e0ecff;
        color: #40699d;
    }

    .mobile-row-icon.home {
        background: #f6e8d2;
        color: #a87125;
    }

    .mobile-exhaustion {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        font-size: 14px;
    }

    .mobile-exhaustion span {
        max-width: 70%;
    }

    .mobile-exhaustion small {
        display: block;
        margin-top: 4px;
        color: #5f6c63;
        font-size: 13px;
    }

    .mobile-exhaustion strong {
        text-align: right;
        font-size: 20px;
    }

    .mobile-exhaustion em {
        display: block;
        font-size: 13px;
        font-style: normal;
    }

    .mobile-risk-details {
        padding: 11px 14px;
        border: 1px solid #e5cfaa;
        border-radius: 13px;
        background: #fff7e6;
        color: #76551d;
        font-size: 13px;
    }

    .mobile-risk-details summary {
        display: flex;
        justify-content: space-between;
        cursor: pointer;
    }

    .mobile-risk-details>div {
        margin-top: 8px;
        line-height: 1.5;
    }

    .mobile-page-heading {
        padding: 5px 3px 1px;
    }

    .mobile-breakup {
        width: 100%;
        min-height: 44px;
        margin-top: 12px;
        font-size: 14px;
    }

    .mobile-stability {
        padding: 12px 0 5px;
    }

    .mobile-stability>span {
        display: flex;
        justify-content: space-between;
        color: #5f6c63;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-stability>span b {
        color: var(--ink);
    }

    .mobile-stability>div {
        height: 8px;
        margin-top: 6px;
        overflow: hidden;
        border-radius: 999px;
        background: #e5e3dc;
    }

    .mobile-stability>div i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #4d9869;
    }

    .mobile-card-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1px 7px;
    }

    .mobile-card-title h3 {
        margin: 0;
        font: 800 18px "Playfair Display",serif;
    }

    .mobile-card-title span {
        display: grid;
        place-items: center;
        min-width: 25px;
        height: 25px;
        border-radius: 50%;
        background: #e7efe8;
        color: var(--green);
        font-size: 13px;
        font-weight: 900;
    }

    .mobile-empty-copy {
        margin: 8px 0;
        color: #5f6c63;
        font-size: 13px;
    }

    @keyframes mobile-sheet-in {
    from{transform:translateY(24px);opacity:.7}to{transform:translateY(0);opacity:1}
    }
}

@media(max-width:390px) {
    .mobile-row-icon {
        width: 35px;
        height: 35px;
    }
}

@media(min-width:851px) {
    main.playing-main {
        padding-bottom: 14px;
    }
}

@keyframes profile-dialog-in {
from{opacity:0}to{opacity:1}
}
