#tdop-order-app,
#tdop-order-app * {
  box-sizing: border-box;
}

#tdop-order-app {
  --tdop-ink: #1a1209;
  --tdop-gold: #b8942a;
  --tdop-gold-light: #e8c96a;
  --tdop-gold-pale: #fdf8ee;
  --tdop-red: #c0392b;
  --tdop-cream: #faf7f2;
  --tdop-warm-gray: #8a7e72;
  --tdop-border: #d4c4a0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--tdop-ink);
  background: var(--tdop-cream);
  width: 100%;
  min-height: 780px;
}

#tdop-order-app button,
#tdop-order-app input,
#tdop-order-app select,
#tdop-order-app textarea {
  font-family: inherit;
}

.tdop-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--tdop-ink);
  color: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,.24);
}

.tdop-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
}

.tdop-brand-main {
  color: var(--tdop-gold-light);
  font-size: 22px;
  letter-spacing: .15em;
  font-weight: 700;
}

.tdop-brand-sub {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  letter-spacing: .08em;
}

.tdop-price-badge {
  background: rgba(184,148,42,.18);
  border: 1px solid rgba(232,201,106,.55);
  border-radius: 999px;
  color: var(--tdop-gold-light);
  font-size: 13px;
  padding: 6px 12px;
  white-space: nowrap;
}

.tdop-tabs {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--tdop-gold);
  border-radius: 8px;
  overflow: hidden;
}

.tdop-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 16px;
  border: 0;
  border-right: 1px solid var(--tdop-gold);
  background: transparent;
  color: var(--tdop-gold-light);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tdop-tab:last-child { border-right: 0; }
.tdop-tab.is-active { background: var(--tdop-gold); color: var(--tdop-ink); }
.tdop-tab:hover:not(.is-active) { background: rgba(184,148,42,.15); }

.tdop-notice {
  margin: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.tdop-notice-warning { background: #fff8e5; border: 1px solid #e6c76d; }

.tdop-view { display: none; }
.tdop-view.is-active { display: block; }

.tdop-main {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
}

.tdop-content {
  flex: 1;
  min-width: 0;
}

.tdop-card {
  background: #fff;
  border: 1px solid rgba(212,196,160,.76);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.tdop-section-title {
  margin: 0 0 14px;
  border-bottom: 1px solid var(--tdop-border);
  padding-bottom: 9px;
  color: var(--tdop-gold);
  font-size: 16px;
  letter-spacing: .08em;
}

.tdop-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tdop-info-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--tdop-warm-gray);
  font-size: 12px;
  font-weight: 700;
}

.tdop-info-grid label span {
  display: inline-block;
  margin-left: 4px;
  color: var(--tdop-red);
  font-size: 11px;
}

.tdop-info-grid .tdop-full { grid-column: 1 / -1; }

.tdop-info-grid input,
.tdop-info-grid select,
.tdop-info-grid textarea {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--tdop-border);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--tdop-ink);
  font-size: 14px;
  outline: none;
}

.tdop-info-grid textarea {
  min-height: 70px;
  resize: vertical;
}

.tdop-info-grid input:focus,
.tdop-info-grid select:focus,
.tdop-info-grid textarea:focus {
  border-color: var(--tdop-gold);
  box-shadow: 0 0 0 3px rgba(184,148,42,.12);
}

.tdop-zip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.tdop-zip-button {
  min-height: 39px;
  border: 1px solid var(--tdop-gold);
  border-radius: 7px;
  padding: 8px 14px;
  background: var(--tdop-ink);
  color: var(--tdop-gold-light);
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
}

.tdop-zip-button:hover { background: #302616; }
.tdop-zip-button:disabled { opacity: .55; cursor: wait; }

.tdop-zip-status {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tdop-warm-gray);
}

.tdop-zip-status.is-success { color: #188052; }
.tdop-zip-status.is-error { color: var(--tdop-red); }
.tdop-zip-status.is-loading { color: var(--tdop-gold); }


.tdop-table-wrap {
  overflow: auto;
}

.tdop-product-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.tdop-product-table thead tr {
  background: var(--tdop-ink);
  color: #fff;
}

.tdop-product-table th,
.tdop-product-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(212,196,160,.78);
  vertical-align: middle;
}

.tdop-product-table th {
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
}

.tdop-product-table th:first-child,
.tdop-product-table td:first-child { text-align: left; }

.tdop-product-table td { text-align: center; }
.tdop-product-table .tdop-right { text-align: right; }

.tdop-cat-row td {
  background: linear-gradient(to right, var(--tdop-ink), #302616);
  color: var(--tdop-gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: left;
}

.tdop-product-name {
  font-weight: 700;
  line-height: 1.45;
}

.tdop-tier-note {
  margin-top: 4px;
  color: var(--tdop-warm-gray);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
}

.tdop-tier-current {
  margin-top: 2px;
  color: var(--tdop-warm-gray);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}
.tdop-tax-badge {
  display: inline-block;
  margin-left: 6px;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--tdop-red);
  color: #fff;
  font-size: 11px;
}

.tdop-regular-price {
  color: var(--tdop-warm-gray);
  text-decoration: line-through;
  white-space: nowrap;
}

.tdop-applied-price {
  color: var(--tdop-gold);
  font-weight: 800;
  white-space: nowrap;
}

.tdop-qty {
  width: 72px;
  min-height: 34px;
  border: 1px solid var(--tdop-border);
  border-radius: 7px;
  padding: 6px;
  text-align: center;
  outline: none;
}
.tdop-qty:focus { border-color: var(--tdop-gold); box-shadow: 0 0 0 3px rgba(184,148,42,.12); }

.tdop-has-qty { background: var(--tdop-gold-pale); }

.tdop-line-total { font-weight: 800; text-align: right !important; white-space: nowrap; }
.tdop-line-total.is-zero { color: #c7c7c7; font-weight: 500; }

.tdop-summary {
  position: sticky;
  top: 78px;
  width: 310px;
  flex: 0 0 310px;
  background: var(--tdop-ink);
  color: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
}

.tdop-summary h2 {
  margin: 0 0 14px;
  color: var(--tdop-gold-light);
  font-size: 17px;
  letter-spacing: .08em;
}

.tdop-summary-items {
  min-height: 56px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding-bottom: 10px;
}

.tdop-empty {
  margin: 16px 0;
  text-align: center;
  color: rgba(255,255,255,.38);
  font-size: 13px;
}

.tdop-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dotted rgba(255,255,255,.15);
  padding: 6px 0;
  font-size: 13px;
}

.tdop-summary-item span:first-child { color: rgba(255,255,255,.72); }
.tdop-summary-item strong { white-space: nowrap; }

.tdop-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
}

.tdop-summary-line span { color: rgba(255,255,255,.7); }
.tdop-summary-line strong { color: #fff; }
.tdop-summary-line.tdop-tax { padding-left: 14px; font-size: 13px; }
.tdop-summary-line.tdop-tax span { color: #d0a55d; }

#tdop-shipping {
  width: 100px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 6px 8px;
  background: #2a2010;
  color: #fff;
  text-align: right;
}

.tdop-shipping-note {
  display: none;
  margin: 8px 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(192,57,43,.14);
  border: 1px solid rgba(192,57,43,.36);
  color: #f0a098;
  font-size: 12px;
  line-height: 1.55;
}

.tdop-grand {
  margin: 12px 0 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tdop-gold);
  color: var(--tdop-ink);
  border-radius: 8px;
  font-weight: 900;
}

.tdop-grand strong { font-size: 24px; }

.tdop-primary,
.tdop-secondary {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .04em;
}

.tdop-primary {
  width: 100%;
  background: #fff;
  color: var(--tdop-ink);
}

.tdop-primary:hover { background: var(--tdop-gold-light); }

.tdop-secondary {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: transparent;
  color: rgba(255,255,255,.7);
}

