:root {
    --primary-color: #61b3ef;
    --primary-light: #e6f3fd;
    --secondary-color: #d35400;
    /* For accents if needed */
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f7f9fc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --error-color: #e74c3c;
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 15px;
}

/* Header */
.liff-header {
    background-color: var(--white);
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.liff-header h1 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.liff-header p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Main Content */
.liff-main {
    padding: 20px 15px 40px;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    border: 1px solid var(--border-color);
}

.step-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.form-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
    margin-top: 5px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

label.required::after {
    content: "必須";
    background-color: var(--error-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--white);
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input {
    flex: 1;
}

.unit {
    font-weight: bold;
}

/* Custom Radio & Checkbox Buttons (Cards) */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 120px;
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-content {
    display: block;
    text-align: center;
    padding: 15px 10px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: bold;
    transition: all 0.2s ease;
}

.radio-card input:checked~.card-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Radio List (Vertical) */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-list-item input {
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.radio-list-item:has(input:checked) {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    font-weight: bold;
}

/* Buttons */
.form-actions {
    margin-top: 30px;
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(97, 179, 239, 0.3);
}

.btn-primary:hover {
    background-color: #4da6e5;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 25px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.confirm-details {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 25px;
}

.confirm-row {
    margin-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
}

.confirm-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.confirm-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.confirm-value {
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions .btn {
    padding: 12px;
    font-size: 1rem;
}

/* Success Screen */
#success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.success-content .icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

.success-content h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.success-content p {
    margin-bottom: 30px;
    color: var(--text-light);
}

/* 弁当選択用ハイライト */
.obento-select-btn.unfilled, .obento-qty.unfilled {
    border: 2px solid #3498db !important;
    background-color: #f0f8ff !important;
}

/* お弁当選択モーダル内のレイアウト */
.obento-item-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    align-items: center;
    background-color: var(--white);
}

.obento-item-img-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obento-item-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.obento-item-info {
    flex: 1;
    min-width: 0; /* flex 内でのテキストのはみ出し防止 */
}

.obento-item-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
    word-break: break-all;
}

.obento-item-price {
    font-size: 14px;
    color: #E74C3C;
    font-weight: bold;
    margin-bottom: 4px;
}

.obento-item-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    word-break: break-all;
}

.select-this-obento-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.select-this-obento-btn:hover {
    background-color: #4ba2df;
}

/* スマホ表示（768px以下）時の最適化 */
@media (max-width: 768px) {
    .obento-item-card {
        flex-direction: column;
        align-items: stretch !important;
        padding: 12px !important;
    }
    .obento-item-img-wrapper {
        width: 100% !important;
        height: 180px !important;
    }
    .obento-item-info {
        padding: 5px 0;
    }
    .select-this-obento-btn {
        width: 100%;
        margin-top: 10px;
        text-align: center;
        padding: 10px !important;
    }
}
