/* 旗を立てるアプリ（/try/）。スマートフォンは設計案v5（ai-work/2026-10-15_gallery-experience-review-v01/proposal-v5/README.md）、
   PCはPC版の見直し案v1・v2（proposal-pc-v1・proposal-pc-v2/README.md。デモの案3を2026-10-16に採用・統合）。
   スマートフォン：上の帯・大きな写真（旗に寄って見せる）・写真のすぐ下の「色」「大きさ」「見本」の3段。押すと、写真の旗がその場で変わる。
   PC：写真を左に大きく、右の帯に共有リンク・相談する／本数／風／色／大きさ／見本の棚。探す画面と「デザインを替える」小窓は写真の上に。
   写真の上の部品は、場面・風（上）と「全体を見る」（旗と重ならない下の角）だけ。旗の上から下までに、部品を重ねない。
   スマートフォンでは画面いっぱいに固定し、ページを下へ送れないようにする（勢いよくなぞって、写真と操作の外へ出ない）。
   PC（960px以上）は、サイトのヘッダーの下に同じ並びで。舞台と旗・色・形は gallery.css の設置の画面（sp-*）を使う。
   押せる所は高さ・幅とも44〜48px以上、文字は14px以上（シニアの方にも分かりやすく。設計案v2 2節）。 */
.tr-page {
    background: var(--gl-cream);
}



.tr-fallback {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    line-height: 1.8;
}
.tr-fallback[hidden] {
    display: none;
}
.tr-fallback h1 {
    font-size: 28px;
}
.tr-fallback-uses {
    padding-left: 20px;
}

/* アプリの間は、ページを下へ送らない（写真と操作の外へ出ない） */
html.tr-open {
    overflow: hidden;
}

/* アプリの枠：帯・写真・3段。スマートフォンは画面いっぱい（サイトのヘッダーの上に重ねる。「もどる」で戻る） */
.tr-app {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "bar"
        "stage"
        "deck";
    background: var(--gl-paper);
    color: var(--gl-ink);
    overscroll-behavior: none;
}
.tr-app[hidden] {
    display: none;
}

/* 上の帯：もどる・名前・共有リンク・相談する（相談はいつも右上の黄色） */
.tr-bar {
    grid-area: bar;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 54px;
    padding: 4px 8px;
    padding-top: max(4px, env(safe-area-inset-top));
    border-bottom: 2px solid var(--gl-ink);
    background: #fff;
}
.tr-bar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 48px;
    min-height: 48px;
    padding: 0 6px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--gl-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.tr-bar-link:hover {
    background: var(--gl-cream);
}
.tr-bar-icon,
.tr-start-icon {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tr-bar-icon {
    width: 22px;
    height: 22px;
}
.tr-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tr-ask {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--gl-ink);
    border-radius: 999px;
    background: var(--gl-yellow);
    box-shadow: 0 2px 0 var(--gl-ink);
    color: var(--gl-ink);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.tr-ask:hover {
    background: #fff;
}
/* 幅の狭い画面では、「共有リンク」の言葉をアイコンの下に小さく置き、題名の幅を残す */
@media (max-width: 440px) {
    .tr-bar [data-try-share] {
        flex-direction: column;
        gap: 0;
        min-width: 56px;
        padding: 0 4px;
        font-size: 11px;
        line-height: 1.2;
    }
}

/* 写真：旗に寄って大きく（--tr-zoom。try.js が、いちばん大きい型の旗が、上の部品の下 --tr-top から写真の下の端までに収まる倍率を決める）。
   旗が写真の上の端に近い場面では、写真の上に暗い地を足して（--tr-pad-top）、旗を上の部品の下へ下ろす。
   「全体を見る」では、上の部品の下に写真全体を収める。寄った時は、写真だけを指でなぞって見渡せる（写真の上の操作と下の3段は動かない）。
   写真の上では、ブラウザーの指2本の拡大をさせない（拡大した画面の外へ出て迷う。寄る・全体はボタンで） */
.tr-stage {
    grid-area: stage;
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #33414d;
}

/* 写真のすぐ下の棚から、必要な高さだけ上へ伸ばす。背景は暗くせず、写真を見ながら旗を選べる。 */
.tr-scenebar {
    position: relative;
}
.tr-inv-tray:not([hidden]) {
    position: absolute;
    bottom: calc(100% + 8px);
    left: var(--tr-inv-left, 8px);
    z-index: 24;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 16px));
    max-height: var(--tr-inv-height, 300px);
    padding: 12px;
    border: 2px solid var(--gl-ink);
    border-radius: 16px;
    background: var(--gl-paper);
    box-shadow: 0 -5px 18px rgba(16, 43, 70, .2);
    transform-origin: bottom left;
    animation: tr-inv-open 180ms ease-out;
}
.tr-inv-tray-head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    font-size: 14px;
}
.tr-inv-tray-head > span {
    font-size: 12px;
    font-weight: 800;
}
.tr-inv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    padding: 3px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.tr-inv-pick {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 82px;
    padding: 5px;
    border: 2px solid rgba(16, 43, 70, .3);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.tr-inv-pick img {
    width: auto;
    height: 68px;
}
.tr-inv-pick:hover {
    border-color: var(--gl-ink);
    background: var(--gl-cream);
}
.tr-inv-pick[aria-pressed="true"] {
    border-color: var(--gl-ink);
    box-shadow: 0 0 0 3px var(--gl-yellow);
}
.tr-inv-pick:focus-visible {
    outline: 3px solid var(--gl-ink);
    outline-offset: 2px;
}
.tr-inv-empty {
    grid-column: 1 / -1;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}
.tr-inv-arrow,
.tr-inv-chip-arrow {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(180deg);
}
[aria-expanded="true"] > .tr-inv-arrow,
[aria-expanded="true"] > .tr-inv-chip-arrow {
    transform: none;
}
.tr-inv-chip {
    position: relative;
}
.tr-inv-chip-arrow {
    position: absolute;
    top: 3px;
    right: 2px;
    width: 11px;
    height: 11px;
}
@keyframes tr-inv-open {
    from {
        opacity: 0;
        transform: translateY(10px) scaleY(.85);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .tr-inv-tray:not([hidden]) {
        animation: none;
    }
}
@media (max-height: 640px) {
    .tr-inv-tray:not([hidden]) {
        gap: 6px;
        padding: 8px;
    }
    .tr-inv-pick {
        min-height: 68px;
    }
    .tr-inv-pick img {
        height: 54px;
    }
}
.tr-figure {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    container-type: size;
    isolation: isolate;
}
/* 写真の外の余白（全体の時の上下・左右の帯、旗をアップの時の横や上）：暗い色ではなく、同じ写真をぼかして敷く
   （表示の不具合や空いた所に見えないように。スマートフォンは2026-10-18、PCは案13で2026-10-23 トトドーラさん）。
   写真は try.js が --tr-photo に入れる。寄った時は写真が舞台いっぱいなので見えない */
.tr-figure::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--tr-photo, none) center / cover no-repeat;
    filter: blur(18px) brightness(.82) saturate(1.1);
    transform: scale(1.15);
}
/* 写真だけを送る入れ物。大きさを測るのは外の .tr-figure（ここを測る入れ物にすると、写真の上の操作まで一緒に送られる） */
.tr-app .sp-frame {
    position: static;
    display: flex;
    width: 100%;
    height: 100%;
    overflow: auto;
    container-type: normal;
    overscroll-behavior: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
}
.tr-app .sp-frame::-webkit-scrollbar {
    display: none;
}
.tr-app .gl-scene-stage {
    flex: none;
    width: auto;
    height: calc(100cqh * var(--tr-zoom, 1));
    margin: var(--tr-pad-top, 0px) auto var(--tr-pad-bottom, 0px);
    aspect-ratio: var(--tr-ratio, 1.5);
}
/* 全体を見る：上の部品（--tr-top）と、写真の下の端に重ねた部品（--tr-bottom。スマートフォンだけ）の間に、写真全体を収める */
.tr-app.is-whole .sp-frame {
    padding-top: var(--tr-top, 0px);
    padding-bottom: var(--tr-bottom, 0px);
}
.tr-app.is-whole .gl-scene-stage {
    width: min(100cqw, calc((100cqh - var(--tr-top, 0px) - var(--tr-bottom, 0px)) * var(--tr-ratio, 1.5)));
    height: auto;
    margin: auto;
}
.tr-app .gl-scene-stage > img {
    width: 100%;
    height: 100%;
}
/* 左右の札は出さない（押した旗が、下の3段で変える旗。選んでいる旗は黄色い三角で示す） */
.tr-app .sp-side {
    display: none;
}
/* 舞台の部品の小さな「場面」は出さない。設置場所は、写真の下の「設置場所」から（PC・スマートフォンとも。上の方のボタンは気づかれにくい） */
.tr-app [data-sp-scenes] {
    display: none;
}
/* 旗をアップ：写真の左右の端に近い旗も真ん中へ送れるよう、足りない横に暗い地（--tr-pad-left・--tr-pad-right。PCだけ。try.js が決める） */
.tr-app[data-view="close"] .gl-scene-stage {
    margin-right: var(--tr-pad-right, 0px);
    margin-left: var(--tr-pad-left, 0px);
}
/* 写真の見え方とお気に入り：PCは3つ並んだ切り替え（.tr-views）とインベントリーの棚（.tr-inv）、
   スマートフォンは押すたびに進むボタン（.tr-view-cycle）と「♡」の札（.tr-inv-chip。下の「スマートフォンの磨き込み」） */
.tr-views,
.tr-inv {
    display: none;
}
/* 旗をアップの時の「となりの旗」：写真の左右の真ん中（旗は真ん中に来るので重ならない） */
.tr-close-flip {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 48px;
    padding: 0 14px;
    border: 2px solid var(--gl-ink);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 0 var(--gl-ink);
    color: var(--gl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    transform: translateY(-50%);
    cursor: pointer;
}
.tr-close-flip[hidden],
.tr-app[data-pop-open] .tr-close-flip {
    display: none;
}
.tr-close-flip > [aria-hidden] {
    font-size: 24px;
    line-height: 1;
}
.tr-close-flip[data-try-close-flip="-1"] {
    left: 12px;
}
.tr-close-flip[data-try-close-flip="1"] {
    right: 12px;
}
.tr-close-flip:hover {
    background: var(--gl-cream);
}
/* 小さな旗の絵は、仕上がりの形（折り返して裏へ回る部分を除く）で見せる。型紙は try.js の flagArt が型ごとに渡す */
.tr-flag-art {
    mask: var(--tr-flag-mask) center / contain no-repeat;
}
/* ♡を押した時に、インベントリーへ飛んでいく旗の絵（try.js が置いて動かし、着いたら消す） */
.tr-fly {
    position: fixed;
    z-index: 200;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(16, 43, 70, .35));
    pointer-events: none;
}
/* 入った所が光る（動きを減らす設定の時も、これだけは出す。短い光で、動きは小さい） */
.is-glow {
    animation: tr-glow 1s ease-out;
}
@keyframes tr-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 196, 0, .95);
    }
    35% {
        box-shadow: 0 0 0 7px rgba(255, 196, 0, .8);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 196, 0, 0);
    }
}

/* 言葉つきの丸いボタン（写真の下の帯の見え方・風・お気に入りの札） */
.tr-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 14px;
    border: 2px solid var(--gl-ink);
    border-radius: 999px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}
.tr-chip:hover {
    background: var(--gl-cream);
}
.tr-chip[aria-pressed="true"] {
    background: var(--gl-ink);
    color: var(--gl-cream);
}
/* 写真の左上の「※画像はイメージです」（実際の設置場所の様子・旗の色や大きさ・注水台の形とは違うことがある。2026-10-19 トトドーラさん）。
   押せない小さな札。写真の上の部品は無いので、旗の位置と関係なく左上に置く */
.tr-photo-note {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    margin: 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(16, 43, 70, .62);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    pointer-events: none;
}

/* 結果や上限を、見える文章で短く知らせる */
.tr-toast {
    position: absolute;
    left: 50%;
    bottom: 66px;
    z-index: 4;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(16, 43, 70, .92);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}
.tr-toast[hidden] {
    display: none;
}

