
:root {
  --bg:#f7fbff; --surface:rgba(255,255,255,.96); --surface-soft:#f4f8fd;
  --text:#0b2146; --muted:#7086ad; --line:#dfe9f7; --primary:#1677ff;
  --primary-soft:#eaf4ff; --green:#16c784; --orange:#ff8a00; --purple:#873cff;
  --shadow:0 12px 32px rgba(42,87,143,.11); --shadow-soft:0 6px 18px rgba(42,87,143,.08);
  --radius-lg:22px; --radius-md:16px; --radius-sm:12px;
  font-family:Inter,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",system-ui,sans-serif;
  color:var(--text); background:var(--bg);
}
*{box-sizing:border-box} html{background:var(--bg)} body{margin:0;min-height:100vh;background:radial-gradient(circle at 12% 0%,rgba(42,181,255,.10),transparent 28%),linear-gradient(180deg,#fbfdff 0%,#f5f9ff 100%)}
button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}.app-shell{width:min(100%,460px);min-height:100vh;margin:0 auto;padding:10px 12px 96px;background:rgba(255,255,255,.72);border-left:1px solid rgba(223,233,247,.6);border-right:1px solid rgba(223,233,247,.6)}
.app-header{display:flex;align-items:center;gap:10px;min-height:64px;padding:8px 4px 14px}.icon-button{width:40px;height:40px;border:0;background:transparent;border-radius:12px;font-size:26px;color:#164a92}.brand-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:#fff;font-weight:800;background:linear-gradient(145deg,#0d4fb7,#1887ff);box-shadow:var(--shadow-soft)}.brand-copy{min-width:0}.brand-copy h1{margin:0;font-size:16px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-copy p{margin:2px 0 0;font-size:11px;color:#8ca1c3}.header-spacer{flex:1}.status-pill{padding:7px 10px;border-radius:999px;background:var(--primary-soft);color:#175aa9;font-size:11px;font-weight:800;white-space:nowrap}
.eyebrow{margin:0 0 3px;font-size:10px;font-weight:800;letter-spacing:.06em;color:#637ba4}.muted{color:var(--muted);font-size:12px;line-height:1.6}.card{background:var(--surface);border:1px solid rgba(223,233,247,.9);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:16px;margin-bottom:12px}.hero{padding:20px 18px;background:linear-gradient(145deg,#ffffff,#f4f9ff)}.hero-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:var(--primary-soft);font-size:24px;margin-bottom:12px}.hero h2{margin:0 0 8px;font-size:23px;line-height:1.35}.hero p{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.field{display:grid;gap:7px;margin-bottom:14px}.field label{font-size:12px;font-weight:800}.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 13px;outline:none;box-shadow:inset 0 1px 2px rgba(10,49,93,.02)}.field textarea{min-height:90px;resize:vertical}.field input:focus,.field textarea:focus,.field select:focus{border-color:#9ac7ff;box-shadow:0 0 0 3px rgba(22,119,255,.09)}
.primary,.secondary,.ghost{width:100%;min-height:48px;border-radius:14px;font-weight:800;border:0;padding:12px 14px}.primary{color:#fff;background:linear-gradient(145deg,#2d8dff,#0666ee);box-shadow:0 8px 18px rgba(22,119,255,.24)}.secondary{background:var(--primary-soft);color:#175aa9}.ghost{background:#fff;border:1px solid var(--line);color:#55759f}.button-row{display:grid;grid-template-columns:1fr 1.35fr;gap:10px;margin-top:16px}.button-stack{display:grid;gap:10px}
.progress-card{padding:14px 15px}.progress-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.progress-head strong{font-size:14px}.progress-head span{font-size:11px;color:var(--muted);font-weight:800}.track{height:7px;border-radius:999px;background:#e7eef8;margin-top:10px;overflow:hidden}.fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#2ab5ff,#1677ff)}
.product-card{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:center}.product-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#eef5ff}.product-card strong{display:block;font-size:14px}.product-card p{margin:4px 0 0}
.choice-list{display:grid;gap:10px}.choice{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:11px;width:100%;text-align:left;padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow-soft)}.choice-number{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:var(--primary-soft);color:var(--primary);font-weight:900}.choice strong{display:block;font-size:13px;line-height:1.4}.choice small{display:block;margin-top:3px;color:var(--muted);font-size:10px;line-height:1.4}.chev{color:#91a5c5;font-size:20px}.choice.selected{border-color:#7ab6ff;background:#f7fbff;box-shadow:0 0 0 3px rgba(22,119,255,.08)}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:18px 2px 10px}.section-title h2{margin:0;font-size:17px}.section-title small{color:var(--muted)}
.summary-grid{display:grid;gap:9px}.summary-row{padding:11px 12px;border-radius:13px;background:var(--surface-soft);border:1px solid #e8f0fa}.summary-row span{display:block;font-size:10px;color:#6d83aa;font-weight:800}.summary-row strong{display:block;margin-top:4px;font-size:13px;line-height:1.55;white-space:pre-wrap}
.work-steps{display:grid;gap:9px}.work-step{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:12px;border-radius:14px;background:#fff;border:1px solid var(--line)}.step-dot{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#eef5ff;color:#6f8bb4;font-weight:900}.work-step.done .step-dot{background:#e9fbf4;color:#0e9b66}.work-step.active{border-color:#8cc0ff;background:#f9fcff}.work-step.active .step-dot{background:#eaf4ff;color:var(--primary)}.step-state{font-size:10px;font-weight:800;color:var(--muted)}
.notice{padding:12px 13px;border-radius:14px;background:#fff8e8;border:1px solid #ffe0a7;color:#72521d;font-size:11px;line-height:1.6}.success-notice{background:#ebfbf4;border-color:#c8f2df;color:#18734f}.danger-notice{background:#fff0f0;border-color:#ffd1d1;color:#943f3f}
.result-hero{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center}.result-badge{width:64px;height:64px;border-radius:20px;display:grid;place-items:center;background:linear-gradient(145deg,#0d4fb7,#1887ff);color:#fff;font-size:24px;box-shadow:var(--shadow-soft)}.result-hero h2{margin:0 0 5px;font-size:18px}.result-hero p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}.result-list{display:grid;gap:8px}.result-item{padding:12px 13px;border-radius:14px;border:1px solid var(--line);background:#fff}.result-item span{font-size:10px;color:#6d83aa;font-weight:800}.result-item strong{display:block;margin-top:4px;font-size:13px;line-height:1.55}
.action-menu{display:grid;gap:9px}.action-button{display:grid;grid-template-columns:35px 1fr;gap:10px;align-items:center;width:100%;text-align:left;padding:12px;border:1px solid var(--line);background:#fff;border-radius:15px}.action-button:hover,.action-button:focus-visible{border-color:#8ec1ff;background:#f8fbff}.action-num{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-weight:900}.action-button strong{font-size:12px;line-height:1.45}.action-button small{display:block;color:var(--muted);font-size:9px;margin-top:2px}
.bottom-nav{position:fixed;left:50%;bottom:0;z-index:20;width:min(100%,460px);transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,1fr);padding:8px 10px max(8px,env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--line);backdrop-filter:blur(14px)}.nav-item{border:0;background:transparent;display:grid;justify-items:center;gap:3px;color:#7890b7;text-decoration:none}.nav-item span{font-size:17px;font-weight:800}.nav-item small{font-size:10px}.nav-item.active{color:var(--primary)}
.tool-grid{display:grid;gap:11px}.tool-card{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:15px;border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-soft);text-decoration:none;color:inherit}.tool-card .tool-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:var(--primary-soft);font-size:23px}.tool-card strong{display:block;font-size:14px}.tool-card small{display:block;color:var(--muted);font-size:10px;margin-top:4px;line-height:1.45}
.mock-product-list{display:grid;gap:10px}.mock-product{display:grid;grid-template-columns:22px 1fr;gap:10px;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff}.mock-product input{margin-top:3px}.mock-product strong{font-size:13px}.mock-product p{margin:4px 0;color:var(--muted);font-size:10px;line-height:1.5}.mock-product.selected{border-color:#78b6ff;background:#f9fcff}
.review-options{display:grid;gap:9px}.review-option{padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left}.review-option strong{font-size:12px}.inline-back{display:inline-flex;align-items:center;gap:6px;color:#55759f;text-decoration:none;font-size:11px;font-weight:800;margin:2px 0 12px}.footnote{margin:16px 4px 0;color:#8499b9;font-size:10px;line-height:1.55}.toast{position:fixed;left:50%;bottom:88px;z-index:40;width:min(calc(100% - 28px),430px);transform:translate(-50%,20px);padding:12px 14px;border-radius:14px;background:#10264a;color:#fff;font-size:11px;line-height:1.5;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media (max-width:360px){.app-shell{padding-left:9px;padding-right:9px}.brand-copy h1{font-size:15px}.hero h2{font-size:21px}.button-row{grid-template-columns:1fr}.status-pill{display:none}}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* v0.2.0 shared context / required-context gate */
.data-origin{display:inline-block;margin-top:5px;color:#4d79b0;font-size:9px;font-weight:800}.field-optional{margin-left:5px;color:#90a2bf;font-weight:700}.shared-data-card{display:grid;gap:8px;margin-bottom:18px;padding:13px;border-radius:16px;background:#f7fbff;border:1px solid #dceafd}.shared-data-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.shared-data-head span{padding:5px 8px;border-radius:999px;background:#eaf4ff;color:#1763bb;font-size:9px;font-weight:900}.shared-data-head strong{font-size:11px;color:#496b98}.context-source-list{display:grid;gap:9px}.context-source{position:relative;display:grid;grid-template-columns:30px 1fr;gap:11px;align-items:start;padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff}.context-source input{position:absolute;opacity:0;pointer-events:none}.source-check{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#edf3fb;color:#fff;font-weight:900}.context-source.selected{border-color:#78b6ff;background:#f8fcff}.context-source.selected .source-check{background:var(--primary)}.context-source.locked{background:#f3f8ff}.context-source small{display:block;color:#6c84aa;font-size:9px;font-weight:900}.context-source strong{display:block;margin-top:2px;font-size:12px}.context-source p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.5}.context-preview{display:grid;gap:7px}.context-chip{padding:9px 11px;border-radius:12px;background:#f5f9ff;border:1px solid #e0ebf8}.context-chip span{display:block;color:#6b83a9;font-size:9px;font-weight:900}.context-chip strong{display:block;margin-top:2px;font-size:11px;line-height:1.4}.warning-required{background:#fff8e8;border-color:#ffe0a7;color:#72521d}.required-gate{border-color:#ffd99a;box-shadow:0 12px 30px rgba(213,142,27,.11)}.gate-head{display:flex;align-items:center;gap:11px;margin-bottom:10px}.gate-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:#fff0c9;color:#9d6a11;font-weight:950}.gate-head h2{margin:0;font-size:16px}.required-gate>p{margin:0 0 14px;color:#725f3e;font-size:11px;line-height:1.6}.gate-note{padding:10px 11px;border-radius:12px;background:#f7f9fc!important;color:#6a7e9d!important;font-size:10px!important}.source-summary-card{margin-top:12px}.source-summary-card h3{margin:0 0 9px;font-size:13px}

/* v0.3.0 shared case / record selection */
.wide-ghost{width:100%;margin-top:12px}
.case-list,.record-list{display:grid;gap:9px}
.case-option{position:relative;display:grid;grid-template-columns:28px 1fr;gap:11px;align-items:start;padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff}
.case-option input{position:absolute;opacity:0;pointer-events:none}
.case-radio{width:24px;height:24px;border-radius:50%;border:2px solid #c9d9ee;background:#fff;box-shadow:inset 0 0 0 5px #fff}
.case-option.selected{border-color:#78b6ff;background:#f8fcff}
.case-option.selected .case-radio{border-color:var(--primary);background:var(--primary)}
.case-option small{display:block;color:#6c84aa;font-size:9px;font-weight:900}
.case-option strong{display:block;margin-top:2px;font-size:12px}
.case-option p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.case-option.new-case{background:#f9fbfe}
.scope-note{margin:0 0 10px;padding:8px 10px;border-radius:11px;background:#f6f9fd;color:#6a7f9f;font-size:10px;line-height:1.5}
.record-row{display:grid;grid-template-columns:78px 1fr;gap:10px;padding:12px;border:1px solid var(--line);border-radius:15px;background:#fff}
.record-source{align-self:start;padding:5px 7px;border-radius:999px;background:#eef5ff;color:#2867b0;font-size:9px;font-weight:900;text-align:center}
.record-row strong{display:block;font-size:11px;line-height:1.45}
.record-row p{margin:4px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.record-row small{display:block;margin-top:5px;color:#91a0b7;font-size:9px}
.empty-state{padding:16px;border:1px dashed #d7e2f0;border-radius:14px;color:#7c91b0;font-size:11px;line-height:1.6;text-align:center}
.success-notice{background:#eefbf5;border-color:#c6efdb;color:#276947}

.nav-item.disabled {
  cursor: not-allowed;
  opacity: 0.38;
  pointer-events: none;
}

.nav-item.disabled span,
.nav-item.disabled small {
  color: #9fb0c8;
}

/* v0.4.2 company-shared product access / whitespace origin exploration */
.product-context-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1.25fr;gap:8px;margin-top:3px}
.product-context-link,.compact-link{display:flex;align-items:center;justify-content:center;min-height:38px;padding:8px 10px;border-radius:12px;text-decoration:none;font-size:10px;font-weight:900}
.product-context-link{border:1px solid var(--line);background:#fff;color:#55759f}.product-context-link.primary-link{border-color:#cfe4ff;background:var(--primary-soft);color:#1763bb}
.setup-product-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:8px;margin:-6px 0 18px}.setup-product-actions .compact-link{width:100%;min-height:40px}
.launcher-utility-actions{display:grid;gap:10px;margin-top:12px}.productless-button{margin-top:10px;border-color:#cfe4ff;background:#f8fbff;color:#1763bb}
.shared-data-card.no-product{background:#fffaf0;border-color:#ffe0a7}.shared-data-card.no-product .shared-data-head span{background:#fff0c9;color:#8b6218}
.product-list-heading{margin-top:0}.product-create-panel[hidden]{display:none}
@media (max-width:360px){.product-context-actions,.setup-product-actions{grid-template-columns:1fr}}

/* =========================================================
   SALES GLOBAL NAV
   Global navigation for all Sales 5 Tools screens
   ========================================================= */

.sales-global-nav-toggle {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 14px;
  z-index: 10020;

  width: 44px;
  height: 44px;

  border: 0;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 30px rgba(20, 55, 100, 0.10),
    0 0 0 1px rgba(60, 115, 180, 0.12);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sales-global-nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: #123a72;
}

.sales-global-nav-toggle:focus-visible,
.sales-global-nav-close:focus-visible,
.sales-global-nav-item:focus-visible {
  outline: 3px solid rgba(31, 122, 255, 0.28);
  outline-offset: 3px;
}

.sales-global-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 10030;

  background: rgba(12, 32, 62, 0.30);
  backdrop-filter: blur(2px);

  opacity: 0;
  transition: opacity 180ms ease;
}

.sales-global-nav-overlay.is-open {
  opacity: 1;
}

.sales-global-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;

  z-index: 10040;

  width: min(84vw, 330px);

  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    18px
    calc(24px + env(safe-area-inset-bottom, 0px));

  background: rgba(250, 253, 255, 0.985);

  box-shadow: 18px 0 50px rgba(15, 48, 88, 0.18);

  transform: translateX(-105%);
  transition: transform 200ms ease;

  display: flex;
  flex-direction: column;
}

.sales-global-nav.is-open {
  transform: translateX(0);
}

.sales-global-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 4px 4px 18px;
  border-bottom: 1px solid rgba(53, 102, 160, 0.12);
}

.sales-global-nav-eyebrow {
  margin-bottom: 3px;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;

  color: #6f8db1;
}

.sales-global-nav-title {
  font-size: 20px;
  font-weight: 800;
  color: #102f5c;
}

.sales-global-nav-close {
  width: 38px;
  height: 38px;

  border: 0;
  border-radius: 12px;

  background: #edf5ff;
  color: #315f97;

  font-size: 25px;
  line-height: 1;

  cursor: pointer;
}

.sales-global-nav-list {
  display: grid;
  gap: 5px;

  padding-top: 17px;
}

.sales-global-nav-item {
  min-height: 52px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 0 14px;

  border-radius: 14px;

  color: #274d7d;
  text-decoration: none;

  font-size: 15px;
  font-weight: 700;

  transition:
    background 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.sales-global-nav-item:hover {
  background: #f0f6ff;
}

.sales-global-nav-item:active {
  transform: scale(0.99);
}

.sales-global-nav-item.is-current {
  background: #e8f2ff;
  color: #0868dc;
}

.sales-global-nav-dot {
  width: 8px;
  height: 8px;

  flex: 0 0 auto;

  border-radius: 50%;
  background: #c9d8ea;
}

.sales-global-nav-item.is-current .sales-global-nav-dot {
  background: #1879ee;
  box-shadow: 0 0 0 5px rgba(24, 121, 238, 0.10);
}

html.sales-global-nav-open,
html.sales-global-nav-open body {
  overflow: hidden;
}

@media (min-width: 900px) {
  .sales-global-nav {
    width: 330px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sales-global-nav,
  .sales-global-nav-overlay,
  .sales-global-nav-item {
    transition: none;
  }
}

/* =========================================================
   SALES GLOBAL NAV HEADER INTEGRATION
   ========================================================= */

.app-header .sales-global-nav-toggle {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;

  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  padding: 0;
  margin: 0;

  border: 0;
  border-radius: 12px;

  background: transparent;
  box-shadow: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-header .sales-global-nav-toggle:hover {
  background: rgba(232, 242, 255, 0.8);
}

.app-header .sales-global-nav-toggle .sales-global-nav-bar {
  display: block;

  width: 18px;
  height: 2px;

  border-radius: 999px;

  background: #315f97;
}

/*
 * drawer の left はJSで app-shell 左端へ合わせる。
 */
.sales-global-nav {
  left: 0;
  max-width: 100vw;
}

@media (max-width: 520px) {
  .sales-global-nav {
    left: 0 !important;
  }
}


/* =========================================================
   GLOBAL NAV HIDDEN CONTRACT
   hidden must override drawer/overlay display rules
   ========================================================= */

.sales-global-nav[hidden],
.sales-global-nav-overlay[hidden] {
  display: none !important;
}


/* =========================================================
   SALES GLOBAL NAV UTILITIES
   ========================================================= */

.sales-global-nav-divider {
  height: 1px;
  margin: 12px 8px 9px;
  background: rgba(53, 102, 160, 0.13);
}

.sales-global-nav-section-label {
  padding: 4px 14px 7px;

  color: #7890ad;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
}

