/* =========================================================
   Reset CSS（OrderHub Minimal Reset）
   ========================================================= */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.link-underline {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: var(--link-text-color);
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

html {
    -webkit-text-size-adjust: 100%;
}

input,
button,
textarea,
select {
    font-family: inherit;
}

strong,
b {
    font-weight: 600;
}



/* =========================================================
   Variables
   ========================================================= */
:root {
    --header-height: 65px;
    --page-header-height: 90px;
    --sidebar-width: 255px;
    --table-header-height: 65px;
    --table-border-height: 1px;

    --font-size-h1: 22px;
    --font-size-h1-sub: 20px;
    --font-size-h2: 18px;
    --font-size-h2-sub: 17px;
    --font-size-h3: 15px;
    --font-size-h4: 14px;
    --font-size-h5: 13px;

    --font-size-base: 14px;
    --font-size-small: 12px;
    --font-size-xs: 11px;
    --font-size-xxs: 10px;
    --font-size-lg: 15px;
    --font-size-xl: 16px;
    --environment-banner-height: 0px;

    /* 受注一覧 ステータス色分け */
    --status-orange: #EA580C;
    --status-yellow: #FFF600;
    --status-green: #16A34A;
    --status-red: #DC2626;
    --status-blue: #2563EB;
}

@media (max-width: 768px) {
    :root {
        --header-height: 55px;
        --sidebar-width: 100%;
        --table-header-height: 55px;

        --font-size-h1: 19px;
        --font-size-h1-sub: 17px;
        --font-size-h2: 17px;
        --font-size-h2-sub: 16px;
        --font-size-h3: 14px;
        --font-size-h4: 13px;
        --font-size-h5: 12px;

        --font-size-base: 12px;
        --font-size-small: 10px;
        --font-size-xs: 10px;
        --font-size-xxs: 9px;
        --font-size-lg: 13px;
        --font-size-xl: 14px;
    }
}


/* =========================================================
   Global Base
   ========================================================= */
html, body {
    height: 100%;
}

body {
    background: var(--gray-100);
    color: var(--text-base);
    font-family: 'Inter', 'Roboto', 'Noto Sans JP', 'Noto Sans', sans-serif;
    font-size: var(--font-size-base);
}

.layout {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + var(--environment-banner-height));
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .layout {
        margin-left: 0 !important;
        padding-top: calc(var(--header-height) + var(--environment-banner-height));
    }
}

.layout > main {
    flex: 1;
}


/* =========================================================
   Font Size
   ========================================================= */
h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: 600;
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: 600;
}

h4 {
    font-size: var(--font-size-h4);
    font-weight: 500;
}

h5 {
    font-size: var(--font-size-h5);
    font-weight: 500;
}

p {
    font-size: var(--font-size-base);
}

/* =========================================================
   Layout Rules
   ========================================================= */
.w-100 {
    width: 100% !important;
}
.w-50 {
    width: 50% !important;
}

.inner-header {
    max-width: 1184px;
    margin: 0 auto;
    padding: 0 20px;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px 16px;
    }
}


/* ============================
   Button
   ============================ */

.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 3px;
    text-align: center;
    text-decoration: none;
    font-size: var(--font-size-base);
    cursor: pointer;
    font-weight: 100;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 11px 14px;
    font-size: var(--font-size-lg);
}

.btn-sm {
    padding: 6px 11px;
    border-radius: 4px;
    font-size: var(--font-size-small);

}

/* 幅を指定して調整するボタン（新規登録フォームの登録ボタン等）。--btn-width を上書きすれば横幅を変更できる */
.btn-wide {
    --btn-width: 240px;
    width: 100%;
    max-width: var(--btn-width);
}

@media (max-width: 768px) {
    .btn {
        padding: 8px;
    }
}


.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-outline-danger {
    background: var(--white);
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-outline-primary {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

@media (max-width: 768px) {
    .history-actions {
        justify-content: space-between;
    }

    .history-actions .btn-outline-primary {
        width: 48%;
        justify-content: center;
    }
}

.btn-text-primary {
    background: var(--white);
    color: var(--primary-color);
    border-color: transparent;
}

/* グレー系のアウトラインボタン */
.btn-outline-secondary {
    background: var(--white);
    color: var(--text-base);
    border: 1px solid var(--gray-300);
}

.btn i {
    margin-right: 5px;
    /* アイコンと文字の距離 */
    -webkit-text-stroke: 1px;
}

a.btn.is-disabled{
    opacity: .45;
    pointer-events: none;  /* クリック無効 */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    background: var(--gray-300);
}

a.btn.is-disabled:hover{
    box-shadow: none;
    transform: none;
}

.history-actions a.in-line {
    display: inline-flex;
    align-items: center;
}

/* =========================================================
   Header
   ========================================================= */
.header {
    width: 100%;
    height: calc(var(--header-height) + var(--environment-banner-height));
    position: fixed;
    top: 0;
    left: 0;
    background: var(--white);
    z-index: 1000;
}

.header-inner {
    margin: 0 auto;
    height: 65px;

    padding-left: 30px;
    padding-right: 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 55px;
}

.menu-btn {
    display: none;
    font-size: 28px;
    padding: 4px;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-link {
    color: var(--primary-color);
}

.header-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 3px;
}

.btn-header-outline {
    background: #1f2937;
    color: var(--white);
    font-weight: 600;
}

.btn-header-outline:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}


@media (max-width: 768px) {
    .header-inner {
        padding-left: 16px;
        padding-right: 16px;
        height: var(--header-height);
    }

    .logo img {
        height: 40px;
    }

    .menu-btn {
        display: block;
    }

    .page-header-inner div.header-right {
        flex-direction: column;
        gap: 5px;
    }
}

/* ============================
   Error
   ============================ */
   .error::before {
    content: "＊";
}

.error.is-no-error-before::before {
    content: none !important;
    display: none !important;
}

.error.is-no-error-before {
    box-shadow: none !important;
}

.error,
.js-error,
.sub-status-text {
    color: var(--red);
    font-weight: 600;
}
.error-area {
    height: 30px;
    text-align: center;
    font-size: var(--font-size-h2);
    background-color: var(--soft-red);
    color: var(--red);
}

.form-error-area {
    display: flex;
    align-items: center;
    justify-content: center;
  
    min-height: 30px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.form-error-left {
    text-align: left;
}
  
.form-error-left .error-item {
    color: var(--red);
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 8px;
}




/* =========================================================
   Footer
   ========================================================= */
.footer {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    min-height: 254px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 80px;
    padding-right: 80px;
    display: flex;
    justify-content: flex-start;
    gap: 80px;
}

.footer-col h4 {
    margin-bottom: 14px;
    font-weight: bold;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--white);
}

.footer-copy {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
}


@media (max-width: 768px) {
    .footer {
        min-height: auto;
        padding: 32px 16px;
    }

    .footer-inner {
        padding-left: 0;
        padding-right: 0;
        gap: 40px;
    }
}


/* ============================
   Sidebar
   ============================ */

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: calc(var(--header-height) + var(--environment-banner-height));
    left: 0;
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-right: 1px solid var(--gray-300);
    z-index: 1000;
}

.sidebar-head button {
    display: none;
}


@media (max-width: 768px) {
    .sidebar.public-sidebar {
        display: flex !important;
        top: 0;
        left: auto;             /* PCの left: 0 を打ち消す */
        right: 0;             /* 右端を基準にする */
        height: 100vh;
        z-index: 3000;

        /* 画面の「右外」に押し出して隠す（プラスの100%） */
        transform: translateX(100%);

        /* スライド移動のアニメーション */
        transition: transform 0.3s ease;
    }

    .public-sidebar .btn-outline-secondary {
        width: 100%;
    }

    .sidebar.confirm-sidebar {
        display: none;
    }

    .public-sidebar.is-open {
        transform: translateX(0);
    }

    .public-sidebar .sidebar-head {
        display: flex;
        justify-content: space-between;
    }

    .public-sidebar .sidebar-head button {
        display: inline-block;
        justify-content: space-between;
        font-size: var(--font-size-h1);
    }
}

.sidebar-inner {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .sidebar-inner {
        padding: 30px;
    }
}

.sidebar-logo img {
    height: 24px;
}

/* MENU ラベル */
.sidebar-label {
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--gray-600);
    letter-spacing: 0.08em;
}

.cms-sidebar-label {
    padding: 0 0 12px;
    font-weight: 800;
    letter-spacing: .6px;
}

/* ナビ本体 */
.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav ul i {
    -webkit-text-stroke: 0.5px;
}

.sidebar-nav li a {
    display: flex;
    gap: 10px;
    color: var(--text-base);
    padding: 2px 0;
}

.sidebar-nav li.is-active {
    color: var(--primary-color);
}

.sidebar-nav li.is-active > a {
    color: var(--primary-color);
}

.sidebar-nav-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    /* 非アクティブ時のベース色はグレー */
    filter: grayscale(1);
    opacity: 0.8;
}


/* ボタンをaタグっぽくする（既存CSSがあっても邪魔しにくい最小限） */
.sidebar-nav .content-menu-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    color: inherit;
    font: inherit;
}

/* アイコン付きラベル（frontサイドバーのガイド系サブメニュー用） */
.sidebar-nav .content-menu-btn .content-menu-label {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* sub menuの見た目（最低限） */
.sidebar-sub-nav {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.sidebar-sub-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-sub-nav a .badge-unread {
    margin-left: auto;
}

.sidebar-nav-link--stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.sidebar-nav li.has-children.is-open .chev {
    transform: rotate(90deg);
}

/* 初期は閉じる */
.sidebar-nav li.has-children .sidebar-sub-nav {
    display: none;
}

/* 開いたときだけ表示 */
.sidebar-nav li.has-children.is-open .sidebar-sub-nav {
    display: block;
}

/* アクティブ行のアイコンだけカラーに */
.sidebar-nav li.is-active .sidebar-nav-icon {
    filter: none;
    opacity: 1;
}

/* お問い合わせボックス */
.sidebar-contact {
    padding: 16px;
    background: var(--gray-100);
    border-radius: 6px;
}

.asset-sidebar-toggle {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + 100px); /* ヘッダーの直下に配置 */
    left: 0;
    z-index: 2500;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 15px 5px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 8px 8px 0; /* 右側だけ丸みをつける */
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.3s ease;
    transform: translateX(-20%);
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-weight: 700;
    height: 100px;
}

.asset-sidebar-toggle i {
    font-size: 18px;
}

.asset-sidebar-toggle-text {
    font-size: 12px;
    font-weight: bold;
    writing-mode: vertical-rl; /* 縦書きにして省スペース化（横書きなら消してOK） */
    letter-spacing: 0.1em;
}

.sidebar.asset-sidebar {
    position: fixed;
    top: calc(var(--header-height) + var(--environment-banner-height));
    left: 0;
    height: calc(100vh - var(--header-height) - var(--environment-banner-height));
    z-index: 2400;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout:has(.asset-sidebar) {
    margin-left: 0 !important;
}

@media (max-width: 768px) {
    .asset-sidebar-toggle {
        display: flex;
    }

    .sidebar.asset-sidebar.is-open {
        transform: translateX(0);
    }

    .asset-sidebar-toggle.is-open {
        transform: translateX(0);
    }

    .sidebar.asset-sidebar {
        /* 画面左外にはみ出させて隠す */
        transform: translateX(-100%);
        top: calc(var(--header-height) + var(--environment-banner-height) + var(--page-header-height));
        height: calc(100vh - var(--header-height) - var(--environment-banner-height) - var(--page-header-height));
    }

    .sidebar.asset-sidebar .sidebar-inner {
        top: 80px
    }
}


.contact-label {
    font-weight: 600;
    color: var(--text-bold);
    margin-bottom: 4px;
}

.contact-text {
    font-size: var(--font-size-small);
    color: var(--text-base);
    margin-bottom: 12px;
}

/* お問い合わせボタンの中に電話アイコン */

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    border: 1px solid var(--gray-600);
}


/* ============================
   リンクをホバーしたときの動作
   ============================ */
.link-back:hover {
    text-decoration: underline;
}

.link {
    color: var(--primary-color);
}

.link:hover {
    text-decoration: underline;
}



/* ============================
   Section / Layout
   ============================ */

.page-home {
    padding-top: 32px;
    padding-bottom: 48px;
    max-width: 1400px;
}

/* ============================
   Home: Section Header
   ============================ */
.page-home .home-hd {
    text-align: center;
    margin-bottom: 48px;
}

.page-home .home-hd-ttl {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.page-home .home-hd-line {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 4px;
    background-color: var(--primary-color);
}

.page-home .home-hd-sub {
    color: var(--text-light);
    margin-top: 16px;
    font-size: var(--font-size-base);
}

/* ============================
   Home: Cards Grid
   ============================ */
.page-home .home-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 0 auto;
    align-items: stretch;
}


@media (max-width: 768px) {
    .page-home .home-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ============================
   Home: Card
   ============================ */
.page-home .home-card-media {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .page-home .home-card-media {
        height: fit-content;
    }
}

.page-home .home-card-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.page-home .home-card-name {
    font-weight: 700;
    font-size: var(--font-size-h1);
    margin-bottom: 16px;
    text-align: center;
    color: var(--primary-color);
    letter-spacing: 0.025em;
}

.page-home .home-card-desc {
    color: var(--text-base);
    font-size: var(--font-size-base);
    line-height: 1.625;
    text-align: justify;
    margin-bottom: 8px;
}

/* Card Middle */
.page-home .home-card-mid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
}

/* Link Button */
.link-btn {
    padding: 10px 0;
}

.page-home .link-btn-inner {
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.page-home .link-btn-txt {
    border-bottom: 1px solid var(--primary-color);
}

.page-home .link-btn-ico {
    font-size: 16px;
    margin-left: 8px;
}

/* Card Footer / CTA Button */
.page-home .home-card-foot {
    margin-top: auto;
}

.page-home .home-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    width: 100%;
}



/* ============================
   Service html_description
   ============================ */

/* --- Spec Grid --- */
.page-home .spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .page-home .spec-grid {
        grid-template-columns: 1fr;
    }
}


.page-home .spec-box {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 16px;
}

.page-home .spec-ttl {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-home .spec-ico {
    font-size: 16px;
    color: var(--gray-600);
    margin-right: 8px;
    flex-shrink: 0;
}

.page-home .spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-home .spec-item {
    display: flex;
    align-items: flex-start;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.page-home .dot {
    width: 4px;
    height: 4px;
    margin-top: 8px;
    margin-right: 8px;
    border-radius: 9999px;
    flex-shrink: 0;
    background-color: var(--gray-300);
}

/* --- Features --- */
.page-home .feat {
    padding-top: 8px;
}

.page-home .feat-ttl {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 16px;
    padding: 0 4px;
    text-align: center;
}

.page-home .feat-list {
    border-bottom: 1px solid var(--gray-100);
}

.page-home .feat-item {
    padding: 12px 0;
    display: flex;
    align-items: flex-start;
    font-size: var(--font-size-base);
    color: var(--text-base);
    border-top: 1px solid var(--gray-100);
}

.page-home .feat-item:first-child {
    border-top: none;
}

.page-home .feat-ico {
    font-size: 16px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    color: #22c55e;
}

.page-home .feat-txt {
    line-height: 1.375;
}



.section {
    margin-top: 40px;
}

@media (max-width: 768px) {
    .section {
        margin-top: 0;
        margin-bottom: 5px;
    }

    .faq-container .section {
        margin: 25px;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 20px;
}

.section-title {
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.section-lead {
    margin-top: 4px;
}

.row {
    display: grid;
    gap: 24px;
}

.row-2 {
    grid-template-columns: 1fr 1fr;
}


/* ============================
   Style Guide Page
============================ */
.page-styleguide {
    background: var(--white);
}

.page-styleguide section {
    margin-bottom: 40px;
}

.page-styleguide h1,
.page-styleguide h2 {
    margin-bottom: 16px;
}

/* ---------- Colors ---------- */

.color-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.color-swatch {
    width: 120px;
    text-align: center;
    font-size: var(--font-size-small);
}

.color-box {
    width: 100%;
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--gray-50);
    margin-bottom: 6px;
}

/* ---------- Buttons ---------- */

.button-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.button-grid.size {
    align-items: flex-end;
}

.button-block {
    margin-top: 24px;
}

.button-subtitle {
    margin-bottom: 8px;
    font-size: var(--font-size-h4);
    font-weight: 600;
}

.button-block .button-grid .btn,
.button-block .button-grid .btn-sm,
.button-block .button-grid .btn-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Fonts ---------- */

.font-samples h1,
.font-samples h2,
.font-samples h3,
.font-samples h4,
.font-samples h5,
.font-samples p {
    margin-bottom: 12px;
}

/* ---------- Code Block ---------- */

.code-block {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--gray-50);
    overflow-x: auto;
    margin-top: 12px;
}

.code-block code {
    white-space: pre;
    display: block;
}


/* ============================
   アラート関連
   ============================ */

.alert-danger,
.alert-success {
    font-size: var(--font-size-h2);
    text-align: center;
    padding: 10px;
}

@media (max-width: 768px) {
    .alert-danger,.alert-success {
        padding: 10px 35px;
    }
}

.alert-success {
    background: var(--light-primary-color);
}

.alert-danger {
    background: var(--soft-red);
}

/* ============================
   Hero（画像スライダーの枠）
   ============================ */

.hero {
    margin-bottom: 40px;
}

.hero-inner {
    border-radius: 8px;
    color: var(--white);
    overflow: hidden;
    position: relative;
}

.hero-slides {
    position: relative;
}

.hero-slide {
    display: none;
}

.hero-slide.is-active {
    display: block;
}

.hero-slide img {
    width: 100%;
}

/* 矢印・ドット：色は変数のみ */
.hero-nav {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}

.hero-arrow {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: 1px solid var(--white);
    background: transparent;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    pointer-events: auto;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--white);
    background: transparent;
}

.hero-dot.is-active {
    background: var(--white);
}



/* ============================
   Card
   ============================ */

.card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 768px) {
    .card {
        padding: 15px;
    }
}

.card-title {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.card-title-left {
    color: var(--text-bold);
    border-bottom: 1px solid var(--gray-300);
    padding-bottom: 8px;
}

.card-text {
    line-height: 1.6;
    margin-bottom: 12px;
}

.card-meta {
    margin-bottom: 12px;
}

.card-meta-row {
    background: var(--gray-100);
    margin-bottom: 10px;
    border-radius: 6px;
    padding: 10px;
}

.card-meta-row dt {
    color: var(--text-base);
}

.card-meta-row dd {
    font-weight: 600;
    color: var(--text-bold);
    margin: 0;
}

.card-list {
    color: var(--black);
}

.card-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    margin-bottom: 4px;
}

.card-list-icon {
    color: var(--primary-color);
    font-size: var(--font-size-base);
    margin-top: 2px;
}

.card-list li span {
    color: var(--black);
}

.card-footer {
    margin-top: auto;
    padding-top: 8px;
}



/* ============================
   List / Tag
   ============================ */

.list-row {
    margin-top: 15px;
}

.tag {
    display: inline-block;
    padding: 4px 6px;
    border-radius: 4px;
    background: var(--gray-50);
    color: var(--text-base);
}



/* ============================
   ログインページ
============================ */

.page-login {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.login-card {
    background: var(--white);
    border: 1px solid var(--gray-50);
    padding: 32px;
    border-radius: 8px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.04);
}

.login-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.login-subtext {
    font-size: var(--font-size-small);
    color: var(--text-base);
    margin-bottom: 24px;
}

/* -------- FORM -------- */

.form-group {
    text-align: left;
    margin-bottom: 16px;
}

.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    margin-top: 5px;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: var(--font-size-base);
    background: var(--white);
}

.form-control:disabled {
    background-color: var(--gray-300);
}

.forgot-link {
    font-size: var(--font-size-small);
    color: var(--primary-color);
}

.login-note {
    margin-top: 20px;
    font-size: var(--font-size-small);
    color: var(--text-base);
}

/* セレクト関係 */
.select-wrap {
    position: relative;
}

.select-wrap select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-wrap::after {
    content: "";
    position: absolute;
    pointer-events: none;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--gray-600);
}


/* ================================
   ページヘッダー
   ================================ */
.page-header {
    background: var(--primary-color);
    height: var(--page-header-height);
    padding: 15px 48px;
    color: var(--white);
    position: sticky;
    top: calc(var(--header-height) + var(--environment-banner-height));
    z-index: 2000; /* これがないとコンテンツが画面のヘッダーの上に被ることがあるため入れておく */
}

.page-header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    padding: 0px 30px;
    max-width: 1024px;
    margin: 0 auto;
}

.page-header-inner > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* マイページの人型のアイコン */
.mypage-icon {
    color: var(--white);
    font-size: 38px;
}

/* ページヘッダー右側：発注後ガイド導線（注文履歴） */
.post-order-guide {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 248px;
    padding: 10px 14px 10px 16px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 6px;
    color: var(--white);
    text-decoration: none;
    background: rgba(255, 255, 255, .07);
    transition: background .16s ease, border-color .16s ease;
    flex-shrink: 0;
}

@media (hover: hover) {
    .post-order-guide:hover {
        background: rgba(255, 255, 255, .14);
        border-color: rgba(255, 255, 255, .9);
        color: var(--white);
    }
}

.post-order-guide__text {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.post-order-guide__label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.post-order-guide__sub {
    font-size: 10px;
    line-height: 1.35;
    opacity: .82;
}

.post-order-guide__arrow {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
    opacity: .9;
}

@media (max-width: 768px) {
    .page-header {
        padding: 5px 16px;
    }

    .page-header-inner {
        padding: 0;
    }

    /* 親要素（.header-right）の余白や配置の干渉をリセット */
    .page-header-inner .header-right:has(.post-order-guide) {
        margin: 0;
        padding: 0;
    }

    /* 画面右下に固定表示 */
    .post-order-guide {
        position: fixed;
        min-width: 180px;
        bottom: 20px;            /* 画面下からの距離 */
        right: 16px;             /* 画面右からの距離 */
        z-index: 999;            /* 最前面に表示 */
        /* モバイル用にコンパクトなボタンデザインに調整 */
        background-color: var(--primary-color); /* 視認性の高い背景色 */
        color: var(--white);
        border-radius: 50px;     /* 丸みのあるカプセル形状 */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); /* 浮遊感のある影 */
        text-decoration: none;
    }

    /* サブテキスト（注釈）を非表示にしてコンパクト化 */
    .post-order-guide__sub {
        display: none;
    }

    /* ラベルテキストのサイズ調整 */
    .post-order-guide__label {
        font-size: 13px;
        font-weight: bold;
    }

    /* 矢印アイコンの調整 */
    .post-order-guide__arrow {
        margin-left: 6px;
        font-size: 16px;
    }
}


/* ================================
   コンテンツエリア内
   ================================ */
.content-area {
    margin-bottom: 50px;
}


/* ================================
   マイページ
   ================================ */

/* セクションタイトルと下線 */
.content-title {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .content-header {
        margin-left: 20px;
    }
}

/* カード一覧：横並び */
.content-area .card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
    margin-top: 15px;
}

/* コンテンツ内カード */
.content-area a.card {
    align-items: center;
    width: 290px;
}

@media (max-width: 768px) {
    .content-area a.card {
        width: 155px;
        padding: 15px;
        margin-bottom: 25px;
    }
}

/* ホバー時の軽い浮き */
.content-area a.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.content-area .card-section {
    margin-top: 50px;
}

/* アイコンの丸背景部分 */
.content-area .card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--light-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 30px;
}

/* タイトル・説明文 */
.content-area .card-content {
    text-align: center;
}

.content-area .card-title {
    color: var(--black);
}

.content-area .card-description {
    font-size: var(--font-size-small);
    color: var(--text-base);
}

.content-note {
    margin-bottom: 15px;
}

/* ================================
   お見積り作成画面
   ================================ */
.content-area .card-media img {
    width: 100%;
    border-radius: 0;
    padding: 0;
}

/* 納期 / 最小ロットを横並びにする */
.content-area .card-meta {
    margin-top: 20px;
    margin-bottom: 12px;   /* 既存のままでもOK */
    display: flex;         /* 横並び */
    gap: 16px;             /* ボックス間の余白 */
}

.content-area .card-meta-row {
    background: var(--gray-100);
    margin-bottom: 0;      /* 縦方向の余白は gap に任せる */
    border-radius: 6px;
    padding: 10px;
    flex: 1;               /* 2つを等幅にする */
}

.quantity-unit {
    position: absolute;
    right: 35px;
    top: 25px;
    transform: translateY(-50%);
}

.delivery-table {
    width: max-content;   /* 表の実幅を保つ */
    width: 100%;
    border-collapse: collapse;
    border-collapse: separate; /* stickyのために安定しやすい */
    border-spacing: 0;
}

.delivery-table__head {
    padding: 10px 8px;
    border: 1px solid var(--gray-50);
    background: var(--gray-50);
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.delivery-table tr th {
  position: sticky;
  left: 0;
  z-index: 2;                /* 他セルの上に */
}


.delivery-table__head--blank {
    width: 120px;
}

.delivery-table__row-title {
    padding: 10px 8px;
    border: 1px solid var(--gray-50);
    text-align: left;
    font-weight: 600;
    background: var(--gray-100);
    white-space: nowrap;
}

.delivery-table td {
    padding: 10px 8px;
    border: 1px solid var(--gray-50);
    text-align: center;
    padding: 4px;
}

.delivery-note {
    margin-top: 10px;
}

.price-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.delivery-table tbody td:hover {
    background-color: var(--light-primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.delivery-table tbody td:active {
    outline: 3px solid var(--primary-color);
}

td.is-active {
    outline: 3px solid var(--primary-color);
    background-color: var(--light-primary-color);
    outline-offset: -3px; /* 内側に描画 */
}

/* ===== DataOptionフォーム ===== */

.data-option,
.form-group.row {
    display: grid;
    grid-template-columns: 1fr auto;
    justify-content: space-between;
    padding: 10px 0;
}

@media (max-width: 768px) {
    .form-group.row {
        display: block;
        padding: 0;
    }

    .data-option {
        flex-direction: column;
    }
}

.option-subtotal {
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    font-weight: 600;
    text-align: right;
}

.option-delivery-day {
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    font-weight: 600;
    text-align: right;
}

.estimate-name .form-wrap {
    display: flex;
}

.estimate-name .form-wrap label {
    width: 100px;
    margin: auto 0;
}

.estimate_name_error {
    margin-left: 90px;
}

.btn-section {
    width: 100%;
    padding: 24px;
    text-align: center;
}


/* エラーメッセージ（下段） */
.form-wrap .input-error{
    display: none;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    color: var(--red);
}

/* エラー状態（JSで .is-error を form-wrap に付ける想定） */
.form-wrap.is-error .form-input{
    border-color: var(--red);
    background: var(--soft-red);
}

.form-wrap.is-error .input-error{
    display: block;
}

.confirm-grid {
    margin: 20px;
}

.confirm-row {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    border-bottom: 1px solid var(--gray-50);
    padding: 15px 15px;
    align-items: center;
}

.confirm-row.order {
    grid-template-columns: 130px 1fr auto;
}

@media (max-width: 768px) {
    .confirm-grid {
        margin: 0;
    }
    .confirm-row {
        grid-template-columns: 120px auto auto;
        padding: 15px 0;
    }
}

.confirm-row.confirm-row--top {
    align-items: start;
}

.confirm-row:last-child {
    margin-bottom: 20px;
}

.confirm-row .confirm-td {
    font-weight: 700;
}

.confirm-list li {
    font-weight: 500;
}

.confirm-list li::before {
    content: "・";
}

.margin-top-15px {
    margin-top: 15px;
}

.total_amount__yen {
    color: var(--primary-color);
    font-size: var(--font-size-h1);
    font-weight: 700;
}

.subtotal_amount__yen { 
    font-weight: 700;
}

.form-footer .confirm-actions {
    width: 100%;
    margin: 0 auto;
}

.confirm-actions {
    display: grid;
    max-width: 400px;
    margin: 18px auto 0;
    gap: 10px;
}

.is-negative,
.summary-value.is-negative {
    color: var(--red);
}

.right-btn {
    text-align: right;
}

.note-wrap {
  position: relative;
  align-items: start;
}

.note-wrap {
  position: relative;
}


.note {
  max-height: 200px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  padding-bottom: 32px; /* 続き表示分の余白 */
  text-align: left;      /* ←中央寄せを殺す */
  display: block;        /* ←inline/inline-block/flex影響を避ける */
  width: 100%;
  min-width: 0;
}

/* 下のフェード（さりげなく） */
.note-wrap.has-more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0.9)
  );
}