.tdop-secondary:hover { border-color: var(--tdop-red); color: #f0a098; }

.tdop-next-note {
  margin: 12px 0 0;
  color: rgba(255,255,255,.46);
  font-size: 12px;
  line-height: 1.6;
}

.tdop-print-actions {
  max-width: 980px;
  margin: 16px auto 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}

.tdop-print-actions .tdop-primary,
.tdop-print-actions .tdop-secondary {
  width: auto;
  margin-top: 0;
}
.tdop-print-actions .tdop-primary { background: var(--tdop-ink); color:#fff; }
.tdop-print-actions .tdop-secondary { background:#fff; color:var(--tdop-ink); border:1px solid var(--tdop-border); }
.tdop-print-actions span { color: var(--tdop-warm-gray); font-size: 12px; }

.tdop-print-page {
  max-width: 980px;
  margin: 16px auto 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 22px rgba(0,0,0,.11);
  padding: 26px;
}

.tdop-print-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 2px solid var(--tdop-ink);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.tdop-print-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: .12em;
}
.tdop-print-head p { margin: 4px 0 0; color: var(--tdop-warm-gray); }
.tdop-print-date { font-size: 13px; color: var(--tdop-warm-gray); }

.tdop-info-table,
.tdop-print-table,
.tdop-print-total {
  width: 100%;
  border-collapse: collapse;
}

.tdop-info-table th,
.tdop-info-table td,
.tdop-print-table th,
.tdop-print-table td,
.tdop-print-total th,
.tdop-print-total td {
  border: 1px solid #d9d2c4;
  padding: 8px;
  font-size: 13px;
}

.tdop-info-table th,
.tdop-print-total th {
  background: #f2eee6;
  color: #4d4438;
  width: 125px;
  text-align: left;
}

.tdop-print-table {
  margin-top: 14px;
}
.tdop-print-table th {
  background: var(--tdop-ink);
  color: #fff;
  font-weight: 700;
}
.tdop-print-table td { text-align: right; }
.tdop-print-table td:first-child { text-align: left; }
.tdop-print-table tr:nth-child(even) td { background: #fbfaf7; }
.tdop-print-cat-row td { background:#302616 !important; color:var(--tdop-gold-light); text-align:left !important; font-weight:800; }

.tdop-print-total-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.tdop-print-total { width: 330px; }
.tdop-print-total td { text-align: right; font-weight: 800; }
.tdop-total-row th,
.tdop-total-row td { background: var(--tdop-ink); color: var(--tdop-gold-light); font-size: 16px; }

.tdop-print-remarks {
  margin-top: 14px;
}
.tdop-print-remarks div {
  min-height: 58px;
  border: 1px solid #d9d2c4;
  border-radius: 6px;
  padding: 10px;
  margin-top: 5px;
  white-space: pre-wrap;
}

.tdop-print-notes {
  margin: 14px 0 0;
  color: var(--tdop-warm-gray);
  font-size: 12px;
  line-height: 1.75;
}

@media (max-width: 960px) {
  .tdop-topbar {
    position: relative;
    flex-wrap: wrap;
  }
  .tdop-tabs {
    width: 100%;
    margin-left: 0;
  }
  .tdop-tab { flex: 1; }
  .tdop-main {
    flex-direction: column;
  }
  .tdop-summary {
    position: relative;
    top: auto;
    width: 100%;
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  .tdop-info-grid { grid-template-columns: 1fr; }
  .tdop-info-grid .tdop-full { grid-column: auto; }
  .tdop-zip-row { grid-template-columns: minmax(0, 1fr) 92px; gap: 6px; }
  .tdop-zip-button { padding: 8px 8px; font-size: 12px; }
  .tdop-main { padding: 12px; }
  .tdop-card { padding: 12px; }
  .tdop-price-badge { width: 100%; }
}


/* ============================================================
   v0.2.1 mobile product list fix
   ============================================================ */
@media (max-width: 700px) {
  #tdop-order-app { overflow-x: hidden; }
  .tdop-topbar { padding: 12px; gap: 10px; }
  .tdop-brand { min-width: 0; }
  .tdop-brand-main { font-size: 18px; }
  .tdop-brand-sub { font-size: 10px; }
  .tdop-tabs { border-radius: 7px; }
  .tdop-tab { min-height: 40px; padding: 8px 6px; font-size: 12px; line-height: 1.35; }
  .tdop-table-wrap { overflow: visible; width: 100%; }
  .tdop-product-table { display: block; width: 100%; min-width: 0; border-collapse: separate; font-size: 13px; }
  .tdop-product-table thead { display: none; }
  .tdop-product-table tbody, .tdop-product-table tr { display: block; width: 100%; }
  .tdop-cat-row { margin: 16px 0 8px; }
  .tdop-cat-row td { display: block !important; width: 100%; padding: 10px 12px !important; border: 0 !important; border-radius: 8px; }
  .tdop-product-table tr:not(.tdop-cat-row) { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0 12px; padding: 12px; border: 1px solid rgba(212,196,160,.78); border-radius: 10px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.035); }
  .tdop-product-table tr.tdop-has-qty:not(.tdop-cat-row) { background: var(--tdop-gold-pale); }
  .tdop-product-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 0 !important; border-bottom: 0 !important; text-align: right; min-width: 0; }
  .tdop-product-table td:first-child { display: block; text-align: left; padding-bottom: 6px !important; border-bottom: 1px solid rgba(212,196,160,.55) !important; }
  .tdop-product-name { font-size: 15px; line-height: 1.55; letter-spacing: .03em; word-break: break-word; }
  .tdop-product-table td:nth-child(2)::before,
  .tdop-product-table td:nth-child(3)::before,
  .tdop-product-table td:nth-child(4)::before,
  .tdop-product-table td:nth-child(5)::before,
  .tdop-product-table td:nth-child(6)::before { display: inline-block; min-width: 72px; color: var(--tdop-warm-gray); font-size: 12px; font-weight: 700; text-align: left; }
  .tdop-product-table td:nth-child(2)::before { content: "内容量"; }
  .tdop-product-table td:nth-child(3)::before { content: "定価"; }
  .tdop-product-table td:nth-child(4)::before { content: "価格"; }
  .tdop-product-table td:nth-child(5)::before { content: "数量"; }
  .tdop-product-table td:nth-child(6)::before { content: "小計"; }
  .tdop-regular-price, .tdop-applied-price, .tdop-line-total { white-space: nowrap; }
  .tdop-qty { width: 96px; min-height: 40px; font-size: 16px; }
  .tdop-print-actions { flex-wrap: wrap; }
  .tdop-print-page { margin: 12px; padding: 14px; }
  .tdop-print-head { flex-direction: column; }
  .tdop-print-total-wrap { justify-content: stretch; }
  .tdop-print-total { width: 100%; }
}
@media print {
  body * { visibility: hidden !important; }
  #tdop-order-app,
  #tdop-order-app * { visibility: visible !important; }
  #tdop-order-app { background:#fff !important; }
  .tdop-topbar,
  .tdop-view#tdop-view-sim,
  .tdop-print-actions { display:none !important; }
  #tdop-view-print { display:block !important; }
  .tdop-print-page {
    margin:0 !important;
    padding:8mm !important;
    box-shadow:none !important;
    max-width:none !important;
    border-radius:0 !important;
  }
}

/* ============================================================
   v0.2.2 usability fixes
   - hide theme sidebar on pages using this shortcode
   - keep view switch buttons always available
   - hide default zero in quantity fields
   ============================================================ */
body.tdop-order-page .sidebar,
body.tdop-order-page #sidebar,
body.tdop-order-page .sideber,
body.tdop-order-page .widget-area,
body.tdop-order-page .sidebar-left,
body.tdop-order-page .sidebar-right,
body.tdop-order-page .sns-share,
body.tdop-order-page .sns-follow,
body:has(#tdop-order-app) .sidebar,
body:has(#tdop-order-app) #sidebar,
body:has(#tdop-order-app) .sideber,
body:has(#tdop-order-app) .widget-area,
body:has(#tdop-order-app) .sidebar-left,
body:has(#tdop-order-app) .sidebar-right,
body:has(#tdop-order-app) .sns-share,
body:has(#tdop-order-app) .sns-follow {
  display: none !important;
}

body.tdop-order-page .content,
body.tdop-order-page .content-in,
body.tdop-order-page .main,
body.tdop-order-page #main,
body.tdop-order-page main,
body.tdop-order-page .article,
body.tdop-order-page .entry-content,
body:has(#tdop-order-app) .content,
body:has(#tdop-order-app) .content-in,
body:has(#tdop-order-app) .main,
body:has(#tdop-order-app) #main,
body:has(#tdop-order-app) main,
body:has(#tdop-order-app) .article,
body:has(#tdop-order-app) .entry-content {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 100% !important;
}

body.tdop-order-page .content-in,
body:has(#tdop-order-app) .content-in {
  justify-content: center !important;
}

#tdop-order-app {
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 88px;
}

.tdop-tabs {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  margin-left: 0;
  background: var(--tdop-ink);
  border: 1px solid var(--tdop-gold);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}

.tdop-tab {
  min-width: 170px;
  min-height: 46px;
}

.tdop-qty:placeholder-shown {
  color: transparent;
}

.tdop-qty:focus {
  color: var(--tdop-ink);
}

@media (max-width: 960px) {
  .tdop-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
  }
}

@media (max-width: 700px) {
  #tdop-order-app {
    padding-bottom: 92px;
  }
  .tdop-tabs {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    border-radius: 10px;
  }
  .tdop-tab {
    min-width: 0;
    flex: 1;
    min-height: 48px;
    font-size: 13px;
  }
  .tdop-topbar {
    padding-bottom: 12px;
  }
  .tdop-qty {
    width: 112px;
  }
}

@media print {
  .tdop-tabs {
    display: none !important;
  }
}

/* ============================================================
   v0.2.3 mobile usability improvements
   - hide Cocoon/mobile footer menu on order pages
   - add category jump chips
   - compact mobile product cards
   - add fixed reset button
   ============================================================ */
body.tdop-order-page .mobile-menu-buttons,
body.tdop-order-page .mobile-menu-button,
body.tdop-order-page .mobile-footer-menu-buttons,
body.tdop-order-page .footer-mobile-buttons,
body.tdop-order-page .footer-mobile-menu,
body.tdop-order-page #footer-mobile-menu,
body.tdop-order-page .navi-menu-button,
body.tdop-order-page .home-menu-button,
body.tdop-order-page .search-menu-button,
body.tdop-order-page .share-menu-button,
body.tdop-order-page .toc-menu-button,
body.tdop-order-page .top-menu-button,
body.tdop-order-page .sidebar-menu-button,
body.tdop-order-page .go-to-top-button,
body.tdop-order-page #go-to-top,
body:has(#tdop-order-app) .mobile-menu-buttons,
body:has(#tdop-order-app) .mobile-menu-button,
body:has(#tdop-order-app) .mobile-footer-menu-buttons,
body:has(#tdop-order-app) .footer-mobile-buttons,
body:has(#tdop-order-app) .footer-mobile-menu,
body:has(#tdop-order-app) #footer-mobile-menu,
body:has(#tdop-order-app) .navi-menu-button,
body:has(#tdop-order-app) .home-menu-button,
body:has(#tdop-order-app) .search-menu-button,
body:has(#tdop-order-app) .share-menu-button,
body:has(#tdop-order-app) .toc-menu-button,
body:has(#tdop-order-app) .top-menu-button,
body:has(#tdop-order-app) .sidebar-menu-button,
body:has(#tdop-order-app) .go-to-top-button,
body:has(#tdop-order-app) #go-to-top {
  display: none !important;
}

.tdop-category-nav {
  position: sticky;
  top: 68px;
  z-index: 18;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: -2px 0 12px;
  padding: 8px 2px 10px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(212,196,160,.55);
}

.tdop-category-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(184,148,42,.55);
  border-radius: 999px;
  background: #fff;
  color: var(--tdop-ink);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.tdop-category-chip:hover {
  background: var(--tdop-gold-pale);
  border-color: var(--tdop-gold);
}

.tdop-cat-row {
  scroll-margin-top: 150px;
}

.tdop-tab-reset {
  color: #f4b0a8;
}

.tdop-tab-reset:hover {
  background: rgba(192,57,43,.18) !important;
}

@media (max-width: 700px) {
  #tdop-order-app {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .tdop-tabs {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
  }

  .tdop-tab {
    min-height: 46px;
    padding: 7px 4px;
    font-size: 12px;
  }

  .tdop-tab-reset {
    flex: .82;
    min-width: 0;
  }

  .tdop-category-nav {
    top: 70px;
    margin: 0 0 10px;
    padding: 7px 1px 9px;
  }

  .tdop-category-chip {
    padding: 7px 10px;
    font-size: 12px;
  }

  .tdop-cat-row {
    scroll-margin-top: 142px;
  }

  .tdop-product-table tr:not(.tdop-cat-row) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 10px;
    margin: 7px 0 10px;
    padding: 10px;
  }

  .tdop-product-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 5px !important;
  }

  .tdop-product-table td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .tdop-product-table td:nth-child(3) {
    grid-column: 1 / 2;
  }

  .tdop-product-table td:nth-child(4) {
    grid-column: 2 / 3;
  }

  .tdop-product-table td:nth-child(5) {
    grid-column: 1 / 2;
  }

  .tdop-product-table td:nth-child(6) {
    grid-column: 2 / 3;
  }

  .tdop-product-table td:nth-child(n+2) {
    min-height: 30px;
    align-items: center;
  }

  .tdop-product-table td:nth-child(2)::before,
  .tdop-product-table td:nth-child(3)::before,
  .tdop-product-table td:nth-child(4)::before,
  .tdop-product-table td:nth-child(5)::before,
  .tdop-product-table td:nth-child(6)::before {
    min-width: 42px;
    font-size: 11px;
  }

  .tdop-product-name {
    font-size: 14px;
    line-height: 1.45;
  }

  .tdop-qty {
    width: 78px;
    min-height: 34px;
    font-size: 16px;
    padding: 4px 6px;
  }

  .tdop-line-total {
    font-size: 13px;
  }
}

/* ============================================================
   v0.2.4 mobile width / category navigation refinements
   - prevent horizontal overflow on narrow smartphones
   - make category buttons wrap instead of being cut off
   - add a product-top chip for easier return after category jumps
   ============================================================ */
#tdop-products-section {
  scroll-margin-top: 96px;
}

.tdop-category-chip-top {
  background: var(--tdop-ink);
  border-color: var(--tdop-ink);
  color: var(--tdop-gold-light);
}

.tdop-category-chip-top:hover {
  background: #2e2416;
  border-color: var(--tdop-gold);
}

@media (max-width: 700px) {
  html,
  body.tdop-order-page {
    overflow-x: hidden !important;
  }

  #tdop-order-app,
  #tdop-order-app .tdop-view,
  #tdop-order-app .tdop-main,
  #tdop-order-app .tdop-content,
  #tdop-order-app .tdop-card,
  #tdop-order-app .tdop-table-wrap,
  #tdop-order-app .tdop-product-table,
  #tdop-order-app .tdop-product-table tbody {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .tdop-main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .tdop-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .tdop-category-nav {
    position: sticky;
    top: 64px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 7px 0 9px;
    z-index: 30;
  }

  .tdop-category-chip {
    width: 100%;
    min-width: 0;
    padding: 7px 6px;
    font-size: 11px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tdop-cat-row,
  #tdop-products-section {
    scroll-margin-top: 118px;
  }

  .tdop-product-table tr:not(.tdop-cat-row) {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
    overflow: hidden;
  }

  .tdop-product-table td {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .tdop-product-table td:nth-child(n+2) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    justify-items: stretch;
    align-items: center;
    min-height: 42px;
    padding: 6px !important;
    border: 1px solid rgba(212,196,160,.42) !important;
    border-radius: 7px;
    text-align: right;
  }

  .tdop-product-table td:nth-child(2) {
    grid-column: 1 / -1;
    min-height: 34px;
  }

  .tdop-product-table td:nth-child(2)::before,
  .tdop-product-table td:nth-child(3)::before,
  .tdop-product-table td:nth-child(4)::before,
  .tdop-product-table td:nth-child(5)::before,
  .tdop-product-table td:nth-child(6)::before {
    min-width: 0;
    width: auto;
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: var(--tdop-warm-gray);
  }

  .tdop-product-name {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .tdop-regular-price,
  .tdop-applied-price,
  .tdop-line-total {
    justify-self: end;
    max-width: 100%;
    font-size: 12px;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tdop-applied-price {
    font-size: 13px;
  }

  .tdop-qty {
    width: 64px !important;
    max-width: 64px;
    min-height: 32px;
    justify-self: end;
    padding: 3px 5px;
    font-size: 15px;
  }

  .tdop-tier-note {
  margin-top: 4px;
  color: var(--tdop-warm-gray);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
}

.tdop-tier-current {
  margin-top: 2px;
  color: var(--tdop-warm-gray);
  font-size: 10px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}
.tdop-tax-badge {
    margin-left: 4px;
    font-size: 10px;
    padding: 1px 4px;
  }
}

@media (max-width: 380px) {
  .tdop-product-table tr:not(.tdop-cat-row) {
    padding: 7px;
    gap: 5px;
  }

  .tdop-product-table td:nth-child(n+2) {
    padding: 5px !important;
  }

  .tdop-regular-price,
  .tdop-applied-price,
  .tdop-line-total {
    font-size: 11px;
  }

  .tdop-applied-price {
    font-size: 12px;
  }

  .tdop-qty {
    width: 58px !important;
    max-width: 58px;
  }

  .tdop-category-chip {
    font-size: 10px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* ============================================================
   v0.2.5 mobile category navigation fix
   - add fixed category button in bottom operation bar
   - add category jump panel that remains available anywhere on product list
   ============================================================ */
.tdop-tab-category {
  display: none;
}

.tdop-mobile-category-backdrop,
.tdop-mobile-category-panel {
  display: none;
}

@media (max-width: 700px) {
  #tdop-order-app {
    padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px));
  }

  .tdop-tab-category {
    display: inline-flex;
  }

  .tdop-tab {
    min-height: 50px;
    padding: 7px 2px;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .tdop-tab-category {
    color: var(--tdop-gold-light);
  }

  .tdop-mobile-category-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99996;
    background: rgba(0, 0, 0, .28);
  }

  .tdop-mobile-category-panel:not([hidden]) {
    display: block;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    z-index: 99997;
    max-height: min(48vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(184,148,42,.55);
    border-radius: 16px;
    box-shadow: 0 14px 42px rgba(0,0,0,.32);
  }

  .tdop-mobile-category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--tdop-ink);
    font-size: 13px;
  }

  .tdop-mobile-category-panel-head button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(184,148,42,.45);
    border-radius: 999px;
    background: #fff;
    color: var(--tdop-ink);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  .tdop-mobile-category-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tdop-mobile-category-panel .tdop-category-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tdop-category-nav .tdop-category-chip-top {
    display: none;
  }
}

@media (max-width: 380px) {
  .tdop-tab {
    font-size: 10.5px;
  }
  .tdop-mobile-category-panel-grid {
    gap: 6px;
  }
}


/* ============================================================
   v0.2.6 desktop header fix
   - disable sticky top header on PC/tablet widths because operation menu is fixed separately
   - keep mobile behavior unchanged
   ============================================================ */
@media (min-width: 701px) {
  .tdop-topbar {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
  }

  .tdop-category-nav {
    top: 0 !important;
  }
}

/* ============================================================
   v0.3.0 order save phase
   ============================================================ */
.tdop-submit-button {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .04em;
  background: var(--tdop-gold);
  color: var(--tdop-ink);
}

.tdop-submit-button:hover { background: var(--tdop-gold-light); }
.tdop-submit-button:disabled { opacity: .58; cursor: wait; }

.tdop-submit-button-inline {
  width: auto;
  margin-top: 0;
}

.tdop-submit-status {
  min-height: 22px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.65);
}

.tdop-submit-status.is-loading { color: var(--tdop-gold-light); }
.tdop-submit-status.is-success { color: #9be5b6; }
.tdop-submit-status.is-error { color: #ffb3aa; }

@media (max-width: 700px) {
  .tdop-print-actions .tdop-submit-button-inline {
    width: 100%;
  }
}


/* ============================================================
   v0.3.2 mobile preview and half-width input usability
   ============================================================ */
@media (max-width: 700px) {
  .tdop-info-table {
    display: block;
    width: 100%;
    table-layout: auto;
  }

  .tdop-info-table tbody,
  .tdop-info-table tr {
    display: block;
    width: 100%;
  }

  .tdop-info-table tr {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    border-left: 1px solid #d9d2c4;
    border-top: 1px solid #d9d2c4;
  }

  .tdop-info-table th,
  .tdop-info-table td {
    display: block;
    width: auto !important;
    min-width: 0;
    border-left: 0;
    border-top: 0;
    font-size: 12px;
    line-height: 1.45;
    padding: 7px 6px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .tdop-info-table th {
    white-space: normal;
  }

  .tdop-info-table td[colspan] {
    grid-column: 2 / -1;
  }

  .tdop-print-page {
    overflow-x: hidden;
  }

  #tdop-tel,
  #tdop-zip {
    ime-mode: disabled;
  }
}

/* ============================================================
   v0.3.3 mobile preview product table fix
   - convert order-detail preview items table into compact cards on smartphones
   - prevent product rows from being cut off horizontally
   ============================================================ */
@media (max-width: 700px) {
  .tdop-print-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
  }

  .tdop-print-table thead {
    display: none;
  }

  .tdop-print-table tbody {
    display: block;
    width: 100%;
  }

  .tdop-print-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 10px;
    padding: 8px;
    border: 1px solid #d9d2c4;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  .tdop-print-table td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 6px !important;
    border: 1px solid rgba(217, 210, 196, .72) !important;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.45;
    text-align: right !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .tdop-print-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--tdop-warm-gray);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
  }

  .tdop-print-table td:nth-child(1) {
    grid-column: 1 / -1;
    text-align: left !important;
    font-weight: 800;
  }
  .tdop-print-table td:nth-child(1)::before { content: "商品名"; }
  .tdop-print-table td:nth-child(2)::before { content: "内容量"; }
  .tdop-print-table td:nth-child(3)::before { content: "定価"; }
  .tdop-print-table td:nth-child(4)::before { content: "単価"; }
  .tdop-print-table td:nth-child(5)::before { content: "注文数"; }
  .tdop-print-table td:nth-child(6)::before { content: "合計"; }

  .tdop-print-table td:nth-child(2),
  .tdop-print-table td:nth-child(3),
  .tdop-print-table td:nth-child(4),
  .tdop-print-table td:nth-child(5),
  .tdop-print-table td:nth-child(6) {
    white-space: normal;
  }

  .tdop-print-table td[colspan] {
    grid-column: 1 / -1;
  }

  .tdop-print-table .tdop-print-cat-row {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    margin: 14px 0 6px;
    border-radius: 0;
  }

  .tdop-print-table .tdop-print-cat-row td {
    display: block;
    width: 100% !important;
    padding: 9px 11px !important;
    border: 0 !important;
    border-radius: 8px;
    text-align: left !important;
    font-size: 13px;
  }

  .tdop-print-table .tdop-print-cat-row td::before {
    display: none;
    content: none;
  }
}

@media (max-width: 380px) {
  .tdop-print-table tr {
    padding: 7px;
    gap: 5px;
  }

  .tdop-print-table td {
    padding: 5px !important;
    font-size: 11px;
  }
}

@media (max-width: 700px) {
  .tdop-tier-note { font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
  .tdop-tier-current { white-space: normal; text-align: right; font-size: 9px; }
}

/* v0.6.4: 注文ページ・履歴ページではCocoon等のパンくずHOMEを非表示。
   CSS :has() 対応ブラウザではページ全体の不要要素も隠します。 */
body:has(#tdop-order-app) .breadcrumb,
body:has(#tdop-order-app) .breadcrumbs,
body:has(#tdop-order-app) #breadcrumb,
body:has(#tdop-order-app) .breadcrumb-area,
body:has(#tdop-order-app) .bread_box,
body:has(#tdop-order-app) .entry-title,
body:has(#tdop-order-app) .date-tags,
body:has(#tdop-order-app) .sns-share,
body:has(#tdop-order-app) .sidebar,
body:has(#tdop-order-app) #sidebar,
body:has(#tdop-order-app) .widget-area,
body:has(.tdop-history-wrap) .breadcrumb,
body:has(.tdop-history-wrap) .breadcrumbs,
body:has(.tdop-history-wrap) #breadcrumb,
body:has(.tdop-history-wrap) .breadcrumb-area,
body:has(.tdop-history-wrap) .bread_box,
body:has(.tdop-history-wrap) .entry-title,
body:has(.tdop-history-wrap) .date-tags,
body:has(.tdop-history-wrap) .sns-share,
body:has(.tdop-history-wrap) .sidebar,
body:has(.tdop-history-wrap) #sidebar,
body:has(.tdop-history-wrap) .widget-area {
  display: none !important;
}

body:has(#tdop-order-app) .main,
body:has(#tdop-order-app) #main,
body:has(#tdop-order-app) .content,
body:has(#tdop-order-app) .content-in,
body:has(#tdop-order-app) .article,
body:has(#tdop-order-app) .entry-content,
body:has(.tdop-history-wrap) .main,
body:has(.tdop-history-wrap) #main,
body:has(.tdop-history-wrap) .content,
body:has(.tdop-history-wrap) .content-in,
body:has(.tdop-history-wrap) .article,
body:has(.tdop-history-wrap) .entry-content {
  width: 100% !important;
  max-width: none !important;
}


/* v0.6.5: 導入者ポータルへの戻り導線 */
#tdop-order-app .tdop-brand-link {
  text-decoration: none;
  color: inherit;
}
#tdop-order-app .tdop-portal-return {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(232,201,106,.55);
  border-radius: 999px;
  color: var(--tdop-gold-light);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
#tdop-order-app .tdop-portal-return:hover {
  background: rgba(232,201,106,.12);
}
.tdop-history-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}
.tdop-history-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg,#0000cd 0%,#1e90ff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,0,80,.14);
}
.tdop-history-brand,
.tdop-history-return {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
}
.tdop-history-return {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 8px 13px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #tdop-order-app .tdop-topbar {
    flex-wrap: wrap;
  }
  #tdop-order-app .tdop-portal-return {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
}
@media (max-width: 640px) {
  .tdop-history-nav {
    display: block;
  }
  .tdop-history-return {
    display: inline-flex;
    margin-top: 10px;
  }
}

/* Cocoon等のパンくずをさらに広く非表示化 */
body:has(#tdop-order-app) [class*="breadcrumb"],
body:has(#tdop-order-app) [id*="breadcrumb"],
body:has(#tdop-order-app) [class*="bread"],
body:has(.tdop-history-wrap) [class*="breadcrumb"],
body:has(.tdop-history-wrap) [id*="breadcrumb"],
body:has(.tdop-history-wrap) [class*="bread"] {
  display: none !important;
}


/* v0.6.7: 全ページ共通の左上ホームアイコンと、テーマ側モバイルフッターメニュー非表示 */
.tdop-floating-home {
  position: fixed;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 14px);
  left: 14px;
  z-index: 999999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #0000cd !important;
  text-decoration: none !important;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 12px 28px rgba(0,0,80,.20);
  border: 1px solid rgba(0,0,205,.12);
  backdrop-filter: blur(10px);
}
.tdop-floating-home svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: currentColor;
}
.tdop-floating-home span {
  font-size: 13px;
  line-height: 1;
}
.tdop-floating-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0,0,80,.26);
}

body:has(.tdop-top-home) .mobile-menu-buttons,
body:has(.tdop-portal-home) .mobile-menu-buttons,
body:has(#tdop-order-app) .mobile-menu-buttons,
body:has(.tdop-history-wrap) .mobile-menu-buttons,
body:has(.tdop-top-home) .mobile-footer-menu,
body:has(.tdop-portal-home) .mobile-footer-menu,
body:has(#tdop-order-app) .mobile-footer-menu,
body:has(.tdop-history-wrap) .mobile-footer-menu,
body:has(.tdop-top-home) .mobile-footer-menu-buttons,
body:has(.tdop-portal-home) .mobile-footer-menu-buttons,
body:has(#tdop-order-app) .mobile-footer-menu-buttons,
body:has(.tdop-history-wrap) .mobile-footer-menu-buttons,
body:has(.tdop-top-home) .navi-footer,
body:has(.tdop-portal-home) .navi-footer,
body:has(#tdop-order-app) .navi-footer,
body:has(.tdop-history-wrap) .navi-footer,
body:has(.tdop-top-home) #navi-footer,
body:has(.tdop-portal-home) #navi-footer,
body:has(#tdop-order-app) #navi-footer,
body:has(.tdop-history-wrap) #navi-footer,
body:has(.tdop-top-home) .go-to-top-button,
body:has(.tdop-portal-home) .go-to-top-button,
body:has(#tdop-order-app) .go-to-top-button,
body:has(.tdop-history-wrap) .go-to-top-button,
body:has(.tdop-top-home) .sidebar-menu-button,
body:has(.tdop-portal-home) .sidebar-menu-button,
body:has(#tdop-order-app) .sidebar-menu-button,
body:has(.tdop-history-wrap) .sidebar-menu-button {
  display: none !important;
}

.tdop-history-nav,
.tdop-history-brand,
.tdop-history-return {
  display: none !important;
}

@media (max-width: 640px) {
  .tdop-floating-home {
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 10px);
    left: 10px;
    min-height: 40px;
    padding: 7px 10px;
  }
  .tdop-floating-home svg {
    width: 22px;
    height: 22px;
  }
  .tdop-floating-home span {
    font-size: 12px;
  }
}


/* v0.6.8: 巨大化したホームアイコンを廃止し、ポータル系ページのテーマUIを強く非表示 */
.tdop-floating-home { display: none !important; }

#tdop-order-app .tdop-portal-return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(232,201,106,.55);
  color: var(--tdop-gold-light);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}
#tdop-order-app .tdop-portal-return-button:hover {
  background: rgba(232,201,106,.12);
}

.tdop-history-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 56px;
}
.tdop-history-clean-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 22px;
  padding: 20px 22px;
  border-radius: 22px;
  background: linear-gradient(135deg,#000064 0%,#0000cd 58%,#1e90ff 100%);
  color: #fff;
  box-shadow: 0 16px 32px rgba(0,0,80,.18);
}
.tdop-history-clean-header h2 {
  margin: 5px 0 0 !important;
  color: #fff !important;
  font-size: clamp(26px, 4vw, 42px) !important;
  line-height: 1.2;
}
.tdop-history-kicker {
  display: block;
  color: rgba(255,255,255,.82);
  font-weight: 800;
  letter-spacing: .08em;
}
.tdop-history-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: #0000cd !important;
  text-decoration: none !important;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0,0,80,.16);
}

/* Cocoon/テーマ側の不要UIを広めに非表示 */
body:has(.tdop-top-home) .mobile-menu-buttons,
body:has(.tdop-portal-home) .mobile-menu-buttons,
body:has(#tdop-order-app) .mobile-menu-buttons,
body:has(.tdop-history-wrap) .mobile-menu-buttons,
body:has(.tdop-top-home) .mobile-footer-menu,
body:has(.tdop-portal-home) .mobile-footer-menu,
body:has(#tdop-order-app) .mobile-footer-menu,
body:has(.tdop-history-wrap) .mobile-footer-menu,
body:has(.tdop-top-home) .mobile-footer-menu-buttons,
body:has(.tdop-portal-home) .mobile-footer-menu-buttons,
body:has(#tdop-order-app) .mobile-footer-menu-buttons,
body:has(.tdop-history-wrap) .mobile-footer-menu-buttons,
body:has(.tdop-top-home) .navi-footer,
body:has(.tdop-portal-home) .navi-footer,
body:has(#tdop-order-app) .navi-footer,
body:has(.tdop-history-wrap) .navi-footer,
body:has(.tdop-top-home) #navi-footer,
body:has(.tdop-portal-home) #navi-footer,
body:has(#tdop-order-app) #navi-footer,
body:has(.tdop-history-wrap) #navi-footer,
body:has(.tdop-top-home) .footer-mobile-buttons,
body:has(.tdop-portal-home) .footer-mobile-buttons,
body:has(#tdop-order-app) .footer-mobile-buttons,
body:has(.tdop-history-wrap) .footer-mobile-buttons,
body:has(.tdop-top-home) .fixed-footer-menu,
body:has(.tdop-portal-home) .fixed-footer-menu,
body:has(#tdop-order-app) .fixed-footer-menu,
body:has(.tdop-history-wrap) .fixed-footer-menu,
body:has(.tdop-top-home) .bottom-menu,
body:has(.tdop-portal-home) .bottom-menu,
body:has(#tdop-order-app) .bottom-menu,
body:has(.tdop-history-wrap) .bottom-menu,
body:has(.tdop-top-home) .go-to-top-button,
body:has(.tdop-portal-home) .go-to-top-button,
body:has(#tdop-order-app) .go-to-top-button,
body:has(.tdop-history-wrap) .go-to-top-button,
body:has(.tdop-top-home) .sidebar-menu-button,
body:has(.tdop-portal-home) .sidebar-menu-button,
body:has(#tdop-order-app) .sidebar-menu-button,
body:has(.tdop-history-wrap) .sidebar-menu-button,
body:has(.tdop-history-wrap) .sidebar,
body:has(.tdop-history-wrap) #sidebar,
body:has(.tdop-history-wrap) .widget-area,
body:has(.tdop-history-wrap) [class*="breadcrumb"],
body:has(.tdop-history-wrap) [id*="breadcrumb"],
body:has(.tdop-history-wrap) [class*="bread"] {
  display: none !important;
}
body:has(.tdop-history-wrap) .main,
body:has(.tdop-history-wrap) #main,
body:has(.tdop-history-wrap) .content,
body:has(.tdop-history-wrap) .content-in,
body:has(.tdop-history-wrap) .article,
body:has(.tdop-history-wrap) .entry-content {
  width: 100% !important;
  max-width: none !important;
}

@media (max-width: 900px) {
  #tdop-order-app .tdop-topbar {
    flex-wrap: wrap;
  }
  #tdop-order-app .tdop-portal-return-button {
    order: 3;
  }
}
@media (max-width: 640px) {
  .tdop-history-wrap {
    padding: 16px 12px 40px;
  }
  .tdop-history-clean-header {
    display: block;
    padding: 18px;
    border-radius: 18px;
  }
  .tdop-history-portal-button {
    margin-top: 12px;
  }
}


/* v0.6.9: ポータル・履歴ページにもCSS/JSを読み込む前提でテーマUI非表示をさらに強化 */
.tdop-top-home ~ .mobile-menu-buttons,
.tdop-portal-home ~ .mobile-menu-buttons,
.tdop-history-wrap ~ .mobile-menu-buttons,
#tdop-order-app ~ .mobile-menu-buttons,
body:has(.tdop-top-home) [class*="mobile"][class*="menu"],
body:has(.tdop-portal-home) [class*="mobile"][class*="menu"],
body:has(#tdop-order-app) [class*="mobile"][class*="menu"],
body:has(.tdop-history-wrap) [class*="mobile"][class*="menu"],
body:has(.tdop-top-home) [class*="footer"][class*="menu"],
body:has(.tdop-portal-home) [class*="footer"][class*="menu"],
body:has(#tdop-order-app) [class*="footer"][class*="menu"],
body:has(.tdop-history-wrap) [class*="footer"][class*="menu"],
body:has(.tdop-top-home) .footer,
body:has(.tdop-portal-home) .footer,
body:has(.tdop-history-wrap) .footer,
body:has(.tdop-top-home) #footer,
body:has(.tdop-portal-home) #footer,
body:has(.tdop-history-wrap) #footer,
body:has(.tdop-history-wrap) aside,
body:has(.tdop-history-wrap) [role="complementary"] {
  display: none !important;
}

body:has(.tdop-history-wrap) .tdop-history-clean-header {
  display: flex !important;
}

body:has(.tdop-history-wrap) .tdop-history-portal-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0000cd !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 22px rgba(0,0,80,.16) !important;
}

body:has(.tdop-history-wrap) .tdop-history-kicker {
  color: rgba(255,255,255,.82) !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
}

body:has(.tdop-history-wrap) .tdop-history-clean-header h2 {
  color: #fff !important;
}

@media (max-width: 640px) {
  body:has(.tdop-top-home),
  body:has(.tdop-portal-home),
  body:has(.tdop-history-wrap) {
    padding-bottom: 0 !important;
  }
}


/* v0.7.1: 未ログインユーザー向けログインボタン */
.tdop-login-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #0000cd !important;
  text-decoration: none !important;
  font-weight: 900;
  letter-spacing: .04em;
  border: 1px solid rgba(0,0,205,.18);
  box-shadow: 0 10px 22px rgba(0,0,80,.16);
  white-space: nowrap;
}
.tdop-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,80,.22);
}
#tdop-order-app .tdop-login-button {
  min-height: 38px;
  padding: 0 14px;
  background: rgba(255,255,255,.96);
}
.tdop-portal-head > .tdop-login-button,
.tdop-top-hero > .tdop-login-button {
  margin-left: auto;
  align-self: flex-start;
}
.tdop-history-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tdop-login-required-card {
  max-width: 760px;
  margin: 32px auto;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #dce6ff;
  box-shadow: 0 12px 28px rgba(0,0,80,.10);
  color: #07142f;
}
.tdop-login-required-card p {
  margin: 0 0 14px;
  line-height: 1.8;
  font-weight: 700;
}

@media (max-width: 900px) {
  .tdop-portal-head > .tdop-login-button,
  .tdop-top-hero > .tdop-login-button {
    margin-left: 0;
  }
}
@media (max-width: 640px) {
  .tdop-login-button {
    min-height: 40px;
    padding: 0 14px;
  }
  .tdop-history-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }
}


/* v1.0.1: 代理店預かり在庫 公開表示 */
.tdop-deposit-public {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}
.tdop-card {
  background: #fff;
  border: 1px solid rgba(0,0,205,.16);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,205,.08);
  padding: 18px;
  margin: 18px 0;
}
.tdop-card h2 {
  margin-top: 0;
  color: #0000cd;
}
.tdop-card h3 {
  margin-bottom: 8px;
}
.tdop-table-wrap {
  overflow-x: auto;
}
.tdop-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.tdop-table th,
.tdop-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 12px;
  vertical-align: top;
}
.tdop-table th {
  background: #f5f7ff;
  text-align: left;
  color: #1d2b80;
}
.tdop-num {
  text-align: right;
  white-space: nowrap;
}
.tdop-small,
.tdop-muted {
  color: #64748b;
  font-size: 13px;
}
.tdop-deposit-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 12px 0 16px;
}
.tdop-deposit-filter input[type="date"] {
  min-height: 38px;
}
.tdop-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}
.tdop-summary-box {
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f7ff, #fff);
  border: 1px solid rgba(0,0,205,.18);
  padding: 14px;
}
.tdop-summary-box span {
  display: block;
  color: #64748b;
  font-size: 13px;
}
.tdop-summary-box strong {
  display: block;
  color: #0000cd;
  font-size: 20px;
  margin-top: 4px;
}
.tdop-deposit-note {
  color: #0f766e;
  font-weight: 700;
}


/* v1.0.2: 管理者向け公開ページ表示 */
.tdop-admin-client-switch {
  border-color: rgba(30,144,255,.35);
  background: linear-gradient(135deg, #ffffff, #f5f9ff);
}
.tdop-deposit-filter select {
  min-height: 38px;
  min-width: min(100%, 360px);
}


/* v1.0.5: 預かり在庫確認ページ 安全版レイアウト */
body.tdop-deposit-page .sidebar,
body.tdop-deposit-page #sidebar,
body.tdop-deposit-page aside.sidebar,
body.tdop-deposit-page .sideber,
body.tdop-deposit-page .widget-area,
body.tdop-deposit-page #sidebar-scroll,
body.tdop-deposit-page .sidebar-scroll,
body.tdop-deposit-page .sidebar-left,
body.tdop-deposit-page .sidebar-right,
body.tdop-deposit-page .breadcrumb,
body.tdop-deposit-page .breadcrumb-category,
body.tdop-deposit-page .under-entry-content,
body.tdop-deposit-page .sns-share,
body.tdop-deposit-page .date-tags,
body.tdop-deposit-page .related-entry,
body.tdop-deposit-page .comment-area {
  display: none !important;
}
body.tdop-deposit-page .content-in,
body.tdop-deposit-page #content-in,
body.tdop-deposit-page .content,
body.tdop-deposit-page #content,
body.tdop-deposit-page .main,
body.tdop-deposit-page #main,
body.tdop-deposit-page main,
body.tdop-deposit-page .article,
body.tdop-deposit-page article,
body.tdop-deposit-page .entry-content {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.tdop-deposit-page .content-in,
body.tdop-deposit-page #content-in {
  display: block !important;
}
body.tdop-deposit-page .tdop-deposit-public {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 834px) {
  body.tdop-deposit-page .mobile-menu-buttons,
  body.tdop-deposit-page .mobile-menu-buttons *,
  body.tdop-deposit-page .footer-mobile-buttons,
  body.tdop-deposit-page .footer-mobile-buttons *,
  body.tdop-deposit-page .mobile-footer-menu,
  body.tdop-deposit-page .mobile-footer-menu *,
  body.tdop-deposit-page .navi-footer,
  body.tdop-deposit-page .navi-footer *,
  body.tdop-deposit-page .footer-menu,
  body.tdop-deposit-page .footer-menu *,
  body.tdop-deposit-page .fixed-footer-menu,
  body.tdop-deposit-page .fixed-footer-menu *,
  body.tdop-deposit-page .footer-floating-menu,
  body.tdop-deposit-page .footer-floating-menu *,
  body.tdop-deposit-page #footer-mobile-menu,
  body.tdop-deposit-page #footer-mobile-menu * {
    display: none !important;
  }
  body.tdop-deposit-page {
    padding-bottom: 0 !important;
  }
}


/* v1.0.9: 認証ボタン・公開注文・取引先プロフィール */
.tdop-auth-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.tdop-register-button,
.tdop-login-button,
.tdop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 700;
}
.tdop-register-button {
  background: #fff;
  color: #0000cd !important;
  border: 1px solid rgba(0,0,205,.25);
}
.tdop-auth-note {
  color: #64748b;
  font-size: 13px;
  margin: 10px 0 0;
}
.tdop-public-order-notice {
  margin: 0 auto 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef4ff, #fff);
  border: 1px solid rgba(0,0,205,.16);
  box-shadow: 0 10px 28px rgba(0,0,205,.08);
}
.tdop-public-order-notice h2 {
  margin: 0 0 8px;
  color: #0000cd;
}
.tdop-client-profile-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px;
}
.tdop-profile-hero,
.tdop-profile-card {
  background: #fff;
  border: 1px solid rgba(0,0,205,.14);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0,0,205,.08);
  padding: 18px;
  margin: 18px 0;
}
.tdop-profile-hero {
  background: linear-gradient(135deg, #0000cd, #2e8bff);
  color: #fff;
}
.tdop-profile-hero h1,
.tdop-profile-hero p {
  color: #fff;
}
.tdop-profile-card h2 {
  margin-top: 0;
  color: #0000cd;
}
.tdop-profile-grid {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 0;
  border-top: 1px solid #e5e7eb;
}
.tdop-profile-grid dt,
.tdop-profile-grid dd {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.tdop-profile-grid dt {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}
.tdop-profile-select-form,
.tdop-profile-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}
.tdop-profile-select-form select {
  min-height: 42px;
  min-width: min(100%, 420px);
}
@media (max-width: 640px) {
  .tdop-profile-grid {
    grid-template-columns: 1fr;
  }
  .tdop-profile-grid dt {
    border-bottom: 0;
    padding-bottom: 4px;
  }
  .tdop-profile-grid dd {
    padding-top: 4px;
  }
}


/* v1.0.11: 取引先プロフィールページ専用レイアウト */
body.tdop-client-profile-page .sidebar,
body.tdop-client-profile-page #sidebar,
body.tdop-client-profile-page aside.sidebar,
body.tdop-client-profile-page .sideber,
body.tdop-client-profile-page .widget-area,
body.tdop-client-profile-page #sidebar-scroll,
body.tdop-client-profile-page .sidebar-scroll,
body.tdop-client-profile-page .sidebar-left,
body.tdop-client-profile-page .sidebar-right,
body.tdop-client-profile-page .breadcrumb,
body.tdop-client-profile-page .breadcrumb-category,
body.tdop-client-profile-page .under-entry-content,
body.tdop-client-profile-page .sns-share,
body.tdop-client-profile-page .date-tags,
body.tdop-client-profile-page .related-entry,
body.tdop-client-profile-page .comment-area,
body.tdop-client-profile-page .widget_recent_entries,
body.tdop-client-profile-page .widget_recent_comments,
body.tdop-client-profile-page .widget_archive,
body.tdop-client-profile-page .widget_categories {
  display: none !important;
  visibility: hidden !important;
}
body.tdop-client-profile-page .content-in,
body.tdop-client-profile-page #content-in,
body.tdop-client-profile-page .content,
body.tdop-client-profile-page #content,
body.tdop-client-profile-page .main,
body.tdop-client-profile-page #main,
body.tdop-client-profile-page main,
body.tdop-client-profile-page .article,
body.tdop-client-profile-page article,
body.tdop-client-profile-page .entry-content {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.tdop-client-profile-page .tdop-client-profile-wrap {
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 834px) {
  body.tdop-client-profile-page .mobile-menu-buttons,
  body.tdop-client-profile-page .mobile-menu-buttons *,
  body.tdop-client-profile-page .footer-mobile-buttons,
  body.tdop-client-profile-page .footer-mobile-buttons *,
  body.tdop-client-profile-page .mobile-footer-menu,
  body.tdop-client-profile-page .mobile-footer-menu *,
  body.tdop-client-profile-page .navi-footer,
  body.tdop-client-profile-page .navi-footer *,
  body.tdop-client-profile-page .footer-menu,
  body.tdop-client-profile-page .footer-menu *,
  body.tdop-client-profile-page .fixed-footer-menu,
  body.tdop-client-profile-page .fixed-footer-menu *,
  body.tdop-client-profile-page .footer-floating-menu,
  body.tdop-client-profile-page .footer-floating-menu *,
  body.tdop-client-profile-page #footer-mobile-menu,
  body.tdop-client-profile-page #footer-mobile-menu * {
    display: none !important;
    visibility: hidden !important;
  }
}


/* v1.0.13: portal login / guest regular order */
.tdop-login-page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px;
}
.tdop-login-card {
  background: linear-gradient(135deg, #0000cd, #1e90ff);
  color: #fff;
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 18px 44px rgba(0,0,80,.24);
}
.tdop-login-card h1 {
  color: #fff;
  margin: 8px 0 10px;
}
.tdop-login-card p {
  color: rgba(255,255,255,.9);
}
.tdop-login-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.tdop-login-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.tdop-login-form input[type="text"],
.tdop-login-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 8px 13px;
  font-size: 16px;
}
.tdop-login-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}
.tdop-login-submit {
  border: 0;
  min-height: 48px;
  border-radius: 999px;
  background: #fff;
  color: #0000cd;
  font-weight: 800;
  cursor: pointer;
}
.tdop-login-error {
  background: #fff3f3;
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
}
.tdop-login-subactions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.tdop-login-subactions a {
  color: #fff !important;
  text-decoration: underline;
  font-weight: 700;
}
.tdop-public-order-notice {
  border-left: 5px solid #0000cd;
}


/* v1.0.17: mail alert */
.tdop-mail-alert-badge {
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  font-weight:700;
  font-size:12px;
}


/* v1.0.19: legal modal/agreement */
.tdop-legal-agreement{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:14px 0;
  padding:12px;
  border:1px solid rgba(0,0,205,.18);
  background:#f7f9ff;
  border-radius:12px;
  font-size:13px;
  line-height:1.6;
}
.tdop-legal-agreement input{margin-top:4px;flex:0 0 auto;}
.tdop-legal-agreement a{color:#0000cd;text-decoration:underline;font-weight:700;}
.tdop-legal-modal[hidden]{display:none!important;}
.tdop-legal-modal{position:fixed;inset:0;z-index:99999;}
.tdop-legal-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);}
.tdop-legal-modal__dialog{position:relative;background:#fff;color:#111827;max-width:900px;max-height:84vh;margin:7vh auto;padding:18px;border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.35);overflow:hidden;}
.tdop-legal-modal__close{position:absolute;right:12px;top:10px;border:0;background:#eef2ff;border-radius:999px;width:34px;height:34px;font-size:22px;line-height:1;cursor:pointer;}
.tdop-legal-modal__tabs{display:flex;gap:8px;margin:0 42px 12px 0;flex-wrap:wrap;}
.tdop-legal-tab{border:1px solid rgba(0,0,205,.18);background:#f7f9ff;border-radius:999px;padding:8px 13px;cursor:pointer;font-weight:700;}
.tdop-legal-tab.is-active{background:#0000cd;color:#fff;border-color:#0000cd;}
.tdop-legal-modal__body{max-height:66vh;overflow:auto;padding-right:8px;}
.tdop-legal-panel{display:none;}
.tdop-legal-panel.is-active{display:block;}
.tdop-legal-panel h2{margin-top:0;color:#0000cd;}
.tdop-legal-panel h3{margin-top:1.3em;border-bottom:1px solid #e5e7eb;padding-bottom:4px;}
body.tdop-legal-modal-open{overflow:hidden;}
@media(max-width:640px){
  .tdop-legal-modal__dialog{margin:4vh 10px;max-height:90vh;padding:14px;}
  .tdop-legal-modal__body{max-height:72vh;}
}


/* v1.0.20: legal placement + purchase lock */
.tdop-order-legal-block{
  margin-top:14px;
  border-top:1px solid rgba(212,196,160,.55);
  padding-top:12px;
}
.tdop-order-legal-block .tdop-legal-agreement{
  max-width:100%;
  margin:0;
  background:#fffdf7;
  border-color:rgba(184,148,42,.38);
  color:#4f4638;
}
.tdop-summary .tdop-legal-agreement{
  display:none!important;
}
.tdop-purchase-lock-notice{
  margin:12px 0;
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(232,201,106,.45);
  background:rgba(232,201,106,.10);
  color:rgba(255,255,255,.88);
  font-size:12px;
  line-height:1.7;
}
.tdop-purchase-lock-notice .tdop-login-register-actions{
  margin-top:10px;
  display:grid;
  gap:8px;
}
.tdop-purchase-lock-notice .tdop-login-button,
.tdop-purchase-lock-notice .tdop-register-button{
  display:block;
  text-align:center;
  border-radius:999px;
  padding:8px 10px;
  background:#fff;
  color:#0000cd!important;
  text-decoration:none;
  font-weight:800;
}
.tdop-submit-button:disabled{
  cursor:not-allowed!important;
}
@media(max-width:700px){
  .tdop-order-legal-block{
    margin-top:12px;
    padding-top:10px;
  }
  .tdop-order-legal-block .tdop-legal-agreement{
    display:flex!important;
    font-size:12px;
    line-height:1.55;
    padding:10px;
  }
  .tdop-order-legal-block .tdop-legal-agreement input{
    width:auto!important;
    min-height:0!important;
  }
  .tdop-legal-modal__dialog{
    width:auto;
    margin:4vh 10px;
  }
}


/* v1.0.22: Cocoon/theme heading reset
   本番環境のCocoonスキンで h1/h2 見出しに白背景が付くケースを、注文ポータル内だけ打ち消す */
#tdop-order-app h1,
#tdop-order-app h2,
#tdop-order-app h3,
#tdop-order-app h4,
#tdop-order-app .tdop-summary h2,
#tdop-order-app .tdop-section-title,
#tdop-order-app .tdop-brand-main,
#tdop-order-app .tdop-brand-sub,
.tdop-top-home h1,
.tdop-top-home h2,
.tdop-top-home h3,
.tdop-top-home .tdop-top-title,
.tdop-top-home .tdop-portal-card h2,
.tdop-history-page h1,
.tdop-history-page h2,
.tdop-history-page h3,
.tdop-history-page .tdop-history-title,
.tdop-history-page .tdop-history-hero h1,
.tdop-history-page .tdop-history-hero h2,
.tdop-history-page .tdop-history-hero .tdop-history-title,
.tdop-portal-card h1,
.tdop-portal-card h2,
.tdop-portal-card h3{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

#tdop-order-app .tdop-summary h2,
#tdop-order-app .tdop-section-title{
  margin-top: 0;
}

#tdop-order-app .tdop-summary h2::before,
#tdop-order-app .tdop-summary h2::after,
#tdop-order-app .tdop-section-title::before,
#tdop-order-app .tdop-section-title::after,
.tdop-history-page h1::before,
.tdop-history-page h1::after,
.tdop-history-page h2::before,
.tdop-history-page h2::after,
.tdop-top-home h1::before,
.tdop-top-home h1::after,
.tdop-top-home h2::before,
.tdop-top-home h2::after,
.tdop-portal-card h2::before,
.tdop-portal-card h2::after{
  display: none !important;
  content: none !important;
}


/* v1.0.23: 注文履歴ヘッダー専用のCocoon見出しリセット
   注文履歴ページは .tdop-history-wrap 配下なので、v1.0.22より直接的に指定する */
.tdop-history-wrap .tdop-history-clean-header h1,
.tdop-history-wrap .tdop-history-clean-header h2,
.tdop-history-wrap .tdop-history-clean-header h3,
.tdop-history-wrap .tdop-history-clean-header h4,
.tdop-history-wrap .tdop-history-clean-header .tdop-history-title,
.tdop-history-clean-header h1,
.tdop-history-clean-header h2,
.tdop-history-clean-header h3,
.tdop-history-clean-header h4{
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 5px 0 0 !important;
  color: #fff !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.tdop-history-wrap .tdop-history-clean-header h1::before,
.tdop-history-wrap .tdop-history-clean-header h1::after,
.tdop-history-wrap .tdop-history-clean-header h2::before,
.tdop-history-wrap .tdop-history-clean-header h2::after,
.tdop-history-wrap .tdop-history-clean-header h3::before,
.tdop-history-wrap .tdop-history-clean-header h3::after,
.tdop-history-clean-header h1::before,
.tdop-history-clean-header h1::after,
.tdop-history-clean-header h2::before,
.tdop-history-clean-header h2::after,
.tdop-history-clean-header h3::before,
.tdop-history-clean-header h3::after{
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 本文側の通常見出しに戻す必要がある場合に備え、対象をヘッダー内に限定 */
.tdop-history-wrap > h1,
.tdop-history-wrap > h2,
.tdop-history-wrap > h3{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}


/* v1.0.24: order confirmation flow / desktop floating menu removal */
@media (min-width: 701px) {
  #tdop-order-app {
    padding-bottom: 0 !important;
  }

  #tdop-order-app .tdop-tabs {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    margin-left: auto !important;
    width: auto !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #tdop-order-app .tdop-tab {
    min-width: auto !important;
    min-height: 34px !important;
    padding: 7px 16px !important;
  }
}

.tdop-print-actions-bottom {
  max-width: 980px;
  margin: 16px auto 46px !important;
  padding: 0 16px 18px;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.tdop-print-actions-bottom .tdop-print-legal-confirm {
  grid-column: 1 / -1;
}

.tdop-print-actions-bottom .tdop-legal-agreement {
  margin: 0 !important;
  background: #fffdf7 !important;
  border-color: rgba(184,148,42,.45) !important;
  color: #4f4638 !important;
}

.tdop-print-actions-bottom .tdop-primary,
.tdop-print-actions-bottom .tdop-secondary,
.tdop-print-actions-bottom .tdop-submit-button {
  width: 100% !important;
  min-height: 46px;
}

.tdop-print-actions-bottom > span {
  grid-column: 1 / -1;
  color: var(--tdop-warm-gray);
  font-size: 12px;
  line-height: 1.6;
}

.tdop-login-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
}

@media (max-width: 700px) {
  .tdop-print-actions-bottom {
    grid-template-columns: 1fr;
    margin-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .tdop-print-actions-bottom .tdop-legal-agreement {
    display: flex !important;
    font-size: 12px;
    line-height: 1.55;
  }
}


/* v1.0.25: 注文確認画面の下部ボタン表示を修正 */
#tdop-order-app #tdop-confirm-actions {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (min-width: 701px) {
  /* PCはフロート/右上操作メニューを使わず、入力画面は右側のお見積もりボタン、確認画面は下部ボタンに集約 */
  #tdop-order-app .tdop-tabs {
    display: none !important;
  }

  #tdop-order-app {
    padding-bottom: 0 !important;
  }
}

#tdop-order-app .tdop-print-actions-bottom {
  max-width: 980px;
  margin: 18px auto 54px !important;
  padding: 0 16px 20px;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

#tdop-order-app .tdop-print-actions-bottom .tdop-print-legal-confirm {
  grid-column: 1 / -1;
}

#tdop-order-app .tdop-print-actions-bottom .tdop-legal-agreement {
  display: flex !important;
  margin: 0 !important;
  background: #fffdf7 !important;
  border-color: rgba(184,148,42,.45) !important;
  color: #4f4638 !important;
}

#tdop-order-app .tdop-print-actions-bottom .tdop-primary,
#tdop-order-app .tdop-print-actions-bottom .tdop-secondary,
#tdop-order-app .tdop-print-actions-bottom .tdop-submit-button {
  width: 100% !important;
  min-height: 46px;
}

#tdop-order-app .tdop-print-actions-bottom .tdop-primary {
  background: var(--tdop-ink) !important;
  color: #fff !important;
}

#tdop-order-app .tdop-print-actions-bottom .tdop-secondary {
  background: #fff !important;
  color: var(--tdop-ink) !important;
  border: 1px solid var(--tdop-border) !important;
}

#tdop-order-app .tdop-print-actions-bottom > span {
  grid-column: 1 / -1;
  color: var(--tdop-warm-gray);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 700px) {
  #tdop-order-app .tdop-print-actions-bottom {
    grid-template-columns: 1fr;
    margin: 18px 14px calc(122px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 0 18px;
  }

  #tdop-order-app .tdop-print-actions-bottom .tdop-legal-agreement {
    font-size: 12px;
    line-height: 1.55;
    padding: 10px;
  }
}

@media print {
  #tdop-order-app .tdop-print-actions-bottom,
  #tdop-order-app #tdop-confirm-actions {
    display: none !important;
  }
}


/* v1.0.26: legal modal tab scroll reset support */
.tdop-legal-modal__body {
  scroll-behavior: auto !important;
}
.tdop-legal-panel {
  scroll-margin-top: 0 !important;
}


/* v1.0.27: order complete screen */
.tdop-order-complete-body .tdop-app {
  max-width: 1080px;
}

.tdop-complete-wrap {
  padding: 52px 20px 72px;
  background: linear-gradient(180deg, rgba(250,247,242,.88), #fff);
}

.tdop-complete-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 34px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(184,148,42,.24);
  box-shadow: 0 24px 70px rgba(26,18,9,.14);
  text-align: center;
}

.tdop-complete-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #b8942a;
  color: #1a1209;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 900;
}

.tdop-complete-kicker {
  margin: 0 0 6px;
  color: #b8942a;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 900;
}

.tdop-complete-card h1 {
  margin: 0 0 12px !important;
  color: #1a1209 !important;
  font-size: clamp(26px, 4vw, 40px);
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tdop-complete-lead {
  color: #5f5548;
  line-height: 1.9;
  margin: 0 auto 22px;
  max-width: 620px;
}

.tdop-complete-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 24px 0;
}

.tdop-complete-info div {
  border-radius: 16px;
  background: #fbf8f1;
  border: 1px solid #e8ddca;
  padding: 16px;
}

.tdop-complete-info span {
  display: block;
  color: #867968;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 5px;
}

.tdop-complete-info strong {
  display: block;
  color: #1a1209;
  font-size: 20px;
  word-break: break-all;
}

.tdop-complete-notice {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff8e8;
  border: 1px solid #e8c96a;
  color: #5d4615;
  line-height: 1.7;
  text-align: left;
}

.tdop-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.tdop-complete-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 900;
}

.tdop-complete-primary {
  background: #1a1209;
  color: #fff !important;
}

.tdop-complete-secondary {
  background: #fff;
  color: #0000cd !important;
  border: 1px solid rgba(0,0,205,.24);
}

.tdop-complete-small {
  margin: 18px 0 0;
  color: #867968;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .tdop-complete-wrap {
    padding: 30px 14px 54px;
  }
  .tdop-complete-card {
    padding: 30px 18px;
    border-radius: 20px;
  }
  .tdop-complete-info {
    grid-template-columns: 1fr;
  }
  .tdop-complete-actions {
    display: grid;
  }
  .tdop-complete-actions a {
    width: 100%;
  }
}


/* v1.0.29: purchase-blocked products */
#tdop-order-app .tdop-qty:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: #f3f4f6 !important;
}


/* v1.0.30: 未入力時の小計欄は預かり在庫と表示しない */
#tdop-order-app .tdop-line-total {
  white-space: nowrap;
}


/* v1.0.36: front admin quick links */
.tdop-front-admin-quick-links {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  z-index: 2147483000 !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.4 !important;
  text-align: left !important;
}
.tdop-front-admin-quick-links,
.tdop-front-admin-quick-links * {
  box-sizing: border-box !important;
}
.tdop-front-admin-quick-links details {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tdop-front-admin-quick-links summary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  list-style: none !important;
  cursor: pointer !important;
  border: 1px solid rgba(184,148,42,.75) !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  background: #1d1208 !important;
  color: #f4d574 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.22) !important;
}
.tdop-front-admin-quick-links summary::before {
  content: "管理";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f4d574;
  color: #1d1208;
  font-size: 12px;
  font-weight: 900;
}
.tdop-front-admin-quick-links summary::-webkit-details-marker {
  display: none !important;
}
.tdop-front-admin-quick-links__menu {
  position: absolute !important;
  right: 0 !important;
  bottom: calc(100% + 8px) !important;
  min-width: 190px !important;
  width: max-content !important;
  max-width: min(280px, calc(100vw - 24px)) !important;
  padding: 8px !important;
  border-radius: 14px !important;
  background: #fff !important;
  border: 1px solid #d8d0c3 !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.22) !important;
  display: grid !important;
  gap: 6px !important;
}
.tdop-front-admin-quick-links__menu a {
  display: block !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  color: #1d1208 !important;
  background: #fffaf0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.tdop-front-admin-quick-links__menu a:hover {
  background: #f4d574 !important;
}
@media (max-width: 700px) {
  .tdop-front-admin-quick-links {
    right: 12px !important;
    bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .tdop-front-admin-quick-links summary {
    padding: 9px 12px !important;
    font-size: 13px !important;
  }
  .tdop-front-admin-quick-links summary::before {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .tdop-front-admin-quick-links__menu {
    right: 0 !important;
    bottom: calc(100% + 8px) !important;
    max-width: calc(100vw - 24px) !important;
  }
}
@media print {
  .tdop-front-admin-quick-links {
    display: none !important;
  }
}


/* v1.0.41: limited order UI */
#tdop-limited-order-app {
  --tdop-ink:#1a1209;
  --tdop-gold:#b8942a;
  --tdop-gold-light:#e8c96a;
  --tdop-gold-pale:#fdf8ee;
  --tdop-cream:#faf7f2;
  --tdop-border:#d4c4a0;
}
#tdop-limited-order-app .tdop-topbar {
  background: var(--tdop-ink) !important;
  color: #fff !important;
}
#tdop-limited-order-app .tdop-brand-main {
  color: var(--tdop-gold-light) !important;
}
#tdop-limited-order-app .tdop-brand-sub {
  color: rgba(255,255,255,.72) !important;
}


/* v1.0.42: limited submit button and payment label support */
#tdop-limited-order-app .tdop-primary,
#tdop-limited-order-app button.tdop-primary,
#tdop-limited-order-app input[type="submit"].tdop-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 13px 20px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #c4a12a !important;
  color: #1a1209 !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(184,148,42,.18) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
#tdop-limited-order-app .tdop-primary:hover,
#tdop-limited-order-app button.tdop-primary:hover,
#tdop-limited-order-app input[type="submit"].tdop-primary:hover {
  background: #e0c153 !important;
  color: #1a1209 !important;
}
#tdop-limited-order-app .tdop-primary:disabled,
#tdop-limited-order-app button.tdop-primary:disabled {
  opacity: .45 !important;
  cursor: not-allowed !important;
}
