.screen-defi-flow {
    position: relative;
    min-height: 100%;
    min-height: 100dvh;
    width: 100%;
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    padding-top: env(safe-area-inset-top, 0px);
}

.screen-defi-flow.active {
    display: flex;
}

.screen-defi-flow .bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #ffffff;
    pointer-events: none;
    overflow: hidden;
}

.screen-defi-flow .bg picture,
.screen-defi-flow .bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.screen-defi-flow .bg img {
    object-fit: cover;
    object-position: center top;
    transform: scale(1.02);
    transform-origin: center top;
}

.screen-defi-flow .bg::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 24%,
        rgba(255, 255, 255, 0.92) 55%,
        #ffffff 80%
    );
}

.screen-defi-flow .spacer {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 36dvh;
}

.screen-defi-flow .defi-content {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 0 28px;
    text-align: center;
}

.screen-defi-flow .defi-content h1 {
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #000;
    margin: 0 0 14px;
}

.screen-defi-flow .defi-content .desc {
    font-size: 15px;
    line-height: 1.47;
    color: #111;
    max-width: 21.5em;
    margin: 0 auto;
}

.screen-defi-flow .defi-footer {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 30px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    background: #ffffff;
}

.screen-defi-flow .defi-cta {
    width: 100%;
    max-width: 420px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: #34c759;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.screen-defi-flow .defi-cta:active {
    background: #2fba50;
}

.screen-defi-flow .defi-legal {
    margin: 12px auto 0;
    max-width: 310px;
    font-size: 12px;
    line-height: 1.35;
    color: #8e8e93;
}

.screen-defi-flow .defi-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.seed-confirm-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 8px 20px 0;
    overflow-y: auto;
}

.seed-confirm-title {
    font-size: clamp(22px, 6vw, 26px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #000;
    text-align: center;
    margin: 4px 0 16px;
    padding: 0 8px;
}

.seed-confirm-desc {
    font-size: 15px;
    line-height: 1.45;
    color: #111;
    text-align: center;
    margin-bottom: 28px;
    padding: 0 4px;
}

.seed-field-label {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 8px;
    padding-left: 2px;
}

.seed-field-wrap {
    position: relative;
    margin-bottom: 8px;
}

.seed-phrase-input {
    width: 100%;
    min-height: 160px;
    padding: 14px 14px 44px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    background: #ffffff;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.45;
    color: #000;
    resize: none;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.seed-phrase-input:focus {
    border-color: #c7c7cc;
}

.seed-paste-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: 0;
    background: none;
    color: #34c759;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 2px;
    -webkit-tap-highlight-color: transparent;
}

.seed-paste-btn:active {
    opacity: 0.65;
}

.seed-field-hint {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 24px;
    padding-left: 2px;
}

.seed-confirm-footer {
    flex: 0 0 auto;
    padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
}

.seed-next-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
    background: #e5e5ea;
    color: #aeaeb2;
    pointer-events: none;
}

.seed-next-btn.enabled {
    background: #34c759;
    color: #ffffff;
    pointer-events: auto;
}

.seed-next-btn.enabled:active {
    background: #2fba50;
}

.seed-secret-link {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #34c759;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.seed-secret-link:active {
    opacity: 0.65;
}

.seed-result-screen {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 28px calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.seed-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.seed-result-icon.loading {
    background: #f2f2f7;
}

.seed-result-icon.error {
    background: #fff0f0;
}

.seed-result-icon svg {
    width: 40px;
    height: 40px;
}

.seed-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e5ea;
    border-top-color: #34c759;
    border-radius: 50%;
    animation: seedSpin 0.85s linear infinite;
}

@keyframes seedSpin {
    to { transform: rotate(360deg); }
}

.seed-result-title {
    font-size: clamp(22px, 6vw, 26px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #000;
    margin-bottom: 12px;
}

.seed-result-desc {
    font-size: 15px;
    line-height: 1.5;
    color: #8e8e93;
    max-width: 22em;
    margin: 0 auto;
}

.seed-result-footer {
    width: 100%;
    padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}

.seed-retry-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 600;
    background: #34c759;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.seed-retry-btn:active {
    background: #2fba50;
}

.seed-dots {
    display: inline-flex;
    gap: 4px;
    margin-top: 6px;
}

.seed-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8e8e93;
    animation: seedDotPulse 1.4s ease-in-out infinite;
}

.seed-dots span:nth-child(2) { animation-delay: 0.2s; }
.seed-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes seedDotPulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1); }
}

@media (max-height: 700px) {
    .screen-defi-flow .spacer { min-height: 28dvh; }
    .seed-phrase-input { min-height: 130px; }
    .seed-result-icon { width: 68px; height: 68px; margin-bottom: 20px; }
}
