/* デモ専用の外側だけを着色する。本体用の --primary / --dark 等は上書きしない。 */
:root {
  --demo-turquoise: #26b4a9;
  --demo-pink: #e75297;
  --demo-gray: #eeeeee;
  --demo-logo-gray: #888889;
  --demo-white: #ffffff;
  --demo-text: #202024;
  --demo-muted: #66666a;
  --demo-shadow: rgb(32 32 36 / 10%);
}
body {
  background: var(--demo-gray);
}
.site-header {
  background: var(--demo-white);
  border-color: var(--demo-gray);
  color: var(--demo-text);
}
.site-header .brand {
  gap: 10px;
}
.site-header .brand b {
  color: var(--demo-logo-gray);
  margin-left: 0;
}
.site-header .brand > span:last-child {
  border-color: var(--demo-gray);
  color: var(--demo-muted);
}
/* 提供された正式ロゴ画像は編集せず、雲のマーク部分だけをCSSで表示する。 */
.site-header .brand .demo-brand-logo {
  --demo-logo-scale: 1;
  position: relative;
  width: calc(62px * var(--demo-logo-scale));
  height: calc(42px * var(--demo-logo-scale));
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.site-header .demo-brand-logo img {
  position: absolute;
  width: calc(126px * var(--demo-logo-scale));
  height: calc(126px * var(--demo-logo-scale));
  max-width: none;
  left: calc(-32px * var(--demo-logo-scale));
  top: calc(-35px * var(--demo-logo-scale));
  object-fit: contain;
}
.site-header .demo-label {
  color: var(--demo-muted);
}
.site-header .demo-label i {
  background: var(--demo-turquoise);
}
.site-header .reset {
  background: var(--demo-white);
  border-color: var(--demo-turquoise);
  color: var(--demo-text);
}
.site-header .reset:hover {
  background: var(--demo-gray);
}
.journey {
  background: var(--demo-white);
  border-color: var(--demo-gray);
}
.journey .step {
  color: var(--demo-muted);
}
.journey .step-number {
  background: var(--demo-white);
  border-color: var(--demo-logo-gray);
  color: var(--demo-text);
}
.journey .step.visited .step-number {
  background: var(--demo-gray);
  border-color: var(--demo-turquoise);
  color: var(--demo-text);
}
.journey .step.active {
  color: var(--demo-text);
}
.journey .step.active .step-number {
  background: var(--demo-pink);
  border-color: var(--demo-pink);
  color: var(--demo-text);
}
.journey .step.active::after {
  background: var(--demo-pink);
}
.workspace > .guide {
  background: var(--demo-white);
  color: var(--demo-text);
  border-color: var(--demo-gray);
}
.guide .kicker,
.guide .eyebrow {
  color: var(--demo-muted);
}
.guide h1 {
  color: var(--demo-text);
  font-weight: 700;
  letter-spacing: 0;
}
.guide .description,
.guide .checklist li {
  color: var(--demo-muted);
}
.guide .checklist li::before {
  background: var(--demo-gray);
  color: var(--demo-text);
}
.guide .checklist li.done {
  color: var(--demo-text);
}
.guide .checklist li.done::before {
  background: var(--demo-turquoise);
  color: var(--demo-text);
}
.guide .benefit {
  background: var(--demo-gray);
  border-left-color: var(--demo-turquoise);
  color: var(--demo-text);
}
.guide .benefit strong {
  color: var(--demo-text);
}
.guide .qa > p {
  color: var(--demo-muted);
}
.guide .qa details {
  border-color: var(--demo-gray);
}
.guide .qa summary {
  color: var(--demo-text);
}
.guide .qa summary::after {
  color: var(--demo-text);
}
.guide .qa details p {
  color: var(--demo-muted);
}
.workspace > .experience {
  background: var(--demo-gray);
}
.stage-toolbar .view-switch {
  background: var(--demo-white);
  border: 1px solid var(--demo-gray);
}
.stage-toolbar .view-switch button {
  color: var(--demo-muted);
}
.stage-toolbar .view-switch button.active {
  background: var(--demo-turquoise);
  color: var(--demo-text);
  box-shadow: none;
}
.stage-toolbar .stage-caption {
  color: var(--demo-muted);
}
.stage-toolbar .stage-caption::before {
  background: var(--demo-turquoise);
}
.operation-guide {
  background: var(--demo-white);
  border-color: var(--demo-gray);
  border-left-color: var(--demo-turquoise);
  box-shadow: 0 3px 10px var(--demo-shadow);
}
.operation-guide small {
  color: var(--demo-muted);
}
.operation-guide p {
  color: var(--demo-text);
}
.operation-guide .guide-jump {
  color: var(--demo-text);
  background: var(--demo-white);
  border-color: var(--demo-turquoise);
}
.operation-guide .guide-jump:hover {
  background: var(--demo-gray);
}
.operation-pointer {
  color: var(--demo-text);
  background: var(--demo-turquoise);
  border-radius: 50%;
  filter: drop-shadow(0 0 2px var(--demo-white));
}
.stage-toolbar .salon-qa > summary {
  color: var(--demo-text);
  background: var(--demo-white);
  border-color: var(--demo-turquoise);
}
.stage-toolbar .salon-qa-panel {
  color: var(--demo-text);
  background: var(--demo-white);
  border-color: var(--demo-gray);
  box-shadow: 0 12px 32px var(--demo-shadow);
}
.stage-toolbar .salon-qa-panel details {
  border-color: var(--demo-gray);
}
.stage-toolbar .salon-qa-panel p {
  color: var(--demo-muted);
}
.stage-bottom {
  border-color: var(--demo-gray);
  flex-wrap: wrap;
}
.stage-bottom p {
  color: var(--demo-muted);
  flex: 1 1 140px;
}
.stage-bottom button {
  color: var(--demo-text);
  background: var(--demo-turquoise);
  border: 1px solid var(--demo-turquoise);
  border-radius: 8px;
  padding: 10px 16px;
  max-width: 100%;
  white-space: normal;
}
.stage-bottom button:hover {
  background: var(--demo-white);
}
.site-footer {
  background: var(--demo-gray);
  color: var(--demo-muted);
  border-color: var(--demo-white);
}
#toast {
  background: var(--demo-text);
  color: var(--demo-white);
  border-left: 4px solid var(--demo-turquoise);
  box-shadow: 0 8px 20px var(--demo-shadow);
}
.skip {
  background: var(--demo-white);
  color: var(--demo-text);
}
.site-header :focus-visible,
.journey :focus-visible,
.guide :focus-visible,
.stage-toolbar :focus-visible,
.operation-guide :focus-visible,
.stage-bottom :focus-visible,
.skip:focus-visible {
  outline: 2px solid var(--demo-text);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--demo-pink);
}
@media (max-width: 760px) {
  .site-header .brand .demo-brand-logo {
    --demo-logo-scale: 0.72;
  }
  .operation-guide .guide-jump {
    padding: 6px;
  }
  .stage-bottom button {
    padding: 8px 12px;
  }
}

