/* Product case extension. Keep the existing portfolio palette and type system. */
.shangen-showcase {
  scroll-margin-top: 120px;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 62px);
  padding: 46px 38px 38px;
  clip-path: none;
  background: #111415;
  overflow: hidden;
}
.shangen-title-detail { display: block; margin-top: 12px; font-size: .52em; line-height: 1.4; color: #c9cdcd; letter-spacing: 0; }
.shangen-subtitle { margin: 24px 0 12px; color: var(--cyan); font-size: 18px; line-height: 1.5; font-weight: 400; }
.shangen-showcase .system-case-kicker { line-height: 1.8; letter-spacing: .1em; }
.shangen-showcase .system-showcase-copy p { color: #a8adad; text-wrap: pretty; }
.product-case-link { display: inline-flex; gap: 30px; align-items: center; min-height: 48px; margin-top: 28px; border-bottom: 1px solid var(--cyan); color: var(--cyan); font-size: 14px; transition: color .2s, gap .2s; }
.product-case-link:hover { color: #fff; gap: 38px; }
.product-case-link span { font-size: 22px; }
.product-case-link:focus-visible,
.case-nav a:focus-visible,
.case-jump-links a:focus-visible,
.case-image-link:focus-visible,
.case-footer a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; border-radius: 4px; }
.shangen-preview { min-width: 0; margin: 0; }
.shangen-devices { position: relative; min-height: 425px; padding: 28px 0 0; }
.shangen-browser { width: 88%; margin-left: auto; border: 1px solid #434849; border-radius: 14px; overflow: hidden; background: #eaf0fa; box-shadow: 0 24px 45px #0005; }
.shangen-browser-bar { display: flex; gap: 5px; align-items: center; padding: 11px 12px; background: #202628; color: #b6c0c0; }
.shangen-browser-bar > span { width: 5px; height: 5px; border-radius: 50%; background: #6b7374; }
.shangen-browser-bar small { margin-left: 9px; font-size: 10px; }
.shangen-browser > img { display: block; width: 100%; height: 325px; object-fit: cover; object-position: top; }
.shangen-phone { position: absolute; left: 0; bottom: 0; display: block; width: 174px; height: auto; border: 5px solid #252a2d; border-radius: 32px; box-shadow: 0 20px 40px #0007; }
.shangen-preview figcaption { margin-top: 22px; color: #929b9c; font-size: 11px; line-height: 1.8; }

/* Standalone case. All rules are scoped to avoid changing existing sections. */
.case-page { background: var(--dark); color: #f1f3f3; overflow-x: visible; }
.case-page p { text-wrap: pretty; }
.case-nav { position: sticky; top: 16px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 16px; padding: 14px 22px; border: 1px solid var(--line); border-radius: 24px; background: #171a1bc9; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.case-nav .case-back { font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; gap: 14px; }
.case-nav .case-back span { color: var(--cyan); font-size: 22px; }
.case-nav .case-contact { color: var(--cyan); font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.case-nav a:hover { color: #fff; }
.case-hero { padding: 96px 0 80px; }
.case-eyebrow { display: flex; align-items: center; gap: 18px; color: #a5afaf; font-size: 11px; letter-spacing: .12em; line-height: 1.8; }
.case-status { padding-left: 16px; border-left: 1px solid #465051; color: var(--cyan); white-space: nowrap; }
.case-hero h1 { margin: 30px 0; font-size: clamp(2.6rem, 5.8vw, 5.8rem); font-weight: 300; letter-spacing: -.045em; line-height: 1.16; }
.case-hero h1 em { display: inline; font-style: normal; color: var(--cyan); }
.case-hero .case-project-name { color: #ddd; font-size: 18px; line-height: 1.7; margin-bottom: 16px; }
.case-hero .case-summary { max-width: 740px; color: #aeb5b5; font-size: 16px; line-height: 1.9; }
.case-facts { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr; gap: 32px; margin: 40px 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts > div { min-width: 0; }
.case-facts dt { font-size: 11px; color: #8d999a; margin-bottom: 12px; }
.case-facts dd { margin: 0; color: #e5e9e9; font-size: 14px; line-height: 1.8; }
.case-jump-links { display: flex; flex-wrap: wrap; column-gap: 30px; row-gap: 8px; }
.case-jump-links a { display: inline-flex; align-items: center; min-height: 44px; color: #a4aeae; font-size: 13px; }
.case-jump-links a:hover { color: var(--cyan); }
.case-cover { padding: 36px 40px 26px; border: 1px solid var(--line); border-radius: 28px; background: #131718; }
.case-cover .shangen-devices { max-width: 1080px; min-height: 620px; margin: 0 auto; padding-top: 0; }
.case-cover .shangen-browser { width: 87%; }
.case-cover .shangen-browser > img { height: 550px; }
.case-cover .shangen-phone { width: 250px; border-width: 7px; border-radius: 40px; }
.case-cover figcaption { margin-top: 28px; }
.case-section { padding: 90px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.case-section-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 10%; }
.case-section-index { color: var(--cyan); font-size: 11px; letter-spacing: .16em; }
.case-section h2 { margin: 18px 0 28px; font-weight: 300; font-size: clamp(2rem, 3.7vw, 3.4rem); line-height: 1.2; letter-spacing: -.04em; }
.case-section h2 em { color: var(--cyan); font-style: normal; }
.case-section p { color: #aeb5b5; font-size: 15px; line-height: 1.9; }
.case-problem-rows { margin: 0; }
.case-problem-rows > div { display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.case-problem-rows dt { color: #e7ecec; font-size: 15px; line-height: 1.9; }
.case-problem-rows dd { margin: 0; color: #aeb5b5; font-size: 15px; line-height: 1.9; }
.case-role-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.case-decisions-heading { max-width: 720px; margin-bottom: 60px; }
.case-decision { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8%; align-items: center; padding: 46px 0; border-top: 1px solid var(--line); }
.case-decision h3 { margin: 16px 0 22px; color: #fff; font-weight: 400; font-size: clamp(1.55rem, 2.5vw, 2.1rem); line-height: 1.4; }
.case-decision .decision-number { color: #7f8d8d; font-size: 12px; letter-spacing: .16em; }
.case-rule { margin: 26px 0 0; display: grid; gap: 12px; }
.case-rule > div { display: grid; grid-template-columns: 74px 1fr; gap: 14px; font-size: 13px; line-height: 1.8; }
.case-rule dt { color: var(--cyan); }
.case-rule dd { margin: 0; color: #d0d6d6; }
.case-evidence { margin: 0; }
.case-image-link { display: block; border-radius: 18px; overflow: hidden; background: #1b2224; }
.case-image-link img { display: block; width: 100%; height: auto; transition: filter .2s; }
.case-image-link:hover img { filter: brightness(.94); }
.case-evidence figcaption { margin-top: 14px; color: #8f9b9c; font-size: 11px; line-height: 1.8; }
.case-evidence--phone .case-image-link { width: min(260px, 100%); margin: 0 auto; border: 5px solid #252a2d; border-radius: 36px; }
.case-evidence--phone figcaption { text-align: center; }
.case-ai-flow { display: flex; align-items: start; gap: 10px; margin: 32px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-ai-flow > span { flex: 1; color: #d8dede; font-size: 13px; line-height: 1.8; }
.case-ai-flow > i { padding-top: 3px; color: var(--cyan); font-style: normal; }
.case-ai-flow small { display: block; color: #819090; font-size: 11px; }
.case-evidence--admin .case-image-link { max-height: 500px; overflow-y: auto; }
.case-deliveries { margin: 0; }
.case-deliveries > div { padding: 24px 0; border-top: 1px solid var(--line); }
.case-deliveries dt { color: #fff; margin-bottom: 10px; font-size: 17px; }
.case-deliveries dd { margin: 0; color: #aeb5b5; font-size: 15px; line-height: 1.9; }
.case-result { font-size: 18px !important; color: #e5ebeb !important; }
.case-boundaries { margin-top: 30px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #14191a; }
.case-boundaries h3 { margin: 0 0 14px; font-size: 16px; font-weight: 400; color: var(--cyan); }
.case-boundaries p { margin: 0; font-size: 13px; }
.case-brand { width: 140px; max-width: 100%; height: auto; opacity: .9; margin-top: 24px; }
.case-footer { padding: 72px 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.case-footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 18px; font-size: 14px; }
.case-footer a:last-child { color: var(--cyan); }
.case-footer a:hover { color: #fff; }
@media (max-width: 1023px) {
  .shangen-showcase { grid-template-columns: 1fr; padding: 28px 24px; gap: 34px; }
  .shangen-showcase .system-showcase-copy p { max-width: 680px; font-size: 14px; }
  .shangen-preview { width: min(640px, 100%); }
  .shangen-devices { min-height: 395px; }
  .shangen-browser > img { height: 310px; }
  .shangen-phone { width: 160px; }
  .case-hero { padding-top: 70px; }
  .case-section-grid { grid-template-columns: 1fr; gap: 22px; }
  .case-cover { padding: 28px 24px 24px; }
  .case-cover .shangen-devices { min-height: 480px; }
  .case-cover .shangen-browser > img { height: 405px; }
  .case-cover .shangen-phone { width: 195px; border-radius: 34px; }
  .case-decision { gap: 5%; }
}
@media (max-width: 639px) {
  .shangen-showcase { padding: 28px 20px; border-radius: 24px; }
  .shangen-subtitle { font-size: 17px; margin-top: 20px; }
  .shangen-title-detail { font-size: 17px; }
  .shangen-devices { min-height: 310px; padding-top: 0; }
  .shangen-browser { width: 89%; border-radius: 10px; }
  .shangen-browser > img { height: 234px; }
  .shangen-phone { width: 128px; border-width: 4px; border-radius: 25px; }
  .shangen-preview figcaption { margin-top: 18px; font-size: 11px; }
  .case-nav { top: 10px; margin-top: 10px; padding: 8px 14px; border-radius: 18px; }
  .case-nav .case-back, .case-nav .case-contact { font-size: 12px; }
  .case-eyebrow { gap: 12px; letter-spacing: .06em; font-size: 10px; }
  .case-status { padding-left: 12px; }
  .case-hero { padding-top: 56px; padding-bottom: 44px; }
  .case-hero h1 { font-size: clamp(2.4rem, 10.2vw, 3.8rem); margin: 24px 0; }
  .case-hero .case-project-name { font-size: 15px; }
  .case-hero .case-summary { font-size: 14px; line-height: 1.85; }
  .case-facts { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; margin: 28px 0 18px; }
  .case-facts dt { margin-bottom: 5px; }
  .case-facts dd { font-size: 13px; }
  .case-jump-links { column-gap: 20px; }
  .case-jump-links a { font-size: 12px; }
  .case-cover { padding: 24px 16px 20px; border-radius: 20px; }
  .case-cover .shangen-devices { min-height: 325px; }
  .case-cover .shangen-browser > img { height: 250px; }
  .case-cover .shangen-phone { width: 140px; border-width: 4px; border-radius: 26px; }
  .case-cover figcaption { margin-top: 18px; }
  .case-section { padding: 56px 0; scroll-margin-top: 100px; }
  .case-section h2 { margin-bottom: 20px; }
  .case-section p, .case-problem-rows dt, .case-problem-rows dd, .case-deliveries dd { font-size: 14px; }
  .case-problem-rows > div { grid-template-columns: 60px 1fr; gap: 12px; padding: 20px 0; }
  .case-decisions-heading { margin-bottom: 30px; }
  .case-decision { grid-template-columns: 1fr; gap: 30px; padding: 32px 0; }
  .case-decision h3 { margin: 12px 0 18px; }
  .case-evidence--phone .case-image-link { width: 230px; }
  .case-ai-flow { flex-wrap: wrap; gap: 8px; }
  .case-ai-flow > span { flex: 0 0 calc(50% - 20px); }
  .case-ai-flow > i:nth-of-type(2) { display: none; }
  .case-boundaries { padding: 20px; }
  .case-boundaries p { font-size: 13px; }
  .case-footer { padding: 46px 0 30px; flex-wrap: wrap; }
}

/* Aitree extension: preserve the original home hand-phone and QR. */
.aitree-showcase { scroll-margin-top: 120px; }
.aitree-showcase .system-case-kicker { line-height: 1.8; letter-spacing: .1em; }
.aitree-title-detail { display: block; margin-top: 12px; font-size: .52em; line-height: 1.4; color: #c9cdcd; letter-spacing: 0; }
.aitree-subtitle { margin: 24px 0 12px; color: var(--cyan); font-size: 18px; line-height: 1.5; font-weight: 400; }
.aitree-showcase .system-showcase-copy p { color: #a8adad; text-wrap: pretty; }
.aitree-showcase .mini-program-proof { margin-bottom: 8px; }
.aitree-cover-devices { display: grid; grid-template-columns: minmax(180px, .32fr) minmax(0, 1fr); align-items: center; gap: 5%; }
.aitree-cover-phone { max-width: 280px; }
.aitree-cover-phone img, .aitree-phone-evidence img, .aitree-phone-pair img { display: block; width: 100%; height: auto; clip-path: inset(0 round 16% / 8%); }
.aitree-cover-workspace { min-width: 0; }
.aitree-browser { overflow: hidden; border: 1px solid #434849; border-radius: 14px; box-shadow: 0 24px 45px #0005; }
.aitree-browser > img { display: block; width: 100%; height: auto; }
.aitree-cover-paper { display: flex; align-items: center; gap: 24px; margin: 26px 24px 0; }
.aitree-cover-paper img { display: block; width: 125px; height: auto; border-radius: 3px; box-shadow: 0 12px 30px #0005; transform: rotate(-3deg); }
.aitree-cover-paper p { margin: 0; color: #a8adad; font-size: 13px; line-height: 1.8; }
.aitree-cover figcaption { margin-top: 26px; }
.aitree-phone-evidence .case-image-link { width: min(260px, 100%); margin: 0 auto; background: transparent; border-radius: 0; }
.aitree-phone-evidence figcaption { text-align: center; }
.aitree-phone-pair { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
.aitree-phone-pair .case-image-link { background: transparent; border-radius: 0; }
.aitree-page .aitree-small-note { font-size: 13px; color: #929e9e; }
.aitree-print-evidence { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8%; align-items: center; padding: 38px 0 46px; }
.aitree-print-evidence h3 { margin: 0 0 18px; font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 400; line-height: 1.5; }
.aitree-paper-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.aitree-paper-pair .case-image-link { border-radius: 3px; box-shadow: 0 12px 30px #0005; }
.aitree-brand { display: block; width: 64px; height: 64px; margin-top: 28px; border-radius: 16px; }
.aitree-experience-qr { margin: 0 0 24px; color: #c4cccc; font-size: 15px; }
.aitree-experience-qr img { width: 114px; height: 129px; }
@media (max-width: 1023px) {
  .aitree-showcase .system-showcase-copy p { max-width: 680px; }
  .aitree-cover-devices { grid-template-columns: minmax(140px, .38fr) minmax(0, 1fr); gap: 4%; }
  .aitree-cover-paper { margin: 20px 0 0; gap: 18px; }
  .aitree-cover-paper img { width: 90px; }
  .aitree-cover-paper p { font-size: 12px; }
}
@media (max-width: 639px) {
  .aitree-title-detail { font-size: 17px; }
  .aitree-subtitle { font-size: 17px; margin-top: 20px; }
  .aitree-showcase .system-showcase-copy p { font-size: 14px; }
  .aitree-cover-devices { grid-template-columns: 1fr; gap: 26px; }
  .aitree-cover-phone { width: min(200px, 75%); margin: 0 auto; }
  .aitree-cover-paper { margin: 24px 12px 0; }
  .aitree-cover figcaption { line-height: 1.8; }
  .aitree-phone-pair { gap: 14px; }
  .aitree-phone-evidence .case-image-link { width: 230px; }
  .aitree-print-evidence { grid-template-columns: 1fr; gap: 30px; padding: 10px 0 32px; }
  .aitree-paper-pair { gap: 14px; }
  .aitree-experience-qr { align-items: center; }
}
