* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    background: #fff;
    color: #333;
    min-height: 100vh;
}

#trial-app {
    min-height: 100vh;
}

.trial-step {
    min-height: 100vh;
}

.trial-layout {
    display: flex;
    min-height: 100vh;
}

.trial-form-area {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.trial-form-inner {
    max-width: 560px;
    width: 100%;
}

.trial-visual-area {
    flex: 0 0 45%;
    max-width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.trial-visual-blue {
    background: #6c63ff;
}

.trial-visual-yellow {
    background: #f5a623;
}

.trial-visual-green {
    background: #00c875;
}

.trial-visual-content {
    width: 80%;
    max-width: 400px;
}

.trial-illustration svg {
    width: 100%;
    height: auto;
}

.trial-heading {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.4;
    color: #1a1a1a;
}

.trial-heading-sub {
    font-size: 22px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.trial-sub-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.trial-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

/* 許可番号: 公式サイト同様の分割入力（2桁 - 区分 - 6桁） */
.trial-license-parts {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.trial-license-part {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.trial-license-part-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
}

.trial-license-pref {
    width: 4.5rem;
    text-align: center;
    letter-spacing: 0.06em;
}

.trial-license-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    min-height: 42px;
    padding: 10px 8px;
    box-sizing: border-box;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: #f8fafc;
    color: #0f766e;
    cursor: default;
    user-select: none;
}

.trial-license-part--serial {
    flex: 1 1 8rem;
}

.trial-license-serial {
    width: 100%;
    min-width: 8rem;
    letter-spacing: 0.06em;
}

.trial-license-sep {
    padding-bottom: 11px;
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
    user-select: none;
}

.trial-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trial-option-btn {
    padding: 10px 20px;
    border: 1.5px solid #d0d0d0;
    border-radius: 24px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.trial-option-btn:hover {
    border-color: #0073ea;
    color: #0073ea;
}

.trial-option-btn.active {
    border-color: #0073ea;
    color: #0073ea;
    background: #f0f7ff;
}

.trial-option-check {
    position: relative;
    padding-left: 38px;
    -webkit-appearance: none;
    appearance: none;
}

/* チェック枠は ::before のみ（::after 二重描画・ネイティブ風の重なり防止） */
.trial-option-check::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 1.5px solid #d0d0d0;
    border-radius: 4px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    pointer-events: none;
}

.trial-option-check::after {
    content: none !important;
    display: none !important;
}

.trial-option-check.active::before {
    background-color: #0073ea;
    border-color: #0073ea;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2l2.4 2.4 4.6-4.8'/%3E%3C/svg%3E");
}

.trial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.trial-back-btn {
    padding: 10px 24px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.trial-back-btn:hover {
    border-color: #999;
    color: #333;
}

.trial-next-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    background: #0073ea;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.trial-next-btn:hover {
    background: #0060c2;
}

.trial-submit-btn {
    padding: 12px 40px;
    border: none;
    border-radius: 6px;
    background: #0073ea;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.trial-submit-btn:hover {
    background: #0060c2;
}

.trial-submit-btn:disabled {
    background: #b0cce8;
    cursor: not-allowed;
}

/* Trial badge */
.trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f0faf4;
    border: 1px solid #b8e6cc;
    border-radius: 8px;
    color: #1a7a42;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.trial-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #00c875;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

/* Form fields */
.trial-form-group {
    margin-bottom: 20px;
}

.trial-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.trial-required {
    color: #d32f2f;
    margin-left: 2px;
    font-weight: 700;
}

.trial-required-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #d32f2f;
    border: 1px solid #f5b4b4;
    border-radius: 4px;
    vertical-align: middle;
}

.trial-question-required-only {
    margin: 0 0 8px;
}

.trial-terms-required-label {
    margin-bottom: 8px;
}

.trial-step-error {
    margin-top: 24px;
    min-height: 1.25em;
    font-size: 14px;
    color: #d32f2f;
    font-weight: 600;
}

.trial-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    transition: border-color 0.15s ease;
    outline: none;
}

.trial-input:focus {
    border-color: #0073ea;
}

.trial-input::placeholder {
    color: #aaa;
}

/* Domain input */
.trial-domain-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
}