/* 続きボタン */
.note-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #e2e8f0;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.note-wrap.has-more .note-indicator {
  opacity: 1;
}

.note-wrap.at-bottom .note-indicator {
  opacity: 0;
}

/* 見積履歴ページだけ：備考ブロックを基準にする */
.history-card .detail-row:last-child > div {
    position: relative;
  }


/* ================================
   お見積り作成STEPサイドバー
   ================================ */

/* ステップリスト */
.steps {
    margin: 0 0 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
    position: relative;
    font-size: var(--font-size-h3);
    font-weight: 600;
    opacity: 0.45;
}

.step::after {
    content: "";
    position: absolute;
    left: 22px;           /* バッジの中心に合わせる値（バッジサイズ 22px 想定） */
    top: 22px;            /* バッジの下あたりからスタート */
    bottom: -15px;         /* 次のステップとの間まで伸ばす（お好みで調整） */
    width: 3px;
    background: var(--gray-50);  /* デフォルトはグレー */
}

/* 一番下のステップは線を描かない */
.step:last-child::after {
    content: none;
}

/* バッジを線の上に見せるために z-index を上げる */
.step__badge {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    font-weight: 700;
    z-index: 1;
    line-height: 1;
    /* margin: 0 3px; */
}

/* ラベル全体を縦並びに */
.step__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 768px) {
    .step__content {
        width: 90%;
    }
}

.step__sub {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.copyright_fee {
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    font-weight: 600;
    text-align: right;
}

/* 戻るリンク */
.sidebar__back {
    display: inline-flex;
    margin: 8px 0 24px;
    color: var(--primary-color);
}

.step-summary {
    width: 145px;
    border-radius: 10px;
    background: var(--light-primary-color);
    padding: 15px 15px 0 15px;
    margin-top: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    font-size: var(--font-size-small);
}

@media (max-width: 768px) {
    .step-summary {
        width: 100%;
    }
}

.step-summary dd {
    color: var(--gray-600);
    font-weight: 600;
    font-size: var(--font-size-small);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--text-base);
    white-space: nowrap;
}

.chip.chip--long {
    background: rgba(var(--primary-rgb), 0.05);
    border: none;
    width: 100%;
}

.summary-scroll {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin; /* Firefox */
}

/* WebKit系 */
.summary-scroll::-webkit-scrollbar {
    height: 6px;
}

.summary-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.25);
    border-radius: 3px;
}

.summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.border-top {
    padding-top: 10px;
    border-top: 1px solid var(--gray-50);
}

/* ===== 規定外のご案内 ===== */
.estimate-info {
    background-color: var(--light-primary-color);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    gap: 20px;
    margin-top: 24px;
}

.estimate-info-ico {
    color: var(--primary-color);
    background-color: var(--white);
    padding: 8px;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.estimate-info-ttl {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.estimate-info-desc {
    color: var(--text-base);
    line-height: 1.75;
    margin-bottom: 12px;
}

.estimate-info-bold {
    font-weight: 700;
    color: var(--text-bold);
}

.estimate-info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--primary-color);
}

.estimate-info-link:hover {
    text-decoration: underline;
}

.estimate-info-note {
    color: var(--primary-color);
}

/* ------- 状態ごとの色変化 ------- */

.step.is-complete {
    align-items: flex-start;
    opacity: 0.85;
}

.step.is-active {
    opacity: 0.85;
    font-weight: 700;
}

/* 完了ステップ：バッジと線を青に */
.step.is-complete .step__badge {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.step.step.is-complete .step__label {
    margin-top: 3px;
}

.step.is-complete::after {
    background: var(--primary-color);
}

/* アクティブステップ：バッジだけ青枠／線はまだグレー */
.step.is-active .step__badge {
    background: var(--primary-color);
    color: var(--white);
}

.step.is-active .step__label {
    color: var(--primary-color);
    font-weight: 700;
}




/* =====================
   見積もり履歴
   ===================== */

/* ========== 見積もり履歴 ========== */
/* 履歴カード */
.history-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-card:last-child {
    margin-top: 20px;
}

/* 上部のメタ（薄い帯） */
.history-meta {
    display: flex;
    justify-content: space-between;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-300);
    border-radius: 8px 8px 0 0;
    padding: 10px 24px;
    font-weight: 600;
}

.history-header-estimate-name {
    margin-top: 5px;
    display: flex;
    width: 400px;
    position: relative;
    height: 40px;
}

@media (max-width: 768px) {
    .history-header-estimate-name {
        width: 100%;
    }
}


.history-meta-other {
    margin:0;
    display:grid;
    grid-template-columns: auto auto; /* dt/dd の2列 */
    column-gap:16px;
    text-align:right;
    color: var(--text-light);
    align-items: center;
}

.history-meta__row {
    display: contents;
}

.history-meta__row {
    font-size: var(--font-size-small);
    color: var(--text-bold);
    font-weight: 700;
    line-height: 1.8;
}

.history-meta__row span{
    color: var(--text-base);
    font-weight: 700;
}


.history-header-estimate-name p {
    font-size: var(--font-size-h2);
    font-weight: 700;
}


.adj-forms .form-group {
    margin-bottom: 0;
}

.adj-forms .form-wrap {
    display: grid;
    grid-template-columns: 1fr 80px 135px 135px 135px 135px;
    gap: 6px;
}

@media (max-width: 768px) {
    .adj-forms {
        overflow-x: auto;
    }

    .adj-forms .form-wrap {
        grid-template-columns: 130px 80px 135px 135px 135px 135px;
    }
}

.adjustment-form-unit {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px; /* input と 単位の間 */
}

.adjustment-form-unit .unit {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

/* 注文一覧：詳細確認ボタン付き */
/* 注文詳細モーダル */
.order-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-h4);
}

.order-detail-table th {
    text-align: left;
    padding: 12px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-300);
    color: var(--text-bold);
    width: 30%;
    font-weight: normal;
}

.order-detail-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-300);
    color: var(--text-bold);
}

.order-detail-table ul {
    margin: 0;
    padding-left: 1.2em;
    list-style: disc;
}

.order-detail-group-header {
    background-color: var(--gray-100);
    font-weight: 700;
    font-size: var(--font-size-h4);
}


/* 共通の left:50% がズレるのを抑えるため、確実に中央へ */
.confirm-row.order.note-wrap .note-indicator,
.confirm-row.note-wrap b .note-indicator {
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 8px;                 /* 位置は好みで */
  margin: 0 !important;
}

/* 本体：左（内容）＋右（金額） */
.history-body {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 32px;
    align-items: start;
    padding: 24px;
}

@media (max-width: 980px) {
    .history-body {
        grid-template-columns: 1fr;
    }
}

.history-row {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-50);
    align-items: baseline;
}

.history-row:last-child {
    border-bottom: 0;
}

.history-row.order-option {
    align-items: start;
}

.history-row dt {
    font-weight: 500;
    color: var(--text-light);
}

.history-row dd {
    font-weight: 700;
    color: var(--text-bold);
}

.history-row dd .history-option-list li::before {
    content: "・";
}

.history-row dd .history-option-list li {
    font-weight: 500;
}


/* 下部ボタン列 */
.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 15px 10px;
    border-top: 1px solid var(--gray-300);
}

.history-header-estimate-name .history-meta__value {
    overflow-x: auto;
    white-space: nowrap;
    padding-right: 30px;
}

/* 右のフェード */
.history-header-estimate-name .history-meta__value::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 100px;
    height: 40px;
    pointer-events: none;

    background: linear-gradient(
        to right,
        rgba(249,250,251,0) 0%,
        rgba(249,250,251,0.4) 40%,
        rgba(249,250,251,0.8) 70%,
        rgba(249,250,251,1) 100%
    );
}

@media (max-width: 768px) {
    .history-meta {
        flex-direction: column;
        padding: 12px 16px;
    }

    .history-header-estimate-name {
        width: 100%;
        height: auto;
    }

    .history-meta-other {
        grid-template-columns: 70px auto;
        text-align: left;
        column-gap: 10px;
    }

    .history-header-estimate-name .history-meta__value::after {
        display: none;
     }
}


/* =====================
   モーダル
   ===================== */

/* ===== モーダル - 基本構造 ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none; /* JS で block にする */
}

/* 背景の暗い＆ぼかし部分 */
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

/* 中央のダイアログ */
.modal-dialog {
    position: relative;
    width: 480px;
    background: #fff;
    border-radius: 8px;
    padding: 24px 32px 20px;
}

/* 表示状態用クラス */
.modal.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== モーダル開閉アニメーション ===== */

/* 背景: フェードイン */
.modal .modal-backdrop {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}
.modal.is-open .modal-backdrop {
    opacity: 1;
}

/* ダイアログ: フェード＋スライドアップ */
.modal .modal-dialog {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.modal.is-open .modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 閉じるアニメーション */
.modal.is-closing .modal-backdrop {
    opacity: 0;
}
.modal.is-closing .modal-dialog {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

/* ===== モーダル - 内部レイアウト ===== */
.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.modal-title.information::before {
    content: "ⓘ";
    margin-right: 5px;
    padding: 5px;
    text-align: center;
    font-weight: 700;
    border-radius: 50%;
    color: var(--primary-color);
}

.modal-lead {
    margin: 4px 0 16px;
}

.modal-service {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--light-primary-color);
    margin-bottom: 12px;
}

.modal-service-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: var(--font-size-h2);
    margin-left: 3px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.modal-actions.center {
    justify-content: center;
}

.modal .bi-check-circle::before {
    color: var(--primary-color);
    font-size: var(--font-size-h1);
    width: 22px;
    height: 21px;
    background-color: var(--white);
    border-radius: 50%;
}

/* ===== モーダル - 警告ボックス ===== */
.modal-warning {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dc2626;
    border-radius: 8px;
    margin: 16px 0;
}

.modal-warning > i {
    color: #dc2626;
    font-size: 18px;
    flex-shrink: 0;
}

.modal-warning-content {
    flex: 1;
}

.modal-warning-title {
    font-weight: bold;
    color: var(--text-bold);
    margin-bottom: 4px;
    font-size: var(--font-size-h5);
}

.modal-warning-text {
    font-size: var(--font-size-h5);
    color: var(--text-base);
    line-height: 1.6;
}

.modal-warning-text strong {
    text-decoration: underline;
}

.modal-note {
    margin: 16px 0;
}

.modal-note > span {
    font-size: var(--font-size-h5);
    color: var(--text-light);
}


/* ===== サービス確認モーダル ===== */
.modal-dialog--confirm {
    width: 400px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .modal-dialog {
        padding: 25px;
        width: 90%;
    }

    .modal--shipping .modal-dialog {
        padding: 0;
    }
}

/* ブランドカラーヘッダー */
.modal-header--confirm {
    padding: 16px 24px;
    background: var(--primary-color);
    margin-bottom: 0;
}

.modal-header--confirm .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-h2);
    letter-spacing: 0.05em;
}

.modal-header--confirm .modal-title::before {
    display: none;
}

/* 確認モーダルのボディ */
.modal-confirm-body {
    padding: 24px;
}

/* リードテキスト */
.modal-confirm-lead {
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.7;
    margin: 0 0 20px;
}

/* サービス表示エリア */
.modal-confirm-service {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    margin-bottom: 20px;
}

.modal-confirm-service__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 16px;
    color: var(--primary-color);
}

.modal-confirm-service__name {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--text-bold);
}

/* 補足テキスト（ⓘアイコン + テキスト） */
.modal-confirm-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
}

.modal-confirm-note svg {
    color: var(--text-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-confirm-note span {
    font-size: var(--font-size-small);
    color: var(--text-light);
    line-height: 1.6;
}

/* ボタンエリア */
.modal-confirm-actions,
.modal-delete-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.modal-delete-confirm-actions {
    padding-bottom: 10px;
}

/* ===== インフォメーションモーダル ===== */
.modal-dialog--info {
    max-height: 80vh;
    width: 600px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* インフォヘッダー: 白背景 + 円形アイコン + 閉じるボタン */
.modal-header--info {
    padding: 24px 32px 8px;
    margin-bottom: 0;
    justify-content: space-between;
    align-items: flex-start;
}

/* ヘッダーとフッターは高さを固定（縮ませない） */
.modal-header--info,
.modal-info-footer {
    flex-shrink: 0;
}

.modal-header--info .modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header--info .modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--light-primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    flex-shrink: 0;
}

.modal-header--info .modal-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--text-bold);
}

.modal-header--info .modal-title::before {
    display: none;
}

.modal-header--info .modal-close {
    color: var(--text-light);
    padding: 4px;
    border-radius: 50%;
}

.modal-header--info .modal-close:hover {
    color: var(--text-base);
    background: var(--gray-50);
}

.modal-info-body {
    display: block;
    margin: 16px 0 0;
    padding: 0 32px 16px;
    line-height: 1.8;
    font-size: var(--font-size-base);
    color: var(--text-base);
    overflow-y: auto;
    flex-grow: 1;
}

.modal-info-body p {
    margin: 0 0 12px;
}

.modal-info-body p:last-child {
    margin-bottom: 0;
}

.modal-info-subtitle {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-bold);
    margin: 16px 0 8px;
}

.modal-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-info-list li {
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 6px;
    font-size: var(--font-size-small);
    line-height: 1.6;
    display: flex;
    gap: 0;
}

.modal-info-label {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-info-label::after {
    content: "→";
    margin: 0 6px;
    color: var(--text-light);
}

/* インフォフッター */
.modal-info-footer {
    padding: 16px 32px 32px;
    display: flex;
    justify-content: center;
}

.modal-info-footer .btn {
    min-width: 120px;
}

/* ===== ワイド/配送先リストモーダル ===== */
.modal-dialog--wide {
    width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body.address-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-header--shipping {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
    justify-content: space-between;
}

.modal-title--shipping {
    font-size: var(--font-size-h2);
}

.modal-title--shipping::before {
    display: none;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    padding: 0 8px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-base);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-inner {
    overflow-y: auto;
}


/* ===== Radio: "チップ"風 / 均等配置 / 周りのフォームと統一 ===== */
.order-option-check-input {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3択想定。2択/4択なら数字を変える */
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

@media (max-width: 768px) {
    .order-option-check-input {
        gap: 0;
    }
}

/* label を “ボタン” っぽくする */
.form-wrap .order-option-check-input label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;               /* 他フォームの高さ感に寄せる */
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* hover（シンプルに） */
.form-wrap .order-option-check-input label:hover {
    background:  var(--light-primary-color);
}

/* radio本体：四角のチェック */
.form-wrap .order-option-check-input input[type="radio"],
.form-wrap .checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    flex: 0 0 auto;
    display: grid;
    place-content: center;
    transition: border-color .15s ease, background-color .15s ease;
}

/* checked のとき：中のチェック + ラベル全体も強調 */
.form-wrap .order-option-check-input input[type="radio"]:checked,
.form-wrap .checkbox-label input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

/* 選択時にラベル全体を薄く色づけ */
.form-wrap .order-option-check-input label:has(input[type="radio"]:checked),
.form-wrap .checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background:  var(--light-primary-color);
    box-shadow: 0 0 0 3px rgba(13, 94, 168, 0.12);
}

/* スマホでは縦に落とす（読みやすい） */
@media (max-width: 640px) {
    .order-option-check-input {
        grid-template-columns: 1fr;
    }
}

.option-form-wrap {
    margin: 15px 0;
}

.option-form-wrap label {
    min-height: 44px;
    margin: 15px 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 40%;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .option-form-wrap label {
        width: 100%;
    }
}

.option-form-wrap label:hover {
    background: var(--light-primary-color);
}

.option-form-wrap input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    flex: 0 0 auto;
}

/* checked のとき：中のチェック + ラベル全体も強調 */
.option-form-wrap input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

/* 選択時にラベル全体を薄く色づけ */
.option-form-wrap label:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background:  var(--light-primary-color);
    box-shadow: 0 0 0 3px rgba(13, 94, 168, 0.12);
}

.option-info-icon {
    color: var(--primary-color);
    cursor: pointer;
    font-size: var(--font-size-base);
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
}

.option-info-icon:hover {
    opacity: 0.7;
}

/* ===== フォームカード ===== */
.form-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-label-wrap {
    display: flex;
    align-items: center;
}

.form-label {
    font-size: var(--font-size-h2);
    font-weight: 600;
    color: var(--black);
}

.badge-required {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: var(--font-size-small);
    line-height: 1.6;
    border-radius: 3px;
    background: var(--red);
    color: var(--white);
    vertical-align: middle;
}

.required {
    font-size: var(--font-size-small);
    color: var(--red);
    font-weight: 700;
}

.form-help-text {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.form-help-icon {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

/* --- ラベル右の説明ボタン（ピル型） ------------------ */
/* .form-label-wrap の中、必須バッジのすぐ右に置く */

.form-help-icon--pill {
    gap: 4px;
    margin-left: 8px;
    padding: 3px 10px 3px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

/* アイコン（bootstrap-icons の ::before は vertical-align で下がる）を文字と同じ高さに揃える */
.form-help-icon--pill i {
    display: inline-flex;
    align-items: center;
    font-size: var(--font-size-base);
    line-height: 1;
}

.form-help-icon--pill:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .form-help-icon--pill {
        padding: 5px 12px 5px 10px;
    }
}

/* ピル型の説明ボタンが入るラベル行は、狭い幅で折り返せるようにする */
.form-label-wrap:has(.form-help-icon--pill) {
    flex-wrap: wrap;
    row-gap: 4px;
}

.help-modal-img {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.form-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
      linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    line-height: 1.5;
}

.form-select-radio {
    padding: 12px 14px;
}

.form-select:disabled {
    background-color: var(--gray-300);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    appearance: none;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    line-height: 1.5;
}

.adjustment-form-unit .form-control {
    margin-top: 0;
    padding: 12px;
}

.form-footer {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* border-top: 1px solid var(--gray-300); */
    padding-top: 25px;
}

.form-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.form-wrap {
    position: relative;
    width: 100%;
}

.form-wrap.right {
    width: 400px;
    text-align: right;
}

.notice-area div {
    width: fit-content;
}

.notice-area.right div {
    /* width: 230px; */
    margin-left: auto;
}

.notice-area.right p::before {
    content: "※";
}

.notice-area.right p {
    font-size: var(--font-size-small);
    padding-left: 1.2em;
    text-indent: -1.2em;
}

.page-title {
    font-weight: 700;
    margin: 0 0 8px;
}

.notice-right {
    color: var(--red);
    font-size: var(--font-size-small);
    text-align: right;
}

.notice-right-block {
    font-size: var(--font-size-small);
    width: 400px;
    margin-left: auto;
}

.length-err {
    color: var(--red);
    font-weight: 600;
}

@media (max-width: 768px) {
    .form-wrap.right,
    .notice-right-block {
        width: 100%;
    }
}


/* ============================
   注文ページ本体
   ============================ */

/* 2カラムレイアウト */
.order-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 12px;
}

@media (max-width: 768px) {
    .order-content {
        grid-template-columns: 1fr;
    }
}


/* 金額カード（右カラム）をコンテンツ量に応じた高さにする */
.order-content > aside {
    align-self: start;
}

/* ============================
   右：サマリーカード
   ============================ */
.card.order-summary-card {
    display: block;
}

.summary-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-qty-input {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.summary-qty-box {
    min-width: 72px;
    padding: 5px 10px;
    text-align: left;
    border: 1px solid var(--gray-300);
    background: var(--white);
    font-size: var(--font-size-small);
}

.summary-leadtime {
    border: 1px solid var(--soft-accent-color);
    padding: 8px 10px;
    margin-bottom: 18px;
    border-radius: 3px;
}

.leadtime-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 4px 0;
    background: transparent;
    border: none;
}

.leadtime-item + .leadtime-item {
    margin-top: 6px;
}

.leadtime-label {
    font-size: var(--font-size-small);
    color: var(--text-base);
    margin-bottom: 2px;
}

.leadtime-date {
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--primary-color);
}

.leadtime-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--accent-color);
    color: var(--white);
    white-space: nowrap;
}



/* ============================
   注文確認ページ
   ============================ */

/* スクロール位置調整（固定ヘッダー分のオフセット） */
#proof-shipping,
#delivery-shipping {
    scroll-margin-top: 250px;
}

.shipping-err {
    border: 3px solid var(--red);
}

.order-heading {
    margin-bottom: 20px;
    color: var(--black);
}

/* --- ご注文内容カード -------------------------------- */

.order-confirm-summary {
    gap: 0px;
}

/* 一番最後のrowだけ下線なし */
.order-confirm-summary .confirm-row:last-child {
    border-bottom: none;
    margin-bottom: 0px;
}

.detail-label {
    white-space: nowrap;
    font-size: var(--font-size-lg);
    width: 120px;
    color: var(--text-base);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .detail-label {
        width: 90px;
    }
}

.order-confirm-summary .detail-main {
    font-size: var(--font-size-lg);
}

.order-final-qty-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.order-final-qty-row .detail-label {
    flex: 0 0 auto;
    min-width: 45px;
    white-space: nowrap;
}

.order-final-note-danger {
    margin-top: 6px;
    font-size: 11px;
    color: var(--red);
}


.btn-outline-secondary.order-edit {
    border: 1px solid var(--gray-600);
}

/* --- 配送先カード ------------------------------------ */

.order-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-lg);
}

.order-address-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-base);
}

.order-address-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 2px;
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 16px;
}

.order-address-body.address-list {
    margin-bottom: 0px;
}

.order-address-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-address-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-address-field-label {
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--gray-600);
    letter-spacing: 0.05em;
}

.order-address-field-text {
    font-size: var(--font-size-base);
    color: var(--text-bold);
    line-height: 1.4;
}

/* 配送先未選択時の空状態表示（注文確認画面） */
.order-address-empty {
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    padding: 40px 16px;
    text-align: center;
    margin-bottom: 16px;
}

.order-address-empty-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-bold);
}

.order-address-empty-text {
    font-size: var(--font-size-small);
    color: var(--gray-600);
    margin-top: 8px;
}

/* 下部の細い行（配送伝票の種類 ～） */

.order-slip-section {
    margin-top: 18px;
}

.order-slip-section.address-list {
    margin-top: 0px;
}

.order-slip-title {
    margin-bottom: 8px;
}

.order-slip-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-slip-row--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

.order-slip-label {
    font-size: var(--font-size-base);
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 600;
}

.order-slip-value {
    font-size: var(--font-size-base);
    color: var(--text-default);
}

/* --- 説明文カード（キャンセル / 納品後） -------------- */

.order-info-card.no-gap {
    gap: 0px;
}

.order-info-danger {
    color: var(--red);
    margin-bottom: 4px;
}

.order-info-list {
    padding-left: 1.4em;
    list-style: disc;
}

/* --- 下部フォーム ------------------------------------ */

.order-consent-row {
    border-top: 1px solid var(--gray-300);
    margin-top: 34px;
    margin-bottom: 18px;
    padding-top: 24px;
    text-align: center;
}

.order-consent-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.order-consent-item input {
    width: 16px;
    height: 16px;
}

.order-submit-area {
    text-align: center;
}

.order-submit-btn {
    min-width: 360px;
}


.order-submit-note {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- カードの縦積み ---------------------------------- */

.order-confirm-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* form .card の margin-bottom を打ち消し、間隔は gap に一本化する */
.order-confirm-stack > .card {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .order-confirm-stack {
        gap: 12px;
    }
}

/* --- フォームカード（見出し + 本文） ------------------ */

.order-form-card {
    padding: 0;
    gap: 0;
    scroll-margin-top: calc(var(--header-height) + var(--page-header-height) + 16px);
}

.order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--gray-300);
}

.order-card-title {
    color: var(--black);
}

.order-card-lead {
    margin-top: 4px;
    font-size: var(--font-size-h5);
    line-height: 1.6;
    color: var(--text-light);
}

.order-card-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 24px 24px;
}

.order-card-body > .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .order-form-card {
        padding: 0;
    }

    .order-card-head {
        padding: 14px 15px 12px;
    }

    .order-card-body {
        gap: 18px;
        padding: 15px;
    }
}

/* カード内では、ラベルをカード見出し（18px）より一段小さくする */
.order-form-card .form-header {
    justify-content: flex-start;
    margin-bottom: 6px;
}

.order-form-card .form-label-wrap {
    flex-wrap: wrap;
    row-gap: 4px;
}

.order-form-card .form-label {
    font-size: var(--font-size-lg);
}

/* ラベル直下の 1 行ヒント（.form-help-text に併記） */
.order-field-hint {
    margin: 0 0 8px;
    line-height: 1.6;
}

/* 入力欄の下の注記 */
.order-field-note {
    margin: 8px 0 0;
    font-size: var(--font-size-small);
    line-height: 1.6;
    color: var(--text-light);
}

.order-input--md {
    max-width: 560px;
}

.order-input--sm {
    max-width: 240px;
}

/* --- 「購入者に公開されます」の印 -------------------- */

.order-scope-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--light-primary-color);
    color: var(--primary-color);
}

/* --- ご注文内容（2 列にして高さを圧縮） -------------- */

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    column-gap: 32px;
    margin: 0;
}

.order-summary-grid .confirm-row {
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: start;
    padding: 10px 0;
}

.order-summary-grid .confirm-row:last-child {
    margin-bottom: 0;
}

/* オプション・備考など長くなる行は全幅にする */
.order-summary-row--wide {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .order-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-summary-grid .confirm-row {
        grid-template-columns: 110px minmax(0, 1fr);
    }
}

/* --- サイトURL（固定部分 + 入力） -------------------- */

.order-url-field {
    display: flex;
    align-items: stretch;
    max-width: 640px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    overflow: hidden;
}

.order-url-field:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--light-primary-color);
}

.order-url-field.is-error {
    border-color: var(--red);
}

.order-url-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-right: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--text-light);
    white-space: nowrap;
}

.order-url-field .form-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    outline: none;
}

@media (max-width: 768px) {
    .order-url-field {
        flex-direction: column;
    }

    .order-url-prefix {
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid var(--gray-300);
    }
}

/* --- 発行枚数・配送枚数の状況表示 -------------------- */

.order-alloc {
    padding: 14px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.order-ship-list + .order-alloc {
    margin-top: 12px;
}

.order-alloc .error {
    margin-top: 8px;
}

.order-alloc-title {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-bold);
}

.order-alloc-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 7px 0;
    border-top: 1px solid var(--gray-300);
}

.order-alloc-title + .order-alloc-row {
    border-top: none;
}

.order-alloc-count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-bold);
}

.order-alloc-state {
    min-width: 120px;
    text-align: right;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-light);
}

.order-alloc-row.is-ok .order-alloc-state {
    color: var(--status-green);
}

.order-alloc-row.is-short .order-alloc-state,
.order-alloc-row.is-over .order-alloc-state {
    color: var(--red);
}

/* 発行枚数の合計行に出す状況（表の中） */
.order-qty-state {
    margin-left: 10px;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-light);
}

.order-qty-state.is-ok {
    color: var(--status-green);
}

.order-qty-state.is-short,
.order-qty-state.is-over {
    color: var(--red);
}

/* --- 配送先（1 枚のカード内の行リスト） -------------- */

.order-ship-group + .order-ship-group {
    padding-top: 22px;
    border-top: 1px solid var(--gray-300);
}

