/* OE Cálculo · estilos */
:root {
  --ink: #14343a; --muted: #5d7a7f; --line: #dcebe7; --bg: #f6faf9; --card: #fff;
  --teal: #138a72; --teal-d: #0d6f5c; --mint: #e6f6f1; --brand-xl: #f1fbf7; --brand-m: #8fd8bf; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-head: var(--font); --sun: #ffc857; --coral: #f26b5b; --sky: #4fb6e0; --orange: #ff9b42;
  --r: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
h1, h2, h3, .oec-brand b, .oec-course__n { font-family: var(--font-head); }
a { color: var(--teal-d); }
button, select, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
.oec-main { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }

/* ----- navegación ----- */
.oec-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.oec-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.oec-brand__logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 800; letter-spacing: -.03em; box-shadow: 0 3px 0 var(--teal-d); }
.oec-brand b { display: block; font-size: 18px; line-height: 1.1; } .oec-brand small { color: var(--muted); font-size: 12px; }
.oec-nav nav { display: flex; gap: 4px; }
.oec-nav nav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; }
.oec-nav nav a:hover { background: var(--mint); } .oec-nav nav a.is-on { background: var(--teal); color: #fff; }
.oec-pro { background: var(--sun); color: #5a3d00; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.oec-classsel { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.oec-classsel select { border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; font-weight: 700; max-width: 170px; }
.oec-main.oec-main--wide { max-width: 1700px; }
.oec-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 22px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; max-width: 1180px; margin: 0 auto; }

/* ----- botones y piezas ----- */
.oec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; font-weight: 800; cursor: pointer; text-decoration: none; background: #fff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); transition: transform .08s; }
.oec-btn:active { transform: translateY(2px); }
.oec-btn--primary { background: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-d); }
.oec-btn--ghost:hover { background: var(--mint); }
.oec-btn--dark { background: var(--ink); color: #fff; box-shadow: none; }
.oec-btn:disabled { opacity: .45; cursor: not-allowed; }
.oec-chip { display: inline-block; background: var(--mint); color: var(--teal-d); border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: 13px; }
.oec-note { color: var(--muted); font-size: 14px; margin: 10px 0; }
.oec-note--priv { background: #fff8e6; border: 1px solid #f4e2ab; color: #7a5a00; padding: 10px 14px; border-radius: 12px; }
.oec-h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 12px; }
.oec-back { display: inline-block; margin-bottom: 10px; font-weight: 700; text-decoration: none; }
.oec-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 12px; }
.oec-link { background: none; border: 0; padding: 0; color: var(--teal-d); font-weight: 800; cursor: pointer; text-decoration: underline dotted; }

