:root {
    --page-bg: #9dd;
    --panel-bg: #d9d8b8;
    --panel-border: #4aa4ff;
    --input-bg: #ececec;
    --button-blue: #0f7ac8;
    --button-orange: #f7a100;
    --button-green: #18a84b;
    --text: #171717;
    --sim-text: #f8fafc;
    --sim-muted: #cbd5e1;
    --sim-line: #27406f;
    --status-blue-strong: #2f81f7;
    --status-blue-soft: #3083f8;
    --status-green-strong: #38c95e;
    --mail-glass-light: #fff;
    --mail-glass-border: #fff;
    --info-green-text: #caffda;
    --door-state-no-access: #ffb3b3;
    --door-state-open: #a8ffcf;
    --door-state-pending: #ffe6a8;
    --mail-bg-top: #ffffff0d;
    --mail-bg-bottom: #ffffff05;
    --mail-border: #ffffff1a;
    --mail-shadow: #00000040;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #b5eded 0%, #9dd 100%);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
}

.co-main {
    padding: 16px 20px 28px;
}

.wrap {
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 24px;
    align-items: start;
}

.demo-column--app,
.demo-column--doors {
    display: flex;
}

.phone-shell,
.sim {
    height: 100%;
}

.section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.phone-shell {
    position: relative;
    width: 100%;
    max-width: 486px;
    min-height: 1080px;
}

.screen {
    position: relative;
    width: 100%;
    min-height: 1080px;
    overflow: hidden;
}

.step {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.app-panel {
    margin: 0;
    background: var(--panel-bg);
    border: 3px solid var(--panel-border);
    border-radius: 28px;
    padding: 24px 18px 26px;
    min-height: auto;
    position: relative;
}

.app-title {
    text-align: center;
    font-size: 38px;
    font-weight: 700;
    margin: 34px 0 28px;
}

.info-box,
.fake-button,
.door-card,
.request-submit {
    border-radius: 14px;
}

.fake-button,
.request-submit,
.mail-link {
    background: var(--button-blue);
    color: #fff;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 16px;
    border: 0;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 3px 0 rgb(255 255 255 / 25%) inset, 0 3px 10px rgb(0 0 0 / 12%);
    border-radius: 14px;
    text-decoration: none;
    display: block;
}

.logout {
    background: var(--button-orange);
    margin-top: 10px;
    margin-bottom: 24px;
}

.login-links,
.mail-text,
.legal {
    font-size: 20px;
    line-height: 1.34;
    color: #333;
}

.login-links {
    margin: 8px 0 24px;
}

.login-links a,
.mail-text a,
.legal a,
.simple-link {
    color: #0a73d8;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.separator {
    border: 0;
    border-top: 1px solid rgb(0 0 0 / 20%);
    margin: 22px 0;
}

.door-list {
    display: grid;
    gap: 16px;
    margin: 0 0 24px;
}

.door-card {
    overflow: hidden;
    border: 2px solid var(--panel-border);
    background: #fff;
}

.door-card__top {
    background: var(--button-blue);
    color: #fff;
    padding: 17px 16px;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
}

.door-card__top.openable {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    cursor: pointer;
}

.door-card__top.opened {
    background: var(--button-green);
}

.door-card__bottom {
    padding: 17px 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #006edb;
    background: var(--panel-bg);
}

.door-card__bottom.requested {
    color: #1f6f1f;
}

.request-form {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.field .input {
    background: var(--input-bg);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    min-height: 58px;
    padding: 14px 16px;
    font-size: 18px;
    color: #333;
}

.checkbox-group-title {
    font-size: 18px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 10px;
}

.box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--panel-border);
    border-radius: 4px;
    background: transparent;
    position: relative;
    flex: 0 0 auto;
}

.box.checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #0f7ac8;
    font-weight: 700;
    font-size: 15px;
}

.fineprint {
    font-size: 15px;
    line-height: 1.16;
    color: #555;
    margin-top: 8px;
}

