/* where: tmas-app/stray.css（CITY が読む）
   what:  野良の助太刀の札（地図の下）・的の区画の印・「助太刀を呼ぶ」の小窓の見た目
   why:   リンクから来た人に、入口の画面を挟まず「どこを・誰の味方で・あと何手」を 1枚で見せる（docs/STRAY_REFERRAL_DESIGN_20261115.md）。
          色は家の色（--fam）から近い色（--fam2）へ。動きは開いた時の 1回だけ。スマホ（body.lite）はぼかさない */

/* 野良の間は、自分の札（YOU）と操作の案内を出さない（持っていない物を見せない） */
body.is-stray #hud-you,
body.is-stray #hud-hint{display:none !important;}

/* 開いた時の動きは、札の外枠に付ける（中身は手を打つたびに作り直すので、中身に付けると毎回やり直しになる） */
.stray-dock{position:fixed;left:50%;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:320;width:min(372px,calc(100vw - 24px));transform:translateX(-50%);
  animation:stray-rise .42s cubic-bezier(.2,.9,.25,1) both;}
.stray-dock[hidden],.stray-share[hidden]{display:none;}
.stray-dock__in{position:relative;padding:13px 14px 14px;border-radius:14px;overflow:hidden;color:#fff;
  background:linear-gradient(180deg,rgba(30,30,42,.78),rgba(10,10,15,.9));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 16px 40px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.35);backdrop-filter:blur(16px) saturate(1.35);}