/* PCだけを表示領域に固定。本体の色・文字サイズ・内部配置は維持する。 */
.phone-viewport {
  display: contents;
}
@media (min-width: 1024px) {
  html:has(body:not(.salon-comparison)) {
    height: 100%;
    overflow: hidden;
  }
  body:not(.salon-comparison) {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-rows: 60px 64px minmax(0, 1fr) 28px;
  }
  body:not(.salon-comparison) > .site-header {
    height: 60px;
  }
  body:not(.salon-comparison) > .journey {
    min-height: 0;
    padding-top: 7px;
    padding-bottom: 7px;
    overflow: auto;
  }
  body:not(.salon-comparison) .step.active::after {
    bottom: -7px;
  }
  body:not(.salon-comparison) > #app {
    min-height: 0;
    overflow: hidden;
  }
  body:not(.salon-comparison) .workspace {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    max-width: none;
    overflow: hidden;
  }
  body.salon-mode:not(.salon-comparison) .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  body:not(.salon-comparison) .workspace > .guide {
    display: block;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border-right: 1px solid var(--demo-gray);
  }
  body.salon-mode:not(.salon-comparison) .guide .qa {
    display: block;
  }
  body.salon-mode:not(.salon-comparison) .guide .description {
    margin: 16px 0;
  }
  body:not(.salon-comparison) .workspace > .experience {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 16px;
  }
  body:not(.salon-comparison) .stage-toolbar {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  body:not(.salon-comparison) .operation-guide {
    width: 100%;
    max-width: none;
    max-height: 88px;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 8px 12px;
    position: relative;
  }
  body:not(.salon-comparison) .stage {
    display: block;
    min-height: 0;
    height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    isolation: isolate;
  }
  body:not(.salon-comparison) .stage:has(> .stage-stack),
  body:not(.salon-comparison) .stage:has(> .demo-modal-layer) {
    overflow: hidden;
  }
  body:not(.salon-comparison) .stage-stack {
    height: 100%;
    min-height: 0;
  }
  body:not(.salon-comparison) .stage-stack > .reminder-tools {
    flex-shrink: 0;
  }
  body:not(.salon-comparison) .phone-viewport {
    display: block;
    position: relative;
    width: 100%;
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }
  body:not(.salon-comparison) .phone-viewport > .phone {
    position: absolute;
    left: 50%;
    top: 0;
    margin-left: -177px;
    width: 354px;
    height: 664px;
    transform: scale(var(--demo-phone-scale, 1));
    transform-origin: top center;
  }
  body:not(.salon-comparison) .stage-bottom {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding-top: 4px;
  }
  body:not(.salon-comparison) .salon-qa-panel {
    max-height: min(400px, 55dvh);
    overflow: auto;
    overscroll-behavior: contain;
  }
  body:not(.salon-comparison) .demo-modal-layer {
    min-height: 0;
    height: 100%;
  }
  body:not(.salon-comparison) .demo-modal-shell {
    min-height: 0;
    max-height: 100%;
  }
  body:not(.salon-comparison) > .site-footer {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 4px 24px;
    overflow: hidden;
  }
}

