/* 共通スタイル */
:root {
    --primary-color: #ff4b00;
    --secondary-color: #005aff;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', "BIZ UDPGothic", sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.stepper {
    display: flex;
    gap: 1rem;
}

.step {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #eee;
    font-size: 0.8rem;
    color: #666;
    transition: all 0.3s;
}

.step.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

main {
    flex: 1;
    position: relative;
}

#map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

#controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    max-height: calc(100% - 40px);
    overflow-y: auto;
}

.workflow-step {
    display: none;
}

.workflow-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

h2 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 15px;
}

p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

.btn-group,
.grid-options {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 15px 0;
    padding-bottom: 5px;
    /* adjust for scrollbar */
}

.btn-group::-webkit-scrollbar,
.grid-options::-webkit-scrollbar {
    height: 4px;
}

.btn-group::-webkit-scrollbar-thumb,
.grid-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

button {
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
    flex: 0 0 auto;
    min-width: 48px;
}

button:hover {
    background: #f0f0f0;
}

button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.next-btn,
.submit-btn {
    flex: 2;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: bold;
}

.prev-btn,
.cancel-btn {
    flex: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

#summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
}

#summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#summary li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 3rem;
    color: #28a745;
    margin: 20px 0;
}

.home-btn {
    display: block;
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}