/* 墓じまい費用シミュレーター（.hks の中だけに効かせる） */
.hks {
    --hks-main: #3d5a6c;
    --hks-main-dark: #2c4352;
    --hks-bg: #f6f7f5;
    --hks-line: #d5dad6;
    --hks-text: #333;
    --hks-sub: #5f6b66;
    box-sizing: border-box;
    max-width: 640px;
    margin: 1.5em auto;
    padding: 16px;
    background: var(--hks-bg);
    border: 1px solid var(--hks-line);
    border-radius: 8px;
    color: var(--hks-text);
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.hks *,
.hks *::before,
.hks *::after {
    box-sizing: border-box;
}
.hks p {
    margin: 0 0 .8em;
}
.hks-title {
    margin: 0 0 .3em;
    font-size: 1.15em;
    font-weight: bold;
}
.hks-privacy {
    font-size: .875em;
    color: var(--hks-sub);
}

/* 進み具合 */
.hks-progress {
    font-size: .875em;
    color: var(--hks-sub);
    margin-bottom: 4px;
}
.hks-bar {
    height: 6px;
    background: #e3e7e4;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}
.hks-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--hks-main);
    transition: width .2s;
}
.hks:not(.hks-js) .hks-progress,
.hks:not(.hks-js) .hks-bar,
.hks:not(.hks-js) .hks-nav {
    display: none;
}

/* 質問 */
.hks-step {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    min-width: 0;
}
.hks-step[hidden] {
    display: none;
}
.hks-q {
    display: block;
    width: 100%;
    margin: 0 0 .4em;
    padding: 0;
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1.5;
}
.hks-q:focus {
    outline: none;
}
.hks-help {
    font-size: .875em;
    color: var(--hks-sub);
}
.hks-options {
    display: grid;
    gap: 8px;
}
.hks-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--hks-line);
    border-radius: 6px;
    cursor: pointer;
}
.hks-opt input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--hks-main);
}
.hks-opt:has(input:checked) {
    border-color: var(--hks-main);
    background: #eef3f5;
    font-weight: bold;
}
.hks-opt:has(input:focus-visible) {
    outline: 3px solid #8fb3c7;
    outline-offset: 1px;
}

/* ボタン */
.hks-nav {
    display: flex;
    gap: 8px;
}
.hks-btn {
    flex: 1 1 0;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid var(--hks-main);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    background: #fff;
    color: var(--hks-main);
}
.hks-next {
    background: var(--hks-main);
    color: #fff;
}
.hks-next:hover {
    background: var(--hks-main-dark);
}
.hks-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.hks-btn[hidden] {
    display: none;
}
.hks-btn:focus-visible {
    outline: 3px solid #8fb3c7;
    outline-offset: 2px;
}

/* 結果 */
.hks-result[hidden] {
    display: none;
}
.hks .hks-h {
    margin: 1.6em 0 .6em;
    padding: 0 0 .3em;
    font-size: 1.1em;
    line-height: 1.5;
    border: 0;
    border-bottom: 2px solid var(--hks-main);
    background: none;
    color: var(--hks-text);
}
.hks .hks-h:first-child {
    margin-top: 0;
}
.hks .hks-h:focus {
    outline: none;
}
.hks-total {
    padding: 14px;
    background: #fff;
    border: 2px solid var(--hks-main);
    border-radius: 8px;
    text-align: center;
}
.hks-total-label {
    font-size: .875em;
    color: var(--hks-sub);
    margin-bottom: 0 !important;
}
.hks-total-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--hks-main-dark);
    line-height: 1.4;
}
.hks-total-note {
    font-size: .8125em;
    color: var(--hks-sub);
    text-align: left;
    margin: 0 !important;
}
.hks ul.hks-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hks-item {
    margin: 0 0 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--hks-line);
    border-radius: 6px;
}
.hks-items-separate .hks-item {
    background: #fbfbfa;
}
.hks-item-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    font-weight: bold;
}
.hks-item-amount {
    color: var(--hks-main-dark);
}
.hks ul.hks-item-details {
    margin: 6px 0 0;
    padding-left: 1.2em;
    font-size: .875em;
}
.hks ul.hks-item-details li {
    margin: 0 0 2px;
}
.hks-item-note {
    margin: 6px 0 0 !important;
    font-size: .8125em;
    color: var(--hks-sub);
}
.hks-notice {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff;
    border-left: 4px solid var(--hks-main);
    font-size: .9375em;
}
.hks ol.hks-tips,
.hks ul.hks-links,
.hks ul.hks-sources {
    margin: 0 0 .8em;
    padding-left: 1.4em;
}
.hks ol.hks-tips li,
.hks ul.hks-links li {
    margin-bottom: 6px;
}
.hks ul.hks-sources {
    font-size: .8125em;
}
.hks ul.hks-sources li {
    margin-bottom: 4px;
}
.hks-checked {
    color: var(--hks-sub);
}
.hks-caution {
    margin-top: 1em;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--hks-line);
    border-radius: 6px;
    font-size: .875em;
}
.hks-restart {
    width: 100%;
}

/* 広告枠 */
.hks-ad {
    margin: 16px 0;
    padding: 12px;
    background: #fff;
    border: 1px dashed #b9c2bd;
    border-radius: 6px;
}
.hks-ad-label {
    display: inline-block;
    padding: 0 6px;
    font-size: .75em;
    color: var(--hks-sub);
    border: 1px solid #b9c2bd;
    border-radius: 3px;
}
.hks-ad-title {
    margin: 6px 0 8px !important;
    font-weight: bold;
}
.hks a.hks-ad-btn {
    display: block;
    min-height: 48px;
    padding: 12px;
    text-align: center;
    background: var(--hks-main);
    color: #fff;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}
.hks a.hks-ad-btn:hover {
    background: var(--hks-main-dark);
}

@media (min-width: 600px) {
    .hks {
        padding: 24px;
    }
}
