/* en-cards（英語 ことばカード）。正かい＝みどり、まちがい＝赤、えらんでいる＝オレンジ。英字は Andika */
.ec { --ec-ok: #10b981; --ec-okd: #047857; --ec-ng: #ef4444; --ec-ngd: #b91c1c; --ec-o: #f59e0b; --ec-b: #1e3a8a; font-size: 1.05rem; position: relative; }
.ec [hidden] { display: none !important; }
.ec-q { background: linear-gradient(180deg, #eef6ff, #f8fbff); border: 2px solid #93c5fd; border-radius: 16px; padding: 8px 14px; margin-bottom: 10px; font-weight: 700; line-height: 1.7; }
.ec-q rt, .ec rt { font-size: .5em; font-weight: 500; }
.ec-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.ec-b { font: 700 1rem/1.3 inherit; font-family: inherit; border-radius: 999px; border: 2px solid #cbd5e1; background: #fff; color: #1f2937; padding: 8px 16px; min-height: 44px; cursor: pointer;
  box-shadow: 0 3px 0 #e2e8f0; touch-action: manipulation; display: inline-flex; align-items: center; gap: 6px; }
.ec-b:active { transform: translateY(2px); box-shadow: none; }
.ec-play { border-color: #2563eb; color: #2563eb; box-shadow: 0 3px 0 #bfdbfe; }
.ec-slow { border-color: #0f8a72; color: #0f8a72; box-shadow: 0 3px 0 #a7f3d0; }
.ec-sub { border-color: #cbd5e1; color: #475569; font-size: .92rem; }
.ec-sub[aria-pressed="true"] { border-color: #7c3aed; color: #6d28d9; background: #f5f3ff; box-shadow: 0 3px 0 #ddd6fe; }
.ec-b.small { padding: 4px 10px; min-height: 40px; }
.ec-next { border-color: var(--ec-ok); background: linear-gradient(180deg, #34d399, #10b981); color: #fff; box-shadow: 0 3px 0 var(--ec-okd); }
.ec-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 8px 0 2px; min-height: 44px; }
.ec-rest { color: #64748b; font-weight: 700; }
.ec-lv { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.ec-st svg { width: 20px; height: 20px; color: #e2e8f0; display: block; }
.ec-st.on svg { color: #f59e0b; } .ec-st.cur svg { color: #fcd34d; }
.ec-lvt { font-size: .85rem; color: #64748b; font-weight: 700; margin-left: 4px; white-space: nowrap; }
/* カード */
.ec-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px; padding: 6px;
  background: linear-gradient(180deg, #fff, #f8fafc); border: 2px solid #dbe3ee; box-shadow: 0 4px 0 #e2e8f0, 0 6px 14px rgba(15, 23, 42, .06);
  cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .15s, box-shadow .15s, border-color .15s, opacity .2s; min-height: 64px; }
.ec-card:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.ec-img { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; }
.ec-img img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.ec-w { font-family: "Andika", "Segoe UI", Arial, sans-serif; font-weight: 700; color: var(--ec-b); font-size: 1.15rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.ec-noimg .ec-w { font-size: 1.4rem; padding: 8px 4px; }
.ec-noimg .ec-w { overflow-wrap: normal; word-break: keep-all; }   /* 語の途中で折り返さない（basketball 等。2026-11-14 統括） */
.ec-bz .ec-noimg .ec-w { font-size: 1.1rem; }
.ec-bz .ec-noimg { max-width: 100%; }
.ec-ja { font-size: .82rem; color: #475569; font-weight: 700; }
.ec-mark { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; }
.ec-mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.ec-card.sel { border-color: var(--ec-o); background: #fff7e6; transform: translateY(-4px); box-shadow: 0 0 0 4px rgba(245, 158, 11, .3), 0 8px 16px rgba(245, 158, 11, .2); }
.ec-card.ok { border-color: var(--ec-ok); background: #ecfdf5; animation: ec-pop .4s; }
.ec-card.ng { border-color: var(--ec-ng); background: #fef2f2; animation: ec-shake .35s; }
.ec-card.dim { opacity: .45; }
.ec-card.saying, .ec-word.saying { box-shadow: 0 0 0 4px #fde68a, 0 4px 0 #e2e8f0; }
.ec-card.lift { opacity: .35; }
.ec-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: rotate(-3deg) scale(1.04); box-shadow: 0 12px 24px rgba(0, 0, 0, .2); }
@keyframes ec-pop { 40% { transform: scale(1.08); } }
@keyframes ec-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .ec-card, .ec-card.ok, .ec-card.ng { animation: none; transition: none; } }
/* listen */
.ec-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; margin: 0 auto; }
.ec-grid.n2 { max-width: 360px; }
.ec-grid.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 400px; }
.ec-grid.n5, .ec-grid.n6, .ec-grid.ec-pre { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-grid.ec-pre .ec-card { cursor: default; opacity: .9; }
.ec-grid .ec-card { min-width: 0; }
.ec-cmp { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.ec-cbox { box-sizing: border-box; flex: 1 1 130px; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 12px; border: 2px solid var(--ec-ng); border-radius: 16px; background: #fff; }
.ec-cbox.want { border-color: #2563eb; }
.ec-cbox img { width: 72px; height: 72px; object-fit: contain; }
.ec-qm { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 800 2.2rem/1 sans-serif; color: #2563eb; background: radial-gradient(circle at 35% 30%, #fff, #dbeafe); }
.ec-cl { font-size: .85rem; font-weight: 700; color: #475569; }
.ec-sum { grid-column: 1 / -1; text-align: center; }
.ec-big { display: inline-flex; flex-direction: column; align-items: center; padding: 10px 24px; border-radius: 20px; background: linear-gradient(180deg, #fffbeb, #fef3c7); border: 2px solid #fcd34d; color: #92400e; }
.ec-big svg { width: 44px; height: 44px; color: #f59e0b; }
.ec-big b { font-size: 1.8rem; }
.ec-big span { font-size: .85rem; font-weight: 700; }
.ec-again { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ec-again p { width: 100%; margin: 0; font-weight: 700; color: #475569; }
.ec-again .ec-card { width: 96px; }
/* ひとこと */
.ec-fb { min-height: 1.6em; margin: 8px 0; padding: 6px 10px; border-radius: 12px; font-weight: 700; line-height: 1.7; display: flex; gap: 6px; align-items: flex-start; }
.ec-fb.ok { background: #ecfdf5; color: var(--ec-okd); }
.ec-fb.ng { background: #fef2f2; color: var(--ec-ngd); }
.ec-mi { flex: none; width: 24px; height: 24px; margin-top: 3px; } .ec-mi svg { width: 100%; height: 100%; display: block; }
.ec-ml { display: block; }
/* sort */
.ec-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 70px; padding: 10px; border-radius: 16px; background: repeating-linear-gradient(45deg, #f8fafc 0 10px, #f1f5f9 10px 20px); border: 2px dashed #cbd5e1; }
.ec-pool.empty { min-height: 30px; }
.ec-pool .ec-card, .ec-bz .ec-card { width: 86px; }
.ec-pool .ec-noimg, .ec-bz .ec-noimg { width: auto; min-width: 70px; }
.ec-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ec-boxes.n3 { grid-template-columns: repeat(3, 1fr); }
.ec-box { min-width: 0; border: 3px solid; border-radius: 18px; padding: 6px; min-height: 120px; background: #fff; transition: box-shadow .15s; cursor: pointer; }
.ec-box.over, .ec-picking .ec-box { box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }
.ec-bh { text-align: center; font-weight: 800; padding: 4px 6px; border-radius: 12px; margin-bottom: 6px; }
.ec-bh .en-s { font-size: 1.3em; }
.ec-bz { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 60px; }
.ec-bwhy { font-size: .9rem; font-weight: 700; background: #ecfdf5; color: var(--ec-okd); border-radius: 10px; padding: 4px 8px; margin-bottom: 6px; }
.ec-box.c-b { border-color: #93c5fd; } .ec-box.c-b .ec-bh { background: #dbeafe; color: #1e40af; }
.ec-box.c-o { border-color: #fdba74; } .ec-box.c-o .ec-bh { background: #ffedd5; color: #9a3412; }
.ec-box.c-g { border-color: #6ee7b7; } .ec-box.c-g .ec-bh { background: #d1fae5; color: #065f46; }
.ec-box.c-p { border-color: #c4b5fd; } .ec-box.c-p .ec-bh { background: #ede9fe; color: #5b21b6; }
.ec-box.c-k { border-color: #f9a8d4; } .ec-box.c-k .ec-bh { background: #fce7f3; color: #9d174d; }
.ec-box.fin { border-style: solid; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
/* match */
.ec-match { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 56px; max-width: 460px; margin: 0 auto; }
.ec-col { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.ec-col.l .ec-card { width: 100%; max-width: 110px; margin-left: auto; }
.ec-word { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 14px; border: 2px solid #dbe3ee; background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 3px 0 #e2e8f0; font-family: "Andika", "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--ec-b); cursor: pointer; touch-action: manipulation; padding: 4px 8px; max-width: 150px; }
.ec-col.r { justify-content: space-around; }
.ec-word.ok { border-color: var(--ec-ok); background: #ecfdf5; } .ec-word.ng { border-color: var(--ec-ng); background: #fef2f2; }
.ec-wire { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.ec-wire path { fill: none; stroke: #f59e0b; stroke-width: 4; stroke-linecap: round; }
.ec-wire path.ok { stroke: var(--ec-ok); } .ec-wire path.ng { stroke: var(--ec-ng); stroke-dasharray: 6 5; }
.ec-wire circle { fill: #fff; stroke: #64748b; stroke-width: 2; }
.ec-note { color: #64748b; font-size: .85rem; }
@media (max-width: 420px) {
  .ec-match { gap: 10px 36px; }
  .ec-boxes.n3 { grid-template-columns: 1fr; }
  .ec-pool .ec-card, .ec-bz .ec-card { width: 76px; }
  .ec-pool .ec-noimg, .ec-bz .ec-noimg { width: auto; }
  .ec-lv { margin-left: 0; width: 100%; }
}
