/* vxl_ja.html 専用スタイル。main.css の後に読み込む。 */

.vxl-page {
    --vxl-accent: #4F44FF;
    --vxl-accent-dark: #3a30e0;
    --vxl-navy: #1f2a6b;
    --vxl-stage-bg: #f4f4fa;
    --vxl-card-bg: #f7f7f7;
    --vxl-ink: #0f172a;
    --vxl-muted: #475569;
    --vxl-line: #d7d9e6;
    --vxl-pending: #b9bdd3;
    --vxl-pad: 16px;
    --vxl-gap: 16px;
    display: block;
    background: #fff;
    color: var(--vxl-ink);
}

/* 320px: パネル内 256px・2列 124px・間隔 8px / 390px: パネル内 326px・2列 155px・間隔 16px */
@media (max-width: 359px) {
    .vxl-page { --vxl-gap: 8px; }
}

@media (min-width: 768px) {
    .vxl-page { --vxl-pad: 24px; }
}

@media (min-width: 1024px) {
    .vxl-page { --vxl-pad: 32px; }
}

.vxl-page [hidden] { display: none !important; }
.vxl-enhanced [data-nojs] { display: none !important; }

.vxl-page :focus-visible {
    outline: 3px solid var(--vxl-accent);
    outline-offset: 2px;
}

.vxl-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--vxl-pad);
}

.vxl-num,
.vxl-hero__name,
.vxl-tab__num {
    font-family: 'Barlow Condensed', 'Pretendard', sans-serif;
}

/* ---------- 上部・ヒーロー ---------- */

.vxl-top { padding-top: calc(var(--nav-height, 80px) + 16px); }

.vxl-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--vxl-accent);
    font-weight: 600;
}

.vxl-back:hover { text-decoration: underline; }

.vxl-hero { padding: 16px 0 48px; }

.vxl-hero__title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.vxl-hero__name {
    font-size: var(--type-display);
    font-weight: 700;
    line-height: 1;
    color: var(--vxl-navy);
}

.vxl-hero__sub {
    font-size: var(--type-subheading);
    font-weight: 800;
    line-height: 1.4;
}

.vxl-hero__lead {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    line-height: 1.8;
}

.vxl-hero__note {
    margin: 12px 0 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
}

.vxl-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 24px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--vxl-accent);
    color: #fff;
    font-weight: 700;
}

.vxl-cta:hover { background: var(--vxl-accent-dark); color: #fff; }

/* ---------- デモ区画 ---------- */

.vxl-demo {
    padding: 48px 0;
    border-top: 1px solid var(--vxl-line);
}

.vxl-demo__layout {
    display: grid;
    gap: 24px;
}

.vxl-demo__text,
.vxl-demo__stage { min-width: 0; }

@media (min-width: 1024px) {
    .vxl-demo { padding: 72px 0; }

    .vxl-demo__layout {
        grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
        column-gap: 40px;
        align-items: start;
    }
}

.vxl-num {
    margin: 0 0 8px;
    font-size: var(--type-stat);
    font-weight: 700;
    line-height: 1;
    color: var(--vxl-accent);
}

.vxl-demo__title {
    margin: 0 0 12px;
    font-size: var(--type-subheading);
    font-weight: 800;
    line-height: 1.35;
}

.vxl-demo__desc {
    margin: 0 0 20px;
    color: var(--vxl-muted);
    line-height: 1.8;
}

.vxl-real {
    margin: 0 0 16px;
    color: var(--vxl-muted);
}

.vxl-real__title {
    margin: 0 0 8px;
    color: var(--vxl-ink);
    font-size: var(--type-body);
    font-weight: 800;
}

.vxl-real p {
    margin: 0;
    font-size: var(--type-body);
    line-height: 1.8;
}

.vxl-real p + p { margin-top: 8px; }

.vxl-case {
    margin: 0;
    font-size: var(--type-body);
    line-height: 1.8;
    color: var(--vxl-muted);
}

.vxl-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: var(--type-body);
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}