.order-ship-group-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.order-ship-group-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-bold);
}

.order-ship-count {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.order-ship-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.order-ship-row {
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    scroll-margin-top: calc(var(--header-height) + var(--page-header-height) + 24px);
}

.order-ship-row.is-empty {
    border-style: dashed;
    border-color: var(--gray-400);
}

.order-ship-row.is-error {
    border-style: solid;
    border-color: var(--red);
}

.order-ship-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 14px;
}

.order-ship-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light-primary-color);
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.order-ship-name {
    font-weight: 700;
    color: var(--text-bold);
    overflow-wrap: anywhere;
}

.order-ship-address {
    margin-top: 2px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.order-ship-meta {
    margin-top: 4px;
    font-size: var(--font-size-small);
    line-height: 1.6;
    color: var(--text-light);
}

.order-ship-empty-text {
    margin-top: 2px;
    font-size: var(--font-size-small);
    color: var(--text-light);
}

/* 伝票の品名・配送枚数の段 */
.order-ship-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px 24px;
    margin: 14px 0 0 42px;
    padding-top: 14px;
    border-top: 1px dashed var(--gray-300);
}

.order-ship-fields .form-group {
    margin-bottom: 0;
}

.order-form-card .order-ship-fields .form-label {
    font-size: var(--font-size-base);
}

.order-ship-qty-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.order-ship-qty-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.order-ship-qty-item .form-input {
    width: 110px;
}

/* 絵柄が 3 種類以上のとき: 配送枚数を品名の下に全幅で並べる */
.order-ship-fields--stack {
    grid-template-columns: minmax(0, 1fr);
}

.order-ship-fields--stack .order-ship-qty-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px 16px;
}

.order-ship-fields--stack .order-ship-qty-item {
    display: grid;
    grid-template-columns: 3.5em minmax(0, 1fr) auto;
}

.order-ship-fields--stack .order-ship-qty-item .form-input {
    width: 100%;
}

@media (max-width: 768px) {
    .order-ship-row {
        padding: 12px;
    }

    .order-ship-main {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .order-ship-main .order-edit {
        grid-column: 1 / -1;
    }

    .order-ship-fields {
        margin-left: 0;
    }
}

/* --- ご注文前の確認事項（3 枚を 1 枚に統合） ---------- */

.order-notice-item + .order-notice-item {
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
}

.order-notice-title {
    margin-bottom: 6px;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-bold);
}

.order-notice-item p,
.order-notice-item li {
    line-height: 1.8;
}

/* --- 同意・注文ボタン（カード内） -------------------- */

.order-submit-card .order-card-body {
    align-items: center;
    gap: 14px;
    text-align: center;
}

.order-submit-card .order-consent-row {
    margin: 0;
    padding-top: 0;
    border-top: none;
}

.order-submit-card .order-submit-area {
    width: 100%;
}

.order-submit-card .order-submit-btn {
    width: 100%;
    min-width: 0;
    max-width: 360px;
}

.order-submit-card .order-submit-note {
    font-size: var(--font-size-small);
}

/* --- エラー要約（エラー再描画時にフォーム先頭へ出す） -- */

.order-error-summary {
    padding: 16px 20px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--white);
}

.order-error-summary-title {
    font-weight: 700;
    color: var(--red);
}

.order-error-summary-list {
    margin-top: 8px;
    padding-left: 1.4em;
    list-style: disc;
    line-height: 1.9;
}

.order-error-summary-list a {
    color: var(--link-text-color);
    text-decoration: underline;
}

/* --- ヘルプモーダル（.modal-dialog--info の幅違い） ---- */

.modal-dialog--info.order-help-dialog {
    width: 650px;
    max-width: 92vw;
}

/* 画像を大きく見せる説明モーダル（商品名・商品説明） */
.modal-dialog--info.order-help-dialog--wide {
    width: 900px;
}

/* 箇条書きの後ろに続く段落（.modal-info-body p の margin に負けないよう詳細度を上げる） */
.modal-info-body .order-help-after {
    margin-top: 12px;
}

/* --- ヘルプモーダル内の項目説明（ラベル + 説明の行） ---- */

.order-help-rows {
    margin-top: 8px;
    border-top: 1px solid var(--gray-300);
}

.order-help-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 24px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--gray-300);
}

.order-help-row-label {
    font-size: var(--font-size-h5);
    font-weight: 700;
    color: var(--text-bold);
}

.order-help-row-desc {
    margin: 0;
    font-size: var(--font-size-h5);
    line-height: 1.7;
    color: var(--text-base);
}

/* この行リストの見出しだけ、行のラベルより一段大きくする */
.modal-dialog--info.order-help-dialog .modal-info-subtitle {
    font-size: var(--font-size-lg);
}

@media (max-width: 768px) {
    .order-help-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .modal-dialog--info.order-help-dialog .modal-header--info {
        padding: 18px 18px 6px;
    }

    .modal-dialog--info.order-help-dialog .modal-info-body {
        padding: 0 18px 14px;
    }

    .modal-dialog--info.order-help-dialog .modal-info-footer {
        padding: 12px 18px 20px;
    }

    /* 長いラベルが横にはみ出さないよう、狭い画面ではラベルと本文を縦に積む */
    .modal-dialog--info.order-help-dialog .modal-info-list li {
        flex-direction: column;
    }

    .modal-dialog--info.order-help-dialog .modal-info-label {
        white-space: normal;
    }
}





/* =========================
     BackEnd CMS　↓ここから
  ========================= */

/* =========================
     Search bar
  ========================= */

.search-bar {
    margin: 0 auto 14px;
    padding: 14px 14px;
    background: var(--white);
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .search-bar {
        grid-template-columns: 1fr;
    }
}

.search-bar__label {
    font-weight: 700;
    color: var(--text);
}

.search-bar__input {
    outline: none;
    border: none;
}

.search-bar__actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-bar__btn {
    height: 34px;
    padding: 0 20px;
    border-radius: 6px;
    background: var(--primary-color);
    color: var(--white);
}

.search-bar__reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--gray-200);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.search-bar__reset:hover {
    background: var(--gray-300);
}


/* =========================
     Pager
  ========================= */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 18px 0 18px;
}
  
.pager-btn,
.pager-num {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
  
.pager-num.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}
  
.pager-btn[aria-disabled="true"] {
    opacity: .45;
    pointer-events: none;
}

.pager-ellipsis{
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}



/* =========================
     Table
  ========================= */
.table-wrap {
    margin: 0 auto;
    background: var(--white);
    border: var(--table-border-height) solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.table-wrap article {
    padding: 0 24px 24px 24px;
}

@media (max-width: 768px) {
    .table-wrap article {
        padding: 20px 15px 15px 15px;
    }
}

/* ============================
   Table
   ============================ */
.table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

.table th,
.table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.table thead th {
    background: var(--gray-50);
    padding: 10px 12px;
    border-bottom: var(--table-border-height) solid var(--gray-300);
}

.table tbody td {
    border-bottom: var(--table-border-height) solid var(--gray-300);
    font-size: var(--font-size-small);
}

.table tbody td:not(:last-child) {
    padding-left: 10px;
}

@media (max-width: 768px) {
    .table td {
        padding: 0;
    }

    .table-wrap.scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .table tbody tr td {
        padding: 5px;
    }
}

/* 縦の罫線 */
.table th + th,
.table td + td {
    border-left: var(--table-border-height) solid var(--gray-300);
}

.col-num {
    width: 16%;
}

.col-actions {
    width: 18%;
}


form .card {
    margin-bottom: 20px;
}

.form-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center; /* 横中央 */
    gap: 12px;              /* ボタン間の余白 */
}

.estimate-edit div.table-wrap:not(:first-child) {
    margin-top: 20px;
}

.estimate-edit .border-top {
    margin-top: 20px;
}


/* お問合せ */
.thanks-center {
    text-align: center;
    margin: 0 auto;
    margin-bottom: 24px;
}

.thanks-center p {
    font-size: var(--font-size-lg);
}

.thanks-center .page-title {
    font-weight: 700;
    margin: 0 0 16px;
}

.card.contact-thanks {
    max-width: 600px;
    margin: 0 auto;
    gap: 25px;
}

.help {
    font-size: var(--font-size-small);
}

.help-text {
    font-size: clamp(10px, 1.2vw, var(--font-size-small));
    color: var(--gray-600);
}


/* ============================
   ファイルアップロード進捗モーダル
   ============================ */
.upload-progress {
    margin: 16px 0;
}

.upload-progress__bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress__fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.15s linear;
}

.upload-progress__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-base);
}

.upload-error {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 4px;
    background: #fff1f2;
    color: var(--red);
    font-size: 13px;
}

.modal--upload .modal-backdrop {
    cursor: default;
}


/* 問い合わせベルマーク */
.bell-icon {
    color: var(--primary-color);
    font-size: 25px;
    margin-left: 8px;
}

.bell-wrap{
    position: relative;
    display: inline-block;
}

.bell-badge{
    position: absolute;
    right: -8px;
    min-width: 17px;
    line-height: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* マイページリンク右上の未対応バッジ */
.mypage-link-wrap {
    position: relative;
    display: inline-block;
}

.bell-badge--mypage {
    top: -8px;
    right: -16px;
}

/* マイページの注文履歴カード右上の未対応バッジ */
.card-has-badge {
    position: relative;
}

.card-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--white);
}

/* 注文履歴の各アクションボタン右上「要対応」ピル */
.btn-has-badge {
    position: relative;
    overflow: visible;
}

.action-pill-badge {
    position: absolute;
    top: -10px;
    right: -8px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: bold;
    line-height: 20px;
    white-space: nowrap;
    box-shadow: 0 0 0 2px var(--white);
}

/* 問い合わせ詳細 */
.contact-page {
    max-width: 1150px;
    margin-top: 24px;
}

.contact-detail-meta {
    margin-bottom: 12px;
}

.contact-detail-meta .meta-grid {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-detail-meta .meta-grid .inquiry-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 204%;
    gap: 16px;
}

@media (max-width: 768px) {
    .contact-detail-meta {
        padding: 20px 18px;
    }

    .contact-detail-meta.internal .meta-grid {
        grid-template-columns: 1fr;
    }

    .contact-detail-meta .meta-grid .inquiry-info {
        grid-template-columns: 1fr;
    }
}


.contact-detail-meta .meta-k{
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-detail-meta .meta-v{
    color: var(--text-bold);
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-thread{
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.mail-item{
    padding: 16px 18px;
}

.mail-head{
    display:flex;
    justify-content: flex-end;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-50);
    margin-bottom: 10px;
}

.mail-from{
    font-weight: 800;
    color: var(--text-bold);
}

.mail-date{
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
}

.mail-attachments{
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--gray-300);
}

.att-title{
    font-size: var(--font-size-small);
    font-weight: 800;
    color: var(--text-bold);
    margin-bottom: 6px;
}

.att-list{
    margin: 0;
    padding-left: 1.2em;
}

.delete-message {
    color: var(--text-light);
    font-size: var(--font-size-small);
}


.reply-dialog {
    width: min(720px, calc(100% - 24px));
    border: none;
    padding: 0;
    border-radius: 12px;
}

.reply-dialog::backdrop {
    background: rgba(0,0,0,.35);
}

.reply-dialog__inner {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

.reply-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-300);
}

.reply-dialog__title {
    font-weight: 700;
    color: var(--text-bold);
}

.reply-dialog__close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.reply-dialog__body {
    padding: 16px;
}
  
.contact-actions--right{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


.form-actions--right{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.contact-reply {
    margin-top: 18px;
}

.contact-tabs{
    display:flex;
    gap:10px;
    margin-bottom: 20px;
}

.contact-tab{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-base);
    font-weight: 700;
    text-decoration: none;
}

.contact-tab.is-active{
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.contact-note--closed{
    font-size: var(--font-size-small);
    color: var(--text-light);
    padding: 8px 10px;
    border: 1px solid var(--gray-50);
    background: var(--gray-100);
    border-radius: 6px;
}

/* ============================
   問い合わせ一覧テーブル
   ============================ */
.table--inquiry {
    width: 100%;
    table-layout: fixed;
}

.table--inquiry th.col-date,
.table--inquiry td.col-date {
    width: 180px;
    white-space: nowrap;
}

.table--inquiry th.col-customer,
.table--inquiry td.col-customer {
    width: 270px;
}

@media (max-width: 768px) {
    .table--inquiry th.col-customer,
    .table--inquiry td.col-customer {
        width: 100%;
    }
}

.table--inquiry th.col-kind,
.table--inquiry td.col-kind {
    width: 360px;
    white-space: nowrap;
}

.table--inquiry th.col-message,
.table--inquiry td.col-message {
    width: auto;
}

.table--inquiry td.col-message {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--gray-50); }
tr.row-link td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

tr.row-link .contact-type {
    display: flex;
    gap: 10px;
    align-items: center;
}

tr.row-link td .badge-unread.right {
    margin-left: auto;
}


.inquiry-meta-row--status{
    display: flex;
    align-items: flex-end;  /* ラベル/値の下端に揃える */
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 768px) {
    .inquiry-meta-row--status {
        width: 120%;
    }

    .inquiry-info .inquiry-meta-row--status {
        width: 100%;
    }
}

.inquiry-meta-label{
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
}

.inquiry-meta-value{
    margin-top: 6px;
    font-size: var(--font-size-base);
    color: var(--text-bold);
    font-weight: 700;
}

.inquiry-meta-action{
    margin-left: auto;
}

.badge-read{
    display:inline-block;
    padding: 2px 8px;
    font-size: var(--font-size-small);
    border-radius: 4px;
    line-height:1.4;
    background:var(--accent-color);
    color:var(--white);
    vertical-align:middle;
    white-space: nowrap;
}

.badge-unread{
    display:inline-block;
    padding:2px 8px;
    font-size: var(--font-size-small);
    border-radius: 4px;
    line-height:1.4;
    background:var(--red);
    color:var(--white);
    vertical-align:middle;
}

.contact.table-wrap {
    max-width: 1000px;
    align-items: center;
}

.mail-item--row{
    padding: 20px 18px;
}

.mail-row{
    display: grid;
    grid-template-columns: 150px 1px 1fr; /* 左の日付幅は好みで調整 */
    column-gap: 16px;
    align-items: start;
}

.mail-date-col{
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
    white-space: nowrap;
}

.mail-divider{
    background: var(--gray-50);
    width: 1px;
    height: 100%;
}

.mail-body-col{
    min-width: 0; /* 長文折返し安定 */
}

.mail-body{
    line-height: 1.5;
    color: var(--text-base);
    white-space: normal;
    word-break: break-word;
}

.mail-user{
    font-weight: 800;
    color: var(--text-bold);
    line-height: 1.3;
    margin-bottom: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ユーザー名の下の破線 */
.mail-user-divider{
    border-top: 1px dashed var(--gray-300);
    margin-bottom: 8px;
}

/* 左カラム：日付（既存の mail-date-col を使う想定） */
.mail-date-col .mail-date{
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
    white-space: nowrap;
}

.notice {
    color: var(--red);
    font-size: var(--font-size-small);
}

/* PC・共通設定：スマホ用改行タグを隠す */
.sp-only-inline {
    display: none;
}


@media (max-width: 768px) {
    /* 1. テーブル関連要素をブロック化してレイアウトを解除 */
    .table--inquiry,
    .table--inquiry thead,
    .table--inquiry tbody,
    .table--inquiry th,
    .table--inquiry td,
    .table--inquiry tr {
        display: block;
    }

    /* 3. テーブルヘッダー（th）を隠す */
    .table--inquiry .col-kind,
    .table--inquiry .col-date {
        display: none;
    }

    /* 4. 1件ごとの行（tr）をカード風のブロックにする */
    .table--inquiry tbody tr.row-link {
        padding: 15px;
        border-bottom: var(--table-border-height) solid var(--gray-300);
        background: var(--white);
        margin-bottom: 12px;
        /* border-radius: 8px; */
        /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
    }

    .table--inquiry tbody tr.row-link:last-child {
        border-bottom: none;
    }

    /* 5. 各tdのスタイル調整 */
    .table--inquiry > tbody > tr > td {
        padding: 4px 10px;
        border: none;
        /* white-space: normal; */
    }

    /* お問い合わせ種別（1つ目のtd） */
    .table--inquiry td:nth-child(1) {
        font-weight: bold;
        margin-bottom: 4px;
    }

    /* お問い合わせ受付日時（2つ目のtd） */
    .table--inquiry td:nth-child(2) {
        color: var(--text-light);
        margin-bottom: 8px;
    }

    /* 日時の前にラベルを付ける場合（任意） */
    .table--inquiry td:nth-child(2)::before {
        content: "受付日時：";
    }

    /* お問合せ内容（3つ目のtd） */
    .table--inquiry td:nth-child(3) {
        color: var(--text-base);
        background: var(--gray-50);
        padding: 8px 12px;
        border-radius: 4px;
        line-height: 1.5;
    }

    .mail-item--row,
    .mail-row {
        display: block;
    }

    .sp-only-inline {
        display: inline;
    }

    .mail-body {
        margin-top: 15px;
    }

}


/* ============================
   配送先ページ
   ============================ */

/* セクションヘッダー（タイトル + ボタン） */
.section-shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-title.shipping {
    margin-bottom: 0px;
}

/* カードリスト */
.shipping-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* 配送先カード共通 */
.shipping-card {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-50);
    position: relative;
}

/* 選択中のカード */
.shipping-card.is-selected {
    background-color: var(--light-primary-color);
    border-color: var(--primary-color);
    box-shadow: 0px 0px 0px 2px var(--primary-color);
}

/* カード左側（配送先情報） */
.shipping-card-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 479px;
}

/* カード右側（運送会社・時間指定など） */
.shipping-card-right {
    position: relative;
    flex: 1;
    min-height: 206px;
    border-left: 1px solid var(--gray-50);
    padding-left: 33px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width:768px) {
    .shipping-card {
        flex-direction: column;
        gap: 20px;
    }

    .shipping-card-left {
        width: 100%;
    }

    .shipping-card-right {
        border-left: none;
        border-top: 1px solid var(--gray-300);
        padding-left: 0;
        padding-top: 15px;
        width: 100%;
    }
}

/* フィールドグループ */
.shipping-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shipping-field-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-600);
    line-height: 11px;
    padding-bottom: 2px;
}

.shipping-field-kana {
    font-size: 12px;
    color: var(--text-base);
    line-height: 16.8px;
}

.shipping-field-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-bold);
    line-height: 21px;
}

.shipping-field-text-sm {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-bold);
    line-height: 19.5px;
}

/* カードアクションボタン */
.shipping-card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

/* 選択中ラベル */
.shipping-selected-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    padding: 5.5px 12px 7.5px;
}

/* 削除ボタン（ゴミ箱） */
.delete-btn {
    position: absolute;
    top: 8px;
    right: 11px;
    padding: 6px;
    border-radius: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: var(--gray-100);
}

.delete-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ============================
   配送先モーダル
   ============================ */

.modal-shipping .modal-dialog-shipping {
    position: relative;
    max-width: 600px;
    width: 600px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 10px 10px -5px rgba(0, 0, 0, 0.04), 0px 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header-shipping {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-50);
}

.modal-title-shipping {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--text-bold);
    line-height: 1;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-600);
}

.modal-close-btn:hover {
    color: var(--text-bold);
}

.modal-body-shipping {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

@media (max-width: 768px) {
    .modal-header-shipping {
        padding: 0;
    }

    .modal-shipping .modal-dialog-shipping {
        width: 90%;
        max-height: 80vh;
    }

    .modal-body-shipping {
        padding: 0;
    }
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-section-border-top {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--gray-50);
}

.modal-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.modal-section-header i {
    font-size: var(--font-size-h3);
    color: var(--text-bold);
}

.modal-section-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--text-bold);
    line-height: 1;
}

.modal-form-group-mt {
    margin-top: 16px;
}

.modal-form-row {
    display: flex;
    gap: 16px;
}

.modal-form-group-sm {
    flex: 0 0 auto;
    width: 140px;
}

.modal-form-group-flex {
    flex: 1;
}

.modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-bold);
    cursor: pointer;
}

.modal-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.modal-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.modal-proxy-options {
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid var(--gray-50);
}

.modal-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 6px;
}

.modal-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    color: var(--text-bold);
    cursor: pointer;
}

.modal-radio {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.modal-shipper-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.modal-footer-shipping {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-50);
}

.modal-footer-shipping .btn {
    min-width: 120px;
}


.modal-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-subtitle {
    font-weight: 700;
}

/* --- 著作権利用詳細モーダル（.modal-dialog の幅違い） ---- */

.modal-dialog.copyright-detail-dialog {
    width: 300px;
    max-width: 92vw;
}

.modal-dialog.copyright-detail-dialog .modal-header {
    margin-bottom: 20px;
}



/* =========================
   注文履歴
   ========================= */

/* 注文履歴 - 本体 */
.order-history-body {
    display: flex;
}

.order-history-detail {
    flex: 1;
    border-right: 1px solid var(--gray-300);
}

/* 注文履歴 */
.order-history-row {
    display: flex;
    border-bottom: 1px solid var(--gray-300);
    min-height: 60px;
}

.order-history-row:last-child {
    border-bottom: none;
}

.order-history-row__label {
    width: 145px;
    padding: 16px 16px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: var(--font-size-h5);
    color: var(--text-base);
    background-color: var(--gray-50);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .order-history-row__label {
        width: 100px;
        padding: 10px;
    }
}

.order-history-row__content_area {
    display: grid;
    grid-template-columns: 1fr 280px;
    flex: 1;
    min-height: 0;
}

.order-history-row__content {
    flex: 1;
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: var(--font-size-base);
    color: var(--text-base);
    border-left: 1px solid var(--gray-300);
}

.order-history-row__contents {
    display: flex;
}

@media (max-width: 768px) {
    .order-history-row__content_area {
        display: block;
        width: 100%;
    }

    .order-history-row__contents {
        display: block;
        width: 100%;
    }
}

.order-history-row__content--status {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.order-history-row__content--status .form-select {
    width: 250px;
}

.order-history-row__text {
    line-height: 1.6;
}

.order-history-row__sub {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .order-history-row__content--status .form-select {
        width: 100%;
    }

    .order-history-row__sub {
        overflow-wrap: anywhere; /* 長い単語やURLの途中でも安全に折返す */
        /* word-break: normal; */
    }
}

.order-history-row__list {
    margin: 0;
    padding-left: 1.2em;
    list-style: disc;
}

.order-history-row__list li {
    line-height: 1.6;
}

.order-history-row__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-history-row__actions .btn {
    flex-shrink: 0;
}

.order-history-row__status {
    padding: 16px 16px;
    border-left: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .order-history-row__status {
        width: auto;
        border-top: 1px solid var(--gray-100);
        border-left: 1px solid var(--gray-300);
    }
}

.order-history-row__status-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-history-row__status-item {
    display: flex;
    color: var(--text-base);
    align-items: center;
}

.order-history-row__status-value {
    color: var(--text-light);
}

/* ステータスバッジ（共通コンポーネント） */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--text-base);
    font-weight: 500;
    padding: 12px 14px;
    font-size: var(--font-size-small);
    max-width: 100%;
}


.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: var(--gray-600);
    flex-shrink: 0;
}

.badge.active {
    background-color: var(--light-primary-color);
    color: var(--primary-color);
}

.badge-dot.active {
    background-color: var(--primary-color);
}

.badge--danger {
    color: #dc3545;
}

.badge--danger .badge-dot {
    background-color: #dc3545;
}

.badge--warning {
    color: #0d6efd;

}

.badge--warning .badge-dot {
    background-color: #0d6efd;
}

.badge--success {
    color: #198754;
}

.badge--success .badge-dot {
    background-color: #198754;
}

/* 受注詳細: 注文状況バッジのドット色 */
.badge.status-cell--upload-wait .badge-dot {
    background-color: var(--status-orange);
}

.badge.status-cell--data-check .badge-dot {
    background-color: var(--status-yellow);
}

.badge.status-cell--proofing .badge-dot {
    background-color: var(--status-green);
}

.badge.status-cell--layout-check .badge-dot {
    background-color: var(--status-red);
}

.badge.status-cell--approved .badge-dot {
    background-color: var(--status-blue);
}

/* 値 + アイコンラッパー */
.order-history-row__value-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 注文履歴 - 右側アクションボタン */
.order-history-actions-side {
    width: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

/* 注文履歴 - フッターアクション */
.history-actions--order {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 0;
}

.history-actions__group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-actions--order .history-actions__group .btn {
    width: 180px;
}

@media (max-width: 768px) {
    .badge {
        padding: 10px;
    }
    .history-actions--order .history-actions__group .btn {
        width: 150px;
    }
}


.btn-outline-secondary:disabled {
    background: var(--gray-50);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .order-history-body {
        flex-direction: column;
    }

    .order-history-actions-side {
        width: 100%;
        flex-direction: column;
        border-top: 1px solid var(--gray-300);
    }
}


/* ============================
   アセット入稿ページ
   ============================ */


.asset-order-label {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.asset-order-name {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--text-base);
}

.asset-upload-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* ファイル未保存時のドラッグ&ドロップエリア */
.upload-dropzone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background-color: rgba(249, 250, 251, 0.5);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

@media (max-width: 768px) {
    .upload-dropzone {
        flex-direction: column;
    }
}

.upload-dropzone.is-dragover {
    border-color: var(--primary-color);
    background-color: var(--light-primary-color);
}

.upload-dropzone-icon {
    width: 80px;
    height: 80px;
    background-color: var(--gray-100);
    color: var(--gray-600);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.upload-dropzone-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-wrap: anywhere;
}

.upload-dropzone-text-main {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-bold);
}

.upload-dropzone-text-sub {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.upload-dropzone-btn {
    flex-shrink: 0;
}

.upload-dropzone-btn input[type="file"] {
    display: none;
}

/* セパレーター */
.separator {
    border: none;
    border-top: 1px dashed var(--gray-300);
    margin: 0;
}



/* ============================
   コンテンツ入稿ページ
   ============================ */

.content-item-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-item-card {
    flex-direction: row;
    padding: 0px;
    gap: 0px;
}

/* 番号表示部分（左側の帯） */
.content-item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: var(--light-primary-color);
    border-right: 1px solid var(--gray-300);
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--primary-color);
    border-radius: 8px 0 0 8px;
}

.content-item-body {
    position: relative;
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-item-row {
    display: flex;
    gap: 16px;
}

.content-item-type {
    width: 280px;
}

.content-item-name {
    flex: 1;
}

.content-add-area {
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
}

.content-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 9999px;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-add-btn:hover {
    background: var(--gray-50);
}

.content-add-btn i {
    font-size: 18px;
}

/* データ容量バー（固定フッター） */
.data-capacity-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-300);
    box-shadow: 0px -4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 12px 24px;
    z-index: 100;
}

.data-capacity-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 6px;
}

.data-capacity-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-capacity-info i {
    font-size: 16px;
    color: var(--text-base);
}

.data-capacity-label {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-bold);
}

.data-capacity-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.data-capacity-current {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.data-capacity-max {
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--text-light);
}

.data-capacity-progress {
    max-width: 720px;
    margin: 0 auto;
    height: 8px;
    background: var(--gray-300);
    border-radius: 999px;
    overflow: hidden;
}

.data-capacity-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 999px;
    transition: width 0.3s ease;
}



/* ============================
   FAQ（よくある質問）ページ
   ============================ */

.section-label {
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: var(--font-size-h2);
    background: var(--gray-400);
    color: var(--text-bold);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
}

.faq-question-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-q-mark {
    font-weight: 700;
    font-size: var(--font-size-h1);
    color: var(--primary-color);
}

.faq-q-text {
    font-weight: 700;
    font-size: var(--font-size-h3);
    color: var(--text-bold);
    padding-top: 3px;
}

