/* 新题型（单词大比拼、排排坐、动词猎手）的样式。颜色全部用 app.css 里每套配色都有的变量。 */

.ig-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ig-progress { color: var(--ink2); font-size: 13px; font-weight: 600; }
.ig-points { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--heading); }
.ig-bar { height: 6px; border-radius: 999px; background: var(--soft-line); overflow: hidden; margin-bottom: 14px; }
.ig-bar > i { display: block; height: 100%; background: var(--blue); transition: width .25s; }

.ig-cn { font-size: 20px; font-weight: 700; color: var(--heading); line-height: 1.5; margin: 6px 0 14px; }
.ig-phrase { font-size: 22px; line-height: 2.1; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.ig-phrase input {
  font: inherit; font-size: 20px; min-width: 6em; width: auto; padding: 4px 10px; text-align: center;
  border: 2px solid var(--blue); border-radius: 10px; background: var(--field-bg); color: var(--field-ink);
}
.ig-phrase input.right { border-color: var(--green); }
.ig-phrase input.bad { border-color: var(--red); animation: ig-shake .3s; }
@keyframes ig-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ig-hint { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; color: var(--ink2); margin-top: 6px; min-height: 1.4em; }
.ig-msg { min-height: 1.6em; margin: 10px 0; font-weight: 700; }
.ig-msg.ok { color: var(--green); }
.ig-msg.bad { color: var(--red); }
.ig-msg.info { color: var(--ink2); font-weight: 600; }
.ig-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* 排排坐 */
mark.ig-key { background: var(--mark-bg); color: var(--mark-ink); border-radius: 4px; padding: 0 2px; }
.ig-slots { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 2px dashed var(--line);
  border-radius: 14px; background: var(--bg3); margin-bottom: 12px; align-content: flex-start; }
.ig-slots:empty::before { content: attr(data-empty); color: var(--ink3); font-size: 14px; align-self: center; }
.ig-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.ig-frag {
  font: inherit; font-size: 16px; line-height: 1.4; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); box-shadow: 0 2px 0 var(--line); text-align: left;
}
.ig-frag:hover { border-color: var(--blue); }
.ig-frag.placed { background: var(--blue-l); border-color: var(--blue); }
.ig-frag.wrong { border-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 35%, transparent); }
.ig-frag.locked { cursor: default; box-shadow: none; }
/* 可以拖：手指按住片段时不滚动页面、不选中文字（在别的地方照样能滑动页面） */
.ig-frag:not(.locked) { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
/* 拖着走的那张卡片 */
.ig-ghost { position: fixed; left: 0; top: 0; z-index: 1000; margin: 0; pointer-events: none; cursor: grabbing;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28); border-color: var(--blue); background: var(--card); will-change: transform; }
.verb-phrase { display: block; color: var(--heading); font-size: 24px; font-weight: 700; line-height: 1.55; text-align: center; }
.verb-bilingual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: stretch;
  min-width: 0; padding: 14px; border: 1px solid var(--blue); border-radius: 12px; background: var(--panel); }
.verb-cn { color: var(--heading); font-size: 17px; font-weight: 700; line-height: 1.65; text-align: center; }
.verb-slot { min-width: 7em; min-height: 46px; padding: 5px 12px; border: 2px dashed var(--blue); border-radius: 10px;
  background: var(--field-bg); color: var(--field-ink); font: inherit; font-size: 21px; text-align: center; vertical-align: middle; }
