/* SHIN redesign preview (evolution, not replacement). Loaded after every other stylesheet except shin-lockup.css.
   Principles
   1. One palette: Black / Charcoal / SHIN Yellow / Warm White. Pastel tints (green, blue, peach) fold into one warm-neutral family;
      yellow is kept for emphasis only (primary action, the first/primary item in a set, status, active state).
   2. One shape language: cards 20px, panels 28px, pills 999px. No uneven corners.
   3. Cards are defined by a hairline, not by tinted fills and soft drop shadows.
   4. One type scale: hero display, section title, product title, card title, body, label.
   5. One vertical rhythm per breakpoint. Mobile sections are tighter to shorten the scroll. */

:root{
  --rd-black:#151714;
  --rd-charcoal:#1f211c;
  --rd-charcoal-2:#2a2c26;
  --rd-yellow:#F5C928;
  --rd-white:#FFF7E5;
  --rd-paper:#f7f5ee;
  --rd-paper-2:#f1ede2;
  --rd-surface:#fffcf4;
  --rd-line:rgba(21,23,20,.12);
  --rd-line-strong:rgba(21,23,20,.24);
  --rd-line-dark:rgba(255,247,229,.16);
  --rd-r-card:20px;
  --rd-r-panel:28px;
  --rd-section:clamp(64px,8vw,104px);
  --rd-head-gap:clamp(24px,3vw,40px);

  /* Retune the soft-human tokens that the whole site already uses. */
  --hu-page:var(--rd-paper);
  --hu-warm:var(--rd-surface);
  --hu-cream:#fbf6e7;
  --hu-yellow:var(--rd-yellow);
  --hu-yellow-soft:#fcefc0;
  --hu-green-soft:var(--rd-paper-2);
  --hu-green:#efebdf;
  --hu-blue:#f3f0e6;
  --hu-peach:#f4eee1;
  --hu-deep:var(--rd-charcoal);
  --hu-deep-2:var(--rd-charcoal-2);
  --hu-char:var(--rd-charcoal-2);
  --hu-on-deep:#f6f1e3;
  --hu-on-deep-soft:#cfcabb;
  --hu-ink:#191a17;
  --hu-text:#3b3d35;
  --hu-line:#dcd7c7;
  --hu-rs:12px;
  --hu-rm:var(--rd-r-card);
  --hu-rl:var(--rd-r-panel);
  --hu-rb:var(--rd-r-panel);
  --hu-rb-s:var(--rd-r-panel);
  --hu-r1:var(--rd-r-card);--hu-r1b:var(--rd-r-card);
  --hu-r2:var(--rd-r-card);--hu-r2b:var(--rd-r-card);
  --hu-r3:var(--rd-r-card);--hu-r3b:var(--rd-r-card);
  --hu-sh:0 1px 0 rgba(21,23,20,.04);
  --hu-sh-h:0 10px 28px -14px rgba(21,23,20,.28);
}

