/* ============================================================
   嶽ノ子 — Interactive Layer (v3)
   Apple風 大胆なインタラクション
   ============================================================ */

/* ===== Shared ===== */
.ix-section { position: relative; }
.ix-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--nezu);
}

/* ============================================================
   HERO: Giant scroll-parallax 嶽
   ============================================================ */
.hero-grid .tile-hero::before {
  transform: translate3d(0, var(--hero-parallax, 0px), 0) scale(var(--hero-scale, 1));
  transition: none;
  will-change: transform;
}

/* Hero intro stagger — Apple風 filter+blur */
.hero-h1, .hero-sub, .hero-actions, .hero-meta {
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready .hero-h1, .js-ready .hero-sub, .js-ready .hero-actions, .js-ready .hero-meta {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(8px);
}
.js-ready .hero-meta    { animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards; }
.js-ready .hero-h1      { animation: heroIn 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards; }
.js-ready .hero-sub     { animation: heroIn 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards; }
.js-ready .hero-actions { animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Hero marquee ticker — 下部に流れる介護業務ワード */
.hero-ticker {
  grid-column: span 12;
  background: var(--sumi);
  color: var(--on-sumi);
  padding: 22px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.hero-ticker::before, .hero-ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.hero-ticker::before { left: 0; background: linear-gradient(90deg, var(--sumi), transparent); }
.hero-ticker::after  { right: 0; background: linear-gradient(270deg, var(--sumi), transparent); }
.ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}
.ticker-item {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.ticker-item::after {
  content: "●";
  color: var(--shu);
  font-size: 10px;
}
@keyframes tickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ============================================================
   BEFORE / AFTER Interactive Drag Slider
   ============================================================ */
.ix-ba {
  margin: 80px 0;
  padding: 0 24px;
}
.ix-ba-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 32px;
}
.ix-ba-head h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--sumi);
}
.ix-ba-head h2 .accent { color: var(--shu); }
.ix-ba-head p {
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--sumi-2);
}