/* コピーが許可されない場合だけ、LINEの外側に手動コピー欄を出す。 */
.demo-copy-panel {
  position: fixed;
  z-index: 120;
  left: 16px;
  right: 16px;
  bottom: 48px;
  max-width: 620px;
  max-height: 45dvh;
  margin: 0 auto;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--demo-turquoise);
  border-radius: 12px;
  background: var(--demo-white);
  color: var(--demo-text);
  box-shadow: 0 8px 30px #0002;
}
.demo-copy-panel > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.demo-copy-panel button {
  width: auto;
  font-size: 12px;
  padding: 4px 12px;
}
.demo-copy-panel textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 12px;
  font: inherit;
  resize: vertical;
}

/* 操作部品自体を変えず、デモ専用の層で現在の押す場所を示す。 */
.operation-overlay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 60;
  pointer-events: none;
}
.operation-overlay[hidden],
.operation-overlay .operation-pointer[hidden] {
  display: none;
}
.operation-highlight {
  position: absolute;
  border: 3px solid var(--demo-pink);
  box-shadow: inset 0 0 0 1px #fff8;
  background: transparent;
  pointer-events: none;
}
.operation-overlay .operation-pointer {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 4px;
  line-height: 1;
  color: var(--demo-pink);
  background: transparent;
  border-radius: 0;
  filter: none;
  pointer-events: none;
}
.operation-pointer svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(var(--marker-angle, 0deg));
  animation: demo-marker-nudge 1.1s ease-in-out infinite alternate;
}
@keyframes demo-marker-nudge {
  from {
    transform: translate(0, 0) rotate(var(--marker-angle, 0deg));
  }
  to {
    transform: translate(var(--marker-dx, 3px), var(--marker-dy, 0px))
      rotate(var(--marker-angle, 0deg));
  }
}
@media (prefers-reduced-motion: reduce) {
  .operation-pointer svg {
    animation: none;
  }
}

