/* =============================================================================
   Matrícula V3 · Web — "Qué decir" (frases, flash cards de idioma, vocabulario)
   ============================================================================= */
.qd-view { padding: 26px 34px 50px; }
@media (max-width: 1100px) { .qd-view { padding: 22px 20px 40px; } }

/* toolbar: pestañas + selector de idioma */
.qd-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.qd-tabs { display: flex; gap: 6px; }
.qd-spacer { flex: 1; }
.qd-lang-lbl { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.qd-lang { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.qd-lang button { border: none; cursor: pointer; font-family: inherit; padding: 7px 12px; font-size: 12.5px; font-weight: 700; border-radius: 7px; background: transparent; color: var(--ink-soft); }
.qd-lang button.on { background: linear-gradient(180deg,#f7f5ef,var(--panel)); box-shadow: 0 1px 4px rgba(0,0,0,.12), 0 1px 0 #fff inset; color: var(--ink); }

/* tarjetas (frases / vocab) */
.qd-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.qd-grid-vocab { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.qd-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: 0 1px 0 #fff inset; }
.qd-ghead { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 700; font-size: 14.5px; }
.qd-bar { width: 4px; height: 18px; border-radius: 3px; background: var(--yellow); }

/* frases */
.qd-phrases { display: flex; flex-direction: column; gap: 10px; }
.qd-phrase { display: flex; gap: 10px; align-items: stretch; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; transition: background .12s, border-color .12s; }
.qd-phrase:hover { border-color: var(--yellow-deep); }
.qd-phrase.copied { background: #e6f3e6; border-color: var(--green); }
.qd-phrase-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qd-prow { display: flex; gap: 8px; align-items: flex-start; }
.qd-lng { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; font-family: var(--mono); font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 5px; color: #fff; }
.qd-lng.es { background: #0d3b9a; }
.qd-lng.l2 { background: var(--steel); }
.qd-es { font-size: 15px; line-height: 1.45; color: var(--ink); }
.qd-l2 { font-size: 15px; line-height: 1.45; color: var(--ink-soft); font-style: italic; }
.qd-copy { flex: 0 0 auto; width: 22px; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 15px; }
.qd-phrase.copied .qd-copy { color: var(--green); }

/* vocabulario */
.qd-search { width: 100%; max-width: 420px; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; outline: none; margin-bottom: 16px; }
.qd-search:focus { border-color: var(--yellow-deep); box-shadow: 0 0 0 3px rgba(243,194,10,.22); }
.qd-vhead { display: flex; gap: 10px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.qd-vhead span { flex: 1 1 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.qd-vrow { display: flex; gap: 10px; padding: 7px 6px; border-radius: 5px; }
.qd-vrow.alt { background: var(--panel-2); }
.qd-ves { flex: 1 1 0; min-width: 0; font-size: 14.5px; color: var(--ink); }
.qd-ven { flex: 1 1 0; min-width: 0; font-size: 14.5px; color: var(--steel); font-style: italic; }
.qd-empty { padding: 30px; color: var(--ink-soft); }

/* flash cards de idioma */
.qd-col { width: 100%; max-width: 560px; margin: 0 auto; }
.qd-cards-top { display: flex; gap: 6px; margin-bottom: 10px; justify-content: center; }
.qd-prog { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.qd-prog-bar { flex: 1; height: 8px; background: #bdbbb2; border-radius: 8px; overflow: hidden; }
.qd-prog-bar > div { height: 100%; background: var(--green); transition: width .3s; }
.qd-prog-n { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.qd-clegend { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }

.qd-cardarea { position: relative; height: 300px; }
.qd-flash { position: absolute; inset: 0; touch-action: none; cursor: pointer; user-select: none; transition: transform .26s cubic-bezier(.2,.7,.3,1); }
.qd-flash.dragging { transition: none; }
.qd-flash-inner { position: relative; height: 100%; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg,#fbfaf5,var(--white)); border: 1px solid var(--line); box-shadow: 0 16px 36px rgba(0,0,0,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 26px; }
.qd-tag { font-family: var(--mono); font-weight: 700; letter-spacing: .04em; font-size: 12px; padding: 4px 10px; border-radius: 5px; color: #fff; animation: qdFlip .35s ease both; }
.qd-tag.es { background: #0d3b9a; }
.qd-tag.l2 { background: var(--steel); }
.qd-flash-text { font-size: 24px; line-height: 1.35; text-align: center; color: var(--ink); animation: qdFlip .35s ease both; }
.qd-flash-hint { font-size: 12px; color: var(--ink-soft); margin-top: auto; }
.qd-flash-overlay { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .08s linear; }
.qd-flash-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-8deg); border: 4px solid; border-radius: 12px; padding: 8px 16px; font-weight: 800; font-size: 18px; letter-spacing: .04em; background: rgba(255,255,255,.85); pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.15); display: none; }
.qd-donecard { position: absolute; inset: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.qd-donecard .big { font-size: 20px; font-weight: 700; color: var(--ink); }
.qd-donecard div:not(.big) { font-size: 13.5px; color: var(--ink-soft); }

.qd-tools { display: flex; gap: 8px; margin-top: 14px; }

@keyframes qdFlip { 0% { opacity: 0; transform: rotateX(90deg) scale(.96); } 60% { opacity: 1; } 100% { opacity: 1; transform: rotateX(0) scale(1); } }
@media (max-width: 560px) { .qd-tools { flex-direction: column; } .qd-toolbar { gap: 8px; } .qd-spacer { display: none; } }
