* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #fff;
    color: #1c1c20;
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.login-body,
body.admin-body {
    background:
        radial-gradient(circle at top left, rgba(248, 233, 220, 0.9), transparent 34%),
        linear-gradient(180deg, #fff7f1 0%, #fffdfa 26%, #ffffff 100%);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

input[type="password"] {
    width: 100%;
}

img {
    display: block;
    max-width: 100%;
}

:root {
    --page-max-width: 750px;
    --container-max-width: 1328px;
    --accent: #b87d81;
    --accent-dark: #76263c;
    --text-main: #1c1c20;
    --text-mid: #3c3d40;
    --text-light: #97999b;
    --border-light: #eeeeee;
    --field-bg: #f5f5f5;
    --success: #207a50;
    --danger: #bf3131;
}

.common-layout {
    min-height: 100vh;
}

.common-page-container {
    margin: 0 auto;
    max-width: var(--container-max-width);
}

.questionnaire-index-page,
.questionnaire-form-page {
    margin: 0 auto;
    max-width: var(--page-max-width);
    min-height: 100vh;
    background: #fff;
}

.questionaire-banner img {
    width: 100%;
}

.benefits-list {
    display: flex;
    justify-content: space-between;
    height: 134px;
    padding: 16px 0;
    background: linear-gradient(180deg, #f5ebe3, #fff);
}

.benefits-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
}

.benefits-item dt img {
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    object-fit: contain;
}

.benefits-item dd {
    margin: 0;
    color: var(--text-mid);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.35;
}

.benefits-line {
    width: auto;
    height: 1px;
    margin: 0 16px;
    border-bottom: 1px solid var(--border-light);
}

.purchase-channel {
    padding: 24px 16px 48px;
    text-align: center;
}

.purchase-channel-title {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.channel-list {
    padding: 29px 8px 0;
}

.channel-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 24px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

button.channel-item {
    appearance: none;
    text-align: left;
}

.channel-item:last-child {
    margin-bottom: 0;
}

.channel-item:hover,
.channel-item:focus-visible {
    border-color: #d3c0c2;
    box-shadow: 0 12px 24px rgba(28, 28, 32, 0.08);
    transform: translateY(-1px);
}

.channel-item.loading {
    opacity: 0.78;
}

.channel-item_logo {
    width: 48px;
    flex-shrink: 0;
}

.channel-item_logo img {
    width: 100%;
}

.channel-item_title {
    flex: 1;
    color: var(--text-mid);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
}

.channel-item_button {
    width: 24px;
    flex-shrink: 0;
}

.channel-item_button img {
    width: 100%;
}

.questionnaire-process {
    display: flex;
    align-items: center;
    padding: 23px 16px 16px;
    background: linear-gradient(180deg, #fceddd, #fff);
}

.questionnaire-process-step {
    flex: 1;
    color: #63666a;
    font-size: 12px;
    text-align: center;
}

.questionnaire-process-step.active {
    color: var(--text-mid);
}

.questionnaire-process-step img {
    width: 48px;
    margin: 0 auto 12px;
}

.questionnaire-process-step dd {
    margin: 0;
}

.questionnaire-process-icon {
    min-width: 74px;
}

.purchase-form-card {
    padding: 18px 16px 40px;
}

.questionnaire-success-page {
    background:
        radial-gradient(circle at top center, rgba(248, 233, 220, 0.65), transparent 26%),
        #fff;
}

.purchase-form-card-title {
    margin: 0 0 16px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 500;
    line-height: 28px;
}

.questionnaire-form-page .benefits-list {
    height: auto;
    margin-bottom: 24px;
    padding: 16px;
    border: 2px dotted rgba(151, 153, 155, 0.4);
    border-radius: 8px;
    background: #fff;
    color: #000;
    flex-direction: column;
}

.questionnaire-form-page .benefits-item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.questionnaire-form-page .benefits-item:last-child {
    margin-bottom: 0;
}

.questionnaire-form-page .benefits-item dt {
    width: 32px;
    flex-shrink: 0;
}

.questionnaire-form-page .benefits-item dt img {
    width: 32px;
    height: 32px;
    margin: 0;
}

.questionnaire-form-page .benefits-item dd {
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

.purchase-card {
    margin-top: 24px;
}

.purchase-card:first-of-type {
    margin-top: 0;
}

.purchase-card-title {
    margin: 24px 0;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
}

.field-group {
    margin-bottom: 10px;
}

.field-group:last-child {
    margin-bottom: 0;
}

.field-wrapper {
    position: relative;
    border-radius: 8px;
    background: var(--field-bg);
}

.field-wrapper input[type="text"],
.field-wrapper input[type="email"],
.field-wrapper input[type="password"],
.field-wrapper input[type="hidden"],
.field-wrapper select,
.field-wrapper textarea {
    width: 100%;
    padding: 18px 16px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(28, 28, 32, 0.8);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.field-wrapper input[type="text"],
.field-wrapper input[type="email"],
.field-wrapper input[type="password"],
.field-wrapper input[type="hidden"],
.field-wrapper select {
    height: 56px;
}

.field-wrapper textarea {
    min-height: 112px;
    padding: 16px;
    line-height: 1.45;
    resize: vertical;
}

.field-wrapper input::placeholder,
.field-wrapper textarea::placeholder {
    color: var(--text-light);
}

.field-wrapper.is-plain input,
.field-wrapper.is-plain textarea {
    padding: 0 16px;
}

.field-wrapper.is-plain textarea {
    padding-top: 16px;
    padding-bottom: 16px;
}

.field-label {
    position: absolute;
    top: 9px;
    left: 16px;
    color: rgba(151, 153, 155, 0.95);
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.field-wrapper.has-icon input {
    padding-right: 52px;
}

.field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.date-field {
    cursor: pointer;
}

.date-display-input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(28, 28, 32, 0.8);
    text-align: left;
    cursor: pointer;
}

.date-field.is-empty .date-display-input {
    color: var(--text-light);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 0;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-dark);
}

.checkbox-row label {
    color: var(--text-light);
    font-size: 14px;
    line-height: 22px;
}

.error-text {
    min-height: 16px;
    margin-top: 4px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.3;
}

.field-wrapper.has-error {
    border: 1px solid rgba(191, 49, 49, 0.45);
}

.submit-button {
    margin: 12px 0 0;
    padding: 0 12px;
}

.submit-button button {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: #1c1c20;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.submit-button button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.submit-tips {
    min-height: 24px;
    margin-top: 12px;
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
}

.submit-tips.is-success {
    color: var(--success);
}

.submit-tips.is-error {
    color: var(--danger);
}

.channel-pill {
    display: inline-flex;
    align-items: center;
    margin: 0 0 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8f1ec;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 600;
}

.success-shell {
    padding: 20px 18px 56px;
}

.success-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    margin: 6px 0 12px;
}

.success-badge {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #c5868d;
    box-shadow: 0 22px 40px rgba(197, 134, 141, 0.22);
}

.success-check {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 18px;
    border-left: 8px solid #fff;
    border-bottom: 8px solid #fff;
    transform: translate(-46%, -58%) rotate(-45deg);
    border-radius: 2px;
}

.success-spark {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #c5868d;
    clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
    opacity: 0.95;
}

.spark-left-top {
    left: calc(50% - 82px);
    top: 52px;
}

.spark-right-top {
    right: calc(50% - 74px);
    top: 40px;
}

.spark-right-bottom {
    right: calc(50% - 86px);
    top: 128px;
}

.success-title {
    margin: 0 0 28px;
    color: #24262b;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.success-copy {
    max-width: 480px;
    margin: 0 auto;
    color: #3d3f43;
    font-size: 18px;
    line-height: 1.62;
}

.success-copy-lead,
.success-copy-highlight {
    margin: 0;
    color: #774343;
    font-weight: 700;
}

.success-list {
    margin: 4px 0;
    padding-left: 26px;
}

.success-actions {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.date-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.date-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 32, 0.42);
}

.date-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    transform: translateY(100%);
    transition: transform 0.22s ease;
    box-shadow: 0 -18px 36px rgba(28, 28, 32, 0.12);
}

.date-modal.is-open .date-sheet {
    transform: translateY(0);
}

.date-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.date-sheet-title {
    font-size: 17px;
    font-weight: 600;
}

.date-sheet-action {
    padding: 0;
    border: none;
    background: transparent;
    color: #6a5d5b;
    font-size: 15px;
    cursor: pointer;
}

.date-sheet-action.confirm {
    color: var(--accent-dark);
    font-weight: 600;
}

.date-sheet-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.date-picker-col {
    min-width: 0;
}

.date-picker-label {
    display: block;
    margin-bottom: 8px;
    color: #7a7b80;
    font-size: 12px;
}

.date-picker-col select {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #ebdfd9;
    border-radius: 12px;
    background: #fff9f5;
    color: var(--text-main);
}

.admin-page {
    margin: 0 auto;
    max-width: 1280px;
    padding: 24px 18px 60px;
}

.admin-title {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
}

.admin-topbar {
    margin-bottom: 20px;
}

.admin-topbar-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 30px;
    border: 1px solid #f0dfd6;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(248, 233, 220, 0.92), transparent 42%),
        linear-gradient(180deg, rgba(255, 249, 245, 0.95), rgba(255, 255, 255, 0.98));
    box-shadow: 0 24px 52px rgba(60, 43, 43, 0.07);
}

.admin-topbar-copy {
    max-width: 640px;
}

.admin-topbar-badge,
.login-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(197, 134, 141, 0.14);
    color: #83464c;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.admin-intro {
    margin: 10px 0 0;
    color: #6a5d5b;
    font-size: 15px;
    line-height: 1.6;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-header .admin-title {
    margin: 0;
}

.admin-section-heading h2,
.admin-section h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.admin-section-heading p {
    margin: 6px 0 0;
    color: #776e6b;
    font-size: 14px;
    line-height: 1.5;
}

.admin-section-heading-inline {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.admin-userbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    color: #615d5d;
    font-size: 14px;
}

.admin-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-card {
    padding: 18px 18px 20px;
    border: 1px solid #eadfda;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff8f3, #fff);
    box-shadow: 0 16px 32px rgba(28, 28, 32, 0.05);
}

.admin-card strong {
    display: block;
    font-size: 32px;
    line-height: 1.1;
}

.admin-card span {
    display: block;
    margin-top: 8px;
    color: #615d5d;
    font-size: 14px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #f0e6e0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(28, 28, 32, 0.04);
}

.filter-form .field-wrapper input,
.filter-form .field-wrapper select {
    height: 48px;
    padding: 14px 16px 10px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
    margin-top: 4px;
}

.btn,
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid #1c1c20;
    background: #1c1c20;
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(28, 28, 32, 0.12);
}