/* スマホはシミュレーションを先に表示し、縦スクロールをページへ集約。 */
.mobile-only {
  display: none;
}
@media (max-width: 1023px) {
  body:not(.salon-comparison) {
    overflow-x: clip;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  body:not(.salon-comparison) .mobile-only {
    display: inline-flex;
  }
  body:not(.salon-comparison) > .site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 40px;
    padding: 0 10px;
    gap: 8px;
  }
  body:not(.salon-comparison) .brand {
    gap: 5px;
    flex-shrink: 0;
  }
  body:not(.salon-comparison) .brand .demo-brand-logo {
    --demo-logo-scale: 0.48;
  }
  body:not(.salon-comparison) .brand > b {
    font-size: 17px;
    letter-spacing: 0;
  }
  body:not(.salon-comparison) .brand > span:last-child,
  body:not(.salon-comparison) .demo-label {
    display: none;
  }
  body:not(.salon-comparison) .mobile-current {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body:not(.salon-comparison) .reset {
    flex-shrink: 0;
    padding: 4px 6px;
    font-size: 10px;
    border-radius: 6px;
  }
  body:not(.salon-comparison) > .journey {
    position: sticky;
    top: 40px;
    z-index: 90;
    height: 36px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 2px 8px;
    gap: 0;
    overflow: visible;
  }
  body:not(.salon-comparison) .journey::before {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    top: 18px;
    height: 1px;
    background: var(--demo-gray);
  }
  body:not(.salon-comparison) .step {
    justify-content: center;
    padding: 0;
    min-width: 0;
    gap: 0;
  }
  body:not(.salon-comparison) .step > span:last-child {
    display: none;
  }
  body:not(.salon-comparison) .step-number {
    z-index: 1;
    width: 26px;
    height: 26px;
    font-size: 11px;
    background: var(--demo-white);
  }
  body:not(.salon-comparison) .step.active::after {
    display: none;
  }
  body:not(.salon-comparison) .step.active .step-number {
    background: var(--demo-pink);
  }
  body:not(.salon-comparison) .workspace {
    display: block;
    min-height: 0;
    max-width: none;
  }
  body:not(.salon-comparison) .workspace > .guide {
    display: none;
  }
  body:not(.salon-comparison) .workspace > .experience {
    padding: 0 10px 12px;
    min-width: 0;
  }
  body:not(.salon-comparison) .stage-toolbar {
    position: sticky;
    top: 76px;
    z-index: 85;
    margin: 0;
    padding: 3px 0;
    height: 38px;
    width: 100%;
    max-width: none;
    gap: 6px;
    justify-content: space-between;
    background: var(--demo-gray);
  }
  body:not(.salon-comparison) .view-switch {
    /* 旧スマホ用 width:100% で説明ボタンを押し縮めない。 */
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 2px;
    gap: 2px;
  }
  body:not(.salon-comparison) .view-switch button {
    padding: 3px 9px;
    font-size: 11px;
    line-height: 20px;
    white-space: nowrap;
  }
  body:not(.salon-comparison) .mobile-explain {
    flex: 0 0 auto;
    min-width: 44px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 20px;
    white-space: nowrap;
    background: white;
    border: 1px solid var(--demo-turquoise);
    border-radius: 7px;
  }
  body:not(.salon-comparison) .stage-caption {
    display: none;
  }
  body:not(.salon-comparison) .operation-guide {
    position: sticky;
    top: 114px;
    z-index: 84;
    min-height: 34px;
    max-height: none;
    width: 100%;
    max-width: none;
    margin: 0 0 6px;
    padding: 3px 7px;
    gap: 6px;
    align-items: center;
    overflow: visible;
  }
  body:not(.salon-comparison) .operation-guide > div {
    flex: 1;
    min-width: 0;
  }
  body:not(.salon-comparison) .operation-guide small {
    display: none;
  }
  body:not(.salon-comparison) .operation-guide p {
    font-size: 11px;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body:not(.salon-comparison) .operation-guide .guide-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    max-width: none;
    height: 26px;
    padding: 0;
    font-size: 0;
    line-height: 18px;
    white-space: nowrap;
  }
  body:not(.salon-comparison) .guide-jump::after {
    /* 読み上げ名はボタンの aria-label に保持する。 */
    content: "↓";
    font-size: 16px;
    line-height: 1;
  }
  body:not(.salon-comparison) .stage {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }
  body:not(.salon-comparison) .stage-stack {
    height: auto;
    width: 100%;
    gap: 0;
  }
  body:not(.salon-comparison) .phone-viewport {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: visible;
  }
  body:not(.salon-comparison) .phone {
    width: min(354px, 100%);
    flex-shrink: 0;
  }
  body:not(.salon-comparison) .reminder-tools {
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 6px;
    max-width: 100%;
  }
  body:not(.salon-comparison) .reminder-tools button {
    padding: 3px 7px;
    font-size: 10px;
  }
  body:not(.salon-comparison) .stage-bottom {
    position: fixed;
    z-index: 86;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    background: var(--demo-white);
  }
  body:not(.salon-comparison) .stage-bottom > p {
    display: none;
  }
  body:not(.salon-comparison) .stage-bottom button {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  body:not(.salon-comparison) > .site-footer {
    display: none;
  }

  /* サロン・会計・顧客一覧・チャットは縦方向に自然に展開する。 */
  body:not(.salon-comparison)
    #stage
    :is(
      .salon,
      .salon-layout,
      .salon-main,
      .salon-clients,
      .salon-client-rows,
      .salon-chat,
      .salon-chat-scroll,
      .sb-screen,
      .regi-app
    ) {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }
  body:not(.salon-comparison) #stage .salon-chat-scroll,
  body:not(.salon-comparison) #stage .salon-client-rows {
    flex: none;
  }
  body:not(.salon-comparison)
    #stage
    :is(
      .calendar-scroll,
      .cy-calendar-scroll,
      .regi-table-scroll,
      .sb-schedule-scroll,
      .sb-menu-scroll,
      .sb-date-scroll,
      .sb-bottom-scroll
    ) {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    flex: none;
  }
  body:not(.salon-comparison) #stage .demo-modal-layer {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    padding: 12px;
  }
  body:not(.salon-comparison) #stage .demo-modal-shell {
    min-height: 0;
    max-height: none;
  }
  body:not(.salon-comparison) #stage .demo-modal-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body:not(.salon-comparison) .stage:has(> .demo-modal-layer) > .salon {
    display: none;
  }
  body:not(.salon-comparison)
    #stage
    :is(.karte-detail-photos, .memo-edit-photos) {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
  }
  body:not(.salon-comparison) #stage .wizard-actions,
  body:not(.salon-comparison) #stage .sb-bottom-scroll {
    position: static;
  }
  body:not(.salon-comparison) .operation-overlay {
    z-index: 95;
  }
  .mobile-intro {
    position: fixed;
    z-index: 100;
    left: 12px;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    max-width: 470px;
    margin: auto;
    padding: 12px 36px 12px 12px;
    border: 1px solid var(--demo-turquoise);
    border-radius: 12px;
    background: var(--demo-white);
    box-shadow: 0 8px 28px #0002;
    color: var(--demo-text);
    pointer-events: none;
  }
  .mobile-intro > strong {
    display: block;
    font-size: 14px;
    line-height: 1.5;
  }
  .mobile-intro > p {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mobile-intro-close {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 22px;
    line-height: 24px;
    pointer-events: auto;
  }
}
