:root { --primary: #0052cc; --bg: #f4f7f9; --accent: #ffeb3b; }
body { font-family: "Helvetica Neue", Arial, sans-serif; background: var(--bg); margin: 0; padding: 0; color: #333; min-height: 100vh; box-sizing: border-box; }
.hidden { display: none !important; }

/* アプリ全体のレイアウト */
#login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; }
.login-card { background: white; padding: 40px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.login-btn { padding: 15px 30px; font-size: 18px; cursor: pointer; background-color: var(--primary); color: white; border: none; border-radius: 12px; font-weight: bold; }

.app-container { max-width: 1250px; margin: 0 auto; padding: 20px; }
.header-wrap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 10px; }
.nav-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.nav-btn { padding: 10px 20px; border-radius: 10px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-weight: bold; font-size: 14px; }
.nav-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.nav-btn.official { border-color: #2e7d32; color: #2e7d32; }
.nav-btn.official.active { background: #2e7d32; color: white; }

.customer-form { background: white; padding: 20px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); margin-bottom: 20px; border: 2px solid #2e7d32; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 10px; }
.form-grid input, .form-grid select { padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; width: 100%; box-sizing: border-box; }

/* 将晃さんのオリジナルデザイン */
.simulator-content { background: white; padding: 25px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.section { margin-bottom: 15px; }
.label { font-weight: bold; font-size: 16px; margin-bottom: 8px; display: block; color: #444; border-left: 4px solid var(--primary); padding-left: 10px; }
.course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.course-btn { display: flex; align-items: center; padding: 12px; border: 2px solid #eee; background: #fff; border-radius: 14px; cursor: pointer; transition: 0.2s; text-align: left; min-height: 110px; }
.course-btn.active { border-color: var(--primary); background: #f0f7ff; box-shadow: 0 4px 10px rgba(0, 82, 204, 0.08); }
.course-left { width: 60px; min-width: 60px; font-weight: 900; font-size: 18px; color: #555; border-right: 1px solid #eee; margin-right: 10px; display: flex; align-items: center; justify-content: center; }
.course-btn.active .course-left { color: var(--primary); border-right-color: rgba(0, 82, 204, 0.15); }
.course-right { flex: 1; }
.course-desc { font-size: 11.5px; color: #666; line-height: 1.5; }

.grid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-btn { padding: 16px 10px; border: 1px solid #ddd; background: #fff; border-radius: 12px; cursor: pointer; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; font-weight: bold; }
.method-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.interest-note { font-size: 11px; opacity: 0.9; font-weight: normal; margin-top: 4px; }

input.sim-input, select.sim-select { width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 10px; box-sizing: border-box; font-size: 18px; text-align: center; background: white; font-weight: bold; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.digit-guide { font-size: 22px; font-weight: bold; color: var(--primary); margin-top: 5px; text-align: center; background: #f0f7ff; padding: 6px; border-radius: 8px; min-height: 32px; display: inline-block; padding-left: 20px; padding-right: 20px; }
.hybrid-display { background: #fdfdfd; padding: 12px; border-radius: 14px; border: 1px dashed #bbb; text-align: center; margin-top: 5px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 5px; }
.step-btn { width: 60px; height: 60px; border-radius: 14px; border: 1px solid #ddd; background: #fff; font-size: 30px; cursor: pointer; color: var(--primary); font-weight: bold; display: flex; align-items: center; justify-content: center; }
.stepper input { flex: 1; max-width: 120px; font-weight: bold; font-size: 26px; border-color: var(--primary); height: 60px; text-align: center; }
.unit-label { font-weight: bold; color: #666; font-size: 18px; }

.real-cash-box { background: #fff5f5; padding: 8px; border-radius: 12px; border: 1px dashed #d32f2f; text-align: center; margin-top: 5px; }
.real-value { font-size: 24px; font-weight: bold; color: #d32f2f; margin: 2px 0; }
.sub-text { font-size: 12px; color: #777; margin-top: 2px; }

.result-box { background: var(--primary); color: white; padding: 25px 20px; border-radius: 20px; text-align: center; box-shadow: 0 10px 22px rgba(0, 82, 204, 0.22); }
.downpayment-notice { background: var(--accent); color: #333; padding: 8px 16px; border-radius: 18px; font-size: 14px; font-weight: bold; margin-bottom: 10px; display: inline-block; white-space: pre-wrap; line-height: 1.4; }
.res-main { font-size: 18px; font-weight: bold; margin-bottom: 10px; line-height: 1.8; }
.res-main span { display: block; }
.res-fee { font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 15px; }
.res-total-wrap { border-top: 1px solid rgba(255,255,255,0.22); padding-top: 15px; }
.res-total-label { font-size: 16px; opacity: 0.9; margin-bottom: 6px; }
.res-total-value { font-size: 34px; font-weight: 900; color: var(--accent); letter-spacing: 1px; }
.alert { background: #fff3cd; color: #856404; padding: 12px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; display: none; line-height: 1.5; font-weight: bold; }

.layout-wrapper { display: flex; flex-direction: column; gap: 15px; }
@media (min-width: 1000px) {
    .layout-wrapper { flex-direction: row; align-items: flex-start; gap: 25px; }
    .col-left { flex: 1.1; }
    .col-center { flex: 1.2; }
    .col-right { flex: 1.1; position: sticky; top: 15px; display: flex; flex-direction: column; }
    .result-box { display: flex; flex-direction: column; justify-content: center; padding: 30px 20px; flex-grow: 1; }
}

.save-btn { background: #2e7d32; color: white; padding: 18px; font-size: 18px; border: none; border-radius: 12px; cursor: pointer; font-weight: bold; width: 100%; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }