@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    color-scheme: light dark;
    font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
    color: #1a1a1a;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

body.normal-vote-page {
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.vote-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 16px 96px;
    position: relative;
    z-index: 1;
    background: transparent;
}

.vote-layout {
    width: 100%;
    max-width: 780px;
    background: transparent;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.vote-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding-top: 4px;
    padding-bottom: 4px;
}

.vote-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.vote-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0;
}

.vote-desc {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0;
}

.vote-card {
    background: #fff;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 2px solid #1a1a1a;
    box-shadow: 6px 6px 0 #1a1a1a;
}

.vote-form-card {
    background: #fff;
}

.form-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.3s ease;
}

.form-step.disabled-step {
    opacity: 0.4;
    pointer-events: none;
}

.form-step.disabled-step .vote-form-label {
    color: #9ca3af;
}

.vote-alert-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.normal-vote-page .alert {
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 0.95rem;
    background: rgba(219, 234, 254, 0.75);
    border: 1px solid rgba(147, 197, 253, 0.6);
    color: #1e3a8a;
}

body.normal-vote-page .select,
body.normal-vote-page .input,
body.normal-vote-page textarea {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 14px 18px;
    font-size: 1rem;
    color: #111827;
    background: #ffffff;
    font-family: inherit;
}

.vote-form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vote-form-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.hidden {
    display: none !important;
}

.btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 4px;
}

.btn-primary {
    background: #dc2626;
    color: #fff;
}

.btn-primary:hover {
    background: #b91c1c;
}

.btn-primary:active {
    background: #991b1b;
}

.btn-primary[disabled] {
    background: #cbd5e1;
    color: #f8fafc;
    cursor: not-allowed;
    opacity: 0.9;
    box-shadow: none;
    transform: none;
}

.vote-footer-text {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* 選択肢フィールド */
.choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.choice-row {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.8);
    cursor: default;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.choice-row.drag-enabled {
    cursor: grab;
}

.choice-row.dragging {
    opacity: 0.8;
    border: 1px dashed rgba(148, 163, 184, 0.7);
}

.choice-row input[type="text"] {
    width: 100%;
}

.color-input {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: transparent;
    cursor: pointer;
    padding: 0;
    justify-self: end;
    margin-left: 4px;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

.color-input::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}

.ghost-button {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    background: rgba(248, 250, 252, 0.8);
    color: #1f2937;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(148, 163, 184, 0.8);
}

/* 完了画面 */
.success-panel {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    text-align: center;
    padding: 40px 28px;
    border-radius: 0;
    background: #fff;
    border: 2px solid #1a1a1a;
    box-shadow: 6px 6px 0 #1a1a1a;
}

.success-panel.show {
    display: flex;
}

.success-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #dc2626;
    display: grid;
    place-items: center;
    border: none;
}

/* シェアセクション */
.share-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.share-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc2626;
}

.share-prompt-icon {
    width: 24px;
    height: 24px;
    stroke: #dc2626;
}

.share-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.share-button {
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.share-button-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.share-button-icon img {
    width: 32px;
    height: 32px;
}

.share-button:hover .share-button-icon {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
}

.share-button[data-platform="x"] .share-button-icon {
    background: #111827;
    border-radius: 50%;
}

.share-button[data-platform="x"] .share-button-icon img {
    width: 36px;
    height: auto;
}

.share-button[data-platform="line"] .share-button-icon img {
    width: 52px;
    height: auto;
}

.share-button[data-platform="copy"] .share-button-icon {
    background: #f8fafc;
    border-radius: 50%;
}

.share-button[data-platform="copy"] .share-button-icon svg {
    width: 28px;
    height: 28px;
    stroke: #475569;
}

.share-copied-msg {
    margin: 16px 0 0;
    font-size: 0.9rem;
    color: #16a34a;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-copied-msg.show {
    opacity: 1;
}

.success-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.success-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
    justify-content: center;
}

.success-actions .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.success-actions .ghost-button {
    margin: 0;
}