.ix-ba-stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--kinari-2);
  aspect-ratio: 16 / 9;
  max-height: 640px;
  user-select: none;
  cursor: ew-resize;
}
.ix-ba-side {
  position: absolute;
  inset: 0;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.ix-ba-before {
  background: linear-gradient(135deg, #EFE5D0 0%, #E5D7B8 100%);
  color: #4A3F2D;
}
.ix-ba-after {
  background: linear-gradient(135deg, #1A1614 0%, #2E2825 100%);
  color: var(--kinari);
  clip-path: inset(0 0 0 var(--split, 50%));
  transition: clip-path 0.05s linear;
  align-items: flex-end;
  text-align: right;
}
.ix-ba-after .ix-ba-headline,
.ix-ba-after .ix-ba-time {
  margin-left: auto;
}
.ix-ba-after .ix-ba-time {
  justify-content: flex-end;
}
.ix-ba-after .ix-ba-label {
  flex-direction: row-reverse;
  color: var(--shu-light);
}
.ix-ba-before .ix-ba-label {
  color: #7A6D52;
}
.ix-ba-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ix-ba-label::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.ix-ba-headline {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  max-width: 12ch;
}
.ix-ba-before .ix-ba-headline { font-style: italic; opacity: 0.75; }
.ix-ba-after .ix-ba-headline em { color: var(--shu-light); font-style: normal; }

/* Time display */
.ix-ba-time {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--serif);
}
.ix-ba-time .n {
  font-size: clamp(72px, 10vw, 160px);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.ix-ba-time .u {
  font-size: clamp(18px, 2vw, 28px);
  opacity: 0.7;
}
.ix-ba-before .ix-ba-time .n { color: #6B5C3E; }
.ix-ba-after  .ix-ba-time .n { color: #E8A999; }

/* Before: paper stack drawings */
.ix-ba-paper-stack {
  position: absolute;
  right: 64px;
  bottom: 64px;
  width: 280px;
  height: 200px;
  pointer-events: none;
}
.ix-ba-paper-stack .sheet {
  position: absolute;
  inset: 0;
  background: #FAF6EB;
  border: 1px solid #C8B68A;
  border-radius: 4px;
  padding: 18px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  color: #8C7852;
  box-shadow: 0 8px 24px rgba(74, 63, 45, 0.15);
}
.ix-ba-paper-stack .sheet:nth-child(1) { transform: rotate(-5deg) translate(-24px, -12px); }
.ix-ba-paper-stack .sheet:nth-child(2) { transform: rotate(2deg) translate(8px, -4px); }
.ix-ba-paper-stack .sheet:nth-child(3) { transform: rotate(-1deg); }
.ix-ba-paper-stack .sheet hr { border: none; height: 1px; background: #D4C8A4; margin: 6px 0; }

/* After: phone mockup */
.ix-ba-phone {
  position: absolute;
  left: 80px;
  bottom: 60px;
  width: 220px;
  height: 440px;
  background: #0D0A08;
  border-radius: 38px;
  border: 3px solid #2E2825;
  padding: 14px 10px;
  box-shadow: 0 24px 64px rgba(192, 74, 62, 0.25);
}
.ix-ba-phone-screen {
  background: var(--kinari);
  border-radius: 26px;
  height: 100%;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ix-ba-phone .row {
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 10px;
  color: var(--sumi);
  font-family: var(--sans);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ix-ba-phone .row .tick {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--uguisu);
  color: white;
  font-size: 8px;
  display: grid;
  place-items: center;
}
.ix-ba-phone .row .num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--shu);
  font-weight: 600;
}

/* Handle */
.ix-ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--split, 50%);
  width: 2px;
  background: var(--kinari);
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(26, 22, 20, 0.1);
}
.ix-ba-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--kinari);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  font-size: 20px;
  color: var(--sumi);
  pointer-events: auto;
  cursor: ew-resize;
  font-family: var(--serif);
  animation: handlePulse 2s ease-in-out infinite;
}
@keyframes handlePulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 0 rgba(192, 74, 62, 0.6); }
  50% { box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 20px rgba(192, 74, 62, 0); }
}
.ix-ba-handle-knob::before {
  content: "⇔";
  font-size: 22px;
  letter-spacing: -0.1em;
}
.ix-ba-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--kinari);
  opacity: 0.6;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: difference;
}

/* ============================================================
   BUSINESS TILES → MOBILE APP (redesigned)
   ============================================================ */
.ix-apps {
  margin: 140px 0;
  padding: 0 24px;
}
.ix-apps-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 64px;
}
.ix-apps-head h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--sumi);
}
.ix-apps-head h2 .accent { color: var(--shu); }
.ix-apps-head p {
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--sumi-2);
}

/* Dramatic dark stage */
.ix-apps-stage {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  background: radial-gradient(ellipse at 75% 50%, #1F1915 0%, #0D0A08 70%);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 780px;
  position: relative;
  isolation: isolate;
}
/* Noise + grid texture */
.ix-apps-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 239, 227, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 239, 227, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
/* Glow behind phone */
.ix-apps-stage::after {
  content: "";
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 74, 62, 0.35) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* Left side: picker with title + buttons */
.ix-apps-picker-wrap {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 2;
  border-right: 1px solid rgba(245, 239, 227, 0.08);
}
.ix-apps-picker-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(245, 239, 227, 0.55);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ix-apps-picker-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--shu);
}
.ix-apps-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ix-app-btn {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(245, 239, 227, 0.04);
  color: rgba(245, 239, 227, 0.85);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(245, 239, 227, 0.08);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 92px;
  overflow: hidden;
}
.ix-app-btn .btn-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(245, 239, 227, 0.4);
}
.ix-app-btn .btn-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 239, 227, 0.08);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: rgba(245, 239, 227, 0.5);
  transition: all 0.3s;
}
.ix-app-btn:hover {
  background: rgba(245, 239, 227, 0.08);
  border-color: rgba(245, 239, 227, 0.18);
  color: var(--on-sumi);
  transform: translateY(-2px);
}
.ix-app-btn:hover .btn-arrow {
  background: var(--shu);
  color: var(--on-shu);
}
.ix-app-btn.active {
  background: linear-gradient(135deg, var(--shu) 0%, #A63D35 100%);
  color: var(--on-shu);
  border-color: var(--shu);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(192, 74, 62, 0.35);
}
.ix-app-btn.active .btn-num { color: rgba(255,255,255,0.75); }
.ix-app-btn.active .btn-arrow { background: rgba(255,255,255,0.2); color: var(--on-shu); }

/* Right side: phone stage */
.ix-phone-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  overflow: hidden;
}