.verb-slot.right { border-style: solid; border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--card)); }
.verb-slot.wrong { border-color: var(--red); animation: ig-shake .3s; }
.verb-instruction { margin: 12px 0 8px; color: var(--ink2); font-size: 14px; }
.verb-timer { color: var(--heading); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.verb-actions { justify-content: center; }
.verb-finish-note { min-height: 1.4em; margin: 8px 0 0; color: var(--ink2); font-size: 13px; text-align: center; }
.verb-pool { display: flex; flex-wrap: wrap; gap: 9px; min-height: 48px; }
.verb-word { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 14px; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 0 var(--line); font: inherit; font-weight: 700; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.verb-word:hover, .verb-word.selected { border-color: var(--blue); background: var(--blue-l); }
.verb-word:active { cursor: grabbing; }
.verb-word[hidden] { display: none; }
/* 松手会落到的位置 */
.ig-hole { display: inline-block; flex: none; border: 2px dashed var(--blue); border-radius: 10px;
  background: color-mix(in srgb, var(--blue) 10%, transparent); }
.ig-frag[hidden] { display: none; }
.ig-sentence { font-size: 18px; line-height: 1.7; color: var(--heading); font-weight: 600; cursor: pointer; padding: 10px 12px;
  border-radius: 12px; background: var(--chip-bg); }
.ig-sentence::before { content: "🔊 "; }

.ig-rec { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.ig-rec h3 { margin: 0 0 8px; font-size: 15px; }
.ig-rec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ig-rec-time { font-variant-numeric: tabular-nums; color: var(--ink2); min-width: 4em; }
.ig-level { flex: 1 1 120px; height: 8px; border-radius: 999px; background: var(--soft-line); overflow: hidden; }
.ig-level > i { display: block; height: 100%; width: 0; background: var(--green); transition: width .08s; }
.btn.rec-on { background: var(--red); box-shadow: 0 3px 0 color-mix(in srgb, var(--red) 70%, #000); }
.ig-heard { margin-top: 10px; font-size: 14px; color: var(--ink2); line-height: 1.6; }
.ig-heard b { color: var(--ink); }
.ig-heard .miss { color: var(--red); text-decoration: underline wavy; }

.ig-summary table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.ig-summary th, .ig-summary td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--soft-line); }
.ig-summary td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.ig-big { font-size: 34px; font-weight: 800; color: var(--heading); }

/* 首页：先选游戏类型。每种玩法一个色块（颜色取自当前配色，换配色跟着变），右下角一个「进入」按钮 */
.type-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
/* 选中玩法的题库列表：在网格里占满一整行；电脑上排在三张卡片后面，手机上（一列）紧跟在选中的那张后面 */
.type-cards > .in-types { --tc: var(--blue); grid-column: 1 / -1; order: 99; padding: 4px 12px 12px;
  background: color-mix(in srgb, var(--tc) 9%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--tc) 35%, var(--line));
  border-left: 6px solid var(--tc); border-top: 2px dashed color-mix(in srgb, var(--tc) 55%, var(--line)); border-radius: 0 0 14px 14px; }
.type-cards > .in-types.t-spell { --tc: var(--orange); }
.type-cards > .in-types.t-order { --tc: var(--green); }
.type-cards > .in-types.t-verb { --tc: var(--red); }
/* 选中的卡片往下伸，盖住和列表之间的空隙，像文件夹的标签：卡片和它的题库是一体的，中间一条虚线 */
.type-card.on { border-bottom: 0; border-radius: 14px 14px 0 0; margin-bottom: -12px; padding-bottom: 26px; box-shadow: none; position: relative; z-index: 1; }
.type-card.on:hover { transform: none; }
/* 列表里的分组和题库行也用这个玩法的颜色 */
.in-types .bank-group { border-color: color-mix(in srgb, var(--tc) 30%, var(--line)); }
.in-types .bank-group-head, .in-types .bank-group.other .bank-group-head { background: color-mix(in srgb, var(--tc) 16%, var(--card));
  border-left-color: var(--tc); color: var(--heading); }
.in-types .bank-group .item:hover { background: color-mix(in srgb, var(--tc) 8%, var(--card)); }
.in-types .btn:not(.ghost) { background: var(--tc); box-shadow: 0 3px 0 color-mix(in srgb, var(--tc) 70%, #000); color: var(--on-primary); }
.in-types > .empty { padding: 18px 6px; }
.type-cards[hidden], .type-cards > .in-types[hidden] { display: none; }
@media (max-width: 720px) {
  .type-cards { grid-template-columns: 1fr; }
  .type-cards > .in-types { order: var(--after, 99); }
}
.type-card { --tc: var(--blue); display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 14px; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--tc) 35%, var(--line));
  border-left: 6px solid var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--card)); transition: transform .1s, box-shadow .15s; }
.type-card.t-spell { --tc: var(--orange); }
.type-card.t-order { --tc: var(--green); }
.type-card.t-verb { --tc: var(--red); }
.type-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--tc) 22%, transparent); }
.type-card b { font-size: 17px; color: var(--heading); }
.type-card small { color: var(--ink2); line-height: 1.5; }
.type-card .tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.type-card .tc-arrow { display: inline-block; margin-left: 2px; animation: tc-bob 1.2s ease-in-out infinite; }
@keyframes tc-bob { 50% { transform: translateY(2px); } }
.type-card .tc-go { padding: 6px 14px; border-radius: 10px; font-weight: 800; font-size: 13px; background: var(--tc); color: var(--on-primary); }
.type-card.empty { border-left-color: color-mix(in srgb, var(--tc) 45%, var(--line)); }
.type-card.empty .tc-go { background: color-mix(in srgb, var(--tc) 45%, var(--ink3)); }
.pill.type { background: var(--blue-l); color: var(--blue-d); }
.rec-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rec-list audio { height: 32px; max-width: 220px; }
.rec-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
@media (max-width: 560px) {
  .verb-bilingual { padding: 11px; }
}
.ig-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--blue);
}
.ig-policy { font-size: .85rem; color: var(--ink2); }
.ig-reward, .reward-toast {
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--blue-l);
  color: var(--blue);
  font-weight: 800;
  animation: ig-reward-pop .4s ease-out;
}
.or-scoring-progress {
  height: .5rem;
  overflow: hidden;
  border-radius: .5rem;
  background: var(--blue-l);
}
.or-scoring-progress > i {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--blue);
  animation: or-scoring-slide 1.2s ease-in-out infinite alternate;
}
.or-scoring-label { animation: or-scoring-blink 1s ease-in-out infinite alternate; }
@keyframes ig-reward-pop {
  from { transform: scale(.96); opacity: .4; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes or-scoring-slide { to { transform: translateX(180%); } }
@keyframes or-scoring-blink { to { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  .ig-reward, .reward-toast, .or-scoring-progress > i, .or-scoring-label { animation: none; }
}