.mail-subject {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mail-preview {
    font-size: 18px;
    color: #334155;
    margin-bottom: 16px;
    line-height: 1.35;
}

.thankyou-illustration {
    width: 100%;
    height: 220px;
    border: 2px solid var(--panel-border);
    border-radius: 18px;
    background: linear-gradient(to bottom, #f4f7fb 0%, #e7f6ff 100%);
    margin: 0 0 24px;
    position: relative;
    overflow: hidden;
}

.check-big {
    position: absolute;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #19a34a;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 52px;
    font-weight: 700;
    left: 50%;
    top: 34px;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgb(25 163 74 / 28%);
}

.envelope {
    position: absolute;
    width: 150px;
    height: 90px;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    background: #fff;
    border: 3px solid #7eb6e6;
    border-radius: 8px;
}

.envelope::before,
.envelope::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    width: 0;
    height: 0;
    border-style: solid;
}

.envelope::before {
    top: 0;
    border-width: 45px 75px 0;
    border-color: #d7ecff transparent transparent;
}

.envelope::after {
    bottom: 0;
    border-width: 0 75px 45px;
    border-color: transparent transparent #c4e3ff;
}

.cursor {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgb(255 255 255 / 16%);
    border: 2px solid rgb(255 255 255 / 90%);
    box-shadow: 0 0 0 10px rgb(255 255 255 / 14%);
    opacity: 0;
    pointer-events: none;
    transition: left 0.4s ease, top 0.4s ease, opacity 0.2s ease, transform 0.12s ease;
    z-index: 30;
}

.cursor.show {
    opacity: 1;
}

.cursor.tap {
    transform: scale(0.76);
}

.sim {
    background: radial-gradient(circle at top, #102a57 0%, #081a3a 70%);
    border: 1px solid #1f3868;
    border-radius: 30px;
    padding: 20px;
    color: var(--sim-text);
    box-shadow: 0 18px 60px rgb(0 0 0 / 22%);
    min-height: auto;
    width: 100%;
}

.sim-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.sim-top>div:first-child {
    min-width: 0;
}

.sim h2 {
    font-size: 34px;
    margin: 0 0 10px;
    line-height: 1.1;
}

.sim p {
    margin: 0;
    color: var(--sim-muted);
    font-size: 18px;
    line-height: 1.35;
    max-width: 44rem;
}

.sim-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sim-btn {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    background: #e5e7eb;
    color: #111827;
}

.sim-btn.pause {
    background: #cbd5e1;
}

.sim-btn.repeat {
    display: none;
    background: #f7a100;
}

.sim-btn.repeat.show {
    display: inline-block;
}

.sim-status {
    background: rgb(255 255 255 / 6%);
    border: 1px solid var(--sim-line);
    border-radius: 18px;
    padding: 16px 18px;
    font-size: 20px;
    margin-bottom: 18px;
    min-height: 58px;
}

.scene {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 620px;
    background: linear-gradient(to bottom, #cde7ff 0%, #e8f3ff 52%, #8cc46c 52%, #79b65a 100%);
    border: 1px solid rgb(255 255 255 / 15%);
    margin-bottom: 16px;
}

.scene-inner {
    position: relative;
    min-height: 620px;
    width: 100%;
    height: 100%;
    transform: scale(0.8);
    transform-origin: top center;
}

.path {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 420px;
    height: 210px;
    background: radial-gradient(ellipse at center, rgb(192 164 122 / 70%) 0%, rgb(192 164 122 / 70%) 44%, rgb(192 164 122 / 0%) 70%);
    opacity: 0.75;
}

.shed {
    position: absolute;
    width: 300px;
    height: 300px;
    bottom: 72px;
}

.shed--left {
    left: 60px;
}

.shed--right {
    right: 60px;
}

.roof {
    position: absolute;
    inset: 0 10px auto;
    height: 90px;
    background: linear-gradient(to bottom, #9d6544, #8a5638);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    filter: drop-shadow(0 8px 8px rgb(0 0 0 / 14%));
}

.body-house {
    position: absolute;
    inset: 80px 18px 0;
    background: linear-gradient(to bottom, #ba825d, #a96f4b);
    border-radius: 16px 16px 18px 18px;
    box-shadow: inset 0 -12px 0 rgb(0 0 0 / 8%);
}

.doors {
    position: absolute;
    inset: auto 24px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 28px;
    z-index: 4;
}

.door {
    position: relative;
    height: 184px;
    width: 98px;
    perspective: 700px;
}

.door__leaf {
    position: absolute;
    left: 0;
    bottom: 42px;
    width: 98px;
    height: 124px;
    background: linear-gradient(to right, #673a23, #7d4a2f);
    border: 4px solid #562f1b;
    border-radius: 10px 10px 0 0;
    transform-origin: left center;
    transition: transform 0.28s ease-out, filter 0.16s ease, box-shadow 0.16s ease;
    box-shadow: inset -12px 0 0 rgb(255 255 255 / 8%);
}

.door__leaf::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px solid rgb(255 255 255 / 8%);
    border-radius: 6px;
}

.door__knob {
    position: absolute;
    left: 80px;
    bottom: 95px;
    width: 10px;
    height: 10px;
    background: #e0bb60;
    border-radius: 50%;
    z-index: 5;
}

.door__glow {
    position: absolute;
    left: -10px;
    bottom: 34px;
    width: 118px;
    height: 144px;
    border-radius: 14px 14px 0 0;
    opacity: 0;
    transition: opacity 0.16s ease;
    background: radial-gradient(circle, rgb(255 224 130 / 42%) 0%, rgb(255 224 130 / 0%) 72%);
    pointer-events: none;
}

.door__caption {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    font-weight: 700;
    white-space: normal;
    text-align: center;
    max-width: 110px;
    line-height: 1.1;
    color: #fff;
    font-size: 20px;
    text-shadow: 0 2px 4px rgb(0 0 0 / 28%);
}

.door__state {
    position: absolute;
    left: 50%;
    bottom: -42px;
    transform: translateX(-50%);
    color: #26435c;
    white-space: normal;
    text-align: center;
    max-width: 110px;
    line-height: 1.1;
    font-size: 12px;
    margin-top: 4px;
    opacity: .9;
}

.door.is-unlocking .door__leaf {
    filter: brightness(1.18);
    box-shadow: 0 0 22px rgb(255 214 102 / 28%);
}

.door.is-unlocking .door__glow {
    opacity: 1;
}

.door.is-open .door__leaf {
    transform: rotateY(-72deg);
}

.window {
    position: absolute;
    width: 38px;
    height: 34px;
    background: linear-gradient(to bottom, #90b8d8, #5e8bb5);
    border: 3px solid #825136;
    border-radius: 6px;
    top: 106px;
}

.shed--left .window--a {
    left: 40px;
}

.shed--left .window--b {
    right: 40px;
}

.shed--right .window--a {
    left: 40px;
}

.shed--right .window--b {
    right: 40px;
}

.person {
    position: absolute;
    width: 40px;
    height: 102px;
    z-index: 8;
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.16s ease, transform 0.24s linear;
    pointer-events: none;
}

.person--left {
    left: 150px;
    bottom: 46px;
}

.person--right {
    left: 74px;
    bottom: 46px;
}

.person.is-visible {
    opacity: 1;
}

.person.is-hidden {
    opacity: 0;
}

.person.is-waiting {
    transition: opacity 0.16s ease, transform 0.12s linear;
}

.person.is-entering {
    transition: opacity 0.16s ease, transform 0.52s linear;
}

.person__body {
    position: absolute;
    top: 18px;
    left: 15px;
    width: 10px;
    height: 38px;
    background: #2c68b8;
    border-radius: 4px;
    transform-origin: top center;
    transition: transform 0.18s ease;
}

.person.is-pushing .person__body {
    transform: rotate(16deg);
}

.person.is-entering .person__body {
    transform: rotate(8deg);
}

.person__head {
    position: absolute;
    top: 0;
    left: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f1c8a2;
    transition: transform 0.18s ease;
}

.person.is-pushing .person__head {
    transform: translateX(2px);
}

.person__body::before,
.person__body::after {
    content: "";
    position: absolute;
    background: inherit;
}

.person__body::before {
    left: -9px;
    top: 7px;
    width: 9px;
    height: 26px;
    border-radius: 4px;
}

.person__body::after {
    right: -9px;
    top: 7px;
    width: 9px;
    height: 26px;
    border-radius: 4px;
}

.person::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 59px;
    width: 16px;
    height: 34px;
    background: transparent;
    box-shadow: -6px 0 0 0 #333, 6px 0 0 0 #333;
}

.cloud {
    position: absolute;
    background: rgb(255 255 255 / 80%);
    border-radius: 999px;
    filter: blur(0.2px);
}

.cloud--a {
    width: 90px;
    height: 34px;
    left: 80px;
    top: 58px;
}

.cloud--b {
    width: 110px;
    height: 40px;
    right: 90px;
    top: 86px;
}

.sim-note {
    margin-top: 12px;
    color: #9fb0ce;
    text-align: center;
    font-size: 16px;
    line-height: 1.35;
}

@media (width <=1200px) {
    .wrap {
        grid-template-columns: 360px 1fr;
        gap: 22px;
    }

    .demo-column--app,
    .demo-column--doors {
        width: 100%;
    }

    .phone-shell {
        max-width: 486px;
        margin: 0 auto;
    }

    .sim {
        width: 100%;
    }

    .sim-top {
        flex-direction: column;
        align-items: stretch;
    }

    .sim-controls {
        justify-content: flex-start;
    }
}

@media (width <=820px) {
    .co-main {
        padding: 12px 12px 22px;
    }

    .wrap {
        gap: 18px;
    }

    .section-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .sim {
        padding: 16px;
        border-radius: 22px;
    }

    .sim h2 {
        font-size: 28px;
    }

    .sim p {
        font-size: 16px;
    }

    .sim-status {
        font-size: 18px;
        min-height: 58px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .scene {
        min-height: 420px;
    }

    .scene-inner {
        min-height: 620px;
        transform: scale(0.78);
        transform-origin: top center;
    }

    .shed--left {
        left: 28px;
    }

    .shed--right {
        right: 28px;
    }

    .door__caption {
        font-size: 18px;
    }

    .door__state {
        font-size: 13px;
    }

    .sim-note {
        font-size: 15px;
    }

    .sim-btn {
        width: 100%;
    }

    .phone-shell {
        max-width: 100%;
        min-height: auto;
    }

    .screen {
        min-height: auto;
        aspect-ratio: 486 / 1080;
    }

    .app-panel {
        min-height: auto;
    }

    .app-title {
        font-size: 30px;
        margin: 22px 0 20px;
    }

    .info-box,
    .fake-button,
    .request-submit,
    .mail-link {
        font-size: 18px;
    }

    .login-links,
    .mail-text,
    .legal,
    .door-card__top,
    .door-card__bottom,
    .field label,
    .field .input,
    .checkbox-group-title,
    .check-item {
        font-size: 16px;
    }

    .mail-subject {
        font-size: 18px;
    }

    .mail-preview {
        font-size: 16px;
    }
}

@media (width <=768px) {
    .wrap {
        grid-template-columns: 1fr;
    }

    .demo-column--doors {
        width: 100%;
    }

    ;

    .sim {
        width: 100%;
    }

    .scene-inner {
        transform: scale(0.78);
        transform-origin: top center;
    }
}

@media (width <=560px) {
    .co-header {
        padding: 10px 12px;
    }

    .co-header h1 {
        font-size: 16px;
    }

    .sim {
        padding: 14px;
    }

    .sim-top {
        gap: 14px;
    }

    .sim h2 {
        font-size: 24px;
    }

    .sim p,
    .sim-note {
        font-size: 14px;
    }

    .sim-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sim-btn {
        width: 100%;
    }

    .sim-status {
        font-size: 16px;
        min-height: 48px;
    }

    .scene {
        min-height: 300px;
    }

    /* ONLY scale scene */
    .scene-inner {
        min-height: 620px;
        transform: scale(0.55);
        transform-origin: top center;
    }

    /* Text simplification */
    .door__caption {
        font-size: 12px;
    }

    .door__state {
        display: none;
    }

    .section-title {
        font-size: 16px;
    }

    .app-title {
        font-size: 26px;
    }

    .door-list {
        gap: 12px;
    }

    .app-panel {
        margin: 6px;
        padding: 14px 12px 18px;
        border-radius: 22px;
    }

    .info-box,
    .fake-button,
    .request-submit,
    .mail-link {
        font-size: 17px;
        padding: 14px 12px;
    }
}


/* =========================
   Status-Box (Wartephase)
   ========================= */

.status-box {
    margin-top: 22px;
    padding: 18px 16px;
    border-radius: 12px;
    background: var(--panel-bg);
    border: 1px solid #2f81f72e;
    line-height: 1.45;
    color: var(--text);
    text-align: center;
    box-shadow:
        inset 0 0 0 1px #ffffff08;
}


/* =========================
   Mail-Karten optisch ruhiger
   ========================= */

.mail-card {
    border-radius: 14px;
    background:
        linear-gradient(180deg,
            var(--mail-bg-top),
            var(--mail-bg-bottom));
    border: 1px solid var(--mail-border);
    padding: 16px;
    box-shadow:
        0 6px 18px var(--mail-shadow);
}

/* =========================
   Info-Box bei Tür geöffnet
   ========================= */

.info-box {
    margin-top: 16px;
    margin-bottom: 1rem;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #38c95e59;
    color: #000;
    font-weight: 600;
    text-align: center;
    min-height: 2.5rem;
}

/* =========================
   Feinschliff Türstatus
   ========================= */

/* Farbliche Bedeutung der Zustände */

.door[data-area="depot"] .door__state {
    color: var(--door-state-no-access);
}

.door[data-area="swap-house"] .door__state,
.door[data-area="workshop"] .door__state {
    color: var(--door-state-open);
}

.door[data-area="sharing"] .door__state {
    color: var(--door-state-pending);
}

.demo-back-button {
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 0.5rem;
    padding: 6px 12px;
    background: #fff;
    color: #5b2ca0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
    transition: background 0.15s ease;
}

.demo-back-button:hover {
    background: #f0f0f0;
}