/* Shared adaptive header and footer. The page opts out of desktop scaling
   with data-mobile-ready so narrow windows reflow at their actual width. */
html,
body,
.header-container {
  min-width: 0 !important;
}

@media (max-width: 1279px) {
  html,
  body {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: clip !important;
  }

  body {
    padding-top: 68px !important;
  }

  body > header {
    display: block !important;
    visibility: visible !important;
    min-height: 68px !important;
    height: 68px !important;
    padding: 8px 0 !important;
    border-bottom: 0 !important;
  }

  body > header .header-container {
    display: flex !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 52px !important;
    padding: 0 18px !important;
    transform: none !important;
  }

  body > header .header-left {
    display: flex !important;
    min-width: 0 !important;
    margin-top: 0 !important;
  }

  body > header .logo img {
    display: block !important;
    width: auto !important;
    height: 46px !important;
    max-width: 230px !important;
  }

  html[data-adaptive-layout] body:not(.admin-page):not(.admin-layout) > header .mobile-menu-toggle {
    display: block !important;
    position: absolute !important;
    top: 5px !important;
    right: 18px !important;
    width: 42px !important;
    height: 42px !important;
    padding: 6px !important;
    border-radius: 8px !important;
    z-index: 10000 !important;
  }

  html[data-adaptive-layout] body:not(.admin-page):not(.admin-layout) > header .mobile-menu-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    margin: 5px auto !important;
  }

  body > header .main-nav {
    display: none !important;
  }

  body > header .main-nav.active {
    display: block !important;
    position: fixed !important;
    inset: 0 0 0 auto !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 78px 22px 32px !important;
    overflow-y: auto !important;
    background: #fff !important;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18) !important;
    z-index: 9999 !important;
  }

  body > header .main-nav.active ul,
  body > header .main-nav.active .mobile-menu-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body > header .main-nav.active li {
    width: 100% !important;
    border-bottom: 1px solid #e8edf5 !important;
  }

  body > header .main-nav.active > ul > li > a {
    display: block !important;
    padding: 14px 4px !important;
    font-size: 0.94rem !important;
  }

  body > header .main-nav.active .mobile-order-btn {
    display: block !important;
    background: #00aaff !important;
    color: #fff !important;
    padding: 14px 20px !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  body > header .main-nav.active .mobile-consult-btn {
    display: block !important;
    color: #00aaff !important;
    padding: 12px 20px !important;
    border: 1px solid #00aaff !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  body > header .header-right {
    display: flex !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: 54px !important;
    padding-right: 0 !important;
    gap: 0 !important;
  }

  body > header .header-right > a.header-link,
  body > header #authSection,
  body > header .consult-btn,
  body > header .upload-btn {
    display: none !important;
  }

  body > header .cart-icon,
  body > header .cart-icon a,
  body > header .cart-icon svg {
    display: flex !important;
    width: 24px !important;
    height: 24px !important;
  }

  .vertical-faq-btn {
    display: none !important;
  }

  footer .footer-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  footer .footer-brand {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 36px !important;
    padding-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  footer .footer-logo {
    margin-left: 0 !important;
    transform: none !important;
  }

  footer .footer-logo img {
    margin-inline: auto !important;
  }

  footer .business-calendar {
    width: min(100%, 300px) !important;
    min-width: 0 !important;
    max-width: 300px !important;
    margin: 18px auto 14px !important;
    transform: none !important;
  }

  footer .footer-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    width: 100% !important;
    gap: 34px !important;
    padding-right: 0 !important;
  }

  footer .footer-col {
    width: 100% !important;
    max-width: 520px !important;
    min-width: 0 !important;
    align-items: center !important;
    text-align: center !important;
  }

  footer .footer-col .footer-main-link {
    width: 100% !important;
    padding-bottom: 9px !important;
    border-bottom: 1px solid #dce5f2 !important;
    color: #234f9a !important;
    font-size: 1rem !important;
  }

  footer .footer-links .footer-col:last-child {
    grid-column: 1 !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding-top: 28px !important;
    border-top: 1px solid #e5eaf2 !important;
  }

  footer .footer-bottom {
    flex-direction: column !important;
    gap: 20px !important;
    text-align: center !important;
  }

  footer .footer-legal {
    width: 100% !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px 28px !important;
  }

}

@media (max-width: 900px) {
  footer .footer-col {
    max-width: 360px !important;
  }

  footer .footer-links {
    gap: 30px !important;
  }

  footer .footer-links .footer-col:last-child {
    padding-top: 22px !important;
  }

  footer .footer-legal {
    gap: 12px 18px !important;
  }

}

