
.custom-note-page {
    width: 100%;
    margin: 11rem auto 120px;
    background: #fff;
    padding: 0 10vw;
}

.custom-note-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 35vw;
    gap: 3rem;
    align-items: start;
}

.custom-title {
    font-size: clamp(32px, 4.5vw, 54px);
    letter-spacing: .02em;
    line-height: 1;
    margin: 0 0 14px;
}

.custom-lead {
    color: #000000;
    line-height: 2;
    font-size: 0.94rem;
    -webkit-text-stroke: 0.02vw;
    max-width: 100%;
    margin-bottom: 1rem;
}

/* 6カテゴリ 2行3列：罫線テーブル型 */
.step-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    border-top: 1px solid #111;
    border-left: 1px solid #111;
}

.step-tabs li {
    position: relative;
}

.step-tab {
    position: relative;
    width: 100%;
    min-height: 45px;
    border: none;
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    background: #fff;
    color: #333;
    padding: 9px 46px 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .22s, color .22s;
    text-align: left;
    letter-spacing: .04em;
    border-radius: 0px;
}

.step-tab::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #d8d2c8;
    margin-right: 8px;
    vertical-align: middle;
}

.step-tab:hover {
    background: #f7f5f1;
}

.step-tab.is-active {
    background: #111;
    color: #fff;
}

.step-tab.is-active::before {
    background: #fff;
}

.step-tab.is-complete {
    background: #eee;
    color: #333;
}

.step-tab.is-complete::before {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 17px;
    height: 17px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-right: 8px;
}

.step-tab.is-active.is-complete {
    background: #111;
    color: #fff;
}

.step-tab.is-active.is-complete::before {
    background: #b4d900;
    color: #111;
}

.step-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;

    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);

    color: #555;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    transform: translateY(-50%);
    transition: .2s;
    padding: 0;
}

.step-clear:hover {
    background: #111;
    color: #fff;
}

.step-tab.is-active + .step-clear {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.step-tab.is-active + .step-clear:hover {
    background: #fff;
    color: #111;
}

.step-panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

.step-panel.is-active {
    display: block;
    animation: fadePanel .3s ease forwards;
}

@keyframes fadePanel {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-head {
    margin-bottom: 22px;
}

.step-head h2 {
    font-size: 1.2rem;
    margin: 0 0 8px;
    letter-spacing: .04em;
    font-weight: 600;
}

.step-note {
    margin: 0;
    color: #000000;
    line-height: 2;
    font-size: 0.94rem;
    -webkit-text-stroke: 0.02vw;
    max-width: 100%;
    margin-bottom: 2rem;
}

/* 素材フィルター */
.filter-buttons,
.sub-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
}

.filter-btn,
.sub-btn {
    border: none;
    background: #f5f3ef;
    color: #555;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 12px;
    cursor: pointer;
    transition: .2s;
}

.filter-btn.is-active,
.sub-btn.is-active {
    background: #111;
    color: #fff;
}

/* パーツカード：基本は2行3列 */
.part-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.part-card {
    position: relative;
    border: none;
    background: #fbfbfb;
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    transition: .22s;
}

.part-card.is-selected {
    background: #f8f7f3;
    box-shadow: 0 0 0 1px #111 inset;
}

.part-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0,0,0,.06);
}


.part-card.is-selected::after {
    content: "選択中";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
}

.part-card.is-disabled {
    opacity: .35;
    pointer-events: none;
}

.part-card.is-hidden {
    display: none;
}

.part-thumb {
    width: 100%;
    aspect-ratio: 1 / .6;
    object-fit: cover;
    border-radius: 16px;
    background: #f1eee8;
    margin-bottom: 12px;
}

.part-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.6;
    padding-right: 0px;
}

.part-meta {
    font-size: 11px;
    color: #777;
    line-height: 1.6;
    margin-top: 4px;
}

.part-price {
    font-size: 0.9rem;
    color: #333;
    margin-top: 5px;
}

.empty-message {
    color: #777;
    font-size: 13px;
    padding: 24px 0;
}

/* 中紙3pc */
.paper-slot-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0 22px;
}

