/* Übungshandy des Flaschenpost-Atolls. Die übrigen Aufgabenfenster nutzen weiter ihre eigenen Regeln. */
.atoll-phone-dialog {
    box-sizing: border-box;
    width: min(592px, calc(100vw - 18px));
    max-width: none;
    max-height: calc(100dvh - 22px);
    padding: clamp(9px, 2vw, 18px);
    overflow: hidden;
}

.atoll-phone-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: atoll-phone-open 180ms ease-out both;
}

.atoll-phone-dialog::backdrop { background: rgb(3 14 28 / 70%); }

@keyframes atoll-phone-open {
    from { opacity: 0; translate: 0 5px; }
    to { opacity: 1; translate: 0; }
}

.atoll-phone-dialog .le-header {
    flex-wrap: nowrap;
    text-align: left;
}

.atoll-phone-dialog .le-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.atoll-phone-dialog .le-progress { padding: 4px 8px; text-align: center; }

.atoll-phone-dialog .ui-close-btn {
    position: static;
    width: 44px;
    flex: 0 0 44px;
    min-height: 44px;
}

.atoll-phone-device {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 4px solid #16283a;
    border-radius: 21px;
    background: #f4f9fa;
}

.atoll-phone-device-bar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    background: #16283a;
    color: #f1f8fb;
    font-size: 0.84rem;
}

.atoll-phone-device-bar span { color: #b7dbe6; }

.atoll-phone-nav {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid #cbdce4;
    background: #edf6f8;
}

.atoll-phone-nav[hidden], .atoll-phone-dialog [hidden] { display: none; }

.atoll-phone-dialog .le-btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 740;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.atoll-phone-dialog .le-btn-primary {
    background: linear-gradient(#08789f, #075985);
    color: white;
}

.atoll-phone-nav .le-btn, .atoll-phone-sender .le-btn {
    flex: 0 1 auto;
    width: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #075985;
    text-align: left;
}

.atoll-phone-sender .le-btn[aria-expanded="true"] { background: #dceef4; }
.atoll-phone-dialog button:focus-visible { outline: 2px solid #075985; outline-offset: 2px; }
.atoll-phone-nav .le-btn:hover, .atoll-phone-sender .le-btn:hover { transform: none; text-decoration: underline; }

.atoll-phone-screen {
    min-height: 0;
    max-height: min(66dvh, 590px);
    overflow: auto;
    overscroll-behavior: contain;
    scroll-padding: 14px;
}

.atoll-phone-pane {
    display: grid;
    gap: 12px;
    padding: clamp(12px, 3vw, 20px);
    color: #16283a;
    text-align: left;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.atoll-phone-pane h3, .atoll-phone-pane p { margin: 0; }
.atoll-phone-pane h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: 0.01em; }
.atoll-phone-pane h3:focus { outline: none; }

.atoll-phone-inbox, .atoll-phone-summary {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.atoll-phone-inbox .atoll-phone-inbox-entry {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #adc8d6;
    box-shadow: 0 2px 0 #c0d3dc;
    text-align: left;
}

.atoll-phone-inbox-state {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 10px;
    background: #e3eef3;
    color: #35586b;
    font-size: 0.72rem;
}

.atoll-phone-inbox-label { min-width: 0; }

.atoll-phone-inbox-action {
    display: block;
    margin-top: 2px;
    color: #36594b;
    font-size: 0.78rem;
    font-weight: 600;
}

.atoll-phone-inbox .atoll-phone-inbox-entry.is-finished {
    background: #edf7ef;
    border-color: #87ad97;
    box-shadow: 0 2px 0 #c0d8c8;
}

.atoll-phone-inbox-entry.is-finished .atoll-phone-inbox-state {
    background: #d3efda;
    color: #205136;
}

.atoll-phone-sender-detail { padding: 4px 10px 8px; font-size: 0.9rem; color: #35586b; }
.atoll-phone-chat { display: grid; gap: 8px; }

.atoll-phone-message {
    box-sizing: border-box;
    width: fit-content;
    max-width: min(100%, 430px);
    padding: 10px 13px;
    border: 1px solid #c0d6e1;
    border-radius: 4px 16px 16px;
    background: #e3f0f5;
    line-height: 1.65;
}

.atoll-phone-message.is-outgoing {
    justify-self: end;
    border-radius: 16px 4px 16px 16px;
    background: #dff3e9;
    border-color: #abd5c5;
}

.atoll-phone-dialog .le-evidence-mark { box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.atoll-phone-dialog .le-evidence-inspect { width: 44px; min-height: 44px; }
.atoll-phone-task { color: #234c63; font-weight: 690; }

.atoll-phone-options { display: grid; gap: 9px; }
.atoll-phone-options .le-btn { text-align: left; }
.atoll-phone-options .le-btn-primary { text-align: center; }

.atoll-phone-mark-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.atoll-phone-mark-controls .le-btn { width: auto; flex: 1 1 145px; }
.atoll-phone-selection { padding-right: 5px; color: #35586b; font-size: 0.82rem; }

.atoll-phone-feedback:empty { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.atoll-phone-feedback, .atoll-phone-preview {
    padding: 9px 12px;
    border-inline-start: 4px solid #528599;
    border-radius: 5px 10px 10px 5px;
    background: #e6f2f5;
}

.atoll-phone-feedback p + p { margin-top: 5px; }
.atoll-phone-feedback[data-kind="success"] { background: #e5f3e8; border-color: #387254; }
.atoll-phone-feedback[data-kind="retry"] { background: #fff0da; border-color: #a76620; }

.atoll-phone-site {
    background: white;
    border: 1px solid #c1cfd6;
    border-radius: 12px;
    overflow: hidden;
}

.atoll-phone-address {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 11px;
    padding: 7px 10px;
    background: #e5edf1;
    font-size: 0.88rem;
}

.atoll-phone-address button:first-child::before { content: "\1F512\00A0"; }
.atoll-phone-dialog .atoll-phone-site-brand { padding: 11px 10px 4px; font-weight: 800; }
.atoll-phone-mock-field { display: grid; gap: 4px; margin: 8px 10px 12px; }
.atoll-phone-mock-input { padding: 4px 8px; border: 1px solid #b8c9d1; border-radius: 5px; color: #4e6571; }
.atoll-phone-known-address code { display: block; color: #075985; }

.atoll-phone-summary li {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #cbdce4;
    padding-block: 5px;
}

.atoll-phone-summary span { color: #35586b; text-align: right; }
.atoll-phone-reward { color: #075985; font-weight: 800; }

.atoll-phone-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (hover: none) {
    .atoll-phone-dialog .le-btn:hover { transform: none; }
}

@media (pointer: coarse) {
    .atoll-phone-dialog .le-evidence-mark:not(:disabled):not([aria-pressed="true"]) {
        text-decoration: underline dotted #6c8d9c;
        text-underline-offset: 0.16em;
    }
    .atoll-phone-dialog .le-evidence-mark { display: inline-block; min-height: 32px; padding-inline: 3px; }
}

@media (max-width: 420px) {
    .atoll-phone-dialog .le-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 4px 8px;
    }
    .atoll-phone-dialog .ui-close-btn { grid-area: 1 / 2 / span 2; }
    .atoll-phone-dialog .le-title { font-size: 0.99rem; }
    .atoll-phone-dialog .le-progress { justify-self: start; font-size: 0.72rem; }
}

@media (max-width: 360px) {
    .atoll-phone-summary li { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .atoll-phone-dialog[open], .atoll-phone-dialog .le-evidence-mark { animation: none; }
    .atoll-phone-dialog .le-btn { transition: none; }
}
