/* ==========================================================
   チュートリアル層（スポットライト + ウサギオーナーの吹き出し）
   - 対象要素の周りに4枚のブロッカーを敷き、対象だけクリックを通す
   ========================================================== */

.tut {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;   /* 子要素で個別に有効化 */
}

/* 対象以外のクリックを止める4枚 */
.tut__block {
    position: absolute;
    pointer-events: auto;
    background: rgba(50, 25, 20, .58);
}

.tut__block--hole { background: transparent; }   /* 「次へ」ステップで対象を明るく見せつつクリックは止める */

/* 対象の周りに光る枠（見た目のみ） */
.tut__spot {
    position: absolute;
    border-radius: 14px;
    border: 3px solid var(--yellow);
    box-shadow: 0 0 0 4px rgba(255, 209, 102, .35), 0 0 24px rgba(255, 209, 102, .8);
    animation: spot-pulse 1.2s ease-in-out infinite;
    pointer-events: none;
}
.tut__spot[hidden] { display: none; }
@keyframes spot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,209,102,.35), 0 0 24px rgba(255,209,102,.8); }
    50%      { box-shadow: 0 0 0 8px rgba(255,209,102,.15), 0 0 36px rgba(255,209,102,1); }
}

/* 対象を指す矢印 */
.tut__spot::after {
    content: "👇";
    position: absolute;
    left: 50%;
    top: -44px;
    transform: translateX(-50%);
    font-size: 30px;
    animation: bob 1s ease-in-out infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}
.tut__spot--arrow-below::after {
    content: "👆";
    top: auto;
    bottom: -44px;
}

/* スキップは常に吹き出しの右上（上に出るときも下に出るときも同じ位置関係） */
.tut__skip {
    position: absolute;
    top: -38px;
    right: 0;
    pointer-events: auto;
    border: 2px solid rgba(255,255,255,.7);
    background: rgba(0,0,0,.35);
    color: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
}
.tut__skip:hover { background: rgba(0,0,0,.55); }

/* ---------- メッセージウィンドウ ---------- */

.tut__msg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    pointer-events: auto;
}
.tut__msg--bottom { bottom: 28px; }
.tut__msg--top    { top: 28px; align-items: flex-start; }
.tut__msg--center {
    top: 50%;
    transform: translate(-50%, -50%);
}

.tut__owner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.tut__owner-face {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #ffe0d3);
    border: 4px solid var(--accent);
    display: grid;
    place-items: center;
    font-size: 56px;
    box-shadow: var(--shadow-strong);
    animation: owner-talk 2.2s ease-in-out infinite;
}
@keyframes owner-talk {
    0%, 100% { transform: rotate(-3deg); }
    50%      { transform: rotate(3deg) translateY(-3px); }
}
.tut__owner-name {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 999px;
    letter-spacing: .05em;
}

.tut__bubble {
    flex: 1;
    position: relative;
    background: #fff;
    border: 3px solid var(--accent);
    border-radius: 20px;
    padding: 18px 22px 14px;
    box-shadow: var(--shadow-strong);
    animation: popin .25s cubic-bezier(.2, 1.4, .5, 1);
}
/* 吹き出しのしっぽ */
.tut__bubble::before {
    content: "";
    position: absolute;
    left: -16px;
    bottom: 34px;
    border: 8px solid transparent;
    border-right: 10px solid var(--accent);
    border-left: 0;
}
.tut__bubble::after {
    content: "";
    position: absolute;
    left: -11px;
    bottom: 36px;
    border: 6px solid transparent;
    border-right: 8px solid #fff;
    border-left: 0;
}
.tut__msg--top .tut__bubble::before,
.tut__msg--top .tut__bubble::after { bottom: auto; top: 34px; }

.tut__text {
    font-size: 16px;
    line-height: 1.8;
    min-height: 58px;
}
.tut__text b { color: var(--accent-dark); }
.tut__text .kw {
    display: inline-block;
    background: #fff1e6;
    border-radius: 6px;
    padding: 0 6px;
    font-weight: 700;
}

.tut__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}
.tut__step {
    font-size: 12px;
    color: var(--muted);
    margin-right: auto;
    font-variant-numeric: tabular-nums;
}
.tut__hint {
    font-size: 13px;
    color: var(--accent-dark);
    font-weight: 700;
    animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .45; } }

/* ---------- スマホ ---------- */

/* --- (旧 @media max-width:768px → 常時適用) --- */
.tut__msg { width: calc(100vw - 12px); gap: 8px; }
/* 上下どちらに出ても、ヘッダー／フッターからの余白とスキップの位置関係をそろえる */
.tut__msg--bottom { bottom: 112px; }   /* フッター(96px)＋16px */
.tut__msg--top    { top: 130px; }      /* ヘッダー(約80px)＋12px＋スキップ(38px) */
.tut__owner-face { width: 60px; height: 60px; font-size: 34px; border-width: 3px; }
.tut__owner-name { font-size: 10px; padding: 1px 8px; }
.tut__bubble { padding: 12px 14px 10px; border-radius: 16px; }
.tut__bubble::before { bottom: 22px; }
.tut__bubble::after { bottom: 24px; }
.tut__text { font-size: 14px; line-height: 1.7; min-height: 0; }
.tut__foot { margin-top: 6px; padding-top: 8px; }
.tut__hint { font-size: 12px; }
.tut__skip { font-size: 12px; padding: 4px 10px; }
.tut__spot::after { font-size: 24px; top: -36px; }
.tut__spot--arrow-below::after { top: auto; bottom: -36px; }

/* ---------- ウサギオーナーの画像（img/owner.png があれば全身を表示） ---------- */
.tut__owner-face {
    position: relative;
    width: 104px;
    height: 118px;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    display: grid;
    place-items: end center;
    font-size: 64px;
}
.owner-emoji { position: relative; filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.owner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 6px 6px rgba(0,0,0,.22));
}
/* 画像が読めたら絵文字は隠す（img が残っている＝読めた） */
.owner-img ~ .owner-emoji, .owner-emoji:has(+ .owner-img) { visibility: hidden; }

/* タイトルのマスコットも全身・枠なし */
.title__mascot {
    position: relative;
    width: 140px;
    height: 150px;
    margin-top: -120px;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    font-size: 72px;
}

/* 店名が使えないときのエラー */
.tut__input-error { margin-top: 6px; color: #d64545; font-size: 13px; font-weight: 700; }
