:root {
    --gold:       #c9a84c;
    --gold-light: #e2c97e;
    --navy:       #1c1c3a;
    --accent:     #1e40af;
    --accent-bg:  #eff6ff;
    --red:        #dc2626;
    --text:       #0f172a;
    --muted:      #64748b;
    --border:     #e2e8f0;
    --surface:    #f1f5f9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ── PROGRESS (sticky) ── */
.progress-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 20px;
    background: transparent;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.progress-sticky.is-stuck {
    background: #fff;
    box-shadow: 0 1px 0 #e2e8f0, 0 4px 16px rgba(0,0,0,0.06);
}
.progress-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.progress-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(28,28,58,0.45);
    white-space: nowrap;
    letter-spacing: 0.05em;
    transition: color 0.25s ease;
}
.progress-sticky.is-stuck .progress-label {
    color: var(--muted);
}
.progress-rail {
    flex: 1;
    height: 4px;
    background: rgba(28,28,58,0.12);
    border-radius: 100px;
    overflow: hidden;
    transition: background 0.25s ease;
}
.progress-sticky.is-stuck .progress-rail {
    background: #e2e8f0;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    width: 0%;
    border-radius: 100px;
    transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
}
.progress-count {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(28,28,58,0.55);
    white-space: nowrap;
    min-width: 40px;
    text-align: right;
    transition: color 0.25s ease;
}
.progress-sticky.is-stuck .progress-count {
    color: var(--gold);
}

/* ── HERO ── */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201,168,76,0.1) 0%, transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    padding: 56px 24px 52px;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231c1c3a' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.hero-logo-img { max-height: 68px; width: auto; }
.hero-x {
    font-family: 'Inter', sans-serif;
    font-size: 26px; font-weight: 300;
    color: rgba(28,28,58,0.25);
}
.hero-rakuten-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}
.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-top: 12px;
}
.hero-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 24px;
}
.hero-meta-item .meta-label {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.hero-meta-item .meta-value {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.04em;
    line-height: 1;
}
.hero-meta-sep {
    width: 1px;
    height: 32px;
    background: rgba(28,28,58,0.15);
}

/* ── LAYOUT ── */
.wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

.hero-title {
    width: 100%;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1c1c3a;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.other-text-wrap {
    margin-top: 10px;
}
.form-text {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #1c1c3a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-text:focus {
    outline: none;
    border-color: #e60020;
}
.survey-intro {
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    color: #555;
    padding: 16px 20px 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

/* ── CARD ── */
.card {
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 8px 32px -8px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.06);
    margin-top: 0;
}

/* ── CARD HEADER ── */
.card-header {
    background: linear-gradient(135deg, #0f0f22 0%, #1c1c3a 100%);
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(201,168,76,0.18);
}
.card-title {
    font-size: 17px; font-weight: 700;
    color: #fff; letter-spacing: 0.1em;
    white-space: nowrap;
}
.event-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.event-badge {
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.32);
    color: var(--gold);
    font-size: 11px; font-weight: 700;
    padding: 5px 13px; border-radius: 100px;
    letter-spacing: 0.05em; white-space: nowrap;
}

/* ── ERROR BANNER ── */
.error-banner {
    margin: 20px 32px 0;
    padding: 13px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: var(--red);
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}

/* ── FORM BODY ── */
.form-body { padding: 40px 32px 12px; }

/* ── QUESTION BLOCK ── */
.q-block { margin-bottom: 40px; }

.q-label {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 18px;
    border-left: 3px solid var(--gold);
    padding-left: 14px;
}
.q-num {
    font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.06em;
    white-space: nowrap;
    margin-right: 10px;
    flex-shrink: 0;
    background: rgba(201,168,76,0.1);
    border: 1px solid rgba(201,168,76,0.35);
    border-radius: 4px;
    padding: 2px 7px;
    line-height: 1.6;
}
.q-right { flex: 1; }
.q-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.q-text {
    font-size: 15px; font-weight: 700;
    color: var(--text); line-height: 1.6;
}
.q-badges { display: flex; gap: 6px; }
.badge {
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 4px;
    letter-spacing: 0.04em;
}
.badge-req   { color: #fff; background: var(--red); }
.badge-multi { color: var(--accent); background: var(--accent-bg); border: 1px solid #bfdbfe; }

/* ── SELECT BOX ── */
.select-wrap { position: relative; }
.select-wrap::after {
    content: '';
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--muted);
    pointer-events: none;
}
.form-select {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px; font-family: inherit;
    color: var(--text);
    background: var(--surface);
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    font-weight: 500;
}
.form-select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(28,28,58,0.1);
    background: var(--surface);
}

/* ── OPTION GRID ── */
.opts {
    display: grid;
    gap: 8px;
}
.opts.g2 { grid-template-columns: 1fr 1fr; }
.opts.g1 { grid-template-columns: 1fr; }
.opts.g4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 480px) {
    .opts.g4 { grid-template-columns: 1fr 1fr; }
}

/* ── OPTION ITEM ── */
.opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: var(--surface);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.opt:hover {
    border-color: var(--navy);
    background: rgba(28,28,58,0.04);
    box-shadow: 0 2px 8px rgba(28,28,58,0.1);
}
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }

