/*
 * webapp-kit の見た目。色は CSS 変数で上書きできる:
 *   :root { --wak-bg: #fff; --wak-fg: #111; --wak-accent: #0a84ff; }
 */
:root {
  --wak-bg: #12162b;
  --wak-fg: #eef0fa;
  --wak-muted: #9aa0bf;
  --wak-line: rgba(160, 175, 255, 0.18);
  --wak-accent: #4fd6e8;
  --wak-accent-fg: #04111a;
  --wak-radius: 20px;
  --wak-font: inherit;
}

/* スマホのダブルタップ拡大を止める（ピンチは使える）。子にも効く */
html { touch-action: manipulation; }

/* hidden 属性を確実に効かせる（display を指定したボタンでも隠れるように） */
[data-wak][hidden] { display: none !important; }

.wak-guide {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s;
  font-family: var(--wak-font);
}
.wak-guide.wak-open { background: rgba(0, 0, 0, 0.5); }
.wak-sheet {
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  border: 1px solid var(--wak-line);
  border-radius: var(--wak-radius);
  background: var(--wak-bg);
  color: var(--wak-fg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s;
}
.wak-open .wak-sheet { transform: none; opacity: 1; }
@media (min-width: 700px) {
  .wak-guide { align-items: center; }
}
.wak-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.wak-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.wak-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.wak-steps b { color: var(--wak-fg); }
.wak-steps span:last-child { color: var(--wak-muted); }
.wak-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--wak-accent) 16%, transparent);
  color: var(--wak-accent);
}
.wak-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wak-icon circle { fill: currentColor; stroke: none; }
.wak-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wak-close {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--wak-accent);
  color: var(--wak-accent-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.wak-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 2147483001;
  padding: 10px 18px;
  border: 1px solid var(--wak-line);
  border-radius: 999px;
  background: var(--wak-bg);
  color: var(--wak-fg);
  font-family: var(--wak-font);
  font-size: 14px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s;
}
.wak-toast.wak-open { transform: translate(-50%, 0); opacity: 1; }