.faq-chevron {
    font-size: 16px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.faq-item.is-open .faq-answer {
    opacity: 1;
}

.faq-answer-inner {
    padding: 16px 0px 20px 0px;
    border-top: 1px solid var(--gray-300);
    margin: 0 50px;
    font-size: var(--font-size-h3);
    line-height: 1.8;
    color: var(--text-base);
}

.faq-contact {
    margin-top: 40px;
    text-align: center;
}

.faq-contact-text {
    color: var(--text-light);
    margin-bottom: 16px;
}

/* --- FAQ 内テーブル（シンプル） --- */
.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 8px;
    font-size: var(--font-size-base);
}

.faq-table th,
.faq-table td {
    border: 1px solid var(--gray-300);
    padding: 8px 12px;
    text-align: center;
}

.faq-table thead th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--text-bold);
}

/* --- FAQ テーブル注釈 --- */
.faq-table-notes {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    font-size: var(--font-size-small);
    color: var(--text-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .faq-answer-inner div {
        overflow-x: auto;
    }

    .faq-table thead th:nth-of-type(1)  {
        min-width: 110px;
    }

    .faq-table thead th:nth-of-type(2) {
        min-width: 125px;
    }

    .faq-table thead th:nth-of-type(3) {
        min-width: 200px;
    }
}


/* --- FAQ 内テーブル（横スクロール） --- */
.faq-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0 0;
}

/* --- シェア対応表 --- */
.faq-share-matrix {
    border-collapse: collapse;
    min-width: 900px;
    width: max-content;
    font-size: var(--font-size-base);
}

.faq-share-matrix th,
.faq-share-matrix td {
    border: 1px solid var(--gray-300);
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
}

.faq-share-matrix thead th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--text-bold);
}

.faq-share-matrix__os {
    font-weight: 700;
    background: var(--gray-50);
}

.faq-share-matrix__left {
    text-align: left;
}


/* ============================
   ガイド系ページ共通（タブ・DLボタン）
   ============================ */

/* --- タブ --- */
.guide-tabs {
    display: flex;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.guide-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-base);
    background: var(--white);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.guide-tab.is-active {
    background: var(--primary-color);
    color: var(--white);
}

/* --- ダウンロードボタン --- */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.download-btn--pdf {
    border: 1px solid #e11d2a;
}

.download-btn--pdf:hover {
    background: #fef2f2;
}

.download-btn--pdf .download-btn__text {
    color: #e11d2a;
}

.download-btn--ai {
    border: 1px solid #ff9a00;
}

.download-btn--ai:hover {
    background: #fff7ed;
}

.download-btn--ai .download-btn__text {
    color: #ff9a00;
}

.download-btn__icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.download-btn__text {
    font-weight: 700;
    font-size: var(--font-size-small);
    line-height: 20px;
    white-space: nowrap;
}

/* ============================
   入稿データガイド（service-guides）
   旧サイトと共通クラス
   ============================ */

.service-guides-section-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 15px;
}

/* 目次アンカーのスクロール位置補正（共通） */
[id].scroll-target {
    scroll-margin-top: calc(var(--header-height) + 150px);
}

.service-guides-section-title {
    padding: 0px 0px 11px;
    position: relative;
}

.service-guides-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.service-guides-section-title-text {
    font-weight: 600;
    color: var(--text-bold);
    font-size: var(--font-size-h1);
    line-height: 1.5;
    margin-bottom: 0;
}

@media ( max-width: 768px) {
    .card.section {
        margin-bottom: 20px;
    }

    .service-guides-section-title-text {
        font-size: var(--font-size-h2);
    }
}

/* --- 目次ボックス --- */
.service-guides-toc {
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 48px;
    width: 100%;
}

.service-guides-toc-title {
    font-weight: 600;
    color: var(--text-bold);
    font-size: var(--font-size-h1);
    margin-bottom: 16px;
}

.service-guides-toc-list {
    display: block;
}

.service-guides-toc-link {
    font-weight: 400;
    color: var(--link-text-color);
    font-size: var(--font-size-base);
    line-height: 24px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    width: fit-content;
    margin-bottom: 8px;
}

.service-guides-toc-link:hover {
    text-decoration: underline;
}

.service-guides-toc-link--sub {
    padding-left: 24px;
    font-size: var(--font-size-base);
    margin-bottom: 6px;
    position: relative;
}

.service-guides-toc-link--sub::before {
    content: "└ ";
    position: absolute;
    left: 8px;
    color: #999;
}

.service-guides-toc-link--sub2 {
    padding-left: 48px;
    font-size: var(--font-size-base);
    margin-bottom: 6px;
    position: relative;
}

.service-guides-toc-link--sub2::before {
    content: "└ ";
    position: absolute;
    left: 32px;
    color: #999;
}

/* --- 注記テキスト --- */
.text-note {
    display: block;
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-bottom: 4px;
}

/* --- 外部サイト誘導カード --- */
.ext-wrap {
    padding: 32px 0;
}

.ext-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--gray-200);
    padding: 48px;
    text-align: center;
    max-width: 672px;
    margin: 0 auto;
}

.ext-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background-color: var(--gray-50);
    color: var(--primary-color);
    margin-bottom: 24px;
    font-size: 28px;
}

.ext-ttl {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 12px;
}

.ext-desc {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.75;
}

.ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 9999px;
    font-weight: 700;
}

.ext-note {
    margin-top: 24px;
    font-size: var(--font-size-small);
    color: var(--text-light);
}


/* ============================
   印刷納期と納品ページ
   ============================ */

/* カードを縦に並べたときの間隔 */
.print-schedule .card + .card {
    margin-top: 24px;
}

.schedule-description {
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.8;
}

/* --- 画像プレースホルダー --- */
.schedule-placeholder {
    background: var(--gray-50);
    border: 2px dashed var(--gray-400);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.schedule-placeholder--tall {
    height: 500px;
}

.schedule-placeholder--wide {
    height: 300px;
}

.schedule-placeholder__icon {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.schedule-placeholder__text {
    font-weight: 700;
    font-size: var(--font-size-base);
    color: var(--gray-600);
}

.schedule-placeholder__sub {
    font-size: var(--font-size-small);
    color: var(--gray-600);
    margin-top: 4px;
}

/* --- セクション画像 --- */
.schedule-image {
    text-align: center;
}

/* 出荷までの流れ図の共通案内バー */
.schedule-flow-note {
    max-width: 640px;
    margin: 20px auto 0;
    padding: 10px 18px;
    border-radius: 5px;
    background: #66615f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.8;
}

.schedule-flow-note a {
    color: var(--soft-accent-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- 補足ノート --- */
.schedule-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: var(--font-size-base);
    color: var(--text-light);
}

/* --- ルールボックス --- */
.rule-box {
    margin-top: 20px;
    padding: 20px 22px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.rule-title {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: var(--font-size-h3);
    font-weight: 700;
}

.rule-list {
    padding-left: 1.2em;
    list-style: disc;   /* reset で list-style:none のため明示 */
    color: var(--text-base);
    font-size: var(--font-size-base);
}

.rule-list li {
    line-height: 1.8;
}

.rule-list li + li {
    margin-top: 6px;
}

/* ルールボックス内の複数セクション（区切り線） */
.rule-box__section + .rule-box__section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-300);
}

/* --- カードグリッド --- */
.schedule-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.schedule-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 24px;
}

.schedule-card__title {
    font-weight: 700;
    font-size: var(--font-size-h3);
    color: var(--text-bold);
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--gray-300);
}

.schedule-card__text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 14px;
    line-height: 1.6;
}

.schedule-card__list {
    margin: 0;
    padding-left: 1.2em;
    list-style: disc;
    margin-bottom: 14px;
}

.schedule-card__list li {
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.8;
}

.schedule-card__note {
    font-size: var(--font-size-small);
    color: var(--gray-600);
}


/* ============================
   サービス選択ページ
   ============================ */

.service-heading {
    text-align: center;
    margin-bottom: 40px;
}

.service-title {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 12px;
}

.service-lead {
    font-size: var(--font-size-base);
    color: var(--text-light);
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    min-height: 400px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(1, 70, 149, 0.1),
                0 10px 10px -5px rgba(1, 70, 149, 0.04);
    border-color: var(--primary-color);
}

.service-card__hover {
    position: absolute;
    inset: 0;
    background: var(--light-primary-color);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover .service-card__hover {
    opacity: 1;
}

.service-card__logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-bottom: 24px;
}

.service-card__logo-img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
}

.service-card__body {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card__desc {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.service-card:hover .service-card__desc {
    color: var(--text-base);
}

.service-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    transition: color 0.3s;
}

.service-card:hover .service-card__cta {
    color: var(--primary-color);
}

.service-card__cta-text {
    font-size: var(--font-size-base);
    font-weight: 700;
}


/* ============================
   サービス紹介ページ（OSHIVO）
   ============================ */

/* 個々のカードのボーダー・丸みを無効化 */
.card[class*="svc-"] {
    border: none;
    border-radius: 0;
}

/* --- ブランドヘッダー --- */
.svc-brand {
    text-align: center;
    padding: 56px 32px;
}

.svc-brand__logo {
    max-height: 60px;
    margin: 0 auto 16px;
}

.svc-brand__tagline {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-base);
    margin-bottom: 40px;
}

.svc-brand__accent {
    color: #eb2784;
}

.svc-brand__desc {
    color: var(--text-base);
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.svc-brand__text {
    font-size: var(--font-size-h2);
}

.marker-highlight {
    background: linear-gradient(transparent 60%, rgba(235, 39, 132, 0.15) 60%);
    padding-bottom: 2px;
    font-weight: bold;
    color: var(--text-bold);
}

/* --- 3つの特徴 --- */
.svc-features {
    background: rgba(255, 20, 147, 0.08);
    padding: 48px 32px;
}

.svc-features__title {
    text-align: center;
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 40px;
}

.svc-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.svc-features__card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--white);
}

.svc-features__icon {
    width: 64px;
    height: 64px;
    background: rgba(235, 39, 132, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #eb2784;
}

.svc-features__card-title {
    font-weight: 700;
    color: var(--text-bold);
    font-size: var(--font-size-h2);
    margin-bottom: 12px;
}

.svc-features__card-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.8;
    text-align: left;
}

/* --- メイン機能のご紹介 --- */
.svc-functions {
    padding: 48px 32px;
    background-image: url('/static/front/img/orderer/dashboard/back_image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.svc-functions__grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 960px;
    margin: 0 auto;
}

.svc-functions__card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--gray-300);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.svc-functions__card--reverse {
    flex-direction: row-reverse;
}

.svc-functions__img-wrap {
    width: 50%;
    flex-shrink: 0;
}

.svc-functions__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.svc-functions__body {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .svc-functions__card {
        display: block;
    }

    .svc-functions__img-wrap {
        width: 100%;
    }

    .svc-functions__body {
        width: 100%;
    }
}

.svc-functions__card-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: #eb2784;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.svc-functions__card-icon {
    color: #eb2784;
    margin-right: 8px;
    font-size: 1.2em;
    -webkit-text-stroke: 1px currentColor;
}

.svc-functions__card-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.8;
}

.svc-functions__callout {
    font-size: var(--font-size-small);
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
}

.svc-functions__cta-btn {
    margin-top: 16px;
    color: #eb2784;
    border-color: #eb2784;
    border-width: 2px;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.svc-functions__cta-note {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-top: 8px;
}



/* --- OSHIVOが選ばれる理由 --- */
.svc-merit {
    background: var(--gray-100);
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
    max-width: 1024px;
    margin: 0 auto;
}

.svc-merit__heading {
    text-align: center;
    margin-bottom: 56px;
}

.svc-merit__heading-badge {
    display: inline-block;
    background: #eb2784;
    color: var(--white);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: var(--font-size-h2);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(235, 39, 132, 0.2);
}

.svc-merit__list {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.svc-merit__row {
    display: flex;
    gap: 48px;
    align-items: center;
    position: relative;
}

@media (max-width: 768px) {
    .svc-merit__row {
        display: block;
    }

    .svc-merit__img {
        margin-bottom: 10px;
    }
}

.svc-merit__row--reverse {
    flex-direction: row-reverse;
}

.svc-merit__number {
    position: absolute;
    font-family: 'Arial', sans-serif;
    font-size: 120px;
    font-weight: 900;
    color: rgba(235, 39, 132, 0.05);
    line-height: 1;
    z-index: 0;
    top: -120px;
    left: -16px;
}

.svc-merit__row--reverse .svc-merit__number {
    left: auto;
    right: -16px;
}

.svc-merit__img-wrap {
    flex: 0 0 45%;
    position: relative;
    z-index: 1;
}

.svc-merit__img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px;
    border: none;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: rotate(2deg);
}

.svc-merit__row--reverse .svc-merit__img {
    transform: rotate(-2deg);
}

.svc-merit__body {
    flex: 1;
    position: relative;
    z-index: 1;
}

.svc-merit__title {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 8px;
}

.svc-merit__subtitle {
    color: #eb2784;
    font-weight: 700;
    margin-bottom: 24px;
}

.svc-merit__text {
    color: var(--text-base);
    line-height: 2;
}

.svc-merit__deco {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.svc-merit__circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(235, 39, 132, 0.03);
}

.svc-merit__circle--top {
    width: 334px;
    height: 334px;
    top: 20px;
    left: 20px;
}

.svc-merit__circle--bottom {
    width: 500px;
    height: 500px;
    bottom: 40px;
    right: 40px;
}

/* --- CTAエリア --- */
.svc-cta {
    text-align: center;
    padding: 76px 32px;
    background: none;
}

.svc-cta__heading {
    font-size: var(--font-size-h1);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 24px;
}

.svc-cta__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.svc-cta__btn.btn-primary {
    padding: 12px 32px;
    border-radius: 4px;
    font-weight: 700;
    background-color: #eb2784;
    border-color: #eb2784;
}

.svc-cta__btn.btn-primary:hover {
    background-color: #d01f73;
    border-color: #d01f73;
}


/* --- AR演出のラインナップ --- */
.svc-ar-lineup {
    padding: 48px 32px;
    background-image: url('/static/front/img/includes/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.svc-ar-lineup__lead {
    text-align: center;
    color: var(--text-base);
    font-size: var(--font-size-base);
    margin-top: -40px;
    margin-bottom: 16px;
}

.svc-ar-lineup__list {
    display: flex;
    flex-direction: column;
    gap: 64px;
    max-width: 960px;
    margin: 0 auto;
}

.svc-ar-lineup__item {
    display: flex;
    gap: 32px;
    align-items: start;
}

.svc-ar-lineup__item--reverse {
    flex-direction: row-reverse;
}

.svc-ar-lineup__phone {
    flex: 0 0 380px;
    display: flex;
    justify-content: center;
}

.svc-ar-lineup__body {
    flex: 1;
}

@media (max-width: 768px) {
    .svc-ar-lineup__item {
        display: block;
    }

    .svc-ar-lineup__body {
        margin: 10px 0;
    }
}


.svc-ar-lineup__badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(235, 39, 132, 0.1);
    color: #eb2784;
    border-radius: 50px;
    font-size: var(--font-size-small);
    font-weight: 700;
    margin-bottom: 8px;
}

.svc-ar-lineup__title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 900;
    color: var(--text-bold);
    margin-bottom: 16px;
}

.svc-ar-lineup__desc {
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.svc-ar-lineup__desc a {
    color: var(--link-text-color);
    font-weight: bold;
    text-decoration: underline;
}

.svc-ar-lineup__cta {
    text-align: center;
    margin-top: 16px;
}

.svc-ar-lineup__cta p {
    color: var(--text-light);
    margin-top: 16px;
    font-size: var(--font-size-small);
}

.svc-ar-lineup__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: var(--white);
    border: 2px solid #eb2784;
    color: #eb2784;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--font-size-lg);
    text-decoration: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.svc-ar-lineup__cta-btn:hover {
    background: rgba(235, 39, 132, 0.04);
    box-shadow: 0 4px 16px rgba(235, 39, 132, 0.15);
    transform: translateY(-2px);
}

.svc-ar-lineup__cta-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(235, 39, 132, 0.1);
}

/* --- AR演出: スマートフォンフレーム --- */
.svc-ar-lineup .smartphone-frame {
    position: relative;
    display: inline-block;
    border: 9px solid var(--frame-color, #202020);
    border-radius: 38px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: visible;
    width: clamp(240px, 70%, 420px);
    margin: 0 auto;
    background: transparent;
}

.svc-ar-lineup .smartphone-frame.frame-gray {
    --frame-color: #202020;
}

.svc-ar-lineup .smartphone-frame .screen {
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    position: relative;
    aspect-ratio: 9 / 19.5;
}

.svc-ar-lineup .smartphone-frame .screen img,
.svc-ar-lineup .smartphone-frame .screen video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.svc-ar-lineup .smartphone-frame .notch {
    position: absolute;
    top: 1.2%;
    left: 50%;
    transform: translateX(-50%);
    width: 35%;
    height: 3.4%;
    background: var(--frame-color, #202020);
    border-radius: 14px;
    z-index: 2;
}

.svc-ar-lineup .smartphone-frame .side-btn {
    position: absolute;
    display: block;
    width: 4px;
    background: var(--frame-color, #202020);
    border-radius: 2px;
    padding: 6px;
}

.svc-ar-lineup .smartphone-frame .side-btn-vol-up {
    left: -12px;
    top: 15%;
    height: 6%;
}

.svc-ar-lineup .smartphone-frame .side-btn-vol-down {
    left: -12px;
    top: 23%;
    height: 6%;
}

.svc-ar-lineup .smartphone-frame .side-btn-power {
    right: -12px;
    top: 20%;
    height: 12%;
}

/* --- AR演出: 動画ラッパー --- */
.svc-ar-lineup .video-wrap {
    position: relative;
}

.svc-ar-lineup .video-wrap .ar-preview {
    display: block;
    width: 100%;
    height: auto;
}

.svc-ar-lineup .video-tap-layer {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 14%;
    cursor: pointer;
    background: transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    z-index: -5;
}

:fullscreen .svc-ar-lineup .video-tap-layer,
:-webkit-full-screen .svc-ar-lineup .video-tap-layer {
    display: none !important;
}

/* --- AR演出: プレビュー・サムネイル --- */
.svc-ar-lineup .cardar-detail__preview {
    margin-bottom: 16px;
    display: flex;
    justify-content: start;
    height: 200px;
}

.svc-ar-lineup .cardar-detail__preview img {
    max-width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    max-height: 200px;
}

.svc-ar-lineup .cardar-detail__thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.svc-ar-lineup .cardar-detail__thumbs .thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.svc-ar-lineup .cardar-detail__thumbs .thumb.active,
.svc-ar-lineup .cardar-detail__thumbs .thumb:hover {
    border-color: #1EBCE9;
}

/* --- AR演出: 制作に必要なデータ --- */
.svc-ar-lineup .cardar-detail__how_create {
    background: var(--light-primary-color);
    border-radius: 4px;
    padding: 16px;
    margin-top: 24px;
}

.svc-ar-lineup .cardar-detail__how_create p {
    font-size: var(--font-size-base);
}

.svc-ar-lineup .how-icon {
    font-size: 22px;
    color: var(--accent-color);
}

.svc-ar-lineup .cardar-detail__how-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-h2);
    font-weight: bold;
    margin: 0 0 12px 0;
}

.svc-ar-lineup .cardar-detail__how-body {
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.svc-ar-lineup .cardar-detail__how-body .how-list {
    margin: 1em 0 0;
    padding-left: 1.2em;
    list-style-type: disc;
    font-size: var(--font-size-base);
}

.svc-ar-lineup .cardar-detail__how-body .how-list li {
    margin-bottom: 1em;
    line-height: 1.6;
}

.svc-ar-lineup .cardar-detail__how_create strong {
    color: var(--text-bold);
    font-weight: bold;
}

.svc-ar-lineup .cardar-detail__how_create a {
    color: var(--link-text-color);
    font-weight: bold;
    text-decoration: underline;
}


/* =========================================================
   Price Summary Panel
   ========================================================= */

/* --- Panel Container --- */
.summary-panel {
    background-color: var(--light-primary-color);
    border-radius: 8px;
    padding: 24px;
    font-size: var(--font-size-base);
    display: flex;
    flex-direction: column;
}

/* --- Section Heading --- */
.summary-heading {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: var(--font-size-h2);
}

/* --- Row List --- */
.summary-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* --- Row --- */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Label --- */
.summary-label {
    color: var(--text-base);
}

/* --- Value --- */
.summary-value {
    color: var(--text-bold);
    font-weight: 600;
}

/* --- Cost Sections --- */
.summary-costs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Cost Item List --- */
.cost-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

/* --- Option Group --- */

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.option-detail {
    font-size: var(--font-size-small);
    color: var(--text-base);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-row {
    display: flex;
    justify-content: space-between;
}

/* --- Last Cost Item --- */
.cost-last {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Calc Box --- */
.calc-box {
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 16px;
}

.calc-upper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--accent-color);
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-small);
}

.calc-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.calc-total.no-pt {
    padding-top: 0;
}

/* --- Deposit List --- */
.deposit-list {
    margin-bottom: 8px;
}

/* --- Calc Label / Value --- */
.calc-label {
    color: var(--text-base);
}

.calc-value {
    color: var(--text-bold);
    font-weight: 600;
}

/* --- Grand Total --- */
.grand-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 3px solid var(--gray-400);
}

.total-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.total-label {
    color: var(--text-base);
    padding-bottom: 4px;
}

.total-amount {
    font-size: var(--font-size-h1);
    font-weight: 600;
    color: var(--primary-color);
}


/* =========================================================
   Detail Rows (Left Column - estimate_list.html)
   ========================================================= */

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    flex-direction: row;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-50);
}

@media (max-width: 768px) {
    .detail-row {
        padding: 10px 0;
        grid-template-columns: 90px 1fr;
    }
}

.detail-action {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-50);
    justify-content: space-between;
}

.action-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.detail-value {
    color: var(--text-bold);
    font-weight: 600;
}

.detail-wrap {
    color: var(--text-bold);
    font-weight: 600;
    line-height: 1.625;
}

.detail-sub {
    font-size: var(--font-size-small);
    color: var(--gray-600);
    margin-top: 2px;
}


/* =========================================================
   Container Overrides
   ========================================================= */

.history-price:has(.summary-panel) {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- 納期目安パネル --- */
.summary-panel--schedule {
    background-color: var(--gray-100);
}


/* =========================================================
   フロント：納期日数目安・課税対象内訳カード
   （見積もり確認 / 注文確認 / 見積もり履歴）
   ========================================================= */

/* --- カードの並び --- */
.est-stack {
    display: grid;
    gap: 16px;
}

.est-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 768px) {
    .est-grid {
        grid-template-columns: 1fr;
    }
}

/* --- カード --- */
.est-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.est-card-body {
    padding: 18px 20px 20px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .est-card-body {
        padding: 16px;
    }
}

.est-card-title {
    margin: 0 0 12px;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

/* 同じカードの中の 2 つ目の見出し（著作権利用料内訳） */
.est-card-title--section {
    margin-top: 24px;
}

/* --- 金額 --- */
.est-amt {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-bold);
}

.est-amt.is-negative {
    color: var(--red);
}

/* --- 小見出し（納期日数の内訳／配送日数（地方別）／納期に関する注意事項） --- */
.est-section-label {
    display: block;
    margin-bottom: 4px;
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--text-bold);
}

/* --- 納期日数目安：最短納期 --- */
.est-hero {
    padding: 12px 16px 14px;
    border-radius: 8px;
    background: var(--light-primary-color);
}

.est-hero-label {
    display: block;
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--primary-color);
}

.est-hero-date {
    display: block;
    margin-top: 2px;
    font-size: var(--font-size-h1-sub);
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.est-hero-cond {
    margin: 6px 0 0;
    font-size: var(--font-size-small);
    line-height: 1.5;
    color: var(--text-base);
}

/* --- 納期日数の内訳 --- */
.est-days {
    margin-top: 14px;
}

/* 最短納期を出さない画面では、見出しのすぐ下に置く */
.est-card-title + .est-days {
    margin-top: 0;
}

.est-days-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 7px 0;
    border-bottom: 1px solid var(--gray-300);
}

.est-days-row:first-of-type {
    border-top: 1px solid var(--gray-300);
}

.est-days-label {
    color: var(--text-base);
}

.est-days-note {
    display: block;
    font-size: var(--font-size-xs);
    line-height: 1.4;
    color: var(--text-light);
}

.est-days-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-bold);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.est-days-value.is-negative {
    color: var(--red);
}

/* --- 配送日数（地方別） --- */
.est-regions {
    margin-top: 14px;
}

.est-region-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 5px 0;
    font-size: var(--font-size-small);
    color: var(--text-base);
}

.est-day {
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--gray-100);
    text-align: center;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
}

.est-day--main {
    background: var(--light-primary-color);
    color: var(--primary-color);
}

.est-region-tag {
    color: var(--text-light);
}

/* --- 納期に関する注意事項 --- */
.est-notes {
    margin: 14px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--gray-300);
}

.est-notes ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.est-notes li {
    position: relative;
    padding-left: 1.2em;
    font-size: var(--font-size-xs);
    line-height: 1.6;
    color: var(--text-light);
}

.est-notes li::before {
    content: "※";
    position: absolute;
    left: 0;
}

/* --- 課税対象内訳：明細 --- */
.est-lines {
    border-top: 1px solid var(--gray-300);
}

.est-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-300);
}

/* オプション料金・データオプション（内訳を下にぶら下げる行） */
.est-line--group {
    display: block;
}

.est-line-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.est-sub {
    display: grid;
    gap: 3px;
    margin-top: 6px;
    padding-left: 12px;
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.est-sub > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.est-sub .est-amt {
    font-weight: 500;
    color: var(--text-light);
}

/* --- 課税対象内訳：集計 --- */
.est-calc {
    margin-top: 10px;
}

.est-calc-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 3px 0;
}

.est-calc-row--total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
}

.est-calc-row--total .est-amt {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

/* --- お見積もり合計 --- */
.est-grand {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 3px solid var(--gray-400);
}

.est-grand-label {
    padding-bottom: 3px;
    color: var(--text-base);
}

.est-grand-amt {
    font-size: var(--font-size-h1);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


.delivery-day-header {
    display: flex;
}

.delivery-day-header button {
    margin-left: auto;
}

.form-label-wrap.row.border-top {
    margin-bottom: 20px;
}




/* =========================================================
   入稿データ確認 - モーダル内カテゴリカード
   ========================================================= */
   .order-data-category-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-data-category-card {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.order-data-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-bold);
    transition: background 0.15s;
    gap: 10px;
}

.order-data-category-link:hover {
    background: var(--gray-100);
    border-radius: 8px;
}

.order-data-category-link--empty {
    color: var(--text-light);
    cursor: default;
}

.order-data-category-link--empty:hover {
    background: transparent;
}

.order-data-category-name {
    font-size: var(--font-size-h3);
    font-weight: 600;
    flex: 1;
}

.order-data-category-link .bi-chevron-right {
    font-size: 14px;
    color: var(--text-light);
}

.order-data-category-empty {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

/* パターングループ */
.order-data-pattern-group {
    margin-bottom: 24px;
}

.order-data-pattern-group:last-child {
    margin-bottom: 0;
}

.order-data-pattern-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

/* ステータスバッジ */
.order-data-category-status {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-left: auto;
    flex-shrink: 0;
}

.order-data-category-status--uploaded {
    color: var(--primary);
    font-weight: 600;
}

.order-data-category-status--checked {
    color: var(--success, #22c55e);
    font-weight: 600;
}

/* =========================================================
   入稿データ確認 - 詳細ページ ファイル一覧
   ========================================================= */
.order-data-file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.order-data-file-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--gray-50);
    gap: 16px;
}

.order-data-file-preview {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-data-file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.order-data-file-info {
    flex: 1;
    min-width: 0;
}

.order-data-file-name {
    font-weight: 600;
    color: var(--text-bold);
    margin-bottom: 4px;
    word-break: break-all;
}

.order-data-file-meta {
    font-size: var(--font-size-small);
    color: var(--text-light);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.order-data-file-desc {
    font-size: var(--font-size-small);
    color: var(--text-base);
    margin-top: 4px;
}

.order-data-file-actions {
    flex-shrink: 0;
}

.order-data-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
}

/* =========================================================
   入稿データ確認 - 詳細ページ リデザイン（CMS）
   ========================================================= */

/* カード内パディング */
.data-detail-card-inner {
    padding: 0 32px;
}

/* ファイルボックス */
.data-detail-file-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--gray-300);
    background-color: rgba(249, 250, 251, 0.5);
    border-radius: 8px;
    padding: 20px;
}