/* Homepage palette, serif headings and restrained card surfaces. */
body.first-card-guide-page {
  --guide-ink: #141f3d;
  --guide-text: #40516b;
  --guide-muted: #6b7890;
  --guide-blue: #4273db;
  --guide-blue-dark: #3561c7;
  --guide-gold: #a17743;
  --guide-orange: #fb7615;
  --guide-soft: #f0f4ff;
  --guide-line: #dce5f1;
  --guide-card-shadow: 0 2px 8px rgba(20, 31, 61, 0.06);
  background: #f4f3f8 !important;
  color: var(--guide-text);
  font-family:
    "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif !important;
  font-synthesis: none;
  letter-spacing: 0;
  line-height: 1.7;
  text-size-adjust: 100%;
}

body.first-card-guide-page main * {
  box-sizing: border-box;
  font-family: inherit !important;
  letter-spacing: 0 !important;
}

body.first-card-guide-page main :is(h1, h2, h3, h4, h5, h6, p, li, a, span, strong, small, th, td) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

body.first-card-guide-page main > :is(section, nav, div) > .container {
  width: min(100% - 48px, 1240px) !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.first-card-guide-page main section[id] {
  scroll-margin-top: 110px;
}

body.first-card-guide-page main :is(h1, h2) {
  color: var(--guide-ink) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

body.first-card-guide-page .guide-breadcrumb .container {
  padding-top: 22px;
  font-size: 0.8rem;
}

body.first-card-guide-page .guide-hero {
  padding: 30px 0 52px;
}

body.first-card-guide-page .guide-hero-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.first-card-guide-page .guide-hero-content::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0 auto 24px;
  background: var(--guide-gold);
}

body.first-card-guide-page .guide-hero h1 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 3.4vw, 2.8rem) !important;
  line-height: 1.35 !important;
}

body.first-card-guide-page .guide-hero-lead {
  max-width: 840px;
  margin-bottom: 28px;
  font-size: 1rem !important;
  line-height: 1.85 !important;
}

body.first-card-guide-page .guide-btn {
  min-width: 240px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--guide-blue);
  border-radius: 4px;
  font-size: 0.94rem;
  white-space: normal;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.first-card-guide-page .guide-btn:hover {
  transform: none;
  box-shadow: none;
}

body.first-card-guide-page a.guide-btn-primary {
  background: var(--guide-blue);
}

body.first-card-guide-page a.guide-btn-primary:hover {
  border-color: var(--guide-blue-dark);
  background: var(--guide-blue-dark);
}

body.first-card-guide-page a.guide-btn-secondary:hover {
  background: var(--guide-soft);
}

body.first-card-guide-page main a:focus-visible {
  outline: 3px solid var(--guide-blue);
  outline-offset: 4px;
}

body.first-card-guide-page .guide-anchor-band {
  padding: 0;
  border: 0;
  background: transparent;
}

body.first-card-guide-page .guide-anchor-list {
  max-width: 1080px;
  margin: 0 auto;
  gap: 24px;
  padding: 0;
}

body.first-card-guide-page .guide-anchor-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px;
  gap: 10px 12px;
  align-content: center;
  justify-content: start;
  min-width: 0;
  min-height: 86px;
  padding: 14px 4px 18px;
  border: 0;
  border-bottom: 1px solid rgba(161, 119, 67, 0.28);
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

body.first-card-guide-page .guide-anchor-number {
  grid-column: 1 / -1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.first-card-guide-page .guide-anchor-label {
  min-width: 0;
  line-height: 1.5;
  transition: color 0.2s ease;
}

body.first-card-guide-page .guide-anchor-list a::after {
  content: "";
  justify-self: center;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--guide-gold);
  border-bottom: 1.5px solid var(--guide-gold);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

body.first-card-guide-page .guide-anchor-list a:is(:hover, :focus-visible) {
  border-bottom-color: var(--guide-gold);
  background: rgba(161, 119, 67, 0.045);
}

body.first-card-guide-page .guide-anchor-list a:is(:hover, :focus-visible)::after {
  transform: translateY(2px) rotate(45deg);
}

/* Scoped important styles take precedence over the legacy global text rules. */
@layer guide-navigation {
  body.first-card-guide-page .guide-anchor-number {
    color: var(--guide-gold) !important;
    font-size: 0.75rem !important;
  }

  body.first-card-guide-page .guide-anchor-label {
    color: var(--guide-text) !important;
    font-size: 0.9rem !important;
  }

  body.first-card-guide-page .guide-anchor-list a:is(:hover, :focus-visible) .guide-anchor-label {
    color: var(--guide-ink) !important;
  }
}

body.first-card-guide-page :is(.guide-section, .of-section, .guide-cta) {
  padding: 64px 0;
  background: #f4f3f8 !important;
}

body.first-card-guide-page :is(.guide-section.is-white, .of-section) {
  background: #ffffff !important;
}

body.first-card-guide-page .guide-section-head {
  max-width: 900px;
  margin-bottom: 34px;
}

body.first-card-guide-page main h2 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem) !important;
}

