/* RO Word Challenge — all rules are scoped to .rowch-app so themes and Divi are not affected. */
.rowch-app{
	--rowch-bg1:#eaf3ff;--rowch-bg2:#e3faf6;--rowch-angle:135deg;--rowch-accent:#14b8a6;--rowch-btn1:#2563eb;--rowch-btn2:#0f9d8f;
	--rowch-surface:#ffffff;--rowch-surface2:#f4f7fb;--rowch-text:#0f172a;--rowch-muted:#475569;--rowch-border:#dbe3ee;--rowch-shadow:0 1px 2px rgba(15,23,42,.05),0 8px 24px rgba(15,23,42,.06);
	--rowch-correct:#0f9d8f;--rowch-correct-fg:#fff;--rowch-present:#f2b134;--rowch-present-fg:#2b1d00;--rowch-absent:#7b8794;--rowch-absent-fg:#fff;
	--rowch-ok-bg:#e7f8f4;--rowch-bad-bg:#fdecec;--rowch-bad:#b42318;--rowch-focus:#1d4ed8;
	--rowch-page:linear-gradient(var(--rowch-angle),var(--rowch-bg1),var(--rowch-bg2));--rowch-title-color:var(--rowch-tc,#0f172a);--rowch-sub-color:var(--rowch-sc,#475569);
	position:relative;box-sizing:border-box;display:flex;flex-direction:column;min-height:100%;width:100%;max-width:var(--rowch-maxw,1280px);margin:0 auto;padding:24px;overflow:hidden;isolation:isolate;
	background:var(--rowch-page);color:var(--rowch-text);border:1px solid var(--rowch-border);border-radius:20px;
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Noto Sans Arabic","Noto Sans Devanagari","Noto Sans Malayalam",sans-serif;
	font-size:16px;line-height:1.5;text-align:start;
}
.rowch-app[data-theme="dark"]{
	--rowch-page:#0b1220;--rowch-surface:#121b2d;--rowch-surface2:#1a2540;--rowch-text:#e8eefc;--rowch-muted:#a7b4cc;--rowch-border:#2a3a5c;--rowch-shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
	--rowch-correct:#14b8a6;--rowch-correct-fg:#04201c;--rowch-present:#f5b942;--rowch-present-fg:#2b1d00;--rowch-absent:#4b5a75;--rowch-absent-fg:#f1f5ff;
	--rowch-ok-bg:#0e2b2a;--rowch-bad-bg:#3a1618;--rowch-bad:#ff9b94;--rowch-focus:#7db2ff;
	--rowch-title-color:#f1f5ff;--rowch-sub-color:#a7b4cc;
}
@media (prefers-color-scheme:dark){
	.rowch-app[data-theme="auto"]{
		--rowch-page:#0b1220;--rowch-surface:#121b2d;--rowch-surface2:#1a2540;--rowch-text:#e8eefc;--rowch-muted:#a7b4cc;--rowch-border:#2a3a5c;--rowch-shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
		--rowch-correct:#14b8a6;--rowch-correct-fg:#04201c;--rowch-present:#f5b942;--rowch-present-fg:#2b1d00;--rowch-absent:#4b5a75;--rowch-absent-fg:#f1f5ff;
		--rowch-ok-bg:#0e2b2a;--rowch-bad-bg:#3a1618;--rowch-bad:#ff9b94;--rowch-focus:#7db2ff;
		--rowch-title-color:#f1f5ff;--rowch-sub-color:#a7b4cc;
	}
}
.rowch-app *,.rowch-app *::before,.rowch-app *::after{box-sizing:border-box}
.rowch-app [hidden]{display:none!important}
.rowch-app button,.rowch-app input,.rowch-app select,.rowch-app textarea{font:inherit;color:inherit}
.rowch-app :focus-visible{outline:3px solid var(--rowch-focus);outline-offset:2px;border-radius:6px}

/* Header */
.rowch-app .rowch-header{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.rowch-app .rowch-headrow{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rowch-app .rowch-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--rowch-muted)}
.rowch-app .rowch-crumbs a{color:var(--rowch-muted);text-decoration:none}
.rowch-app .rowch-crumbs a:hover{color:var(--rowch-btn1);text-decoration:underline}
.rowch-app .rowch-crumb-current{font-weight:600;color:var(--rowch-text)}
.rowch-app .rowch-spark{flex:none;font-size:28px;line-height:1;color:var(--rowch-accent)}
.rowch-app .rowch-brand{display:flex;align-items:center;gap:14px;min-width:0}
.rowch-app .rowch-logo{display:block;height:auto;max-height:56px;width:auto;max-width:120px;object-fit:contain;flex:none}
.rowch-app .rowch-titles{min-width:0}
.rowch-app .rowch-title{margin:0;padding:0;font-size:var(--rowch-title-size,30px);font-weight:var(--rowch-title-weight,700);color:var(--rowch-title-color);line-height:1.15;letter-spacing:-.01em;text-transform:none}
.rowch-app .rowch-subtitle{margin:4px 0 0;font-size:var(--rowch-sub-size,15px);font-weight:var(--rowch-sub-weight,400);color:var(--rowch-sub-color)}
.rowch-app .rowch-theme-toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative;width:68px;height:36px;padding:0;border-radius:999px;border:1px solid var(--rowch-border);background:var(--rowch-surface);color:var(--rowch-text);cursor:pointer;box-shadow:var(--rowch-shadow);padding:0}
.rowch-app .rowch-theme-toggle:hover{border-color:var(--rowch-accent)}
.rowch-app .rowch-theme-toggle svg{position:absolute;top:8px;width:20px;height:20px;z-index:2;pointer-events:none}
.rowch-app .rowch-theme-toggle .rowch-ico-sun{left:8px}
.rowch-app .rowch-theme-toggle .rowch-ico-moon{right:8px}
.rowch-app .rowch-theme-toggle::before{content:"";position:absolute;top:3px;left:3px;width:28px;height:28px;border-radius:50%;background:var(--rowch-accent);opacity:.9;transition:transform .25s ease}
.rowch-app .rowch-theme-toggle[aria-pressed="true"]::before{transform:translateX(32px)}
.rowch-app .rowch-theme-toggle .rowch-ico-sun{color:#fff}
.rowch-app .rowch-theme-toggle[aria-pressed="true"] .rowch-ico-sun{color:var(--rowch-muted)}
.rowch-app .rowch-theme-toggle[aria-pressed="true"] .rowch-ico-moon{color:#fff}
.rowch-app .rowch-theme-toggle:not([aria-pressed="true"]) .rowch-ico-moon{color:var(--rowch-muted)}
/* Animated background */
.rowch-app .rowch-bg{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.rowch-app .rowch-bg span{position:absolute;display:block;border-radius:50%;background:radial-gradient(circle at 30% 30%,var(--rowch-btn1),transparent 70%);opacity:.16;animation:rowch-float 18s ease-in-out infinite}
.rowch-app .rowch-bg span:nth-child(2n){background:radial-gradient(circle at 30% 30%,var(--rowch-accent),transparent 70%);opacity:.2}
.rowch-app .rowch-bg span:nth-child(1){width:220px;height:220px;left:-60px;top:8%;animation-duration:20s}
.rowch-app .rowch-bg span:nth-child(2){width:140px;height:140px;right:6%;top:4%;animation-duration:15s;animation-delay:-4s}
.rowch-app .rowch-bg span:nth-child(3){width:90px;height:90px;left:22%;top:46%;animation-duration:13s;animation-delay:-7s}
.rowch-app .rowch-bg span:nth-child(4){width:260px;height:260px;right:-80px;top:38%;animation-duration:24s;animation-delay:-2s}
.rowch-app .rowch-bg span:nth-child(5){width:120px;height:120px;left:8%;bottom:6%;animation-duration:17s;animation-delay:-9s}
.rowch-app .rowch-bg span:nth-child(6){width:70px;height:70px;right:24%;bottom:10%;animation-duration:12s;animation-delay:-5s}
.rowch-app .rowch-bg span:nth-child(7){width:180px;height:180px;left:46%;top:-70px;animation-duration:22s;animation-delay:-11s}
@keyframes rowch-float{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(28px,-34px) scale(1.08)}66%{transform:translate(-24px,22px) scale(.94)}}
@media (prefers-reduced-motion:reduce){.rowch-app .rowch-bg span{animation:none}}

/* Layout */
.rowch-app .rowch-main{flex:1 0 auto;display:flex;flex-direction:column;gap:14px}
.rowch-app .rowch-controls,.rowch-app .rowch-stage,.rowch-app .rowch-section{background:var(--rowch-surface);border:1px solid var(--rowch-border);border-radius:16px;box-shadow:var(--rowch-shadow)}
.rowch-app .rowch-controls{padding:14px}
.rowch-app .rowch-stage{padding:16px}
.rowch-app .rowch-modes{display:flex;flex-wrap:wrap;gap:8px}
.rowch-app .rowch-mode,.rowch-app .rowch-diff{min-height:44px;padding:8px 16px;border-radius:999px;border:1px solid var(--rowch-border);background:var(--rowch-surface2);color:var(--rowch-text);font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.rowch-app .rowch-mode:hover:not(:disabled),.rowch-app .rowch-diff:hover:not(:disabled){border-color:var(--rowch-accent)}
.rowch-app .rowch-mode[aria-pressed="true"]{background:var(--rowch-btn1);border-color:var(--rowch-btn1);color:#fff}
.rowch-app .rowch-diff[aria-pressed="true"]{background:var(--rowch-btn2);border-color:var(--rowch-btn2);color:#fff;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.rowch-app .rowch-diff:disabled{opacity:.55;cursor:not-allowed}
.rowch-app .rowch-selectors{display:flex;flex-wrap:wrap;gap:14px 20px;margin-top:12px;align-items:flex-end}
.rowch-app .rowch-field{display:flex;flex-direction:column;gap:4px;margin:0}
.rowch-app .rowch-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--rowch-muted)}
.rowch-app .rowch-diffs{display:flex;gap:6px;flex-wrap:wrap}
.rowch-app .rowch-select,.rowch-app .rowch-input{min-height:44px;padding:8px 12px;border-radius:12px;border:1px solid var(--rowch-border);background:var(--rowch-surface2);color:var(--rowch-text);max-width:100%}
.rowch-app .rowch-select option{background:var(--rowch-surface);color:var(--rowch-text)}
.rowch-app .rowch-input{flex:1 1 200px;min-width:0;font-size:18px}
.rowch-app .rowch-note{margin:8px 0 0;font-size:13px;color:var(--rowch-muted)}

/* Pills + status */
.rowch-app .rowch-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.rowch-app .rowch-pill{display:flex;flex-direction:column;min-width:78px;padding:6px 12px;border-radius:12px;background:var(--rowch-surface2);border:1px solid var(--rowch-border)}
.rowch-app .rowch-pill-l{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--rowch-muted)}
.rowch-app .rowch-pill-v{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.rowch-app .rowch-status{min-height:24px;margin-bottom:8px;font-weight:600}
.rowch-app .rowch-status[data-kind="ok"]{color:var(--rowch-correct)}
.rowch-app .rowch-status[data-kind="warn"]{color:var(--rowch-bad)}
.rowch-app .rowch-loading{color:var(--rowch-muted);padding:24px 0;text-align:center}
.rowch-app .rowch-empty{padding:20px;border:1px dashed var(--rowch-border);border-radius:14px;background:var(--rowch-surface2);text-align:center}
.rowch-app .rowch-empty p{margin:6px 0 12px}

/* Buttons */
.rowch-app .rowch-btn{min-height:44px;padding:8px 18px;border-radius:12px;border:1px solid var(--rowch-border);background:var(--rowch-surface2);color:var(--rowch-text);font-weight:600;cursor:pointer;transition:filter .15s,border-color .15s}
.rowch-app .rowch-btn:hover:not(:disabled){border-color:var(--rowch-accent);filter:brightness(1.03)}
.rowch-app .rowch-btn:disabled{opacity:.5;cursor:not-allowed}
.rowch-app .rowch-btn-primary{background:var(--rowch-btn1);border-color:var(--rowch-btn1);color:#fff}
.rowch-app .rowch-btn-secondary{background:transparent;border-color:var(--rowch-btn2);color:var(--rowch-btn2)}
.rowch-app[data-theme="dark"] .rowch-btn-secondary{color:#5eead4;border-color:#2dd4bf}
@media (prefers-color-scheme:dark){.rowch-app[data-theme="auto"] .rowch-btn-secondary{color:#5eead4;border-color:#2dd4bf}}
.rowch-app .rowch-btn-danger{background:transparent;border-color:var(--rowch-bad);color:var(--rowch-bad)}
.rowch-app .rowch-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}

/* Word guess board */
.rowch-app .rowch-board{display:flex;flex-direction:column;align-items:center;gap:6px;margin:6px 0 14px}
.rowch-app .rowch-row{display:flex;gap:6px;max-width:100%}
.rowch-app .rowch-tile{position:relative;display:flex;align-items:center;justify-content:center;width:clamp(26px,calc((100vw - 90px)/var(--rowch-cols,8)),42px);aspect-ratio:1;min-width:26px;border:2px solid var(--rowch-border);border-radius:9px;background:var(--rowch-surface2);font-weight:700;font-size:clamp(14px,4vw,19px);text-transform:uppercase}
.rowch-app .rowch-tile[data-state="typed"]{border-color:var(--rowch-accent)}
.rowch-app .rowch-tile[data-state="fixed"]{border-color:var(--rowch-accent);background:color-mix(in srgb,var(--rowch-accent) 14%,transparent);font-weight:700}
.rowch-app .rowch-tile[data-state="correct"]{background:var(--rowch-correct);border-color:var(--rowch-correct);color:var(--rowch-correct-fg)}
.rowch-app .rowch-tile[data-state="present"]{background:var(--rowch-present);border-color:var(--rowch-present);color:var(--rowch-present-fg);border-radius:50%}
.rowch-app .rowch-tile[data-state="absent"]{background:var(--rowch-absent);border-color:var(--rowch-absent);color:var(--rowch-absent-fg);border-style:dashed}
.rowch-app .rowch-mark{position:absolute;top:1px;inset-inline-end:4px;font-size:10px;line-height:1}
.rowch-app .rowch-shake{animation:rowch-shake .35s}
@keyframes rowch-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.rowch-app .rowch-inputrow{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0}
.rowch-app .rowch-hintbox{margin:8px 0;padding:10px 14px;border-radius:12px;background:var(--rowch-surface2);border:1px solid var(--rowch-border)}
.rowch-app .rowch-hintbox ul{margin:6px 0 0;padding-inline-start:20px}
.rowch-app .rowch-dailyinfo{text-align:center;margin-bottom:8px;color:var(--rowch-muted)}

/* Keyboard */
.rowch-app .rowch-kb{display:flex;flex-direction:column;gap:6px;align-items:center;margin-top:10px}
.rowch-app .rowch-kbrow{display:flex;gap:4px;justify-content:center;flex-wrap:nowrap;max-width:100%}
.rowch-app .rowch-key{flex:0 1 auto;width:clamp(24px,calc((100vw - 100px)/10),44px);min-width:0;height:48px;padding:0;border-radius:9px;border:1px solid var(--rowch-border);background:var(--rowch-surface2);color:var(--rowch-text);font-weight:700;font-size:16px;text-transform:uppercase;cursor:pointer}
.rowch-app .rowch-key-wide{width:clamp(42px,12vw,72px);font-size:12px}
.rowch-app .rowch-key:hover:not(:disabled){border-color:var(--rowch-accent)}
.rowch-app .rowch-key:disabled{opacity:.6;cursor:not-allowed}
.rowch-app .rowch-key[data-state="correct"]{background:var(--rowch-correct);border-color:var(--rowch-correct);color:var(--rowch-correct-fg)}
.rowch-app .rowch-key[data-state="present"]{background:var(--rowch-present);border-color:var(--rowch-present);color:var(--rowch-present-fg)}
.rowch-app .rowch-key[data-state="absent"]{background:var(--rowch-absent);border-color:var(--rowch-absent);color:var(--rowch-absent-fg);text-decoration:line-through}

/* Quiz */
.rowch-app .rowch-progress{height:8px;border-radius:99px;background:var(--rowch-surface2);border:1px solid var(--rowch-border);overflow:hidden;margin-bottom:14px}
.rowch-app .rowch-progress-bar{display:block;height:100%;background:linear-gradient(90deg,var(--rowch-btn1),var(--rowch-accent));transition:width .25s}
.rowch-app .rowch-timebar{transition:width .25s linear}
.rowch-app .rowch-qcard{padding:16px;border-radius:14px;background:var(--rowch-surface2);border:1px solid var(--rowch-border);margin-bottom:12px}
.rowch-app .rowch-qnum{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--rowch-muted)}
.rowch-app .rowch-q{margin:4px 0 8px;font-size:18px;font-weight:700;color:var(--rowch-text)}
.rowch-app .rowch-big{margin:0;font-size:22px;font-weight:600}
.rowch-app .rowch-sentence{margin:0;font-size:21px;line-height:1.6}
.rowch-app .rowch-blank{display:inline-block;min-width:90px;border-bottom:3px solid var(--rowch-accent);margin:0 4px}
.rowch-app .rowch-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.rowch-app .rowch-opt{display:flex;align-items:center;gap:10px;min-height:52px;padding:10px 14px;border-radius:12px;border:1px solid var(--rowch-border);background:var(--rowch-surface);color:var(--rowch-text);text-align:start;font-weight:500;cursor:pointer}
.rowch-app .rowch-opt:hover:not(:disabled){border-color:var(--rowch-accent);background:var(--rowch-surface2)}
.rowch-app .rowch-opt:disabled{cursor:default}
.rowch-app .rowch-opt-mark{flex:none;width:20px;text-align:center;font-weight:800}
.rowch-app .rowch-opt[data-state="correct"]{background:var(--rowch-ok-bg);border-color:var(--rowch-correct);border-width:2px;color:var(--rowch-text)}
.rowch-app .rowch-opt[data-state="wrong"]{background:var(--rowch-bad-bg);border-color:var(--rowch-bad);border-width:2px;color:var(--rowch-text)}
.rowch-app .rowch-opt[data-state="removed"]{opacity:.35;text-decoration:line-through}
.rowch-app .rowch-feedback{margin-top:12px;padding:12px 16px;border-radius:12px;border:1px solid var(--rowch-border)}
.rowch-app .rowch-feedback[data-kind="ok"]{background:var(--rowch-ok-bg);border-color:var(--rowch-correct)}
.rowch-app .rowch-feedback[data-kind="bad"]{background:var(--rowch-bad-bg);border-color:var(--rowch-bad)}
.rowch-app .rowch-feedback p{margin:6px 0}
.rowch-app .rowch-example{font-style:italic;color:var(--rowch-muted)}
.rowch-app mark{background:var(--rowch-present);color:var(--rowch-present-fg);padding:0 4px;border-radius:4px}

/* Results */
.rowch-app .rowch-result{margin-top:14px;padding:16px;border-radius:14px;border:1px solid var(--rowch-border);background:var(--rowch-surface2)}
.rowch-app .rowch-result[data-kind="win"]{border-color:var(--rowch-correct);background:var(--rowch-ok-bg)}
.rowch-app .rowch-result[data-kind="lose"]{border-color:var(--rowch-border)}
.rowch-app .rowch-result-h{margin:0 0 6px;font-size:20px;color:var(--rowch-text)}
.rowch-app .rowch-bigscore{font-size:28px;font-weight:800;margin:4px 0}
.rowch-app .rowch-summary{margin:6px 0;padding-inline-start:20px}
.rowch-app .rowch-answer{font-size:20px}
.rowch-app .rowch-countdown{font-weight:700;font-variant-numeric:tabular-nums;color:var(--rowch-muted)}
.rowch-app .rowch-sharebox{width:100%;margin-top:10px;padding:10px;border-radius:12px;border:1px solid var(--rowch-border);background:var(--rowch-surface2);color:var(--rowch-text)}
.rowch-app .rowch-intro{text-align:center;padding:12px 0}
.rowch-app .rowch-intro .rowch-actions{justify-content:center}

/* Stats + footer */
.rowch-app .rowch-statgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0}
.rowch-app .rowch-stat{padding:10px 12px;border-radius:12px;background:var(--rowch-surface2);border:1px solid var(--rowch-border)}
.rowch-app .rowch-stat dt{font-size:12px;color:var(--rowch-muted);font-weight:600}
.rowch-app .rowch-stat dd{margin:2px 0 0;font-size:20px;font-weight:700}
.rowch-app .rowch-reset{margin-top:12px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.rowch-app .rowch-warn{flex-basis:100%;margin:0;color:var(--rowch-bad);font-weight:600}
.rowch-app .rowch-section{padding:0;overflow:hidden}
.rowch-app .rowch-section>summary{cursor:pointer;padding:14px 16px;font-weight:700;list-style:none;min-height:44px}
.rowch-app .rowch-section>summary::-webkit-details-marker{display:none}
.rowch-app .rowch-section>summary::after{content:"+";float:inline-end;font-weight:700;color:var(--rowch-accent)}
.rowch-app .rowch-section[open]>summary::after{content:"\2212"}
.rowch-app .rowch-section-body{padding:0 16px 14px;color:var(--rowch-text)}
.rowch-app .rowch-section-body p{margin:0 0 10px}
.rowch-app .rowch-footer{flex:none;display:flex;flex-direction:column;gap:10px;margin-top:18px}
.rowch-app .rowch-copy{margin:2px 0 0;text-align:center;font-size:12px;color:var(--rowch-muted)}
.rowch-app .rowch-credit{margin:6px 0 0;text-align:center;font-size:13px}
.rowch-app .rowch-credit a{color:var(--rowch-muted);text-decoration:none;font-weight:600}
.rowch-app .rowch-credit a:hover{color:var(--rowch-btn1);text-decoration:underline}

/* Small screens */
@media (max-width:600px){
	.rowch-app{padding:12px;border-radius:14px}
	.rowch-app .rowch-title{font-size:min(var(--rowch-title-size,30px),24px)}
	.rowch-app .rowch-stage{padding:12px}
	.rowch-app .rowch-btn,.rowch-app .rowch-mode{flex:1 1 auto}
	.rowch-app .rowch-options{grid-template-columns:1fr}
	.rowch-app .rowch-selectors{flex-direction:column;align-items:stretch}
	.rowch-app .rowch-select{width:100%}
	.rowch-app .rowch-key{height:46px}
	.rowch-app .rowch-pill{flex:1 1 70px}
}
@media (prefers-reduced-motion:reduce){
	.rowch-app *,.rowch-app *::before,.rowch-app *::after{animation:none!important;transition:none!important}
}