.vxl-badge--example { background: #e3e5ec; color: #4b5563; }

/* ---------- 操作ボタン ---------- */

.vxl-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.vxl-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.vxl-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 6px 8px;
    border: 1px solid var(--vxl-line);
    border-radius: 10px;
    background: #fff;
    color: var(--vxl-muted);
    font: inherit;
    font-size: var(--type-body);
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vxl-tab[aria-selected="true"] {
    border-color: var(--vxl-accent);
    background: var(--vxl-accent);
    color: #fff;
}

.vxl-tab__num {
    font-size: var(--type-lead);
    font-weight: 700;
    line-height: 1;
}

.vxl-tab__short { display: none; }

@media (max-width: 359px) {
    .vxl-tab__long { display: none; }
    .vxl-tab__short { display: inline; }
}

/* ---------- 舞台 ---------- */

/* 写真と操作ボタンをひとつの透明なパネルに収める。 */
.vxl-demo__stage,
.vxl-story__stage,
.vxl-analyze__board {
    padding: 16px;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px var(--vxl-line);
}

@media (min-width: 600px) {
    .vxl-demo__stage,
    .vxl-story__stage,
    .vxl-analyze__board { padding: 20px; }
}

@media (min-width: 1024px) {
    .vxl-demo__stage,
    .vxl-story__stage,
    .vxl-analyze__board { padding: 24px; }
}

.vxl-stage { position: relative; }

.vxl-stage__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vxl-stage__note,
.vxl-stage__source {
    margin: 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    line-height: 1.6;
}

.vxl-stage__source { margin-top: 12px; }

.vxl-live {
    min-height: 1.6em;
    margin: 12px 0 0;
    font-size: var(--type-body);
    font-weight: 600;
    line-height: 1.6;
}

.vxl-fixedcap {
    margin: 10px 0 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    line-height: 1.6;
}

.vxl-nojs-steps {
    margin: 12px 0 0;
    padding-left: 1.4em;
    font-size: var(--type-body);
    line-height: 1.7;
}

/* ---------- カード（入力・結果は同じ幅・4:5・#f7f7f7） ---------- */

.vxl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vxl-gap);
    align-items: start;
}

@media (min-width: 600px) {
    .vxl-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .vxl-grid--attr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.vxl-card {
    min-width: 0;
    margin: 0;
}

.vxl-card__label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    margin-bottom: 6px;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    font-weight: 700;
}

.vxl-card__tag {
    padding: 1px 8px;
    border: 1px solid var(--vxl-line);
    border-radius: 4px;
    background: #fff;
    color: var(--vxl-ink);
}

.vxl-card--input .vxl-card__tag {
    border-color: var(--vxl-accent);
    background: var(--vxl-accent);
    color: #fff;
}

.vxl-card__frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--vxl-card-bg);
}

.vxl-card--input .vxl-card__frame { border-color: var(--vxl-accent); }

.vxl-card__frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vxl-card__frame > *,
.vxl-card__cap { transition: opacity 0.2s ease; }

.vxl-card__cap {
    margin-top: 6px;
    font-size: var(--type-body);
    line-height: 1.5;
}

#demo-camera .vxl-card__cap {
    overflow-wrap: anywhere;
}

/* 結果がまだ出ていない枠：点線の空き枠（大きさは同じ） */
.vxl-card.is-pending .vxl-card__frame {
    border-style: dashed;
    border-color: var(--vxl-pending);
    background: transparent;
}

.vxl-card.is-pending .vxl-card__frame > *,
.vxl-card.is-pending .vxl-card__cap { opacity: 0; }

/* ① ステップ2：入力写真に細い青枠を1回 */
.vxl-card--input .vxl-card__frame::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid var(--vxl-accent);
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
}

[data-demo="camera"] .vxl-stage[data-step="2"] .vxl-card--input .vxl-card__frame::after {
    opacity: 1;
    animation: vxl-scan 0.9s ease-out 1;
}

@keyframes vxl-scan {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: scale(1); }
}

/* ---------- チップ ---------- */

.vxl-chipbar { margin-bottom: 12px; }

.vxl-chipbar__label {
    margin: 0 0 6px;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    font-weight: 700;
}

.vxl-chipbar__hint {
    margin: 6px 0 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
}

