.mph-wrap {
    --mph-gold: #c7a55a;
    --mph-blue: #79b7c8;
    --mph-panel: rgba(10, 19, 36, .78);
    --mph-border: rgba(121, 183, 200, .34);
    margin: 1.5rem auto;
    max-width: 880px;
    color: inherit;
}

.mph-header { text-align: center; margin-bottom: 1.5rem; }
.mph-header h2 { margin-bottom: .45rem; }
.mph-header p { max-width: 680px; margin: 0 auto; opacity: .84; }
.mph-form { text-align: center; }
.mph-pair { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); align-items: center; gap: .85rem; }

.mph-sign-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    padding: .85rem;
    border: 1px solid var(--mph-border);
    border-radius: 16px;
    background: radial-gradient(circle at 50% 15%, rgba(50, 88, 130, .38), transparent 62%), var(--mph-panel);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .2);
}

.mph-card-label { color: var(--mph-gold); font-size: .95rem; font-weight: 700; letter-spacing: .035em; }
.mph-image-frame {
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: min(100%, 280px);
    aspect-ratio: 17 / 13;
    overflow: hidden;
    border-radius: 10px;
}
.mph-image-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mph-placeholder { color: var(--mph-blue); font-size: 4rem; opacity: .6; }
.mph-sign-card select {
    box-sizing: border-box;
    align-self: center;
    width: min(100%, 260px);
    height: 46px;
    min-height: 46px;
    margin: 0;
    padding: .45rem 2.25rem .45rem .85rem;
    border: 1px solid #45627c;
    border-radius: 8px;
    background-color: #202b3d;
    color: #eef2f7;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.mph-sign-card select:hover {
    background-color: #253247;
    border-color: #5d7e9b;
}
.mph-sign-card select:focus {
    border-color: var(--mph-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(199, 165, 90, .2), inset 0 1px 2px rgba(0, 0, 0, .22);
}
.mph-sign-card select option {
    background: #202b3d;
    color: #eef2f7;
}
.mph-link { color: var(--mph-gold); font-size: 2rem; }
.mph-link::before, .mph-link::after { content: ''; display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--mph-border), transparent); }
.mph-link span { display: block; padding: .45rem 0; }

.mph-form button {
    margin-top: 1.4rem;
    padding: .75rem 1.5rem;
    border: 1px solid rgba(199, 165, 90, .65);
    border-radius: 999px;
    background: linear-gradient(135deg, #315d79, #20344f);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.mph-result, .mph-message { margin-top: 1.75rem; padding: 1.35rem 1.5rem; border: 1px solid var(--mph-border); border-radius: 14px; background: var(--mph-panel); }
.mph-result-pair { margin: 0 0 1rem; color: var(--mph-gold); font-size: 1.18rem; font-weight: 700; text-align: center; }
.mph-result-text > :last-child { margin-bottom: 0; }
.mph-again { display: inline-block; margin-top: 1rem; }
.mph-error { border-color: rgba(190, 74, 74, .55); }

@media (max-width: 640px) {
    .mph-pair { grid-template-columns: 1fr; }
    .mph-link { transform: rotate(90deg); width: 56px; margin: -5px auto; }
    .mph-image-frame { width: min(100%, 300px); }
}