/* いま立っている旗のカード（PC）。スマートフォンでは形を持たず、中の3段がそのまま並ぶ */
.tr-current {
    display: contents;
}
/* 写真のすぐ下の3段（PCは右の帯）：① デザイン ② 色 ③ 大きさ */
.tr-deck {
    grid-area: deck;
    display: grid;
    gap: 6px;
    padding: 8px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    border-top: 2px solid var(--gl-ink);
    background: var(--gl-paper);
}
.tr-row {
    min-width: 0;
}
.tr-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 22px;
    margin: 0;
}
.tr-row-label {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}
/* 見出しの番号（使う順。丸の中に数字） */
.tr-step {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gl-ink);
    color: var(--gl-cream);
    font-size: 13px;
    line-height: 1;
}
/* 「を選ぶ」はPCだけ（スマートフォンは横幅を今の値に残す） */
.tr-row-verb {
    display: none;
}
.tr-row-value {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tr-row-value small {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 700;
}
.tr-row-more {
    flex: none;
    min-height: 40px;
    margin-left: auto;
    padding: 0 14px;
    border: 2px solid var(--gl-ink);
    border-radius: 999px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.tr-row-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.tr-row-note {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
/* カードの並び（見本をさがす画面・設置場所の一覧・PCの棚）の中の「0点」の案内は、1枠でなく横いっぱいに（R37） */
.tr-results-grid > .tr-row-note,
.tr-shelf-grid > .tr-row-note {
    grid-column: 1 / -1;
}
.tr-swatch {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid rgba(16, 43, 70, .3);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}
.tr-swatch[aria-pressed="true"] {
    border-color: var(--gl-ink);
    box-shadow: 0 0 0 3px var(--gl-yellow);
}
.tr-dots {
    display: inline-flex;
}
.tr-dots span {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(16, 43, 70, .35);
}
.tr-dots span + span {
    margin-left: -6px;
}
.tr-sizes {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 6px;
}
.tr-size {
    display: grid;
    place-content: center;
    min-height: 50px;
    padding: 2px;
    border: 2px solid var(--gl-ink);
    border-radius: 12px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    line-height: 1.1;
    cursor: pointer;
}
.tr-size b {
    font-size: 19px;
}
.tr-size small {
    font-size: 12px;
    font-weight: 700;
}
/* 見本の絵がまだ無い型（形と大きさの目安）は、点線の枠 */
.tr-size.is-guide {
    border-style: dashed;
}
.tr-size[aria-pressed="true"] {
    background: var(--gl-ink);
    color: var(--gl-cream);
}
.tr-strip {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding: 3px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tr-strip::-webkit-scrollbar {
    display: none;
}
.tr-thumb {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 62px;
    height: 86px;
    padding: 4px;
    border: 2px solid rgba(16, 43, 70, .25);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.tr-thumb img {
    width: auto;
    height: 74px;
}
.tr-thumb[aria-pressed="true"] {
    border-color: var(--gl-ink);
    box-shadow: 0 0 0 3px var(--gl-yellow);
}

/* 見本のカード（♡つき）。PCの右の帯の棚と、見本をさがす画面（PC・スマートフォン）で同じ形 */
.tr-card {
    position: relative;
}
.tr-card-pick {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 4px;
    width: 100%;
    height: 100%;
    min-height: 150px;
    padding: 10px 4px 8px;
    border: 2px solid rgba(16, 43, 70, .25);
    border-radius: 12px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    cursor: pointer;
}
.tr-card-pick:hover {
    border-color: var(--gl-ink);
}
.tr-card-pick[aria-pressed="true"] {
    border-color: var(--gl-ink);
    box-shadow: 0 0 0 3px var(--gl-yellow);
}
.tr-card-pick img {
    width: auto;
    height: 92px;
}
.tr-card-text {
    display: grid;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}
.tr-card-text small {
    font-size: 13px;
    font-weight: 700;
}
.tr-fav {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    cursor: pointer;
}
.tr-fav svg {
    width: 26px;
    height: 26px;
    fill: rgba(255, 255, 255, .92);
    stroke: var(--gl-ink);
    stroke-width: 1.8;
}
.tr-fav[aria-pressed="true"] svg {
    fill: #e5483f;
    stroke: #b3261e;
}

/* 初めての方：どこで使う？（アプリ全体に重ねる） */
.tr-start {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(16, 43, 70, .62);
}
.tr-start[hidden] {
    display: none;
}
.tr-start-card {
    width: min(100%, 560px);
    max-height: 100%;
    overflow-y: auto;
    padding: 20px 16px 16px;
    border: 3px solid var(--gl-ink);
    border-radius: 22px;
    background: var(--gl-paper);
    box-shadow: 0 4px 0 var(--gl-ink);
    text-align: center;
}
.tr-start-title {
    margin: 0 0 4px;
    font-size: 21px;
    line-height: 1.35;
}
.tr-start-note {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 400;
}
.tr-start-uses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.tr-start-use {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 6px 12px;
    border: 2px solid var(--gl-ink);
    border-radius: 14px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}
.tr-start-use:hover {
    background: var(--gl-cream);
}
.tr-start-any {
    justify-content: center;
    border-style: dashed;
    background: transparent;
    text-align: center;
}
.tr-start-icon {
    width: 30px;
    height: 30px;
}

/* PCだけの部品（いま立っている旗とおすすめの棚、写真の下の帯の共有、写真の上の小窓・探す画面）。スマートフォンでは出さない
   （スマートフォンの共有リンクは上の帯）。設置場所の一覧（.tr-places）と探す画面は、スマートフォンでは下から出す窓にする */
.tr-share-chip,
.tr-now,
.tr-shelf,
.tr-pop,
.tr-catalog {
    display: none;
}
/* 旗は全部同じなので、「選んでいる旗」の黄色い三角は出さない（舞台の部品が付ける）。旗の小窓を開いている間だけ、その旗に出す */
.tr-app .sp-flag.is-target::after {
    display: none;
}
.tr-app[data-pop-open] .sp-flag.is-target::after {
    display: block;
}

/* 風の強さのボタン（風の札を押すと出る小さな窓の中） */
.tr-pick {
    display: grid;
    grid-auto-flow: column;
    align-items: baseline;
    place-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 8px;
    border: 2px solid var(--gl-ink);
    border-radius: 12px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
}
.tr-pick small {
    font-size: 12px;
    font-weight: 700;
}
.tr-pick[aria-pressed="true"] {
    background: var(--gl-ink);
    color: var(--gl-cream);
}
/* 風の札と、押すと上に出る強さの小さな窓（止める・弱・中・強）。札の言葉の横に今の強さ */
.tr-wind-box {
    position: relative;
    display: flex;
    flex: none;
}
.tr-wind-toggle small {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 800;
}
.tr-wind-menu:not([hidden]) {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 6px;
    padding: 8px;
    border: 3px solid var(--gl-ink);
    border-radius: 16px;
    background: var(--gl-paper);
    box-shadow: 0 4px 0 rgba(16, 43, 70, .35);
}
.tr-wind-menu::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: -14px;
    border-top: 12px solid var(--gl-ink);
    border-right: 10px solid transparent;
    border-left: 10px solid transparent;
}
.tr-wind-menu .tr-pick {
    min-width: 52px;
    white-space: nowrap;
}

/* 風の強さ（風の札の小さな窓の［弱］［強］。try.js が data-wind を付ける）：弱は遅く小さく、強は速く大きく。［中］は gallery.css の揺れのまま。
   動きを減らす設定の時は、gallery.css が揺らさない（!important） */
.tr-app[data-wind="weak"] .is-windy .sp-flag .scene-cloth {
    animation:
        tr-wind-weak calc(var(--wind-speed, 1.9s) * 1.5) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite,
        tr-fold-weak calc(var(--wind-speed, 1.9s) * 2.05) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite,
        sp-lift calc(var(--wind-speed, 1.9s) * 1.25) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite;
}
.tr-app[data-wind="weak"] .is-windy .sp-flag .scene-cloth::after {
    animation-duration: calc(var(--wind-speed, 1.9s) * 1.5);
}
.tr-app[data-wind="strong"] .is-windy .sp-flag .scene-cloth {
    animation:
        tr-wind-strong calc(var(--wind-speed, 1.9s) * .62) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite,
        tr-fold-strong calc(var(--wind-speed, 1.9s) * .85) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite,
        sp-lift calc(var(--wind-speed, 1.9s) * .5) cubic-bezier(.45, .05, .55, .95) var(--wind-delay, 0s) infinite;
}
.tr-app[data-wind="strong"] .is-windy .sp-flag .scene-cloth::after {
    animation-duration: calc(var(--wind-speed, 1.9s) * .62);
}
@keyframes tr-wind-weak {
    0%,
    100% {
        transform: skewY(0deg);
    }
    30% {
        transform: skewY(-.9deg);
    }
    55% {
        transform: skewY(.4deg);
    }
    80% {
        transform: skewY(-.6deg);
    }
}
@keyframes tr-fold-weak {
    0%,
    100% {
        scale: 1 1;
    }
    35% {
        scale: .94 1;
    }
    65% {
        scale: .985 1;
    }
    85% {
        scale: .96 1;
    }
}
@keyframes tr-wind-strong {
    0%,
    100% {
        transform: skewY(0deg);
    }
    30% {
        transform: skewY(-3.4deg);
    }
    55% {
        transform: skewY(1.6deg);
    }
    80% {
        transform: skewY(-2.4deg);
    }
}
@keyframes tr-fold-strong {
    0%,
    100% {
        scale: 1 1;
    }
    35% {
        scale: .78 1;
    }
    65% {
        scale: .92 1;
    }
    85% {
        scale: .84 1;
    }
}

.tr-bar-link:focus-visible,
.tr-ask:focus-visible,
.tr-chip:focus-visible,
.tr-row-more:focus-visible,
.tr-swatch:focus-visible,
.tr-size:focus-visible,
.tr-thumb:focus-visible,
.tr-card-pick:focus-visible,
.tr-fav:focus-visible,
.tr-start-use:focus-visible,
.tr-pick:focus-visible,
.tr-now-fav:focus-visible,
.tr-now-link:focus-visible,
.tr-view-step:focus-visible,
.tr-inv-more:focus-visible,
.tr-inv-slot:focus-visible,
.tr-close-flip:focus-visible,
.tr-pop-fav:focus-visible,
.tr-pop-link:focus-visible,
.tr-pop-ask:focus-visible,
.tr-find:focus-visible,
.tr-close:focus-visible,
.tr-tree-item:focus-visible,
.tr-pop-flip:focus-visible,
.tr-pop-thumb:focus-visible,
.tr-places-open:focus-visible,
.tr-place-card:focus-visible {
    outline: 3px solid var(--gl-yellow);
    outline-offset: 2px;
}

/* スマートフォンの磨き込み（SB-TASK-019、ai-work/2026-10-19_try-mobile-review-v01）。案9：
   写真のすぐ下に1本の帯を置き、左から「全体を見る／旗に寄る」「設置場所」の札「風」を並べる（写真には何も重ねない。場所と見え方の切り替えを1組に）。
   帯のぶん写真は低くなるが、寄った時は一番大きく見える旗の全身が写真の上の端から下の端まで使え、全体を見る時も写真が小さくならない。
   部品が写真や旗の位置と関係なく、いつも同じ所にある（2026-10-18、風を写真の上から帯へ。トトドーラさんの案）。
   設置場所の一覧は、見本の窓と同じく下から大きく出す。見本の帯の最後に「ほかの見本」 */
@media (max-width: 959px) {
    .tr-stage {
        display: flex;
        flex-direction: column;
    }
    .tr-figure {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }
    .tr-scenebar {
        display: flex;
        flex: none;
        align-items: stretch;
        gap: 8px;
        padding: 6px 8px;
        border-top: 2px solid var(--gl-ink);
        background: var(--gl-paper);
    }
    /* 左から「♡」の札・設置場所・見え方・風（見え方と風の入れ物は形を持たない） */
    .tr-scenebar-end {
        display: contents;
    }
    /* お気に入りの札・見え方・風：絵の下に言葉（帯の横幅を設置場所の名前に残す） */
    .tr-inv-chip,
    .tr-view-cycle,
    .tr-wind-toggle {
        position: relative;
        flex: none;
        flex-direction: column;
        gap: 0;
        min-width: 48px;
        min-height: 50px;
        padding: 2px 6px;
        border-width: 2px;
        border-radius: 14px;
        background: #fff;
        box-shadow: none;
        font-size: 13px;
        line-height: 1.2;
    }
    .tr-inv-chip .tr-bar-icon,
    .tr-view-cycle .tr-bar-icon,
    .tr-wind-toggle .tr-bar-icon {
        width: 20px;
        height: 20px;
    }
    /* 「♡ 3」：数だけ（「お気に入り」の言葉は読み上げに残す） */
    .tr-inv-chip .tr-bar-icon {
        fill: #e0566b;
        stroke: #e0566b;
    }
    .tr-inv-chip-word {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    /* 見え方：言葉（拡大・もっと拡大・全体に戻す）の下に、今の段を示す3つの点 */
    .tr-view-cycle {
        min-width: 74px;
        font-size: 12px;
    }
    .tr-view-cycle-icon {
        display: grid;
    }
    .tr-view-dots {
        display: flex;
        gap: 3px;
        margin-top: 2px;
    }
    .tr-view-dots span {
        width: 6px;
        height: 6px;
        border: 1px solid var(--gl-ink);
        border-radius: 50%;
    }
    .tr-view-cycle[data-level="whole"] .tr-view-dots span:nth-child(1),
    .tr-view-cycle[data-level="zoom"] .tr-view-dots span:nth-child(2),
    .tr-view-cycle[data-level="close"] .tr-view-dots span:nth-child(3) {
        background: var(--gl-ink);
    }
    /* 舞台の部品の「風」（写真の右上）は出さない。写真のすぐ下の帯の「風」から頼む */
    .tr-app [data-sp-wind] {
        display: none;
    }
    /* 設置場所の札：場所の写真・名前・黄色の「選ぶ」（PCの「設置場所を選ぶ」と同じ色と並び） */
    .tr-places-open {
        display: grid;
        flex: 1 1 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 6px;
        min-width: 0;
        height: 64px;
        min-height: 64px;
        padding: 3px 4px 3px 8px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        text-align: left;
        cursor: pointer;
    }
    /* 帯の札には場所の写真を出さない（帯の横幅を場所の名前に残す。写真は一覧で見る。画像の共通の display より強く） */
    .tr-places-open .tr-places-thumb {
        display: none;
    }
    .tr-places-text {
        min-width: 0;
        line-height: 1.3;
    }
    /* 「設置場所」を1文字ずつ折らない（R41） */
    .tr-places-text small {
        display: block;
        overflow: hidden;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    .tr-places-text b {
        display: -webkit-box;
        height: 2.5em;
        overflow: hidden;
        font-size: 15px;
        line-height: 1.25;
        letter-spacing: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .tr-inv-chip {
        background: var(--gl-yellow);
        color: var(--gl-ink);
    }
    .tr-places-cta {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 0 4px 0 12px;
        border: 2px solid var(--gl-ink);
        border-radius: 12px;
        background: var(--gl-yellow);
        box-shadow: 0 2px 0 var(--gl-ink);
        font-size: 15px;
        font-weight: 800;
        white-space: nowrap;
    }
    .tr-places-cta .tr-bar-icon {
        width: 20px;
        height: 20px;
    }
    .tr-places-open[aria-expanded="true"] .tr-places-cta {
        background: var(--gl-cream);
    }
    /* スマートフォンでは「選ぶ」だけ（上に小さく「設置場所」とあるので伝わる） */
    .tr-places-cta-long {
        display: none;
    }
    .tr-toast {
        bottom: 78px;
    }

    /* 設置場所の一覧と見本をさがす画面（どちらも .tr-catalog）：下から大きく出す窓。上にことば、その下に使う場面の分類（横に送る）、
       その下に場所の写真（2列）・見本のカード（3列）。2つを同じ形にして、使い方を1つ覚えれば両方で探せるように（2026-10-18 トトドーラさん） */
    .tr-catalog:not([hidden]) {
        position: fixed;
        top: max(48px, env(safe-area-inset-top));
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 25;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        overflow: hidden;
        border-top: 3px solid var(--gl-ink);
        border-radius: 22px 22px 0 0;
        background: var(--gl-paper);
        box-shadow: 0 0 0 100vmax rgba(16, 43, 70, .55);
    }
    .tr-catalog .tr-catalog-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        padding: 12px 14px 8px;
    }
    .tr-catalog .tr-catalog-title {
        flex: 1;
        margin: 0;
        font-size: 19px;
    }
    .tr-catalog .tr-close {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: 4px;
        min-height: 44px;
        padding: 0 12px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-catalog .tr-search-box {
        display: flex;
        flex: 1 0 100%;
        order: 3;
        align-items: center;
        gap: 8px;
        min-height: 46px;
        padding: 0 14px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
    }
    .tr-catalog .tr-search-box:focus-within {
        outline: 3px solid var(--gl-yellow);
        outline-offset: 2px;
    }
    /* ことばの欄は16px以上（iPhoneで、押した時に画面が拡大されないように） */
    .tr-catalog .tr-search {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: 0;
        background: none;
        color: var(--gl-ink);
        font: inherit;
        font-size: 16px;
    }
    .tr-catalog .tr-tree {
        display: flex;
        gap: 6px;
        margin: 0;
        padding: 2px 14px 10px;
        overflow-x: auto;
        list-style: none;
        scrollbar-width: none;
    }
    .tr-catalog .tr-tree::-webkit-scrollbar {
        display: none;
    }
    .tr-catalog .tr-tree li {
        flex: none;
    }
    .tr-catalog .tr-tree-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 4px 14px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
    }
    .tr-catalog .tr-tree-item small {
        font-size: 13px;
        font-weight: 700;
        opacity: .7;
    }
    .tr-catalog .tr-tree-item[aria-pressed="true"] {
        background: var(--gl-ink);
        color: var(--gl-cream);
    }
    .tr-catalog .tr-results {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 0 14px;
        border-top: 2px solid rgba(16, 43, 70, .12);
    }
    .tr-catalog .tr-results-title {
        flex: none;
        margin: 10px 0 8px;
        font-size: 15px;
    }
    .tr-catalog .tr-results-grid {
        display: grid;
        flex: 1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
        gap: 10px;
        min-height: 0;
        padding: 3px 3px max(16px, env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .tr-place-card {
        display: grid;
        gap: 4px;
        padding: 6px 6px 8px;
        border: 2px solid rgba(16, 43, 70, .25);
        border-radius: 12px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.35;
        text-align: left;
        cursor: pointer;
    }
    .tr-place-card img {
        width: 100%;
        aspect-ratio: 3 / 2;
        border-radius: 8px;
        object-fit: cover;
    }
    .tr-place-card[aria-pressed="true"] {
        border-color: var(--gl-ink);
        box-shadow: 0 0 0 3px var(--gl-yellow);
    }

    /* 見本をさがす画面のカードは3列（旗は縦長なので、場所の写真より細かく並べる）。320px前後は2列 */
    .tr-catalog:not(.tr-places) .tr-results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    /* 選んでいる使う場面の中のテーマは、その札のすぐ後ろに点線の札で並べる */
    .tr-catalog .tr-tree-item.is-sub {
        border-style: dashed;
        font-size: 14px;
        font-weight: 700;
    }
    /* 見本の帯の最後：「ほかの見本」（見本をさがす画面を「すべて」で開く） */
    .tr-thumb-more {
        border-style: dashed;
        border-color: var(--gl-ink);
        background: var(--gl-cream);
        color: var(--gl-ink);
        font: inherit;
    }
    .tr-thumb-more-text {
        display: grid;
        gap: 2px;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
        text-align: center;
    }
    .tr-thumb-more-text small {
        font-size: 12px;
        font-weight: 700;
    }
    /* 帯の札の間を少し詰めて、設置場所の名前の幅を残す（♡の札が増えたぶん） */
    .tr-scenebar {
        gap: 6px;
    }
    /* 旗をアップの「となりの旗」：丸い矢印だけ（言葉は読み上げに残す。写真の端に寄せて、旗の布に重ねない） */
    .tr-close-flip {
        justify-content: center;
        width: 44px;
        min-height: 44px;
        padding: 0;
    }
    .tr-close-flip[data-try-close-flip="-1"] {
        left: 6px;
    }
    .tr-close-flip[data-try-close-flip="1"] {
        right: 6px;
    }
    .tr-close-flip > :not([aria-hidden]) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    /* ① デザインの今の値：見本番号を先に（名前が長くて切れても、番号は残る） */
    .tr-design-row .tr-row-value {
        display: flex;
        gap: 6px;
        align-items: baseline;
    }
    .tr-design-row .tr-row-value > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .tr-design-row .tr-row-value small {
        flex: none;
        order: -1;
        margin-left: 0;
        font-size: 13px;
    }
    .tr-id-word {
        display: none;
    }
    /* 探す画面の上の「いまの旗」：見本番号と、ギャラリーで詳しく見る */
    .tr-catalog-now {
        margin: 10px 0 0;
        padding: 8px 12px;
        border-radius: 12px;
        background: #fff;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.6;
    }
    .tr-catalog-now[hidden] {
        display: none;
    }
    .tr-catalog-now a {
        display: inline-block;
        margin-left: 8px;
        color: var(--gl-ink);
        font-weight: 800;
    }
}

/* 背の低い縦向きの画面（ブラウザーの帯で高さが減ったスマートフォンなど）：3段を少し詰めて、写真の高さを残す
   （クロスレビュー⑳C12）。押せる所の44px以上は保つ */
@media (max-width: 959px) and (max-height: 720px) and (orientation: portrait) {
    .tr-deck {
        gap: 4px;
        padding-top: 6px;
    }
    .tr-row-body {
        gap: 6px;
        margin-top: 2px;
    }
    .tr-swatch {
        width: 44px;
        height: 44px;
    }
    .tr-size {
        min-height: 44px;
    }
    .tr-size b {
        font-size: 17px;
    }
    .tr-strip {
        margin-top: 2px;
    }
    .tr-thumb {
        width: 54px;
        height: 72px;
    }
    .tr-thumb img {
        height: 62px;
    }
    /* 写真のすぐ下の帯も、少し低く（写真の高さが300pxを切る画面で、旗に使える高さを残す） */
    .tr-scenebar {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .tr-places-open {
        min-height: 44px;
    }
    .tr-places-cta {
        min-height: 36px;
    }
    .tr-inv-chip,
    .tr-view-cycle,
    .tr-wind-toggle {
        min-height: 44px;
    }
}

/* 幅の狭い画面（320px前後）：A〜Gの7つが並ぶ場面でも、大きさのボタンの幅を少しでも広く（左右の余白と間を詰める。クロスレビュー㉑C17）。
   1列に7つで幅44pxは入らないので、高さ44pxを保ち、幅は約40pxまで */
@media (max-width: 359px) {
    .tr-deck {
        padding-right: 8px;
        padding-left: 8px;
    }
    .tr-sizes {
        gap: 4px;
    }
    /* 写真の下の帯（R41）：見え方の言葉を小さく、「選ぶ」の矢印を外して、設置場所の名前に幅を残す（帯の高さを保つ） */
    .tr-view-cycle {
        min-width: 62px;
        padding-right: 4px;
        padding-left: 4px;
        font-size: 11px;
    }
    .tr-places-cta .tr-bar-icon {
        display: none;
    }
    .tr-places-cta {
        padding-right: 10px;
    }
    /* 見本をさがす画面のカードは2列 */
    .tr-catalog:not(.tr-places) .tr-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 横向きのスマートフォン：写真を左に大きく、3段を右に（縦に並べると、写真がほとんど残らない。クロスレビュー⑳C12） */
@media (max-width: 959px) and (max-height: 540px) and (orientation: landscape) {
    .tr-app {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "bar bar"
            "stage deck";
    }
    .tr-bar {
        min-height: 48px;
        padding-right: max(8px, env(safe-area-inset-right));
        padding-left: max(8px, env(safe-area-inset-left));
    }
    .tr-deck {
        align-content: start;
        overflow-y: auto;
        padding-right: max(12px, env(safe-area-inset-right));
        border-top: 0;
        border-left: 2px solid var(--gl-ink);
        overscroll-behavior: contain;
    }
}

/* PC（960px以上）：サイトのヘッダーの下に、1つのゲーム画面。写真を左に大きく、操作は右の帯（アプリの帯は畳む） */
/* 旗を押すと開く小窓（旗の横。矢印は旗の側）：上にこの旗の見本番号・名前・色と、お気に入り・ギャラリー・相談。
   下に「この旗だけ替える」（‹ ›と小さな絵の並び） */
/* 写真の高さまで（写真が低いPCでも、見出しと閉じるがヘッダーの裏へ隠れない。中身は小窓の中で送る。R40） */
.tr-pop:not([hidden]) {
    position: absolute;
    z-index: 24;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-height: calc(100% - 24px);
    padding: 12px 16px 14px;
    border: 3px solid var(--gl-ink);
    border-radius: 20px;
    background: var(--gl-paper);
    box-shadow: 0 6px 0 rgba(16, 43, 70, .35);
}
.tr-pop::before {
    content: "";
    position: absolute;
    top: var(--tr-pop-arrow, 100px);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}
.tr-pop[data-side="right"]::before {
    left: -17px;
    border-right: 16px solid var(--gl-ink);
}
.tr-pop[data-side="left"]::before {
    right: -17px;
    border-left: 16px solid var(--gl-ink);
}
.tr-pop-head {
    display: flex;
    flex: none;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.tr-pop-scroll {
    flex: 1 1 auto;
    min-height: 0;
    margin-right: -8px;
    padding-right: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.tr-pop-title {
    margin: 0;
    font-size: 18px;
}
/* この旗：小さな絵と、見本番号（電話で「S0021番」と言えるように大きく）・名前・色 */
.tr-pop-info {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 14px;
    background: #fff;
}
.tr-pop-big {
    display: grid;
    place-items: center;
}
.tr-pop-big img {
    width: auto;
    height: 92px;
}
.tr-pop-id {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}
.tr-pop-id b {
    margin-left: 2px;
    font-size: 20px;
    letter-spacing: .04em;
}
.tr-pop-name {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}
.tr-pop-color {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
}
.tr-pop-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.tr-pop-fav,
.tr-pop-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 8px;
    border: 2px solid var(--gl-ink);
    border-radius: 12px;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.tr-pop-fav[hidden] {
    display: none;
}
.tr-pop-fav:hover,
.tr-pop-link:hover {
    background: var(--gl-cream);
}
.tr-pop-fav .tr-bar-icon {
    width: 20px;
    height: 20px;
    stroke: #e0566b;
}
.tr-pop-fav[aria-pressed="true"] .tr-bar-icon {
    fill: #e0566b;
}
/* 先へ進む向き（›） */
.tr-pop-link .tr-bar-icon {
    width: 18px;
    height: 18px;
    transform: rotate(-90deg);
}
/* お気に入りが無い時（保存できないブラウザー）は、ギャラリーを横いっぱいに */
.tr-pop-fav[hidden] + .tr-pop-link {
    grid-column: 1 / -1;
}
.tr-pop-ask {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 2px solid var(--gl-ink);
    border-radius: 999px;
    background: var(--gl-yellow);
    box-shadow: 0 2px 0 var(--gl-ink);
    color: var(--gl-ink);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}
.tr-pop-ask:hover {
    background: #fff;
}
.tr-pop-sub {
    margin: 12px 0 6px;
    padding-top: 10px;
    border-top: 2px dashed rgba(16, 43, 70, .2);
    font-size: 15px;
    font-weight: 800;
}
.tr-pop-body {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 8px;
}
.tr-pop-flip {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid var(--gl-ink);
    border-radius: 50%;
    background: #fff;
    color: var(--gl-ink);
    font: inherit;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}
.tr-pop-flip:hover {
    background: var(--gl-cream);
}
.tr-pop-count {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
.tr-pop-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 3px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.tr-pop-thumb {
    display: grid;
    flex: none;
    place-items: center;
    width: 50px;
    height: 66px;
    padding: 3px;
    border: 2px solid rgba(16, 43, 70, .25);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.tr-pop-thumb img {
    width: auto;
    height: 56px;
}
.tr-pop-thumb[aria-pressed="true"] {
    border-color: var(--gl-ink);
    box-shadow: 0 0 0 3px var(--gl-yellow);
}
/* 旗だけ替える小窓の、ひとこと */
.tr-pop-note {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    opacity: .85;
}


.tr-photo-reset,
.tr-strip-pager,
.tr-pop-catalog {
    display: none;
}

@media (min-width: 960px) {
    .tr-app {
        top: var(--site-top-h, 96px);
        z-index: 30;
        grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 430px);
        grid-template-rows: minmax(0, 1fr);
        grid-template-areas: "stage deck";
    }
    /* 題名は読み上げのために残し、帯の見た目と、もどる・共有リンク・相談するは出さない（共有リンク・相談するは右の帯の上） */
    .tr-bar {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        border: 0;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .tr-bar > :not(.tr-title) {
        display: none;
    }
    /* 舞台の部品の「風」（写真の上）は出さない。写真の下の帯の「風」から頼む */
    .tr-app [data-sp-wind] {
        display: none;
    }
    /* 写真と、そのすぐ下の帯（2段）。写真の上に重ねる部品（小窓・探す画面・設置場所の一覧・知らせ・「※画像はイメージです」・となりの旗）は、
       写真の段（1段目）を基準に置く（帯を隠さない。♡を押した時に、飛んでいく先のインベントリーが見える） */
    .tr-stage {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        grid-template-columns: minmax(0, 1fr);
    }
    .tr-figure {
        grid-row: 1;
        grid-column: 1;
        min-height: 0;
    }
    /* 終わりの線まで書く（位置を指定した部品は、終わりが auto だと入れ物の下の端まで広がり、帯の上に重なる） */
    .tr-photo-note,
    .tr-toast,
    .tr-close-flip,
    .tr-views,
    .tr-pop,
    .tr-catalog {
        grid-row: 1 / 2;
        grid-column: 1 / 2;
    }
    /* 知らせは、写真の右下の見え方の3段より上に */
    .tr-toast {
        bottom: 84px;
    }
    .tr-deck {
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-height: 0;
        padding: 12px 18px 14px;
        border-top: 0;
        border-left: 2px solid var(--gl-ink);
        overflow: hidden;
    }
    /* 上：いま立っている旗のカード（絵・名前・見本番号・♡・ギャラリーと、その中で色・大きさを選ぶ）。旗の絵を見ながら色・大きさを替えられる。
       カードは縮めない（縦が狭い画面では、下のほかのデザインの並びを縮めて送る。2026-10-23 トトドーラさん） */
    .tr-current {
        display: flex;
        flex: none;
        flex-direction: column;
        gap: 10px;
        padding: 10px 14px 14px;
        border: 3px solid var(--gl-ink);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 0 0 3px var(--gl-yellow);
    }
    .tr-row {
        flex: none;
    }
    /* カードの中の見出し：何をする所か（色を選ぶ・大きさを選ぶ）と、今の値を同じ行に。番号は出さない（カードの中の並びで分かる） */
    .tr-row-head {
        display: flex;
        flex: none;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 10px;
    }
    .tr-row-label {
        font-size: 16px;
    }
    .tr-step {
        display: none;
    }
    .tr-row-verb {
        display: inline;
    }
    .tr-row-value {
        font-size: 13px;
    }
    /* ① デザインの段（スマートフォンの帯と「一覧から選ぶ」）は出さない。いま立っている旗と、下のほかのデザインが代わり */
    .tr-design-row {
        display: none;
    }
    /* 下：ほかのデザインを選ぶ（この場所のおすすめ。選ぶと上の旗と入れ替わる）と「すべてのデザインから探す」 */
    .tr-shelf {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }
    .tr-shelf-title {
        flex: none;
        margin: 0 0 6px;
        font-size: 17px;
        line-height: 1.35;
    }
    /* 「この場所のおすすめ・14点」は途中で折らない（入らない時は次の行へまとめて） */
    .tr-shelf-title small {
        display: inline-block;
        margin-left: 8px;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }
    /* いま立っている旗：絵を大きめに、名前・見本番号・ギャラリー・♡。その下に点線で区切って色・大きさ */
    .tr-now {
        display: block;
        flex: none;
        padding-bottom: 10px;
        border-bottom: 2px dashed rgba(16, 43, 70, .2);
    }
    .tr-now-title {
        margin: 0 0 4px;
        font-size: 17px;
    }
    .tr-now-body {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }
    .tr-now-thumb {
        display: grid;
        place-items: center;
        height: 104px;
    }
    .tr-now-thumb img {
        width: auto;
        height: 100px;
    }
    .tr-now-text {
        min-width: 0;
    }
    .tr-now-name {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.35;
    }
    .tr-now-id {
        margin: 2px 0 0;
        font-size: 13px;
        font-weight: 700;
    }
    .tr-now-id b {
        font-size: 16px;
        letter-spacing: .04em;
    }
    .tr-now-link {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
        color: var(--gl-ink);
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
    }
    .tr-now-link .tr-bar-icon {
        width: 16px;
        height: 16px;
        transform: rotate(-90deg);
    }
    /* ♡：カードの♡と同じ丸い札 */
    .tr-now-fav {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 2px solid var(--gl-ink);
        border-radius: 50%;
        background: #fff;
        cursor: pointer;
    }
    .tr-now-fav[hidden] {
        display: none;
    }
    .tr-now-fav:hover {
        background: var(--gl-cream);
    }
    .tr-now-fav .tr-bar-icon {
        width: 22px;
        height: 22px;
        stroke: #e0566b;
    }
    .tr-now-fav[aria-pressed="true"] .tr-bar-icon {
        fill: #e0566b;
    }
    .tr-shelf-grid {
        display: grid;
        flex: 1 1 auto;
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        align-content: start;
        gap: 8px;
        min-height: 0;
        padding: 3px 3px 6px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .tr-find {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 50px;
        margin-top: 8px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
        background: var(--gl-yellow);
        box-shadow: 0 2px 0 var(--gl-ink);
        color: var(--gl-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-find:hover {
        background: #fff;
    }
    /* カード（棚・探す画面）を少し小さく */
    .tr-card-pick {
        min-height: 0;
        padding: 8px 4px 6px;
    }
    .tr-card-pick img {
        height: 64px;
    }
    .tr-card-text {
        font-size: 13px;
    }
    .tr-card-text small {
        font-size: 12px;
    }
    /* 探す画面：写真の上に大きく。上にことば、左に使う場面とテーマの縦の一覧、右にカード */
    .tr-catalog:not([hidden]) {
        position: absolute;
        inset: 12px;
        z-index: 25;
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
        border: 3px solid var(--gl-ink);
        border-radius: 20px;
        background: var(--gl-paper);
        box-shadow: 0 6px 0 rgba(16, 43, 70, .35);
    }
    .tr-catalog-head {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 2px solid rgba(16, 43, 70, .15);
    }
    .tr-catalog-title {
        flex: none;
        margin: 0;
        font-size: 20px;
    }
    .tr-search-box {
        display: flex;
        flex: 1;
        align-items: center;
        gap: 8px;
        min-height: 46px;
        padding: 0 14px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
    }
    .tr-search-box:focus-within {
        outline: 3px solid var(--gl-yellow);
        outline-offset: 2px;
    }
    .tr-search {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: 0;
        background: none;
        color: var(--gl-ink);
        font: inherit;
        font-size: 16px;
    }
    .tr-close {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: 4px;
        min-height: 44px;
        padding: 0 14px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 15px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-tree {
        margin: 0;
        padding: 10px 8px;
        overflow-y: auto;
        border-right: 2px solid rgba(16, 43, 70, .12);
        list-style: none;
    }
    .tr-tree li {
        margin: 0 0 2px;
    }
    .tr-tree-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 42px;
        padding: 4px 10px;
        border: 0;
        border-radius: 10px;
        background: none;
        color: var(--gl-ink);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        text-align: left;
        cursor: pointer;
    }
    .tr-tree-item:hover {
        background: rgba(16, 43, 70, .08);
    }
    .tr-tree-item.is-sub {
        padding-left: 26px;
        font-size: 13px;
        font-weight: 700;
    }
    .tr-tree-item small {
        font-weight: 700;
        opacity: .7;
    }
    .tr-tree-item[aria-pressed="true"] {
        background: var(--gl-ink);
        color: var(--gl-cream);
    }
    .tr-results {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 12px 16px;
    }
    .tr-results-title {
        flex: none;
        margin: 0 0 8px;
        font-size: 15px;
    }
    .tr-results-grid {
        display: grid;
        flex: 1;
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        align-content: start;
        gap: 8px;
        min-height: 0;
        padding: 3px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* 舞台の部品の小さな「場面」は出さない（設置場所は、写真の下の真ん中の大きなボタンから） */
    .tr-app [data-sp-scenes] {
        display: none;
    }
    /* 写真のすぐ下の帯（ゲームの下の帯のように）：左から「♡ お気に入り」のインベントリー・設置場所を選ぶ（真ん中）・見え方の3段と風。
       写真には重ねないので、旗がどこに立っていても隠さない。設置場所の枠と名前2行分の高さを決め、場所を替えても操作の位置を保つ。
       幅の狭いPC（1200px未満）だけ、見え方と風を2行目へ送る */
    .tr-scenebar {
        display: flex;
        flex-wrap: nowrap;
        grid-row: 2;
        grid-column: 1;
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        padding: 8px 12px;
        border-top: 2px solid var(--gl-ink);
        background: var(--gl-paper);
    }
    .tr-inv-chip,
    .tr-view-cycle {
        display: none;
    }
    /* インベントリー：お気に入りの小さな旗の枠（空いた枠は点線）。押すと全部の旗がそのデザインに */
    .tr-inv {
        display: flex;
        flex: 1 1 0;
        align-items: center;
        gap: 8px;
        min-width: 150px;
        max-width: 360px;
        padding: 5px 6px 5px 10px;
        border: 2px solid var(--gl-ink);
        border-radius: 16px;
        background: #fff;
        color: var(--gl-ink);
    }
    .tr-inv-title {
        display: grid;
        flex: none;
        justify-items: center;
        margin: 0;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
    }
    .tr-inv-title .tr-bar-icon {
        width: 22px;
        height: 22px;
        fill: #e0566b;
        stroke: #e0566b;
    }
    .tr-inv-title small {
        font-size: 12px;
        font-weight: 700;
    }
    .tr-inv-slots {
        position: relative;
        display: flex;
        gap: 6px;
        min-width: 0;
        padding: 3px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .tr-inv-slot {
        display: grid;
        flex: none;
        place-items: center;
        width: 42px;
        height: 58px;
        padding: 2px;
        border: 2px solid rgba(16, 43, 70, .3);
        border-radius: 8px;
        background: var(--gl-cream);
        cursor: pointer;
    }
    .tr-inv-slot img {
        width: auto;
        height: 50px;
    }
    .tr-inv-slot:hover {
        border-color: var(--gl-ink);
    }
    .tr-inv-slot[aria-pressed="true"] {
        border-color: var(--gl-ink);
        box-shadow: 0 0 0 3px var(--gl-yellow);
    }
    .tr-inv-slot.is-empty {
        border-style: dashed;
        background: none;
        cursor: default;
    }
    /* 空の時：点線の枠の上に「♡を押すと、ここに入ります」 */
    .tr-inv-hint {
        position: absolute;
        inset: 3px;
        display: grid;
        place-items: center;
        padding: 0 6px;
        border-radius: 8px;
        background: rgba(255, 255, 255, .82);
        color: var(--gl-ink);
        font-size: 13px;
        font-weight: 800;
        line-height: 1.35;
        text-align: center;
    }
    /* 右端の紺の領域に黄色の開閉ボタン。背景の白い面へ埋もれず、押す所が分かるようにする。 */
    .tr-inv-more {
        display: flex;
        flex: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        width: 44px;
        min-height: 48px;
        padding: 2px;
        border: 2px solid var(--gl-ink);
        border-radius: 12px;
        background: var(--gl-yellow);
        color: var(--gl-ink);
        font: inherit;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.25;
        cursor: pointer;
    }
    .tr-inv-more[hidden] {
        display: none;
    }
    .tr-inv-more:hover {
        background: var(--gl-cream);
    }
    .tr-inv-more:focus-visible {
        outline-color: #fff;
    }
    .tr-inv.is-glow {
        border-color: #d99a00;
    }
    /* 見え方の3段と風 */
    .tr-scenebar-end {
        display: flex;
        flex: none;
        align-items: center;
        gap: 8px;
    }
    /* 見え方の3段：写真の右下に重ねる（案14。写真の下の帯を設置場所とお気に入りに広く使う） */
    .tr-views {
        position: absolute;
        right: 12px;
        bottom: 12px;
        z-index: 4;
        display: flex;
        gap: 3px;
        padding: 3px;
        border: 2px solid var(--gl-ink);
        border-radius: 16px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 3px 0 rgba(16, 43, 70, .35);
    }
    /* 絵の下に言葉（「拡大」の言葉と虫めがねで、押すと何が起きるか分かるように。お父様の感想） */
    .tr-view-step {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        min-width: 58px;
        min-height: 54px;
        padding: 2px 8px;
        border: 0;
        border-radius: 12px;
        background: none;
        color: var(--gl-ink);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.2;
        white-space: nowrap;
        cursor: pointer;
    }
    .tr-view-step:hover {
        background: var(--gl-cream);
    }
    .tr-view-step[aria-pressed="true"] {
        background: var(--gl-ink);
        color: var(--gl-cream);
    }
    .tr-wind-toggle,
    .tr-share-chip {
        flex-direction: column;
        gap: 0;
        min-width: 56px;
        min-height: 56px;
        padding: 2px 8px;
        border-radius: 16px;
        font-size: 13px;
        line-height: 1.2;
    }
    /* 共有：この風景のリンク（右の帯の上から移した。写真の操作の並びの右の端） */
    .tr-share-chip {
        display: inline-flex;
    }
    /* 写真の下の真ん中の「設置場所を選ぶ」：写真と「いまの場所」を見せ、黄色の「設置場所を選ぶ」を大きく */
    /* 設置場所は460pxに固定。短い名前でも2行分の場所を残し、選び替えても入口の位置を動かさない。 */
    .tr-places-open {
        display: grid;
        flex: 0 0 460px;
        grid-template-columns: 78px minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        width: 460px;
        height: 78px;
        padding: 6px 8px 6px 6px;
        border: 3px solid var(--gl-ink);
        border-radius: 18px;
        background: var(--gl-paper);
        box-shadow: 0 4px 0 rgba(16, 43, 70, .35);
        color: var(--gl-ink);
        font: inherit;
        text-align: left;
        cursor: pointer;
    }
    .tr-places-thumb {
        width: 78px;
        max-width: none;
        height: 52px;
        border: 2px solid var(--gl-ink);
        border-radius: 10px;
        object-fit: cover;
    }
    /* 名前の長さに枠の幅を合わせず、決めた幅の中で折り返す。 */
    .tr-places-text {
        min-width: 0;
        line-height: 1.35;
    }
    .tr-places-text small {
        display: block;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    /* 長い場所の名前は2行まで（帯の高さは、左の棚と同じまま） */
    .tr-places-text b {
        display: -webkit-box;
        height: 2.5em;
        overflow: hidden;
        font-size: 16px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .tr-places-cta {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        min-height: 44px;
        padding: 0 10px 0 16px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
        background: var(--gl-yellow);
        box-shadow: 0 2px 0 var(--gl-ink);
        font-size: 16px;
        font-weight: 800;
        white-space: nowrap;
    }
    .tr-places-open:hover .tr-places-cta,
    .tr-places-open[aria-expanded="true"] .tr-places-cta {
        background: #fff;
    }
    /* 設置場所の一覧：場所の写真を大きめに */
    .tr-places-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
    .tr-place-card {
        display: grid;
        gap: 4px;
        padding: 6px 6px 8px;
        border: 2px solid rgba(16, 43, 70, .25);
        border-radius: 12px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.35;
        text-align: left;
        cursor: pointer;
    }
    .tr-place-card img {
        width: 100%;
        aspect-ratio: 3 / 2;
        border-radius: 8px;
        object-fit: cover;
    }
    .tr-place-card:hover {
        border-color: var(--gl-ink);
    }
    .tr-place-card[aria-pressed="true"] {
        border-color: var(--gl-ink);
        box-shadow: 0 0 0 3px var(--gl-yellow);
    }
    /* 探す画面・設置場所の一覧は、横幅1000pxまでにして真ん中へ（広い画面で間延びしない） */
    .tr-catalog:not([hidden]) {
        right: auto;
        left: 50%;
        width: min(1000px, calc(100% - 24px));
        transform: translateX(-50%);
    }
}

/* 幅の狭いPC（1200px未満）：写真の下の帯を2行に（1行目にお気に入りと設置場所、2行目に見え方・風・共有）。
   お気に入りの棚は、行を決める時は最小の幅で数え、余った幅まで広がる（3行に分かれない） */
@media (min-width: 960px) and (max-width: 1199px) {
    .tr-scenebar {
        flex-wrap: wrap;
    }
    .tr-inv {
        flex: 1 1 0;
    }
}
/* 幅の狭いPC：写真を外し、380pxの固定枠にする。名前と黄色の入口の幅を保つ。 */
@media (min-width: 960px) and (max-width: 1099px) {
    .tr-places-open .tr-places-thumb {
        display: none;
    }
    .tr-places-open {
        flex-basis: 380px;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 380px;
        padding-left: 12px;
    }
}

/* 背の低いPC（1280×720など）：色・大きさと旗の小窓を少し詰めて、写真とデザインの棚の高さを残す */
@media (min-width: 960px) and (max-height: 820px) {
    .tr-deck {
        gap: 8px;
        padding-top: 8px;
    }
    .tr-swatch {
        width: 42px;
        height: 42px;
    }
    .tr-size {
        min-height: 42px;
    }
    .tr-scenebar {
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .tr-places-thumb {
        height: 44px;
    }
    .tr-pop-big img {
        height: 64px;
    }
    .tr-pop-note {
        display: none;
    }
    /* いま立っている旗のカードも少し詰める（ほかのデザインの並びを残す） */
    .tr-current {
        gap: 6px;
        padding-top: 6px;
        padding-bottom: 10px;
    }
    .tr-now {
        padding-bottom: 6px;
    }
    .tr-now-thumb {
        height: 70px;
    }
    .tr-now-thumb img {
        height: 66px;
    }
}

/* 写真の下の2段：設置場所と見え方、お気に入りの棚。道具ごとの外枠を減らし、一枚の操作面にまとめる。 */
.tr-places-text b {
    text-wrap: balance;
}
.tr-inv-tray:not([hidden]) {
    bottom: var(--tr-inv-bottom, calc(100% + 8px));
}
@media (min-width: 960px) {
    .tr-scenebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "place tools"
            "inventory inventory";
        gap: 10px 16px;
        padding: 10px 16px;
        border-top: 2px solid var(--gl-ink);
        background: var(--gl-paper);
    }
    .tr-places-open {
        grid-area: place;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        column-gap: 10px;
        width: 100%;
        max-width: 480px;
        height: 72px;
        padding: 6px 8px;
        border: 1px solid rgba(16, 43, 70, .25);
        border-radius: 12px;
        background: #fff;
        box-shadow: none;
    }
    .tr-places-thumb {
        width: 64px;
        height: 46px;
        border-width: 1px;
        border-radius: 7px;
    }
    .tr-places-cta {
        padding: 0 8px 0 12px;
        border-radius: 10px;
        box-shadow: none;
        font-size: 14px;
    }
    .tr-scenebar-end {
        grid-area: tools;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .tr-views {
        position: static;
        display: flex;
        gap: 2px;
        padding: 3px;
        border: 1px solid rgba(16, 43, 70, .25);
        border-radius: 12px;
        background: #fff;
        box-shadow: none;
    }
    .tr-view-step {
        min-width: 58px;
        min-height: 50px;
        border-radius: 8px;
        font-size: 13px;
    }
    .tr-view-step[aria-pressed="true"] {
        background: var(--gl-yellow);
        color: var(--gl-ink);
    }
    .tr-wind-toggle,
    .tr-share-chip {
        min-width: 48px;
        min-height: 50px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        box-shadow: none;
        font-size: 13px;
    }
    .tr-wind-toggle[aria-pressed="true"] {
        background: var(--gl-cream);
        color: var(--gl-ink);
    }
    .tr-share-chip:hover,
    .tr-wind-toggle:hover {
        background: #fff;
    }
    .tr-inv {
        grid-area: inventory;
        width: 100%;
        max-width: none;
        min-width: 0;
        min-height: 72px;
        gap: 16px;
        padding: 8px 0 0;
        border: 0;
        border-top: 1px solid rgba(16, 43, 70, .2);
        border-radius: 0;
        background: transparent;
    }
    .tr-inv-title {
        grid-template-columns: auto auto;
        align-items: center;
        justify-items: start;
        gap: 2px 6px;
        font-size: 14px;
    }
    .tr-inv-title small {
        grid-column: 2;
        min-height: 15px;
    }
    .tr-inv-title .tr-bar-icon {
        width: 20px;
        height: 20px;
    }
    .tr-inv-slots {
        flex: 1 1 0;
    }
    .tr-inv-slot {
        width: 46px;
        background: #fff;
        border-color: rgba(16, 43, 70, .22);
    }
    .tr-inv-more {
        flex-direction: row-reverse;
        gap: 6px;
        width: auto;
        min-width: 98px;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid rgba(16, 43, 70, .35);
        border-radius: 10px;
        background: #fff;
        font-size: 14px;
    }
    .tr-inv-more:hover,
    .tr-inv-more[aria-expanded="true"] {
        background: var(--gl-cream);
        border-color: var(--gl-ink);
    }
    .tr-inv-more:focus-visible {
        outline-color: var(--gl-ink);
    }
    .tr-inv-hint {
        justify-items: start;
        background: var(--gl-paper);
    }
    .tr-inv-tray:not([hidden]) {
        width: min(720px, calc(100% - 32px));
    }
    .tr-inv-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    }
    .tr-toast {
        bottom: 16px;
    }
}
@media (min-width: 960px) and (max-width: 1199px) {
    .tr-places-open {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .tr-places-open .tr-places-thumb,
    .tr-places-cta-long {
        display: none;
    }
    .tr-scenebar {
        gap: 8px 12px;
        padding: 8px 12px;
    }
    .tr-scenebar-end {
        gap: 6px;
    }
    .tr-view-step {
        min-width: 48px;
    }
}
@media (max-width: 959px) {
    .tr-scenebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "place place"
            "inventory tools";
        gap: 8px 12px;
        padding: 8px;
    }
    .tr-places-open {
        grid-area: place;
        width: 100%;
        height: 64px;
        border: 1px solid rgba(16, 43, 70, .3);
        border-radius: 12px;
        padding: 4px 6px 4px 10px;
    }
    .tr-places-cta {
        min-height: 44px;
        border-radius: 10px;
        box-shadow: none;
    }
    .tr-inv-chip {
        grid-area: inventory;
        flex-direction: row;
        justify-content: flex-start;
        gap: 5px;
        min-height: 48px;
        padding: 0 10px;
        border: 1px solid rgba(16, 43, 70, .3);
        border-radius: 10px;
        background: #fff;
        font-size: 14px;
    }
    .tr-inv-chip-word {
        position: static;
        width: auto;
        height: auto;
        margin-right: 4px;
        overflow: visible;
        clip-path: none;
    }
    .tr-inv-chip-arrow {
        position: static;
        width: 16px;
        height: 16px;
        margin-left: auto;
    }
    .tr-scenebar-end {
        grid-area: tools;
        display: flex;
        gap: 8px;
    }
    .tr-view-cycle,
    .tr-wind-toggle {
        min-height: 48px;
        border: 1px solid rgba(16, 43, 70, .3);
        border-radius: 10px;
    }
    .tr-view-cycle {
        min-width: 70px;
    }
    .tr-wind-toggle[aria-pressed="true"] {
        background: var(--gl-cream);
        color: var(--gl-ink);
    }
    .tr-toast {
        bottom: 146px;
    }
}
@media (max-width: 959px) and (max-height: 680px) {
    .tr-scenebar {
        gap: 6px 8px;
        padding: 6px 8px;
    }
    .tr-places-open {
        height: 58px;
        min-height: 58px;
    }
    .tr-inv-chip,
    .tr-view-cycle,
    .tr-wind-toggle {
        min-height: 44px;
    }
    .tr-toast {
        bottom: 132px;
    }
}

/* 案20：V0の操作帯と、見本を左・色と大きさを右に置く常時表示。PCの案17には作用させない。 */
.tr-mobile-panel-bar,
.tr-mobile-favorites,
.tr-mobile-now-label {
    display: none;
}
.tr-size-guide,
.tr-save-feedback {
    display: none;
}
.tr-camera-note {
    display: none;
}
@media (max-width: 959px) {
    .tr-scenebar {
        grid-template-columns: 64px minmax(0, 1fr) 48px;
        grid-template-areas: "view place tools";
        gap: 6px;
        padding: 6px 8px;
    }
    .tr-scenebar .tr-inv-chip {
        display: none;
    }
    .tr-scenebar-end {
        display: contents;
    }
    .tr-scenebar .tr-wind-box {
        grid-area: tools;
    }
    .tr-places-open {
        height: 56px;
        min-height: 56px;
        padding: 2px 4px 2px 8px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
    }
    .tr-places-text small {
        font-size: 11px;
        line-height: 1.1;
    }
    .tr-places-text b {
        height: 2.4em;
        font-size: 13px;
        line-height: 1.2;
        text-wrap: wrap;
    }
    .tr-places-cta {
        min-height: 40px;
        padding: 0 4px 0 8px;
        border-radius: 12px;
        box-shadow: 0 2px 0 var(--gl-ink);
        font-size: 14px;
    }
    .tr-places-cta .tr-bar-icon {
        display: none;
    }
    .tr-view-cycle {
        grid-area: view;
        min-width: 64px;
        min-height: 56px;
        padding: 2px 4px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
        background: #fff;
        font-size: 14px;
    }
    .tr-wind-toggle {
        min-width: 48px;
        min-height: 56px;
        border: 2px solid var(--gl-ink);
        border-radius: 14px;
        background: #fff;
        font-size: 13px;
    }
    .tr-wind-toggle[aria-pressed="true"] {
        background: var(--gl-ink);
        color: var(--gl-cream);
    }
    .tr-toast {
        bottom: 76px;
    }
    .tr-deck {
        position: relative;
        align-content: start;
        gap: 6px;
        min-height: 0;
        max-height: none;
        padding: 0 12px max(8px, env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .tr-mobile-panel-bar {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 44px;
        background: var(--gl-paper);
        font-size: 14px;
    }
    .tr-mobile-panel-bar > strong {
        display: block;
    }
    .tr-mobile-panel-bar .tr-panel-toggle {
        margin-left: auto;
    }
    .tr-mobile-panel-bar .tr-now-fav {
        width: 44px;
        height: 44px;
    }
    .tr-panel-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 10px;
        border: 1px solid rgba(16, 43, 70, .35);
        border-radius: 10px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-panel-toggle:focus-visible,
    .tr-mobile-favorites:focus-visible {
        outline: 3px solid var(--gl-ink);
        outline-offset: 2px;
    }
    .tr-current {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 8px 14px;
        min-width: 0;
        padding: 0 0 8px;
        border-bottom: 1px solid rgba(16, 43, 70, .22);
    }
    .tr-now {
        grid-column: 1;
        grid-row: 1 / span 2;
        display: block;
        align-self: stretch;
        padding: 6px;
        border: 1px solid rgba(16, 43, 70, .22);
        border-radius: 10px;
        background: #fff;
    }
    .tr-now-title,
    .tr-now-link,
    .tr-step,
    .tr-design-row .tr-row-value {
        display: none;
    }
    .tr-now-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 4px;
        min-height: 44px;
    }
    .tr-now-thumb {
        display: grid;
        place-items: center;
        height: 100px;
    }
    .tr-now-thumb img {
        width: auto;
        max-width: 100%;
        height: 100px;
        object-fit: contain;
    }
    .tr-now-text {
        display: flex;
        flex-direction: column;
        min-width: 0;
        text-align: center;
    }
    .tr-now-name {
        margin: 0;
        overflow: hidden;
        display: -webkit-box;
        min-height: 1.3em;
        max-height: 2.6em;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.3;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .tr-now-id {
        order: -1;
        margin: 0 0 2px;
        font-size: 12px;
        line-height: 1.3;
    }
    .tr-now-id-caption {
        display: none;
    }
    .tr-mobile-now-label {
        display: none;
    }
    .tr-now-fav {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(16, 43, 70, .3);
        border-radius: 50%;
        background: #fff;
        cursor: pointer;
    }
    .tr-now-fav[hidden] {
        display: none;
    }
    .tr-now-fav .tr-bar-icon {
        width: 24px;
        height: 24px;
        stroke: #c33e59;
    }
    .tr-now-fav[aria-pressed="true"] .tr-bar-icon {
        fill: #c33e59;
    }
    .tr-current .tr-row:has([data-try-colors]) {
        grid-column: 2;
        grid-row: 1;
        display: block;
        align-items: center;
        min-height: 0;
        height: auto;
    }
    .tr-current .tr-row:has([data-try-colors]) .tr-row-head {
        display: flex;
        gap: 6px;
    }
    .tr-current .tr-row:has([data-try-colors]) .tr-row-value {
        font-size: 12px;
    }
    .tr-current .tr-row:has([data-try-colors]) .tr-row-body {
        flex-wrap: nowrap;
        min-width: 0;
        margin-top: 3px;
        padding: 3px;
        overflow-x: auto;
    }
    .tr-current .tr-row-note {
        margin: 0;
        font-size: 12px;
        line-height: 1.35;
    }
    .tr-swatch {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }
    .tr-sizes {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, minmax(44px, 1fr));
        gap: 4px;
        margin-top: 4px;
    }
    .tr-sizes:has(> :nth-child(4)) {
        grid-template-columns: repeat(4, minmax(44px, 1fr));
    }
    .tr-sizes:has(> :nth-child(6)):not(:has(> :nth-child(7))) {
        grid-template-columns: repeat(3, minmax(44px, 1fr));
    }
    .tr-current .tr-row:has([data-try-sizes]) {
        grid-column: 2;
        grid-row: 2;
    }
    .tr-current .tr-row:has([data-try-sizes]) .tr-row-head {
        display: grid;
        gap: 0;
    }
    .tr-current .tr-row:has([data-try-sizes]) .tr-row-value {
        font-size: 12px;
        line-height: 1.4;
    }
    .tr-size {
        min-height: 44px;
    }
    .tr-size b {
        font-size: 18px;
    }
    .tr-row-head {
        gap: 8px;
    }
    .tr-row-label {
        font-size: 14px;
    }
    .tr-row-value {
        font-size: 13px;
    }
    .tr-design-row .tr-row-head {
        gap: 6px;
        min-height: 44px;
    }
    .tr-row-more,
    .tr-mobile-favorites {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 8px;
        border: 1px solid rgba(16, 43, 70, .35);
        border-radius: 10px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
    }
    .tr-mobile-favorites {
        margin-left: auto;
    }
    .tr-row-more {
        margin-left: 0;
    }
    .tr-mobile-favorites[aria-pressed="true"] {
        border-color: var(--gl-ink);
        background: var(--gl-yellow);
    }
    .tr-strip {
        min-height: 72px;
        height: 72px;
        margin-top: 4px;
        padding: 3px;
    }
    .tr-thumb {
        grid-template-rows: minmax(0, 1fr);
        width: 52px;
        height: 64px;
    }
    .tr-thumb img {
        width: auto;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .tr-strip > .tr-row-note {
        align-self: center;
        padding: 4px;
    }
    .tr-app[data-panel-collapsed="true"] .tr-current,
    .tr-app[data-panel-collapsed="true"] .tr-design-row,
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar .tr-now-fav {
        display: none;
    }
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar {
        position: static;
        padding-top: 6px;
        padding-bottom: 2px;
    }
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar > strong {
        display: block;
    }
    .tr-app[data-panel-collapsed="true"] .tr-panel-toggle {
        min-height: 48px;
        border: 2px solid var(--gl-ink);
        background: var(--gl-yellow);
        font-size: 15px;
    }
}
@media (max-width: 359px) {
    .tr-current {
        grid-template-columns: 88px minmax(0, 1fr);
        column-gap: 10px;
    }
    .tr-deck {
        padding-right: 8px;
        padding-left: 8px;
    }
    .tr-design-row .tr-row-head {
        gap: 4px;
    }
    .tr-row-more,
    .tr-mobile-favorites {
        padding-right: 5px;
        padding-left: 5px;
    }
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar {
        flex-wrap: wrap;
    }
    .tr-app[data-panel-collapsed="true"] .tr-panel-toggle {
        flex: 1 0 100%;
    }
}
@media (max-width: 959px) and (max-height: 680px) {
    .tr-scenebar {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .tr-places-open,
    .tr-view-cycle,
    .tr-wind-toggle {
        height: 50px;
        min-height: 50px;
    }
    .tr-view-cycle {
        font-size: 13px;
    }
    .tr-places-text b {
        font-size: 12px;
    }
    .tr-view-cycle .tr-bar-icon {
        width: 18px;
        height: 18px;
    }
    .tr-deck {
        gap: 4px;
    }
    .tr-current {
        row-gap: 4px;
        padding-bottom: 4px;
    }
    .tr-current .tr-row:has([data-try-sizes]) .tr-row-head {
        display: flex;
        gap: 6px;
    }
    .tr-now-thumb,
    .tr-now-thumb img {
        height: 84px;
    }
    .tr-strip {
        min-height: 56px;
        height: 56px;
        margin-top: 2px;
    }
    .tr-thumb {
        height: 48px;
        width: 46px;
    }
}
@media (max-width: 959px) and (max-height: 540px) and (orientation: landscape) {
    .tr-deck {
        max-height: 100%;
    }
    .tr-app[data-panel-collapsed="true"] {
        grid-template-columns: minmax(0, 1fr) 200px;
    }
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

/* スマホの操作を詰め、見本と操作への短い反応を加える。 */
@media (max-width: 959px) {
    .tr-deck {
        padding-top: 6px;
        gap: 4px;
    }
    .tr-current {
        column-gap: 10px;
        row-gap: 4px;
        padding-bottom: 4px;
    }
    .tr-now {
        position: relative;
        display: flex;
        flex-direction: column;
        padding: 4px;
    }
    .tr-now-thumb {
        height: 80px;
        padding-right: 28px;
    }
    .tr-now-thumb img {
        height: 80px;
    }
    .tr-now-body {
        gap: 2px;
        margin-top: auto;
        margin-bottom: auto;
    }
    .tr-now-fav {
        position: absolute;
        top: 4px;
        right: 2px;
        border: 0;
        background: transparent;
    }
    .tr-now-name {
        font-size: 12px;
        min-height: 1.3em;
        max-height: 1.3em;
        -webkit-line-clamp: 1;
    }
    .tr-now-id {
        font-size: 11px;
    }
    .tr-mobile-now-label {
        display: inline;
    }
    .tr-now .tr-mobile-panel-bar {
        position: static;
        display: block;
        min-height: 44px;
        margin-top: 4px;
        background: transparent;
    }
    .tr-now .tr-mobile-panel-bar > strong {
        display: none;
    }
    .tr-now .tr-panel-toggle {
        width: 100%;
        min-height: 44px;
        gap: 2px;
        padding: 2px 4px;
        font-size: 12px;
        line-height: 1.25;
        white-space: normal;
    }
    .tr-now [data-try-panel-label] {
        white-space: pre-line;
    }
    .tr-current .tr-row:has([data-try-colors]) .tr-row-body {
        margin-top: 0;
    }
    .tr-current .tr-row:has([data-try-sizes]) .tr-row-head {
        display: flex;
        justify-content: space-between;
        gap: 4px;
    }
    .tr-sizes {
        margin-top: 2px;
    }
    .tr-size-guide {
        display: block;
        min-height: 0;
        margin: 0;
        font-size: 12px;
        font-weight: 700;
        line-height: 18px;
        white-space: nowrap;
    }
    .tr-size-guide:empty {
        display: none;
    }
    .tr-row-head:has(.tr-size-guide:not(:empty)) [data-try-size-value] {
        display: none;
    }
    .tr-design-row {
        position: relative;
    }
    .tr-save-feedback {
        position: absolute;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: block;
        margin: 0;
        padding: 4px 8px;
        border: 1px solid var(--gl-ink);
        border-radius: 8px;
        background: var(--gl-cream);
        font-size: 12px;
        pointer-events: none;
    }
    .tr-save-feedback:empty {
        display: none;
    }
    .tr-swatch,
    .tr-size,
    .tr-thumb,
    .tr-now-fav,
    .tr-panel-toggle,
    .tr-mobile-favorites {
        transition: transform 120ms ease-out, background-color 120ms ease-out;
        -webkit-tap-highlight-color: transparent;
    }
    .tr-swatch:active,
    .tr-size:active,
    .tr-thumb:active,
    .tr-now-fav:active,
    .tr-panel-toggle:active,
    .tr-mobile-favorites:active {
        transform: scale(.97);
    }
    .tr-app[data-panel-collapsed="true"] .tr-mobile-panel-bar {
        width: 100%;
    }
}
@media (max-width: 959px) and (prefers-reduced-motion: reduce) {
    .tr-deck button {
        transition: none;
        transform: none;
    }
}

/* スマホの写真の拡大とパネルの開閉を、写真下の左端へ一本化。 */
@media (max-width: 959px) {
    .tr-mobile-panel-bar,
    .tr-now .tr-mobile-panel-bar {
        display: none;
    }
    .tr-app[data-panel-collapsed="true"] .tr-deck {
        display: none;
    }
    .tr-view-dots {
        display: none;
    }
    .tr-view-cycle {
        min-height: 56px;
        font-size: 12px;
    }
    .tr-view-cycle[aria-expanded="false"] {
        background: var(--gl-yellow);
        color: var(--gl-ink);
    }
    .tr-view-cycle-icon > span {
        display: block;
        font-size: 26px;
        line-height: 20px;
        font-weight: 800;
    }
    .tr-places-open {
        padding-top: 1px;
        padding-bottom: 1px;
    }
    .tr-places-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1px;
    }
    .tr-places-text small {
        font-weight: 500;
        color: #53616c;
    }
    .tr-places-text b {
        height: auto;
        max-height: 2.4em;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.2;
    }
    .tr-design-row .tr-row-head {
        min-height: 36px;
    }
    .tr-mobile-favorites,
    .tr-row-more {
        position: relative;
        min-height: 36px;
        height: 36px;
        padding-top: 0;
        padding-bottom: 0;
        border-radius: 8px;
    }
    .tr-mobile-favorites::before,
    .tr-row-more::before {
        content: "";
        position: absolute;
        inset: -4px -2px;
    }
    .tr-camera-note {
        display: block;
        min-height: 14px;
        margin: 0;
        font-size: 10px;
        font-weight: 700;
        line-height: 14px;
        white-space: nowrap;
    }
}
@media (max-width: 959px) and (max-height: 680px) {
    .tr-view-cycle {
        height: 50px;
        min-height: 50px;
    }
    .tr-places-text b {
        font-size: 13px;
        line-height: 1.15;
    }
}
@media (max-width: 959px) and (max-height: 540px) and (orientation: landscape) {
    .tr-app[data-panel-collapsed="true"] {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "bar" "stage";
    }
}

/* タップした旗の情報を先に見せる。見出しと閉じるは窓のスクロール外に残す。 */
@media (max-width: 959px) {
    .tr-app .sp-flag {
        -webkit-tap-highlight-color: transparent;
    }
    .tr-app[data-pop-open] .sp-flag.is-target::after {
        display: none;
    }
    .tr-app[data-pop-open]::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(16, 43, 70, .3);
    }
    .tr-pop:not([hidden]) {
        position: fixed;
        z-index: 41;
        inset: auto 8px max(8px, env(safe-area-inset-bottom));
        width: min(480px, calc(100% - 16px));
        max-height: calc(100dvh - 72px);
        margin-inline: auto;
        padding: 12px;
        box-shadow: 0 4px 0 rgba(16, 43, 70, .3);
    }
    .tr-pop::before {
        display: none;
    }
    .tr-pop .tr-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        gap: 4px;
        min-height: 44px;
        padding: 0 12px;
        border: 2px solid var(--gl-ink);
        border-radius: 999px;
        background: #fff;
        color: var(--gl-ink);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-pop-info {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }
    .tr-pop-big img {
        max-width: 100%;
        height: 120px;
        object-fit: contain;
    }
    .tr-pop-name {
        font-size: 15px;
        overflow-wrap: anywhere;
    }
    .tr-pop-color {
        margin-top: 6px;
        line-height: 1.4;
    }
    .tr-pop-actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .tr-pop-ask {
        margin-bottom: 3px;
    }
    .tr-pop-sub,
    .tr-pop-body,
    .tr-pop-thumbs,
    .tr-pop-note {
        display: none;
    }
    .tr-pop-catalog {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        min-height: 44px;
        margin-top: 12px;
        border: 2px solid var(--gl-ink);
        border-radius: 12px;
        background: var(--gl-cream);
        color: var(--gl-ink);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-pop-catalog .tr-bar-icon {
        width: 18px;
        height: 18px;
        transform: rotate(-90deg);
    }
}

/* 実機の見本送り：並びを固定し、見出し横でまとまりと残りを伝える。 */
@media (max-width: 959px) {
    .tr-design-row .tr-row-head {
        display: grid;
        grid-template-columns: max-content minmax(112px, 1fr) 44px 72px;
        align-items: center;
        gap: 4px;
        min-height: 44px;
    }
    .tr-design-row .tr-row-label {
        font-size: 12px;
        white-space: nowrap;
    }
    .tr-strip-pager {
        display: grid;
        grid-template-columns: 44px 24px 44px;
        align-items: center;
        justify-self: center;
        text-align: center;
    }
    .tr-strip-pager button {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--gl-ink);
        font: inherit;
        font-size: 26px;
        font-weight: 800;
        cursor: pointer;
    }
    .tr-strip-pager button:disabled {
        opacity: .25;
        cursor: default;
    }
    .tr-strip-pager button:not(:disabled):active {
        background: var(--gl-yellow);
    }
    .tr-strip-pager span {
        font-size: 10px;
        font-weight: 800;
        white-space: nowrap;
    }
    .tr-mobile-favorites,
    .tr-row-more {
        min-height: 44px;
        height: 44px;
        margin: 0;
        padding: 0 4px;
    }
    .tr-mobile-favorites {
        display: grid;
        place-items: center;
        width: 44px;
    }
    .tr-mobile-favorites::before,
    .tr-row-more::before {
        content: none;
    }
    .tr-mobile-favorites [data-try-mobile-favorites-label] {
        display: none;
    }
    .tr-mobile-favorites .tr-bar-icon {
        width: 24px;
        height: 24px;
        stroke: #a72c49;
        stroke-width: 2.5;
    }
    .tr-mobile-favorites[aria-pressed="true"] .tr-bar-icon {
        fill: #a72c49;
    }
    .tr-row-more {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 72px;
        font-size: 12px;
        line-height: 1.2;
    }
    .tr-row-more span {
        display: block;
    }
    .tr-app .sp-frame {
        touch-action: none;
    }
    .tr-photo-reset {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 8;
        display: grid;
        place-items: center;
        min-width: 44px;
        min-height: 36px;
        padding: 0 10px;
        border: 2px solid var(--gl-ink);
        border-radius: 10px;
        background: var(--gl-paper);
        color: var(--gl-ink);
        font: inherit;
        font-size: 12px;
        font-weight: 800;
        box-shadow: 0 2px 0 rgba(16, 43, 70, .25);
        cursor: pointer;
    }
    .tr-photo-reset:focus-visible,
    .tr-strip-pager button:focus-visible {
        outline: 3px solid var(--gl-yellow);
        outline-offset: 2px;
    }
}

/* お気に入りから引き継ぐ比較候補 */
/* ★はギャラリーと同じSVGを使い、保存状態を塗りで区別する。 */
.tr-app :is(.tr-fav, .tr-now-fav, .tr-pop-fav, .tr-mobile-favorites) svg {
  stroke: var(--sb-color-ink);
  fill: none;
}

.tr-app :is(.tr-fav, .tr-now-fav, .tr-pop-fav, .tr-mobile-favorites)[aria-pressed="true"] svg {
  fill: var(--sb-color-yellow);
  stroke: var(--sb-color-ink);
}

.tr-app .tr-inv-title .tr-bar-icon {
  fill: var(--sb-color-yellow);
  stroke: var(--sb-color-ink);
}

.tr-inv-heading {
  flex: 0 0 auto;
  min-width: 0;
}

.tr-compare-return {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  color: var(--sb-color-blue);
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.tr-compare-return .tr-bar-icon {
  width: 16px;
  height: 16px;
}

.tr-compare-arrange {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--sb-color-blue);
  border-radius: 8px;
  background: var(--sb-color-white);
  color: var(--sb-color-blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tr-compare-arrange[aria-pressed="true"] {
  background: var(--sb-color-yellow);
  color: var(--sb-color-ink);
}

.tr-app :is(.tr-compare-arrange, .tr-compare-return)[hidden] {
  display: none;
}

.tr-pending-note {
  display: block;
  margin: 2px 0;
  color: var(--sb-text-muted);
  font-size: 11px;
  line-height: 1.3;
}

.tr-pending-note[hidden],
.tr-pending-note--mobile {
  display: none;
}

.tr-pending-help {
  margin: 4px 0 12px;
  color: var(--sb-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.tr-inv-state {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sb-color-white);
  pointer-events: none;
}

.tr-app .tr-inv-state .tr-bar-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--sb-color-ink);
  stroke-width: 1.8;
}

.tr-app [data-favorite-saved="true"] .tr-inv-state .tr-bar-icon {
  fill: var(--sb-color-yellow);
}

.tr-inv-slot,
.tr-inv-pick,
.tr-thumb {
  position: relative;
}

@media (min-width: 960px) {
  .tr-app[data-comparison="true"] .tr-inv {
    gap: 12px;
  }
}

@media (max-width: 959px) {
  .tr-pending-note--mobile:not([hidden]) {
    display: block;
    padding-left: 4px;
  }

  .tr-app .tr-mobile-favorites[aria-pressed="true"] {
    border-color: var(--sb-color-blue);
    background: var(--sb-color-cream);
  }

  .tr-inv-state {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 380px) {
  .tr-app .tr-bar-link {
    min-width: 30px;
    padding: 4px;
  }

  .tr-app .tr-bar-link span {
    display: none;
  }

  .tr-app .tr-title {
    font-size: 14px;
  }

  .tr-app .tr-ask {
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* =====================================================================
   全体V1（SB-TASK-802）：新しい世界の装い
   操作の配置は変えず、色の役割・線・面・文字だけを新しい世界へそろえる。
   - 外枠：工房の案内板ヘッダーの後ろに空。アプリの地面は生成り、足もとに若草と土色の帯
   - 写真：トップの「あなたの場所に、立てたら？」と同じ木の窓。写真の下の帯は窓台
   - 右の帯：工房の仕立て台。白い紙の札に木の下影、見出しは明朝、見本番号は羽根型の番号札
   - 色の役割：主な操作は深緑、選んだものは山吹とチェック、お気に入りは山吹の札
   ===================================================================== */
.gl-page.tr-world {
    --tw-ink: var(--sb-world-ink);
    --tw-muted: var(--sb-world-muted);
    --tw-accent: var(--sb-world-accent);
    --tw-action: var(--sb-world-action);
    --tw-on-action: var(--sb-world-on-action);
    --tw-gold: var(--sb-world-gold);
    --tw-ground: var(--sb-world-ground);
    --tw-paper: var(--sb-world-paper);
    --tw-surface: var(--sb-world-reading-surface);
    --tw-rule: var(--sb-world-rule);
    --tw-rule-strong: rgb(23 62 80 / 32%);
    --tw-wood: var(--sb-world-wood);
    --tw-wood-edge: var(--sb-world-wood-edge);
    --tw-frame: #d8a671;
    --tw-frame-light: #f5dcae;
    --tw-frame-dark: #92603d;
    --tw-leaf: var(--sb-world-field-leaf);
    --tw-clay: var(--sb-world-field-clay);
    --tw-art: #f5f9fb;
    --tw-sheet-shadow: 0 3px 0 var(--sb-world-wood), 0 8px 18px rgb(43 73 62 / 8%);
    --tw-press-shadow: 0 2px 0 rgb(23 62 80 / 28%);
    --tw-heading: var(--sb-world-font-heading);
    --gl-ink: var(--sb-world-ink);
    --gl-yellow: var(--sb-world-gold);
    --gl-cream: var(--sb-world-light);
    --gl-paper: var(--sb-world-ground);
    background: var(--tw-ground);
}

/* 工房の案内板ヘッダーの後ろに、ギャラリーと同じ空 */
body.page-try {
    background-color: var(--sb-world-reading-surface);
    background-image: url("/assets/img/home-hero-v1/sky-wide-v01.webp");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 220px;
}
body.page-try .site-spacer {
    background: transparent;
}
/* フッターはページ台帳の showFooter: false で描かない（全画面の操作面のため）。比較用の各案だけが、案のCSSで畳んでいる */

/* ---------- 共通の部品（PC・スマートフォン） ---------- */

/* 押せる丸札：選んだ時は深緑 */
.tr-world .tr-chip[aria-pressed="true"] {
    background: var(--tw-action);
    color: var(--tw-on-action);
}
/* 深緑の札の上にマウスを置いた時も、文字が読める濃さを保つ（元の淡い面への切り替えを上書き） */
.tr-world .tr-chip[aria-pressed="true"]:hover,
.tr-world .tr-view-step[aria-pressed="true"]:hover,
.tr-world .tr-places-open:hover .tr-places-cta {
    background: color-mix(in srgb, var(--tw-action) 86%, #000);
    color: var(--tw-on-action);
}
/* 設置場所の一覧を開いている間は、選んでいる印の山吹 */
.tr-world .tr-places-open[aria-expanded="true"] .tr-places-cta {
    background: var(--tw-gold);
    color: var(--tw-ink);
}

/* 写真の左上「※画像はイメージです」：紙の小さな札 */
.tr-world .tr-photo-note {
    padding: 1px 9px;
    border: 1px solid var(--tw-wood-edge);
    border-radius: 6px;
    background: var(--tw-paper);
    color: var(--tw-ink);
    font-weight: 700;
}

/* 結果の知らせ：白い吹き出しの紙 */
.tr-world .tr-toast {
    border: 1px solid var(--tw-rule-strong);
    border-radius: 16px 17px 15px 6px;
    background: var(--tw-surface);
    color: var(--tw-ink);
    box-shadow: var(--tw-sheet-shadow);
}

/* 色を選ぶ：細い罫線の丸。選んだ色は山吹の輪とチェック */
.tr-world .tr-swatch {
    position: relative;
    border: 1px solid var(--tw-rule-strong);
    background: var(--tw-surface);
}
.tr-world .tr-swatch[aria-pressed="true"] {
    border-color: var(--tw-wood-edge);
    box-shadow: 0 0 0 3px var(--tw-gold);
}
.tr-world .tr-swatch[aria-pressed="true"]::after,
.tr-world .tr-size[aria-pressed="true"]::after {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--tw-surface);
    border-radius: 50%;
    background: var(--tw-action);
    color: var(--tw-on-action);
    font: 700 11px/1 sans-serif;
    content: "✓";
}

/* 大きさを選ぶ：細い罫線の札。選んだ大きさは山吹とチェック（絵がまだ無い型は点線のまま） */
.tr-world .tr-size {
    position: relative;
    border: 1px solid var(--tw-rule-strong);
    background: var(--tw-surface);
    color: var(--tw-ink);
}
.tr-world .tr-size.is-guide {
    border-style: dashed;
    border-color: rgb(23 62 80 / 45%);
}
.tr-world .tr-size[aria-pressed="true"] {
    border-style: solid;
    border-color: var(--tw-wood-edge);
    background: var(--tw-gold);
    color: var(--tw-ink);
}

/* 見本のカード：ギャラリーと同じ白い札。旗の後ろは淡い空色の展示面 */
.tr-world .tr-card-pick {
    border: 1px solid var(--tw-rule);
    background: linear-gradient(var(--tw-art) 0, var(--tw-art) 72%, var(--tw-surface) 72%);
    box-shadow: 0 2px 0 rgb(23 62 80 / 6%);
}
.tr-world .tr-card-pick:hover {
    border-color: var(--tw-rule-strong);
}
.tr-world .tr-card-pick[aria-pressed="true"] {
    border-color: var(--tw-wood-edge);
    box-shadow: 0 0 0 3px var(--tw-gold);
}
.tr-world .tr-card-text {
    color: var(--tw-ink);
}
.tr-world .tr-card-text small {
    color: var(--tw-muted);
}

/* ★：ギャラリーのカードと同じ丸い札。保存したら山吹の面に墨紺の★ */
.tr-world .tr-fav {
    top: 5px;
    left: 5px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--tw-rule);
    border-radius: 50%;
    background: rgb(255 255 255 / 94%);
    color: var(--tw-muted);
}
.tr-world .tr-fav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}
.tr-world .tr-fav[aria-pressed="true"] {
    border-color: var(--tw-wood-edge);
    background: var(--tw-gold);
    color: var(--tw-ink);
}
.tr-world .tr-fav[aria-pressed="true"] svg {
    fill: currentColor;
    stroke: currentColor;
}
.tr-world .tr-now-fav,
.tr-world .tr-pop-fav {
    border: 1px solid var(--tw-rule-strong);
    color: var(--tw-ink);
}
.tr-world .tr-now-fav .tr-bar-icon,
.tr-world .tr-pop-fav .tr-bar-icon {
    stroke: currentColor;
}
.tr-world .tr-now-fav[aria-pressed="true"],
.tr-world .tr-pop-fav[aria-pressed="true"] {
    border-color: var(--tw-wood-edge);
    background: var(--tw-gold);
}
.tr-world .tr-now-fav[aria-pressed="true"] .tr-bar-icon,
.tr-world .tr-pop-fav[aria-pressed="true"] .tr-bar-icon {
    fill: currentColor;
}

/* 見本番号：テーマ別の「どう選ぶ？」と同じ、羽根型の番号札 */
.tr-world .tr-now-id b,
.tr-world .tr-pop-id b {
    display: inline-block;
    margin-left: 2px;
    padding: 3px 9px 4px;
    border-radius: 3px 12px 4px 4px;
    background: var(--tw-action);
    color: var(--tw-on-action);
    font-family: var(--tw-heading);
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.2;
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--tw-gold) 78%, transparent);
}

/* 旗の小窓：工房の紙。主な操作「このデザインで相談する」は深緑 */
.tr-world .tr-pop:not([hidden]) {
    border: 1px solid var(--tw-rule-strong);
    background: var(--tw-ground);
    box-shadow: 0 4px 0 var(--tw-wood), 0 16px 32px rgb(23 62 80 / 18%);
}
.tr-world .tr-pop[data-side="right"]::before {
    border-right-color: var(--tw-wood-edge);
}
.tr-world .tr-pop[data-side="left"]::before {
    border-left-color: var(--tw-wood-edge);
}
.tr-world .tr-pop-title {
    font-family: var(--tw-heading);
    font-weight: 700;
}
.tr-world .tr-pop-info {
    border: 1px solid var(--tw-rule);
    background: var(--tw-surface);
}
.tr-world .tr-pop-big {
    border-radius: 8px;
    background: var(--tw-art);
}
.tr-world .tr-pop-fav,
.tr-world .tr-pop-link {
    border: 1px solid var(--tw-rule-strong);
    border-radius: 999px;
    background: var(--tw-surface);
}
.tr-world .tr-pop-link {
    color: var(--tw-action);
}
.tr-world .tr-pop-ask {
    border: 0;
    background: var(--tw-action);
    box-shadow: var(--tw-press-shadow);
    color: var(--tw-on-action);
}
.tr-world .tr-pop-ask:hover {
    background: color-mix(in srgb, var(--tw-action) 88%, #000);
}
.tr-world .tr-pop-sub {
    border-top: 1px solid var(--tw-rule);
    font-family: var(--tw-heading);
    font-weight: 700;
}
.tr-world .tr-pop-flip,
.tr-world .tr-pop-catalog {
    border: 1px solid var(--tw-rule-strong);
}
.tr-world .tr-pop-catalog {
    border-radius: 999px;
    background: var(--tw-surface);
    box-shadow: none;
}
.tr-world .tr-pop-thumb {
    border: 1px solid var(--tw-rule);
    background: var(--tw-art);
}
.tr-world .tr-pop-thumb[aria-pressed="true"] {
    border-color: var(--tw-wood-edge);
    box-shadow: 0 0 0 3px var(--tw-gold);
}

/* 設置場所を選ぶ・デザインをさがす：ギャラリー一覧と同じ見た目（白いサイドバー、山吹の選択札、生成りの台紙に白いカード） */
.tr-world .tr-catalog-title {
    font-family: var(--tw-heading);
    font-weight: 700;
}
.tr-world .tr-search-box {
    border: 1px solid var(--tw-rule-strong);
    background: var(--tw-surface);
}
.tr-world .tr-search-box:focus-within {
    outline-color: var(--tw-gold);
}
.tr-world .tr-close {
    border: 1px solid var(--tw-rule-strong);
    background: var(--tw-surface);
}
.tr-world .tr-tree-item[aria-pressed="true"] {
    background: var(--tw-gold);
    color: var(--tw-ink);
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--tw-wood-edge) 55%, transparent);
}

/* 初めての方：旗之助のお出迎え。トップの吹き出しと同じ形で尋ね、用途は絵入りの白い札 */
.tr-world .tr-start {
    background: rgb(23 62 80 / 52%);
}
.tr-world .tr-start-card {
    position: relative;
    padding: 18px;
    border: 1px solid var(--tw-wood-edge);
    border-radius: 22px;
    background: var(--tw-ground);
    box-shadow: 0 5px 0 var(--tw-wood), 0 22px 44px rgb(23 62 80 / 24%);
    text-align: left;
}
.tr-world .tr-start-greeting {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: end;
    gap: 6px;
    margin: 0 0 10px;
}
.tr-world .tr-start-guide {
    position: relative;
    display: block;
}
.tr-world .tr-start-guide img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 2px rgb(23 62 80 / 12%));
}
.tr-world .tr-start-title {
    position: relative;
    align-self: center;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid var(--tw-rule-strong);
    border-radius: 45% 48% 40% 46% / 52% 50% 48% 46%;
    background: var(--tw-surface);
    font-family: var(--tw-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}
.tr-world .tr-start-note {
    color: var(--tw-muted);
    font-size: 14px;
    text-align: center;
    word-break: auto-phrase;
}
.tr-world .tr-start-use {
    word-break: auto-phrase;
    border: 1px solid var(--tw-rule-strong);
    border-radius: 12px;
    background: var(--tw-surface);
    box-shadow: 0 3px 0 var(--tw-wood);
}
.tr-world .tr-start-use:hover {
    border-color: var(--tw-wood-edge);
    background: color-mix(in srgb, var(--tw-gold) 22%, var(--tw-surface));
}
.tr-world .tr-start-icon {
    color: var(--tw-accent);
}
.tr-world .tr-start-any {
    border: 1px dashed var(--tw-wood-edge);
    background: transparent;
    box-shadow: none;
}

/* ---------- PC（960px以上）：木の窓と工房の仕立て台 ---------- */
@media (min-width: 960px) {
    /* 地面：生成りの上に、足もとの若草と土色の帯（グラデーションでなく色の帯を重ねる） */
    .tr-world .tr-app {
        column-gap: 14px;
        padding: 10px 14px 24px;
        background:
            linear-gradient(to top, var(--tw-clay) 0, var(--tw-clay) 8px, var(--tw-leaf) 8px, var(--tw-leaf) 18px, transparent 18px),
            var(--tw-ground);
    }

    /* 写真を木の窓に入れる。写真の下の帯は、そのまま窓台 */
    .tr-world .tr-stage {
        padding: 9px 9px 0;
        border: 1px solid var(--tw-frame-dark);
        border-radius: 24px 24px 12px 12px;
        background: var(--tw-frame);
        box-shadow: inset 0 0 0 2px rgb(255 246 212 / 45%), var(--sb-world-window-shadow);
    }
    .tr-world .tr-figure {
        overflow: hidden;
        border-radius: 16px 16px 3px 3px;
        box-shadow: 0 0 0 1px rgb(110 70 42 / 48%);
    }
    .tr-world .tr-scenebar {
        margin: 9px -9px 0;
        padding: 10px 14px 12px;
        border-top: 1px solid var(--tw-frame-dark);
        border-radius: 0 0 11px 11px;
        background: var(--tw-frame-light);
    }

    /* 窓台の上の札：いまの場所は、トップの場所選びと同じ写真つきの札にチェック。「設置場所を選ぶ」は深緑 */
    .tr-world .tr-places-open {
        border: 2px solid var(--tw-gold);
        background: var(--tw-surface);
        box-shadow: 0 2px 0 var(--tw-wood-edge);
    }
    .tr-world .tr-places-text b::after {
        display: inline-grid;
        place-items: center;
        width: 16px;
        height: 16px;
        margin-left: 6px;
        border-radius: 50%;
        background: var(--tw-action);
        color: var(--tw-on-action);
        font: 700 10px/1 sans-serif;
        vertical-align: 2px;
        content: "✓";
    }
    .tr-world .tr-places-cta {
        border: 0;
        border-radius: 999px;
        background: var(--tw-action);
        box-shadow: var(--tw-press-shadow);
        color: var(--tw-on-action);
    }

    /* 見え方（全体｜拡大｜アップ）は、ギャラリーの「絵柄｜立てた姿」と同じ深緑の切り替え */
    .tr-world .tr-views {
        border: 1px solid var(--tw-rule-strong);
        border-radius: 999px;
        background: var(--tw-surface);
    }
    .tr-world .tr-view-step {
        border-radius: 999px;
    }
    .tr-world .tr-view-step[aria-pressed="true"] {
        background: var(--tw-action);
        color: var(--tw-on-action);
    }
    .tr-world .tr-wind-toggle,
    .tr-world .tr-share-chip {
        border: 1px solid var(--tw-rule-strong);
        border-radius: 14px;
        background: var(--tw-surface);
    }
    .tr-world .tr-wind-toggle[aria-pressed="true"],
    .tr-world .tr-wind-toggle[aria-pressed="true"]:hover {
        background: var(--sb-world-light);
        color: var(--tw-ink);
    }
    .tr-world .tr-share-chip:hover,
    .tr-world .tr-wind-toggle:hover {
        background: var(--sb-world-light);
    }

    /* お気に入りの棚：見出しはギャラリー右下と同じ山吹の札（墨紺の★・白い件数） */
    .tr-world .tr-inv {
        border-top: 1px solid color-mix(in srgb, var(--tw-frame-dark) 35%, transparent);
    }
    .tr-world .tr-inv-title {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px 6px 10px;
        border: 1px solid var(--tw-wood-edge);
        border-radius: 999px;
        background: var(--tw-gold);
        box-shadow: 0 2px 0 var(--tw-wood-edge);
        color: var(--tw-ink);
        white-space: nowrap;
    }
    .tr-world .tr-inv-title .tr-bar-icon {
        fill: currentColor;
    }
    .tr-world .tr-inv-title small:not(:empty) {
        min-width: 24px;
        padding: 1px 7px;
        border-radius: 999px;
        background: var(--tw-surface);
        text-align: center;
    }
    .tr-world .tr-inv-slot {
        border-color: var(--tw-rule-strong);
        background: var(--tw-surface);
    }
    .tr-world .tr-inv-hint {
        background: transparent;
        color: var(--tw-muted);
    }
    .tr-world .tr-inv-more {
        border: 1px solid var(--tw-rule-strong);
        border-radius: 999px;
        background: var(--tw-surface);
    }

    /* 右の帯：工房の仕立て台。台紙は地面の生成り、上に白い紙の札 */
    .tr-world .tr-deck {
        gap: 12px;
        padding: 0;
        border-left: 0;
        background: transparent;
    }
    .tr-world .tr-current {
        border: 1px solid var(--tw-rule);
        border-radius: 16px;
        background: var(--tw-surface);
        box-shadow: var(--tw-sheet-shadow);
    }
    .tr-world .tr-now {
        border-bottom: 1px solid var(--tw-rule);
    }
    .tr-world .tr-now-title,
    .tr-world .tr-shelf-title {
        font-family: var(--tw-heading);
        font-size: 18px;
        font-weight: 700;
        letter-spacing: .02em;
    }
    .tr-world .tr-shelf-title small {
        color: var(--tw-muted);
        font-family: var(--sb-world-font-body);
        letter-spacing: 0;
    }
    .tr-world .tr-now-thumb {
        border-radius: 10px;
        background: var(--tw-art);
    }
    .tr-world .tr-now-name {
        font-family: var(--tw-heading);
        font-weight: 700;
    }
    .tr-world .tr-now-id {
        color: var(--tw-muted);
    }
    .tr-world .tr-now-link {
        color: var(--tw-action);
    }
    .tr-world .tr-row-label {
        font-size: 15px;
    }
    .tr-world .tr-row-value {
        color: var(--tw-muted);
    }

    /* すべてのデザインから探す：ギャラリーと同じ白い検索の枠に、深緑の丸い矢印 */
    .tr-world .tr-find {
        justify-content: space-between;
        padding: 0 6px 0 18px;
        border: 1px solid var(--tw-rule-strong);
        border-radius: 999px;
        background: var(--tw-surface);
        box-shadow: var(--tw-sheet-shadow);
        color: var(--tw-ink);
    }
    .tr-world .tr-find::after {
        display: grid;
        flex: none;
        place-items: center;
        width: 38px;
        height: 38px;
        margin-left: auto;
        border-radius: 50%;
        background: var(--tw-action);
        color: var(--tw-on-action);
        font: 700 18px/1 sans-serif;
        content: "→";
    }
    .tr-world .tr-find:hover {
        border-color: var(--tw-wood-edge);
        background: var(--tw-surface);
    }

    /* 写真の上に出す探す画面：生成りの台紙に、白いサイドバー */
    .tr-world .tr-catalog:not([hidden]) {
        border: 1px solid var(--tw-rule-strong);
        background: var(--tw-ground);
        box-shadow: 0 4px 0 var(--tw-wood), 0 18px 36px rgb(23 62 80 / 20%);
    }
    .tr-world .tr-catalog-head {
        border-bottom: 1px solid var(--tw-rule);
        background: var(--tw-surface);
    }
    .tr-world .tr-tree {
        border-right: 1px solid var(--tw-rule);
        background: var(--tw-surface);
    }
}

/* 幅の狭いPC：右の帯が細くなるので、探す枠の文字と丸い矢印を少し小さくして1行に収める */
@media (min-width: 960px) and (max-width: 1199px) {
    .tr-world .tr-find {
        gap: 6px;
        padding-left: 12px;
        font-size: 14px;
        white-space: nowrap;
    }
    .tr-world .tr-find::after {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* ---------- スマートフォン（959px以下）：空の帯と窓台の一本線 ---------- */
@media (max-width: 959px) {
    .tr-world .tr-bar {
        border-bottom: 0;
        background-color: #d7ebf5;
        background-image: url("/assets/img/home-hero-v1/sky-wide-v01.webp");
        background-position: center top;
        background-size: cover;
    }
    .tr-world .tr-title {
        font-family: var(--tw-heading);
        font-size: 18px;
        font-weight: 700;
    }
    .tr-world .tr-bar-link {
        border-radius: 999px;
    }
    .tr-world .tr-bar-link:hover {
        background: rgb(255 255 255 / 70%);
    }
    /* 相談するは共通ヘッダーと同じ山吹の札 */
    .tr-world .tr-ask {
        border: 1px solid var(--tw-wood-edge);
        background: var(--tw-gold);
        box-shadow: 0 2px 0 var(--tw-wood-edge);
        color: var(--tw-ink);
    }
    .tr-world .tr-scenebar {
        border-top: 5px solid var(--tw-frame);
        background: var(--tw-frame-light);
        box-shadow: inset 0 1px 0 var(--tw-frame-dark);
    }
    .tr-world .tr-places-open {
        border: 2px solid var(--tw-gold);
        background: var(--tw-surface);
    }
    .tr-world .tr-places-cta {
        border: 0;
        background: var(--tw-action);
        box-shadow: var(--tw-press-shadow);
        color: var(--tw-on-action);
    }
    .tr-world .tr-view-cycle,
    .tr-world .tr-wind-toggle {
        border: 1px solid var(--tw-rule-strong);
        background: var(--tw-surface);
    }
    /* 風が吹いている状態は、すぐ隣の主な操作「選ぶ」（深緑）と区別して淡い面に（PCと同じ） */
    .tr-world .tr-wind-toggle[aria-pressed="true"],
    .tr-world .tr-wind-toggle[aria-pressed="true"]:hover {
        border-color: var(--tw-wood-edge);
        background: var(--sb-world-light);
        color: var(--tw-ink);
    }
    .tr-world .tr-deck {
        border-top: 0;
        background: var(--tw-ground);
    }
    .tr-world .tr-mobile-panel-bar {
        background: var(--tw-ground);
        font-family: var(--tw-heading);
    }
    .tr-world .tr-panel-toggle {
        border-color: var(--tw-rule-strong);
        border-radius: 999px;
    }
    .tr-world .tr-current {
        border-bottom-color: var(--tw-rule);
    }
    .tr-world .tr-now {
        border: 1px solid var(--tw-rule);
        background: linear-gradient(var(--tw-art) 0, var(--tw-art) 70%, var(--tw-surface) 70%);
        box-shadow: var(--tw-sheet-shadow);
    }
    .tr-world .tr-thumb {
        border: 1px solid var(--tw-rule);
        background: var(--tw-art);
    }
    .tr-world .tr-thumb[aria-pressed="true"] {
        border-color: var(--tw-wood-edge);
        box-shadow: 0 0 0 3px var(--tw-gold);
    }
    .tr-world .tr-row-more,
    .tr-world .tr-mobile-favorites {
        border: 1px solid var(--tw-rule-strong);
        background: var(--tw-surface);
    }
    .tr-world .tr-start-card {
        padding: 14px;
    }
    .tr-world .tr-start-greeting {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .tr-world .tr-start-use {
        gap: 6px;
        padding: 6px 8px;
    }
    .tr-world .tr-start-icon {
        width: 26px;
        height: 26px;
    }
    .tr-world .tr-start-title {
        padding: 10px 12px;
        font-size: 17px;
    }
}
/* 幅の狭い画面（320px前後）：明朝の題名を「設置イメージを見る」まで読み切れる大きさに */
@media (max-width: 359px) {
    .tr-world .tr-title {
        font-size: 16px;
        letter-spacing: -.01em;
    }
}

/* =====================================================================
   全体V2（SB-TASK-804）：遊び要素
   V1の装いに、役割のある小さな遊びを足す。どれも動きを減らす設定では静止させる。
   - 旗之助のひと言：写真の下の知らせを、旗之助の顔の丸窓つき吹き出しにする（出る時にぽんと膨らむ）
   - 五色の風：風の札の絵を共通の五色の風にし、止める・弱・中・強で揺れ方を変える
   - お出迎えの一跳ね：初めての方への問いかけで、旗之助が一度だけ跳ねて吹き出しが膨らむ
   ===================================================================== */

/* ---------- 旗之助のひと言（写真の下の知らせ） ---------- */
.tr-world .tr-toast {
    --tw-face-size: 46px;
    max-width: calc(100% - 24px - var(--tw-face-size) - 14px);
    padding: 9px 16px;
    transform: translateX(calc(-50% + (var(--tw-face-size) + 14px) / 2));
    text-align: left;
    word-break: auto-phrase;
}
/* 顔の丸窓：お出迎えと同じ旗之助の絵から、頭だけを切り抜く */
.tr-world .tr-toast::before {
    position: absolute;
    bottom: -4px;
    left: calc(-1 * var(--tw-face-size) - 14px);
    width: var(--tw-face-size);
    height: var(--tw-face-size);
    border: 2px solid var(--tw-frame);
    border-radius: 50%;
    background-color: var(--tw-art);
    background-image: url("/assets/img/consult/hatanosuke-welcome-full-v01.webp");
    background-repeat: no-repeat;
    background-position: -38px -6px;
    background-size: 124px auto;
    box-shadow: 0 2px 0 var(--tw-wood-edge);
    content: "";
}
/* 吹き出しのしっぽ（顔の方へ） */
.tr-world .tr-toast::after {
    position: absolute;
    bottom: 12px;
    left: -7px;
    width: 12px;
    height: 12px;
    border-bottom: 1px solid var(--tw-rule-strong);
    border-left: 1px solid var(--tw-rule-strong);
    background: var(--tw-surface);
    transform: rotate(45deg);
    content: "";
}
.tr-world .tr-toast:not([hidden]) {
    animation: tw-bubble-pop .38s cubic-bezier(.3, 1.4, .5, 1) both;
}
@keyframes tw-bubble-pop {
    from {
        opacity: 0;
        transform: translateX(calc(-50% + (var(--tw-face-size) + 14px) / 2)) translateY(8px) scale(.92);
    }
    to {
        opacity: 1;
        transform: translateX(calc(-50% + (var(--tw-face-size) + 14px) / 2)) translateY(0) scale(1);
    }
}

/* ---------- 五色の風（風の札） ---------- */
.tr-world .tr-wind-ribbons {
    display: block;
    flex: none;
    width: 40px;
    height: auto;
    overflow: visible;
}
.tr-world .tr-wind-ribbons .wind-band {
    transform-box: fill-box;
    transform-origin: left center;
}
/* 吹いている時だけ、根元を支点にそよぐ。強さは try.js が付ける data-wind（weak・mid・strong） */
.tr-world .tr-app[data-wind="weak"] .tr-wind-ribbons .wind-band,
.tr-world .tr-app[data-wind="mid"] .tr-wind-ribbons .wind-band,
.tr-world .tr-app[data-wind="strong"] .tr-wind-ribbons .wind-band {
    animation: tw-ribbon-sway var(--tw-ribbon-speed, 1.6s) ease-in-out infinite;
}
.tr-world .tr-app[data-wind="weak"] {
    --tw-ribbon-speed: 2.6s;
    --tw-ribbon-swing: 4deg;
}
.tr-world .tr-app[data-wind="mid"] {
    --tw-ribbon-speed: 1.6s;
    --tw-ribbon-swing: 7deg;
}
.tr-world .tr-app[data-wind="strong"] {
    --tw-ribbon-speed: .85s;
    --tw-ribbon-swing: 11deg;
}
.tr-world .tr-wind-ribbons .wind-band:nth-child(2) {
    animation-delay: -.12s;
}
.tr-world .tr-wind-ribbons .wind-band:nth-child(3) {
    animation-delay: -.24s;
}
.tr-world .tr-wind-ribbons .wind-band:nth-child(4) {
    animation-delay: -.36s;
}
.tr-world .tr-wind-ribbons .wind-band:nth-child(5) {
    animation-delay: -.48s;
}
@keyframes tw-ribbon-sway {
    0%,
    100% {
        transform: rotate(0deg) scaleX(1);
    }
    50% {
        transform: rotate(var(--tw-ribbon-swing, 7deg)) scaleX(.94);
    }
}
/* 止めている時は、色を少し落として静止（「今は吹いていない」と分かる） */
.tr-world .tr-app[data-wind="off"] .tr-wind-ribbons {
    opacity: .55;
}

/* ---------- お出迎えの一跳ね ---------- */
.tr-world .tr-start:not([hidden]) .tr-start-guide img {
    animation: tw-guide-hop .75s cubic-bezier(.3, 1.3, .5, 1) .12s both;
}
.tr-world .tr-start:not([hidden]) .tr-start-title {
    animation: tw-title-pop .45s cubic-bezier(.3, 1.4, .5, 1) .42s both;
}
@keyframes tw-guide-hop {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }
    55% {
        opacity: 1;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes tw-title-pop {
    from {
        opacity: 0;
        transform: scale(.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* スマートフォン：顔の丸窓を少し小さくし、写真の幅に収める */
@media (max-width: 959px) {
    .tr-world .tr-toast {
        --tw-face-size: 40px;
        font-size: 14px;
    }
    .tr-world .tr-toast::before {
        background-position: -33px -5px;
        background-size: 108px auto;
    }
    .tr-world .tr-wind-ribbons {
        width: 34px;
    }
}

/* 動きを減らす設定：遊びの動きは止め、完成した姿だけを見せる */
@media (prefers-reduced-motion: reduce) {
    .tr-world .tr-toast:not([hidden]),
    .tr-world .tr-start:not([hidden]) .tr-start-guide img,
    .tr-world .tr-start:not([hidden]) .tr-start-title,
    .tr-world .tr-app[data-wind] .tr-wind-ribbons .wind-band {
        animation: none;
    }
}

/* =====================================================================
   全体V3（SB-TASK-805）：ほかのデザインの棚の位置を固定する
   棚のカードは、いま立っている旗も並びに残す（try.js の sceneShelfKeys）。
   選んでいるカードは、色・大きさと同じ山吹の枠とチェックで示し、位置は動かさない。
   ===================================================================== */
.tr-world .tr-shelf .tr-card-pick {
    position: relative;
}
.tr-world .tr-shelf .tr-card-pick[aria-pressed="true"] {
    cursor: default;
}
.tr-world .tr-shelf .tr-card-pick[aria-pressed="true"]::after {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--tw-surface);
    border-radius: 50%;
    background: var(--tw-action);
    color: var(--tw-on-action);
    font: 700 12px/1 sans-serif;
    content: "✓";
}