.btn-link.secondary,
.btn.secondary {
    background: #fff;
    color: #1c1c20;
    border-color: #d7d7d7;
}

.admin-section {
    margin-top: 26px;
}

.admin-section h2 {
    margin: 0 0 14px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #f0e6e0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(28, 28, 32, 0.04);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3ece8;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.45;
}

th {
    background: #fff9f5;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6a5d5b;
}

tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    padding: 20px 0;
    color: #79706f;
    font-size: 14px;
}

.mobile-cards {
    display: none;
}

.mobile-card {
    padding: 16px;
    border: 1px solid #f0e6e0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(28, 28, 32, 0.04);
}

.mobile-card.empty {
    color: #79706f;
    font-size: 14px;
}

.mobile-card + .mobile-card {
    margin-top: 12px;
}

.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-card-header strong {
    font-size: 18px;
}

.mobile-card-header span {
    color: #83464c;
    font-size: 13px;
    font-weight: 700;
}

.mobile-card-list {
    margin: 0;
}

.mobile-card-list div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f4ece8;
}

.mobile-card-list div:last-child {
    border-bottom: none;
}

.mobile-card-list dt {
    color: #7a726f;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mobile-card-list dd {
    margin: 0;
    color: #2b2d31;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: 32px 28px 30px;
    border: 1px solid #f0dfd6;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(248, 233, 220, 0.56), transparent 38%),
        rgba(255, 255, 255, 0.98);
    box-shadow: 0 26px 60px rgba(60, 43, 43, 0.08);
}