body.first-card-guide-page main h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 18px auto 0;
  background: var(--guide-gold);
}

body.first-card-guide-page :is(.guide-section-head p, .guide-cta p) {
  font-size: 0.94rem;
  line-height: 1.85;
}

body.first-card-guide-page :is(
  .guide-steps, .guide-choice-grid, .guide-compare,
  .guide-thickness-grid, .guide-difference, .guide-option-grid
) {
  gap: 20px;
}

body.first-card-guide-page :is(.guide-difference, .guide-option-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.first-card-guide-page main :is(
  .guide-step-card,
  .guide-choice-card,
  .guide-info-card,
  .guide-option-card,
  .guide-flow-step,
  .guide-thickness-card,
  .of-step
) {
  min-width: 0;
  border: 1px solid var(--guide-line) !important;
  border-radius: 8px;
  background: #ffffff !important;
  box-shadow: var(--guide-card-shadow);
  transition: border-color 0.2s ease;
}

body.first-card-guide-page main :is(
  .guide-step-card,
  .guide-choice-card,
  .guide-info-card,
  .guide-option-card,
  .guide-thickness-card
):hover {
  transform: none;
  border-color: #bdcbe0 !important;
  box-shadow: var(--guide-card-shadow);
}

body.first-card-guide-page :is(.guide-step-card, .guide-info-card, .guide-option-card, .guide-thickness-card) {
  padding: 28px;
}

body.first-card-guide-page #guide-main-steps .guide-step-number {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border: 1px solid #e4d7c6;
  border-radius: 4px;
  background: #faf6f0 !important;
  color: var(--guide-gold) !important;
  font-size: 1.15rem !important;
}

body.first-card-guide-page main h3 {
  color: var(--guide-ink) !important;
  font-size: 1.06rem !important;
  font-weight: 600 !important;
  line-height: 1.55 !important;
}

body.first-card-guide-page .guide-choice-card {
  display: flex;
  flex-direction: column;
}

body.first-card-guide-page .guide-choice-media {
  height: 190px;
  padding: 24px;
  border-bottom: 1px solid #edf0f5;
  background: #f8f9fc;
}

body.first-card-guide-page .guide-choice-media img {
  height: auto;
  max-height: 142px;
  filter: drop-shadow(0 5px 8px rgba(20, 31, 61, 0.1));
}

body.first-card-guide-page .guide-choice-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 22px;
  text-align: left;
}

body.first-card-guide-page .guide-card-points {
  margin-bottom: 20px;
  font-size: 0.88rem;
  line-height: 1.65;
}

body.first-card-guide-page .guide-tags {
  justify-content: flex-start;
  margin-top: auto;
}

body.first-card-guide-page .guide-tags span {
  border-color: #dce5f1;
  background: var(--guide-soft);
  color: #315cae;
}

body.first-card-guide-page .guide-compare .guide-info-card {
  border-top: 3px solid var(--guide-blue) !important;
}

body.first-card-guide-page .guide-compare .guide-info-card.is-pet {
  border-top-color: var(--guide-gold) !important;
}

body.first-card-guide-page .guide-info-list li {
  font-size: 0.9rem;
}

body.first-card-guide-page .guide-info-list li::before {
  width: 5px;
  height: 5px;
  background: var(--guide-gold);
}

body.first-card-guide-page .guide-section-note {
  color: var(--guide-muted);
  font-size: 0.85rem;
}

body.first-card-guide-page .guide-thickness-bar {
  border-color: var(--guide-line);
}

body.first-card-guide-page .guide-thickness-bar span {
  border-radius: 3px 3px 0 0;
  background: var(--guide-blue);
}

body.first-card-guide-page .guide-thickness-card:first-child {
  border-top: 3px solid var(--guide-gold) !important;
}

body.first-card-guide-page .guide-thickness-card h3 {
  font-size: 1.4rem !important;
  font-variant-numeric: tabular-nums;
}

body.first-card-guide-page .guide-processing-item {
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}

body.first-card-guide-page .guide-processing-title {
  margin-bottom: 6px;
  font-size: 0.94rem;
}

body.first-card-guide-page .guide-delivery-table {
  max-width: 1040px;
  margin-inline: auto;
  border-color: var(--guide-line);
  border-radius: 8px;
  box-shadow: var(--guide-card-shadow);
}

body.first-card-guide-page .guide-delivery-table :is(th, td) {
  padding: 22px 28px;
  font-size: 0.94rem;
}

body.first-card-guide-page .guide-delivery-table th {
  width: 34%;
  background: var(--guide-soft);
}

body.first-card-guide-page .of-section h2 {
  margin-bottom: 36px;
}

body.first-card-guide-page .of-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

body.first-card-guide-page .of-step {
  max-width: none;
  padding: 24px 16px;
}

