.agent-page {
    color: #18181b;
    background: #f7f7f8;
}

.agent-page nav:not(:hover) {
    background-color: #fff;
    border-bottom: 1px solid #e7e7eb;
}

.agent-page [hidden] {
    display: none;
}

.agent-main {
    width: min(80%, 1320px);
    margin: auto;
    padding: 124px 0 40px;
    font-family: system-ui, "Microsoft YaHei", sans-serif;
}

.agent-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.agent-heading h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 10px;
}

.agent-heading p,
.agent-access p,
.agent-notice p {
    color: #54545d;
    line-height: 1.6;
}

.agent-access,
.agent-workspace {
    background: #fff;
    border: 1px solid #e3e3e8;
    border-radius: 16px;
}

.agent-access {
    max-width: 460px;
    padding: clamp(20px, 4vw, 36px);
}

.agent-access h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.agent-access p:not(:empty) {
    margin-bottom: 14px;
}

.agent-access form {
    display: grid;
    gap: 10px;
}

.agent-access label {
    font-weight: 600;
}

.agent-access input {
    padding: 11px 12px;
    width: 100%;
    border: 1px solid #b8b8c0;
    border-radius: 8px;
    font: inherit;
}

.agent-button {
    font: inherit;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.agent-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.agent-button-primary {
    color: white;
    background: #bb0038;
    border: 1px solid #bb0038;
    justify-self: start;
    margin-top: 4px;
}

.agent-button-primary:hover:not(:disabled) {
    background: #96002d;
}

.agent-button-secondary {
    background: #fff;
    color: #18181b;
    border: 1px solid #cfcfd6;
}

.agent-button-secondary:hover:not(:disabled) {
    background: #f2f2f4;
}

.agent-main :is(button, input):focus-visible {
    outline: 2px solid #bb0038;
    outline-offset: 3px;
}

.agent-workspace {
    display: flex;
    flex-direction: column;
    height: max(500px, calc(100dvh - 238px));
    overflow: hidden;
}

.agent-notice {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #e3e3e8;
}

.agent-frame,
.agent-frame iframe {
    width: 100%;
    flex: 1;
    min-height: 0;
}

.agent-frame {
    display: flex;
}

.agent-frame iframe {
    border: 0;
}

@media (max-width: 720px) {
    .agent-main {
        width: calc(100% - 28px);
        padding-top: 83px;
    }

    .agent-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .agent-workspace {
        height: max(480px, calc(100dvh - 180px));
    }
}
