/* 使い方の案内（指さしカード）。値は UIUX大臣 09_uiux/deliverables/flows/2026-09-27_チュートリアル案_流れと値.md（第2版）4章、見本 tips.css。
   色は tools.css の役割の変数だけ（新しい色は足さない）。 */

/* 押せない膜。指さす所だけ穴を開け、穴の中はそのまま押せる */
.tip-veil { position: fixed; inset: 0; z-index: 90; background: var(--c-backdrop);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    var(--x) var(--y), calc(var(--x) + var(--w)) var(--y), calc(var(--x) + var(--w)) calc(var(--y) + var(--h)), var(--x) calc(var(--y) + var(--h)), var(--x) var(--y));
  animation: tip-in 200ms ease-out both; }
/* 輪: 紙の白3px＋外側に墨みどり2px。駒の黄は使わない */
.tip-ring { position: fixed; z-index: 91; pointer-events: none; border: 3px solid var(--paper); border-radius: 14px;
  box-shadow: 0 0 0 2px var(--ink);
  transition: left 200ms ease-out, top 200ms ease-out, width 200ms ease-out, height 200ms ease-out; }
/* カード: 下の真ん中。指さす所が下にあるときだけ上 */
.tip { position: fixed; z-index: 92; left: 50%; transform: translateX(-50%);
  width: min(calc(100vw - 24px), 360px); padding: 16px 16px 12px; border-radius: var(--r-card);
  background: var(--c-card); color: var(--c-text); animation: tip-up 200ms ease-out both; }
.tip.is-bottom { bottom: calc(12px + env(safe-area-inset-bottom)); }
.tip.is-top { top: 68px; }
.tip__count { margin: 0; font-family: var(--f-num); font-size: var(--fs-small); line-height: 1; letter-spacing: .06em; color: var(--c-text); }
.tip__text { margin: 8px 0 0; font-size: var(--fs-body); font-weight: 700; line-height: 1.6; letter-spacing: .04em; font-feature-settings: "palt"; }
.tip__count + .tip__text { margin-top: 8px; }
.tip__text:first-child { margin-top: 0; }
.tip__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.tip__row .btn { width: auto; min-width: 136px; min-height: 48px; padding: 0 24px; }
.tip__row .textbtn { min-height: var(--tap); }

/* 「次回からは表示しない」: 行全体（幅いっぱい×高さ44px）が押せる。本物のチェックボックスは見えなくし、箱は自分で描く */
.tip__check { position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); margin-top: var(--sp-2);
  font-size: var(--fs-body); font-weight: 500; line-height: 1.4; letter-spacing: .04em; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tip__check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tip__box { flex: none; position: relative; width: 24px; height: 24px; border: 2px solid var(--c-text); border-radius: 6px; background: transparent; }
.tip__check input:checked + .tip__box { background: var(--c-text); }
.tip__check input:checked + .tip__box::after { content: ""; position: absolute; left: 6px; top: 1px; width: 7px; height: 13px;
  border: solid var(--c-card); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.tip__check input:focus-visible + .tip__box { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.tip__check + .tip__row { margin-top: var(--sp-1); }

@keyframes tip-in { from { opacity: 0; } }
@keyframes tip-up { from { opacity: 0; translate: 0 8px; } }
@media (prefers-reduced-motion: reduce) {
  .tip-veil, .tip { animation: none; }
  .tip-ring { transition: none; }
}
:root[data-theme="dark"] .tip { outline: 2px solid var(--mint); outline-offset: -2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tip { outline: 2px solid var(--mint); outline-offset: -2px; } }