.trial-domain-input {
    border-radius: 6px 0 0 6px;
    flex: 1;
}

.trial-domain-suffix {
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1.5px solid #d0d0d0;
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.trial-domain-status {
    font-size: 13px;
    margin-top: 4px;
    min-height: 20px;
}

.trial-domain-status.checking {
    color: #999;
}

.trial-domain-status.available {
    color: #00c875;
}

.trial-domain-status.unavailable {
    color: #e2445c;
}

.trial-error {
    color: #e2445c;
    font-size: 13px;
    margin-top: 4px;
    min-height: 0;
}

/* Terms checkbox */
.trial-terms-group {
    margin-top: 24px;
}

.trial-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.trial-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #0073ea;
}

.trial-checkbox-label a {
    color: #0073ea;
    text-decoration: underline;
}

.trial-checkbox-label a:hover {
    color: #0060c2;
}

/* Loading overlay */
.trial-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.trial-loading-inner {
    text-align: center;
}

.trial-loading-inner p {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
}

.trial-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: #0073ea;
    border-radius: 50%;
    animation: trial-spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 900px) {
    .trial-layout {
        flex-direction: column;
    }

    .trial-form-area {
        flex: none;
        max-width: 100%;
        padding: 30px 20px;
    }

    .trial-visual-area {
        display: none;
    }

    .trial-heading {
        font-size: 22px;
    }

    .trial-heading-sub {
        font-size: 18px;
    }
}

/* ------------------------------------------------------------------ */
/* LaS / Connect trial brand variants (MD3-ish)                        */
/* ------------------------------------------------------------------ */

/* Brand header (visible on mobile) */
.trial-brand-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 28px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.trial-brand-header__mark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.trial-brand-header__logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.trial-brand-header--las .trial-brand-header__mark {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.trial-brand-header--connect .trial-brand-header__mark {
    background: #f0fdfa;
    border-color: #99f6e4;
}

.trial-brand-header__eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 2px;
}

.trial-brand-header__title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 6px;
}

.trial-brand-header__lead {
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}

.trial-brand-header__meta {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: #64748b;
}

/* Right panel logo / kicker / headline */
.trial-visual-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.trial-visual-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.trial-visual-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.trial-visual-las .trial-visual-kicker,
.trial-visual-las-alt .trial-visual-kicker {
    text-transform: none;
    letter-spacing: 0.04em;
}

.trial-visual-headline {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 24px;
}

/* Visual panel gradients */
.trial-visual-las {
    background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
}