/* ---------- Typography scale ---------- */
html body main :is(.sr-points,.sr-features,#services,#approach,#process,#plans,#future) h2{
  font-size:clamp(30px,3.4vw,44px);
  line-height:1.42;
  font-weight:600;
  letter-spacing:.01em;
  margin-bottom:clamp(14px,1.6vw,20px);
}
html body main :is(#kanso,#mitsuke) h2{
  font-size:clamp(26px,2.6vw,34px);
  line-height:1.45;
  font-weight:600;
  letter-spacing:.01em;
}
html body #contact h2{font-size:clamp(30px,3.4vw,44px);line-height:1.42}
html body .contact-email h3{font-family:var(--font-title);font-weight:600;font-size:clamp(24px,2.6vw,32px);line-height:1.45;letter-spacing:.01em}
html body main :is(#services,#kanso,#mitsuke,#approach,#future,#plans) :is(p:not([class]),.large-copy p){max-width:36em}

/* Section labels: one quiet line, consistent spacing */
html body main .section-label{margin-bottom:var(--rd-head-gap);padding-bottom:16px;border-bottom:1px solid var(--rd-line);letter-spacing:.14em}
html body .mitsuke-section .section-label{border-bottom-color:var(--rd-line-dark)}

/* ---------- Vertical rhythm (Home) ---------- */
html body main>:is(.sr-points,#services,#kanso,#approach,#process,#plans,#future){padding-block:var(--rd-section) 0}
html body main>.sr-features{padding-block:var(--rd-section)}
html body main>#future{padding-bottom:var(--rd-section)}
html body main>#kanso{padding-bottom:var(--rd-section)}

/* ---------- Panels: hero, features band, Mitsuke, contact ---------- */
html body .sr-hero{border-radius:0 0 var(--rd-r-panel) var(--rd-r-panel)}
html body .sr-features{border-radius:var(--rd-r-panel);background:var(--rd-paper-2);margin-inline:clamp(8px,1.6vw,24px)}
html body .contact-section{border-radius:var(--rd-r-panel) var(--rd-r-panel) 0 0}
html body .mitsuke-section.ip-block{border-radius:var(--rd-r-panel);background:var(--rd-charcoal);margin-inline:clamp(8px,1.6vw,24px)}
/* Light Kanso -> dark Mitsuke: a deliberate chapter change, not a floating card. */
html body main>#mitsuke{margin-block:0}
html body main>#mitsuke+section{padding-top:var(--rd-section)}

/* Dark-surface keyline so the black product tile does not dissolve into charcoal. */
.mitsuke-section .product-lockup__mark,
.ph-hero .product-lockup__mark{filter:none}
.mitsuke-section .product-lockup__mark{
  filter:drop-shadow(1px 0 0 var(--rd-line-dark)) drop-shadow(-1px 0 0 var(--rd-line-dark)) drop-shadow(0 1px 0 var(--rd-line-dark)) drop-shadow(0 -1px 0 var(--rd-line-dark));
}

/* ---------- Cards: one surface, one hairline, one radius ---------- */
html body #main :is(.sr-point>a,.nv-tiles>a,.onboarding-path li,.nv-three li,.mini-plans>*,.sd-steps>*,.trial-summary,.ip-visual,.screen-frame,.contact-email,.mini-trial){
  border-radius:var(--rd-r-card);
  box-shadow:inset 0 0 0 1px var(--rd-line);
}
html body .sr-features .feature-slide,html body .feature-carousel .screen-frame{border-radius:var(--rd-r-card)}
html body :is(.sr-point>a,.nv-tiles>a){transition:box-shadow .2s ease,transform .2s ease}
html body #main :is(.sr-point>a,.nv-tiles>a):is(:hover,:focus-visible){box-shadow:inset 0 0 0 1px var(--rd-line-strong),var(--hu-sh-h);transform:translateY(-2px)}
/* Emphasis card keeps a yellow-tinted fill (first item = primary action), the rest are warm white. */
html body .sr-point:not(:first-child)>a,html body .nv-tiles>a:not(:first-child){background:var(--rd-surface)}
/* Decorative ring on the point cards: removed (decoration without information). */
html body .sr-point a::after{content:none}
/* Plans / process: neutral surfaces, ink links. Free Trial keeps the quiet stone fill to separate it from paid plans. */
html body #main .mini-plans>*{background:var(--rd-surface);border:0;color:var(--hu-ink)}
html body #main .mini-plans>.mini-trial{background:var(--rd-paper-2)}
html body #main .trial-summary{background:var(--rd-paper-2);color:var(--hu-text)}
html body #main .onboarding-path a{color:var(--hu-ink)}
html body #main .nv-three li{background:var(--rd-surface)}
html body #main .nv-three li:first-child{background:var(--hu-yellow-soft)}
/* Mitsuke concept card on charcoal: quiet, outlined, readable. */
html body #main #mitsuke .ip-visual{background:rgba(255,247,229,.05);box-shadow:inset 0 0 0 1px var(--rd-line-dark);color:var(--hu-on-deep)}
html body #mitsuke .ip-visual :is(li,li span){color:var(--hu-on-deep)}
html body #main #mitsuke .ip-visual .ip-visual-tag{color:var(--hu-ink);border-color:var(--rd-yellow)}
html body #mitsuke .ip-visual li i{background:rgba(255,247,229,.42)}
html body #mitsuke .ip-visual li.is-flag i{background:var(--rd-yellow);box-shadow:none}
html body #mitsuke .ip-visual p{color:var(--hu-on-deep-soft);border-top-color:var(--rd-line-dark)}
/* Contact card on yellow: flat sheet with a dark hairline instead of an offset shadow. */
html body #main .contact-email{box-shadow:inset 0 0 0 1px rgba(21,23,20,.18)}

/* ---------- Actions ---------- */
/* Primary: black pill + yellow lip (the one signature device). Secondary: outline only, no lip, so it never competes. */
html body .split-shell .sr-hero .hero-actions .sr-button-line,
html body .sr-hero .sr-button-line{box-shadow:none;background:transparent;border:1px solid var(--rd-line-strong)}
html body .split-shell .sr-hero .hero-actions .sr-button-line:is(:hover,:focus-visible){background:var(--rd-surface);border-color:var(--hu-ink)}
html body .split-shell .sr-hero .hero-actions .button-dark{box-shadow:0 4px 0 var(--rd-yellow)}
html body .split-shell .sr-hero .hero-actions .button-dark:active{box-shadow:0 1px 0 var(--rd-yellow)}
html body .nv-more-link{text-decoration-thickness:1px;text-underline-offset:6px}
html body main :is(.nv-more-link,a):focus-visible{outline:3px solid var(--hu-ink);outline-offset:3px}
html body .mitsuke-section :is(.nv-more-link,a):focus-visible{outline-color:var(--rd-yellow)}

/* ---------- Footer: black bookend to the black header ---------- */
html body .site-footer{background:var(--rd-black);color:var(--rd-white);border-radius:0}
html body .site-footer .brand,html body .site-footer .brand-name,html body .site-footer-nav a{color:var(--rd-white)}
html body .site-footer .brand small,html body .site-footer-brand p,html body .site-footer-meta{color:#bdb8a9}
html body .site-footer-nav a:hover{color:var(--rd-yellow)}
html body .site-footer a:focus-visible{outline:3px solid var(--rd-yellow);outline-offset:2px}
html body .site-footer .brand-symbol i{background:var(--rd-white)}
html body .site-footer .brand-symbol i:last-child{background:var(--rd-yellow)}
html body .site-footer-in{border-top:0}
/* Product marks in the footer sit on black: same keyline as the Mitsuke section. */
html body .site-footer-nav a:is([href="kanso.html"],[href="mitsuke.html"])::before{
  filter:drop-shadow(1px 0 0 var(--rd-line-dark)) drop-shadow(-1px 0 0 var(--rd-line-dark)) drop-shadow(0 1px 0 var(--rd-line-dark)) drop-shadow(0 -1px 0 var(--rd-line-dark));
}

/* ---------- Tablet ---------- */
@media (max-width:900px){
  :root{--rd-section:clamp(56px,9vw,80px)}
}

/* ---------- Mobile: shorter scroll, same hierarchy ---------- */
@media (max-width:640px){
  :root{--rd-section:52px;--rd-head-gap:20px;--rd-r-panel:22px;--rd-r-card:16px}
  html body main :is(.sr-points,.sr-features,#services,#approach,#process,#plans,#future) h2,html body #contact h2{font-size:clamp(25px,7vw,30px);line-height:1.45}
  html body main :is(#kanso,#mitsuke) h2{font-size:clamp(22px,6.2vw,26px)}
  html body .contact-email h3{font-size:clamp(22px,6.4vw,26px)}
  html body .sr-features,html body .mitsuke-section.ip-block{margin-inline:8px}
  html body :is(.sr-point>a,.nv-tiles>a){padding:20px}
}

@media (prefers-reduced-motion:reduce){
  html body :is(.sr-point>a,.nv-tiles>a){transition:none}
  html body :is(.sr-point>a,.nv-tiles>a):is(:hover,:focus-visible){transform:none}
}

/* =====================================================================
   v3 additions
   ===================================================================== */

/* ---------- Home hero: SHIN process mark (record -> review -> action) ----------
   Replaces the line diagram inside the pale circle. Same tile family as the Kanso / Mitsuke marks. */
html body .split-shell .sr-hero::before,
html body .split-shell .sr-hero::after{content:none}
html body .split-shell .sr-hero-inner{position:relative}
html body .split-shell .sr-hero-mark{
  position:absolute;top:0;right:0;z-index:1;
  display:block;width:clamp(88px,8.6vw,120px);height:auto;margin:0;
  filter:drop-shadow(0 14px 18px rgba(21,23,20,.18));
}
@media (max-width:650px){
  html body .split-shell .sr-hero-mark{width:44px;filter:drop-shadow(0 6px 8px rgba(21,23,20,.18))}
}

/* ---------- Mobile / tablet header: SHIN kanji rail ----------
   Below 1001px the desktop .site-nav becomes a one-line row of the seven kanji under the main header row.
   Same links, same aria-labels, same aria-current; the hamburger keeps the full menu. */
@media (max-width:1000px){
  :root{--hdr-h:106px}
  header.site-header{flex-wrap:wrap;align-content:space-between;row-gap:0;box-sizing:border-box;height:var(--hdr-h);min-height:0;padding-top:8px;padding-bottom:0}
  header.site-header .site-nav{
    order:10;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
    flex:0 0 calc(100% + 2 * clamp(16px,3.5vw,48px));
    margin:0 calc(-1 * clamp(16px,3.5vw,48px));
    padding:0 clamp(8px,3vw,40px);box-sizing:border-box;
    gap:0;height:40px;border-top:1px solid rgba(247,247,240,.12);font-size:inherit;
  }
  header.site-header .site-nav a{min-height:40px;padding:0;gap:0}
  header.site-header .site-nav .nav-en{display:none}
  header.site-header .site-nav .nav-kanji{font-size:17px;color:#cfd0c4;letter-spacing:0}
  header.site-header .site-nav .nav-kanji::before,
  header.site-header .site-nav .nav-kanji::after{content:none}
  header.site-header .site-nav a[aria-current=page] .nav-kanji{color:var(--rd-yellow)}
  header.site-header .site-nav a::after{left:calc(50% - 11px);right:calc(50% - 11px);bottom:4px}
  header.site-header .site-nav a:focus-visible{outline-offset:-3px}
  .mobile-nav{top:var(--hdr-h);max-height:calc(100dvh - var(--hdr-h))}
  .resource-nav,.experience-switcher{top:var(--hdr-h)}
  html{scroll-padding-top:calc(var(--hdr-h) + 24px)}
}
/* Academy keeps its compact header on phones; the rail still sits under it. */
@media (max-width:650px){
  .academy-body header.site-header{min-height:0}
  .academy-body .mobile-nav{top:var(--hdr-h);max-height:calc(100dvh - var(--hdr-h))}
}

/* ---------- Home: one system, three roles ---------- */
html body main>#roles{padding-block:var(--rd-section) 0}
.rl-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(20px,4vw,64px);align-items:end}
html body main #roles h2{margin:0;font-size:clamp(30px,3.4vw,44px);line-height:1.42;font-weight:600;letter-spacing:.01em}
.rl-head p{margin:0;max-width:30em;color:var(--hu-text);font-size:15px;line-height:1.95}
.rl-system{margin-top:clamp(24px,3vw,36px)}
.rl-core{display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:var(--rd-r-card);background:var(--rd-charcoal);color:var(--rd-white)}
.rl-core img{display:block;width:32px;height:32px;flex:none}
.rl-core span{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;font-size:13px;line-height:1.6;color:#cfcabb}
.rl-core b{font-size:15px;font-weight:700;color:var(--rd-white)}
.rl-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,1.6vw,20px);margin:0;padding:22px 0 0;list-style:none}
.rl-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:22px 24px 24px;border-radius:var(--rd-r-card);background:var(--rd-surface);box-shadow:inset 0 0 0 1px var(--rd-line)}
/* Connector from the shared system to each role */
.rl-card::before{content:"";position:absolute;top:-22px;left:32px;width:2px;height:22px;background:var(--rd-charcoal)}
.rl-card::after{content:"";position:absolute;top:-4px;left:29px;width:8px;height:8px;border-radius:2px;background:var(--rd-yellow)}
.rl-level{font-size:11px;font-weight:700;letter-spacing:.14em;color:var(--hu-label)}
.rl-card h3{display:flex;flex-direction:column;gap:4px;margin:0;font-family:var(--font-title);font-size:clamp(21px,1.9vw,24px);font-weight:600;line-height:1.35;color:var(--hu-ink)}
.rl-card h3 small{font-family:var(--font-body);font-size:14px;font-weight:700;line-height:1.6;color:var(--hu-ink)}
.rl-card p{margin:0;font-size:14px;line-height:1.85;color:var(--hu-text)}
.rl-card ul{display:grid;gap:6px;margin:4px 0 0;padding:12px 0 0;border-top:1px solid var(--rd-line);list-style:none}
.rl-card ul li{position:relative;padding-left:16px;font-size:13px;line-height:1.6;color:var(--hu-ink)}
.rl-card ul li::before{content:"";position:absolute;left:0;top:.5em;width:7px;height:7px;border-radius:1.5px;background:var(--hu-ink)}
.rl-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 24px;margin:16px 0 0;font-size:12px;line-height:1.8;color:var(--hu-text)}
.rl-note .nv-more-link{margin:0;font-size:14px;color:var(--hu-ink)}
@media (max-width:900px){
  .rl-head{grid-template-columns:1fr;gap:12px}
}
@media (max-width:760px){
  /* Controlled horizontal cards: same order, a peek of the next role, no extra page length. */
  .rl-list{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:min(82%,300px);overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:thin;padding:22px 2px 10px;margin-inline:-2px}
  .rl-card{scroll-snap-align:start;padding:18px 18px 20px}
  .rl-core{padding:10px 14px}
  .rl-core span{font-size:12px}
}
@media (max-width:640px){
  html body main #roles h2{font-size:clamp(25px,7vw,30px);line-height:1.45}
  .rl-head p{font-size:14px}
}

/* Services: the custom-development tag leads the list. */
html body .nv-tags li.is-key{background:var(--rd-charcoal);color:var(--rd-white);font-weight:700}

@media (max-width:650px){
  .rl-list{margin-inline:-20px;padding-inline:20px;scroll-padding-inline:20px}
}
/* Shared-system bar: same keyline as other black marks on dark surfaces. */
.rl-core img{filter:drop-shadow(1px 0 0 var(--rd-line-dark)) drop-shadow(-1px 0 0 var(--rd-line-dark)) drop-shadow(0 1px 0 var(--rd-line-dark)) drop-shadow(0 -1px 0 var(--rd-line-dark))}
/* Kanso experience tabs: the selected tab used the old deep green. */
html body .experience-tabs button[aria-selected=true]{background:var(--rd-charcoal);border-color:var(--rd-charcoal);color:var(--rd-white)}

/* ---------- Academy (phones): DAY picker without clipped text ----------
   The native select truncated long day titles (「DAY 0｜自店の困りごとを整…」). The existing status label (#pos-label) is
   shown as the visible, wrapping pill; the select sits transparently on top so tapping still opens the native picker. */
@media (max-width:650px){
  html body.academy-body .academy-pos-mid{position:relative;display:grid;grid-template-areas:"pick" "dots";gap:6px}
  html body.academy-body #pos-label{
    grid-area:pick;position:relative;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;
    display:flex;align-items:center;box-sizing:border-box;min-height:44px;padding:6px 36px 6px 14px;
    border:1px solid #9aab84;border-radius:22px;background:#fffef8;
    font-size:14px;font-weight:700;line-height:1.45;color:#20271a;word-break:auto-phrase;overflow-wrap:anywhere;
  }
  html body.academy-body #pos-label::after{content:"";position:absolute;right:16px;top:50%;width:7px;height:7px;margin-top:-5px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg)}
  html body.academy-body #day-select{grid-area:pick;position:relative;z-index:1;width:100%;height:100%;min-height:44px;margin:0;opacity:0;cursor:pointer}
  html body.academy-body .academy-dots{grid-area:dots}
  html body.academy-body .academy-pos-mid:has(#day-select:focus-visible) #pos-label{outline:3px solid var(--hu-ink,#191a17);outline-offset:3px}
}