/* ----- inicio ----- */
.oec-hero { padding: 26px 0 12px; max-width: 760px; }
.oec-hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.02em; }
.oec-hero p { font-size: 19px; color: var(--muted); margin: 12px 0 0; }
.oec-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 22px 0; }
.oec-course { --c: var(--teal); display: grid; gap: 4px; padding: 22px; border-radius: 24px; background: #fff; border: 2px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: 0 6px 0 #e3eeeb; position: relative; overflow: hidden; transition: transform .12s; }
.oec-course::before { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--c); opacity: .16; }
.oec-course:hover { transform: translateY(-3px); border-color: var(--c); }
.oec-course__n { font-size: 54px; font-weight: 800; line-height: 1; color: var(--c); letter-spacing: -.03em; }
.oec-course__t { font-weight: 800; font-size: 18px; } .oec-course__d, .oec-course__p { color: var(--muted); font-size: 14px; }
.oec-course__p { color: var(--teal-d); font-weight: 700; }
.oec-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.oec-feats > div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; } .oec-feats p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ----- mapa de niveles ----- */
.oec-coursehead { --c: var(--teal); display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.oec-coursehead .oec-course__n { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 40px; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.oec-coursehead h1 { font-size: clamp(26px, 3.6vw, 38px); } .oec-coursehead p { margin: 4px 0 0; color: var(--muted); font-weight: 600; }
.oec-curr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; }
.oec-curr summary { cursor: pointer; font-weight: 800; } .oec-curr ul { margin: 10px 0 0; padding-left: 20px; }
.oec-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 14px; }
.oec-level { --c: var(--teal); display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 14px 16px; box-shadow: 0 5px 0 #e3eeeb; }
.oec-level.is-locked { background: #fafcfb; } .oec-level.is-locked .oec-level__n { filter: grayscale(.7); opacity: .7; }
.oec-level__n { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 22px; }
.oec-level h3 { font-size: 17px; } .oec-level__m { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.oec-level__a { grid-column: 1 / -1; display: flex; gap: 8px; } .oec-level__a .oec-btn { flex: 1; min-height: 44px; }
.oec-tag { font-size: 12px; font-weight: 800; background: #eef3f2; color: var(--muted); padding: 3px 9px; border-radius: 99px; }
.oec-tag--free { background: var(--mint); color: var(--teal-d); } .oec-tag--ok { background: #fff1d6; color: #8a5a00; }

/* ----- modales y formularios ----- */
.oec-modal { position: fixed; inset: 0; z-index: 2147483000; display: none; place-items: center; padding: 16px; background: rgba(20, 52, 58, .5); }
.oec-modal.show { display: grid; }
.oec-modal__panel { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 26px; padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.oec-modal__panel h3 { font-size: 26px; } .oec-modal__sub { margin: 4px 0 14px; color: var(--muted); font-weight: 600; }
.oec-modal__btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.oec-opt { margin: 14px 0; } .oec-opt > b { display: block; margin-bottom: 6px; font-size: 14px; }
.oec-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.oec-seg button { flex: 1; min-height: 48px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 800; cursor: pointer; }
.oec-seg button.is-on { border-color: var(--teal); background: var(--mint); color: var(--teal-d); }
.oec-grp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .oec-grp > span[hidden] { display: none; } .oec-grp label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.oec-grp select, .oec-form select, .oec-form input, .oec-block textarea, .oec-inl select { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; width: 100%; }
.oec-card-box { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin: 16px 0; } .oec-card-box h2 { font-size: 22px; margin-bottom: 8px; }
.oec-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; } .oec-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; flex: 1 1 160px; }
.oec-inl { font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; } .oec-inl select { width: auto; }
.oec-block { display: grid; gap: 6px; font-weight: 700; margin: 10px 0; }
.oec-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 15px; } .oec-check.is-off { opacity: .55; } .oec-check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.oec-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 16px; margin: 14px 0; }
.oec-tablewrap { overflow-x: auto; }
.oec-table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
.oec-table th, .oec-table td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: center; } .oec-table th:first-child { text-align: left; }
.oec-table td { color: #c8d4d1; min-width: 40px; } .oec-table td.is-p { color: #9a8f6a; background: #fffbea; } .oec-table td.is-m { color: #d99200; background: #fff1d6; font-weight: 800; }
.oec-licence.is-pro { border-color: var(--brand-m); background: var(--brand-xl); }
.oec-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.oec-compare > div { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; } .oec-compare .is-pro { border: 2px solid var(--teal); background: var(--brand-xl); } .oec-compare ul { padding-left: 20px; margin: 8px 0 0; }

/* ----- juego ----- */
.oec-play { background: linear-gradient(180deg, #fffdf8, #fff 40%); border: 1px solid var(--line); border-radius: 30px; padding: clamp(14px, 2.4vw, 26px); box-shadow: 0 18px 50px rgba(25, 55, 50, .08); position: relative; }
.oec-play__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.oec-play__title { flex: 1; min-width: 200px; text-align: center; } .oec-play__title h2 { font-size: clamp(20px, 2.6vw, 30px); margin-top: 4px; }
.oec-play__tools { display: flex; gap: 8px; }
.oec-boards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.oec-play[data-mode="duo"] .oec-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .oec-play[data-mode="duo"] .oec-boards { grid-template-columns: minmax(0, 1fr); } }
.oec-board { container-type: inline-size; container-name: oecb; display: flex; flex-direction: column; gap: 12px; min-width: 0; background: #fff; border: 2px solid var(--line); border-radius: 26px; padding: clamp(10px, 1.6vw, 20px); }
.oec-play[data-mode="duo"] .oec-board[data-player="1"] { border-color: var(--sky); background: linear-gradient(180deg, #f3fbfe, #fff 120px); }
.oec-play[data-mode="duo"] .oec-board[data-player="2"] { border-color: var(--orange); background: linear-gradient(180deg, #fff7ef, #fff 120px); }
.oec-pl { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: 16px; font-size: 18px; }
.oec-pl--1 { background: #e9f8fd; border: 2px solid var(--sky); } .oec-pl--2 { background: #fff3e7; border: 2px solid var(--orange); } .oec-pl--solo { background: var(--mint); border: 2px solid var(--brand-m); }
.oec-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.oec-stats span { background: #eef6f3; border-radius: 99px; padding: 7px 14px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.oec-stats .ok { background: var(--mint); color: var(--teal-d); } .oec-stats .er { background: #fdeceb; color: #b8453f; } .oec-stats .st { background: #fff1d6; color: #a35a00; }
.oec-bar { height: 10px; border-radius: 99px; background: #e6efec; overflow: hidden; } .oec-bar > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--brand-m), var(--teal)); border-radius: 99px; transition: width .3s; }
.oec-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 310px); gap: 16px; align-items: start; }
@container oecb (max-width: 560px) { .oec-work { grid-template-columns: minmax(0, 1fr); } }
.oec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
@container oecb (min-width: 1500px) { .oec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.oec-grid.is-1col { grid-template-columns: minmax(0, 1fr); }
.oec-card { container-type: inline-size; position: relative; display: grid; place-items: center; min-height: 112px; padding: 26px 10px 14px; border: 3px solid #d6e6e1; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 #d9e7e3; cursor: pointer; color: var(--ink); transition: transform .12s, border-color .12s; touch-action: manipulation; }
.oec-card:hover:not(:disabled) { border-color: var(--brand-m); } .oec-card:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #d9e7e3; }
.oec-card.is-selected { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(79, 182, 224, .28), 0 5px 0 #b9e3f2; background: #fbfeff; }
.oec-card.is-solved { border-color: var(--brand-m); background: var(--brand-xl); box-shadow: 0 5px 0 var(--brand-m); animation: oec-pop .38s ease; }
.oec-card.is-wrong { border-color: var(--coral); animation: oec-shake .4s; } .oec-card.is-drop { border-color: var(--orange); background: #fff8ee; transform: scale(1.03); } .oec-card:disabled { cursor: default; }
@keyframes oec-pop { 50% { transform: scale(1.04); } } @keyframes oec-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.oec-num { position: absolute; left: 10px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: #eef6f3; color: #4a6b66; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.oec-tick { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; }
.oec-expr { display: flex; align-items: center; justify-content: center; gap: .28em; white-space: nowrap; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; font-size: clamp(16px, calc(90cqi / var(--len, 8)), 72px); }
.oec-slot { display: inline-grid; place-items: center; min-width: 1.5em; padding: 0 .3em; min-height: 1.25em; border: .07em dashed var(--brand-m); border-radius: .3em; background: #f3faf8; color: #5d8a80; font-weight: 800; }
.oec-slot.is-active { border-color: var(--sky); background: #eaf8fd; color: var(--ink); } .oec-slot.is-filled { border: .07em solid var(--brand-m); background: var(--mint); color: var(--teal-d); }
.frac { display: inline-grid; text-align: center; vertical-align: middle; line-height: 1; } .frac i { font-style: normal; padding: 0 .15em; } .frac i:first-child { border-bottom: .07em solid currentColor; }
.oec-vert { display: grid; justify-items: end; gap: .08em; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; font-size: clamp(18px, calc(100cqi / var(--vlen, 6)), 40px); }
.oec-vert em { font-style: normal; margin-right: .5em; color: var(--teal); } .oec-vert i { width: 100%; height: .07em; background: var(--ink); border-radius: 9px; } .oec-card.is-vert { min-height: 150px; }
.oec-side { display: flex; flex-direction: column; gap: 12px; background: var(--brand-xl); border: 2px solid var(--line); border-radius: 22px; padding: 14px; }
.oec-answer { min-height: 62px; display: grid; place-items: center; text-align: center; padding: 8px 12px; background: #fff; border: 3px solid var(--brand-m); border-radius: 16px; font-weight: 800; font-size: 18px; color: #6a8a83; }
.oec-answer.has-value { font-size: 34px; color: var(--ink); border-color: var(--sky); font-variant-numeric: tabular-nums; }
.oec-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.oec-keypad button { min-height: 62px; border: 0; border-radius: 16px; background: #fff; font-size: 26px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #d3e3df, inset 0 0 0 2px #e3eeeb; touch-action: manipulation; }
.oec-keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 #d3e3df, inset 0 0 0 2px #e3eeeb; }
.oec-keypad .k-clear { color: #b8453f; } .oec-keypad .k-ok { background: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-d); } .oec-keypad .k-wide { grid-column: 1 / -1; min-height: 56px; font-size: 20px; }
@container oecb (max-width: 560px) { .oec-keypad:not(.has-comma) { grid-template-columns: repeat(6, 1fr); } .oec-keypad button { min-height: 54px; font-size: 22px; } .oec-keypad .k-wide { grid-column: 1 / -1; } .oec-keypad.has-comma { grid-template-columns: repeat(3, 1fr); } }
.oec-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 80px; align-content: flex-start; }
.oec-chipcard { min-width: 78px; min-height: 62px; padding: 6px 16px; border: 0; border-radius: 16px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; background: linear-gradient(180deg, #ffe28a, var(--sun)); color: #5a3d00; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 5px 0 #e9ad31; }
.oec-chipcard.is-source { opacity: .35; } .oec-chipcard.oec-drag { cursor: grabbing; transform: rotate(-3deg) scale(1.08); box-shadow: 0 14px 28px rgba(0, 0, 0, .25); opacity: 1; }
.oec-hint-text { margin: 0; text-align: center; color: var(--muted); font-weight: 700; }
.oec-btn--hint { align-self: center; min-height: 40px; background: #fff4d6; color: #8a5a00; box-shadow: inset 0 0 0 2px #f6dc9b; }
.oec-feedback { min-height: 44px; text-align: center; font-weight: 800; color: var(--teal); line-height: 1.35; }
.oec-feedback[data-tone="bad"] { color: #b8453f; } .oec-feedback[data-tone="hint"] { color: #7a5400; background: #fff8e0; border-radius: 14px; padding: 10px 12px; font-weight: 700; text-align: left; }
.oec-board.is-finished .oec-work { grid-template-columns: minmax(0, 1fr); }
.oec-summary { text-align: center; padding: 22px 12px; border-radius: 22px; background: var(--brand-xl); border: 3px solid var(--brand-m); }
.oec-stars { font-size: 56px; color: var(--sun); letter-spacing: 6px; text-shadow: 0 3px 0 #e9ad31; } .oec-stars span { color: #dfe8e5; text-shadow: none; }
.oec-summary h3 { font-size: 30px; margin: 4px 0; } .oec-summary__msg { color: var(--muted); margin: 0 0 12px; }
.oec-sumstats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } .oec-sumstats > div { background: #fff; border-radius: 16px; padding: 10px 18px; min-width: 96px; box-shadow: inset 0 0 0 2px var(--brand-m); } .oec-sumstats b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; } .oec-sumstats span { font-size: 13px; font-weight: 700; color: var(--muted); }
.oec-play__after { margin-top: 18px; text-align: center; } .oec-win { font-size: 26px; font-weight: 800; margin: 0 0 12px; } .oec-after__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ----- modo PDI: el mismo diseño del formato reducido, escalado (por JS) para llenar la pantalla ----- */
.oec-zoom { display: none; gap: 6px; }
.oec-play.is-pdi .oec-zoom { display: inline-flex; }
.oec-play.is-pdi { position: relative; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fffdf8; overflow: hidden; }
.oec-play.is-pdi .oec-stage { display: flex; flex-direction: column; padding: 14px 22px 16px; box-sizing: border-box; }
.oec-play.is-pdi .oec-play__top { flex: none; margin-bottom: 10px; }
.oec-play.is-pdi .oec-boards { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.oec-play.is-pdi .oec-board { min-height: 0; overflow: hidden; }
.oec-play.is-pdi .oec-work { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.oec-play.is-pdi .oec-grid { height: 100%; grid-auto-rows: minmax(0, 1fr); }
.oec-play.is-pdi .oec-card { min-height: 0; }
.oec-play.is-pdi .oec-side { height: 100%; justify-content: center; overflow: auto; }
.oec-play.is-pdi .oec-play__after { flex: none; margin-top: 10px; }
.oec-play.is-pdi .oec-card { container-type: size; }
.oec-play.is-pdi .oec-expr { font-size: clamp(18px, min(calc(94cqi / var(--len, 8)), 46cqh), 110px); }
.oec-play.is-pdi .oec-vert { font-size: clamp(22px, min(calc(100cqi / var(--vlen, 6)), 20cqh), 72px); }
.oec-play.is-pdi[data-mode="solo"] .oec-card:nth-child(n+5) { display: none; }
.oec-play.is-pdi .oec-play__title h2 { font-size: 26px; } .oec-play.is-pdi .oec-pl { padding: 6px 14px; } .oec-play.is-pdi .oec-stats span { padding: 4px 12px; }
.oec-play.is-pdi .oec-summary { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.oec-play.is-pdi .oec-stars { font-size: 140px; line-height: 1; } .oec-play.is-pdi .oec-summary h3 { font-size: 72px; line-height: 1.1; margin: 10px 0 6px; } .oec-play.is-pdi .oec-summary__msg { font-size: 28px; }
.oec-play.is-pdi .oec-sumstats { gap: 18px; margin-top: 18px; } .oec-play.is-pdi .oec-sumstats b { font-size: 60px; } .oec-play.is-pdi .oec-sumstats span { font-size: 22px; } .oec-play.is-pdi .oec-sumstats > div { padding: 18px 34px; min-width: 190px; }
.oec-play.is-pdi .oec-win { font-size: 34px; }

/* ----- dificultad y ayudas ----- */
.oec-diff { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #eef3f2; color: var(--muted); }
.oec-diff--basic { background: #e3f4e8; color: #1f6b3a; } .oec-diff--medium { background: #e6eefb; color: #2a4f8f; } .oec-diff--advanced { background: #ffe6df; color: #a3341a; }
.oec-pl--solo { justify-content: flex-start; gap: 10px; }
.oec-aid { background: #fff; border: 2px dashed var(--brand-m); border-radius: 16px; padding: 8px 10px; }
.oec-aid[hidden] { display: none; }
.oec-aid__svg { display: block; width: 100%; height: auto; max-height: 130px; }
.oec-aid__t { font: 700 13px system-ui, sans-serif; fill: var(--ink); } .oec-aid__n { font: 800 17px system-ui, sans-serif; }
.oec-aid__p { margin: 6px 0 0; font-size: 14.5px; font-weight: 600; color: #7a5400; line-height: 1.35; }
.oec-chipcard.oec-drag { cursor: grabbing; transform: scale(var(--sc, 1)) rotate(-2deg); box-shadow: 0 14px 28px rgba(0, 0, 0, .25); opacity: 1; }

/* ----- fichas ----- */
.oec-sheets { margin-top: 20px; }
.sheet { background: #fff; width: min(210mm, 100%); margin: 0 auto 22px; padding: 14mm 14mm 12mm; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, .07); color: #111; position: relative; }
.sheet-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 22px; } .sheet-head p { margin: 4px 0 0; font-size: 11px; color: #444; max-width: 105mm; }
.sheet-id { display: grid; gap: 8px; font-size: 13px; } .sheet-id i { display: inline-block; width: 55mm; border-bottom: 1px solid #111; height: 1em; vertical-align: bottom; }
.sheet-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 7mm 12px; }
.sheet-item { display: flex; gap: 6px; align-items: baseline; break-inside: avoid; font-size: 18px; } .sheet-n { font-size: 11px; font-weight: 700; color: #666; min-width: 1.6em; }
.sheet-expr { white-space: nowrap; font-variant-numeric: tabular-nums; } .blank { display: inline-block; min-width: 2.6em; border-bottom: 1.5px solid #111; height: 1.05em; vertical-align: baseline; margin-left: .2em; }
.sheet-vert { display: grid; justify-items: end; font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.25; } .sheet-vert em { font-style: normal; margin-right: .6em; } .sheet-vert i { width: 100%; border-top: 1.5px solid #111; } .blank--v { width: 100%; border-bottom: 0; min-height: 1.3em; }
.sheet-key { columns: 4; list-style: none; padding: 0; margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; } .sheet-key li { break-inside: avoid; margin-bottom: 8px; } .sheet-key b { color: #666; font-size: 12px; min-width: 2em; display: inline-block; }
.sheet-foot { position: absolute; left: 14mm; right: 14mm; bottom: 8mm; font-size: 10px; color: #777; text-align: center; border-top: 1px solid #ddd; padding-top: 4px; } .sheet { min-height: 270mm; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; } .no-print, .oec-noprint, .oec-nav, .oec-footer { display: none !important; }
  .oec-main { max-width: none; padding: 0; } .oec-sheets { margin: 0; }
  .sheet { box-shadow: none; border: 0; border-radius: 0; margin: 0; width: 210mm; height: 297mm; min-height: 0; break-after: page; page-break-after: always; overflow: hidden; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}
@media (max-width: 640px) { .oec-nav nav { order: 3; width: 100%; overflow-x: auto; } .oec-levels { grid-template-columns: 1fr; } .oec-grp { grid-template-columns: 1fr; } .sheet-key { columns: 2; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 640px) { .oec-brand small { display: none; } .oec-nav { gap: 8px; padding: 8px 12px; } .oec-classsel { font-size: 0; gap: 0; } .oec-classsel select { font-size: 14px; max-width: 150px; } .oec-nav nav a { padding: 8px 11px; } }

/* ----- modo incrustado (dentro de una página de WordPress) ----- */
.oec-embed body { background: transparent; }
.oec-embed .oec-footer, .oec-embed .oec-brand, .oec-embed .oec-ext { display: none; }
.oec-embed .oec-nav { position: static; background: transparent; backdrop-filter: none; border: 0; padding: 4px 14px 0; justify-content: space-between; }
.oec-embed .oec-main { padding-top: 8px; }
.oec-ext { font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted); }
.oec-ext:hover { color: var(--teal-d); }
.oec-brand__logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.oec-brand__logo.has-img { background: transparent; box-shadow: none; }
.oec-embed .oec-hero { padding-top: 6px; } .oec-embed .oec-hero h1 { font-size: clamp(24px, 3.2vw, 36px); } .oec-embed .oec-hero p { font-size: 17px; }

.oec-labs { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--teal-d); padding: 8px 14px; border-radius: 999px; background: var(--mint); white-space: nowrap; }
.oec-labs:hover { background: var(--brand-m); color: #fff; }
.oec-embed .oec-nav { gap: 10px; } .oec-embed .oec-nav nav { margin-right: auto; }

.oec-pro--test { background: #ffe1d9; color: #a3341a; }

/* chips de dificultad dentro de la fila de contadores */
.oec-stats .oec-diff { padding: 7px 14px; font-size: 15px; font-weight: 800; }
.oec-stats .oec-diff--basic { background: #e3f4e8; color: #1f6b3a; } .oec-stats .oec-diff--medium { background: #e6eefb; color: #2a4f8f; } .oec-stats .oec-diff--advanced { background: #ffe6df; color: #a3341a; }
.oec-stats .who { background: var(--mint); color: var(--teal-d); }
/* PDI: teclado y ayudas compactos para que quepa todo sin desplazarse */
.oec-play.is-pdi .oec-keypad button { min-height: 50px; font-size: 24px; }
.oec-play.is-pdi .oec-answer { min-height: 54px; } .oec-play.is-pdi .oec-answer.has-value { font-size: 32px; }
.oec-play.is-pdi .oec-aid__svg { max-height: 96px; } .oec-play.is-pdi .oec-aid { padding: 6px 8px; } .oec-play.is-pdi .oec-aid__p { font-size: 13.5px; margin-top: 3px; }
.oec-play.is-pdi .oec-feedback { min-height: 30px; font-size: 15px; } .oec-play.is-pdi .oec-side { gap: 8px; padding: 10px; }
.oec-play.is-pdi[data-mode="duo"] .oec-keypad button { min-height: 46px; font-size: 22px; }

/* ----- cuentas, comentarios y dificultad en la configuración ----- */
.oec-user { font-size: 14px; font-weight: 700; color: var(--teal-d); white-space: nowrap; }
.oec-sync { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; } .oec-sync[data-s="error"] { color: #b8453f; } .oec-sync[data-s="cloud"] { color: var(--teal-d); }
.oec-login { font-size: 14px; font-weight: 700; text-decoration: none; color: #fff; background: var(--accent, #f4775c); padding: 8px 16px; border-radius: 8px; white-space: nowrap; }
.oec-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700; background: #fff; color: var(--teal-d); box-shadow: 0 6px 20px rgba(0, 0, 0, .18), inset 0 0 0 2px var(--line); cursor: pointer; }
.oec-fab:hover { background: var(--mint); } body.is-playing .oec-fab { display: none; }
.oec-form--col { display: grid; gap: 4px; } .oec-form--col label { flex: none; }
.oec-form--col textarea { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; font: inherit; resize: vertical; }
.oec-diffrow { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin: 6px 0; } .oec-diffrow > span { font-weight: 700; font-size: 14px; min-width: 70px; } .oec-diffrow > span[hidden] { display: none; }
.oec-diffrow:has(> span[hidden]) { grid-template-columns: 1fr; }
.oec-seg--diff button { min-width: 100px; }
.oec-diffdesc { display: grid; gap: 2px; font-size: 13px; }
.oec-dbadge { display: inline-block; margin-left: 2px; padding: 0 4px; border-radius: 6px; font-size: 10px; font-weight: 800; background: #eef3f2; color: var(--muted); } .oec-dbadge.is-m { background: #fff1d6; color: #8a5a00; }
.oec-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 8px 0; } .oec-dl dt { color: var(--muted); font-weight: 700; } .oec-dl dd { margin: 0; font-weight: 700; }
.oec-embed .oec-nav { flex-wrap: wrap; }

.oec-seg--diff button { min-width: 0; padding: 0 8px; white-space: nowrap; font-size: 15px; }
/* PDI con 2 jugadores: resumen más compacto (cada tablero es más estrecho) */
.oec-play.is-pdi[data-mode="duo"] .oec-stars { font-size: 84px; } .oec-play.is-pdi[data-mode="duo"] .oec-summary h3 { font-size: 46px; } .oec-play.is-pdi[data-mode="duo"] .oec-summary__msg { font-size: 20px; }
.oec-play.is-pdi[data-mode="duo"] .oec-sumstats { gap: 10px; } .oec-play.is-pdi[data-mode="duo"] .oec-sumstats b { font-size: 38px; } .oec-play.is-pdi[data-mode="duo"] .oec-sumstats span { font-size: 15px; } .oec-play.is-pdi[data-mode="duo"] .oec-sumstats > div { padding: 10px 14px; min-width: 0; }