/* カスタムラジオ */
.r {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s;
}
.r::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--navy);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

/* カスタムチェック */
.c {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s, background 0.15s;
}
.c::after {
    content: '';
    width: 10px; height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) scale(0) translateY(-1px);
    transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1);
}

.opt-text {
    font-size: 13.5px; font-weight: 500;
    color: #1e293b; line-height: 1.4;
}

/* 選択状態 */
.opt:has(input:checked) {
    border-color: var(--navy);
    background: rgba(28,28,58,0.05);
    box-shadow: 0 0 0 1px rgba(28,28,58,0.15);
}
.opt:has(input[type="radio"]:checked) .r {
    border-color: var(--navy);
}
.opt:has(input[type="radio"]:checked) .r::after {
    transform: scale(1);
}
.opt:has(input[type="checkbox"]:checked) .c {
    border-color: var(--navy);
    background: var(--navy);
}
.opt:has(input[type="checkbox"]:checked) .c::after {
    transform: rotate(-45deg) scale(1) translateY(-1px);
}
.opt:has(input:checked) .opt-text {
    color: var(--navy); font-weight: 700;
}

/* ── DIVIDER ── */
.div {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 0 0 40px;
}

/* ── ERROR MSG ── */
.err {
    color: var(--red); font-size: 12px;
    margin-top: 7px;
    display: flex; align-items: center; gap: 4px;
}

/* ── SUBMIT ── */
.submit-wrap { padding: 4px 32px 36px; }

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #0f0f22 0%, #1c1c3a 100%);
    color: #fff;
    border: none;
    padding: 18px 24px;
    font-size: 15px; font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.12em;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(28,28,58,0.25);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: relative; overflow: hidden;
}
.btn-submit::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(201,168,76,0.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(28,28,58,0.35);
}
.btn-submit:hover::after { opacity: 1; }
.btn-submit:active { transform: translateY(0); }
.btn-arrow { font-size: 18px; transition: transform 0.25s; display: inline-block; }
.btn-submit:hover .btn-arrow { transform: translateX(5px); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .hero { padding: 48px 16px 44px; }
    .hero-logo-img { max-height: 50px; }
    .hero-x { font-size: 20px; }
    .hero-rakuten-logo { max-height: 36px; }
    .hero-inner { gap: 14px; }

    .wrapper { padding: 0 12px 60px; }
    .card { border-radius: 16px; margin-top: 0; }
    .card-header { padding: 16px 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .progress-sticky { padding: 8px 16px; }
    .error-banner { margin: 16px 20px 0; }

    .form-body { padding: 28px 20px 8px; }
    .q-block { margin-bottom: 32px; }
    .q-text { font-size: 14px; }
    .opts.g2 { grid-template-columns: 1fr 1fr; }
    .opt { padding: 11px 12px; gap: 9px; }
    .opt-text { font-size: 12.5px; }
    .div { margin-bottom: 32px; }
    .submit-wrap { padding: 4px 20px 28px; }
    .btn-submit { font-size: 14px; padding: 16px; }
}