/* ファイル情報エリア */
.data-detail-file-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.data-detail-file-info > div {
    min-width: 0;
}

/* ファイルアイコン（非画像ファイル用） */
.data-detail-file-ico {
    width: 80px;
    height: 80px;
    background-color: var(--light-primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--gray-300);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 36px;
}

/* サムネイル（画像ファイル用） */
.data-detail-file-thumb {
    width: 80px;
    height: 80px;
    background-color: var(--white);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.data-detail-file-thumb img,
.data-detail-file-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 配送伝票確認: 納品書ボックスのPDFアイコン */
.delivery-note-pdf-ico {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.data-detail-file-thumb--video {
    position: relative;
}

.data-detail-file-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
}

a.data-detail-file-thumb,
a.data-detail-file-ico {
    display: flex;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

a.data-detail-file-thumb:hover,
a.data-detail-file-ico:hover {
    opacity: 0.8;
}

/* ファイル名 */
.data-detail-file-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bold);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* メタ情報 */
.data-detail-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    font-size: var(--font-size-small);
    color: var(--text-light);
}

/* アクションボタン列 */
.data-detail-file-acts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 192px;
    flex-shrink: 0;
}

.data-detail-file-acts .btn {
    width: 100%;
}

.data-detail-file-acts label.btn input[type="file"] {
    display: none;
}

/* 差し替えファイル名表示 */
.data-detail-file-selected {
    font-size: var(--font-size-small);
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.order-data-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .data-detail-file-meta {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;

    }
    .data-detail-file-box {
        display: block;
    }

    .data-detail-file-acts {
        width: 100%;
        margin-top: 10px;
        /* display: block; */
        display: flex;
    }

    .data-detail-file-selected {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .order-data-header {
        display: flex;
        flex-direction: column;
    }
}

/* =========================================================
   シリアル登録画面
   ========================================================= */

.serial-list-table-wrap {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.serial-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-small);
}

.serial-list-table thead {
    position: sticky;
    top: 0;
    background: var(--gray-100);
    z-index: 1;
}

.serial-list-table th,
.serial-list-table td {
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.serial-list-th-no,
.serial-list-td-no {
    width: 60px;
    color: var(--text-light);
}

/* ============================================================
   入稿データ確認サイドバー
   ============================================================ */
.asset-sidebar-back {
    padding: 8px 16px 12px;
}

.asset-sidebar-back-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.15s;
}

.asset-sidebar-back-link:hover {
    color: var(--primary-color);
}

.asset-sidebar-back-link i {
    font-size: 20px;
}

.asset-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.asset-sidebar-pattern-title {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-sidebar-pattern-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--light-primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.asset-sidebar-sections {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asset-sidebar-sections > li {
    display: flex;
    align-items: stretch;
}

.asset-sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    flex: 1;
    min-width: 0;
}

/* サイドバー各項目の個別「確認完了」ボタン（印刷データ確認 / コンテンツデータ確認） */
.asset-sidebar-confirm-btn {
    align-self: center;
    margin-right: 12px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary-color);
    background: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.asset-sidebar-confirm-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.asset-sidebar-link:hover {
    background: var(--gray-100);
}

.asset-sidebar-link--active {
    background: var(--light-primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.asset-sidebar-link-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-sidebar-status--checked {
    color: var(--primary-color);
    font-size: 20px;
    width: 24px;
}

.asset-sidebar-status--pending {
    color: var(--gray-300);
    width: 24px;
    font-size: 20px;
}

.asset-sidebar-badge-nocheck {
    font-size: 10px;
    background: var(--gray-300);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* コンテンツ追加ボタン（サイドバー内） */
.asset-sidebar-add {
    padding: 4px 16px 8px;
}

.asset-sidebar-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    font-size: 13px;
    color: var(--primary-color);
    background: none;
    border: 1px dashed var(--light-primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.asset-sidebar-add-btn:hover {
    background: var(--light-primary-color);
}

.asset-sidebar-add-btn i {
    margin-right: 4px;
}

/* 容量ゲージ（サイドバーフッター） */
.asset-sidebar-storage {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
    flex-shrink: 0;
}

.asset-sidebar-storage-header {
    display: block;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bold);
    margin-bottom: 6px;
}

.asset-sidebar-storage-header i {
    margin-right: 4px;
}

.asset-sidebar-storage-value {
    color: var(--primary-color);
}

.asset-sidebar-storage-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.asset-sidebar-storage-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s;
}

.asset-sidebar-storage-bar-fill--danger {
    background: #ef4444;
}

.asset-sidebar-storage-note {
    font-size: 10px;
    color: var(--text-light);
    margin: 0;
}

/* 絵柄（種別）紐付けチェックボックス */
.content-pattern-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.content-pattern-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}


.content-pattern-link-item--active {
    border-color: var(--primary-color);
}

/* 2カラムフォーム行 */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .form-row-2col {
        grid-template-columns: 1fr;
    }
}


/* 著作権フィールドグループ */
.js-copyright-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-label-sm {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

/* 削除エリア */
.form-group--danger {
    display: flex;
    justify-content: flex-end;
}

.btn-text-danger {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}

.btn-text-danger:hover {
    background: #fef2f2;
}

/* サイトページ選択モーダル */
.sitepage-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sitepage-row {
    display: flex;
    align-items: center;
    gap:20px;
    padding: 0.8rem 1.2rem;
}

.sitepage-row + .sitepage-row {
    border-top: 1px solid #eee;
}

.sitepage-row__label {
    font-weight: bold;
}


/* =========================================================
   PDFローディング画面用
   ========================================================= */


.pdf-loading-overlay[hidden] {
    display: none !important;
}

.pdf-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.35);
    backdrop-filter: blur(4px);
    z-index: 9999;

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

.pdf-loading-card {
    width: 320px;
    padding: 28px 24px;

    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4mm;

    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    text-align: center;
}

.pdf-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;

    border-radius: 50%;
    border: 4px solid var(--gray-400);
    border-top-color: var(--primary-color);

    animation: pdfSpin 0.9s linear infinite;
}

.pdf-loading-title {
    font-size: var(--font-size-h3);
    font-weight: 800;
    color: var(--text-bold);
    margin-bottom: 6px;
}

.pdf-loading-text {
    font-size: var(--font-size-base);
    color: var(--text-light);
    line-height: 1.6;
}

@keyframes pdfSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   絵柄ごとの発行枚数フォーム
   =========================== */
.pattern-distribution-mode {
    display: flex;
    gap: 24px;
    align-items: center;
}

.pattern-quantities-wrap {
    margin-top: 12px;
    display: none;
}

.pattern-quantities-wrap.is-active {
    display: block;
}

.pattern-quantities-table {
    width: 100%;
    max-width: 480px;
}

.pattern-quantities-table th {
    text-align: left;
    padding: 6px 12px 6px 0;
    font-weight: normal;
}

.pattern-quantities-table td {
    padding: 6px 0;
}

.pattern-quantity-input {
    max-width: 160px;
}

/* サイトURL入力 */
.site-url-input-row {
    margin-bottom: 12px;
}

.site-url-pattern-label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

/* 納品配送先の枚数入力 */
.delivery-quantities-section {
    margin-top: 16px;
}

.delivery-quantities-common,
.delivery-quantities-per-pattern {
    display: none;
}

.delivery-quantities-common.is-active,
.delivery-quantities-per-pattern.is-active {
    display: block;
}

.delivery-quantity-common-input,
.delivery-quantity-pattern-input {
    max-width: 160px;
}

.option-list .item-field,
.err-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
}

.option-qty .form-input {
    width: 400px;
}

.item-field .option-check span {
    min-width: 150px;
}

@media (max-width: 1040px) {
    .option-qty .form-input {
        width: auto;
        min-width: 100px;
    }
}


/* ============================
   発注後にやることページ
   ============================ */

   .after-order-lead {
    font-size: var(--font-size-base);
    color: var(--text-light);
    margin-bottom: 24px;
}

/* --- フロー図（2カラム） --- */
.after-order-flow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .after-order-flow-grid {
        margin-top: 0;
        grid-template-columns: 1fr;
    }
}

.after-order-flow-title {
    font-weight: 700;
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.after-order-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.after-order-flow-step {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-base);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* フロー図のステップチップ（対応する詳細ステップへのアンカー） */
a.after-order-flow-step {
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease;
}

a.after-order-flow-step:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.after-order-flow-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-small);
    flex-shrink: 0;
}


.after-order-flow-arrow {
    text-align: center;
    color: var(--gray-400);
    font-size: var(--font-size-small);
    line-height: 1;
}

/* --- ステップカード --- */
.after-order-steps-card {
    padding: 0;
    gap: 0;
}

/* ステップカード（padding:0）内のセクションヘッダー用ラッパー */
.after-order-steps-head {
    padding: 28px 24px 0;
}

/* セクションカード内の小セクション区切り（納品書のダウンロードなど） */
.after-order-subsection + .after-order-subsection {
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.after-order-step {
    display: flex;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.after-order-step:last-child {
    border-bottom: none;
}

.after-order-step-imgs {
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

@media (max-width: 768px) {
    .after-order-step {
        flex-direction: column;
    }

    /* 1. 親要素を横スクロールコンテナに変更 */
    .after-order-step-imgs {
        align-items: center;
        overflow-x: auto; /* 横スクロールを許可 */
        -webkit-overflow-scrolling: touch; /* iOSで滑らかにスクロール */
        padding-bottom: 12px; /* スクロールバーとの余白 */
        width: 100%;
        flex-direction: row;
        /* 1コマずつピタッと止まるスナップスクロール（任意ですが操作性が上がります） */
        scroll-snap-type: x mandatory;
    }

    /* 2. 画像ボックスのサイズ調整（右端を見切れさせる設定） */
    .after-order-step-img {
        flex: 0 0 75%; /* 幅を75%に指定し、画面右端に次の要素を25%見切れさせる */
        max-width: 280px; /* 広がりすぎ防止 */
    }

    .after-order-step-img.arrow {
        flex: 0 0 100%;
    }

    /* 3. 矢印アイコンの向きと位置調整 */
    .after-order-step-imgs-arrow {
        flex: 0 0 auto;
        margin: 0 8px;
        transform: rotate(-90deg); /* 縦矢印(↓)を横矢印(→)に回転させる */
    }

    /* 4. スクロールバーを可視化して「スクロールできる」ことを提示 */
    .after-order-step-imgs::-webkit-scrollbar {
        height: 6px; /* スクロールバーの太さ */
    }

    .after-order-step-imgs::-webkit-scrollbar-track {
        background: var(--gray-100, #f1f5f9); /* トラック背景色 */
        border-radius: 3px;
    }

    .after-order-step-imgs::-webkit-scrollbar-thumb {
        background: var(--gray-400, #cbd5e1); /* バーの色 */
        border-radius: 3px;
    }
}

.after-order-step-imgs-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    margin: 6px 0;
}

.after-order-step-img {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    background: var(--gray-50);
}

.after-order-step-img img {
    width: 100%;
    display: block;
}

.after-order-step-body {
    flex: 1;
    min-width: 0;
}

.after-order-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
}

@media (max-width: 768px) {
    .after-order-step-header {
        border-bottom: none;
    }

    .after-order-step-img img {
        height: 190px;
    }
}

.after-order-step-title {
    font-weight: 700;
    font-size: var(--font-size-h2);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.after-order-step-num {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.after-order-step-badge {
    background: #EFF6FF;
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #BFDBFE;
    white-space: nowrap;
}

.after-order-step-notice {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--font-size-base);
    color: var(--primary-color);
}

.after-order-step-notice i {
    margin-top: 2px;
    flex-shrink: 0;
}

.after-order-step-notice p {
    margin: 0;
}

.step-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

/* 説明文中の強調（色＋マーカー風の下線） */
.step-strong {
    color: var(--primary-color);
    font-weight: 700;
    background: linear-gradient(transparent 68%, var(--soft-accent-color) 68%);
    padding: 0 2px;
}

/* 説明文中のテキストリンク */
.step-list a {
    color: var(--link-text-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ステップ内の詳細ページ誘導ボタン */
.after-order-step-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* --- 発注後にやること詳細ページ（order_guide_detail） --- */
/* パネル内の本文リード（pd-panel-desc は補足用の小さい文字のため使わない） */
.ogd-desc {
    color: var(--text-base);
    font-size: var(--font-size-base);
    line-height: 1.8;
    margin: 0 0 16px;
}

.ogd-desc:last-child {
    margin-bottom: 0;
}

/* 詳細ページの手順画像は横幅制限なしで大きく見せる */
.ogd-page .pdg-step-img {
    max-width: none;
}

.step-list li {
    font-size: var(--font-size-base);
    color: var(--text-base);
    line-height: 1.8;
    margin-bottom: 4px;
}

/* --- その他カード --- */
.after-order-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.after-order-sub-title {
    font-weight: 700;
    font-size: var(--font-size-h3);
    color: var(--text-bold);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.after-order-sub-badge {
    background: var(--gray-100);
    color: var(--text-light);
    font-size: var(--font-size-small);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--gray-300);
}

/* --- 前提説明ボックス --- */
.premise {
    background: var(--white);
    border: 4px solid var(--gray-400);
    border-radius: 8px;
    padding: 24px 28px;
}

@media (max-width: 768px) {
    .premise {
        margin-bottom: 20px;
    }
}

.premise-title {
    font-weight: 700;
    font-size: var(--font-size-h2);
    color: var(--text-bold);
    margin: 0 0 16px;
}

/* --- ステップ画像の拡大モーダル --- */
/* トリガー（ステップ画像のクリック領域） */
.after-order-step-img {
    position: relative;
    cursor: zoom-in;
}

.after-order-step-img:hover img {
    opacity: .85;
}

.after-order-step-img::after {
    content: "クリックで拡大";
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--gray-300);
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

/* モーダル本体（高さ固定。画像切替でサイズが変わらないようにする） */
.modal-dialog--step-image {
    width: min(1180px, calc(100vw - 48px));
    height: min(92vh, 960px);
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.step-image-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 14px 22px;
    border-bottom: 1px solid var(--gray-300);
}

.step-image-modal__eyebrow {
    margin: 0 0 2px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.step-image-modal__title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h2);
    font-weight: 700;
}

.step-image-modal__body {
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-rows: 100%;
    flex: 1;
    min-height: 0;
}

.step-image-modal__visual {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    background: var(--white);
    border-right: 1px solid var(--gray-300);
}

.step-image-modal__image-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
}

.step-image-modal__image {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.step-image-modal__image img {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 768px) {
    .step-image-modal__body {
        grid-template-columns: 1fr;
    }

    .step-image-modal__image {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        justify-content: left;
    }

    .step-image-modal__image img {
        height: 100%;
        max-width: none;
    }
}

.step-image-modal__nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    padding: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: var(--primary-color);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(32, 50, 92, .12);
    transform: translateY(-50%);
}

.step-image-modal__nav--prev {
    left: 14px;
}

.step-image-modal__nav--next {
    right: 14px;
}

.step-image-modal__nav:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.step-image-modal__nav:disabled {
    opacity: .28;
    cursor: default;
}

.step-image-modal__footer {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .step-image-modal__footer {
        justify-content: center;
    }
}

.step-image-modal__pager {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.step-image-modal__pager-button {
    min-width: 72px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
    cursor: pointer;
}

.step-image-modal__pager-button:hover:not(:disabled) {
    background: var(--gray-50);
}

.step-image-modal__pager-button:disabled {
    opacity: .35;
    cursor: default;
}

.step-image-modal__counter {
    min-width: 54px;
    text-align: center;
    color: var(--text-light);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.step-image-modal__detail {
    overflow-y: auto;
    padding: 24px 24px 28px;
}



/* ============================
   フロント見積もり作成画面STEP2のUI変更
   ============================ */

.base-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 18px;
    margin-top: 8px;
}

.base-type-item {
    text-align: center;
}

/* label全体 */
.base-type-card {
    display: block;
    position: relative;
    cursor: pointer;
}

/* radio本体は見せない */
.base-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* 画像エリア */
.base-type-card__image {
    position: relative;
    border-radius: 18px;
    overflow: hidden;

    /* ベースの立体感 */
    box-shadow:
        0 8px 18px rgba(0,0,0,0.12),
        inset 0 1px 2px rgba(255,255,255,0.6),
        inset 0 -3px 6px rgba(0,0,0,0.08);
}

/* 👇これが缶っぽさの本体（ツヤ） */
.base-type-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;

    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,0.6) 0%,
            rgba(255,255,255,0.25) 15%,
            rgba(255,255,255,0.05) 35%,
            rgba(255,255,255,0) 60%
        );

    pointer-events: none;
}

/* 画像 */
.base-type-card__image img {
    width: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

/* 名前 */
.base-type-name {
    margin-top: 20px;
    font-size: var(--font-size-h2);
    font-weight: 600;
    line-height: 1.45;
    color: var(--primary-color);
    transition: color .18s ease;
}

/* hover */
.base-type-card__image {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.base-type-card:hover .base-type-card__image {
    transform: translateY(-3px);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.14),
        inset 0 2px 3px rgba(255,255,255,0.95),
        inset 0 -4px 7px rgba(0,0,0,0.12);
}

/* 選択中 */
.base-type-card:has(input[type="radio"]:checked) .base-type-card__image {
    box-shadow:
        0 0 0 4px rgba(1, 70, 149, 0.14),
        0 14px 28px rgba(1, 70, 149, 0.18),
        inset 0 2px 3px rgba(255,255,255,0.95),
        inset 0 -4px 7px rgba(0,0,0,0.12);
}

.base-type-card:has(input[type="radio"]:checked) + .base-type-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* スマホ用 */
@media (max-width: 960px) {
    .base-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .base-type-grid {
        grid-template-columns: 1fr;
    }

    .base-type-card__image img {
        height: 100%;
        object-fit: contain;
    }
}

/* ============================
   商品詳細ページ
   ============================ */
.product-detail-layout {
    display: grid;
    grid-template-columns: 84px minmax(0, 345px) minmax(320px, 1fr);
    gap: 32px;
    align-items: start;
}

/* サムネイル内の動画コンテナ */
.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    overflow: hidden;
}

.video-thumb-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* サムネイル枠いっぱいに表示 */
}

/* 動画の上に重ねる再生アイコン */
.video-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    pointer-events: none; /* クリックを邪魔しない */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* メイン表示エリアのビデオ要素 */
.main-video-element {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* 左：画像まわり */
.product-gallery {
    display: contents;
}

.product-gallery__thumb {
    width: 100%;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
    overflow: hidden;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-gallery__thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-gallery__thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.product-gallery__thumb.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 70, 149, 0.12);
}

/* メイン画像（中央） */
.product-gallery__main {
    border: 1px solid var(--gray-300);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    align-self: start;
}

.product-gallery__main img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-detail-info__header {
    margin-bottom: 14px;
}

.product-detail-info__title {
    /* color: var(--text-bold); */
    margin-bottom: 8px;
}

.product-detail-info__lead {
    line-height: 1.8;
    color: var(--text-base);
    margin-bottom: 20px;
}

.product-detail-summary {
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 22px;
    background: var(--white);
}

.product-detail-summary__row {
    display: grid;
    grid-template-columns: 100px 1fr;
}

.product-detail-summary__row + .product-detail-summary__row {
    border-top: 1px solid var(--gray-300);
}

.product-detail-summary__label {
    background: var(--gray-50);
    padding: 12px 12px;
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--text-base);
    border-right: 1px solid var(--gray-300);
}

.product-detail-summary__value {
    padding: 12px 14px;
    color: var(--text-bold);
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* 複数項目を ・ 付きで表示するリスト(対応機能・素材で使用) */
.product-detail-summary__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-detail-summary__list li {
    padding-left: 1em;
    text-indent: -1em;
}

.product-detail-summary__list li::before {
    content: "・";
}

/* サイズ表（変動サイズ商品で使用） */
.product-detail-summary__value .size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-small);
    font-weight: 500;
}

.product-detail-summary__value .size-table th,
.product-detail-summary__value .size-table td {
    border: 1px solid var(--gray-300);
    padding: 6px 8px;
    text-align: center;
    line-height: 1.5;
    font-weight: bold;
    color: var(--text-bold);
}

.product-detail-summary__value .size-table thead th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--text-base);
    white-space: nowrap;
}

.product-detail-summary__value .size-table tbody td {
    background: var(--white);
}

/* 素材別サイズ表（カードグッズで使用・ヘッダなし、1行ずつ横線区切り） */
.product-detail-summary__value .size-material-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-small);
}

.product-detail-summary__value .size-material-table td {
    padding: 8px 0;
    text-align: left;
    font-weight: bold;
    color: var(--text-bold);
    line-height: 1.5;
}

.product-detail-summary__value .size-material-table td:first-child {
    width: 58%;
}

.product-detail-summary__value .size-material-table tr + tr td {
    border-top: 1px solid var(--gray-300);
}

/* PIN選択 */
.product-detail-pin {
    margin-bottom: 22px;
}

/* CTA */
.product-detail-action {
    margin-bottom: 24px;
}

.product-detail-action .btn {
    width: 100%;
}

.product-detail-action .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-gallery {
        display: block;
    }

    .product-gallery__main {
        margin-bottom: 12px;
    }

    .product-gallery__thumbs {
        flex-direction: row;
        gap: 10px;
    }

    .product-gallery__thumb {
        flex: 1 1 0;
    }

    .product-gallery__thumb img {
        aspect-ratio: 3 / 4;
    }
}

/* No Image用のプレースホルダー */
.no-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-400);
    border: 1px dashed var(--gray-300);
    border-radius: 16px; /* 親要素に合わせる */
    position: relative;
    overflow: hidden;
}

.base-type-card__image .no-image-placeholder {
    height: 300px;
}

/* 既存の缶バッジ風ツヤ感を継承 */
.no-image-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0.4) 0%,
        rgba(255,255,255,0) 50%
    );
    pointer-events: none;
}

.no-image-placeholder i {
    font-size: 48px;
    line-height: 1;
}

.no-image-placeholder span {
    font-size: var(--font-size-small);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}



/* =========================================================
   配送伝票管理ページ
   ========================================================= */

.slip-section {
    margin-top: 24px;
}

.slip-section-header {
    margin-bottom: 16px;
}

.slip-section-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--text-bold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.slip-section-title i {
    color: var(--primary-color);
}

.slip-card {
    margin-top: 12px;
}

.slip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slip-card-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--primary-color);
}

/* 配送先情報 */
.slip-address-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.slip-address-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
}

.slip-address-label {
    font-size: var(--font-size-small);
    color: var(--text-light);
    min-width: 110px;
    flex-shrink: 0;
}

.slip-address-value {
    font-size: var(--font-size-base);
    color: var(--text-bold);
    font-weight: 500;
}

/* 伝票画像サムネイル（大きめ表示） */
.data-detail-file-ico.slip {
    width: 160px;
    height: 160px;
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    overflow: hidden;
}

.data-detail-file-ico.slip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* PDFサムネ：PDF.jsで1ページ目を描画 */
.data-detail-file-ico.slip canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

@media (max-width: 768px) {
    .slip-address-info {
        grid-template-columns: 1fr;
    }
}


/* ============================
   絵柄画像 アップロード / プレビュー
   ============================ */

.pattern-body {
    display: flex;
    gap: 20px;
}

.pattern-file-col {
    flex: 1;
    min-width: 0;
}

/* 保存済み画像プレビューボックス */
.image-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--gray-300);
    background-color: rgba(249, 250, 251, 0.5);
    border-radius: 8px;
    width: 220px;
    height: 220px;
}

.image-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.image-preview-box .image-dropzone-preview {
    max-height: 150px;
}

.image-preview-box .data-detail-file-acts {
    margin-top: 4px;
}

/* 画像未登録時のプレースホルダ */
.image-empty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
    border: 1px dashed var(--gray-400);
    border-radius: 8px;
    background-color: rgba(249, 250, 251, 0.5);
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
}

/* 画像アップロード用ドラッグ&ドロップエリア */
.image-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px dashed var(--gray-400);
    border-radius: 8px;
    background-color: rgba(249, 250, 251, 0.5);
    cursor: pointer;
    width: 220px;
    height: 220px;
}

.image-dropzone.is-dragover {
    border-color: var(--primary-color);
    background-color: var(--light-primary-color);
}

.image-dropzone-hint {
    font-size: var(--font-size-h5);
    color: var(--text-light);
    text-align: center;
    line-height: 1.6;
}

.image-dropzone-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}


/* 入稿データ確認 集約ページのアンカー位置調整（プリンター側・バックエンド側で共通） */
.asset-section {
    scroll-margin-top: calc(var(--header-height) + 200px);
}

/* ヘッダー右側の一括チェック（POST フォーム）をボタンと同じ並びにする */
.header-inline-form {
    display: inline;
    margin: 0;
}

/* モバイル幅ではヘッダーのボタンが縦積みになるので、ラベルが途中で折り返さないようにする */
@media (max-width: 768px) {
    .page-header-inner div.header-right .btn {
        white-space: nowrap;
    }
}


/* ============================
   本番シリアル 識別ラベル
   ============================ */

/* 横並びレイアウトのパターンヘッダー（タイトル左 / ラベル右） */
.order-data-pattern-header--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.order-data-pattern-header--row .order-data-pattern-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 識別ラベル ラッパー（編集／表示 共通） */
.pattern-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* 識別ラベル 入力（バックエンド側） */
.pattern-label__input {
    width: 48px;
    text-align: center;
    padding: 4px 6px;
}

/* 識別ラベル 表示バッジ（プリンター側） */
.pattern-label__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: var(--gray-50);
    font-weight: 700;
}

.information {
    margin-bottom: 38px;
}

.information .list-row {
    display: grid;
    grid-template-columns: 140px 15px 1fr;
}

@media (max-width: 768px) {
    .information .list-row {
        grid-template-columns: 1fr;
    }
}

.information-new {
    margin: 0 auto;
    color: var(--red);
    font-weight: 700;
    padding: 10px 6px;
    letter-spacing: 0.5px;
}

.information-date {
    border-radius: 10px;
    padding: 10px;
    background-color: var(--gray-100);
}

@media (max-width: 768px) {
    .information-date {
        border-radius: 20px;
        background-color: var(--primary-color);
        color: var(--white);
        padding: 5px 10px;
        margin-bottom: 5px;
        font-weight: 700;
        width: fit-content;
    }
}

.information .list-text {
    margin: auto 0;
}

.estimate-action-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;

}

/* =========================================================
   テーブルヘッダー固定（親要素競合対策版）
   ========================================================= */