.login-title {
    margin: 14px 0 8px;
    font-size: 38px;
    line-height: 1.2;
}

.login-subtitle {
    margin: 0 0 24px;
    color: #6a5d5b;
    font-size: 15px;
    line-height: 1.5;
}

.login-field + .login-field {
    margin-top: 16px;
}

.login-label {
    display: block;
    margin-bottom: 8px;
    color: #5e5857;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.login-input-wrap {
    border: 1px solid transparent;
    border-radius: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-input-wrap:focus-within {
    border-color: rgba(184, 125, 129, 0.6);
    box-shadow: 0 0 0 4px rgba(184, 125, 129, 0.12);
    background: #fff;
}

.login-input-wrap input[type="text"],
.login-input-wrap input[type="password"] {
    height: 58px;
    padding: 0 18px;
    border: none;
    background: transparent;
    color: #1f2126;
    outline: none;
}

.login-input-wrap input::placeholder {
    color: #aaa4a2;
}

.login-actions {
    margin-top: 24px;
}

.login-error {
    min-height: 20px;
    margin-bottom: 12px;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .purchase-channel {
        padding-bottom: 36px;
    }

    .channel-list {
        padding-left: 0;
        padding-right: 0;
    }

    .channel-item {
        padding: 16px 18px;
    }

    .questionnaire-process {
        padding-left: 12px;
        padding-right: 12px;
    }

    .questionnaire-process-icon {
        min-width: 56px;
    }

    .purchase-form-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .admin-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 18px;
        border-radius: 22px;
    }

    .admin-title {
        font-size: 26px;
    }

    .admin-summary {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .admin-card {
        padding: 16px;
        border-radius: 18px;
    }

    .admin-card strong {
        font-size: 26px;
    }

    .filter-form {
        padding: 16px;
        border-radius: 18px;
    }

    .table-wrap {
        display: none;
    }

    .mobile-cards {
        display: block;
    }

    .mobile-card-list div {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 10px;
    }

    .date-sheet {
        padding-left: 12px;
        padding-right: 12px;
    }

    .date-sheet-body {
        gap: 8px;
    }

    .success-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .success-hero {
        height: 176px;
        margin-top: 2px;
    }

    .success-badge {
        width: 94px;
        height: 94px;
    }

    .success-title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .success-copy {
        font-size: 17px;
        line-height: 1.68;
    }

    .login-page {
        padding: 18px 12px;
    }

    .login-card {
        padding: 24px 18px 22px;
        border-radius: 22px;
    }

    .login-title {
        font-size: 32px;
    }
}