/* Floating data sources flying INTO the phone */
.ix-phone-sources {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.ix-src {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(245, 239, 227, 0.45);
  padding: 10px 14px;
  background: rgba(245, 239, 227, 0.05);
  border: 1px solid rgba(245, 239, 227, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  animation: srcFloat 8s ease-in-out infinite;
}
.ix-src::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--shu);
  margin-right: 8px;
  vertical-align: middle;
  animation: srcPulse 2s ease-in-out infinite;
}
.ix-src:nth-child(1) { top: 12%; left: 4%; animation-delay: 0s; }
.ix-src:nth-child(2) { top: 32%; left: 2%; animation-delay: 1.2s; }
.ix-src:nth-child(3) { bottom: 18%; left: 5%; animation-delay: 2.4s; }
.ix-src:nth-child(4) { top: 8%; right: 6%; animation-delay: 0.6s; }
.ix-src:nth-child(5) { bottom: 12%; right: 4%; animation-delay: 1.8s; }
@keyframes srcFloat {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-8px); opacity: 1; }
}
@keyframes srcPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Connection lines from sources to phone */
.ix-phone-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
}

/* Phone frame */
.ix-phone-frame {
  width: 360px;
  height: 740px;
  background: linear-gradient(145deg, #1A1614 0%, #0D0A08 100%);
  border-radius: 52px;
  border: 1.5px solid rgba(245, 239, 227, 0.12);
  padding: 12px;
  box-shadow:
    0 60px 120px -20px rgba(0, 0, 0, 0.6),
    0 30px 60px -15px rgba(192, 74, 62, 0.25),
    inset 0 0 0 3px #0D0A08,
    inset 0 2px 0 rgba(245, 239, 227, 0.08);
  position: relative;
  z-index: 2;
}
/* Phone side buttons */
.ix-phone-frame::before,
.ix-phone-frame::after {
  content: "";
  position: absolute;
  background: #0D0A08;
  border-radius: 2px;
}
.ix-phone-frame::before {
  left: -2px;
  top: 140px;
  width: 3px;
  height: 70px;
  box-shadow: 0 95px 0 #0D0A08;
}
.ix-phone-frame::after {
  right: -2px;
  top: 170px;
  width: 3px;
  height: 110px;
}

.ix-phone-screen {
  background: var(--kinari);
  border-radius: 42px;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Dynamic Island */
.ix-phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 32px;
  background: #0D0A08;
  border-radius: 20px;
  z-index: 10;
}
.ix-phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--sumi);
  height: 56px;
  position: relative;
  z-index: 5;
}
.ix-phone-status .time { font-variant-numeric: tabular-nums; }
.ix-phone-status .icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ix-phone-status .sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.ix-phone-status .sig span {
  width: 2.5px;
  background: var(--sumi);
  border-radius: 1px;
}
.ix-phone-status .sig span:nth-child(1) { height: 40%; }
.ix-phone-status .sig span:nth-child(2) { height: 60%; }
.ix-phone-status .sig span:nth-child(3) { height: 80%; }
.ix-phone-status .sig span:nth-child(4) { height: 100%; }
.ix-phone-status .bat {
  width: 24px;
  height: 11px;
  border: 1.3px solid var(--sumi);
  border-radius: 3px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: stretch;
}
.ix-phone-status .bat::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 5px;
  background: var(--sumi);
  border-radius: 0 2px 2px 0;
}
.ix-phone-status .bat-fill {
  background: var(--sumi);
  width: 72%;
  border-radius: 1px;
}