/* 1. 【新設】一番外側のスクロールコンテナ */
.js-table-sticky-wrapper {
    max-height: calc(100vh - 250px); /* 画面の高さ（縦幅）に合わせて自動追従（250pxはヘッダー分の余白） */
    overflow-y: auto;                /* 縦スクロールをここで発生させる */
    overflow-x: auto;                /* 横スクロールも安全にここで処理 */
    position: relative;              /* sticky th の絶対的な基準点にする */
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.cell-180px {
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

.cell-280px {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
}

.cell-140px {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.cell-150px {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.cell-130px {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.cell-125px {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
}

.cell-110px {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}

.cell-80px {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.col-sticky-right {
    width: 185px;
    min-width: 185px;
    max-width: 185px;
}

@media (max-width: 768px) {
    .sp-cell-100px {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    .sp-cell-300px {
        width: 300px;
        min-width: 300px;
        max-width: 300px;
    }
}

.printer.col-sticky-right {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
}

/* 2. テーブルを包む内側のラッパー（既存の枠線を活かす） */
.table-wrap.estimate-table-wrap {
    border: none;      /* 外枠は一番外側のコンテナに任せるため消す */
    border-radius: 0;
    overflow: visible;
}

/* 3. テーブル本体 */
.estimate-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.estimate-table thead {
    position: sticky;
    top: 0;
}

/* 4. ヘッダー共通設定 */
.estimate-table thead th {
    background-color: var(--gray-50); /* 透け防止 */
    border-bottom: var(--table-border-height) solid var(--gray-300);
}

.estimate-table tbody tr:nth-child(even of .estimate-row-main) td {
    background-color: var(--light-primary-color)
}

.estimate-table tbody tr:nth-child(odd of .estimate-row-main) td {
    background-color: var(--white)
}

/* 2. 色がついた偶数番目の上段の「すぐ下にある下段（estimate-row-sub）」にも同じ色をつける */
.estimate-table tbody tr:nth-child(even of .estimate-row-main) + tr.estimate-row-sub td {
    background-color: var(--light-primary-color)
}

.estimate-table tbody tr:nth-child(odd of .estimate-row-main) + tr.estimate-row-sub td {
    background-color: var(--white)
}

.estimate-table tbody tr.estimate-row-sub td {
    border-top: none;
}

/* 受注一覧: ステータス色分け（受注日時・ステータスtdの左ボーダー） */
td.status-cell--upload-wait {
    border-left: 4px solid var(--status-orange);
}

td.status-cell--data-check {
    border-left: 4px solid var(--status-yellow);
}

td.status-cell--proofing {
    border-left: 4px solid var(--status-green);
}

td.status-cell--layout-check {
    border-left: 4px solid var(--status-red);
}

td.status-cell--approved {
    border-left: 4px solid var(--status-blue);
}

.force-wrap {
    word-break: break-all;     /* 1. 英数字を文字単位で強制折り返し */
    overflow-wrap: break-word; /* 2. 念のためURLなどの超長文の保険（旧: word-wrap） */
}

.check-box-form .form-wrap input[type="checkbox"] {
    /* 1. ブラウザ標準の見た目を一旦完全に消す（これを入れないとサイズが変わりません） */
    -webkit-appearance: none;
    appearance: none;

    /* 2. 自由なサイズを指定する */
    width: 24px;
    height: 24px;

    /* 3. 外枠のデザインを自分で付け直す */
    border: 2px solid var(--gray-300); /* 既存のCSS変数に合わせる場合 */
    border-radius: 4px;
    background-color: var(--white);

    /* 4. 位置調整（テキストと中央揃えにするため） */
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

/* 5. 【重要】チェックが入ったときの見た目も自分で指定する */
.check-box-form .form-wrap input[type="checkbox"]:checked {
    background-color: var(--primary-color); /* チェック時に青くする */
    border-color: var(--primary-color);

    /* 中にレ点（チェックマーク）を入れる簡易的な方法 */
    position: relative;
}

.check-box-form .form-wrap input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 16px; /* チェックマークの大きさ */
    font-weight: bold;
}


.base-price-area,
.base-cost-area,
.base-printer-cost-area {
    margin-left: -15px;       /* 左に44pxはみ出す */
    margin-right: -15px;      /* 右に44pxはみ出す */
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
}

.base-price-area {
    background-color: var(--light-primary-color);
}

.base-cost-area {
    background-color: var(--gray-300);
}

.base-printer-cost-area {
    background-color: var(--gray-100);
}

.flex-center {
    display: flex;
    justify-content: center;
    width: 100%; /* 横幅いっぱいに広げてその真ん中に配置 */
}

.environment-banner-height35 {
    --environment-banner-height: 35px
}



/* ===== 商品詳細 全幅パネル（estimate_step2_2） ===== */
.product-detail-fullwidth {
    padding: 40px 34px 34px;
    gap: 0;
}

.product-detail-fullwidth__body {
    color: var(--text-base);
    line-height: 1.85;
}

/* リード文 */
.pd-lead {
    text-align: center;
    margin-bottom: 32px;
}

.pd-lead h3 {
    margin: 0 0 14px;
    color: var(--primary-color);
    font-size: 28px;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.pd-lead p {
    margin: 0;
    color: var(--text-base);
    font-size: 16px;
    line-height: 2;
}

/* 特徴ペア（アイコンなし） */
.pd-feature-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 34px;
}

.pd-feature-card {
    padding: 28px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    background: var(--white);
}

.pd-feature-card h4 {
    margin: 0 0 10px;
    color: var(--primary-color);
    font-size: 20px;
    line-height: 1.45;
    font-weight: bold;
}

.pd-feature-card p {
    margin: 0;
    color: var(--text-base);
    font-size: var(--font-size-base);
    line-height: 1.9;
}

/* 活用シーン（左：画像 / 右：コピー） */
.pd-scene-card {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: 16px;
    padding: 26px;
    background: var(--white);
    margin-bottom: 32px;
}

.pd-scene-card__image {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-100);
}

.pd-scene-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-scene-card__label {
    margin: 0 0 6px;
    font-size: var(--font-size-base);
    font-weight: 800;
    color: var(--text-base);
}

.pd-scene-card__body h3 {
    margin: 0 0 12px;
    color: var(--primary-color);
    font-size: 28px;
    line-height: 1.4;
}

.pd-scene-card__body p {
    margin: 0 0 18px;
    color: var(--text-base);
    font-size: var(--font-size-lg);
    line-height: 2;
}

/* チェックリスト */
.pd-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.pd-check-list li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    font-size: var(--font-size-base);
    color: var(--text-base);
    font-weight: 700;
}

.pd-check-list li::before {
    content: "✓";
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: var(--font-size-h5);
    line-height: 1;
    font-weight: 900;
}

/* FAQ 見出し（中身は既存 .faq-* を流用） */
.pd-faq {
    margin-top: 8px;
}

.pd-faq__title {
    margin: 0 0 12px;
    color: var(--primary-color);
    font-size: var(--font-size-h1);
}

/* レスポンシブ */
@media (max-width: 960px) {
    .pd-feature-pair,
    .pd-scene-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .product-detail-fullwidth {
        padding: 18px;
    }

    .pd-lead h3 {
        font-size: 24px;
    }
}

/* 連打防止（common.js）: 送信中ボタンの視覚フィードバック */
.btn.is-submitting {
    opacity: .6;
    cursor: progress;
}


.after-order-flow-num .paid {
    background: var(--primary-color);
    border-radius: 10px;
    font-weight: 700;
    padding: 5px;
}

.history-meta__value .unpaid {
    background: var(--red);
    border-radius: 10px;
    color: var(--white);
    font-weight: 700;
    padding: 5px;
}

/* カード全体の幅を絞って中央寄せに */
.receivable-export-card {
  margin: 20px auto;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* タイトル部分をヘッダー風に */
.receivable-year-title {
  background-color: var(--light-primary-color);
  padding: 16px 24px;
  font-weight: bold;
  color: var(--text-bold);
  border-bottom: 1px solid var(--gray-300);
}

/* フォームの内側余白 */
.receivable-export-form {
  padding: 24px;
}

/* 各入力項目の縦の余白 */
.receivable-form-group {
  margin-bottom: 20px;
}

/* ラベルのスタイル（太字） */
.receivable-form-label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

/* ラジオボタンの横並びブロック */
.receivable-radio-group {
  display: flex;
  gap: 16px;
}

/* ラジオボタンのラベル */
.receivable-radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.receivable-radio-label input[type="radio"] {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

/* ボタンの配置エリア */
.receivable-form-action {
  margin-top: 24px;
}

/* ダウンロードボタン（元画面の緑色ヘッダーとトーンを合わせています） */
.receivable-submit-btn {
  width: 100%;
  padding: 12px 24px;
  font-weight: bold;
  background-color: var(--primary-color); /* 既存のヘッダー色に近い深緑 */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--white);
  transition: background-color 0.2s ease;
}

.receivable-submit-btn:hover {
  transform: translateY(-2px); /* 2px上に持ち上げる */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* 影を広げて浮遊感を出す */
}


/* ================================
   配送情報修正画面
   ================================ */

.shipping-checkbox-group > * {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
}

.shipping-checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}

.shipping-checkbox-group input {
    margin: 0;
}

.shipping-qty-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.shipping-qty-cell .form-input {
    width: 120px;
}


/* ================================
   入稿前の注意書き（表面データ入稿など）
   ================================ */
.data-notice-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.data-notice-section + .data-notice-section {
    margin-top: 32px;
}

.data-notice-head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-300);
}

.data-notice-title {
    color: var(--text-bold);
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin-bottom: 8px;
}

.data-notice-lead {
    color: var(--text-light);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

.data-notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-notice-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--text-base);
    font-size: var(--font-size-h3);
    line-height: 1.7;
}

.data-notice-list li::before {
    content: "・";
    flex: 0 0 auto;
    color: var(--text-base);
}

.data-notice-em {
    color: var(--red);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================================================
   入稿データページ（pd- プレフィックス）
   デザイン: docs/design_mockup/print_data_redesign.html 準拠
   ========================================================= */
.print-data-page {
    --pd-navy: #0B2545; /* 見出しの締め色 */
    padding-top: 24px;
    padding-bottom: 80px;
}

/* ---- オーバービュー ---- */
.pd-overview {
    margin-bottom: 52px;
}

.pd-overview-lead {
    margin-bottom: 18px;
}

.pd-overview-lead h2 {
    font-size: var(--font-size-h1-sub);
    font-weight: bold;
    color: var(--pd-navy);
    letter-spacing: .01em;
}

.pd-overview-lead p {
    color: var(--text-light);
    font-size: var(--font-size-h5);
    margin-top: 4px;
}

.pd-cat-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 22px 24px 20px;
}

.pd-toc-section + .pd-toc-section {
    border-top: 1px solid var(--gray-100);
    margin-top: 20px;
    padding-top: 20px;
}

.pd-toc-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 32px;
    align-items: start;
}

.pd-cat-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pd-cat-title {
    font-size: var(--font-size-h2-sub);
    font-weight: bold;
    color: var(--pd-navy);
}

.pd-cat-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-cat-links a {
    color: var(--link-text-color);
    font-size: var(--font-size-h5);
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pd-cat-links a:hover {
    text-decoration: underline;
}

.pd-cat-links .grp {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: .06em;
    margin-top: 8px;
}

.pd-cat-links .grp:first-child {
    margin-top: 0;
}

/* ---- カテゴリセクション見出し ---- */
.pd-cat-section {
    margin-bottom: 60px;
}

.pd-cat-header {
    border-left: 4px solid;
    padding-left: 16px;
    margin-bottom: 24px;
}

.pd-cat-section--print .pd-cat-header {
    border-color: var(--primary-color);
}

.pd-cat-section--ar .pd-cat-header {
    border-color: var(--accent-color);
}

.pd-cat-header h2 {
    font-size: var(--font-size-h1);
    font-weight: bold;
    color: var(--pd-navy);
    line-height: 1.4;
}

.pd-cond {
    display: inline-block;
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-top: 4px;
}

/* ---- 仕様パネル（印刷データ） ---- */
.pd-panel {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.pd-panel-title {
    font-size: var(--font-size-h2-sub);
    font-weight: bold;
    color: var(--text-bold);
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--primary-color);
}

.pd-panel-desc {
    color: var(--text-light);
    font-size: var(--font-size-h5);
    margin: 10px 0 18px;
}

/* ---- 仕様テーブル ---- */
.pd-spec-wrap {
    overflow-x: auto;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

.pd-spec {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    text-align: left;
    font-size: var(--font-size-base);
    color: var(--text-bold);
}

.pd-spec thead th {
    background: var(--gray-50);
    padding: 12px 16px;
    font-size: var(--font-size-small);
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: .04em;
    border-bottom: 2px solid var(--gray-300);
    white-space: nowrap;
}

.pd-spec tbody tr {
    border-bottom: 1px solid var(--gray-300);
}

.pd-spec tbody tr:last-child {
    border-bottom: none;
}

.pd-spec tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.pd-spec td {
    padding: 13px 16px;
    vertical-align: middle;
}

.pd-spec-item-name {
    font-weight: bold;
    white-space: nowrap;
}

.pd-spec-sub {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-top: 2px;
}

.pd-spec-note {
    font-size: var(--font-size-small);
    color: var(--text-light);
    text-align: right;
    margin-top: 8px;
}

.pd-spec td.pd-group-cell {
    background: var(--white);
    vertical-align: top;
    padding-top: 16px;
    border-right: 1px solid var(--gray-300);
}

/* ---- フォーマット別DLボタン ---- */
.pd-btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 5px;
    background: var(--white);
    font-size: var(--font-size-small);
    font-weight: bold;
    white-space: nowrap;
    transition: background .15s;
}

.pd-btn-dl .fmt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: var(--font-size-xxs);
    font-weight: bold;
    color: var(--white);
}

.pd-btn-dl--ai {
    border: 1px solid #ff9a00;
    color: #b06a00;
}

.pd-btn-dl--ai .fmt {
    background: #ff9a00;
}

.pd-btn-dl--ai:hover {
    background: #fff7ed;
}

.pd-btn-dl--pdf {
    border: 1px solid #e11d2a;
    color: #e11d2a;
}

.pd-btn-dl--pdf .fmt {
    background: #e11d2a;
}

.pd-btn-dl--pdf:hover {
    background: #fef2f2;
}

/* ---- ARコンテンツ 仕様カード ---- */
.pd-ar-group-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-h2-sub);
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: .02em;
    margin: 36px 0 16px;
}

.pd-ar-group-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent-color);
    transform: rotate(45deg);
}

.pd-ar-group-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.pd-ar-group-label:first-of-type {
    margin-top: 0;
}

.pd-ar-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pd-ar-card-head {
    padding: 28px 24px 8px;
}

.pd-ar-card-title {
    font-size: var(--font-size-h2-sub);
    font-weight: bold;
    color: var(--pd-navy);
}

.pd-ar-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.pd-ar-card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .pd-ar-card-meta-row {
        margin-top: 15px;
        display: block;
    }

    .pd-ar-card-meta-values {
        margin-top: 10px;
    }
}

.pd-ar-card-meta-label {
    font-size: var(--font-size-h5);
    font-weight: bold;
    color: var(--text-light);
    min-width: 6.5em;
    letter-spacing: .05em;
    flex-shrink: 0;
}

/* タグ・データ種別の入れ物（折り返してもラベルの下に回り込まないようにする） */
.pd-ar-card-meta-values {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.pd-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    font-size: var(--font-size-h5);
    color: var(--text-base);
}

.pd-data-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-size-h5);
    color: var(--text-base);
}

.pd-data-kind i {
    color: var(--accent-color);
    font-size: var(--font-size-lg);
}

.pd-ar-card-main {
    padding: 16px 24px 0;
    min-width: 0;
}

.pd-ar-card-main:last-child {
    padding-bottom: 24px;
}

/* カード下部アクション（2カラム・間に薄い縦線） */
.pd-ar-card-aside {
    padding: 28px 24px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.pd-aside-sec {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 32px;
}

.pd-aside-sec + .pd-aside-sec {
    border-left: 1px solid var(--gray-300);
    padding-left: 32px;
    padding-right: 0;
}

@media (max-width: 768px) {
    .pd-ar-card-aside {
        grid-template-columns: 1fr;
    }

    .pd-aside-sec + .pd-aside-sec {
        border-left: none;
        padding-left: 0;
        margin-top: 20px;
    }
}

.pd-aside-sec:only-child {
    grid-column: 1 / -1;
}

.pd-body-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 14px;
}

.pd-note-text {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

.pd-note-text + .pd-note-text {
    margin-top: 2px;
}

.pd-note-gap {
    margin-bottom: 10px;
}

.pd-note-gap-top {
    margin-top: 8px;
}

/* データブロック */
.pd-data-block {
    margin-bottom: 20px;
}

.pd-data-block:last-child {
    margin-bottom: 0;
}

.pd-data-block-title {
    font-size: var(--font-size-base);
    font-weight: bold;
    color: var(--pd-navy);
    padding-left: 12px;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-data-block-title .opt,
.pd-panel-title .opt {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    background: var(--gray-100);
    border-radius: 4px;
    padding: 1px 8px;
}

.pd-panel-title .opt {
    margin-left: 8px;
    vertical-align: 2px;
}

.pd-data-block .pd-note-text {
    margin-bottom: 8px;
}

.pd-spec-rows {
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    overflow: hidden;
}

.pd-spec-row {
    display: flex;
    border-bottom: 1px solid var(--gray-300);
}

.pd-spec-row:last-child {
    border-bottom: none;
}

.pd-spec-row dt {
    width: 130px;
    flex-shrink: 0;
    padding: 9px 14px;
    background: var(--gray-50);
    font-size: var(--font-size-small);
    font-weight: bold;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.pd-spec-row dd {
    padding: 9px 14px;
    font-size: var(--font-size-base);
    color: var(--text-bold);
}

/* 動画リスト（飛び出すARカード） */
.pd-video-list {
    margin: 4px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-video-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.pd-video-list .no {
    font-weight: bold;
    color: var(--link-text-color);
    font-size: var(--font-size-h5);
    width: 1.2em;
    text-align: right;
    flex-shrink: 0;
}

.pd-video-list .req {
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--red);
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 0 6px;
}

/* アクションレール */
.pd-aside-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--font-size-h5);
    font-weight: bold;
    color: var(--pd-navy);
    margin-bottom: 6px;
}

.pd-aside-title i {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
}

.pd-aside-desc {
    font-size: var(--font-size-small);
    color: var(--text-light);
    margin-bottom: 10px;
}

.pd-aside-sec .pd-btn-dl {
    width: fit-content;
    height: 36px;
}

.pd-pending-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--text-light);
    background: var(--gray-100);
    border-radius: 4px;
    padding: 2px 8px;
}

/* 詳細ページボタン（ARコンテンツ解説ページ完成後に使用） */
.pd-btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    min-width: 220px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: var(--white);
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: bold;
    line-height: 1.5;
    transition: background .15s;
}

.pd-btn-detail:hover {
    background: var(--light-primary-color);
}

.pd-btn-detail i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

/* ---- 注意事項 ---- */
.pd-caution {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 20px 24px;
}

.pd-caution h2 {
    font-size: var(--font-size-h3);
    font-weight: bold;
    color: var(--pd-navy);
    margin-bottom: 10px;
}

.pd-caution li {
    position: relative;
    padding-left: 18px;
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 4px;
}

.pd-caution li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--pd-navy);
}

/* =========================================================
   演出イメージ・データの作り方 ガイドページ（pdg- プレフィックス）
   ========================================================= */

/* 戻るリンク */
.pdg-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--primary-color);
    font-size: var(--font-size-base);
    font-weight: bold;
    margin-bottom: 20px;
}

.pdg-back:hover {
    text-decoration: underline;
}

.pdg-back i {
    font-size: var(--font-size-h1-sub);
}

/* 作り方ステップ */
.pdg-steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 8px;
}

.pdg-step {
    display: flex;
    gap: 14px;
}

.pdg-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-h5);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
    padding-top: 3px;
}

.pdg-step-body {
    flex: 1;
    min-width: 0;
}

.pdg-step-title {
    font-size: var(--font-size-h3);
    font-weight: bold;
    color: var(--pd-navy);
    margin-bottom: 6px;
}

.pdg-step-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 12px;
}

.pdg-step-img {
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
}

/* 演出バリエーション注記 */
.pdg-variation {
    background: var(--light-primary-color);
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 24px;
}

.pdg-variation-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--font-size-base);
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.pdg-variation-title i {
    font-size: var(--font-size-lg);
}

.pdg-variation-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
}

/* OK / NG 比較 */
.pdg-okng {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pdg-okng-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 16px 18px;
}

.pdg-okng-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-base);
    font-weight: bold;
    margin-bottom: 10px;
}

.pdg-okng-card--ok .pdg-okng-label {
    color: #22c55e;
}

.pdg-okng-card--ng .pdg-okng-label {
    color: var(--red);
}

.pdg-okng-card img,
.pdg-okng-card video {
    width: 100%;
    border-radius: 6px;
    display: block;
}

.pdg-okng-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 10px;
}

/* お問い合わせ導線 */
.pdg-contact {
    text-align: center;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--gray-300);
}

.pdg-contact-text {
    font-size: var(--font-size-base);
    color: var(--text-base);
    margin-bottom: 14px;
}

/* ---- 2パターン構成（カード動画型）---- */
.pdg-patterns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.pdg-pattern-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 18px 20px;
    transition: border-color .15s, box-shadow .15s;
}

.pdg-pattern-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pdg-pattern-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--primary-color);
    background: var(--light-primary-color);
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 8px;
}

.pdg-pattern-title {
    font-size: var(--font-size-h3);
    font-weight: bold;
    color: var(--pd-navy);
    margin-bottom: 6px;
}

.pdg-pattern-desc {
    font-size: var(--font-size-h5);
    color: var(--text-light);
}

.pdg-pattern-badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: bold;
    color: var(--primary-color);
    background: var(--light-primary-color);
    border-radius: 4px;
    padding: 2px 8px;
    margin-right: 10px;
    vertical-align: 2px;
}

/* ---- 演出イメージ デモプレイヤー（左: スマホフレーム / 右: 説明） ---- */
.pdg-demo-player {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* CSSスマホフレーム */
.pdg-phone {
    width: 270px;
    flex-shrink: 0;
    aspect-ratio: 9 / 19;
    background: #111827;
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.pdg-phone::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #111827;
    border-radius: 12px;
    z-index: 2;
}

.pdg-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.pdg-demo-media {
    display: none;
    width: 100%;
    height: 100%;
}

.pdg-demo-media.is-active {
    display: block;
}

.pdg-demo-media img,
.pdg-demo-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* デモ横の説明エリア */
.pdg-demo-info {
    flex: 1;
    min-width: 0;
}

.pdg-demo-info .pd-body-text {
    font-size: var(--font-size-xl);
    line-height: 1.9;
    margin-bottom: 18px;
}

/* ---- 演出ポイント（演出イメージ右カラム） ---- */
.pdg-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.pdg-point {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.pdg-point i {
    color: #22c55e;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- デモ動画サムネイル（クリックでフレーム内の表示を切り替え） ---- */
.pdg-demo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pdg-demo-thumb {
    width: 150px;
    height: 150px;
    padding: 0;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color .15s;
}

.pdg-demo-thumb:hover {
    border-color: var(--gray-600);
}

.pdg-demo-thumb.is-active {
    border-color: var(--primary-color);
}

.pdg-demo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 選択肢スウォッチ（音符の質感・色など、画像+名前で選択肢を見せる一覧） */
.pdg-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.pdg-swatches:last-child {
    margin-bottom: 0;
}

.pdg-swatch {
    width: 200px;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.pdg-swatch img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--gray-100);
}

.pdg-swatch-name {
    font-size: var(--font-size-h5);
    color: var(--text-base);
    text-align: center;
    padding: 8px 4px;
}

.pdg-swatch-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    font-size: var(--font-size-xxs);
    font-weight: bold;
    color: #fff;
    background: var(--primary-color);
    border-radius: 4px;
    padding: 2px 8px;
}

/* 入稿方法（入稿するファイルと入稿形をフローで見せる） */
.pdg-submit-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pdg-submit-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdg-submit-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: var(--font-size-base);
    color: var(--text-base);
}

.pdg-submit-file i {
    color: var(--primary-color);
}

.pdg-submit-arrow {
    font-size: var(--font-size-h2);
    color: var(--text-light);
}

.pdg-submit-goal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--light-primary-color);
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: bold;
    color: var(--primary-color);
}

.pdg-submit-result {
    display: flex;
    align-items: center;
    gap: 16px;
}


.estimate-number {
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.copyright-field {
    padding: 20px;
}

.copyright-field {
    padding: 20px;
}

.add-copyright-form-btn {
    margin-right: 20px;
}

.delete-checkbox {
    width: 100%;
    margin: 10px 0;
}

.copyright-sections > a {
    border: 3px solid var(--primary-color);
    border-radius: 5px;
}

li.copyright-sections:not(:first-child) {
    margin-top: 5px;
}

.btn-disabled {
    background: var(--gray-50);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}


/* ================================
   Rich Text用のCSS　↓ここから
   （データにHTMLタグを埋め込む際のクラス名）
   ================================ */

.rt-text-red {
    color: var(--red);
}

/* ================================
   Rich Text用のCSS　↑ここまで
   （データにHTMLタグを埋め込む際のクラス名）
   ================================ */

/* =========================================================
   商品詳細 構造化セクション（estimate_step2_2 / pdd-）
   ========================================================= */

/* --- 商品カード上部 --- */
.pdd-category {
    margin: 0 0 6px;
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.pdd-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 18px 0 8px;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 7px;
}

.pdd-facts > div {
    padding: 13px 14px;
    border-right: 1px solid var(--gray-300);
    background: var(--gray-50);
}

.pdd-facts > div:last-child {
    border-right: 0;
}

.pdd-facts dt {
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.pdd-facts dd {
    margin: 6px 0 0;
}

.pdd-facts strong {
    display: block;
    color: var(--primary-color);
    font-size: var(--font-size-h2-sub);
    letter-spacing: -0.02em;
}

.pdd-facts small {
    display: block;
    margin-top: 3px;
    color: var(--text-light);
    font-size: var(--font-size-xxs);
}

.pdd-facts-note {
    margin: 0 0 16px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    line-height: 1.6;
}

/* --- セクション共通 --- */
.pdd-section + .pdd-section {
    margin-top: 44px;
}

.pdd-section-heading {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.pdd-section-heading h3 {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h2);
    font-weight: 700;
}

.pdd-section-heading p {
    margin: 6px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
}

/* --- 商品仕様 --- */
.pdd-spec-table {
    margin: 0;
    border-top: 1px solid var(--gray-300);
}

.pdd-spec-table > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--gray-300);
    font-size: var(--font-size-h5);
}

@media (max-width: 768px) {
    .pdd-spec-table > div {
        grid-template-columns: 80px 1fr;
    }
}


.pdd-spec-table dt,
.pdd-spec-table dd {
    margin: 0;
    padding: 13px 14px;
}

.pdd-spec-table dt {
    background: var(--gray-50);
    color: var(--text-base);
    font-weight: 700;
}

.pdd-spec-table dd {
    line-height: 1.7;
}

/* 仕様行内の図版（素材・納品形態など） */
.pdd-spec-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
}

.pdd-spec-figures figure {
    flex: 0 1 240px;
    min-width: 140px;
    margin: 0;
}

.pdd-spec-figures img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.pdd-spec-figures figcaption {
    margin-top: 6px;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.pdd-spec-figure-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.pdd-spec-figure-btn:hover img {
    opacity: 0.85;
}

/* 仕様図版の拡大モーダル（画像+閉じるボタンのみ） */
.modal-dialog--image {
    width: auto;
    max-width: min(90vw, 960px);
    padding: 0;
    background: none;
    border-radius: 0;
}

.modal-dialog--image img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: var(--white);
}

.modal-dialog--image .modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    color: var(--text-base);
    background: var(--white);
}

.modal-dialog--image .modal-close:hover {
    background: var(--gray-300);
}

