:root {
    --pas-blue: #1267aa;
    --pas-blue-dark: #0d568f;
    --pas-pink: #ed4d73;
    --pas-pink-soft: #e8a0b3;
    --pas-ink: #282830;
    --pas-muted: #74747d;
    --pas-surface: #f5f4f1;
    --pas-surface-cool: #f3f5f8;
    --pas-border: #e6e3de;
    --pas-error: #c72f3d;
    --pas-radius: 4px;
    --pas-bubble-radius: 12px;
}

.pas-apply-card,
.pas-minimal-screening {
    color: var(--pas-ink);
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.pas-apply-card *,
.pas-minimal-screening * {
    box-sizing: border-box;
}

/* Application form */
.pas-apply-card {
    width: min(100%, 503px);
    margin: 0 auto 32px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.pas-apply-hero {
    padding: 34px 28px 18px;
    background: #fff;
    color: var(--pas-ink);
}

.pas-apply-bot,
.pas-apply-bot > div {
    display: block;
    width: 100%;
}

.pas-apply-title {
    margin: 0 0 18px;
    color: var(--pas-blue);
    font-size: 34px;
    font-weight: 500;
    letter-spacing: 0.025em;
    line-height: 1.2;
    text-align: center;
}

.pas-apply-inquiry {
    margin: 0;
    color: var(--pas-ink);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.pas-apply-inquiry a,
.pas-agree-copy a {
    color: #d76582;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.pas-apply-divider {
    display: block;
    width: 92px;
    height: 1px;
    margin: 30px auto 0;
    background: #bcbcbc;
}

.pas-apply-message-area {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 28px 20px;
    background: #fff;
}

.pas-apply-mini-avatar,
.pas-chat-avatar {
    display: inline-flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--pas-blue);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.12em;
    line-height: 1;
}

.pas-apply-mini-avatar {
    margin-top: 9px;
}

.pas-apply-greeting {
    max-width: calc(100% - 44px);
    margin: 0;
    padding: 16px 18px;
    border: 0;
    border-radius: var(--pas-bubble-radius);
    background: var(--pas-surface);
    color: var(--pas-ink);
    font-size: 13px;
    line-height: 1.55;
}

.pas-apply-card .pas-minimal-form {
    max-width: none;
    margin: 0;
    padding: 0 28px 38px;
}

.pas-minimal-form p {
    margin: 0 0 18px;
}

.pas-minimal-form label {
    display: block;
    color: var(--pas-ink);
}

.pas-apply-card .pas-field-label {
    display: block;
    margin: 0 0 6px;
    color: #36363d;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.pas-minimal-form input[type="text"],
.pas-minimal-form input[type="email"],
.pas-minimal-form select,
.pas-minimal-form textarea {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 52px;
    margin-top: 0;
    padding: 12px 16px;
    border: 1px solid var(--pas-border) !important;
    border-radius: var(--pas-radius) !important;
    outline: none;
    background: var(--pas-surface) !important;
    box-shadow: none !important;
    color: var(--pas-ink) !important;
    font: inherit;
    font-size: 16px;
    opacity: 1 !important;
    visibility: visible !important;
}

.pas-minimal-form input[type="text"]:focus,
.pas-minimal-form input[type="email"]:focus,
.pas-minimal-form select:focus,
.pas-minimal-form textarea:focus {
    border-color: #9bb8ce !important;
    box-shadow: 0 0 0 2px rgba(18, 103, 170, 0.1) !important;
}

.pas-minimal-form input::placeholder,
.pas-minimal-form textarea::placeholder {
    color: #8a8a91;
    opacity: 1;
}

.pas-apply-upload {
    position: relative;
    display: grid !important;
    min-height: 112px;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border: 1px solid var(--pas-border);
    border-radius: var(--pas-radius);
    background: var(--pas-surface);
    color: var(--pas-ink);
    cursor: pointer;
}

.pas-apply-upload:hover,
.pas-apply-upload:focus-within {
    border-color: #c9c4bc;
}

.pas-apply-upload.has-file {
    border-color: var(--pas-pink-soft);
    background: #fff7f9;
}

.pas-upload-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cdc9c4;
    border-radius: var(--pas-radius);
    background: #fff;
    color: #43538a;
    font-size: 19px;
    font-weight: 700;
}

.pas-upload-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
}

.pas-upload-main {
    max-width: 100%;
    overflow: hidden;
    color: var(--pas-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pas-upload-hint {
    color: var(--pas-muted);
    font-size: 12px;
    line-height: 1.45;
}

.pas-apply-upload input[type="file"] {
    position: absolute;
    width: 1px !important;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
}

.pas-apply-card .pas-agree-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #55555d;
    font-size: 13px;
}

.pas-apply-card .pas-minimal-form input[type="checkbox"] {
    display: inline-block !important;
    width: 18px !important;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: var(--pas-pink);
    opacity: 1 !important;
    visibility: visible !important;
}

.pas-agree-copy {
    line-height: 1.5;
}

.pas-agree-copy-ja {
    display: block;
    margin-top: 4px;
}

.pas-apply-actions,
.pas-answer-actions {
    text-align: center;
}

.pas-minimal-form button,
.pas-calendar-option-list button {
    display: inline-flex !important;
    min-width: 154px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 0 !important;
    border-radius: var(--pas-radius) !important;
    background: var(--pas-pink) !important;
    box-shadow: none !important;
    color: #fff !important;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
}

.pas-apply-card .pas-minimal-form button {
    min-width: 184px;
}

.pas-minimal-form button:hover,
.pas-minimal-form button:focus-visible,
.pas-calendar-option-list button:hover,
.pas-calendar-option-list button:focus-visible {
    background: #d93f64 !important;
    color: #fff !important;
}

.pas-minimal-form button:disabled {
    background: var(--pas-pink-soft) !important;
    cursor: not-allowed;
}

/* Screening chat */
.pas-minimal-screening {
    width: min(100%, 503px);
    margin: 0 auto;
    padding: 0;
}

.pas-chat-shell {
    max-width: 503px;
    margin: 0 auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.pas-candidate-summary summary::before {
    content: "▼";
    position: absolute;
    left: 10px;
    top: 50%;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    transform: translateY(-50%);
}

.pas-chat-content {
    padding: 0 18px 28px;
}

.pas-candidate-summary {
    margin: 0 0 20px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--pas-radius);
    background: var(--pas-surface-cool);
}

.pas-candidate-summary summary {
    position: relative;
    display: block;
    padding: 9px 13px 9px 28px;
    background: var(--pas-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
}

.pas-candidate-summary summary::-webkit-details-marker {
    display: none;
}

.pas-candidate-summary:not([open]) summary::before {
    content: "▶";
}

.pas-candidate-summary dl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 3px 10px;
    margin: 0;
    padding: 13px 14px 15px;
    font-size: 11px;
    line-height: 1.3;
}

.pas-candidate-summary dt {
    color: #a0a3a9;
}

.pas-candidate-summary dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--pas-ink);
}