.vxl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vxl-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--vxl-line);
    border-radius: 999px;
    background: #fff;
    color: var(--vxl-ink);
    font: inherit;
    font-size: var(--type-body);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vxl-chip[aria-pressed="true"] {
    border-color: var(--vxl-accent);
    background: var(--vxl-accent);
    color: #fff;
}

.vxl-chip:disabled {
    border-color: #e1e3ea;
    background: #eceef3;
    color: #8a90a0;
    cursor: not-allowed;
}

.vxl-chip--static {
    min-height: 32px;
    cursor: default;
}

/* ---------- ③ 属性・特集 ---------- */

.vxl-thumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vxl-thumbs__label {
    color: var(--vxl-muted);
    font-size: var(--type-body);
    font-weight: 700;
}

.vxl-thumbs__list {
    display: flex;
    gap: 8px;
}

.vxl-thumb {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 52px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--vxl-line);
    border-radius: 6px;
    background: var(--vxl-card-bg);
    color: var(--vxl-ink);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.vxl-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.vxl-thumb__txt {
    padding: 2px 0;
    background: #fff;
    font-size: var(--type-body);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.vxl-thumb[aria-pressed="true"] { border-color: var(--vxl-accent); }

.vxl-card__frame--attrs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.vxl-attrs__title {
    margin: 0;
    font-size: var(--type-body);
    font-weight: 800;
}

.vxl-attrs,
.vxl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vxl-attrs li {
    padding: 3px 8px;
    border: 1px solid var(--vxl-line);
    border-radius: 6px;
    background: #fff;
    font-size: var(--type-body);
    line-height: 1.4;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vxl-attrs li.is-emph {
    border-color: var(--vxl-accent);
    background: #ecebff;
    color: var(--vxl-accent);
    font-weight: 700;
}

.vxl-tags li {
    color: var(--vxl-accent);
    font-size: var(--type-body);
    font-weight: 600;
}

.vxl-feature {
    grid-column: 1 / -1;
    min-width: 0;
}

@media (min-width: 600px) {
    .vxl-feature { grid-column: auto; }
}

.vxl-feature__body {
    border: 2px solid transparent;
    border-radius: 8px;
}

.vxl-feature.is-pending .vxl-feature__body {
    min-height: 120px;
    border-style: dashed;
    border-color: var(--vxl-pending);
}

.vxl-feature.is-pending .vxl-feature__body > * { visibility: hidden; }

.vxl-feature__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vxl-feature__title {
    margin: 0;
    font-size: var(--type-body);
    font-weight: 800;
}

.vxl-feature__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vxl-mini { min-width: 0; }

.vxl-mini__cap {
    margin: 4px 0 0;
    font-size: var(--type-body);
    line-height: 1.4;
}

.vxl-feature__nojs {
    margin: 8px 0 0;
    font-size: var(--type-body);
    line-height: 1.6;
}

.vxl-views {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vxl-gap);
    margin-top: var(--vxl-gap);
}

@media (min-width: 600px) {
    .vxl-views { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 320/390：ステップ1・2は［入力｜属性］、ステップ3はチップ行＋2列グリッドだけ */
@media (max-width: 599px) {
    .vxl-enhanced .vxl-stage[data-step="3"] .vxl-s3-hide { display: none; }
    .vxl-enhanced .vxl-stage:not([data-step="3"]) .vxl-feature { display: none; }
}

/* ---------- 締め ---------- */

.vxl-closing {
    padding: 56px 0 72px;
    border-top: 1px solid var(--vxl-line);
}

.vxl-closing__title {
    margin: 0 0 12px;
    font-size: var(--type-subheading);
    font-weight: 800;
    line-height: 1.4;
}

.vxl-closing__desc {
    max-width: 720px;
    margin: 0;
    color: var(--vxl-muted);
    line-height: 1.8;
}

.vxl-closing__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.vxl-closing__actions .vxl-back { margin-top: 24px; }

/* ---------- 動きを減らす設定 ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
.vxl-page {--vxl-navy:var(--navy);font-family:var(--ja)}
.vxl-top {padding-top:14px}
.vxl-hero {padding:clamp(28px,5vw,68px) 0}
.vxl-hero > .vxl-wrap {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);align-items:center;gap:clamp(20px,6vw,96px)}
.vxl-hero__name,.vxl-tab__num {font-family:BarlowC,var(--ja)}
.vxl-hero__name {font-weight:500;color:var(--navy)}
.vxl-hero-photo {margin:0;min-width:0}
.vxl-hero-photo img {display:block;width:100%;max-height:330px;object-fit:cover;object-position:50% 42%}
.vxl-hero-photo figcaption {font-size:var(--type-body);color:var(--muted);padding-top:.4rem}
.vxl-offers {padding:clamp(36px,6vw,82px) 0}
.vxl-offers h2 {font-size:var(--type-section);line-height:1.4}
.vxl-offers h3 {font:500 var(--type-subheading)/1.2 BarlowS,var(--ja);margin:0 0 12px}
.vxl-offers p {line-height:1.8}
@media(max-width:650px){.vxl-hero > .vxl-wrap{grid-template-columns:minmax(0,1fr)}.vxl-hero-photo img{height:158px;object-position:50% 35%}}

/* Let translated labels grow with the reader's text size. */
:lang(en) .vxl-card__frame--attrs {
    aspect-ratio: auto;
}
:lang(en) .vxl-thumbs__list {
    flex-wrap: wrap;
}
:lang(en) .vxl-thumb {
    width: max(52px, 2.75rem);
}
@media (max-width: 16em) {
    :lang(en) .vxl-tabs,
    :lang(en) .vxl-grid--attr {
        grid-template-columns: minmax(0, 1fr);
    }
    :lang(en) .vxl-tab {
        justify-content: flex-start;
    }
    :lang(en) .vxl-tab__long {
        display: inline;
    }
    :lang(en) .vxl-tab__short {
        display: none;
    }
}


/* DEV-20 CAMERA-UPLOAD (프론트엔드): 첫 데모 단계 탭이 글자 200%에서도 넘치지 않게 */
#demo-camera .vxl-tab { min-width: 0; }
#demo-camera .vxl-tab__long,
#demo-camera .vxl-tab__short { min-width: 0; overflow-wrap: anywhere; }
/* 상표·비제휴 안내, 예시 버튼 옆 실제 입력 안내 (토큰 글자 크기) */
.vxl-cam-note,
.vxl-cam-hint {
    margin: 12px 0 0;
    color: var(--vxl-muted);
    font-size: var(--type-body);
    font-weight: 400;
    line-height: 1.6;
}
.vxl-cam-hint { margin: 8px 0 12px; }
.vxl-stage:not([data-step="1"]) .vxl-cam-hint { display: none; }

/* The replay action sits outside the stage tablist and retains a full touch target. */
.vxl-motion-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
}
.vxl-motion-controls > :first-child { min-width: 0; }
.vxl-replay {
    font: inherit;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--vxl-line);
    border-radius: 50%;
    color: var(--vxl-navy);
    background: #fff;
    cursor: pointer;
}
.vxl-replay::before {
    content: '';
    margin-left: 2px;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
}
.vxl-replay[data-playing="true"]::before {
    width: 10px;
    height: 10px;
    margin: 0;
    border: 0;
    background: currentColor;
}
.vxl-replay:hover { color: var(--vxl-accent); }
.vxl-replay:focus-visible { outline: 3px solid var(--vxl-accent); outline-offset: 2px; }
@media (max-width: 30em) {
    .vxl-motion-controls { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .vxl-replay { grid-row: 1; justify-self: end; }
}
/* Off-screen chapters and a return trip display a still frame. */
.vxl-page [data-motion-active="false"] :is(.vxl-stage, .vxl-story__stage, .vxl-analyze__board) *,
.vxl-page [data-motion-active="false"] :is(.vxl-stage, .vxl-story__stage, .vxl-analyze__board) *::before,
.vxl-page [data-motion-active="false"] :is(.vxl-stage, .vxl-story__stage, .vxl-analyze__board) *::after {
    animation: none !important;
    transition: none !important;
}