/* --- 基本価格に含まれる内容（ARコンテンツ・コンテンツ配信で共通の箱） --- */
.pdd-package-card {
    padding: 18px 20px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.pdd-package-label {
    margin: 0 0 12px;
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* 数値の横並び（AR演出 ＋ フォトフレーム） */
.pdd-package-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 34px;
    min-height: 64px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.pdd-package-item {
    min-width: 170px;
}

.pdd-package-name {
    display: block;
    margin-bottom: 2px;
    color: var(--text-light);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.pdd-package-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--primary-color);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pdd-package-unit {
    color: var(--text-bold);
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0;
}

.pdd-package-plus {
    padding-bottom: 10px;
    color: var(--gray-600);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

/* 数値の 2 列表示（配信データ容量） */
.pdd-capacity-summary {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: stretch;
    min-height: 76px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.pdd-capacity-summary .pdd-package-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0 22px;
}

.pdd-capacity-summary .pdd-package-item:first-child {
    padding-left: 0;
}

.pdd-capacity-summary .pdd-package-value {
    font-size: 28px;
    line-height: 1.15;
}

.pdd-capacity-divider {
    width: 1px;
    height: 48px;
    align-self: center;
    background: var(--gray-300);
}

/* 注記（「・」付きの箇条書き） */
.pdd-package-notes {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.75;
}

.pdd-package-notes li {
    position: relative;
    padding-left: 1.2em;
}

.pdd-package-notes li::before {
    content: "・";
    position: absolute;
    left: 0;
}

.pdd-package-notes li + li {
    margin-top: 4px;
}

/* 注記の強調（種類追加・パターン追加・追加料金・初回のみ など） */
.pdd-package-em {
    color: var(--primary-color);
    font-weight: 700;
}

/* 強調（pdd-package-em）と同色のため、リンクは常時下線で区別する */
.pdd-package-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pdd-package-link:hover {
    text-decoration-thickness: 2px;
}

/* 一覧への小見出し（選べるAR演出・対応コンテンツ） */
.pdd-subhead {
    margin: 24px 0 12px;
}

.pdd-subhead-title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.pdd-subhead-text {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
}

@media (max-width: 768px) {
    .pdd-package-card {
        padding: 16px;
    }

    .pdd-package-item {
        min-width: 0;
    }

    .pdd-capacity-summary {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .pdd-capacity-summary .pdd-package-item {
        padding: 8px 0;
    }

    .pdd-capacity-divider {
        width: 100%;
        height: 1px;
    }

    .pdd-subhead {
        margin-top: 20px;
    }
}

/* --- ARコンテンツ（2カラムのコンパクトカード＋デモ動画） --- */
.pdd-ar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pdd-ar-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
}

/* デモ動画（9:16弱の縦型。動画の実比率3:5に合わせて全面表示） */
.pdd-ar-card-media {
    width: 128px;
    aspect-ratio: 3 / 5;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-50);
}

.pdd-ar-card-media video,
.pdd-ar-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .pdd-ar-grid {
        grid-template-columns: 1fr;
    }

    .pdd-ar-card {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .pdd-ar-card-media {
        width: 104px;
    }
}

.pdd-ar-card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pdd-ar-card-copy h4 {
    margin: 0 0 8px;
    color: var(--text-bold);
    font-size: var(--font-size-h4);
    font-weight: 700;
    line-height: 1.45;
}

.pdd-ar-card-copy p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.7;
}

.pdd-ar-card-copy .pdd-ar-link {
    margin-top: auto;
    align-self: flex-start;
    padding-top: 14px;
}

.pdd-ar-link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 7px;
    color: var(--primary-color);
    font-size: var(--font-size-small);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pdd-ar-link:hover {
    text-decoration-thickness: 2px;
}

/* --- コンテンツ配信 --- */
.pdd-delivery-intro {
    margin: 0 0 14px;
    color: var(--text-light);
    font-size: var(--font-size-small);
}

.pdd-delivery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

@media (max-width: 768px) {
    .pdd-delivery-grid {
        grid-template-columns: 1fr;
    }
}

.pdd-delivery-card {
    padding: 20px 22px;
}

.pdd-delivery-card + .pdd-delivery-card {
    border-left: 1px solid var(--gray-300);
}

.pdd-delivery-kicker {
    margin: 0 0 4px;
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pdd-delivery-title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h4);
    font-weight: 700;
}

.pdd-delivery-description {
    margin: 7px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.7;
}

/* 配信方法カードの下に置く容量の箱との間隔 */
.pdd-delivery-grid + .pdd-package-card {
    margin-top: 16px;
}

.pdd-formats {
    margin-top: 0;
}


/* 対応コンテンツ */
.pdd-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdd-content-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
}

/* 左カラム: アイコン画像（1000×1000 の角丸アイコン）を薄いグレー地の中央に置く */
.pdd-content-visual {
    display: grid;
    place-items: center;
    min-height: 140px;
    padding: 20px;
    border-right: 1px solid var(--gray-300);
    background: var(--gray-50);
}

.pdd-content-visual img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.pdd-content-body {
    min-width: 0;
    padding: 16px 16px 14px;
}

.pdd-content-name {
    margin: 0 0 8px;
    color: var(--text-bold);
    font-size: var(--font-size-h4);
    font-weight: 700;
    line-height: 1.45;
}

.pdd-content-meta {
    display: grid;
    gap: 10px;
}

.pdd-content-meta-block {
    display: grid;
    gap: 5px;
}

.pdd-content-meta-label {
    margin: 0;
    color: var(--text-base);
    font-size: var(--font-size-xxs);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pdd-usage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    line-height: 1.55;
}

.pdd-usage-list li {
    position: relative;
    padding-left: 12px;
}

.pdd-usage-list li::before {
    content: "・";
    position: absolute;
    left: 0;
}

.pdd-format-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pdd-format-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    background: var(--gray-50);
    color: var(--text-base);
    font-size: var(--font-size-xxs);
    font-weight: 700;
    line-height: 1;
}

/* フォーマットチップの横に並べる補足（チップと同じ高さ） */
.pdd-epub-note {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: var(--font-size-xxs);
    font-weight: 700;
    line-height: 1;
}

.pdd-format-example-note {
    margin: 10px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

@media (max-width: 768px) {
    .pdd-content-grid {
        grid-template-columns: 1fr;
    }

    .pdd-content-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .pdd-content-visual {
        min-height: 112px;
        padding: 14px;
    }

    .pdd-content-visual img {
        width: 60px;
        height: 60px;
    }

    .pdd-content-body {
        padding: 12px;
    }
}

/* --- 入稿データ --- */
.pdd-data-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 768px) {
    .pdd-data-cards {
        grid-template-columns: 1fr;
    }
}


.pdd-data-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.pdd-data-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdd-data-card-header h4 {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h3);
    font-weight: 700;
}

.pdd-data-badge {
    display: grid;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 6px;
    background: #251d15;
    color: #ff9c18;
    font-size: var(--font-size-small);
    font-weight: 700;
}

.pdd-data-badge--ar {
    background: var(--primary-color);
    color: var(--white);
}

.pdd-data-card-desc {
    margin: 14px 0 0;
    color: var(--text-base);
    font-size: var(--font-size-small);
    line-height: 1.8;
}

.pdd-data-card-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--gray-50);
}

.pdd-data-card-info i {
    color: var(--primary-color);
    font-size: var(--font-size-h5);
}

.pdd-data-card-info p {
    margin: 0;
    color: var(--text-base);
    font-size: var(--font-size-xs);
    line-height: 1.7;
}

.pdd-data-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 10px;
}

.pdd-data-card-btn i {
    margin-right: 0;
}

.pdd-data-card .pdd-data-card-desc + .pdd-data-card-btn {
    margin-top: 16px;
}

/* --- 商品について 見出し + セクションタブナビ --- */
html:has(.pdd-tabs) {
    scroll-behavior: smooth;
}

.pdd-details-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
}

.pdd-details-heading h2 {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h1);
    font-weight: 700;
}

.pdd-details-heading p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.pdd-tabs {
    position: sticky;
    z-index: 20;
    top: var(--header-height);
    display: flex;
    margin: 0 -34px;
    border-top: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
    background: var(--white);
}

.pdd-tabs a {
    flex: 1;
    padding: 13px 7px;
    border-right: 1px solid var(--gray-300);
    color: var(--text-base);
    font-size: var(--font-size-small);
    font-weight: 700;
    text-align: center;
}

@media (max-width: 768px) {
    .pdd-details-heading {
        flex-direction: column;
        align-items: center;
    }

    .pdd-tabs {
        margin: 0 -16px;
        overflow-x: auto;
        white-space: nowrap;
    }
}


.pdd-tabs a:last-child {
    border-right: 0;
}

.pdd-tabs a:hover {
    background: var(--light-primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.pdd-sections {
    padding-top: 36px;
}

.pdd-section {
    scroll-margin-top: calc(var(--header-height) + 60px);
}

/* --- よくある質問（details/summary + 丸型開閉インジケーター） --- */
.pdd-faq {
    border-top: 1px solid var(--gray-300);
}

.pdd-faq details {
    border-bottom: 1px solid var(--gray-300);
}

.pdd-faq summary {
    position: relative;
    padding: 16px 44px 16px 6px;
    color: var(--text-bold);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 700;
    list-style: none;
}

.pdd-faq summary::-webkit-details-marker {
    display: none;
}

.pdd-faq summary::after {
    position: absolute;
    top: 14px;
    right: 8px;
    display: grid;
    width: 22px;
    height: 22px;
    padding-left: 0.5px;
    padding-bottom: 0.5px;
    place-items: center;
    border-radius: 50%;
    background: var(--light-primary-color);
    color: var(--primary-color);
    content: "+";
}

.pdd-faq details[open] summary::after {
    content: "−";
}

.pdd-faq-answer {
    margin: -2px 44px 16px 6px;
    color: var(--text-base);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

.pdd-faq-answer p {
    margin: 0 0 8px;
}

.pdd-faq-answer p:last-child,
.pdd-faq-answer ul:last-child {
    margin-bottom: 0;
}

/* --- 商品カード（モック product-card と同構成） --- */
.card.pdd-product-card {
    display: grid;
    grid-template-columns: minmax(340px, 0.88fr) minmax(420px, 1.12fr);
    min-height: 520px;
    gap: 0;
    overflow: hidden;
    padding: 0;
}

.pdd-gallery {
    padding: 24px;
    background: var(--white);
}

.pdd-media-frame {
    position: relative;
    display: grid;
    grid-template: 100% / 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 7px;
    background:
        linear-gradient(45deg, #f1f3f5 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(-45deg, #f1f3f5 25%, transparent 25%) 0 10px / 20px 20px,
        linear-gradient(45deg, transparent 75%, #f1f3f5 75%) 10px -10px / 20px 20px,
        linear-gradient(-45deg, transparent 75%, #f1f3f5 75%) -10px 0 / 20px 20px,
        var(--white);
}

.pdd-media-frame .no-image-placeholder {
    grid-area: 1 / 1;
}

.pdd-product-image,
.pdd-media-frame video {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pdd-media-frame video {
    background: #111;
}

.pdd-media-thumbs {
    display: flex;
    gap: 9px;
    margin-top: 11px;
}

.pdd-media-thumbs button {
    display: grid;
    width: 56px;
    height: 56px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--gray-400);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
}

.pdd-media-thumbs button.active {
    border: 2px solid var(--primary-color);
}

.pdd-media-thumbs img,
.pdd-play-thumb {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    overflow: hidden;
    object-fit: cover;
    background: var(--black);
    color: var(--white);
}

.pdd-play-thumb {
    position: relative;
}

.pdd-play-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdd-play-thumb::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    content: "▶";
    font-size: var(--font-size-small);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.pdd-product-summary {
    display: flex;
    flex-direction: column;
    padding: 34px 34px 34px 0;
}

.pdd-product-title {
    margin: 0;
    color: var(--text-bold);
    font-size: 34px;
    font-weight: bold;
    letter-spacing: -0.04em;
    line-height: 1.25;
}

@media (max-width: 1040px) {
    .card.pdd-product-card {
        display: flex;
        padding: 14px;
    }

    .pdd-gallery {
        padding: 0;
    }

    .pdd-product-summary {
        padding: 34px 0;
    }

    .pdd-product-title {
        font-size: 28px;
    }
}

.pdd-product-description {
    margin: 17px 0 0;
    color: var(--text-base);
    font-size: var(--font-size-h5);
    line-height: 1.9;
}

.pdd-product-summary .pdd-facts {
    margin-top: 19px;
}

.pdd-product-summary .product-detail-pin {
    margin-top: 4px;
}

.pdd-overview-actions {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 9px;
    margin-top: auto;
}

.pdd-overview-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 認証セクション --- */
.pdd-auth-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.pdd-auth-method {
    min-width: 0;
    padding: 20px 22px 22px;
}

.pdd-auth-method:nth-child(even) {
    border-left: 1px solid var(--gray-300);
}

.pdd-auth-method:nth-child(n+3) {
    border-top: 1px solid var(--gray-300);
}

.pdd-auth-method-no {
    margin: 0 0 4px;
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pdd-auth-title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h4);
    font-weight: 700;
    line-height: 1.5;
}

.pdd-auth-description {
    min-height: 44px;
    margin: 6px 0 16px;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.7;
}

.pdd-auth-flow {
    padding-top: 13px;
    border-top: 1px solid var(--gray-300);
}

.pdd-auth-flow-label {
    margin: 0 0 8px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.pdd-flow-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdd-flow-step {
    color: var(--text-base);
    font-size: var(--font-size-xs);
    font-weight: 700;
    white-space: nowrap;
}

.pdd-flow-arrow {
    color: var(--gray-600);
    font-size: var(--font-size-xs);
}

.pdd-auth-note {
    margin: 12px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.pdd-auth-methods--single {
    grid-template-columns: 1fr;
}

.pdd-auth-methods--single .pdd-auth-description {
    min-height: 0;
}

/* --- 認証セクション: パスフレーズとは --- */
.pdd-passphrase-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: center;
    margin: 0 0 16px;
    padding: 0 0 17px;
    border-bottom: 1px solid var(--gray-300);
}

@media (max-width: 768px) {
    .pdd-passphrase-help {
        grid-template-columns: 1fr;
    }
}

.pdd-passphrase-help-title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h5);
    font-weight: 700;
}

.pdd-passphrase-help-text {
    margin: 4px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    line-height: 1.7;
}

.pdd-passphrase-preview {
    padding: 11px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--gray-50);
}

.pdd-passphrase-preview-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.pdd-passphrase-preview-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 6px;
}

.pdd-passphrase-preview-input {
    display: block;
    padding: 7px 9px;
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    background: var(--white);
    color: var(--gray-600);
    font-size: var(--font-size-xs);
}

.pdd-passphrase-preview-button {
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--primary-color);
    color: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

/* --- 商品仕様: 値セル内テーブル（素材別サイズ・サイズ表） --- */
.pdd-spec-table dd:has(> table) {
    padding: 0;
}

.pdd-spec-table dd table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pdd-spec-table dd table th,
.pdd-spec-table dd table td {
    padding: 12px 14px;
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
    vertical-align: middle;
    font-size: var(--font-size-h5);
}

.pdd-spec-table dd table th:last-child,
.pdd-spec-table dd table td:last-child {
    border-right: 0;
}

.pdd-spec-table dd table th + th,
.pdd-spec-table dd table td + td {
    border-left: 1px solid var(--gray-100);
}

.pdd-spec-table dd table tr:last-child td {
    border-bottom: 0;
}

.pdd-spec-table dd table th {
    background: var(--gray-50);
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.pdd-spec-table dd table th:first-child:not(:only-child),
.pdd-spec-table dd table td:first-child:not(:only-child) {
    width: 58%;
}

.pdd-material-name {
    color: var(--text-base);
    font-weight: 600;
}

.pdd-material-note {
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.pdd-size-value {
    color: var(--text-base);
    font-variant-numeric: tabular-nums;
}


/* =========================================================
   見積もり説明モーダル本文（emi-）
   見積ステップの情報モーダル（.modal-info-body 内）専用。
   共通の .modal* クラスには影響させない。
   p系クラスは .modal-info-body p の margin に負けないよう
   .modal-info-body を付けて詳細度を上げている。
   ========================================================= */
.modal-info-body .emi-lead {
    margin: 0 0 20px;
    color: var(--text-base);
    font-size: var(--font-size-base);
    line-height: 1.75;
}

.emi-lead strong {
    color: var(--text-bold);
    font-weight: 700;
}

.modal-info-body .emi-section-label {
    margin: 0 0 10px;
    color: var(--text-bold);
    font-size: var(--font-size-h5);
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: .02em;
}

/* 方式を選ぶ情報（認証タイプ等）のカード型 */
.emi-choice-cards {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.emi-choice-card {
    position: relative;
    padding: 13px 14px 13px 42px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
}

.emi-choice-card::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 20px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--light-primary-color);
}

.emi-choice-card strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text-bold);
    font-size: var(--font-size-base);
    line-height: 1.5;
}

.emi-choice-card span {
    display: block;
    color: var(--text-light);
    font-size: var(--font-size-h5);
    line-height: 1.6;
}

.modal-info-body .emi-note {
    margin: 16px 0 0;
    padding: 13px 14px;
    border-radius: 8px;
    background: var(--gray-50);
    color: var(--text-base);
    font-size: var(--font-size-h5);
    line-height: 1.7;
}

/* 規格値＋特徴（用紙種別等） */
.emi-spec-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.emi-spec-item {
    padding: 13px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
}

.emi-spec-item__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.emi-spec-item__name {
    color: var(--text-bold);
    font-weight: 700;
}

.emi-spec-item__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gray-50);
    color: var(--text-light);
    font-size: var(--font-size-small);
    font-weight: 700;
}

.modal-info-body .emi-spec-item p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-h5);
    line-height: 1.65;
}

/* 説明＋メリット（本機校正等） */
.emi-benefit-grid {
    display: grid;
    gap: 10px;
}

.emi-benefit {
    padding: 14px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
}

.emi-benefit__title {
    margin: 0 0 4px;
    color: var(--text-bold);
    font-size: var(--font-size-base);
    font-weight: 700;
}

.modal-info-body .emi-benefit p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-h5);
    line-height: 1.7;
}

.modal-info-body .emi-benefit-summary {
    margin: 14px 0 0;
    padding: 13px 14px;
    border-radius: 8px;
    background: var(--gray-50);
    color: var(--text-base);
    font-size: var(--font-size-h5);
    line-height: 1.7;
}

/* 項目名＋説明文（その他オプション、セット・同梱等） */
.emi-option-cards {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.emi-option-card {
    padding: 14px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
}

.emi-option-card__title {
    margin-bottom: 5px;
    color: var(--text-bold);
    font-size: var(--font-size-base);
    font-weight: 700;
}

.modal-info-body .emi-option-card p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-h5);
    line-height: 1.7;
}

/* 補足情報ブロック（袋の種類等） */
.emi-info-rows {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.emi-info-row {
    padding: 13px 14px;
    border-radius: 8px;
    background: var(--gray-50);
    color: var(--text-base);
    font-size: var(--font-size-h5);
    line-height: 1.7;
}

.emi-info-row strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-bold);
    font-size: var(--font-size-base);
}

/* ========================== */
/* ======= 売り上げ出力 ======= */
/* ========================== */

.sales-export-card {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.sales-card-header {
    padding: 20px 50px;
    font-weight:700;
    color: var(--text-bold);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between; /* 左右両端に振り分け */
    align-items: center;
    background: var(--light-primary-color);
}

.sales-year-title {
    font-size: var(--font-size-h2);
}

.sales-option-select {
    width: 300px;
    display: flex;
    align-items: center; /* ラベルとセレクトボックスの上下中央揃え */
    gap: 8px;            /* ラベルとセレクトボックスの間の余白 */
}

/* ラベルの折り返しを禁止 */
.sales-option-select label {
    white-space: nowrap;
    font-size: 0.9rem;  /* お好みのサイズに調整 */
}

/* ===== list ===== */
.sales-months {
    margin:0;
    padding: 15px 50px;
    list-style:none;
}
.sales-month-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 6px 16px;
}

/* マウスホバーで現在行をハイライト（月とリンクを見失わない対策） */
.sales-month-row:hover,
.sales-month-row:nth-child(even):hover {
  background-color: var(--light-primary-color);
}

/* 交互に色を変えるゼブラパターン（お好みで） */
.sales-month-row:nth-child(even) {
  background-color: var(--gray-100);
}

.sales-month-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.sales-dl-sep {
  opacity: 0.6;
}

.sales-month-label {
    color: var(--text-base);
    font-weight: 600;
    font-size: var(--font-size-h2);
    min-width: 50px;
}

@media (max-width: 768px) {
    .sales-months {
        overflow-x: auto;
    }
    .sales-card-header {
        padding: 20px;
    }

    .sales-option-select {
        width: 120px;
        display: block;
    }

    .sales-months {
        padding: 15px 20px;
    }

    .sales-month-label {
        min-width: 60px;
    }

    .sales-month-row:nth-child(even) {
        width: max-content;
    }
}

/* link */
.sales-dl-link {
    color: var(--link-text-color);
    text-decoration:none;
    font-weight:700;
}
.sales-dl-link:hover { text-decoration: underline; }
.sales-dl-link.is-disabled {
    color: var(--gray-600);
    pointer-events:none;
}



/* --- ARコンテンツ対応表 --- */
.pdd-compat {
    margin-top: 24px;
}

.pdd-compat-title {
    margin: 0 0 10px;
    color: var(--text-bold);
    font-size: var(--font-size-h4);
    font-weight: 700;
    line-height: 1.5;
}

.pdd-compat-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1.15fr;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
}

.pdd-compat-group {
    min-width: 0;
    border-left: 1px solid var(--gray-300);
}

.pdd-compat-group:first-child {
    border-left: 0;
}

@media (max-width: 768px) {
    .pdd-compat-grid {
        grid-template-columns: 1fr;
    }

    .pdd-compat-group {
        border-left: 0;
    }

    .pdd-compat-group + .pdd-compat-group {
        border-top: 1px solid var(--gray-300);
    }
}

.pdd-compat-group-title {
    margin: 0;
    padding: 13px 15px 11px;
    border-bottom: 1px solid var(--gray-300);
    background: var(--gray-50);
    color: var(--text-base);
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.5;
}

.pdd-compat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 50px;
    gap: 10px;
    align-items: center;
    min-height: 47px;
    padding: 9px 12px 9px 15px;
    border-top: 1px solid var(--gray-100);
}

.pdd-compat-row:first-of-type {
    border-top: 0;
}

.pdd-compat-name {
    color: var(--text-base);
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.pdd-compat-status {
    justify-self: end;
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.pdd-compat-status--yes {
    color: var(--primary-color);
}

.pdd-compat-status--no {
    color: var(--gray-600);
    font-weight: 500;
}

.pdd-compat-mark {
    display: inline-block;
    width: 13px;
    margin-right: 4px;
    text-align: center;
}

.pdd-compat-note {
    margin: 9px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    line-height: 1.6;
}

/* --- ARコンテンツ対応表: 見出し行 + 全商品表リンク --- */
.pdd-compat-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.pdd-compat-head .pdd-compat-title {
    margin-bottom: 0;
}

.pdd-compat-all-link {
    appearance: none;
    padding: 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: none;
    color: var(--primary-color);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.pdd-compat-all-link:hover {
    border-bottom-color: transparent;
}

.pdd-compat-all-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* --- 全商品のAR対応表モーダル（.modal-dialog--info ベース） --- */
.modal-dialog--matrix {
    display: flex;
    flex-direction: column;
    width: min(1440px, 96vw);
    height: min(860px, 90vh);
}

.modal-dialog--matrix .modal-header--info {
    flex: 0 0 auto;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-300);
}

.modal-dialog--matrix .modal-title-group {
    align-items: flex-start;
}

.pdd-matrix-lead {
    margin: 4px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.7;
}

/* スクロール領域（マウス利用者向けにスクロールバーを常時表示） */
.pdd-matrix-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: scroll;
    overscroll-behavior: contain;
}

/* Firefox 等 ::-webkit-scrollbar 非対応ブラウザ向け（Chromium では標準プロパティを置くと ::-webkit-scrollbar が無効化されるため分離） */
@supports not selector(::-webkit-scrollbar) {
    .pdd-matrix-scroll {
        scrollbar-width: thin;
        scrollbar-color: var(--gray-400) var(--gray-100);
    }
}

.pdd-matrix-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pdd-matrix-scroll::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.pdd-matrix-scroll::-webkit-scrollbar-thumb {
    border: 3px solid var(--gray-100);
    border-radius: 8px;
    background: var(--gray-400);
}

.pdd-matrix-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

.pdd-matrix-scroll::-webkit-scrollbar-corner {
    background: var(--gray-100);
}

.modal-dialog--matrix .modal-info-footer {
    flex: 0 0 auto;
    padding: 14px 32px 18px;
    border-top: 1px solid var(--gray-300);
}

/* 表本体 */
.pdd-matrix {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-base);
    font-size: var(--font-size-small);
}

.pdd-matrix th,
.pdd-matrix td {
    border-right: 1px solid var(--gray-300);
    border-bottom: 1px solid var(--gray-300);
    background: var(--white);
}

.pdd-matrix thead th {
    position: sticky;
    z-index: 4;
    text-align: center;
    font-weight: 700;
}

.pdd-matrix thead tr:first-child th {
    top: 0;
}

.pdd-matrix thead tr:nth-child(2) th {
    top: 38px;
}

.pdd-matrix-product-head {
    left: 0;
    z-index: 7 !important;
    width: 220px;
    min-width: 220px;
    padding: 12px 16px;
    background: var(--gray-50) !important;
    text-align: left !important;
}

.pdd-matrix-group {
    height: 38px;
    padding: 10px 8px 9px;
    background: var(--gray-50) !important;
    color: var(--text-base);
}

.pdd-matrix-ar-heads th {
    width: 110px;
    min-width: 110px;
    height: 94px;
    padding: 10px 8px;
    background: var(--gray-50) !important;
    color: var(--text-base);
    line-height: 1.45;
}

.pdd-matrix tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 220px;
    min-width: 220px;
    padding: 12px 14px;
    color: var(--text-bold);
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}

.pdd-matrix tbody th > span:first-child {
    display: block;
}

.pdd-matrix-cell {
    width: 110px;
    min-width: 110px;
    height: 46px;
    text-align: center;
    vertical-align: middle;
    font-size: var(--font-size-h3);
    font-weight: 700;
}

.pdd-matrix-cell--yes {
    color: var(--primary-color);
}

.pdd-matrix-cell--no {
    color: var(--gray-600);
    font-weight: 400;
}

.pdd-matrix-row--current th,
.pdd-matrix-row--current td {
    background: var(--light-primary-color) !important;
}

.pdd-matrix-row--current th {
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.pdd-matrix-current-tag {
    display: inline-block;
    width: max-content;
    margin-top: 4px;
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.favorite-mark-on {
    color: var(--status-red);
}

.add-copyright-form-btn {
    display: flex;
    justify-content: center; /* 左右の中央寄せ */
    align-items: center;
    margin-left: auto;
    margin-bottom: 20px;
    width: 30px;
    height: 30px;
    padding: 10px;
    font-weight: 700;
    font-size: var(--font-size-h1);
}

@media (max-width: 768px) {
    .user-chip,
    .mypage-link-wrap,
    .header-logout-form,
    .header-btn {
        display: none;
    }

    .sidebar .header-logout-form {
        display: block;
    }

    .btn-order {
        width: 100%;
    }
}


/* ===================================
   モバイル専用（フロント）
   =================================== */

/* PCではデフォルト非表示 */
.sp-only-block {
    display: none;
}

@media (max-width: 768px) {
    /* モバイル時のみ表示 */
    .sp-only-block {
        display: block;
    }

    /* ユーザー情報ブロックのスタイル */
    .sidebar-user-block {
        padding: 12px 16px;
        background: var(--gray-100);
        border-radius: 8px;
        margin-bottom: 16px;
    }

    .sidebar-user-label {
        font-size: var(--font-size-xs);
        color: var(--gray-600);
        font-weight: 600;
    }

    .sidebar-user-name {
        font-size: var(--font-size-base);
        font-weight: 700;
        color: var(--text-bold);
        margin-top: 2px;
        margin-bottom: 10px;
        word-break: break-all;
    }

    .sidebar-user-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .sidebar-user-actions .btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 8px;
    }
}


/*--------------- 以下バックエンド ---------------*/

/* ============================
   受注管理（CMS）ページ
   ============================ */

/* ---- filter card ---- */
.backend .filter-card,
.printer .filter-card {
    padding: 26px 38px;
    margin-bottom: 14px;
}

.backend .filter-row,
.printer .filter-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-50);
}

