/* 買取来福 v20 — calmer navigation, readable showcase and meaningful brand links. */
html { scroll-padding-top: 142px; }

/* Two quiet, deliberately separated header rows on desktop. */
header.rai-site-header {
  display: block;
  min-height: 0;
  padding: 0;
  gap: 0;
  background: #fffdf9;
  border-bottom: 1px solid #d3ae65;
  box-shadow: 0 7px 24px #35231412;
}
.rai-header-upper {
  width: min(1240px,100%);
  margin-inline: auto;
  padding: 16px clamp(22px,3vw,40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
header.rai-site-header .wordmark { font-size: 1.74rem; line-height: 1.1; white-space: nowrap; }
header.rai-site-header .wordmark small { font-size: .62rem; margin-top: 7px; letter-spacing: .18em; }
.rai-header-actions { display: flex; align-items: center; gap: clamp(16px,2.4vw,32px); }
.rai-header-consult-label { color: #836c4a; font-size: .77rem; letter-spacing: .06em; white-space: nowrap; }
header.rai-site-header .rai-header-phone { align-items: flex-start; position: relative; }
header.rai-site-header .rai-header-phone span { font-size: .67rem; letter-spacing: .08em; color: #80683e; }
header.rai-site-header .rai-header-phone strong { font-size: clamp(1.24rem,1.9vw,1.66rem); line-height: 1.22; }
.rai-header-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; white-space: nowrap;
  border: 1px solid #9a1730; border-radius: 5px;
  background: #9a0b29; color: #fff; font-size: .86rem; font-weight: 800;
  transition: background .2s, transform .2s;
}
.rai-header-line:hover { background: #790519; transform: translateY(-1px); color: #fff; }
.rai-mobile-nav-toggle { display: none; }

nav.rai-header-nav {
  display: flex; justify-content: center; align-items: stretch;
  min-height: 48px; gap: clamp(34px,5.4vw,90px); overflow: visible;
  border-top: 1px solid #f0e7da; background: #fffaf1;
}
.rai-nav-group { position: relative; display: flex; align-items: stretch; }
.rai-nav-button {
  position: relative; display: inline-flex; gap: 10px; align-items: center;
  justify-content: center; min-height: 48px; padding: 9px 12px;
  border: 0; background: transparent; color: #382b2a;
  font-family: inherit; font-size: .93rem; font-weight: 800; letter-spacing: .04em;
  cursor: pointer; white-space: nowrap;
}
.rai-nav-button::after { content: ''; position: absolute; bottom: 0; left: 13px; right: 13px; height: 2px; background: #a8102e; transform: scaleX(0); transition: transform .18s; }
.rai-nav-button[aria-expanded="true"],.rai-nav-button:hover { color: #a00e28; }
.rai-nav-button[aria-expanded="true"]::after,.rai-nav-button:hover::after { transform: scaleX(1); }
.rai-nav-chevron { display: inline-block; width: 6px; height: 6px; border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; rotate: 45deg; margin-top: -3px; }
.rai-nav-panel[hidden] { display: none !important; }
.rai-nav-panel {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: 360px; padding: 24px; z-index: 95; background: #fffefa;
  box-shadow: 0 16px 36px #37251d30; border: 1px solid #e0cfae;
  border-top: 3px solid #a17a2c; border-radius: 0 0 10px 10px;
}
.rai-nav-panel-title { color: #7e1328; font-size: 1.14rem; font-weight: 800; margin: 0 0 15px; }
.rai-nav-panel-note { color: #6f6258; font-size: .8rem; line-height: 1.65; margin: 15px 0 0; }
.rai-nav-panel-links { display: grid; gap: 2px; }
.rai-nav-panel-links a { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 11px 7px; border-bottom: 1px solid #f0e4d4; color: #30313a; font-size: .91rem; font-weight: 700; }
.rai-nav-panel-links a::after { content: '›'; color: #ae8c47; font-size: 1.2rem; }
.rai-nav-panel-links a:hover,.rai-nav-panel-links a:focus-visible { background: #fbf1e0; color: #931126; }
.rai-nav-panel-products { width: min(840px,calc(100vw - 36px)); }
.rai-nav-panel-products .rai-menu-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.rai-nav-panel-products .rai-menu-item {
  display: flex; flex-direction: column; gap: 7px; align-items: stretch;
  min-height: 0; padding: 7px; font-size: .79rem; text-align: center;
}
.rai-nav-panel-products .rai-menu-item img { width: 100%; height: 80px; object-fit: cover; }
.rai-nav-panel-products .rai-menu-item .rai-menu-arrow { display: none; }

/* A larger photograph and smaller, well-spaced copy avoid awkward Japanese wraps. */
.rai-carousel { max-width: 1170px; }
.rai-carousel-viewport { border-width: 1px; border-color: #d8b675; border-radius: 12px; box-shadow: 0 14px 37px #4e2d1b1b; }
.rai-slide { grid-template-columns: minmax(0,2fr) minmax(0,3fr); min-height: 420px; }
.rai-slide.is-current { grid-template-columns: minmax(0,2fr) minmax(0,3fr); }
.rai-slide-copy { padding: clamp(27px,3.2vw,44px); background: linear-gradient(135deg,#fffdf9,#fff9ee); }
.rai-slide-index { font-size: .69rem; letter-spacing: .13em; }
.rai-slide h3 { font-size: clamp(1.85rem,2.6vw,2.56rem); line-height: 1.37; margin: 16px 0 18px; letter-spacing: .02em; text-wrap: pretty; }
.rai-slide h3 span { font-size: .59em; margin-top: 7px; letter-spacing: .04em; }
.rai-slide-subtitle { font-size: .98rem; line-height: 1.7; }
.rai-slide-desc { font-size: .89rem; line-height: 1.75; margin: 9px 0 23px; }
.rai-slide-photo { min-height: 420px; }
.rai-slide-photo::after { border-left-width: 4px; }
.rai-slide-photo img { object-position: center; }
.rai-slide-link { padding: 12px 17px; box-shadow: none; }
.rai-carousel-controls { gap: 16px; padding-top: 16px; }
.rai-carousel-toggle {
  background: transparent; color: #684e42; border: 1px solid #cab28b;
  border-radius: 99px; padding: 6px 14px; min-height: 35px; font-size: .75rem;
  font-weight: 700; cursor: pointer;
}
.rai-carousel-toggle:hover { background: #fff9ee; color: #8c0922; }
.rai-carousel-dot { width: 10px; height: 10px; }
.rai-carousel-dot.is-current { width: 31px; }

/* Brand names are real, useful links, not dead anchors. */
.rai-brand-grid li { padding: 0; min-height: 88px; }
.rai-brand-link { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; min-height: 88px; padding: 13px 8px; color: inherit; }
.rai-brand-link:hover,.rai-brand-link:focus-visible { background: #fff1d8; outline-offset: -4px; }
.rai-brand-link::after { content: '相談品目を見る →'; color: #9b1730; font-size: .68rem; font-weight: 700; margin-top: 5px; }

@media(max-width:1000px) and (min-width:761px) {
  .rai-header-consult-label { display: none; }
  .rai-nav-panel-products .rai-menu-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:760px) {
  html { scroll-padding-top: 78px; }
  header.rai-site-header { position: sticky; top: 0; }
  .rai-header-upper { padding: 10px 13px; min-height: 68px; gap: 10px; }
  header.rai-site-header .wordmark { font-size: 1.34rem; }
  header.rai-site-header .wordmark small { font-size: .49rem; letter-spacing: .05em; margin-top: 5px; display: block; }
  .rai-header-actions { margin-left: auto; gap: 0; }
  .rai-header-consult-label,.rai-header-line { display: none; }
  header.rai-site-header .rai-header-phone { align-items: flex-end; }
  header.rai-site-header .rai-header-phone span { display: none; }
  header.rai-site-header .rai-header-phone strong { font-size: clamp(.8rem,3.15vw,1.01rem); }
  .rai-mobile-nav-toggle {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; width: 57px; min-height: 43px;
    background: #fff8ec; border: 1px solid #d3bb8d; border-radius: 6px;
    color: #6b1825; cursor: pointer; font-size: .61rem; font-weight: 800;
  }
  .rai-mobile-nav-toggle-bars { display: block; font-size: 1.17rem; line-height: 1; }
  nav.rai-header-nav { display: none; flex-direction: column; gap: 0; align-items: stretch; max-height: 72vh; overflow-y: auto; padding: 6px 15px 14px; }
  nav.rai-header-nav.is-open { display: flex; }
  .rai-nav-group { display: block; border-bottom: 1px solid #e9d8bc; }
  .rai-nav-button { width: 100%; justify-content: space-between; min-height: 52px; padding-inline: 5px; font-size: .9rem; }
  .rai-nav-button::after { display: none; }
  .rai-nav-panel { position: static; transform: none; width: 100%; padding: 8px 0 17px; box-shadow: none; border: 0; background: transparent; }
  .rai-nav-panel-title { display: none; }
  .rai-nav-panel-products .rai-menu-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .rai-nav-panel-products .rai-menu-item { min-height: 0; font-size: .77rem; padding: 6px; }
  .rai-nav-panel-products .rai-menu-item img { height: 75px; }
  .rai-nav-panel-links a { min-height: 46px; }
  .rai-carousel-section { padding-block: 48px; }
  .rai-slide.is-current { grid-template-columns: 1fr; }
  .rai-slide { min-height: 0; }
  .rai-slide-photo { grid-row: 1; height: clamp(220px,56vw,330px); min-height: 0; }
  .rai-slide-photo::after { border-left: 0; border-bottom-width: 4px; }
  .rai-slide-copy { padding: 22px clamp(18px,5vw,30px) 27px; }
  .rai-slide h3 { font-size: clamp(1.8rem,7vw,2.35rem); margin: 12px 0 13px; }
  .rai-slide-subtitle { font-size: .94rem; }
  .rai-slide-desc { font-size: .85rem; margin: 9px 0 15px; }
  .rai-carousel-controls { gap: 10px; flex-wrap: wrap; }
  .rai-carousel-toggle { font-size: .71rem; padding-inline: 11px; }
}
@media(max-width:390px) {
  .rai-header-upper { padding-inline: 8px; gap: 7px; }
  header.rai-site-header .wordmark { font-size: 1.19rem; }
  header.rai-site-header .rai-header-phone strong { font-size: .8rem; }
  .rai-mobile-nav-toggle { width: 49px; }
  .rai-slide-photo { height: 205px; }
  .rai-slide h3 { font-size: 1.75rem; }
}
@media(prefers-reduced-motion:reduce) {
  .rai-nav-button::after,.rai-header-line { transition: none; }
}
