/* ============================================================
   アプリ共通スタイル
   カラーは data/ui/theme.css のトークンに準拠（--repo-color-*）。
   ハードコードせず、ここで定義した変数を参照する。
   ============================================================ */
:root {
  --repo-color-primary:      #102A43;
  --repo-color-primary-dark: #0B1F33;
  --repo-color-primary-tint: rgba(16,42,67,0.06);
  --repo-color-accent:       #365C70;
  --repo-color-bg:           #F6F8FA;
  --repo-color-text:         #1F2933;
  --repo-color-text-light:   #5B677A;
  --repo-color-white:        #FFFFFF;
  --repo-color-border:       rgba(16,42,67,0.12);
  --repo-color-success:      #15803D;
  --repo-color-error:        #B42318; /* danger */
  --repo-color-warning:      #B54708;
  --repo-color-info:         #2563EB;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--repo-color-text);
  background: var(--repo-color-bg);
  line-height: 1.6;
}
a { color: var(--repo-color-info); }
.container { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--repo-color-primary); color: #fff; }
.btn-primary:hover { background: var(--repo-color-primary-dark); }
.btn-outline { background: #fff; border-color: var(--repo-color-border); color: var(--repo-color-text); }
.card { background: #fff; border: 1px solid var(--repo-color-border); border-radius: 12px; padding: 20px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-success { background: rgba(21,128,61,0.1); color: var(--repo-color-success); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--repo-color-border); font-size: 14px; }
.table th { color: var(--repo-color-text-light); font-weight: 600; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-new { background: rgba(37,99,235,0.12); color: var(--repo-color-info); }
.badge-in_progress { background: rgba(181,71,8,0.12); color: var(--repo-color-warning); }
.badge-resolved { background: rgba(21,128,61,0.12); color: var(--repo-color-success); }
.badge-wont_fix { background: rgba(16,42,67,0.08); color: var(--repo-color-text-light); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--repo-color-border);
  border-radius: 8px; font-size: 16px; font-family: inherit;
}
.error-text { color: var(--repo-color-error); font-size: 13px; margin-top: 4px; }

/* ============================================================
   フィードバックウィジェット
   ============================================================ */
.fb-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: none; border-radius: 999px;
  background: var(--repo-color-primary); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(16,42,67,0.28);
}
.fb-fab:hover { background: var(--repo-color-primary-dark); }
.fb-fab svg { width: 20px; height: 20px; fill: currentColor; }

.fb-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(16,42,67,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.fb-overlay[hidden] { display: none; }
.fb-modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.fb-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--repo-color-border);
}
.fb-modal-header h2 { margin: 0; font-size: 18px; }
.fb-close { background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--repo-color-text-light); padding: 4px; }
.fb-modal-body { padding: 20px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip {
  padding: 8px 14px; border: 1px solid var(--repo-color-border);
  border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px;
}
.fb-chip[aria-pressed="true"] {
  background: var(--repo-color-primary); color: #fff; border-color: var(--repo-color-primary);
}
.fb-counter { font-size: 12px; color: var(--repo-color-text-light); text-align: right; margin-top: 4px; }
.fb-counter.over { color: var(--repo-color-error); }
.fb-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fb-submit { margin-top: 16px; width: 100%; justify-content: center; }
.fb-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.fb-preview-wrap { position: relative; margin-top: 12px; }
.fb-canvas { max-width: 100%; border: 1px solid var(--repo-color-border); border-radius: 8px; touch-action: none; display: block; }
.fb-toolbar { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fb-tool {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--repo-color-border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; padding: 0 8px;
}
.fb-tool[aria-pressed="true"] { background: var(--repo-color-primary-tint); border-color: var(--repo-color-primary); }
.fb-error { color: var(--repo-color-error); font-size: 13px; margin-top: 8px; }
.fb-success { text-align: center; padding: 24px 8px; }
.fb-success .mark { font-size: 40px; color: var(--repo-color-success); }

@media (max-width: 600px) {
  .fb-overlay { align-items: flex-end; padding: 0; }
  .fb-modal { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
}

/* ============================================================
   現場スタッフポータル (/staff)
   方針: スマホ最優先 / 大ボタン(最小56px) / 選択式中心 / 1画面1目的
   色は --repo-color-* のみ（ハードコード禁止）。
   ============================================================ */
[x-cloak] { display: none !important; }

.staff-body {
  background: var(--repo-color-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---- ヘッダー ---- */
.staff-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--repo-color-primary);
  color: var(--repo-color-white);
  box-shadow: 0 2px 10px rgba(16,42,67,0.18);
}
.staff-header-title {
  flex: 1; text-align: center;
  margin: 0; font-size: 18px; font-weight: 700;
}
.staff-back {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 64px; min-height: 40px;
  padding: 6px 8px;
  color: var(--repo-color-white); text-decoration: none;
  font-size: 15px; font-weight: 600;
}
.staff-back--placeholder { visibility: hidden; }

/* ---- レイアウト ---- */
.staff-main { padding-bottom: 96px; } /* フィードバックFAB分の余白 */
.staff-container {
  max-width: 560px; margin: 0 auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.staff-container--narrow { max-width: 440px; }

.staff-card {
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 14px;
  padding: 20px;
}
.staff-empty {
  text-align: center; color: var(--repo-color-text-light); font-size: 15px;
}
.staff-lead {
  font-size: 17px; line-height: 1.7; margin: 0 0 16px; color: var(--repo-color-text);
}
.staff-greeting {
  font-size: 18px; line-height: 1.6; margin: 4px 0 4px;
}
.staff-greeting strong { font-size: 22px; }
.staff-section-title {
  margin: 8px 0 -2px; font-size: 15px; font-weight: 700; color: var(--repo-color-text-light);
}

/* ---- ボタン（最小高さ56px） ---- */
.staff-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: 14px; border: 2px solid transparent;
  font-size: 18px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.staff-btn--block { width: 100%; }
.staff-btn--primary { background: var(--repo-color-primary); color: var(--repo-color-white); }
.staff-btn--primary:hover { background: var(--repo-color-primary-dark); }
.staff-btn--outline {
  background: var(--repo-color-white); color: var(--repo-color-primary);
  border-color: var(--repo-color-primary);
}
.staff-btn--ghost {
  background: transparent; color: var(--repo-color-text-light);
  border-color: var(--repo-color-border); font-weight: 600;
}
.staff-btn--disabled, .staff-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- ホームメニュー（大カード） ---- */
.staff-menu { display: flex; flex-direction: column; gap: 14px; }
.staff-menu-card {
  display: flex; align-items: center; gap: 14px;
  min-height: 80px;
  padding: 16px 18px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-left: 6px solid var(--repo-color-primary);
  border-radius: 16px;
  text-decoration: none; color: var(--repo-color-text);
  box-shadow: 0 2px 8px rgba(16,42,67,0.06);
}
.staff-menu-card:active { background: var(--repo-color-primary-tint); }
.staff-menu-icon { font-size: 32px; line-height: 1; flex: 0 0 auto; }
.staff-menu-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.staff-menu-title { font-size: 20px; font-weight: 700; }
.staff-menu-desc { font-size: 14px; color: var(--repo-color-text-light); }
.staff-menu-arrow { font-size: 28px; color: var(--repo-color-text-light); flex: 0 0 auto; }
.staff-logout { margin-top: 8px; }

/* ---- フォーム ---- */
.staff-form { display: flex; flex-direction: column; gap: 18px; }
.staff-field { display: flex; flex-direction: column; gap: 6px; }
.staff-label { font-size: 15px; font-weight: 700; }
.staff-input {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  font-size: 18px;            /* iOS のズーム防止に16px以上 */
  border: 2px solid var(--repo-color-border);
  border-radius: 12px;
  font-family: inherit;
  background: var(--repo-color-white);
  color: var(--repo-color-text);
}
.staff-input:focus { outline: none; border-color: var(--repo-color-primary); }
.staff-input--date { letter-spacing: 0.02em; }
.staff-input--select { -webkit-appearance: none; appearance: none; background-image: none; }
.staff-check { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; min-height: 44px; }
.staff-check input { width: 22px; height: 22px; }

/* ---- ステップ ---- */
.staff-step {
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 14px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.staff-step-title {
  margin: 0; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.staff-step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--repo-color-primary); color: var(--repo-color-white);
  font-size: 15px; font-weight: 700; flex: 0 0 auto;
}
.staff-hint { margin: 0; font-size: 13px; color: var(--repo-color-text-light); text-align: center; }

/* ---- 選択ボタン（半休/1日・作業） ---- */
.staff-choice-row { display: flex; gap: 12px; }
.staff-choice-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.staff-choice {
  flex: 1;
  min-height: 64px;
  padding: 12px;
  border: 2px solid var(--repo-color-border);
  border-radius: 14px;
  background: var(--repo-color-white);
  color: var(--repo-color-text);
  font-size: 17px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.staff-choice--work { min-height: 72px; font-size: 18px; }
.staff-choice--on {
  background: var(--repo-color-primary);
  color: var(--repo-color-white);
  border-color: var(--repo-color-primary);
}

/* ---- カウンタ（件数 +/-） ---- */
.staff-counter-target { margin: 0; font-size: 15px; font-weight: 700; color: var(--repo-color-primary); }
.staff-counter {
  display: flex; align-items: stretch; gap: 10px;
}
.staff-counter-btn {
  width: 64px; min-height: 64px;
  border: 2px solid var(--repo-color-primary);
  border-radius: 14px;
  background: var(--repo-color-white);
  color: var(--repo-color-primary);
  font-size: 30px; font-weight: 700; line-height: 1;
  cursor: pointer; flex: 0 0 auto;
}
.staff-counter-input {
  flex: 1; min-width: 0;
  min-height: 64px;
  text-align: center;
  font-size: 28px; font-weight: 700;
  border: 2px solid var(--repo-color-border);
  border-radius: 14px;
  font-family: inherit;
  color: var(--repo-color-text);
  background: var(--repo-color-white);
}
.staff-counter-quick { display: flex; gap: 10px; }
.staff-quick {
  flex: 1; min-height: 48px;
  border: 1px solid var(--repo-color-border);
  border-radius: 12px;
  background: var(--repo-color-white);
  color: var(--repo-color-text);
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* ---- 追加リスト（カート） ---- */
.staff-cart { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.staff-cart-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--repo-color-bg);
  border-radius: 12px;
}
.staff-cart-name { flex: 1; font-size: 16px; font-weight: 700; }
.staff-cart-count { font-size: 16px; font-weight: 700; color: var(--repo-color-primary); white-space: nowrap; }
.staff-cart-remove {
  min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--repo-color-border); border-radius: 10px;
  background: var(--repo-color-white); color: var(--repo-color-error);
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.staff-cart-total { margin: 4px 0 0; text-align: right; font-size: 16px; }
.staff-cart-total strong { font-size: 22px; color: var(--repo-color-primary); }

/* ---- 数字カード（勤怠） ---- */
.staff-stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.staff-stat-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 14px;
}
.staff-stat-card--accent {
  background: var(--repo-color-primary);
  border-color: var(--repo-color-primary);
}
.staff-stat-card--accent .staff-stat-label,
.staff-stat-card--accent .staff-stat-value,
.staff-stat-card--accent .staff-stat-unit { color: var(--repo-color-white); }
.staff-stat-card--wide { grid-column: 1 / -1; }
.staff-stat-label { font-size: 14px; color: var(--repo-color-text-light); font-weight: 700; }
.staff-stat-value { font-size: 34px; font-weight: 800; color: var(--repo-color-primary); line-height: 1.1; }
.staff-stat-value--sm { font-size: 24px; }
.staff-stat-value--lg { font-size: 44px; }
.staff-stat-unit { font-size: 16px; font-weight: 700; margin-left: 4px; }

/* ---- 日ごとの記録 ---- */
.staff-day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.staff-day-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 12px;
}
.staff-day-date { font-size: 16px; font-weight: 700; min-width: 64px; }
.staff-day-wday { font-size: 12px; color: var(--repo-color-text-light); }
.staff-day-times { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.staff-day-times--muted { color: var(--repo-color-text-light); }
.staff-day-sep { color: var(--repo-color-text-light); }
.staff-day-work { font-size: 14px; color: var(--repo-color-text-light); white-space: nowrap; }

/* ---- 有給ステータス ---- */
.staff-leave-status {
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.staff-leave-status--pending { background: rgba(181,71,8,0.12); color: var(--repo-color-warning); }
.staff-leave-status--approved { background: rgba(21,128,61,0.12); color: var(--repo-color-success); }
.staff-leave-status--rejected { background: rgba(180,35,24,0.12); color: var(--repo-color-error); }

/* ---- 完了画面 ---- */
.staff-done {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  padding: 24px 18px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 16px;
}
.staff-done-mark {
  width: 72px; height: 72px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(21,128,61,0.12); color: var(--repo-color-success);
  font-size: 40px; font-weight: 700;
}
.staff-done-title { margin: 0; font-size: 24px; font-weight: 800; }
.staff-done-detail p { margin: 2px 0; font-size: 18px; }
.staff-done-note { margin: 0; color: var(--repo-color-text-light); font-size: 15px; }
.staff-done .staff-btn { width: 100%; }

/* ---- アラート ---- */
.staff-alert {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(180,35,24,0.10); color: var(--repo-color-error);
  font-size: 15px; font-weight: 700;
}

/* ---- 成長・スキル ---- */
.staff-level-card {
  background: var(--repo-color-primary);
  color: var(--repo-color-white);
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.staff-level-head { display: flex; align-items: center; gap: 12px; }
.staff-level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 44px; padding: 0 14px;
  background: var(--repo-color-white); color: var(--repo-color-primary);
  border-radius: 999px; font-size: 20px; font-weight: 800;
}
.staff-level-name { font-size: 17px; font-weight: 700; }
.staff-xp-bar {
  width: 100%; height: 18px; border-radius: 999px;
  background: rgba(255,255,255,0.25); overflow: hidden;
}
.staff-xp-fill {
  display: block; height: 100%;
  background: var(--repo-color-white);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.staff-xp-text { margin: 0; font-size: 15px; }
.staff-xp-text strong { font-size: 19px; }
.staff-level-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; opacity: 0.92; flex-wrap: wrap; }
.staff-streak { font-weight: 700; }

.staff-skill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.staff-skill-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 12px;
}
.staff-skill-name { flex: 1; font-size: 16px; font-weight: 700; }
.staff-skill-stars { font-size: 16px; letter-spacing: 1px; }
.staff-star { color: var(--repo-color-border); }
.staff-star--on { color: var(--repo-color-warning); }
.staff-skill-title {
  font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--repo-color-primary-tint); color: var(--repo-color-primary);
  white-space: nowrap;
}

.staff-badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.staff-badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px;
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 14px;
  text-align: center;
}
.staff-badge-icon { font-size: 32px; line-height: 1; }
.staff-badge-name { font-size: 13px; font-weight: 700; }

/* ---- 360px以下の極小端末でも崩れないように ---- */
@media (max-width: 360px) {
  .staff-choice-grid { grid-template-columns: 1fr; }
  .staff-stat-value { font-size: 30px; }
  .staff-badge-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   経験値(XP)獲得・レベルアップ演出
   data/ui/components/gamification.md の §3 XPトースト / §4 レベルアップ準拠
   色は --repo-color-* と金色アクセント。スタッフ/管理 両画面で使う。
   ============================================================ */
.xp-toast {
  position: fixed;
  top: 76px; right: 16px;
  background: linear-gradient(135deg, var(--repo-color-primary) 0%, var(--repo-color-accent) 100%);
  color: #FFD86B;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 18px; font-weight: 800;
  z-index: 10050;
  box-shadow: 0 10px 32px rgba(16,42,67,0.35);
  display: flex; align-items: center; gap: 8px;
  animation: xpToastIn 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards,
             xpToastOut 0.4s ease-in 2.4s forwards;
  pointer-events: none;
}
.xp-toast .xp-toast-spark { font-size: 22px; }
@keyframes xpToastIn {
  0%   { transform: translateX(120%) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes xpToastOut {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* XPバーが伸びるアニメーション */
.xp-bar-fill.xp-animate { transition: width 1.1s cubic-bezier(0.22,1,0.36,1); }

/* レベルアップ全画面オーバーレイ */
.xp-levelup-overlay {
  position: fixed; inset: 0; z-index: 10060;
  background: rgba(16,42,67,0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: xpOverlayIn 0.3s ease forwards;
}
.xp-levelup-overlay[hidden] { display: none; }
@keyframes xpOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.xp-levelup-card {
  background: #fff; border-radius: 20px; padding: 32px 28px; text-align: center;
  max-width: 360px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: xpCardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes xpCardPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.xp-levelup-badge {
  width: 96px; height: 96px; margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #FFE9A3, #D6B56D);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; color: var(--repo-color-primary);
  box-shadow: 0 8px 24px rgba(214,181,109,0.6);
  animation: xpBadgeSpin 0.7s ease;
}
@keyframes xpBadgeSpin {
  0% { transform: rotate(-20deg) scale(0.5); }
  60% { transform: rotate(8deg) scale(1.12); }
  100% { transform: rotate(0) scale(1); }
}
.xp-levelup-title { font-size: 26px; font-weight: 900; color: var(--repo-color-primary); margin: 4px 0; }
.xp-levelup-sub { font-size: 16px; color: var(--repo-color-text-light); margin-bottom: 20px; }
.xp-levelup-close {
  display: inline-block; width: 100%; padding: 14px;
  background: var(--repo-color-primary); color: #fff; border: none; border-radius: 12px;
  font-size: 17px; font-weight: 700; cursor: pointer; min-height: 52px;
}
/* 紙吹雪 */
.xp-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10059; overflow: hidden; }
.xp-confetti i {
  position: absolute; top: -10px; width: 9px; height: 14px; opacity: 0.9;
  animation: xpFall linear forwards;
}
@keyframes xpFall {
  0% { transform: translateY(-10px) rotate(0); }
  100% { transform: translateY(105vh) rotate(540deg); }
}

/* ============================================================
   スタッフ: 出退勤の打刻カード（大ボタン・スマホ最優先）
   ============================================================ */
.staff-clock-flash {
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
  font-size: 16px; font-weight: 700; text-align: center;
}
.staff-clock-flash--ok { background: rgba(21,128,61,0.12); color: var(--repo-color-success); }
.staff-clock-flash--ng { background: rgba(180,35,24,0.10); color: var(--repo-color-error); }

.staff-clock-card {
  background: var(--repo-color-white);
  border: 1px solid var(--repo-color-border);
  border-radius: 16px;
  padding: 18px 16px 14px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(16,42,67,0.06);
}
.staff-clock-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--repo-color-text);
  margin: 0 0 14px;
}
.staff-clock-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--repo-color-text-light); flex: 0 0 auto;
}
.staff-clock-dot--on { background: var(--repo-color-success); box-shadow: 0 0 0 4px rgba(21,128,61,0.15); }
.staff-clock-dot--done { background: var(--repo-color-info); }

.staff-clock-buttons { display: flex; gap: 12px; }
.staff-clock-form { flex: 1; margin: 0; }
.staff-clock-btn {
  width: 100%; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: none; border-radius: 14px;
  font-size: 22px; font-weight: 800; color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,42,67,0.18);
}
.staff-clock-btn-icon { font-size: 30px; }
.staff-clock-btn-sub { font-size: 13px; font-weight: 700; opacity: 0.9; }
.staff-clock-btn--in { background: var(--repo-color-success); }
.staff-clock-btn--in:active { transform: scale(0.98); }
.staff-clock-btn--out { background: var(--repo-color-primary); }
.staff-clock-btn--out:active { transform: scale(0.98); }
.staff-clock-btn:disabled { background: #C7CDD6; color: #fff; cursor: not-allowed; box-shadow: none; }
.staff-clock-note { text-align: center; font-size: 13px; color: var(--repo-color-text-light); margin: 10px 0 0; }