body.first-card-guide-page #of-main-flow .of-num {
  position: static;
  align-self: flex-start;
  width: auto;
  height: auto;
  margin-bottom: 16px;
  border-radius: 0;
  background: transparent !important;
  color: var(--guide-gold) !important;
  font-size: 1.15rem !important;
  font-variant-numeric: tabular-nums;
  transform: none;
}

body.first-card-guide-page .of-circle {
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  background: var(--guide-soft) !important;
}

body.first-card-guide-page .of-circle img {
  width: 56px;
  height: 56px;
}

body.first-card-guide-page .of-title {
  min-height: 50px;
  margin-bottom: 12px;
  color: var(--guide-ink) !important;
  font-size: 1rem !important;
  line-height: 1.55;
}

body.first-card-guide-page :is(.of-arrow, .of-sep) {
  display: none;
}

body.first-card-guide-page .of-desc {
  color: var(--guide-text) !important;
}

body.first-card-guide-page .of-notes p {
  color: var(--guide-muted) !important;
}

body.first-card-guide-page .guide-cta-layout {
  max-width: 1040px;
  padding: 42px 32px;
  border: 1px solid var(--guide-line);
  border-top: 3px solid var(--guide-gold);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--guide-card-shadow);
}

body.first-card-guide-page .guide-cta .guide-btn-primary {
  border-color: var(--guide-orange);
  background: var(--guide-orange);
}

body.first-card-guide-page .guide-cta .guide-btn-primary:hover {
  border-color: #e5650c;
  background: #e5650c;
}

@media (max-width: 1100px) {
  body.first-card-guide-page :is(.guide-choice-grid, .guide-thickness-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.first-card-guide-page .of-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.first-card-guide-page :is(.guide-section, .of-section, .guide-cta) {
    padding-block: 52px;
  }

  body.first-card-guide-page .guide-anchor-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 24px;
  }

  body.first-card-guide-page .guide-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body > header .logo img {
    max-width: min(52vw, 230px) !important;
    height: auto !important;
    max-height: 46px !important;
  }

  body.first-card-guide-page main > :is(section, nav, div) > .container {
    width: calc(100% - 32px) !important;
  }

  body.first-card-guide-page .guide-hero {
    padding: 20px 0 36px;
  }

  body.first-card-guide-page .guide-hero-content {
    padding: 20px 0 0;
  }

  body.first-card-guide-page .guide-hero h1 {
    font-size: 1.75rem !important;
  }

  body.first-card-guide-page :is(.guide-hero-actions, .guide-cta-actions) {
    flex-direction: column;
  }

  body.first-card-guide-page .guide-btn {
    width: 100%;
    min-width: 0;
  }

  body.first-card-guide-page .guide-anchor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
  }

  body.first-card-guide-page .guide-anchor-list a {
    min-height: 76px;
    padding: 12px 2px 14px;
    gap: 8px 10px;
  }

  body.first-card-guide-page main h2 {
    font-size: 1.35rem !important;
  }

  body.first-card-guide-page :is(
    .guide-choice-grid, .guide-compare, .guide-thickness-grid,
    .guide-difference, .guide-option-grid, .of-flow
  ) {
    grid-template-columns: 1fr;
  }

  body.first-card-guide-page :is(
    .guide-step-card, .guide-info-card, .guide-option-card,
    .guide-thickness-card, .guide-cta-layout
  ) {
    padding: 24px 20px;
  }

  body.first-card-guide-page .guide-delivery-table :is(tbody, tr, th, td) {
    display: block;
    width: 100%;
  }

  body.first-card-guide-page .guide-delivery-table th {
    padding: 16px 20px 10px;
    border-bottom: 0;
  }

  body.first-card-guide-page .guide-delivery-table td {
    padding: 14px 20px 20px;
  }

  body.first-card-guide-page .of-step {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px 20px;
    padding: 22px;
    text-align: left;
  }

  body.first-card-guide-page #of-main-flow .of-num {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-bottom: 0;
  }

  body.first-card-guide-page .of-circle {
    grid-row: 2 / 4;
    margin-bottom: 0;
  }

  body.first-card-guide-page .of-title {
    min-height: 0;
    margin-bottom: 0;
  }

  body.first-card-guide-page .of-desc {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.first-card-guide-page main *,
  body.first-card-guide-page .guide-anchor-list a::after {
    transition: none !important;
  }
}

/* Smaller headings */
body.first-card-guide-page .guide-hero h1 {
  font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
}
body.first-card-guide-page main h2 {
  font-size: clamp(1.2rem, 1.7vw, 1.45rem) !important;
}
@media (max-width: 760px) {
  body.first-card-guide-page .guide-hero h1 { font-size: 1.4rem !important; }
  body.first-card-guide-page main h2 { font-size: 1.15rem !important; }
}