/* App view */
.ix-app-view {
  position: absolute;
  inset: 56px 0 0;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.ix-app-view.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* App header block */
.ix-app-view .app-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 2px 4px;
}
.ix-app-view .app-crumb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--nezu);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.ix-app-view .app-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--sumi);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.ix-app-view .app-sub {
  font-size: 12px;
  color: var(--nezu);
}

/* Hero stat card — the giant number */
.ix-app-view .app-hero {
  background: linear-gradient(135deg, var(--sumi) 0%, #2A2320 100%);
  color: var(--on-sumi);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.ix-app-view .app-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 169, 153, 0.3) 0%, transparent 70%);
}
.ix-app-view .app-hero .h-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(245, 239, 227, 0.65);
  text-transform: uppercase;
}
.ix-app-view .app-hero .h-num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ix-app-view .app-hero .h-num small {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--shu-light);
}
.ix-app-view .app-hero .h-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--shu-light);
  letter-spacing: 0.1em;
}

/* Regular card */
.ix-app-view .app-card {
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(26, 22, 20, 0.04), 0 4px 12px rgba(26, 22, 20, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.ix-app-view.active .app-card:nth-of-type(1) { animation-delay: 0.05s; }
.ix-app-view.active .app-card:nth-of-type(2) { animation-delay: 0.13s; }
.ix-app-view.active .app-card:nth-of-type(3) { animation-delay: 0.21s; }
.ix-app-view.active .app-card:nth-of-type(4) { animation-delay: 0.29s; }
.ix-app-view.active .app-hero { animation-delay: 0s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Person row with avatar */
.app-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--on-shu);
  flex-shrink: 0;
  letter-spacing: 0;
}
.app-ava.c1 { background: linear-gradient(135deg, #C04A3E, #A63D35); }
.app-ava.c2 { background: linear-gradient(135deg, #6F7F3F, #56632F); }
.app-ava.c3 { background: linear-gradient(135deg, #3B5F74, #2C4A5B); }
.app-ava.c4 { background: linear-gradient(135deg, #8B6B3F, #6B522F); }
.app-ava.c5 { background: linear-gradient(135deg, #7A4A6B, #5E3752); }
.app-person .p-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sumi);
  line-height: 1.2;
}
.app-person .p-sub {
  font-size: 11px;
  color: var(--nezu);
  line-height: 1.3;
  margin-top: 2px;
}
.app-person .p-right {
  margin-left: auto;
  text-align: right;
}

.app-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.app-card-row .name { color: var(--sumi); font-weight: 500; font-size: 13px; }
.app-card-row .sub { color: var(--nezu); font-size: 11px; }
.app-card-row .badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  font-family: var(--sans);
  letter-spacing: 0.05em;
}
.app-card-row .badge.ok { background: var(--uguisu-surface); color: #3D4424; }
.app-card-row .badge.shu { background: var(--shu-surface); color: var(--shu); }
.app-card-row .badge.ai { background: var(--ai-surface); color: var(--ai); }
.app-card-row .num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--sumi);
}
.app-chart-bar {
  height: 6px;
  background: var(--kinari-2);
  border-radius: 3px;
  overflow: hidden;
}
.app-chart-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--shu) 0%, #E8A999 100%);
  border-radius: 3px;
  transform-origin: left;
  animation: barGrow 1s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* iOS home indicator */
.ix-phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  border-radius: 2px;
  background: var(--sumi);
  opacity: 0.55;
  z-index: 10;
}
/* ============================================================
   FLOW: scroll-pinned progress
   ============================================================ */
.ix-flow-outer {
  position: relative;
  padding: 0 24px;
}
.ix-flow-sticky {
  position: sticky;
  top: 80px;
  height: 100vh;
  max-height: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
}
.ix-flow-l {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}
.ix-flow-progress {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.ix-flow-progress::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--nezu-surface);
}
.ix-flow-progress::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  width: 2px;
  height: var(--flow-progress, 0%);
  background: var(--shu);
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ix-flow-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}
.ix-flow-step.active { opacity: 1; }
.ix-flow-bullet {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--kinari);
  border: 2px solid var(--nezu-surface);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--sumi);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
  position: relative;
}
.ix-flow-step.active .ix-flow-bullet {
  background: var(--shu);
  color: var(--on-shu);
  border-color: var(--shu);
  transform: scale(1.1);
}
.ix-flow-step h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--sumi);
  margin-bottom: 8px;
}
.ix-flow-step p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--sumi-2);
}
.ix-flow-step .dur {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--shu);
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.4s;
}
.ix-flow-step.active .dur { opacity: 1; }

