:root{
  --eh-navy:#19243a;
  --eh-purple:#4f329a;
  --eh-purple-2:#6a42c3;
  --eh-pink:#d94f91;
  --eh-green:#10b981;
  --eh-red:#ef4444;
  --eh-amber:#f59e0b;
  --eh-muted:#747490;
  --eh-border:#e7e3ef;
  --eh-soft:#f7f4fb;
}

.eh-page{
  background:
    radial-gradient(circle at 10% 5%,rgba(79,50,154,.09),transparent 27%),
    radial-gradient(circle at 90% 15%,rgba(217,79,145,.07),transparent 24%),
    #f9f8fb;
}

.eh-container{max-width:1180px}
.eh-top-nav{margin-bottom:14px}
.eh-live-dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--eh-pink);
  box-shadow:0 0 0 4px rgba(217,79,145,.12);
}

.eh-card{border-radius:28px}

.eh-setup-layout{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(520px,1.1fr);
  gap:46px;
  align-items:center;
}

.eh-hero-copy{padding:8px 4px 8px 8px}

.eh-badge i{color:var(--eh-amber)}

.eh-title span{
  background:linear-gradient(95deg,var(--eh-purple),var(--eh-pink));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.eh-subtitle{max-width:500px}

.eh-feature-strip{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:23px;
}
.eh-feature-strip>div{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:116px;
  padding:9px 11px;
  border:1px solid var(--eh-border);
  border-radius:13px;
  background:#fff;
}
.eh-feature-icon{
  width:31px;height:31px;
  display:grid;place-items:center;
  flex:none;
  border-radius:9px;
  background:#f1edf9;
  color:var(--eh-purple);
  font-size:11px;
}
.eh-feature-strip>div>span:last-child{display:flex;flex-direction:column}
.eh-feature-strip b{font-size:11px;line-height:1.2;color:var(--eh-navy)}
.eh-feature-strip small{margin-top:2px;color:#9995a5;font-size:9px}

.eh-pb-banner{max-width:360px}

.eh-how-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
  padding:9px 13px;
  border:1px solid var(--eh-border);
  border-radius:999px;
  background:#fff;
  color:var(--eh-purple);
  font-size:11px;
  font-weight:850;
  cursor:pointer;
  transition:.18s ease;
}
.eh-how-btn:hover{
  border-color:rgba(79,50,154,.28);
  background:#f8f5fd;
}

.eh-setup-panel{
  padding:23px;
  border:1px solid var(--eh-border);
  border-radius:22px;
  background:#fbfafe;
  box-shadow:inset 0 1px 0 #fff,0 10px 30px rgba(25,36,58,.04);
}

.eh-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:18px;
}
.eh-panel-head small{
  display:block;
  margin-bottom:2px;
  color:var(--eh-purple);
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
}
.eh-panel-head h2{
  margin:0;
  color:var(--eh-navy);
  font-size:21px;
  font-weight:900;
  letter-spacing:-.45px;
}
.eh-panel-icon{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:13px;
  background:linear-gradient(135deg,var(--eh-navy),var(--eh-purple));
  color:#fff;
  box-shadow:0 8px 18px rgba(79,50,154,.18);
}

.eh-option-section{
  margin-bottom:14px;
  padding:14px;
  border:1px solid var(--eh-border);
  border-radius:16px;
  background:#fff;
}

.eh-select{
  width:100%;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--eh-border);
  border-radius:12px;
  background:#fff;
  color:var(--eh-navy);
  font-size:12px;
  font-weight:800;
  outline:none;
}
.eh-select:focus{
  border-color:var(--eh-purple);
  box-shadow:0 0 0 4px rgba(79,50,154,.07);
}

.eh-options-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:17px;
}

.eh-option-card{
  padding:14px;
  border-radius:16px;
}