body.lite .stray-dock__in,body.lite .stray-share__box{-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(180deg,#1c1c27,#0b0b10);}
/* 上の縁: 家の色から近い色へ */
.stray-dock__in::before,.stray-share__box::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,var(--fam),var(--fam2));}
.stray-dock__head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;}
.stray-dock__tag{font-size:10px;letter-spacing:.14em;color:var(--fam2);font-weight:700;}
.stray-dock__q{flex:none;width:22px;height:22px;border-radius:50%;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.06);color:rgba(255,255,255,.8);font-size:12px;line-height:1;cursor:pointer;position:relative;}
.stray-dock__q::after{content:"";position:absolute;inset:-11px;}   /* 押せる広さ 44px */
.stray-dock__title{font-size:14px;line-height:1.5;color:rgba(255,255,255,.86);text-wrap:balance;}
.stray-dock__title b{color:#fff;font-weight:700;}
.stray-dock__title{word-break:keep-all;overflow-wrap:anywhere;}   /* 訳の文(届かない等)は、読点・空白の所で折る */
.stray-nw{display:inline-block;white-space:nowrap;}
.stray-dock__gauge{height:6px;margin:9px 0 2px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden;}
.stray-dock__gauge i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--fam),var(--fam2));transition:width .45s cubic-bezier(.2,.9,.25,1);}
.stray-dock__row{display:flex;align-items:center;gap:10px;margin-top:9px;}
.stray-dock__pips{display:inline-flex;gap:5px;flex:none;}
.stray-dock__pips i{width:10px;height:10px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:transparent;transition:background .25s,transform .25s;}
.stray-dock__pips i.on{border-color:transparent;background:linear-gradient(135deg,var(--fam),var(--fam2));box-shadow:0 0 8px color-mix(in srgb,var(--fam) 60%,transparent);}
.stray-dock__note{font-size:11px;color:rgba(255,255,255,.66);}
.stray-dock__note b{color:#fff;}
.stray-dock__btns,.stray-share__btns{display:flex;gap:8px;margin-top:11px;}
.stray-btn{flex:1 1 0;min-height:44px;padding:0 12px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.07);color:#fff;font-size:13px;font-weight:700;letter-spacing:.04em;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16);transition:transform .12s,filter .12s;}
.stray-btn--main{flex:1.5 1 0;border-color:transparent;color:#0a0a0f;background:linear-gradient(135deg,var(--fam),var(--fam2));box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 6px 16px color-mix(in srgb,var(--fam) 38%,transparent);}
.stray-btn:hover{filter:brightness(1.1);}
.stray-btn:active{transform:scale(.97);}
.stray-btn:disabled{opacity:.5;cursor:default;transform:none;filter:none;}
.stray-btn:focus-visible,.stray-dock__q:focus-visible,.stray-share__x:focus-visible{outline:2px solid var(--fam2);outline-offset:2px;}
.stray-dock__help{margin-top:10px;padding-top:9px;border-top:1px solid rgba(255,255,255,.1);font-size:11px;line-height:1.7;color:rgba(255,255,255,.7);}
.stray-dock.is-hit .stray-dock__pips i:not(.on){animation:stray-pip .4s ease-out;}

/* 的の区画の印（地図の上。区画の真ん中に、家の色の輪が 2回ひろがる） */
.stray-mark{position:absolute;width:0;height:0;pointer-events:none;z-index:6;}
.stray-mark::before,.stray-mark::after{content:"";position:absolute;left:-22px;top:-22px;width:44px;height:44px;border-radius:50%;border:2px solid var(--fam2);opacity:0;animation:stray-ring 2.4s ease-out infinite;}
.stray-mark::after{animation-delay:1.2s;}

/* 「助太刀を呼ぶ」の小窓 */
.stray-share{position:fixed;inset:0;z-index:900;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(4,5,10,.62);}
.stray-share__box{position:relative;width:min(380px,100%);padding:16px 16px 18px;border-radius:14px;overflow:hidden;color:#fff;
  background:linear-gradient(180deg,rgba(30,30,42,.9),rgba(10,10,15,.96));border:1px solid rgba(255,255,255,.16);
  box-shadow:0 20px 50px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.35);backdrop-filter:blur(16px) saturate(1.35);animation:stray-rise .32s cubic-bezier(.2,.9,.25,1) both;}
.stray-share__head{display:flex;align-items:center;justify-content:space-between;font-size:15px;letter-spacing:.06em;}
.stray-share__x{width:28px;height:28px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#fff;font-size:13px;cursor:pointer;position:relative;}
.stray-share__x::after{content:"";position:absolute;inset:-8px;}
.stray-share__lead{margin:10px 0 0;font-size:13px;line-height:1.7;color:rgba(255,255,255,.8);}
.stray-share__lead b{color:#fff;}
.stray-share__url{margin-top:10px;padding:9px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.35);font-size:11px;line-height:1.5;color:rgba(255,255,255,.78);word-break:break-all;cursor:pointer;}
.stray-share__btns{flex-wrap:wrap;}
.stray-share__btns .stray-btn{flex:1 1 120px;}
/* 紹介の数（小窓の下の段）: あなたのリンクから N人・受け取り・決まりの 1行 */
.stray-share__ref{margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:8px;}
.stray-share__refhead{font-size:13px;line-height:1.6;color:rgba(255,255,255,.86);}
.stray-share__refhead b{color:#fff;font-size:15px;}
.stray-share__badge{display:inline-block;margin-right:8px;padding:1px 8px;border-radius:4px;border:1px solid rgba(201,168,76,.6);background:rgba(201,168,76,.12);color:#e8d48a;font-size:10px;letter-spacing:.1em;vertical-align:1px;}
.stray-share__refnote{font-size:11px;line-height:1.6;color:rgba(255,255,255,.58);}
.stray-share__ref .stray-btn{flex:none;width:100%;}

/* 行動カードの「助太刀を呼ぶ」は、ほかの行動と同じボタン（.act-btn.act-def）。ここでは何も足さない */

@keyframes stray-rise{from{opacity:0;translate:0 14px;}to{opacity:1;translate:0 0;}}
@keyframes stray-pip{0%{transform:scale(1.9);background:var(--fam2);}100%{transform:scale(1);background:transparent;}}
@keyframes stray-ring{0%{opacity:.9;transform:scale(.35);}100%{opacity:0;transform:scale(2.1);}}

/* PC: 左下の戦況ログ(幅 230px)に重ならないよう、残りの幅の真ん中に置く */
@media(min-width:701px){
  .stray-dock{left:calc(50% + 129px);width:min(372px,calc(100vw - 282px));}
}
/* スマホ: 右下にラジオの丸い印(幅 30px・右から 16px)が居るので、札は左に寄せて、その分だけ右を空ける(重なると「家に入る」が押せない) */
@media(max-width:700px){
  .stray-dock{left:8px;transform:none;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:calc(100vw - 62px);}
  .stray-dock__title{font-size:13px;}
}
@media(prefers-reduced-motion:reduce){
  .stray-dock,.stray-share__box,.stray-dock.is-hit .stray-dock__pips i:not(.on){animation:none;}
  .stray-mark::before{animation:none;opacity:.8;transform:none;}
  .stray-mark::after{display:none;}
}
