.tro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: clamp(24px, 3vw, 48px);
  width: 100%;
}
.tro-rail { min-width: 0; }
.tro-layout > .nf-form-cont { min-width: 0; width: 100%; }
#tanoshi-order-summary {
  --tro-accent: #BE1823;
  position: sticky;
  top: 120px;
  z-index: 30;
  align-self: start;
  width: 100%;
  overflow: hidden;
  color: #fff;
  background: var(--tro-accent);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 9%);
  font-family: var(--font-main), sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}
#tanoshi-order-summary[hidden] { display: none !important; }
#tanoshi-order-summary *, #tanoshi-order-summary *::before, #tanoshi-order-summary *::after { box-sizing: border-box; }
#tanoshi-order-summary .tro-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--tro-accent);
  box-shadow: none;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#tanoshi-order-summary .tro-toggle::before, #tanoshi-order-summary .tro-toggle::after { display: none; }
#tanoshi-order-summary .tro-toggle:hover { background: var(--tro-accent); }
#tanoshi-order-summary .tro-toggle:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
#tanoshi-order-summary .tro-label { flex: 1; }
#tanoshi-order-summary .tro-total { flex-shrink: 0; color: #fff; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tanoshi-order-summary .tro-chevron { flex: 0 0 18px; width: 18px; height: 18px; transition: transform .18s ease; }
#tanoshi-order-summary .tro-toggle[aria-expanded="true"] .tro-chevron { transform: rotate(180deg); }
#tanoshi-order-summary .tro-panel {
  min-height: 0;
  max-height: min(420px, 60vh);
  max-height: min(420px, 60dvh);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px 18px;
  scrollbar-gutter: stable;
  border-top: 1px solid rgb(255 255 255 / 25%);
}
#tanoshi-order-summary .tro-panel[hidden] { display: none; }
#tanoshi-order-summary .tro-list { list-style: none; margin: 0; padding: 0; }
#tanoshi-order-summary .tro-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; margin: 0; padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / 25%); }
#tanoshi-order-summary .tro-item:last-child { border-bottom: 0; }
#tanoshi-order-summary .tro-name { overflow-wrap: anywhere; font-weight: 600; }
#tanoshi-order-summary .tro-quantity { grid-column: 1; color: #fff; font-size: 13px; }
#tanoshi-order-summary .tro-subtotal { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
#tanoshi-order-summary .tro-empty { padding: 20px 0 4px; margin: 0; color: #fff; }
#tanoshi-order-summary .tro-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1023px) {
  .tro-layout { display: block; }
  .tro-layout > #nf-form-2-cont { margin-bottom: calc(var(--tro-original-margin, 0px) + var(--tro-closed-height, 72px)) !important; }
  #tanoshi-order-summary {
    position: fixed;
    inset: auto 0 0;
    z-index: 99990;
    width: 100%;
    border: 0;
    border-top: 1px solid rgb(255 255 255 / 25%);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 28px rgb(0 0 0 / 12%);
    display: flex;
    flex-direction: column;
    max-height: 60vh;
    max-height: 60dvh;
  }
  #tanoshi-order-summary[data-expanded="true"] { height: 60vh; height: 60dvh; }
  #tanoshi-order-summary .tro-toggle { flex-shrink: 0; padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-height: 72px; }
  #tanoshi-order-summary .tro-panel { flex: 1; max-height: none; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  #tanoshi-order-summary .tro-chevron { transition: none; }
}

@media (max-width: 1023px) {
  body.tro-has-summary #faw-widget {
    bottom: calc(var(--tro-closed-height, 73px) + 20px) !important;
    z-index: 99980 !important;
  }
  body.tro-has-summary #ht-ctc-chat { z-index: 99980 !important; }
}

/* Preserve layout and the measured mobile clearance while hidden at the footer. */
#tanoshi-order-summary[data-footer-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}