.paper-slot {
    background: #f5f3ef;
    border-radius: 16px;
    padding: 14px;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.paper-slot.is-active {
    background: #111;
    color: #fff;
}

.paper-slot.is-complete {
    background: #eef4e7;
    color: #333;
}

.paper-slot span {
    display: block;
    font-size: 11px;
    color: inherit;
    opacity: .65;
    margin-top: 4px;
}

/* プレビュー */
.preview-card {
    position: sticky;
    top: 88px;
}

.preview-shell {
    background: #f1f1f1;
    border-radius: 16px;
    padding: 22px;
}

.preview-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 0.94rem;
    letter-spacing: .14em;
    color: #555;
    font-weight:600;    margin: 0rem 0 1rem;
}

.preview-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.65;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #b7afa5;
    font-size: 11px;
    letter-spacing: .14em;
}

.preview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.summary-box {
    margin-top: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #666;
    padding: 7px 0;
}

.summary-row strong {
    font-weight: 600;
    color: #111;
    text-align: right;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e6e0d8;
}

.total-row span {
    font-size: 12px;
    color: #555;
}

.total-price {
    font-size: 22px;
    letter-spacing: .06em;
    font-weight: 500;
}

button.cart-btn {
    width: 100%;
    margin-top: 14px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .custom-note-page {
        width: 92vw;
        padding: 0;
        margin: 30px auto 72px;
    }

    .custom-note-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .preview-card {
        position: sticky;
        top: 0;
        z-index: 20;
        width: 100%;
        background: #fff;
        padding: 10px 0;
        order: -1;
    }

    .preview-shell {
        width: min(360px, 86vw);
        margin: 0 auto;
        padding: 14px;
        border-radius: 22px;
    }

    .summary-box {
        display: none;
    }

    .part-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .custom-title {
        font-size: 34px;
    }

    .custom-lead {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .step-tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-tab {
        min-height: 62px;
        padding: 12px 38px 12px 12px;
        font-size: 12px;
    }

.step-clear {
    right: 8px;
    width: 18px;
    height: 18px;
    font-size: 13px;
}

    .part-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .part-card {
        border-radius: 18px;
        padding: 11px;
    }

    .part-thumb {
        border-radius: 13px;
    }

    .part-name {
        font-size: 12px;
    }

    .paper-slot-status {
        grid-template-columns: 1fr;
    }

}

.title-ani {
    overflow: hidden;
    color: #393939 !important;
    transition-delay: 0.6s;
    font-size: 2.2rem;
    margin-left: 0%;
    margin-bottom: 2rem;
}

.title-ani-s {
    overflow: hidden;
    color: #343434 !important;
    transition-delay: 0.7s;
    font-size: 1.3rem;
    margin-left: 4%;
}
.engraving-line-choices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 18px 0 22px;
}

.engraving-choice-card {
    appearance: none;
    border: none;
    text-align: left;
}

.engraving-text-area {
    display: none;
    margin: 22px 0 0;
}

.engraving-input {
    width: 100%;
    border: none;
    background: #f5f3ef;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: 14px;
}

.engraving-error {
    display: none;
    color: #d33;
    font-size: 12px;
    line-height: 1.7;
    margin-top: 8px;
}

.engraving-card .part-thumb {
    display: none;
}

.engraving-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 1024px) {
    .engraving-line-choices {
        grid-template-columns: repeat(4, 1fr);
    }

    .engraving-input {
        font-size: 16px;
        padding: 13px 15px;
    }
}

@media (max-width: 767px) {
    .engraving-line-choices {
        grid-template-columns: repeat(2, 1fr);
    }

    .engraving-input {
        border-radius: 12px;
        padding: 13px 14px;
        margin-bottom: 9px;
    }
}
.engraving-line-choices .engraving-choice-card {
    display: flex !important;
}
.engraving-line-choices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 18px 0 22px;
}