/* Right illustration for flow */
.ix-flow-r {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--sumi);
  color: var(--on-sumi);
  overflow: hidden;
}
.ix-flow-scene {
  position: absolute;
  inset: 0;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.ix-flow-scene.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.ix-flow-scene .scene-num {
  font-family: var(--serif);
  font-size: 180px;
  line-height: 0.8;
  color: var(--shu);
  opacity: 0.15;
  position: absolute;
  right: 40px;
  top: 40px;
  pointer-events: none;
}
.ix-flow-scene h4 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}
.ix-flow-scene h4 em { color: var(--shu-light); font-style: normal; }
.ix-flow-scene .scene-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ix-flow-scene .scene-card {
  background: rgba(245, 239, 227, 0.08);
  border: 1px solid rgba(245, 239, 227, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ix-flow-scene .scene-card .ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--shu);
  color: var(--on-shu);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.ix-flow-scene .scene-card.uguisu .ic { background: var(--uguisu); color: var(--on-uguisu); }
.ix-flow-scene .scene-card.ai .ic { background: var(--ai); color: var(--on-ai); }

/* ============================================================
   PRICING SIMULATOR
   ============================================================ */
.ix-sim {
  margin: 100px 0 20px;
  padding: 0 24px;
}
.ix-sim-head {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.ix-sim-head h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--sumi);
}
.ix-sim-head h2 .accent { color: var(--shu); }
.ix-sim-head p {
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--sumi-2);
}

.ix-sim-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ix-sim-controls {
  background: var(--kinari-2);
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.ix-sim-group { display: flex; flex-direction: column; gap: 16px; }
.ix-sim-group .g-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nezu);
}
.ix-sim-group .g-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--sumi);
}

.ix-sim-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: var(--kinari);
  border-radius: var(--r-md);
  border: 1px solid rgba(26, 22, 20, 0.06);
}
.ix-sim-opt {
  padding: 16px 20px;
  border-radius: calc(var(--r-md) - 4px);
  background: transparent;
  color: var(--sumi-2);
  font-family: var(--serif);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ix-sim-opt .opt-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--nezu);
  text-transform: uppercase;
}
.ix-sim-opt.active {
  background: var(--sumi);
  color: var(--on-sumi);
}
.ix-sim-opt.active .opt-sub { color: var(--shu-light); }

/* ===== Auto plan indicator (replaces manual toggle) ===== */
.ix-plan-indicator {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--kinari);
  border-radius: var(--r-md);
  border: 1px solid rgba(26, 22, 20, 0.08);
  min-height: 156px;
}
.ix-plan-indicator[data-plan="single"] {
  background: var(--kinari-2) !important;
  border-color: rgba(180, 100, 50, 0.18) !important;
  color: var(--sumi) !important;
}
.plan-ind-stage {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
}
.plan-viz {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s;
}
.ix-plan-indicator[data-plan="single"] .plan-viz-single { opacity: 1; transform: scale(1); }
.ix-plan-indicator[data-plan="integrated"] .plan-viz-integrated { opacity: 1; transform: scale(1); }