.trial-visual-las-alt {
    background: linear-gradient(145deg, #312e81 0%, #4338ca 45%, #2563eb 100%);
}

.trial-visual-connect {
    background: linear-gradient(145deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
}

.trial-visual-connect-alt {
    background: linear-gradient(145deg, #115e59 0%, #0f766e 40%, #06b6d4 100%);
}

/* LaS accent colors */
.trial-page--las .trial-option-btn:hover,
.trial-app--las .trial-option-btn:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.trial-page--las .trial-option-btn.active,
.trial-app--las .trial-option-btn.active {
    border-color: #2563eb;
    color: #1d4ed8;
    background: #eff6ff;
}

.trial-page--las .trial-option-check.active::before,
.trial-app--las .trial-option-check.active::before {
    background-color: #2563eb;
    border-color: #2563eb;
}

.trial-page--las .trial-next-btn,
.trial-app--las .trial-next-btn,
.trial-page--las .trial-submit-btn,
.trial-app--las .trial-submit-btn {
    background: #2563eb;
}

.trial-page--las .trial-next-btn:hover,
.trial-app--las .trial-next-btn:hover,
.trial-page--las .trial-submit-btn:hover,
.trial-app--las .trial-submit-btn:hover {
    background: #1d4ed8;
}

.trial-page--las .trial-input:focus,
.trial-app--las .trial-input:focus {
    border-color: #2563eb;
}

.trial-page--las .trial-checkbox-label input[type="checkbox"],
.trial-app--las .trial-checkbox-label input[type="checkbox"] {
    accent-color: #2563eb;
}

.trial-page--las .trial-checkbox-label a,
.trial-app--las .trial-checkbox-label a {
    color: #2563eb;
}

.trial-page--las .trial-spinner,
.trial-app--las .trial-spinner {
    border-top-color: #2563eb;
}

.trial-page--las .trial-option-btn,
.trial-app--las .trial-option-btn {
    border-radius: 12px;
}

/* Connect accent colors */
.trial-page--connect .trial-option-btn:hover,
.trial-app--connect .trial-option-btn:hover {
    border-color: #0d9488;
    color: #0f766e;
}

.trial-page--connect .trial-option-btn.active,
.trial-app--connect .trial-option-btn.active {
    border-color: #0d9488;
    color: #0f766e;
    background: #f0fdfa;
}

.trial-page--connect .trial-option-check.active::before,
.trial-app--connect .trial-option-check.active::before {
    background-color: #0d9488;
    border-color: #0d9488;
}

.trial-page--connect .trial-next-btn,
.trial-app--connect .trial-next-btn,
.trial-page--connect .trial-submit-btn,
.trial-app--connect .trial-submit-btn {
    background: #0d9488;
}

.trial-page--connect .trial-next-btn:hover,
.trial-app--connect .trial-next-btn:hover,
.trial-page--connect .trial-submit-btn:hover,
.trial-app--connect .trial-submit-btn:hover {
    background: #0f766e;
}

.trial-page--connect .trial-input:focus,
.trial-app--connect .trial-input:focus {
    border-color: #0d9488;
}

.trial-page--connect .trial-checkbox-label input[type="checkbox"],
.trial-app--connect .trial-checkbox-label input[type="checkbox"] {
    accent-color: #0d9488;
}

.trial-page--connect .trial-checkbox-label a,
.trial-app--connect .trial-checkbox-label a {
    color: #0d9488;
}

.trial-page--connect .trial-spinner,
.trial-app--connect .trial-spinner {
    border-top-color: #0d9488;
}

.trial-page--connect .trial-option-btn,
.trial-app--connect .trial-option-btn {
    border-radius: 12px;
}

.trial-page--connect .trial-badge {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #115e59;
}

.trial-page--connect .trial-badge-icon {
    background: #0d9488;
}

/* ------------------------------------------------------------------ */
/* ATS トライアル利用前設定（単独カラム。登録スプリットは使わない） */
/* ------------------------------------------------------------------ */

.trial-layout--setup {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

.trial-layout--setup .trial-form-area {
    display: block;
    flex: none;
    max-width: none;
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    align-items: stretch;
    justify-content: flex-start;
    padding: 28px 24px 64px;
}

.trial-layout--setup .trial-form-inner {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.trial-page--setup .trial-brand-header__lead,
.trial-page--setup .trial-brand-header__meta {
    display: none;
}

.trial-layout--setup .trial-heading {
    font-size: 24px;
    margin-bottom: 8px;
}

.trial-layout--setup .trial-sub-text {
    margin-bottom: 16px;
}

.trial-layout--setup .trial-visual-area {
    display: none;
}

.trial-page--setup .connect-setup-terms-shell {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.trial-page--setup .connect-setup-terms-scroll {
    contain: none;
    min-height: 18rem;
    max-height: min(56vh, 32rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.15rem 1.35rem 1.6rem;
    box-sizing: border-box;
    scroll-behavior: smooth;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.75;
    color: #1e293b;
}

.trial-page--setup .connect-setup-terms-scroll > :first-child {
    margin-top: 0;
}

.trial-page--setup .connect-setup-terms-scroll .connect-terms-page__meta {
    margin: 0 0 0.9rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #64748b;
}

.trial-page--setup .connect-setup-terms-scroll h2 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 1.35rem 0 0.55rem;
    line-height: 1.45;
    color: #0f172a;
}

.trial-page--setup .connect-setup-terms-scroll p,
.trial-page--setup .connect-setup-terms-scroll ul {
    margin: 0 0 0.9rem;
}

.trial-page--setup .connect-setup-terms-scroll ul {
    padding-left: 1.5rem;
    list-style: disc;
    list-style-position: outside;
}

.trial-page--setup .connect-setup-terms-scroll li {
    margin: 0 0 0.4rem;
    padding: 0;
    line-height: 1.7;
}

.trial-page--setup .connect-setup-terms-status {
    margin: 0.85rem 0 0;
    align-items: flex-start;
}

.trial-page--setup .connect-setup-terms-status .material-symbols-rounded {
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.trial-page--setup .connect-setup-terms-status__count,
.trial-page--setup .connect-setup-terms-status__end {
    margin-top: 0.1rem;
}

.trial-setup-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.trial-setup-top .trial-heading {
    margin-bottom: 8px;
}

.trial-setup-logout-form {
    margin: 0;
    flex: 0 0 auto;
}

.trial-setup-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    margin: 4px 0 0;
}

.trial-setup-support {
    border: 0;
    background: none;
    padding: 0;
    font-size: 13px;
    color: #1565c0;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 700;
}

.trial-setup-support:hover {
    color: #0d47a1;
}

.trial-setup-logout {
    border: 0;
    background: none;
    padding: 0;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
}

.trial-setup-logout:hover {
    color: #1e293b;
}

.trial-page--setup .las-connect-page {
    max-width: none;
}

.trial-page--setup .las-connect-setup-page {
    position: static;
}

.trial-sample-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 20px;
}

.trial-sample-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    background: #fff;
}

.trial-sample-card:has(input:checked) {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.trial-sample-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trial-sample-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.trial-sample-card__desc {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.trial-sample-card__prep {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
}

.trial-sample-card__prep[hidden] {
    display: none !important;
}

.trial-page--setup .connect-setup-license-verify-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 0 0.75rem;
}

.trial-page--setup .connect-setup-license-verify-ok {
    font-size: 0.875rem;
    font-weight: 700;
    color: #047857;
}

.trial-page--setup .connect-setup-license-verify-busy {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1565c0;
}

.trial-page--setup #connect_setup_license_verify[aria-busy="true"] {
    opacity: 0.8;
    pointer-events: none;
}

.trial-setup-back-form {
    margin: 0 0 12px;
}

.trial-setup-back {
    border: 0;
    background: none;
    padding: 0;
    font-size: 13px;
    color: #2563eb;
    cursor: pointer;
    text-decoration: underline;
}

.trial-setup-back:hover {
    color: #1d4ed8;
}

.trial-page--setup .connect-setup-license-parts {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
}

.trial-page--setup .connect-setup-license-part {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    min-width: 4.5rem;
}

.trial-page--setup .connect-setup-license-part--serial {
    min-width: 8rem;
    flex: 1 1 8rem;
    max-width: 12rem;
}

.trial-page--setup .connect-setup-license-sep {
    padding-bottom: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
}

.trial-page--setup .connect-setup-license-input,
.trial-page--setup .connect-setup-license-kind {
    height: 44px;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
}

.trial-page--setup .connect-setup-license-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: #f8fafc;
    min-width: 3.25rem;
}

.trial-page--setup .connect-setup-consent-field input[type="text"] {
    width: 100%;
    max-width: 100%;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    display: block;
}