@media (max-width: 767px) {
    .engraving-line-choices {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ===== 文字入れ：選択状態固定 ===== */
.engraving-choice-card.is-selected {
    background: #111;
    color: #fff;
}

/* 下層選択でも親を維持 */
.engraving-choice-card.is-fixed {
    box-shadow: 0 0 0 2px #111 inset;
}

/* テキスト入力UI */
.engraving-text-area {
    margin-top: 20px;
}


.engraving-helper {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

/* エラー */
.engraving-error {
    display: none;
    color: #d33;
    font-size: 12px;
}

/* ===== 中紙4カラム ===== */
.paper-slot-status-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* SP */
@media (max-width: 767px) {
    .paper-slot-status-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .engraving-input {
        font-size: 16px;
    }
}
.paper-slot-status-4 {
    grid-template-columns: repeat(4, 1fr);
}


@media (max-width: 767px) {
    .paper-slot-status-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
.confirm-box {
    margin-top: 32px;
}

.confirm-list {
    background: #ffffff;
    padding: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid #000000;
    border-top: 1px solid #000;
}

.confirm-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 8px 0;
    font-size: 13px;
}

.confirm-row span {
    color: #666;
}

.confirm-row strong {
    text-align: right;
    font-weight: 700;
}

.confirm-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 20px;
    margin: 24px 0;
}

.confirm-total span {
    font-size: 13px;
    color: #666;
}

.confirm-total strong {
    font-size: 28px;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.confirm-back {
    color: #111;
    text-decoration: none;
    font-size: 16px;
}
.confirm-pay-btn {
    min-width: 240px;
    border: none;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 18px 30px;
    cursor: pointer;
    transition: .25s ease;
}

.confirm-pay-btn:hover {
    transform: translateY(-2px);
    background: #2b2a27;
}

.confirm-pay-btn:active {
    transform: translateY(0);
}

.confirm-pay-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .confirm-pay-btn {
        width: 100%;
        min-width: 0;
        padding: 16px 24px;
    }
}

@media (max-width: 767px) {
    .confirm-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .confirm-pay-btn {
        width: 100%;
    }

    .confirm-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .confirm-row strong {
        text-align: left;
    }

    .confirm-total {
        justify-content: space-between;
    }
}
button.cart-btn.is-disabled,
button.cart-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}
.confirm-sticky-bar {
    position: fixed;
    left: 0;
    bottom: -120px;
    width: 92vw;
    background: rgb(223 255 0 / 59%);
    backdrop-filter: blur(6px);
    transition: 0.35s ease;
    z-index: 1000;
    margin: 0 4vw 1rem;
    border-radius: 15px;
}

.confirm-sticky-bar.is-active {
    bottom: 0;
}

.confirm-sticky-inner {
    max-width: 90vw;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: end;
    align-items: center;
}

.confirm-sticky-price {
    color: #000000;
    font-size: 1rem;
}

.confirm-sticky-price strong {
    font-size: 1.2rem;
    margin-left: 10px;
    margin-right: 20px;
}



@media (max-width: 767px) {
    .confirm-sticky-inner {
        flex-direction: column;
        gap: 12px;
    }

    .confirm-sticky-btn {
        width: 100%;
    }
}
.confirm-sticky-btn {
    background: #111;
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    padding: 14px 34px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.confirm-sticky-btn:hover {
    background: #fff;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.confirm-sticky-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

@media (max-width: 767px) {
    .confirm-sticky-btn {
        width: 100%;
        padding: 15px 24px;
        font-size: 1.05rem;
    }
}
.preview-area {
    position: relative;
    overflow: hidden;
    aspect-ratio: 10 / 7;
    background: #fff;
}

.preview-base-layer,
.preview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.preview-base-layer {
    z-index: 1;
}

.preview-placeholder {
    position: relative;
    z-index: 2;
}

.preview-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 14px;
    padding: 5px;
    border-radius: 999px;
    background: #f1efe8;
}

.preview-mode-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    background: transparent;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.preview-mode-btn.is-active {
    background: #111;
    color: #fff;
}

.preview-layer-cover-inner,
.preview-layer-back-cover-inner {
    transform-origin: center center;
}

@media (max-width: 768px) {
    .preview-mode-switch {
        margin: 10px 0 12px;
    }

    .preview-mode-btn {
        padding: 8px 10px;
        font-size: 11px;
    }

    .preview-area {
        aspect-ratio: 10 / 7;
    }
}
.part-thumb {
    width: 100%;
    height: 150px;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    background: #f4f1ea;
}

.part-card {
    overflow: hidden;
}

.preview-area {
    position: relative;
    overflow: hidden;
    aspect-ratio: 10 / 7;
    background: #fff;
}

.preview-base-layer,
.preview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.preview-base-layer {
    z-index: 1;
}

.preview-placeholder {
    position: relative;
    z-index: 2;
}

.preview-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0 14px;
    padding: 5px;
    border-radius: 999px;
    background: #f1efe8;
}

.preview-mode-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    background: transparent;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.preview-mode-btn.is-active {
    background: #111;
    color: #fff;
}

.preview-layer-cover-inner,
.preview-layer-back-cover-inner {
    transform-origin: center center;
}

@media (max-width: 768px) {
    .part-thumb {
        height: 118px;
        border-radius: 14px;
    }

    .preview-mode-switch {
        margin: 10px 0 12px;
    }

    .preview-mode-btn {
        padding: 8px 10px;
        font-size: 11px;
    }

    .preview-area {
        aspect-ratio: 10 / 7;
    }
}
.preview-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.preview-head-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.preview-mode-switch,
.preview-mode-btn {
    all: unset;
}

.preview-mode-radio {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-radio-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.preview-radio-btn::before {
    content: "";
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid #999;
    margin-right: 5px;
    vertical-align: 1px;
}

.preview-radio-btn.is-active {
    color: #111;
}

.preview-radio-btn.is-active::before {
    background: #111;
    border-color: #111;
}

/* ===== SP 刷新:プレビュー上部 → 6ボックス → 金額+決済 → 全面白オーバーレイ選択(#12408)===== */
@media (max-width: 767px) {
    .custom-note-layout { display: flex; flex-direction: column; align-items: stretch; }
    .custom-note-layout .custom-panel { width: 100%; }
    .custom-note-layout .preview-shell { order: -1; width: 100%; }

    /* 6ボックス(2列グリッド) */
    .step-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; padding: 0; border: 0; }
    .step-tabs li { position: relative; margin: 0; padding: 0; list-style: none; display: block; }
    .step-tab {
        width: 100%; min-height: 72px;
        display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px;
        background: #fff; border: 1px solid #e3e3e6; border-radius: 12px;
        padding: 12px 34px 12px 14px;
        font-size: .95rem; font-weight: 600; color: #1b1b1f; text-align: left; letter-spacing: .02em;
        transition: border-color .25s ease, transform .2s ease;
    }
    .step-tab:active { transform: scale(.98); }
    .step-tab::after { content: "タップして選ぶ"; font-size: .68rem; font-weight: 500; color: #6b6b72; letter-spacing: .04em; }
    .step-tab.is-complete { border-color: #1b1b1f; }
    .step-tab.is-complete::after { content: "✓ 選択済み"; color: #1b1b1f; }
    .step-clear {
        position: absolute; top: 8px; right: 8px; z-index: 2; transform: none;
        width: 24px; height: 24px; border-radius: 50%;
        background: #f3f3f5; border: 0; color: #8a8a90; font-size: 13px; line-height: 1;
        display: flex; align-items: center; justify-content: center;
    }

    /* パネルはインライン表示をやめ、全面白オーバーレイに */
    .step-panel { display: none !important; }
    .step-panel.sp-open {
        display: block !important;
        position: fixed;
        inset: max(2vh, 14px) max(2vw, 10px) max(2vh, 14px);
        z-index: 2147483000;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        border-radius: 20px;
        border: 1px solid rgba(0, 0, 0, .05);
        box-shadow: 0 0 0 100vmax rgba(20, 20, 23, .32), 0 30px 70px -24px rgba(0, 0, 0, .45);
        overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
        padding: 0 16px calc(14px + env(safe-area-inset-bottom));
        animation: spPanelPop .3s cubic-bezier(.2, .7, .2, 1) both;
    }
    @keyframes spPanelPop {
        from { opacity: 0; transform: scale(.96) translateY(12px); }
        to { opacity: 1; transform: none; }
    }
    body.sp-lock { overflow: hidden; }

    .sp-panel-bar {
        position: sticky; top: 0; z-index: 6;
        display: none; align-items: center; justify-content: space-between;
        margin: 0 -16px 8px; padding: 14px 16px;
        background: rgba(255, 255, 255, .97); border-bottom: 1px solid #ececee;
        border-radius: 20px 20px 0 0;
        font-size: .95rem; font-weight: 700; letter-spacing: .05em; color: #1b1b1f;
    }
    .step-panel.sp-open .sp-panel-bar { display: flex; }
    .sp-panel-close {
        width: 34px; height: 34px; border-radius: 50%;
        border: 1px solid #e3e3e6; background: #fff; color: #333;
        font-size: 17px; line-height: 1;
        display: flex; align-items: center; justify-content: center;
    }
    .sp-panel-done {
        position: sticky; bottom: 10px; z-index: 6;
        display: none; align-items: center; justify-content: center;
        width: 100%; margin-top: 16px;
        min-height: 52px; border: 0; border-radius: 12px;
        background: #141417; color: #fff;
        font-size: .95rem; font-weight: 600; letter-spacing: .08em;
        box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .35);
    }
    .step-panel.sp-open .sp-panel-done { display: flex; }
    .sp-panel-done small { font-weight: 500; opacity: .8; font-size: .8rem; letter-spacing: .02em; }

    /* 金額+決済ドック(JS が summaryBox をここへ移動) */
    .sp-summary-dock { margin-top: 12px; }
    .sp-summary-dock .summary-box { margin: 0; }
}


/* ===== SP 刷新・調整(#12408 続き)===== */
@media (max-width: 767px) {
    /* SPではタブの active 見た目(黒)を使わない — 6ボックスは常に白基調 */
    .step-tab.is-active {
        background: #fff;
        color: #1b1b1f;
        border-color: #e3e3e6;
    }
    .step-tab.is-active::before { background: #d9d9de; }
    .step-tab.is-active::after { color: #6b6b72; }
    .step-tab.is-complete { border-color: #1b1b1f; }
    .step-tab.is-complete::before { background: #1b1b1f; }
    .step-tab.is-complete::after { content: "\2713 選択済み"; color: #1b1b1f; }
    .step-tab.is-active + .step-clear { background: #f3f3f5; color: #8a8a90; }
    .step-tab.is-complete,
    .step-tab.is-active.is-complete { background: #fff; color: #1b1b1f; }
    .step-tab.is-active.is-complete::before { background: #1b1b1f; color: #fff; }

    /* 金額+決済はドック内で表示(既存CSSの display:none を解除)、旧スティッキーバーは停止 */
    .sp-summary-dock .summary-box { display: block; margin: 0; }
    .confirm-sticky-bar { display: none !important; }

    /* オーバーレイ内はバーに名前があるので h2 は畳む */
    .step-panel.sp-open .step-head h2 { display: none; }
}


/* SP用注入要素はベースで非表示(SPの sp-open 時のみ media query 内で表示)#12408 */
.sp-panel-bar,
.sp-panel-done { display: none; }


/* SP:プレビューは固定(sticky)にしない(#12408 吉田さん指示 2026-07-04)*/
@media (max-width: 767px) {
    .preview-card { position: static; padding: 0; }
}


/* ===== ヘッダー干渉修正+パーツカード近代化(#12408 2026-07-04)===== */

/* Keep header geometry and appearance in the shared site stylesheet. */
@media (min-width: 1025px) {
    .navigation .nav-user-group { align-items: center; }
    .navigation .cart-btn { margin: 0; }
}

/* パーツカード:タイル比統一・contain 表示・タイポプレースホルダ */
.part-card {
    border: 1px solid #ececee;
    background: #fff;
    border-radius: 14px;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.part-card:hover {
    border-color: #c9c9cf;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .2);
}
img.part-thumb,
div.part-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    border-radius: 10px;
    background: #f7f4ee;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03);
}
img.part-thumb {
    object-fit: contain;
    padding: 9%;
    box-sizing: border-box;
}
div.part-thumb { position: relative; overflow: hidden; }
div.part-thumb::before {
    content: attr(data-ph);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem);
    font-weight: 500; letter-spacing: .14em;
    color: #a69d8c;
    text-align: center; padding: 0 6px;
}
.part-name { font-size: .82rem; font-weight: 600; margin-top: 10px; line-height: 1.5; }
.part-meta { font-size: .72rem; color: #6b6b72; margin-top: 2px; }
.part-price { font-size: .86rem; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.part-card.is-selected { border-color: #111; }


/* 注文エラー・文字数カウンタ(スタイル未定義だった要素)2026-10-08 */
.confirm-error { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fdf0ef; color: #b42318; font-size: .82rem; line-height: 1.7; }
.engraving-input-wrap { position: relative; }
.engraving-count { position: absolute; right: 14px; top: 14px; font-size: .7rem; color: #6b6b72; font-variant-numeric: tabular-nums; pointer-events: none; }

/* SP:固定ヘッダー(ロゴ・店舗情報ボタン)とプレビュー見出しが初期表示で重なるのを避ける */
@media (max-width: 767px) {
    .custom-note-page { margin-top: 76px; }
}