/* Single: one bold tile */
.plan-viz-single .plan-viz-tile {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--shu);
  box-shadow: 0 10px 32px rgba(192, 74, 62, 0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
  animation: planTilePulse 2.4s ease-in-out infinite;
}
.plan-viz-single .plan-viz-tile::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
}
@keyframes planTilePulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Integrated: hub + orbiting satellites */
.plan-viz-integrated { position: absolute; inset: 0; }
.plan-viz-hub {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--shu-light);
  box-shadow: 0 6px 20px rgba(217, 120, 98, 0.5);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.plan-viz-hub::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  border: 1px dashed rgba(217, 120, 98, 0.5);
  animation: hubRing 3s linear infinite;
}
@keyframes hubRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.plan-viz-orbit {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(245, 239, 227, 0.85);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  z-index: 2;
}
.plan-viz-orbit-1 { left: 18%;  top: 18%;  animation: orbitFloat 3s ease-in-out infinite; }
.plan-viz-orbit-2 { right: 18%; top: 18%;  animation: orbitFloat 3s ease-in-out 0.4s infinite; }
.plan-viz-orbit-3 { left: 18%;  bottom: 18%; animation: orbitFloat 3s ease-in-out 0.8s infinite; }
.plan-viz-orbit-4 { right: 18%; bottom: 18%; animation: orbitFloat 3s ease-in-out 1.2s infinite; }
@keyframes orbitFloat {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(0.85); opacity: 1; }
}
.plan-viz-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: rgba(217, 120, 98, 0.4);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  fill: none;
  z-index: 1;
}

.plan-ind-body { display: flex; flex-direction: column; gap: 6px; }
.plan-ind-code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}
.plan-ind-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.ix-plan-indicator[data-plan="integrated"] .plan-ind-name {
  color: var(--shu-light);
}
.plan-ind-desc {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.75;
  margin-top: 4px;
}

/* g-title accent */
.g-title-accent { color: var(--shu); }
.ix-plan-indicator[data-plan="integrated"] .g-title-accent { color: var(--shu-light); }

/* Feature slider hint */
.ix-sim-ticks-hint {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-top: 8px;
  color: var(--nezu);
  text-transform: uppercase;
}
.ix-sim-ticks-hint .hint-single { color: var(--shu); }
.ix-sim-ticks-hint .hint-integrated { color: var(--sumi); font-weight: 600; }

.ix-sim-slider {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ix-sim-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--serif);
}
.ix-sim-slider-head .v {
  font-size: 48px;
  font-weight: 500;
  color: var(--sumi);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ix-sim-slider-head .v small {
  font-size: 16px;
  opacity: 0.7;
  margin-left: 6px;
}
.ix-sim-slider-head .lim {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--nezu);
}
.ix-sim-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--kinari);
  border-radius: 3px;
  border: 1px solid rgba(26, 22, 20, 0.08);
  outline: none;
}
.ix-sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: var(--shu);
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid var(--kinari);
  box-shadow: 0 4px 12px rgba(192, 74, 62, 0.3);
  transition: transform 0.2s;
}
.ix-sim-range::-webkit-slider-thumb:hover { transform: scale(1.1); }
.ix-sim-range::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: var(--shu);
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid var(--kinari);
  box-shadow: 0 4px 12px rgba(192, 74, 62, 0.3);
}
.ix-sim-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--nezu);
  padding: 0 4px;
}

