#tool input {
    text-align: end;
}

#tool input:invalid {
    text-align: end;
    background-color: #F0D0D0;
}

#tool input:valid {
    text-align: end;
    background-color: #E8F0FE;
}

.pure-table td {
    text-align: center;
}

.pure-table td, .pure-table th {
    text-align: center;
}

#tool hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background-color: #f9f9f9;
}


.pure-form-aligned .pure-control-group label {
    text-align: left;
}

.number{
    text-align: right !important;
}

.pure-table td{
    font-weight: bold;
}

input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"] {
    font-size: 16px;
}

legend {
    font-weight: bold;
    color: #888;
}

/* 医療費控除API関連のスタイル */
.loading {
    margin-top: 20px;
    padding: 15px;
    color: #444;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    max-width: 95%;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #666;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-success {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.6;
    white-space: pre-line;
    position: relative;
    max-width: 95%;
}

/* チャットアイコン - シンプル化のため非表示 */
.chat-icon {
    display: none;
}

/* 段落の調整 */
.result-success p {
    margin: 0 0 12px 0;
}

.result-success p:last-child {
    margin-bottom: 0;
}

/* 控除対象/対象外の強調表示 */
.result-success .deductible-yes {
    color: #1a7900;
    font-weight: bold;
    padding: 2px 5px;
    background-color: rgba(26, 121, 0, 0.1);
    border-radius: 3px;
}

.result-success .deductible-no {
    color: #c62828;
    font-weight: bold;
    padding: 2px 5px;
    background-color: rgba(198, 40, 40, 0.1);
    border-radius: 3px;
}

/* 重要なポイントの強調 */
.result-success strong {
    font-weight: bold;
    color: #333;
    text-decoration: underline;
}

.result-error {
    margin-top: 20px;
    padding: 15px;
    color: #d32f2f;
    background-color: #fff8f8;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    position: relative;
    max-width: 95%;
    line-height: 1.5;
}

.special-benefit-error {
    margin-top: 20px;
    padding: 15px;
    color: #d32f2f;
    background-color: #fff8f8;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    position: relative;
    max-width: 95%;
    display: block;
    line-height: 1.5;
}

#tool-results {
    margin-top: 30px;
    min-height: 100px;
    font-size: 1.1em;
    transition: all 0.5s ease;
}

/* ボタンスタイルの変更 */
#submit-expense {
    background-color: #666;
    color: white;
}

/* 質問フォーム改善 */
#input-expense {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
    transition: border 0.3s ease, box-shadow 0.3s ease;
    font-size: 16px;
    width: 100%;
}

#input-expense:focus {
    border-color: #666;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 0 8px rgba(31,141,214,0.2);
    outline: none;
}

.input-container {
    margin-bottom: 25px;
}

/* 判定ボタン改善 */
#submit-expense {
    background-color: #0d47a1; /* 濃い青色に統一 */
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#submit-expense:hover {
    background-color: #1565c0; /* ホバー時は少し明るい青に */
}

/* フォーム関連の調整 */
#tool {
    max-width: 100%;
    margin: 10px 0;
}

.input-field {
    margin-bottom: 10px;
}

/* 入力フィールド */
#input-expense {
    padding: 10px;
    margin-bottom: 10px;
    width: 100%;
    min-height: 80px;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 結果コンテナ */
#tool-results {
    margin-top: 15px;
}

/* 判定信頼度表示 */
.confidence-info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
select.pure-input {
    height: 2.4em;
}
select.pure-input {
    height: 2.4em;
}
select::-ms-expand {
    display: none;
}

select {
    height: 2.8em !important;
    font-weight: bold;
}
.tool-selects {
    display: flex;
    width: 100%;
}
#tool {
    border: solid 1px #dfdfdf;
    background: #fff;
    border-radius: 3px;
    padding: 30px;
    box-sizing: border-box;
}

#tool-result table {
    background: #fff;
}
#tool-prefectures {
    font-size: 16px;
}

#tool-cities {
    font-size: 16px;
}

#tool-result th {
    background-color: #fdfaf8;
    font-weight: bold;
    border-bottom: 1px solid #cbcbcb;
    width: 50%;
}

#tool-result-header h4 {
    width: auto;
    text-align: left;
    vertical-align: middle;
    font-weight: bold;
    color: #333333;
    border-left-style: solid;
    border-left-width: 6px;
    padding: 0 9px 0 17px;
    box-sizing: border-box;
    margin: 0 0 13px 0;
    font-size: 20px;
    line-height: 1.4;
    border-color: #0fafe6;
}

.special-benefit-error {
    box-sizing: border-box;
    width: 100%;
    margin-top: 24px;
    padding: 8px 16px;
    border: 1px solid #eee;
    background-color: #ffeeee;
    color: red;
}

#tool-results {
    margin: 32px 0;
}

#tool-result-text {
    font-size: 24px;
}

#tool-result-number {
    font-weight: bold;
    font-size: 32px;
    color: #ef4056;
    margin: 0 2px;
}

.tool-title {
    font-weight: bold;
    font-size: 24px;
    margin: 0 2px;
}

/* コストボタンのスタイル（必要に応じて有効にしてください）
#costs-submit {
    margin-top: 48px;
}
*/

.tool-agree {
    margin-top: 8px;
}

#tool-start {
    margin-top: 16px;
    background-color: #ef4056 !important;
}

.income__message {
    font-size: 16px;
    font-weight: 600;
}

.income__message {
    font-size: 16px;
    font-weight: 600;
}
.income__label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
#form2 {
    display: none;
}

.option1{
    display: none;
}
.open,.close {
    margin-bottom: 16px;
    padding-right: 32px;
}

.open:after {
    font-family: "icomoon" !important;
    content: "\e904" !important;
    padding: 0 10px;
    font-size: 16px;
    color: #666;
    position: absolute;
    margin-top: 4px;
    transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -webkit-transform: rotate(90deg);
}

.close:after {
    font-family: "icomoon" !important;
    content: "\e904" !important;
    padding: 0 10px;
    font-size: 16px;
    color: #666;
    position: absolute;
    margin-top: 4px;
    transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -webkit-transform: rotate(-90deg);
}

.tips {
    font-size: 16px;
    font-weight: 600;
}

.tips__popup {
    z-index: 99999;
    font-size: 16px;
    font-weight: 600;
    border: none;
    width: 300px;
    color: #666;
    left: 16px;
    position: absolute;
    display: inline-block;
    padding: 8px;
    border-radius: 6px;
    font-family: sans-serif;
    background-color: #dcf0dd;
    box-shadow: 3px 3px 3px #aaaaaa;
}

body a.tips:hover {
    opacity: 1.0;
}

#submit {
    font-family: sans-serif;
}

.required, .optional {
    margin-bottom: 16px;
}

.required:before {
    content: "\5FC5\9808";
    border-radius: 2px;
    color: #fff;
    padding: 1px 8px;
    margin-right: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    display: inline-block;
    font-weight: normal;
    background-color: #ef4056;
    height: 22px;
    width: 30px;
    letter-spacing: normal;
}

.optional:before {
    content: "\4EFB\610F";
    border-radius: 2px;
    color: #fff;
    padding: 1px 8px;
    margin-right: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    display: inline-block;
    font-weight: normal;
    background-color: #aaaaaa;
    height: 22px;
    width: 30px;
    letter-spacing: normal;
}

#rewardModal {
    width: 100% !important;
}