.pas-screening-opening-row,
.pas-screening-intro-row {
    margin: 0 0 10px;
}

.pas-chat-opening-bubble {
    padding-top: 14px;
    padding-bottom: 14px;
}

.pas-chat-bubble .pas-chat-message-title {
    display: block;
    margin: 0 0 3px;
    color: #222229;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.pas-screening-intro {
    max-width: calc(100% - 44px);
    margin: 0;
    padding: 13px 16px;
    border: 0;
    border-radius: var(--pas-bubble-radius);
    background: var(--pas-surface);
    color: var(--pas-ink);
    font-size: 13px;
    line-height: 1.55;
}

.pas-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid #ededed;
}

.pas-chat-thread-hidden-system .pas-chat-row-system {
    display: none;
}

.pas-chat-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pas-chat-row-user {
    justify-content: flex-end;
}

.pas-chat-avatar {
    margin-top: 5px;
}

.pas-chat-user-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
    border: 1px solid #e694aa;
    border-radius: 50%;
    background: #fff;
    color: #d76886;
    font-size: 11px;
    line-height: 1;
}

.pas-chat-bubble {
    max-width: calc(100% - 44px);
    padding: 12px 16px;
    border: 0;
    border-radius: var(--pas-bubble-radius);
    background: var(--pas-surface);
    box-shadow: none;
    color: var(--pas-ink);
    font-size: 13px;
    line-height: 1.55;
}

.pas-chat-row-assistant .pas-chat-bubble,
.pas-chat-row-system .pas-chat-bubble,
.pas-chat-row-user .pas-chat-bubble {
    border: 0;
    border-radius: var(--pas-bubble-radius);
    background: var(--pas-surface);
}

.pas-chat-bubble strong {
    display: none;
}

.pas-chat-bubble p {
    margin: 0;
}

.pas-screening-apply-disabled {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 0.58 !important;
}

.pas-answer-panel {
    max-width: none;
    margin: 0;
    padding: 16px 0 0;
    border: 0;
}

.pas-answer-panel > p:first-of-type {
    margin-bottom: 13px;
}

.pas-answer-panel label {
    display: block;
    margin: 0;
    color: #47474e;
    font-size: 14px;
    font-weight: 700;
}

.pas-chat-form textarea {
    min-height: 74px;
    margin-top: 7px;
    padding: 12px 14px;
    resize: vertical;
    border-color: #cdcdcd !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 13px;
    font-weight: 400;
}

.pas-answer-actions {
    margin-bottom: 0 !important;
}

.pas-chat-waiting,
.pas-form-waiting {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 0;
    color: var(--pas-muted);
    font-size: 12px;
    line-height: 1.45;
}

.pas-chat-form.is-submitting .pas-chat-waiting,
.pas-minimal-form.is-submitting .pas-form-waiting {
    display: flex;
}

.pas-chat-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f0cbd5;
    border-top-color: var(--pas-pink);
    border-radius: 50%;
    animation: pas-spin 0.8s linear infinite;
}

@keyframes pas-spin {
    to {
        transform: rotate(360deg);
    }
}

.pas-minimal-notice,
.pas-minimal-error,
.pas-chat-complete,
.pas-calendar-options,
.pas-calendar-confirmed,
.pas-calendar-pending {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #dbe2e8;
    border-radius: var(--pas-radius);
    background: var(--pas-surface-cool);
    color: #3e4d5a;
    font-size: 12px;
}

.pas-minimal-error {
    border-color: #f0c8cd;
    background: #fff5f6;
    color: var(--pas-error);
}

.pas-chat-complete,
.pas-calendar-options,
.pas-calendar-confirmed,
.pas-calendar-pending {
    margin-top: 16px;
}

.pas-chat-complete p,
.pas-calendar-options p,
.pas-calendar-confirmed p,
.pas-calendar-pending p {
    margin: 6px 0 0;
}

.pas-calendar-options h3 {
    margin: 0 0 6px;
    color: var(--pas-blue-dark);
    font-size: 16px;
}

.pas-calendar-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pas-calendar-option-list form {
    margin: 0;
}

.pas-calendar-option-list button {
    min-width: 0;
    min-height: 40px;
    font-size: 12px;
}

@media (max-width: 560px) {
    .pas-apply-card,
    .pas-minimal-screening,
    .pas-chat-shell {
        width: 100%;
        max-width: none;
    }

    .pas-apply-hero {
        padding: 28px 20px 16px;
    }

    .pas-apply-title {
        font-size: 32px;
    }

    .pas-apply-inquiry {
        font-size: 12px;
    }

    .pas-apply-message-area,
    .pas-apply-card .pas-minimal-form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .pas-apply-greeting {
        font-size: 12px;
    }

    .pas-chat-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    .pas-candidate-summary dl {
        grid-template-columns: 108px minmax(0, 1fr);
    }

    .pas-calendar-option-list {
        display: block;
    }

    .pas-calendar-option-list form + form {
        margin-top: 8px;
    }

    .pas-calendar-option-list button {
        width: 100%;
    }
}