/* Summary panel */
.ix-sim-result {
  background: var(--sumi);
  color: var(--on-sumi);
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.ix-sim-result::before {
  content: "¥";
  position: absolute;
  font-family: var(--serif);
  font-size: 420px;
  color: rgba(192, 74, 62, 0.08);
  right: -40px;
  bottom: -80px;
  line-height: 0.8;
  pointer-events: none;
}
.ix-sim-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}
.ix-sim-result-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--shu-light);
}
.ix-sim-result-head .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  background: rgba(232, 169, 153, 0.15);
  color: var(--shu-light);
  border-radius: 999px;
}
.ix-sim-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 2;
}
.ix-sim-total .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(245, 239, 227, 0.6);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ix-sim-total .v {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  color: var(--on-sumi);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s;
}
.ix-sim-total .v small {
  font-size: 16px;
  opacity: 0.65;
  margin-left: 4px;
  font-weight: 400;
}
.ix-sim-total .v.flash { animation: flashUpdate 0.4s ease; }
@keyframes flashUpdate {
  0% { opacity: 1; }
  30% { opacity: 0.3; color: var(--shu-light); }
  100% { opacity: 1; }
}
.ix-sim-breakdown {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 239, 227, 0.1);
}
.ix-sim-breakdown .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(245, 239, 227, 0.75);
}
.ix-sim-breakdown .row .amt {
  font-family: var(--mono);
  color: var(--on-sumi);
  font-variant-numeric: tabular-nums;
}
.ix-sim-result-footer {
  position: relative;
  z-index: 2;
  font-size: 11px;
  color: rgba(245, 239, 227, 0.5);
  line-height: 1.6;
}

/* ============================================================
   CASE METRICS: counts + donuts
   ============================================================ */
.ix-case-donut {
  --pct: 0;
  --size: 120px;
  width: var(--size);
  height: var(--size);
  position: relative;
  flex-shrink: 0;
}
.ix-case-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ix-case-donut .track {
  fill: none;
  stroke: rgba(26, 22, 20, 0.08);
  stroke-width: 10;
}
.ix-case-donut .fg {
  fill: none;
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ix-case-donut.drawn .fg {
  stroke-dashoffset: calc(283 - (283 * var(--pct) / 100));
}
.ix-case-donut .val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
.ix-case-donut .val small {
  font-size: 12px;
  opacity: 0.65;
  margin-left: 2px;
}

/* Upgrade existing .case-metric with donut layout option */
.case-metric.has-donut {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.case-metric.has-donut > div:first-child {
  flex: 1;
  min-width: 160px;
}

/* CountUp number flash */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 1025px) {
  .ix-flow-outer { min-height: 260vh; }
}
@media (max-width: 1024px) {
  .ix-apps-stage { grid-template-columns: 1fr; min-height: 0; }
  .ix-apps-picker-wrap { padding: 40px 32px; border-right: none; border-bottom: 1px solid rgba(245, 239, 227, 0.08); }
  .ix-phone-stage { padding: 56px 24px; }
  .ix-phone-frame { position: static; justify-self: center; }
  .ix-flow-outer { min-height: 0; }
  .ix-flow-sticky { position: static; height: auto; max-height: none; grid-template-columns: 1fr; }
  .ix-sim-body { grid-template-columns: 1fr; }
  .ix-ba-paper-stack, .ix-ba-phone { display: none; }
}
@media (max-width: 720px) {
  .ix-ba-head, .ix-apps-head, .ix-sim-head { grid-template-columns: 1fr; }
  .ix-apps-picker { grid-template-columns: repeat(2, 1fr); }
  .ix-sim-toggle { grid-template-columns: 1fr; }
  .ix-sim-totals { grid-template-columns: 1fr; }
  .ix-sim-controls, .ix-sim-result { padding: 32px 24px; }
  .ix-ba-side { padding: 32px 24px; }
  .ix-ba-time .n { font-size: 72px; }
  .ix-flow-scene { padding: 32px 24px; }
  .ix-flow-scene .scene-num { font-size: 120px; }
}
