/* ===== Common CSS — mitsubachi-site ===== */

/* --- Reset & Base --- */
html, body { width: 100%; overflow-x: clip; }
body { min-width: 0; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 0; }

/* --- SP Hamburger (details/summary) --- */
.site-drawer { display: none; }

@media (max-width: 767px) {
  /* Hamburger toggle */
  nav.menu { display: none; }
  .lang-switch { display: none !important; }

  .site-drawer {
    display: block;
    position: fixed; top: 18px; right: 16px; z-index: 60;
  }
  .site-drawer summary {
    list-style: none;
    width: 40px; height: 40px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(4px);
    border: 1px solid #f0d9de;
    border-radius: 50%;
    display: grid; place-items: center;
    cursor: pointer;
    font-size: 18px; color: #2a2226;
  }
  .site-drawer summary::-webkit-details-marker { display: none; }
  .site-drawer[open] summary { background: #e25b85; color: #fff; border-color: #e25b85; }

  .drawer-body {
    position: fixed; top: 0; right: 0;
    width: 280px; height: 100dvh;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0,0,0,.1);
    padding: 80px 32px 40px;
    display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto;
    animation: drawer-in .25s ease;
  }
  @keyframes drawer-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  .drawer-body a {
    display: block;
    padding: 14px 0;
    font-family: "Shippori Mincho", serif;
    font-size: 15px;
    letter-spacing: .12em;
    color: #2a2226;
    border-bottom: 1px solid #f0d9de;
  }
  .drawer-body a:hover { color: #e25b85; }
  .drawer-lang {
    display: flex; gap: 8px; margin-top: 24px;
  }
  .drawer-lang button {
    appearance: none; border: 1px solid #f0d9de; background: #fff;
    padding: 8px 18px; border-radius: 999px;
    font-family: "Cormorant Garamond", serif;
    font-size: 12px; letter-spacing: .2em; color: #5b4f55;
    cursor: pointer;
  }
  .drawer-lang button.on { background: #e25b85; color: #fff; border-color: #e25b85; }

  .drawer-overlay {
    position: fixed; inset: 0; z-index: -1;
    background: rgba(42,34,38,.3);
  }

  /* Header SP */
  header.site { padding: 14px 0; }
  .nav {
    display: flex !important;
    justify-content: center;
    grid-template-columns: none !important;
  }
  .brand-text .jp { font-size: 16px; }

  /* Hero SP */
  .hero { padding: 130px 0 80px !important; min-height: 70dvh !important; }
  .hero::after { background-size: 180% !important; background-position: center !important; }
  .hero-inner { height: auto !important; }
  .hero-h1 { font-size: 24px !important; line-height: 1.5 !important; letter-spacing: .04em !important; margin-bottom: 20px !important; }
  .hero-lead { font-size: 14px !important; }
  .hero-sub { font-size: 13px !important; white-space: normal !important; margin-top: -30px !important; }
  .hero-en { font-size: 13px !important; }
  .kanji-mark { font-size: 160px !important; }
  .hero-butterfly {
    display: block !important;
    width: 80px !important;
    left: 3% !important;
    top: auto !important;
    bottom: 80px !important;
    opacity: .65 !important;
    -webkit-animation: butterfly-float-sp 6s ease-in-out infinite;
    animation: butterfly-float-sp 6s ease-in-out infinite;
    -webkit-transform: initial;
    transform: initial;
  }
  .hero-bee {
    display: block !important;
    width: 80px !important;
    right: 3% !important;
    top: 80px !important;
    opacity: .75 !important;
    -webkit-animation: bee-float-sp 4s ease-in-out infinite;
    animation: bee-float-sp 4s ease-in-out infinite;
    -webkit-transform: initial;
    transform: initial;
  }
  @-webkit-keyframes butterfly-float-sp {
    0%   { -webkit-transform: translateY(0) rotate(0deg); transform: translateY(0) rotate(0deg); }
    25%  { -webkit-transform: translateY(-6px) rotate(-2deg); transform: translateY(-6px) rotate(-2deg); }
    50%  { -webkit-transform: translateY(4px) rotate(1deg); transform: translateY(4px) rotate(1deg); }
    75%  { -webkit-transform: translateY(-4px) rotate(-1deg); transform: translateY(-4px) rotate(-1deg); }
    100% { -webkit-transform: translateY(0) rotate(0deg); transform: translateY(0) rotate(0deg); }
  }
  @keyframes butterfly-float-sp {
    0%   { transform: translateY(0) rotate(0deg); }
    25%  { transform: translateY(-6px) rotate(-2deg); }
    50%  { transform: translateY(4px) rotate(1deg); }
    75%  { transform: translateY(-4px) rotate(-1deg); }
    100% { transform: translateY(0) rotate(0deg); }
  }
  @-webkit-keyframes bee-float-sp {
    0%   { -webkit-transform: translate(0,0) rotate(0deg); transform: translate(0,0) rotate(0deg); }
    30%  { -webkit-transform: translate(-4px,-6px) rotate(-2deg); transform: translate(-4px,-6px) rotate(-2deg); }
    60%  { -webkit-transform: translate(3px,-3px) rotate(1deg); transform: translate(3px,-3px) rotate(1deg); }
    100% { -webkit-transform: translate(0,0) rotate(0deg); transform: translate(0,0) rotate(0deg); }
  }
  @keyframes bee-float-sp {
    0%   { transform: translate(0,0) rotate(0deg); }
    30%  { transform: translate(-4px,-6px) rotate(-2deg); }
    60%  { transform: translate(3px,-3px) rotate(1deg); }
    100% { transform: translate(0,0) rotate(0deg); }
  }

  /* Vertical title — keep vertical on SP */
  .vertical-title {
    font-size: 24px !important;
    height: 360px !important;
    line-height: 1.75 !important;
    letter-spacing: .1em !important;
  }
  .vertical-title .accent { font-size: inherit !important; }
  .hero-copy { justify-content: center !important; }

  /* Deco background SP */
  .deco-bg { opacity: .5; }

  /* Video section SP */
  .video-sec { padding: 60px 0 !important; }
  .video-head h2 { font-size: 22px !important; }
  .video-head p { font-size: 14px !important; max-width: 100% !important; }
  .video-frame { border-radius: 6px !important; }
  .video-frame-pc { display: none !important; }
  .video-frame-sp { display: block !important; cursor: pointer; }

  /* Sections SP */
  .positive-sec { padding: 60px 0 70px !important; }
  .pos-h2 { font-size: 18px !important; line-height: 1.6 !important; }
  .pos-lead { font-size: 13px !important; line-height: 2 !important; }
  .pos-split { grid-template-columns: 1fr !important; gap: 24px !important; }
  .compare { grid-template-columns: 1fr !important; }
  .compare-col { padding: 30px 24px !important; }
  .compare-col.dim { border-right: none !important; border-bottom: 1px solid #f0d9de; }
  .compare-col h3 { font-size: 20px !important; }
  .compare-arrow { position: static !important; transform: none !important; margin: -10px auto; width: 44px; height: 44px; display: grid !important; place-items: center; }
  .pattern-grid { grid-template-columns: 1fr !important; gap: 40px !important; padding: 60px 0 !important; min-height: auto !important; }
  .pattern-img { position: static !important; width: 100% !important; height: 200px !important; border-radius: 6px; }
  .num-list li { grid-template-columns: 40px 1fr !important; }
  .mini-grid { grid-template-columns: 1fr !important; }
  .campaign-banner { padding: 40px 0 !important; }
  .campaign-inner { flex-direction: column !important; text-align: center; gap: 20px !important; }
  .campaign-inner h3 { font-size: 20px !important; }

  /* Closing SP */
  .closing { padding: 60px 0 50px !important; }
  .closing-text h2 { font-size: 20px !important; letter-spacing: .02em !important; }

  /* CTA band SP */
  .cta-band h3 { font-size: 20px !important; letter-spacing: .02em !important; }
  .cta-band p { font-size: 13px !important; }

  /* Section padding SP */
  .chapter { padding: 60px 0 !important; }
  .about-org { padding: 60px 0 !important; }
  .np { padding: 60px 0 !important; }

  /* Hex trio SP — 三つ盛り亀甲を縮小して中央配置 */
  .positive-sec { overflow: visible !important; }
  .pos-right { justify-content: center !important; overflow: visible !important; }
  .hex-layout { width: 260px !important; height: 260px !important; margin: 0 auto !important; }
  .hex-card { width: 125px !important; height: 144px !important; }
  .hex-card:nth-child(1) { left: 67.5px !important; }
  .hex-card:nth-child(2) { left: 0 !important; }
  .hex-card:nth-child(3) { left: 135px !important; }
  .hex-card h4 { font-size: 11px !important; letter-spacing: 0 !important; }
  .hex-hint { position: absolute !important; bottom: -24px !important; left: 50% !important; transform: translateX(-50%) !important; margin-top: 0; }

  /* Hex modals SP */
  .hex-modal { padding: 36px 24px 32px !important; max-width: 95% !important; }

  /* Service grids SP */
  .svc-01 { grid-template-columns: 1fr !important; gap: 24px !important; }
  .svc-vis { box-shadow: 0 16px 30px -16px rgba(210,63,115,.2) !important; }
  .svc-cta-row { padding: 24px 20px !important; }
  .overview-grid { grid-template-columns: 1fr !important; }
  .ov-card { padding: 24px 20px !important; }
  .ch-head { grid-template-columns: 1fr !important; gap: 16px !important; }
  .ch-num { border-right: none !important; padding-right: 0 !important; border-bottom: 1px solid #ead0d6; padding-bottom: 12px; font-size: 48px !important; }
  .ch-titles h2 { font-size: 22px !important; letter-spacing: .02em !important; }
  .book-grid { gap: 24px !important; }
  .book-info h3 { font-size: 20px !important; }

  /* Shiru grids SP */
  .timeline { grid-template-columns: 1fr 1fr !important; }
  .data-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
  .stats { grid-template-columns: 1fr !important; }
  .threat-list { grid-template-columns: 1fr !important; }
  .culture { grid-template-columns: 1fr !important; gap: 40px !important; }
  .meaning { grid-template-columns: 1fr !important; }
  .actions { grid-template-columns: 1fr !important; }
  .rel-grid { grid-template-columns: 1fr !important; }
  .pillars-grid { grid-template-columns: 1fr !important; }

  /* PR link SP */
  .pr-link { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  .pr-link a { font-size: 12px !important; padding: 8px 18px !important; }

  /* About SP */
  .about-org-grid { max-width: 100% !important; }
  .about-org-body .lead { font-size: 18px !important; line-height: 1.7 !important; }
  .about-org-body p { font-size: 14px !important; max-width: 100% !important; }
  .np-head { padding: 0 !important; }
  .np-head h2 { font-size: 24px !important; line-height: 1.6 !important; }
  .sec-label { font-size: 10px !important; letter-spacing: .2em !important; }
  .timeline li { grid-template-columns: 80px 1fr !important; gap: 14px !important; }
  .timeline .year { font-size: 18px !important; }
  .timeline .desc { font-size: 14px !important; }
  .timeline-section h3 { font-size: 20px !important; }
  .closing q { font-size: 20px !important; line-height: 1.9 !important; }

  /* Events SP */
  .feat-card { grid-template-columns: 1fr !important; }
  .feat-img { min-height: 260px !important; }
  .feat-body { padding: 30px 24px !important; }
  .feat-body h2 { font-size: 24px !important; }
  .feat-cta { flex-direction: column !important; }
  .ev-grid { grid-template-columns: 1fr !important; }
  .ev { grid-template-columns: 1fr !important; }
  .ev-date { border-right: none !important; border-bottom: 1px solid #f0d9de; padding: 20px !important; }
  .ev-date .day { font-size: 36px !important; }
  .arc-row { grid-template-columns: 1fr !important; gap: 8px !important; padding: 16px 0 !important; }
  .filter-row { gap: 8px !important; }
  .chip { padding: 6px 14px !important; font-size: 11px !important; }

  /* Footer SP */
  .foot { grid-template-columns: 1fr !important; gap: 16px !important; text-align: center; }
  .foot h5 { margin-bottom: 8px !important; }
  .foot ul { gap: 4px !important; }
  .foot-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .top-arrow { margin: 0 auto !important; order: -1; }
  footer.site p:last-child { margin-top: 10px !important; }

  /* Buttons SP */
  .btn { min-width: 0 !important; width: 100%; justify-content: center; }
  .btn-outline, .btn-primary { font-size: 13px !important; }

  /* Book grid SP */
  .book-grid { grid-template-columns: 1fr !important; }

  /* Contact SP */
  .row { grid-template-columns: 1fr !important; }
  form { padding: 24px !important; }
}

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) and (min-width: 768px) {
  .pos-split { grid-template-columns: 1fr 1fr !important; gap: 40px !important; }
  .svc-01 { grid-template-columns: 1fr !important; gap: 30px !important; }
  .mini-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .timeline { grid-template-columns: repeat(2, 1fr) !important; }
  .threat-list { grid-template-columns: repeat(2, 1fr) !important; }
  .actions { grid-template-columns: repeat(2, 1fr) !important; }
  .rel-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .foot { grid-template-columns: 1fr 1fr !important; }
  .hero { min-height: auto !important; }
}