.eh-diff-dot{
  width:10px;height:10px;flex:none;border-radius:50%;
  box-shadow:0 0 0 4px rgba(0,0,0,.035);
}
.eh-diff-dot.easy{background:#10b981}
.eh-diff-dot.medium{background:#f59e0b}
.eh-diff-dot.hard{background:#ef4444}

.eh-upgrade-btn{background:linear-gradient(135deg,#d97706,#f59e0b)}
.eh-access-note{margin:0;color:#c2414f;font-size:10px;font-weight:800}
.eh-hint{font-size:9.5px}

/* GAME */
#ehGame{padding:28px}

.eh-game-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.eh-mini-kicker{
  color:var(--eh-purple);
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
}
.eh-game-head h2{
  margin:2px 0 0;
  color:var(--eh-navy);
  font-size:22px;
  font-weight:900;
  letter-spacing:-.45px;
}
.eh-round-live{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid #dcefe8;
  border-radius:999px;
  background:#f2fbf7;
  color:#15835f;
  font-size:9px;
  font-weight:900;
}
.eh-round-live span{
  width:7px;height:7px;border-radius:50%;
  background:#10b981;
  box-shadow:0 0 0 4px rgba(16,185,129,.12);
}

.eh-stats-grid{margin-bottom:13px}

.eh-stage-wrap{
  padding:9px;
  border:1px solid var(--eh-border);
  border-radius:20px;
  background:#fbfafe;
}
.eh-stage-topline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:0 5px 8px;
  color:#9995a6;
  font-size:9px;
  font-weight:800;
}

.eh-stage{
  min-height:300px;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid #ddd7ea;
  border-radius:15px;
  background:
    linear-gradient(rgba(79,50,154,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(79,50,154,.035) 1px,transparent 1px),
    linear-gradient(180deg,#fdfcff,#f5f1fb);
  background-size:34px 34px,34px 34px,auto;
}

.eh-context-help{
  margin-bottom:14px;
  color:#9692a4;
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
}

.eh-sentence-container{
  max-width:860px;
  padding:18px 20px;
  color:var(--eh-navy);
  font-size:clamp(23px,3vw,34px);
  font-weight:750;
  line-height:1.65;
  text-align:center;
  user-select:none;
}

.eh-word{
  display:inline-block;
  margin:2px;
  padding:2px 6px;
  border-radius:7px;
  cursor:pointer;
  transition:background-color .18s,color .18s,transform .1s;
}
.eh-word:hover{background:rgba(79,50,154,.10)}
.eh-word:active{transform:scale(.96)}
.eh-word.fixed{
  pointer-events:none;
  background:#ecfdf5;
  color:#059669;
  text-shadow:none;
}
.eh-word.error-flash{
  color:#ef4444;
  animation:ehShakeFail .3s ease forwards;
}
@keyframes ehShakeFail{
  25%{transform:translateX(-4px)}
  50%{transform:translateX(4px)}
  75%{transform:translateX(-2px)}
}

.eh-input-overlay{
  position:absolute;
  inset:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  border-radius:15px;
  background:rgba(25,36,58,.58);
  backdrop-filter:blur(5px);
}

.eh-input-popup{
  width:min(350px,100%);
  padding:22px;
  border:1px solid rgba(255,255,255,.7);
  border-radius:18px;
  background:#fff;
  box-shadow:0 22px 55px rgba(25,36,58,.22);
  text-align:center;
  animation:ehPopIn .18s ease-out;
}
@keyframes ehPopIn{
  from{transform:translateY(8px) scale(.97);opacity:0}
  to{transform:translateY(0) scale(1);opacity:1}
}

.eh-popup-icon{
  width:42px;height:42px;
  display:grid;place-items:center;
  margin:0 auto 10px;
  border-radius:13px;
  background:#f1edf9;
  color:var(--eh-purple);
}

.eh-input-popup label{
  display:block;
  margin-bottom:9px;
  color:var(--eh-navy);
  font-size:13px;
  font-weight:850;
}

.eh-input-popup input{
  width:100%;
  min-height:48px;
  margin-bottom:13px;
  padding:8px 10px;
  border:1.5px solid var(--eh-border);
  border-radius:12px;
  color:var(--eh-navy);
  font-size:21px;
  font-weight:850;
  text-align:center;
  outline:none;
}
.eh-input-popup input:focus{
  border-color:var(--eh-purple);
  box-shadow:0 0 0 4px rgba(79,50,154,.08);
}
.eh-input-popup input.wrong-shake{
  border-color:#ef4444;
  color:#ef4444;
  animation:ehShakeFail .3s ease forwards;
}

.eh-input-actions{
  display:flex;
  justify-content:center;
  gap:9px;
}

.eh-btn-small{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 15px;
  border:0;
  border-radius:11px;
  background:var(--eh-purple);
  color:#fff;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.eh-btn-small:hover{background:var(--eh-purple-2)}
.eh-btn-cancel{
  background:#f1f0f4;
  color:#5c5868;
}
.eh-btn-cancel:hover{background:#e6e3ea}

/* MODAL */
.eh-modal-content{
  overflow:hidden;
  border:1px solid var(--eh-border)!important;
  border-radius:22px!important;
  box-shadow:0 24px 70px rgba(25,36,58,.20)!important;
}
.eh-modal-head{
  padding:21px 22px 13px;
  border:0;
}
.eh-modal-kicker{
  display:block;
  margin-bottom:2px;
  color:var(--eh-purple);
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
}
.eh-modal-head h5{
  margin:0;
  color:var(--eh-navy);
  font-size:22px;
  font-weight:900;
}
.eh-modal-body{padding:12px 22px 20px}
.eh-modal-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
}
.eh-modal-grid h6{
  margin:0 0 10px;
  color:var(--eh-navy);
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.eh-modal-steps{display:grid;gap:8px}
.eh-modal-steps>div{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid var(--eh-border);
  border-radius:12px;
  background:#fbfafe;
}
.eh-modal-steps b{
  width:25px;height:25px;
  display:grid;place-items:center;
  flex:none;
  border-radius:8px;
  background:var(--eh-purple);
  color:#fff;
  font-size:10px;
}
.eh-modal-steps span{display:flex;flex-direction:column}
.eh-modal-steps strong{font-size:11px;color:var(--eh-navy)}
.eh-modal-steps small{font-size:9px;color:#8f8a9c}

.eh-example{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:14px 0 18px;
  padding:11px;
  border:1px solid var(--eh-border);
  border-radius:12px;
  background:#fff;
}
.eh-example .wrong{
  padding:4px 7px;
  border-radius:7px;
  background:#fff0f1;
  color:#c2414f;
  font-weight:800;
  text-decoration:line-through;
}
.eh-example .right{
  padding:4px 7px;
  border-radius:7px;
  background:#ecfdf5;
  color:#059669;
  font-weight:800;
}
.eh-example i{color:#aaa5b5}

.eh-key-list{display:flex;flex-wrap:wrap;gap:9px}
.eh-key-list span{font-size:10px;color:#706c7e}
.eh-key-list kbd{
  margin-right:4px;
  padding:3px 6px;
  border-radius:5px;
  background:#f0eef4;
  color:#4d4957;
  box-shadow:0 2px 0 #d8d3df;
}

.eh-mode-note{
  display:flex;
  gap:10px;
  margin-bottom:9px;
  padding:10px;
  border:1px solid var(--eh-border);
  border-radius:12px;
  background:#fbfafe;
}
.eh-mode-note i{margin-top:2px;color:var(--eh-purple)}
.eh-mode-note span{display:flex;flex-direction:column}
.eh-mode-note strong{font-size:11px;color:var(--eh-navy)}
.eh-mode-note small{margin-top:2px;font-size:9px;line-height:1.5;color:#8f8a9c}

.eh-error-tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}
.eh-error-tags span{
  padding:5px 8px;
  border-radius:999px;
  background:#f1edf9;
  color:var(--eh-purple);
  font-size:9px;
  font-weight:800;
}

.eh-score-list{
  margin:0;
  padding-left:17px;
  color:#706c7e;
  font-size:10px;
  line-height:1.7;
}

.eh-modal-footer{
  padding:0 22px 22px;
  border:0;
}
.eh-modal-btn{
  width:auto;
  min-width:180px;
  min-height:44px;
  padding:0 18px;
}

@media(max-width:991.98px){
  .eh-setup-layout{grid-template-columns:1fr;gap:25px}
  .eh-hero-copy{text-align:center;padding:0}
  .eh-subtitle{margin-left:auto;margin-right:auto}
  .eh-feature-strip{justify-content:center}
  .eh-pb-banner{margin-left:auto;margin-right:auto;text-align:left}
}

@media(max-width:767.98px){
  .eh-options-grid{grid-template-columns:1fr}
  .eh-modal-grid{grid-template-columns:1fr}
  .eh-stage{min-height:280px}
}

@media(max-width:575.98px){
  .eh-card{border-radius:20px}
  .eh-setup-panel{padding:15px;border-radius:18px}
  .eh-feature-strip>div{flex:1;min-width:0}
  #ehGame{padding:18px 12px 24px}
  .eh-game-head h2{font-size:18px}
  .eh-round-live{display:none}
  .eh-stage-topline span:last-child{display:none}
  .eh-sentence-container{padding:15px 8px;font-size:clamp(21px,7vw,28px);line-height:1.7}
  .eh-input-popup{padding:18px}
  .eh-modal-head{padding:18px 16px 10px}
  .eh-modal-body{padding:10px 16px 16px}
  .eh-modal-footer{padding:0 16px 16px}
  .eh-modal-btn{width:100%}
}