.backend .filter-row:last-child,
.printer .filter-row:last-child {
    border-bottom: none;
}

.backend .filter-label,
.printer .filter-label {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-base);
}

.backend .chip-group,
.printer .chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backend .chip,
.printer .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--text-base);
    font-size: var(--font-size-small);
}

.backend .chip.is-active,
.printer .chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.backend .filter-row .chip-group.input-form,
.printer .filter-row .chip-group.input-form {
    display: grid;
    grid-template-columns: 1fr 50px;
}

.backend .filter-row .chip-group.input-form button,
.printer .filter-row .chip-group.input-form button {
    margin: auto 0;
}

@media (max-width: 768px) {
    .backend .filter-card,
    .printer .filter-card {
        padding: 15px;
    }

    .backend .filter-row,
    .printer .filter-row {
        grid-template-columns: 1fr;
    }

    .backend .filter-row .chip-group.input-form,
    .printer .filter-row .chip-group.input-form {
        grid-template-columns: 1fr;
    }

    .backend .search-bar__actions button.btn,
    .backend .filter-row .chip-group button.btn,
    .printer .search-bar__actions button.btn,
    .printer .filter-row .chip-group button.btn {
        width: 100%;;
    }
}

/* ============================
   受注詳細（CMS）オーバーライド
   ============================ */

/* CMS用ヘッダー: 左右2カラム */
.backend .history-meta--cms-order,
.printer .history-meta--cms-order {
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    align-items: start;
}

.backend .history-meta--cms-order__col,
.printer .history-meta--cms-order__col {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 6px;
    align-items: center;
}

.backend .history-meta--cms-order__col--right,
.printer .history-meta--cms-order__col--right {
    grid-template-columns: auto 200px;
}

@media (max-width: 768px) {
    .backend .history-meta--cms-order,
    .printer .history-meta--cms-order {
        grid-template-columns: 1fr;
    }

    .backend .history-meta--cms-order__col--right,
    .printer .history-meta--cms-order__col--right {
        grid-template-columns: auto 150px;
        margin-top: 6px;
    }
}

.backend .history-meta--cms-order .history-meta__row,
.printer .history-meta--cms-order .history-meta__row {
    display: contents;
    font-size: var(--font-size-base);
    line-height: 1.8;
}

.backend .history-meta--cms-order .history-meta__label,
.printer .history-meta--cms-order .history-meta__label {
    color: var(--text-light);
    font-weight: normal;
    white-space: nowrap;
}

.backend .history-meta--cms-order .history-meta__value,
.printer .history-meta--cms-order .history-meta__value {
    color: var(--text-bold);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.backend .order-history-detail,
.printer .order-history-detail {
    border-right: none;
}

.backend .option-header .btn,
.printer .option-header .btn {
    margin-right: auto;
    margin-left: 8px;
}

/* 横スクロール用ラッパ */
.backend .table-scroll,
.printer .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* sticky列を使うテーブル（border-collapse: separate が必要） */
.backend .table--sticky-right,
.printer .table--sticky-right {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 980px;
}

/* separate ではセル背景がデフォルト透過のため白を指定 */
.table--sticky-right th,
.backend .table--sticky-right td,
.printer .table--sticky-right td {
    background: var(--white);
}

/* ヘッダー */
.backend .table--sticky-right thead th,
.printer .table--sticky-right thead th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--text-bold);
}

/* 右端固定列 */
.backend .table--sticky-right .col-sticky-right,
.printer .table--sticky-right .col-sticky-right {
    position: sticky;
    right: 0;
    z-index: 3;
    box-shadow: -1px 0 0 var(--gray-300);
    text-align: center;
}

/* ヘッダー固定列はさらに上 */
.backend .table--sticky-right thead .col-sticky-right,
.printer .table--sticky-right thead .col-sticky-right {
    z-index: 4;
}

/* 操作列ボタン */
.backend .table .actions .inner,
.printer .table .actions .inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width:768px) {
    .backend .table--sticky-right .col-sticky-right,
    .printer .table--sticky-right .col-sticky-right {
        position: static;
    }

    .backend .table .actions .inner,
    .printer .table .actions .inner {
        padding: 10px;
    }
}

.backend .table .actions .inner .btn,
.printer .table .actions .inner .btn {
    width: 100%;
}

.backend .table--sticky-right td.col-sticky-right,
.printer .table--sticky-right td.col-sticky-right {
    padding-left: 8px;
    padding-right: 8px;
}

.backend .table--sticky-right td.col-sticky-right .btn,
.printer .table--sticky-right td.col-sticky-right .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.backend .btn-sm.same-width,
.printer .btn-sm.same-width {
    width: 100px;
}

.backend .col-date,
.printer .col-date {
    width: 10%;
}


.backend .badge-unread-header,
.printer .badge-unread-header {
    display:inline-block;
    margin-left:8px;
    padding: 6px 12px;
    font-size: var(--font-size-base);
    border-radius: 4px;
    line-height:1.4;
    background:var(--red);
    color:var(--white);
    vertical-align:middle;
}

@media (max-width: 768px) {
    .backend .badge-unread-header,
    .printer .badge-unread-header {
        width: 80px;
        container-type: inline-size;
        font-size: clamp(var(--font-size-xxs), 2cqw, var(--font-size-base));
    }
}

.backend .reply-dialog,
.printer .reply-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0; /* これが重要。UAのmarginでズレることがあります */
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    padding: 0;
    width: min(560px, calc(100% - 32px));
}

.backend .reply-dialog::backdrop,
.printer .reply-dialog::backdrop {
    background: rgba(0,0,0,.35);
}

.backend .reply-dialog-head,
.printer .reply-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-50);
    background: var(--gray-100);
}

.backend .reply-dialog-title,
.printer .reply-dialog-title {
    font-weight: 700;
    color: var(--text-bold);
}

.backend .reply-dialog-close,
.printer .reply-dialog-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-base);
}

.backend .reply-dialog-body,
.printer .reply-dialog-body {
    padding: 16px;
}

.backend .reply-dialog-text,
.printer .reply-dialog-text {
    margin: 0 0 12px;
    color: var(--text-base);
    line-height: 1.6;
}

.backend .reply-dialog-row,
.printer .reply-dialog-row {
    display: grid;
    gap: 6px;
}

.backend .reply-dialog-label,
.printer .reply-dialog-label {
    font-size: var(--font-size-small);
    color: var(--text-light);
    font-weight: 700;
}

.backend .reply-dialog-email,
.printer .reply-dialog-email {
    text-align: left;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-bold);
}

.backend .reply-dialog-copied,
.printer .reply-dialog-copied {
    font-size: var(--font-size-small);
    color: var(--primary-color);
    font-weight: 700;
}

.backend .reply-dialog-actions,
.printer .reply-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--gray-50);
    background: var(--white);
}


.backend td.status-1,
.backend td.status-2,
.backend td.status-3,
.backend td.status-4,
.backend td.status-5,
.backend td.status-6,
.backend td.status-7,
.printer td.status-1,
.printer td.status-2,
.printer td.status-3,
.printer td.status-4,
.printer td.status-5,
.printer td.status-6,
.printer td.status-7 {
    color: var(--primary-color);
    font-weight: 700;
}

.backend tr.status-8 td,
.backend tr.status-9 td,
.printer tr.status-8 td,
.printer tr.status-9 td {
    background-color: var(--gray-100);
}


/* ===== CMS: 見積もり詳細 オーバーライド ===== */

/* 変更ボタン付き summary-row: ラベル横にボタン、金額は右端 */
.backend .summary-row > .btn,
.printer .summary-row > .btn {
    flex-shrink: 0;
    margin-left: 8px;
}

.backend .summary-row > .btn + .summary-value,
.printer .summary-row > .btn + .summary-value {
    margin-left: auto;
}

.backend .order-history-row__status-item > span,
.printer .order-history-row__status-item > span {
    white-space: nowrap;
}

.backend .site-page-content-grid,
.printer .site-page-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.backend .site-page-content-item .form-label-sm,
.printer .site-page-content-item .form-label-sm {
    display: block;
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 4px;
}

.backend .add-adjustment-form-btn,
.printer .add-adjustment-form-btn {
    margin-top: 15px;
}

/* ============================================================
   商品一覧（探し方の切り替え: グッズ / AR / 体験）
   templates/front/estimate/_product_finder.html
   ============================================================ */
.product-finder {
    position: relative;
}

.product-finder__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-finder__eyebrow {
    margin: 0 0 12px;
    color: var(--text-base);
    font-size: var(--font-size-small);
    font-weight: 700;
}

/* 探し方タブ */
.finder-axis-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.finder-axis-tab {
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: 0.15s ease;
}

.finder-axis-tab:hover {
    border-color: var(--gray-400);
}

.finder-axis-tab__title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-bold);
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.4;
}

.finder-axis-tab__num {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.finder-axis-tab__desc {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

#finder-axis-goods:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-goods"],
#finder-axis-ar:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-ar"],
#finder-axis-experience:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-experience"] {
    border-color: var(--primary-color);
    background: var(--light-primary-color);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

#finder-axis-goods:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-goods"] .finder-axis-tab__title,
#finder-axis-ar:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-ar"] .finder-axis-tab__title,
#finder-axis-experience:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-experience"] .finder-axis-tab__title {
    color: var(--primary-color);
}

#finder-axis-goods:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-goods"] .finder-axis-tab__num,
#finder-axis-ar:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-ar"] .finder-axis-tab__num,
#finder-axis-experience:checked ~ .finder-axis-tabs .finder-axis-tab[for="finder-axis-experience"] .finder-axis-tab__num {
    background: var(--primary-color);
    color: var(--white);
}

/* パネルの切り替え */
.finder-axis-panels {
    margin-top: 18px;
}

.finder-axis-panel {
    display: none;
}

#finder-axis-goods:checked ~ .finder-axis-panels #finder-panel-goods,
#finder-axis-ar:checked ~ .finder-axis-panels #finder-panel-ar,
#finder-axis-experience:checked ~ .finder-axis-panels #finder-panel-experience {
    display: block;
}

.finder-axis-context {
    padding: 4px 2px 16px;
    border-bottom: 1px solid var(--gray-300);
}

.finder-axis-context__title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-h1-sub);
    font-weight: 700;
}

.finder-axis-context__desc {
    margin: 3px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-small);
}

/* カテゴリのページ内リンク */
.finder-category-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.finder-category-nav__label {
    margin-right: 4px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.finder-category-tab {
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: var(--white);
    color: var(--text-base);
    font-size: var(--font-size-small);
    font-weight: 700;
    transition: 0.15s ease;
}

.finder-category-tab:hover {
    border-color: var(--gray-400);
    color: var(--primary-color);
    background: var(--gray-50);
}

.finder-category-panels {
    margin-top: 24px;
}

.finder-category-content {
    scroll-margin-top: calc(var(--header-height) + 24px);
    padding-top: 4px;
}

.finder-category-content + .finder-category-content {
    margin-top: 42px;
    padding-top: 34px;
    border-top: 1px solid var(--gray-300);
}

.finder-list-head {
    margin-bottom: 14px;
}

.finder-list-head__title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.finder-list-head__desc {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

/* 商品カード */
.finder-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
}

.finder-product-grid--ar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finder-product-card {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.finder-product-card__visual {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    background: var(--gray-100);
    box-shadow: 0 8px 18px rgba(22, 39, 75, 0.05);
    transition: 0.15s ease;
}

.finder-product-card__visual img,
.finder-product-card__visual video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.finder-product-card__visual .no-image-placeholder {
    position: absolute;
    inset: 0;
}

.finder-product-card:hover .finder-product-card__visual {
    border-color: var(--gray-400);
    box-shadow: 0 10px 22px rgba(22, 68, 128, 0.08);
}

.finder-product-card__title {
    margin: 10px 0 0;
    color: var(--primary-color);
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

/* AR演出カード */
.finder-product-card--ar .finder-product-card__visual {
    aspect-ratio: 3 / 5;
    max-width: 160px;
    margin: 0 auto;
    background: linear-gradient(145deg, var(--light-primary-color), var(--gray-100));
}

@media (max-width: 768px) {
    .finder-axis-tabs {
        grid-template-columns: 1fr;
    }

    .finder-axis-tab {
        min-height: 0;
        padding: 12px 14px;
    }

    .finder-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .finder-product-grid--ar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .finder-product-card--ar .finder-product-card__visual {
        max-width: 110px;
    }

    .finder-product-card__title {
        font-size: var(--font-size-h5);
    }

    .finder-category-content + .finder-category-content {
        margin-top: 30px;
        padding-top: 24px;
    }
}

/* ARから探す: AR カードの選択状態と、対応商品のインライン展開 */
.finder-product-card--ar {
    cursor: pointer;
}

.finder-product-card--ar.is-selected .finder-product-card__visual {
    border-color: var(--primary-color);
    box-shadow: inset 0 0 0 2px var(--primary-color), 0 8px 18px rgba(22, 39, 75, 0.05);
}

.finder-product-card--ar.is-selected .finder-product-card__visual::after {
    content: "選択中";
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--white);
    font-size: var(--font-size-xxs);
    font-weight: 700;
}

.finder-product-card__meta {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: var(--font-size-xxs);
    text-align: center;
}

.finder-ar-hint {
    margin: 16px 0 0;
    padding: 12px;
    border: 1px dashed var(--gray-400);
    border-radius: 8px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    text-align: center;
}

.finder-ar-result {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--gray-300);
}

.finder-ar-result__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.finder-ar-result__title {
    margin: 0;
    color: var(--text-bold);
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.finder-ar-result__title strong {
    color: var(--primary-color);
}

.finder-ar-result__title small {
    margin-left: 8px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
    font-weight: 400;
}

.finder-ar-result__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: var(--font-size-small);
    font-weight: 700;
}

.finder-ar-result__links a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.finder-ar-result__desc {
    margin: 4px 0 14px;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

@media (max-width: 768px) {
    .finder-ar-result {
        margin-top: 18px;
        padding-top: 18px;
    }
}

/* 見積もりサイドバー: 完了済みステップのラベルは戻るリンク */
.step__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--gray-400);
}

.step__link:hover {
    color: var(--primary-color);
    text-decoration-color: var(--primary-color);
}

/* 著作権情報フォームの注記 */
.copyright-note-em {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== ここから orderhub-cf 独自（移行元 develop ee16840 版の後ろに追加。重なるセレクタは後勝ち） ===== */
/* 商品詳細: カラー・素材バリエーション（material.image） */
.pdd-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.pdd-swatch-grid figure {
    margin: 0;
}

.pdd-swatch-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.pdd-swatch-grid figcaption {
    margin-top: 6px;
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.pdd-swatch-grid figcaption strong {
    display: block;
    font-weight: 600;
}

.pdd-swatch-grid figcaption span {
    display: block;
    color: var(--text-light);
}

/* 見積 STEP3: 選択中の素材の見本画像 */
.material-swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 0;
}

.material-swatch img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.material-swatch figcaption {
    font-size: var(--font-size-small);
    color: var(--text-light);
}

/* カタログのセクション（0010 service.catalog_layout = kind / category。flat では出ない） */
.catalog-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.catalog-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: #fff;
    color: var(--text-color);
    font-size: var(--font-size-small);
    text-decoration: none;
}

.catalog-nav a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.catalog-nav-count {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--gray-100, #f3f4f6);
    color: var(--text-light);
    font-size: 11px;
}

.card.catalog-section + .card.catalog-section {
    margin-top: 28px;
}

.catalog-section-hd {
    margin: 0 0 8px;
}

.catalog-section-hd h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    font-size: var(--font-size-h2);
    color: var(--text-color);
}

.catalog-kind-sub {
    font-size: var(--font-size-small);
    font-weight: 400;
    color: var(--text-light);
}

.catalog-section-lead {
    margin: 8px 0 0;
    font-size: var(--font-size-small);
    line-height: 1.7;
    color: var(--text-light);
}

.base-type-chip {
    display: inline-block;
    margin-top: 14px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--gray-100, #f3f4f6);
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
}

.base-type-chip + .base-type-name {
    margin-top: 6px;
}

/* 見積 STEP3: 素材未選択のあいだは見本画像を出さない（display:flex が hidden 属性に勝つのを防ぐ） */
.material-swatch[hidden] {
    display: none;
}

/* サイドバー「見積もりを作成」配下の常時展開サブメニュー（素材から選ぶ / 製品から選ぶ） */
.sidebar-nav li.sidebar-static-sub .sidebar-sub-nav {
    display: block;
    margin: 2px 0 4px 0;
    padding-left: 30px;
}

.sidebar-nav li.sidebar-static-sub .sidebar-sub-nav li a {
    justify-content: flex-start;
    gap: 6px;
    padding: 6px 10px;
    font-size: var(--font-size-small);
}

.sidebar-nav li.sidebar-static-sub .sidebar-sub-nav li a::before {
    content: "›";
    color: var(--text-light);
}

/* 注文オプション（セット・同梱）: ラジオとラベル文言を同じ行に（左揃え） */
#id_option > div > label {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
}

/* .order-option-check-input はコンテナ用の grid 指定が input に当たっている（移行元からの構造差）ため、ラジオの大きさを固定して打ち消す */
#id_option > div > label input[type="radio"].order-option-check-input {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    order: 0;
    accent-color: var(--primary-color);
    -webkit-appearance: radio;
    appearance: radio;
    border: 0;
    background: none;
}

/* 見積もり名: 「発行元 / 宛先情報を個別に指定する」のチェックボックスをラベル文言と同じ行に */
.form-wrap .checkbox-label {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

/* 見積メニューの要約: 横スクロールせず折り返す */
.summary-scroll {
    overflow-x: visible;
    padding-bottom: 8px;
}

.chip--long {
    white-space: normal;
    word-break: break-all;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* 商品詳細: 見積を伴わない商品種別（機材など）の案内 */
.pdd-inquiry-note {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--gray-50, #f9fafb);
    color: var(--text-light);
    font-size: var(--font-size-small);
    line-height: 1.7;
}

/* 商品詳細: Amazon 風のホバー拡大（レンズ + 右側の拡大パネル。detail_script.txt が生成） */
.card.pdd-product-card {
    position: relative;
}

.pdd-media-frame {
    cursor: crosshair;
}

.pdd-zoom-lens {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    z-index: 3;
}

.pdd-zoom-pane {
    position: absolute;
    z-index: 20;
    box-sizing: border-box;
    border: 1px solid var(--gray-300);
    border-radius: 7px;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.pdd-zoom-lens[hidden],
.pdd-zoom-pane[hidden] {
    display: none;
}

.pdd-zoom-pane.is-loading::after {
    content: "読み込み中…";
    position: absolute;
    right: 10px;
    bottom: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
}

/* =========================================================
   ホームのヒーロー・バナー・商品タブ（0013 banner。2026-10-02）
   banner テーブルに行がある サービスだけで出る（他サービスは空なので影響しない）
   ========================================================= */

/* ---------- ヒーロー ---------- */
.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    min-height: 260px;
    margin: 0 0 20px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gray-100, #f3f4f6);
}

.home-hero__media {
    grid-area: 1 / 1;
    height: 100%;
}

.home-hero__media img {
    display: block;
    width: 100%;
    /* 画像の縦横比のままだと 1,400px 幅で 790px になり、バナーが完全に折り返しの下へ行く。
       高さを抑えて object-fit: cover で切り出す（文字を置く左側は無地なので切れて困る要素が無い） */
    height: 100%;
    max-height: 440px;
    object-fit: cover;
    object-position: right center;
}

.home-hero {
    max-height: 440px;
}

.home-hero__body {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    /* 見出しが 1 行に収まる幅。狭いと「アクリルを、1枚か / ら、…」のように助詞の途中で折れる */
    max-width: 680px;
    padding: 28px 32px;
}

/* 画像の上に文字を置くため、左側にだけ白のグラデーションを敷いて可読性を確保する */
.home-hero::before {
    content: "";
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.92) 38%, rgba(255, 255, 255, 0) 72%);
}

.home-hero__title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text-bold, #1f2937);
    letter-spacing: 0.02em;
    /* 折り返すときは文節の切れ目（読点など）で折る。未対応ブラウザは従来どおりの文字単位の折り返し。
       text-wrap: balance は行数を揃えるために助詞の途中で折ってしまうので使わない */
    word-break: auto-phrase;
}

.home-hero__sub {
    margin: 0 0 18px;
    font-size: var(--font-size-small);
    line-height: 1.7;
    color: var(--text-base, #4b5563);
}

.home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 0;
        grid-template-rows: auto auto;
    }

    .home-hero__media {
        grid-area: 1 / 1;
    }

    .home-hero__media img {
        aspect-ratio: 16 / 9;
        height: auto;
        object-position: center;
    }

    /* スマホは画像の上に重ねず、画像の下に文字を置く（小さい画面で文字が写真に埋もれるため） */
    .home-hero::before {
        display: none;
    }

    .home-hero__body {
        grid-area: 2 / 1;
        max-width: none;
        padding: 16px 16px 20px;
        background: #fff;
    }

    .home-hero__title {
        font-size: 21px;
    }

    .home-hero,
    .home-hero__media img {
        max-height: none;
    }

    .home-hero__media img {
        max-height: 56vw;
    }
}

/* ---------- バナー ---------- */
.home-bnr {
    margin: 0 0 26px;
}

.home-bnr__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-bnr__link {
    display: block;
    height: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.home-bnr__link:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.home-bnr__media {
    display: block;
    aspect-ratio: 3 / 2;
    background: var(--gray-100, #f3f4f6);
}

.home-bnr__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-bnr__media .no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--gray-600);
}

.home-bnr__body {
    display: block;
    padding: 11px 14px 13px;
}

.home-bnr__title {
    display: block;
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-bold, #1f2937);
}

.home-bnr__ext {
    margin-left: 5px;
    font-size: 11px;
    color: var(--text-light);
    vertical-align: 1px;
}

.home-bnr__sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-light);
}

@media (max-width: 900px) {
    .home-bnr__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .home-bnr__list {
        gap: 10px;
    }

    .home-bnr__body {
        padding: 9px 11px 11px;
    }
}

/* ---------- 商品一覧のタブ（ホームのみ。商品一覧ページは従来どおりアンカー）
   EC の絞り込みチップ風に（2026-10-02 ユーザー指示）。選択中はテーマ色のピル + 影 ---------- */
.catalog-nav--tabs {
    gap: 10px;
    margin-bottom: 22px;
    /* 影が上下で切れないぶんの余白 */
    padding: 4px 2px 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    /* スマホで横スクロールさせる。スクロールバーは出さない */
    scrollbar-width: none;
}

.catalog-nav--tabs::-webkit-scrollbar {
    display: none;
}

.catalog-nav--tabs .catalog-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: var(--white);
    color: var(--text-base);
    font-size: var(--font-size-small);
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.catalog-nav--tabs .catalog-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.catalog-nav--tabs .catalog-tab:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.catalog-nav--tabs .catalog-tab .catalog-nav-count {
    min-width: 22px;
    padding: 1px 8px;
    background: var(--gray-100);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.catalog-nav--tabs .catalog-tab.is-active,
.catalog-nav--tabs .catalog-tab.is-active:hover {
    border-color: transparent;
    background: var(--primary-color);
    color: var(--white);
    /* color-mix 未対応ブラウザ向けに無彩色の影を先に置く */
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.16);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--primary-color) 32%, transparent);
}

.catalog-nav--tabs .catalog-tab.is-active .catalog-nav-count {
    background: rgba(255, 255, 255, 0.24);
    color: var(--white);
}

@media (max-width: 768px) {
    .catalog-nav--tabs .catalog-tab {
        padding: 9px 16px;
    }
}

/* 「全て」以外（1 セクションだけ表示）のときに、隠れたセクションのぶんの余白を残さない。
   「全て」では隠れたセクションが無いので通常どおり 28px 空く */
.card.catalog-section.catalog-pane[hidden] + .card.catalog-section.catalog-pane {
    margin-top: 0;
}

/* hidden 属性は UA スタイルの display:none で効くが、.card が display を指定しているため
   作者スタイル側で上書きし直す（これが無いと全パネルが出たままになる） */
.card.catalog-section.catalog-pane[hidden] {
    display: none;
}

/* メッセージ（flash）の位置を移行元に合わせる。
   移行元 base.html は main 内を「sub_header（.page-header）→ .messages → content」の順で描画するが、
   移設版はページヘッダーが各ページの本文側にあり、レイアウトが .messages を main の先頭に出すため
   ヘッダーの上に出てしまう。main を縦フレックスにしてページヘッダーだけ先頭へ送り、描画順を揃える。 */
.layout > main {
    display: flex;
    flex-direction: column;
}

/* フレックス化で子が fit-content 幅に縮むのを防ぎ、ブロック配置と同じ幅に戻す
   （.container は width 自動 + margin:0 auto のため、auto マージンがあると stretch されない）。
   main 直下の通常フローの子はこの 2 種類だけで、他は position:fixed のモーダル類と script */
.layout > main > .container,
.layout > main > .messages {
    width: 100%;
}

.layout > main > .page-header {
    order: -1;
}

/* =========================================================
   TOP の EC レイアウト（2026-10-02 ユーザー確認済み）
   ヒーローとバナー（3 枚・1 行）は画面全幅、その下を「商品一覧（左）+ メニュー（右）」の 2 カラムにする。
   PC では左の固定サイドバーを隠し（.public-sidebar--pc-hidden）、スマホは従来どおり
   ハンバーガーのサイドバーを使う（右カラムは出さない）
   ========================================================= */

/* 左サイドバー分の余白を外して main を全幅にする */
.layout--wide {
    margin-left: 0;
}

@media (min-width: 769px) {
    .sidebar.public-sidebar--pc-hidden {
        display: none;
    }
}

/* ヒーロー + バナーの全幅ブロック（main は縦フレックスなので幅を明示する） */
.layout > main > .home-top {
    width: 100%;
}

/* ---------- 全幅ヒーロー ---------- */
.home-hero--full {
    margin: 0;
    border-radius: 0;
    min-height: 320px;
    max-height: 480px;
}

.home-hero--full .home-hero__media img {
    max-height: 480px;
}

/* 全幅では白のグラデーションを左 1/2 までに留める（画面が広いほど写真が隠れてしまうため） */
.home-hero--full::before {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 26%, rgba(255, 255, 255, 0) 58%);
}

/* 文字は画面左端ではなく、下のコンテンツ（.page-home の 1400px）と同じ位置から始める */
.home-hero--full .home-hero__body {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px;
}

.home-hero--full .home-hero__title,
.home-hero--full .home-hero__sub {
    max-width: 640px;
}

@media (max-width: 768px) {
    .home-hero--full {
        min-height: 0;
        max-height: none;
    }

    .home-hero--full .home-hero__media img {
        max-height: 56vw;
    }

    .home-hero--full .home-hero__body {
        padding: 16px 16px 20px;
    }
}

/* ---------- 全幅バナー（1 行 3 枚） ---------- */
.home-bnr--full {
    margin: 18px 0 6px;
    padding: 0 20px;
}

/* 3 枚を必ず 1 行で出す（既定の .home-bnr__list は 900px 以下で 2 列になり 3 枚目が折り返すため） */
.home-bnr--full .home-bnr__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 広い画面で 3 / 2 のままだと 1 枚 400px 超になるので横長にして高さを抑える
   （max-height で抑えると Chrome が aspect-ratio から幅も縮めてしまい、カードの右が余る） */
.home-bnr--full .home-bnr__media {
    width: 100%;
    aspect-ratio: 8 / 3;
}

@media (max-width: 700px) {
    /* 横 3 列だと 1 枚が 100px 程になるため縦に積む */
    .home-bnr--full .home-bnr__list {
        grid-template-columns: 1fr;
    }

    .home-bnr--full .home-bnr__media {
        aspect-ratio: 5 / 2;
    }
}

